~ubuntu-branches/ubuntu/maverick/kaptain/maverick

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Tobias Toedter
  • Date: 2008-05-30 09:14:40 UTC
  • mfrom: (3.1.4 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080530091440-hkj713cgx4nxytp6
Tags: 1:0.72-2
* Use hardening-wrapper on m68k as well
* Remove DM upload rights
* Change maintainer e-mail address

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
dnl    You should have received a copy of the GNU Library General Public License
18
18
dnl    along with this library; see the file COPYING.LIB.  If not, write to
19
 
dnl    the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
20
 
dnl    Boston, MA 02110-1301, USA.
 
19
dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
20
dnl    Boston, MA 02111-1307, USA.
21
21
 
22
22
dnl IMPORTANT NOTE:
23
23
dnl Please do not modify this file unless you expect your modifications to be
26
26
dnl Single-module modifications are best placed in configure.in for kdelibs
27
27
dnl and kdebase or configure.in.in if present.
28
28
 
 
29
dnl ------------------------------------------------------------------------
 
30
dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
 
31
dnl thanks to Raja R Harinath.
 
32
dnl ------------------------------------------------------------------------
 
33
dnl
 
34
ifdef([_AC_PATH_X_XMKMF],[],
 
35
   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
 
36
ifdef([AC_OUTPUT_SUBDIRS],[],
 
37
   [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
 
38
 
29
39
# KDE_PATH_X_DIRECT
30
40
dnl Internal subroutine of AC_PATH_X.
31
41
dnl Set ac_x_includes and/or ac_x_libraries.
32
 
AC_DEFUN([KDE_PATH_X_DIRECT],
 
42
AC_DEFUN(KDE_PATH_X_DIRECT,
33
43
[
34
44
AC_REQUIRE([KDE_CHECK_LIB64])
35
45
 
96
106
  # Don't add to $LIBS permanently.
97
107
  ac_save_LIBS="$LIBS"
98
108
  LIBS="-l$x_direct_test_library $LIBS"
99
 
AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
 
109
AC_TRY_LINK(, [${x_direct_test_function}()],
100
110
[LIBS="$ac_save_LIBS"
101
111
# We can link X programs with no special library path.
102
112
ac_x_libraries=],
156
166
dnl Find a file (or one of more files in a list of dirs)
157
167
dnl ------------------------------------------------------------------------
158
168
dnl
159
 
AC_DEFUN([AC_FIND_FILE],
 
169
AC_DEFUN(AC_FIND_FILE,
160
170
[
161
171
$3=NO
162
172
for i in $2;
173
183
done
174
184
])
175
185
 
176
 
dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
177
 
dnl     if-not-found, test-parameter, prepend-path)
178
 
dnl
179
 
dnl Look for program-name in list-of-dirs+$PATH.
180
 
dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
181
 
dnl If found, $variable-name is set. If not, if-not-found is evaluated.
182
 
dnl test-parameter: if set, the program is executed with this arg,
183
 
dnl                 and only a successful exit code is required.
184
 
AC_DEFUN([KDE_FIND_PATH],
 
186
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
 
187
dnl     if-not-found, test-parameter)
 
188
AC_DEFUN(KDE_FIND_PATH,
185
189
[
186
190
   AC_MSG_CHECKING([for $1])
187
191
   if test -n "$$2"; then
192
196
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
193
197
        [
194
198
        kde_cv_path="NONE"
 
199
        dirs="$3"
195
200
        kde_save_IFS=$IFS
196
201
        IFS=':'
197
 
        dirs=""
198
202
        for dir in $PATH; do
199
203
          dirs="$dirs $dir"
200
 
        done
201
 
        if test -z "$6"; then  dnl Append dirs in PATH (default)
202
 
          dirs="$3 $dirs"
203
 
        else  dnl Prepend dirs in PATH (if 6th arg is set)
204
 
          dirs="$dirs $3"
205
 
        fi
 
204
        done
206
205
        IFS=$kde_save_IFS
207
206
 
208
207
        for dir in $dirs; do
239
238
   fi
240
239
])
241
240
 
242
 
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
 
241
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
243
242
[
244
243
    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
245
244
Please check whether you installed Qt correctly.
251
250
])
252
251
])
253
252
 
254
 
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
 
253
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
255
254
[
256
255
    AC_MSG_WARN([No Qt ui compiler (uic) found!
257
256
Please check whether you installed Qt correctly.
264
263
])
265
264
 
266
265
 
267
 
AC_DEFUN([KDE_CHECK_UIC_FLAG],
 
266
AC_DEFUN(KDE_CHECK_UIC_FLAG,
268
267
[
269
268
    AC_MSG_CHECKING([whether uic supports -$1 ])
270
269
    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
299
298
dnl in $QTDIR/bin, and some more usual places
300
299
dnl ------------------------------------------------------------------------
301
300
dnl
302
 
AC_DEFUN([AC_PATH_QT_MOC_UIC],
 
301
AC_DEFUN(AC_PATH_QT_MOC_UIC,
303
302
[
304
 
   AC_REQUIRE([KDE_CHECK_PERL])
305
303
   qt_bindirs=""
306
304
   for dir in $kde_qt_dirs; do
307
305
      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
317
315
     if test -z "$UIC_PATH" ; then
318
316
       KDE_UIC_ERROR_MESSAGE
319
317
       exit 1
320
 
     else
 
318
     elif test $kde_qtver = 3; then
 
319
       KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
 
320
       KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
 
321
 
321
322
       UIC=$UIC_PATH
322
 
 
323
 
       if test $kde_qtver = 3; then
324
 
         KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
325
 
         KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
326
 
 
327
 
         if test x$ac_uic_supports_libpath = xyes; then
328
 
             UIC="$UIC -L \$(kde_widgetdir)"
329
 
         fi
330
 
         if test x$ac_uic_supports_nounload = xyes; then
331
 
             UIC="$UIC -nounload"
332
 
         fi
 
323
       if test x$ac_uic_supports_libpath = xyes; then
 
324
           UIC="$UIC -L \$(kde_widgetdir)"
 
325
       fi
 
326
       if test x$ac_uic_supports_nounload = xyes; then
 
327
           UIC="$UIC -nounload"
333
328
       fi
334
329
     fi
335
330
   else
347
342
   AC_SUBST(UIC_TR)
348
343
])
349
344
 
350
 
AC_DEFUN([KDE_1_CHECK_PATHS],
 
345
AC_DEFUN(KDE_1_CHECK_PATHS,
351
346
[
352
347
  KDE_1_CHECK_PATH_HEADERS
353
348
 
395
390
 
396
391
])
397
392
 
398
 
AC_DEFUN([KDE_SET_PATHS],
 
393
AC_DEFUN(KDE_SET_PATHS,
399
394
[
400
395
  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
401
396
        kde_htmldir=\"$kde_htmldir\" \
406
401
        kde_locale=\"$kde_locale\" \
407
402
        kde_cgidir=\"$kde_cgidir\" \
408
403
        kde_confdir=\"$kde_confdir\" \
409
 
        kde_kcfgdir=\"$kde_kcfgdir\" \
410
404
        kde_mimedir=\"$kde_mimedir\" \
411
405
        kde_toolbardir=\"$kde_toolbardir\" \
412
406
        kde_wallpaperdir=\"$kde_wallpaperdir\" \
415
409
        kde_servicesdir=\"$kde_servicesdir\" \
416
410
        kde_servicetypesdir=\"$kde_servicetypesdir\" \
417
411
        kde_moduledir=\"$kde_moduledir\" \
418
 
        kde_styledir=\"$kde_styledir\" \
 
412
   kde_styledir=\"$kde_styledir\" \
419
413
        kde_widgetdir=\"$kde_widgetdir\" \
420
 
        xdg_appsdir=\"$xdg_appsdir\" \
421
 
        xdg_menudir=\"$xdg_menudir\" \
422
 
        xdg_directorydir=\"$xdg_directorydir\" \
423
414
        kde_result=$1"
424
415
])
425
416
 
426
 
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
 
417
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
427
418
[
428
419
if test "$1" = "default"; then
429
420
 
430
421
  if test -z "$kde_htmldir"; then
431
 
    kde_htmldir='\${datadir}/doc/HTML'
 
422
    kde_htmldir='\${prefix}/share/doc/HTML'
432
423
  fi
433
424
  if test -z "$kde_appsdir"; then
434
 
    kde_appsdir='\${datadir}/applnk'
 
425
    kde_appsdir='\${prefix}/share/applnk'
435
426
  fi
436
427
  if test -z "$kde_icondir"; then
437
 
    kde_icondir='\${datadir}/icons'
 
428
    kde_icondir='\${prefix}/share/icons'
438
429
  fi
439
430
  if test -z "$kde_sounddir"; then
440
 
    kde_sounddir='\${datadir}/sounds'
 
431
    kde_sounddir='\${prefix}/share/sounds'
441
432
  fi
442
433
  if test -z "$kde_datadir"; then
443
 
    kde_datadir='\${datadir}/apps'
 
434
    kde_datadir='\${prefix}/share/apps'
444
435
  fi
445
436
  if test -z "$kde_locale"; then
446
 
    kde_locale='\${datadir}/locale'
 
437
    kde_locale='\${prefix}/share/locale'
447
438
  fi
448
439
  if test -z "$kde_cgidir"; then
449
440
    kde_cgidir='\${exec_prefix}/cgi-bin'
450
441
  fi
451
442
  if test -z "$kde_confdir"; then
452
 
    kde_confdir='\${datadir}/config'
453
 
  fi
454
 
  if test -z "$kde_kcfgdir"; then
455
 
    kde_kcfgdir='\${datadir}/config.kcfg'
 
443
    kde_confdir='\${prefix}/share/config'
456
444
  fi
457
445
  if test -z "$kde_mimedir"; then
458
 
    kde_mimedir='\${datadir}/mimelnk'
 
446
    kde_mimedir='\${prefix}/share/mimelnk'
459
447
  fi
460
448
  if test -z "$kde_toolbardir"; then
461
 
    kde_toolbardir='\${datadir}/toolbar'
 
449
    kde_toolbardir='\${prefix}/share/toolbar'
462
450
  fi
463
451
  if test -z "$kde_wallpaperdir"; then
464
 
    kde_wallpaperdir='\${datadir}/wallpapers'
 
452
    kde_wallpaperdir='\${prefix}/share/wallpapers'
465
453
  fi
466
454
  if test -z "$kde_templatesdir"; then
467
 
    kde_templatesdir='\${datadir}/templates'
 
455
    kde_templatesdir='\${prefix}/share/templates'
468
456
  fi
469
457
  if test -z "$kde_bindir"; then
470
458
    kde_bindir='\${exec_prefix}/bin'
471
459
  fi
472
460
  if test -z "$kde_servicesdir"; then
473
 
    kde_servicesdir='\${datadir}/services'
 
461
    kde_servicesdir='\${prefix}/share/services'
474
462
  fi
475
463
  if test -z "$kde_servicetypesdir"; then
476
 
    kde_servicetypesdir='\${datadir}/servicetypes'
 
464
    kde_servicetypesdir='\${prefix}/share/servicetypes'
477
465
  fi
478
466
  if test -z "$kde_moduledir"; then
479
467
    if test "$kde_qtver" = "2"; then
488
476
  if test -z "$kde_widgetdir"; then
489
477
    kde_widgetdir='\${libdir}/kde3/plugins/designer'
490
478
  fi
491
 
  if test -z "$xdg_appsdir"; then
492
 
    xdg_appsdir='\${datadir}/applications/kde'
493
 
  fi
494
 
  if test -z "$xdg_menudir"; then
495
 
    xdg_menudir='\${sysconfdir}/xdg/menus'
496
 
  fi
497
 
  if test -z "$xdg_directorydir"; then
498
 
    xdg_directorydir='\${datadir}/desktop-directories'
499
 
  fi
500
479
 
501
480
  KDE_SET_PATHS(defaults)
502
481
 
512
491
fi
513
492
])
514
493
 
515
 
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
 
494
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
516
495
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
517
496
   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
518
497
   test -z "$kde_datadir" || test -z "$kde_locale"  ||
519
498
   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
520
 
   test -z "$kde_kcfgdir" ||
521
499
   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
522
500
   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
523
501
   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
524
502
   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
525
 
   test -z "$kde_styledir" || test -z "kde_widgetdir" ||
526
 
   test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
 
503
   test -z "$kde_styledir" || test -z "kde_widgetdir" 
527
504
   test "x$kde_have_all_paths" != "xyes"; then
528
505
     kde_have_all_paths=no
529
506
  fi
530
507
])
531
508
 
532
 
AC_DEFUN([KDE_MISSING_PROG_ERROR],
 
509
AC_DEFUN(KDE_MISSING_PROG_ERROR,
533
510
[
534
511
    AC_MSG_ERROR([The important program $1 was not found!
535
512
Please check whether you installed KDE correctly.
536
513
])
537
514
])
538
515
 
539
 
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
 
516
AC_DEFUN(KDE_MISSING_ARTS_ERROR,
540
517
[
541
518
    AC_MSG_ERROR([The important program $1 was not found!
542
 
Please check whether you installed aRts correctly or use
543
 
--without-arts to compile without aRts support (this will remove functionality).
544
 
])
545
 
])
546
 
 
547
 
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
548
 
[
549
 
    kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
550
 
    test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
551
 
    if test -n "$KDEDIRS"; then
552
 
       kde_save_IFS=$IFS
553
 
       IFS=:
554
 
       for dir in $KDEDIRS; do
555
 
            kde_default_bindirs="$dir/bin $kde_default_bindirs "
556
 
       done
557
 
       IFS=$kde_save_IFS
558
 
    fi
559
 
])
560
 
 
561
 
AC_DEFUN([KDE_SUBST_PROGRAMS],
562
 
[
563
 
    AC_ARG_WITH(arts,
564
 
        AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
565
 
        [build_arts=$withval],
566
 
        [build_arts=yes]
567
 
    )
568
 
    AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
569
 
    if test "$build_arts" = "no"; then
570
 
        AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
571
 
    fi
572
 
 
573
 
        KDE_SET_DEFAULT_BINDIRS
574
 
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
 
519
Please check whether you installed aRts correctly.
 
520
])
 
521
])
 
522
 
 
523
AC_DEFUN(KDE_SUBST_PROGRAMS,
 
524
[
 
525
 
 
526
        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
 
527
        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
 
528
        if test -n "$KDEDIRS"; then
 
529
           kde_save_IFS=$IFS
 
530
           IFS=:
 
531
           for dir in $KDEDIRS; do
 
532
                kde_default_bindirs="$dir/bin $kde_default_bindirs "
 
533
           done
 
534
           IFS=$kde_save_IFS
 
535
        fi
 
536
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
575
537
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
576
538
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
577
 
        if test "$build_arts" '!=' "no"; then
578
 
          KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
579
 
          KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
580
 
        fi
 
539
        KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
 
540
        KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
 
541
        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
581
542
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
582
 
 
583
 
        kde32ornewer=1
584
 
        kde33ornewer=1
585
 
        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
586
 
            kde32ornewer=
587
 
            kde33ornewer=
588
 
        else
589
 
            if test "$kde_qtver" = "3"; then
590
 
              if test "$kde_qtsubver" -le 1; then
591
 
                kde32ornewer=
592
 
              fi
593
 
              if test "$kde_qtsubver" -le 2 -o `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
594
 
                kde33ornewer=
595
 
              fi
596
 
            fi
597
 
        fi
598
 
 
599
 
        if test -n "$kde32ornewer"; then
600
 
            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
601
 
            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
602
 
        fi
603
 
        if test -n "$kde33ornewer"; then
604
 
            KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
605
 
            AC_SUBST(MAKEKDEWIDGETS)
606
 
        fi
607
 
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
608
 
 
609
 
        if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
 
543
      
 
544
        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
610
545
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
611
546
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
612
547
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
618
553
        fi
619
554
 
620
555
        DCOP_DEPENDENCIES='$(DCOPIDL)'
621
 
        if test -n "$kde32ornewer"; then
622
 
            KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
623
 
            DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
624
 
            AC_SUBST(KCONFIG_COMPILER)
625
 
            AC_SUBST(KCFG_DEPENDENCIES)
626
 
            AC_SUBST(DCOPIDLNG)
627
 
        fi
628
556
        AC_SUBST(DCOPIDL)
629
557
        AC_SUBST(DCOPIDL2CPP)
630
558
        AC_SUBST(DCOP_DEPENDENCIES)
631
559
        AC_SUBST(MCOPIDL)
632
560
        AC_SUBST(ARTSCCONFIG)
 
561
        AC_SUBST(KDECONFIG)
633
562
        AC_SUBST(MEINPROC)
634
563
        AC_SUBST(KDE_XSL_STYLESHEET)
635
 
        AC_SUBST(XMLLINT)
 
564
 
 
565
        if test -x "$KDECONFIG"; then # it can be "compiled"
 
566
          kde_libs_prefix=`$KDECONFIG --prefix`
 
567
          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
 
568
               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
 
569
                          This means it has been moved since you installed it.
 
570
                          This won't work. Please recompile kdelibs for the new prefix.
 
571
                          ])
 
572
           fi
 
573
           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
 
574
        else
 
575
           kde_libs_prefix='$(prefix)'
 
576
           kde_libs_htmldir='$(kde_htmldir)'
 
577
        fi
 
578
        AC_SUBST(kde_libs_prefix)
 
579
        AC_SUBST(kde_libs_htmldir)
636
580
])dnl
637
581
 
638
 
AC_DEFUN([AC_CREATE_KFSSTND],
 
582
AC_DEFUN(AC_CREATE_KFSSTND,
639
583
[
640
584
AC_REQUIRE([AC_CHECK_RPATH])
641
585
 
653
597
  # wrong values were cached, may be, we can set better ones
654
598
  kde_result=
655
599
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
656
 
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
 
600
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir=
657
601
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
658
602
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
659
603
  kde_have_all_paths=
660
604
  kde_styledir=
661
605
  kde_widgetdir=
662
 
  xdg_appsdir = xdg_menudir= xdg_directorydir= 
663
606
  KDE_SET_DEFAULT_PATHS($1)
664
607
  eval "$kde_cv_all_paths"
665
608
  KDE_CHECK_PATHS_FOR_COMPLETENESS
683
626
 
684
627
])
685
628
 
686
 
AC_DEFUN([AC_SUBST_KFSSTND],
 
629
AC_DEFUN(AC_SUBST_KFSSTND,
687
630
[
688
631
AC_SUBST(kde_htmldir)
689
632
AC_SUBST(kde_appsdir)
692
635
AC_SUBST(kde_datadir)
693
636
AC_SUBST(kde_locale)
694
637
AC_SUBST(kde_confdir)
695
 
AC_SUBST(kde_kcfgdir)
696
638
AC_SUBST(kde_mimedir)
697
639
AC_SUBST(kde_wallpaperdir)
698
640
AC_SUBST(kde_bindir)
699
 
dnl X Desktop Group standards
700
 
AC_SUBST(xdg_appsdir)
701
 
AC_SUBST(xdg_menudir)
702
 
AC_SUBST(xdg_directorydir)
703
641
dnl for KDE 2
704
642
AC_SUBST(kde_templatesdir)
705
643
AC_SUBST(kde_servicesdir)
706
644
AC_SUBST(kde_servicetypesdir)
707
645
AC_SUBST(kde_moduledir)
708
 
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
709
646
AC_SUBST(kde_styledir)
710
647
AC_SUBST(kde_widgetdir)
711
648
if test "$kde_qtver" = 1; then
720
657
dnl AC_SUBST(kde_toolbardir)
721
658
])
722
659
 
723
 
AC_DEFUN([KDE_MISC_TESTS],
 
660
AC_DEFUN(KDE_MISC_TESTS,
724
661
[
 
662
   AC_LANG_C
725
663
   dnl Checks for libraries.
726
664
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
727
665
   AC_SUBST(LIBUTIL)
740
678
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
741
679
   fi
742
680
   AC_CHECK_SOCKLEN_T
 
681
   AC_LANG_C
743
682
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
744
683
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
745
684
      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
764
703
   AC_CHECK_FUNC(shmat, ,
765
704
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
766
705
   
 
706
   # darwin needs this to initialize the environment
 
707
   AC_CHECK_HEADERS(crt_externs.h)
 
708
   AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
 
709
 
767
710
   # more headers that need to be explicitly included on darwin
768
711
   AC_CHECK_HEADERS(sys/types.h stdint.h)
769
712
 
770
 
   # sys/bitypes.h is needed for uint32_t and friends on Tru64
771
 
   AC_CHECK_HEADERS(sys/bitypes.h)
772
 
 
773
713
   # darwin requires a poll emulation library
774
714
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
775
715
 
776
 
   # for some image handling on Mac OS X
777
 
   AC_CHECK_HEADERS(Carbon/Carbon.h)
778
 
 
779
716
   # CoreAudio framework
780
717
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
781
718
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
782
 
     FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
 
719
     FRAMEWORK_COREAUDIO="-framework CoreAudio"
783
720
   ])
784
721
 
785
722
   AC_CHECK_RES_INIT
802
739
 
803
740
   KDE_CHECK_TYPES
804
741
   KDE_CHECK_LIBDL
805
 
   KDE_CHECK_STRLCPY
806
 
 
807
 
# darwin needs this to initialize the environment
808
 
AC_CHECK_HEADERS(crt_externs.h)
809
 
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
810
 
 
811
 
AH_VERBATIM(_DARWIN_ENVIRON,
812
 
[
813
 
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
814
 
# include <sys/time.h>
815
 
# include <crt_externs.h>
816
 
# define environ (*_NSGetEnviron())
817
 
#endif
818
 
])
819
742
 
820
743
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
821
744
[
861
784
dnl macro AC_PATH_X
862
785
dnl ------------------------------------------------------------------------
863
786
dnl
864
 
AC_DEFUN([K_PATH_X],
 
787
AC_DEFUN(K_PATH_X,
865
788
[
866
789
AC_REQUIRE([KDE_MISC_TESTS])dnl
867
790
AC_REQUIRE([KDE_CHECK_LIB64])
868
791
 
869
792
AC_ARG_ENABLE(
870
793
  embedded,
871
 
  AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
 
794
  [  --enable-embedded       link to Qt-embedded, don't use X],
872
795
  kde_use_qt_emb=$enableval,
873
796
  kde_use_qt_emb=no
874
797
)
875
798
 
876
799
AC_ARG_ENABLE(
877
800
  qtopia,
878
 
  AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
 
801
  [  --enable-qtopia         link to Qt-embedded, link to the Qtopia Environment],
879
802
  kde_use_qt_emb_palm=$enableval,
880
803
  kde_use_qt_emb_palm=no
881
804
)
882
805
 
883
 
AC_ARG_ENABLE(
884
 
  mac,
885
 
  AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
886
 
  kde_use_qt_mac=$enableval,
887
 
  kde_use_qt_mac=no
888
 
)
889
 
 
890
 
# used to disable x11-specific stuff on special platforms
891
 
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
892
 
 
893
 
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
 
806
if test "$kde_use_qt_emb" = "no"; then
894
807
 
895
808
AC_MSG_CHECKING(for X)
896
 
 
 
809
AC_LANG_SAVE
 
810
AC_LANG_C
897
811
AC_CACHE_VAL(kde_cv_have_x,
898
812
[# One or both of the vars are not set, and there is no cached value.
899
813
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
985
899
  X_LDFLAGS="-L$x_libraries"
986
900
fi
987
901
all_includes="$X_INCLUDES"
988
 
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
 
902
all_libraries="$X_LDFLAGS"
 
903
 
 
904
AC_SUBST(X_INCLUDES)
 
905
AC_SUBST(X_LDFLAGS)
 
906
AC_SUBST(x_libraries)
 
907
AC_SUBST(x_includes)
989
908
 
990
909
# Check for libraries that X11R6 Xt/Xaw programs need.
991
910
ac_save_LDFLAGS="$LDFLAGS"
998
917
#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
999
918
AC_CHECK_LIB(ICE, IceConnectionNumber,
1000
919
  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
 
920
AC_SUBST(LIBSM)
1001
921
LDFLAGS="$ac_save_LDFLAGS"
1002
922
 
 
923
AC_SUBST(X_PRE_LIBS)
 
924
 
1003
925
LIB_X11='-lX11 $(LIBSOCKET)'
 
926
AC_SUBST(LIB_X11)
1004
927
 
1005
928
AC_MSG_CHECKING(for libXext)
1006
929
AC_CACHE_VAL(kde_cv_have_libXext,
1022
945
],
1023
946
kde_cv_have_libXext=yes,
1024
947
kde_cv_have_libXext=no
1025
 
)
 
948
   )
1026
949
 
1027
950
LDFLAGS=$kde_ldflags_safe
1028
951
LIBS=$kde_libs_safe
1029
 
])
 
952
 ])
1030
953
 
1031
954
AC_MSG_RESULT($kde_cv_have_libXext)
1032
955
 
1036
959
them either.])
1037
960
fi
1038
961
 
 
962
AC_MSG_CHECKING(for Xinerama)
 
963
 
 
964
 AC_ARG_WITH(xinerama,
 
965
  [  --with-xinerama         enable support for Xinerama ],
 
966
  [
 
967
    no_xinerama=no
 
968
  ], [
 
969
    no_xinerama=yes
 
970
  ]
 
971
)
 
972
 
 
973
kde_save_LDFLAGS="$LDFLAGS"
 
974
kde_save_CFLAGS="$CFLAGS"
 
975
kde_save_LIBS="$LIBS"
 
976
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
 
977
CFLAGS="$CFLAGS -I$x_includes"
 
978
LIBS="-lXinerama -lXext"
 
979
 
 
980
if test "x$no_xinerama" = "xno"; then
 
981
 
 
982
  AC_CACHE_VAL(ac_cv_have_xinerama,
 
983
  [
 
984
          AC_TRY_LINK([#include <X11/Xlib.h>
 
985
                        #include <X11/extensions/Xinerama.h>],
 
986
                  [XineramaIsActive(NULL);],
 
987
                  [ac_cv_have_xinerama="yes"],
 
988
                  [ac_cv_have_xinerama="no"])
 
989
  ])
 
990
else
 
991
  ac_cv_have_xinerama=no;
 
992
fi
 
993
 
 
994
AC_MSG_RESULT($ac_cv_have_xinerama)
 
995
 
 
996
LIBXINERAMA=""
 
997
 
 
998
if test "$ac_cv_have_xinerama" = "yes"; then
 
999
  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
 
1000
  LIBXINERAMA="-lXinerama"
 
1001
fi
 
1002
 
 
1003
AC_SUBST(LIBXINERAMA)
 
1004
 
 
1005
LDFLAGS="$kde_save_LDFLAGS"
 
1006
CFLAGS="$kde_save_CFLAGS"
 
1007
LIBS="$kde_save_LIBS"
 
1008
 
1039
1009
LIB_XEXT="-lXext"
1040
1010
QTE_NORTTI=""
1041
1011
 
1042
 
elif test "$kde_use_qt_emb" = "yes"; then
 
1012
else
1043
1013
  dnl We're using QT Embedded
1044
1014
  CPPFLAGS=-DQWS
1045
1015
  CXXFLAGS="$CXXFLAGS -fno-rtti"
1047
1017
  X_PRE_LIBS=""
1048
1018
  LIB_X11=""
1049
1019
  LIB_XEXT=""
1050
 
  LIB_XRENDER=""
1051
 
  LIBSM=""
1052
 
  X_INCLUDES=""
1053
 
  X_LDFLAGS=""
1054
 
  x_includes=""
1055
 
  x_libraries=""
1056
 
elif test "$kde_use_qt_mac" = "yes"; then
1057
 
  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1058
 
  dnl be included to get the information) --Sam
1059
 
  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1060
 
  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1061
 
  X_PRE_LIBS=""
1062
 
  LIB_X11=""
1063
 
  LIB_XEXT=""
1064
 
  LIB_XRENDER=""
1065
 
  LIBSM=""
1066
 
  X_INCLUDES=""
1067
 
  X_LDFLAGS=""
1068
 
  x_includes=""
1069
 
  x_libraries=""
 
1020
  LIBSM=""
 
1021
  X_INCLUDES=""
 
1022
  X_LDFLAGS=""
 
1023
  x_includes=""
 
1024
  x_libraries=""
 
1025
  AC_SUBST(X_PRE_LIBS)
 
1026
  AC_SUBST(LIB_X11)
 
1027
  AC_SUBST(LIBSM)
 
1028
  AC_SUBST(X_INCLUDES)
 
1029
  AC_SUBST(X_LDFLAGS)
 
1030
  AC_SUBST(x_includes)
 
1031
  AC_SUBST(x_libraries)
1070
1032
fi
1071
 
AC_SUBST(X_PRE_LIBS)
1072
 
AC_SUBST(LIB_X11)
1073
 
AC_SUBST(LIB_XRENDER)
1074
 
AC_SUBST(LIBSM)
1075
 
AC_SUBST(X_INCLUDES)
1076
 
AC_SUBST(X_LDFLAGS)
1077
 
AC_SUBST(x_includes)
1078
 
AC_SUBST(x_libraries)
1079
1033
AC_SUBST(QTE_NORTTI)
1080
1034
AC_SUBST(LIB_XEXT)
1081
1035
 
 
1036
 
 
1037
AC_LANG_RESTORE
 
1038
 
1082
1039
])
1083
1040
 
1084
 
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
 
1041
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
1085
1042
[
1086
1043
AC_REQUIRE([KDE_USE_QT])
1087
1044
cat > conftest.$ac_ext <<EOF
1144
1101
EOF
1145
1102
])
1146
1103
 
1147
 
AC_DEFUN([KDE_USE_QT],
 
1104
AC_DEFUN(KDE_USE_QT,
1148
1105
[
1149
1106
if test -z "$1"; then
1150
 
  # Current default Qt version: 3.3
 
1107
  # Current default Qt version: 3.1
1151
1108
  kde_qtver=3
1152
 
  kde_qtsubver=3
 
1109
  kde_qtsubver=1
1153
1110
else
1154
1111
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1155
1112
  # following is the check if subversion isnt found in passed argument
1172
1129
  fi
1173
1130
  if test "$kde_qtver" = "3"; then
1174
1131
    if test $kde_qtsubver -gt 0; then
1175
 
         if test $kde_qtsubver -gt 1; then
1176
 
            if test $kde_qtsubver -gt 2; then
1177
 
                kde_qt_minversion=">= Qt 3.3 and < 4.0"
1178
 
            else
1179
 
                kde_qt_minversion=">= Qt 3.2 and < 4.0"
1180
 
            fi
1181
 
         else
1182
 
            kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
1183
 
         fi
 
1132
      kde_qt_minversion=">= Qt 3.1.0"
1184
1133
    else
1185
 
      kde_qt_minversion=">= Qt 3.0 and < 4.0"
 
1134
      kde_qt_minversion=">= Qt 3.0"
1186
1135
    fi
1187
1136
  fi
1188
1137
  if test "$kde_qtver" = "1"; then
1189
1138
    kde_qt_minversion=">= 1.42 and < 2.0"
1190
1139
  fi
1191
1140
else
1192
 
   kde_qt_minversion="$2"
 
1141
   kde_qt_minversion=$2
1193
1142
fi
1194
1143
 
1195
1144
if test -z "$3"; then
1196
1145
   if test $kde_qtver = 3; then
1197
1146
     if test $kde_qtsubver -gt 0; then
1198
 
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1199
 
       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1200
 
       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
 
1147
       kde_qt_verstring="QT_VERSION >= 0x030100"
1201
1148
     else
1202
 
       kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
 
1149
       kde_qt_verstring="QT_VERSION >= 300"
1203
1150
     fi
1204
1151
   fi
1205
1152
   if test $kde_qtver = 2; then
1213
1160
    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1214
1161
   fi
1215
1162
else
1216
 
   kde_qt_verstring="$3"
 
1163
   kde_qt_verstring=$3
1217
1164
fi
1218
1165
 
1219
 
if test $kde_qtver = 4; then
1220
 
  kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
1221
 
fi
1222
1166
if test $kde_qtver = 3; then
1223
1167
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1224
1168
fi
1230
1174
fi
1231
1175
])
1232
1176
 
1233
 
AC_DEFUN([KDE_CHECK_QT_DIRECT],
 
1177
AC_DEFUN(KDE_CHECK_QT_DIRECT,
1234
1178
[
1235
1179
AC_REQUIRE([KDE_USE_QT])
1236
1180
AC_MSG_CHECKING([if Qt compiles without flags])
1246
1190
 
1247
1191
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1248
1192
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1249
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
1193
if test "x$kde_use_qt_emb" != "xyes"; then
1250
1194
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1251
1195
else
1252
1196
LIBS="$LIBQT $LIBSOCKET"
1293
1237
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1294
1238
dnl ------------------------------------------------------------------------
1295
1239
dnl
1296
 
AC_DEFUN([AC_PATH_QT_1_3],
 
1240
AC_DEFUN(AC_PATH_QT_1_3,
1297
1241
[
1298
1242
AC_REQUIRE([K_PATH_X])
1299
1243
AC_REQUIRE([KDE_USE_QT])
1305
1249
 
1306
1250
AC_ARG_ENABLE(
1307
1251
  mt,
1308
 
  AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
 
1252
  [  --disable-mt            link to non-threaded Qt (deprecated)],
1309
1253
  kde_use_qt_mt=$enableval,
1310
1254
  [
1311
1255
    if test $kde_qtver = 3; then
1386
1330
dnl ------------------------------------------------------------------------
1387
1331
 
1388
1332
if test "x$kde_use_qt_mt" = "xyes"; then
1389
 
  LIBQT="-l$qtlib-mt"
1390
 
  kde_int_qt="-l$qtlib-mt"
 
1333
  if test -z "$LIBQT"; then
 
1334
    LIBQT="-l$qtlib-mt"
 
1335
    kde_int_qt="-l$qtlib-mt"
 
1336
  else
 
1337
    LIBQT="$qtlib-mt"
 
1338
    kde_int_qt="$qtlib-mt"
 
1339
  fi
1391
1340
  LIBQT_GLOB="lib$qtlib-mt.*"
1392
1341
  USING_QT_MT="using -mt"
1393
1342
else
1408
1357
 
1409
1358
AC_MSG_CHECKING([for Qt])
1410
1359
 
1411
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
1360
if test "x$kde_use_qt_emb" != "xyes"; then
1412
1361
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1413
1362
fi
1414
1363
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1415
1364
qt_libraries=""
1416
1365
qt_includes=""
1417
1366
AC_ARG_WITH(qt-dir,
1418
 
    AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
 
1367
    [  --with-qt-dir=DIR       where the root of Qt is installed ],
1419
1368
    [  ac_qt_includes="$withval"/include
1420
1369
       ac_qt_libraries="$withval"/lib${kdelibsuff}
1421
1370
       ac_qt_bindir="$withval"/bin
1422
1371
    ])
1423
1372
 
1424
1373
AC_ARG_WITH(qt-includes,
1425
 
    AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
 
1374
    [  --with-qt-includes=DIR  where the Qt includes are. ],
1426
1375
    [
1427
1376
       ac_qt_includes="$withval"
1428
1377
    ])
1430
1379
kde_qt_libs_given=no
1431
1380
 
1432
1381
AC_ARG_WITH(qt-libraries,
1433
 
    AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
 
1382
    [  --with-qt-libraries=DIR where the Qt library is installed.],
1434
1383
    [  ac_qt_libraries="$withval"
1435
1384
       kde_qt_libs_given=yes
1436
1385
    ])
1442
1391
for dir in $kde_qt_dirs; do
1443
1392
   qt_incdirs="$qt_incdirs $dir/include $dir"
1444
1393
done
1445
 
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
 
1394
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"
1446
1395
if test ! "$ac_qt_includes" = "NO"; then
1447
1396
   qt_incdirs="$ac_qt_includes $qt_incdirs"
1448
1397
fi
1472
1421
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1473
1422
  done
1474
1423
fi
1475
 
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1476
 
  if test -e "$a"; then
1477
 
    LIBQT="$LIBQT ${kde_int_qt}_incremental"
1478
 
    break
1479
 
  fi
1480
 
done
1481
1424
 
1482
1425
ac_qt_libraries="$qt_libdir"
1483
1426
 
1547
1490
  qt_includes="$ac_qt_includes"
1548
1491
fi
1549
1492
 
1550
 
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1551
 
     KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
 
1493
if test ! "$kde_qt_libs_given" = "yes"; then
 
1494
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1552
1495
fi
1553
1496
 
1554
1497
AC_SUBST(qt_libraries)
1565
1508
 QT_LDFLAGS=""
1566
1509
else
1567
1510
 QT_LDFLAGS="-L$qt_libraries"
1568
 
 all_libraries="$QT_LDFLAGS $all_libraries"
 
1511
 all_libraries="$all_libraries $QT_LDFLAGS"
1569
1512
fi
1570
1513
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1571
1514
 
1575
1518
 
1576
1519
KDE_CHECK_QT_JPEG
1577
1520
 
1578
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1579
 
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
 
1521
if test "x$kde_use_qt_emb" != "xyes"; then
 
1522
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1580
1523
else
1581
 
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
 
1524
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
1582
1525
fi
1583
1526
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1584
 
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1585
 
  if test -e "$a"; then
1586
 
     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1587
 
     break
1588
 
  fi
1589
 
done
1590
1527
 
1591
1528
AC_SUBST(LIB_QT)
1592
1529
AC_SUBST(LIB_QPE)
1594
1531
AC_SUBST(kde_qtver)
1595
1532
])
1596
1533
 
1597
 
AC_DEFUN([AC_PATH_QT],
 
1534
AC_DEFUN(AC_PATH_QT,
1598
1535
[
1599
1536
AC_PATH_QT_1_3
1600
1537
])
1601
1538
 
1602
 
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
 
1539
AC_DEFUN(KDE_CHECK_UIC_PLUGINS,
1603
1540
[
1604
1541
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1605
1542
 
1630
1567
fi
1631
1568
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1632
1569
if AC_TRY_EVAL(kde_line); then
1633
 
        # if you're trying to debug this check and think it's incorrect,
1634
 
        # better check your installation. The check _is_ correct - your
1635
 
        # installation is not.
1636
1570
        if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1637
1571
                kde_cv_uic_plugins=yes
1638
1572
        fi
1640
1574
rm -f actest.ui actest.cpp
1641
1575
])
1642
1576
 
1643
 
AC_MSG_RESULT([$kde_cv_uic_plugins])
1644
 
if test "$kde_cv_uic_plugins" != yes; then
1645
 
        AC_MSG_ERROR([
1646
 
you need to install kdelibs first.
1647
 
 
1648
 
If you did install kdelibs, then the Qt version that is picked up by
1649
 
this configure is not the same version you used to compile kdelibs. 
1650
 
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the 
1651
 
_same Qt version_, compiled with the _same compiler_ and the same Qt
1652
 
configuration settings.
1653
 
])
1654
 
fi
1655
 
fi
1656
 
])
1657
 
 
1658
 
AC_DEFUN([KDE_CHECK_FINAL],
 
1577
if test "$kde_cv_uic_plugins" = yes; then
 
1578
        AC_MSG_RESULT([yes])
 
1579
else
 
1580
        AC_MSG_ERROR([not found - you need to install kdelibs first.])
 
1581
fi
 
1582
fi
 
1583
])
 
1584
 
 
1585
AC_DEFUN(KDE_CHECK_FINAL,
1659
1586
[
1660
 
  AC_ARG_ENABLE(final,
1661
 
        AC_HELP_STRING([--enable-final],
1662
 
                       [build size optimized apps (experimental - needs lots of memory)]),
 
1587
  AC_ARG_ENABLE(final, [  --enable-final          build size optimized apps (experimental - needs lots of memory)],
1663
1588
        kde_use_final=$enableval, kde_use_final=no)
1664
1589
 
 
1590
  KDE_COMPILER_REPO
1665
1591
  if test "x$kde_use_final" = "xyes"; then
1666
1592
      KDE_USE_FINAL_TRUE=""
1667
1593
      KDE_USE_FINAL_FALSE="#"
1671
1597
  fi
1672
1598
  AC_SUBST(KDE_USE_FINAL_TRUE)
1673
1599
  AC_SUBST(KDE_USE_FINAL_FALSE)
1674
 
])
1675
 
 
1676
 
AC_DEFUN([KDE_CHECK_CLOSURE],
1677
 
[
1678
 
  AC_ARG_ENABLE(closure,
1679
 
                AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1680
 
        kde_use_closure=$enableval, kde_use_closure=no)
1681
 
 
1682
 
  KDE_NO_UNDEFINED=""
 
1600
 
 
1601
  AC_ARG_ENABLE(closure, [  --disable-closure       don't delay template instantiation],
 
1602
        kde_use_closure=$enableval, kde_use_closure=yes)
 
1603
 
1683
1604
  if test "x$kde_use_closure" = "xyes"; then
1684
1605
       KDE_USE_CLOSURE_TRUE=""
1685
1606
       KDE_USE_CLOSURE_FALSE="#"
1687
1608
  else
1688
1609
       KDE_USE_CLOSURE_TRUE="#"
1689
1610
       KDE_USE_CLOSURE_FALSE=""
1690
 
       KDE_NO_UNDEFINED=""
1691
 
       case $host in 
1692
 
         *-*-linux-gnu)
1693
 
           KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1694
 
                [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1695
 
                [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1696
 
                [KDE_NO_UNDEFINED=""])],
1697
 
            [KDE_NO_UNDEFINED=""])
1698
 
           ;;
1699
 
       esac
1700
1611
  fi
1701
1612
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
1702
1613
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
1703
 
  AC_SUBST(KDE_NO_UNDEFINED)
1704
 
])
1705
 
 
1706
 
dnl Check if the linker supports --enable-new-dtags and --as-needed
1707
 
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
1708
 
[
1709
 
  AC_ARG_ENABLE(new_ldflags,
1710
 
                AC_HELP_STRING([--enable-new-ldflags],
1711
 
                [enable the new linker flags]),
1712
 
        kde_use_new_ldflags=$enableval, 
1713
 
        kde_use_new_ldflags=no)
1714
 
 
1715
 
  LDFLAGS_AS_NEEDED=""
1716
 
  LDFLAGS_NEW_DTAGS=""
1717
 
  if test "x$kde_use_new_ldflags" = "xyes"; then
1718
 
       LDFLAGS_NEW_DTAGS=""
1719
 
       KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
1720
 
                [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
1721
 
 
1722
 
       KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
1723
 
                [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
1724
 
  fi
1725
 
  AC_SUBST(LDFLAGS_AS_NEEDED)
1726
 
  AC_SUBST(LDFLAGS_NEW_DTAGS)
1727
 
])
1728
 
 
1729
 
AC_DEFUN([KDE_CHECK_NMCHECK],
1730
 
[
1731
 
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1732
 
        kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1733
 
 
1734
 
  if test "$kde_use_nmcheck" = "yes"; then
1735
 
      KDE_USE_NMCHECK_TRUE=""
1736
 
      KDE_USE_NMCHECK_FALSE="#"
1737
 
   else
1738
 
      KDE_USE_NMCHECK_TRUE="#"
1739
 
      KDE_USE_NMCHECK_FALSE=""
1740
 
  fi
1741
 
  AC_SUBST(KDE_USE_NMCHECK_TRUE)
1742
 
  AC_SUBST(KDE_USE_NMCHECK_FALSE)
1743
 
])
1744
 
 
1745
 
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1746
 
savex=$exec_prefix
1747
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1748
 
tmp=$$2
1749
 
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1750
 
exec_prefix=$savex
1751
1614
])
1752
1615
 
1753
1616
dnl ------------------------------------------------------------------------
1756
1619
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1757
1620
dnl ------------------------------------------------------------------------
1758
1621
dnl
1759
 
AC_DEFUN([AC_BASE_PATH_KDE],
 
1622
AC_DEFUN(AC_BASE_PATH_KDE,
1760
1623
[
1761
 
AC_REQUIRE([KDE_CHECK_STL])
 
1624
AC_PREREQ([2.13])
1762
1625
AC_REQUIRE([AC_PATH_QT])dnl
1763
1626
AC_REQUIRE([KDE_CHECK_LIB64])
1764
1627
 
1766
1629
AC_MSG_CHECKING([for KDE])
1767
1630
 
1768
1631
if test "${prefix}" != NONE; then
1769
 
  kde_includes=${includedir}
1770
 
  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1771
 
 
1772
 
  kde_libraries=${libdir}
1773
 
  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1774
 
 
 
1632
  kde_includes=${prefix}/include
 
1633
  ac_kde_includes=$prefix/include
 
1634
 
 
1635
  if test "${exec_prefix}" != NONE; then
 
1636
     kde_libraries=${libdir}
 
1637
     ac_kde_libraries=$libdir
 
1638
     if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
 
1639
        ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
 
1640
     fi
 
1641
  else
 
1642
     kde_libraries=${prefix}/lib${kdelibsuff}
 
1643
     ac_kde_libraries=$prefix/lib${kdelibsuff}
 
1644
  fi
1775
1645
else
1776
1646
  ac_kde_includes=
1777
1647
  ac_kde_libraries=
1792
1662
 
1793
1663
if test -z "$1"; then
1794
1664
 
1795
 
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
 
1665
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1796
1666
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1797
1667
kde_incdirs="$ac_kde_includes $kde_incdirs"
1798
1668
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1804
1674
So, check this please and use another prefix!])
1805
1675
fi
1806
1676
 
1807
 
kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
 
1677
kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1808
1678
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1809
1679
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1810
1680
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1838
1708
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1839
1709
fi
1840
1710
 
1841
 
else dnl test -z $1, e.g. from kdelibs
 
1711
else dnl test -z $1
1842
1712
 
1843
1713
  ac_cv_have_kde="have_kde=no"
1844
1714
 
1862
1732
 fi
1863
1733
 
1864
1734
 kde_libraries="${libdir}"
1865
 
 kde_includes="${includedir}"
 
1735
 kde_includes=${ac_kde_prefix}/include
1866
1736
 
1867
1737
else
1868
1738
  ac_cv_have_kde="have_kde=yes \
1881
1751
 KDE_INCLUDES="-I$kde_includes"
1882
1752
 all_includes="$KDE_INCLUDES $all_includes"
1883
1753
fi
1884
 
 
1885
 
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1886
1754
 
1887
1755
KDE_LDFLAGS="-L$kde_libraries"
1888
1756
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
1889
 
 all_libraries="$KDE_LDFLAGS $all_libraries"
 
1757
 all_libraries="$all_libraries $KDE_LDFLAGS"
1890
1758
fi
1891
1759
 
1892
1760
AC_SUBST(KDE_LDFLAGS)
1910
1778
 
1911
1779
])
1912
1780
 
1913
 
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
 
1781
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
1914
1782
[
1915
1783
AC_MSG_CHECKING(for extra includes)
1916
 
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
 
1784
AC_ARG_WITH(extra-includes, [  --with-extra-includes=DIR
 
1785
                          adds non standard include paths],
1917
1786
  kde_use_extra_includes="$withval",
1918
1787
  kde_use_extra_includes=NONE
1919
1788
)
1938
1807
 
1939
1808
kde_extra_libs=
1940
1809
AC_MSG_CHECKING(for extra libs)
1941
 
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
 
1810
AC_ARG_WITH(extra-libs, [  --with-extra-libs=DIR   adds non standard library paths],
1942
1811
  kde_use_extra_libs=$withval,
1943
1812
  kde_use_extra_libs=NONE
1944
1813
)
1964
1833
 
1965
1834
])
1966
1835
 
1967
 
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
 
1836
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
1968
1837
[
1969
1838
    AC_MSG_CHECKING([for KDE headers installed])
1970
1839
    AC_LANG_SAVE
1997
1866
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1998
1867
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
1999
1868
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
2000
 
    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
2001
 
    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
2002
 
    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
2003
 
    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
2004
1869
    return 0;
2005
1870
    }
2006
1871
EOF
2007
1872
 
2008
 
 ac_save_CPPFLAGS=$CPPFLAGS
2009
 
 CPPFLAGS="$all_includes $CPPFLAGS"
 
1873
 ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
2010
1874
 if AC_TRY_EVAL(ac_compile); then
2011
1875
   AC_MSG_RESULT(yes)
2012
1876
 else
2014
1878
Check, if you installed the KDE header files correctly.
2015
1879
For more details about this problem, look at the end of config.log.])
2016
1880
  fi
2017
 
  CPPFLAGS=$ac_save_CPPFLAGS
2018
1881
 
2019
1882
  AC_LANG_RESTORE
2020
1883
])
2021
1884
 
2022
 
AC_DEFUN([KDE_CHECK_KDEQTADDON],
 
1885
AC_DEFUN(KDE_CHECK_KDEQTADDON,
2023
1886
[
2024
1887
AC_MSG_CHECKING(for kde-qt-addon)
2025
1888
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2055
1918
fi
2056
1919
])
2057
1920
 
2058
 
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
 
1921
AC_DEFUN(KDE_CHECK_KIMGIO,
 
1922
[
 
1923
   AC_REQUIRE([AC_BASE_PATH_KDE])
 
1924
   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
1925
   AC_REQUIRE([AC_FIND_TIFF])
 
1926
   AC_REQUIRE([AC_FIND_JPEG])
 
1927
   AC_REQUIRE([AC_FIND_PNG])
 
1928
   AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
 
1929
 
 
1930
   if test "$1" = "existance"; then
 
1931
     AC_LANG_SAVE
 
1932
     AC_LANG_CPLUSPLUS
 
1933
     kde_save_LIBS="$LIBS"
 
1934
     LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
 
1935
     AC_CHECK_LIB(kimgio, kimgioRegister, [
 
1936
      LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
 
1937
     LIBS="$kde_save_LIBS"
 
1938
     AC_LANG_RESTORE
 
1939
   else
 
1940
     LIBKIMGIO_EXISTS=yes
 
1941
   fi
 
1942
 
 
1943
   if test "$LIBKIMGIO_EXISTS" = "yes"; then
 
1944
     LIB_KIMGIO='-lkimgio'
 
1945
   else
 
1946
     LIB_KIMGIO=''
 
1947
   fi
 
1948
   AC_SUBST(LIB_KIMGIO)
 
1949
])
 
1950
 
 
1951
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
2059
1952
[
2060
1953
   AC_REQUIRE([KDE_MISC_TESTS])
2061
1954
   AC_REQUIRE([KDE_CHECK_LIBDL])
2065
1958
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2066
1959
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2067
1960
   AC_SUBST(LIB_KIO, "-lkio")
2068
 
   AC_SUBST(LIB_KJS, "-lkjs")
2069
1961
   AC_SUBST(LIB_SMB, "-lsmb")
2070
1962
   AC_SUBST(LIB_KAB, "-lkab")
2071
1963
   AC_SUBST(LIB_KABC, "-lkabc")
2073
1965
   AC_SUBST(LIB_KSPELL, "-lkspell")
2074
1966
   AC_SUBST(LIB_KPARTS, "-lkparts")
2075
1967
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2076
 
   AC_SUBST(LIB_KUTILS, "-lkutils")
2077
 
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
2078
 
   AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2079
 
   AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2080
 
   AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2081
 
   AC_SUBST(LIB_KUNITTEST, "-lkunittest")
2082
1968
# these are for backward compatibility
2083
1969
   AC_SUBST(LIB_KSYCOCA, "-lkio")
2084
1970
   AC_SUBST(LIB_KFILE, "-lkio")
2103
1989
fi
2104
1990
])
2105
1991
 
2106
 
AC_DEFUN([AC_PATH_KDE],
 
1992
AC_DEFUN(AC_PATH_KDE,
2107
1993
[
2108
1994
  AC_BASE_PATH_KDE
2109
 
  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
 
1995
  AC_ARG_ENABLE(path-check, [  --disable-path-check    don't try to find out, where to install],
2110
1996
  [
2111
1997
  if test "$enableval" = "no";
2112
1998
    then ac_use_path_checking="default"
2128
2014
])
2129
2015
 
2130
2016
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2131
 
AC_DEFUN([KDE_CHECK_FUNC_EXT],
 
2017
AC_DEFUN(KDE_CHECK_FUNC_EXT,
2132
2018
[
2133
2019
AC_MSG_CHECKING(for $1)
2134
2020
AC_CACHE_VAL(kde_cv_func_$1,
2139
2025
kde_safe_LIBS="$LIBS"
2140
2026
LIBS="$LIBS $X_EXTRA_LIBS"
2141
2027
if test "$GXX" = "yes"; then
2142
 
CXXFLAGS="$CXXFLAGS -pedantic-errors"
 
2028
  CXXFLAGS="$CXXFLAGS -pedantic-errors"
2143
2029
fi
2144
2030
AC_TRY_COMPILE([
2145
2031
$2
2150
2036
kde_cv_func_$1=yes,
2151
2037
kde_cv_func_$1=no)
2152
2038
CXXFLAGS="$save_CXXFLAGS"
2153
 
LIBS="$kde_safe_LIBS"
 
2039
LIBS=$kde_safe_LIBS
2154
2040
AC_LANG_RESTORE
2155
2041
])
2156
2042
 
2209
2095
[
2210
2096
#if !defined(HAVE_$5_PROTO)
2211
2097
#ifdef __cplusplus
2212
 
extern "C" {
 
2098
extern "C"
2213
2099
#endif
2214
2100
$4;
2215
 
#ifdef __cplusplus
2216
 
}
2217
 
#endif
2218
2101
#endif
2219
2102
])
2220
2103
])
2221
2104
 
2222
 
AC_DEFUN([AC_CHECK_SETENV],
 
2105
AC_DEFUN(AC_CHECK_SETENV,
2223
2106
[
2224
2107
        KDE_CHECK_FUNC_EXT(setenv, [
2225
2108
#include <stdlib.h>
2229
2112
                [SETENV])
2230
2113
])
2231
2114
 
2232
 
AC_DEFUN([AC_CHECK_UNSETENV],
 
2115
AC_DEFUN(AC_CHECK_UNSETENV,
2233
2116
[
2234
2117
        KDE_CHECK_FUNC_EXT(unsetenv, [
2235
2118
#include <stdlib.h>
2239
2122
                [UNSETENV])
2240
2123
])
2241
2124
 
2242
 
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
 
2125
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
2243
2126
[
2244
2127
        KDE_CHECK_FUNC_EXT(getdomainname, [
2245
2128
#include <stdlib.h>
2246
2129
#include <unistd.h>
2247
 
#include <netdb.h>
2248
2130
], 
2249
2131
                [
2250
2132
char buffer[200];
2251
2133
getdomainname(buffer, 200);
2252
2134
],      
2253
 
                [#include <sys/types.h>
2254
 
                int getdomainname (char *, size_t)],
 
2135
                [int getdomainname (char *, unsigned int)],
2255
2136
                [GETDOMAINNAME])
2256
2137
])
2257
2138
 
2258
 
AC_DEFUN([AC_CHECK_GETHOSTNAME],
 
2139
AC_DEFUN(AC_CHECK_GETHOSTNAME,
2259
2140
[
2260
2141
        KDE_CHECK_FUNC_EXT(gethostname, [
2261
2142
#include <stdlib.h>
2269
2150
                [GETHOSTNAME])
2270
2151
])
2271
2152
 
2272
 
AC_DEFUN([AC_CHECK_USLEEP],
 
2153
AC_DEFUN(AC_CHECK_USLEEP,
2273
2154
[
2274
2155
        KDE_CHECK_FUNC_EXT(usleep, [
2275
2156
#include <unistd.h>
2282
2163
])
2283
2164
 
2284
2165
 
2285
 
AC_DEFUN([AC_CHECK_RANDOM],
 
2166
AC_DEFUN(AC_CHECK_RANDOM,
2286
2167
[
2287
2168
        KDE_CHECK_FUNC_EXT(random, [
2288
2169
#include <stdlib.h>
2304
2185
 
2305
2186
])
2306
2187
 
2307
 
AC_DEFUN([AC_CHECK_INITGROUPS],
 
2188
AC_DEFUN(AC_CHECK_INITGROUPS,
2308
2189
[
2309
2190
        KDE_CHECK_FUNC_EXT(initgroups, [
2310
2191
#include <sys/types.h>
2319
2200
        [INITGROUPS])
2320
2201
])
2321
2202
 
2322
 
AC_DEFUN([AC_CHECK_MKSTEMPS],
 
2203
AC_DEFUN(AC_CHECK_MKSTEMP,
 
2204
[
 
2205
        KDE_CHECK_FUNC_EXT(mkstemp, [
 
2206
#include <stdlib.h>
 
2207
],
 
2208
        [
 
2209
mkstemp("/tmp/aaaXXXXXX");
 
2210
],
 
2211
        [int mkstemp(char *)],
 
2212
        [MKSTEMP])
 
2213
])
 
2214
 
 
2215
AC_DEFUN(AC_CHECK_MKSTEMPS,
2323
2216
[
2324
2217
        KDE_CHECK_FUNC_EXT(mkstemps, [
2325
2218
#include <stdlib.h>
2332
2225
        [MKSTEMPS])
2333
2226
])
2334
2227
 
2335
 
AC_DEFUN([AC_CHECK_MKSTEMP],
2336
 
[
2337
 
        KDE_CHECK_FUNC_EXT(mkstemp, [
2338
 
#include <stdlib.h>
2339
 
#include <unistd.h>
2340
 
],
2341
 
        [
2342
 
mkstemp("/tmp/aaaXXXXXX");
2343
 
],
2344
 
        [int mkstemp(char *)],
2345
 
        [MKSTEMP])
2346
 
])
2347
 
 
2348
 
AC_DEFUN([AC_CHECK_MKDTEMP],
2349
 
[
2350
 
        KDE_CHECK_FUNC_EXT(mkdtemp, [
2351
 
#include <stdlib.h>
2352
 
#include <unistd.h>
2353
 
],
2354
 
        [
2355
 
mkdtemp("/tmp/aaaXXXXXX");
2356
 
],
2357
 
        [char *mkdtemp(char *)],
2358
 
        [MKDTEMP])
2359
 
])
2360
 
 
2361
 
 
2362
 
AC_DEFUN([AC_CHECK_RES_INIT],
 
2228
AC_DEFUN(AC_CHECK_RES_INIT,
2363
2229
[
2364
2230
  AC_MSG_CHECKING([if res_init needs -lresolv])
2365
2231
  kde_libs_safe="$LIBS"
2381
2247
    ],
2382
2248
    [ AC_MSG_RESULT(no) ]
2383
2249
  )
2384
 
  LIBS=$kde_libs_safe
 
2250
  LIBS="$kde_libs_safe"
2385
2251
  AC_SUBST(LIBRESOLV)
2386
2252
 
2387
 
  KDE_CHECK_FUNC_EXT(res_init,
 
2253
  AC_MSG_CHECKING([if res_init is available])
 
2254
  AC_TRY_COMPILE(
2388
2255
    [
2389
2256
#include <sys/types.h>
2390
2257
#include <netinet/in.h>
2391
2258
#include <arpa/nameser.h>
2392
2259
#include <resolv.h>
2393
2260
    ],
2394
 
    [res_init()],
2395
 
    [int res_init(void)],
2396
 
    [RES_INIT])
 
2261
    [
 
2262
      res_init();
 
2263
    ],
 
2264
    [
 
2265
      AC_MSG_RESULT(yes)
 
2266
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
 
2267
    ],
 
2268
    [ AC_MSG_RESULT(no) ]
 
2269
  )
2397
2270
])
2398
2271
 
2399
 
AC_DEFUN([AC_CHECK_STRLCPY],
 
2272
AC_DEFUN(AC_CHECK_STRLCPY,
2400
2273
[
2401
2274
        KDE_CHECK_FUNC_EXT(strlcpy, [
2402
2275
#include <string.h>
2408
2281
        [STRLCPY])
2409
2282
])
2410
2283
 
2411
 
AC_DEFUN([AC_CHECK_STRLCAT],
 
2284
AC_DEFUN(AC_CHECK_STRLCAT,
2412
2285
[
2413
2286
        KDE_CHECK_FUNC_EXT(strlcat, [
2414
2287
#include <string.h>
2421
2294
        [STRLCAT])
2422
2295
])
2423
2296
 
2424
 
AC_DEFUN([AC_CHECK_RES_QUERY],
2425
 
[
2426
 
        KDE_CHECK_FUNC_EXT(res_query, [
2427
 
#include <sys/types.h>
2428
 
#include <netinet/in.h>
2429
 
#include <arpa/nameser.h>
2430
 
#include <resolv.h>
2431
 
#include <netdb.h>
2432
 
],
2433
 
[
2434
 
res_query(NULL, 0, 0, NULL, 0);
2435
 
],
2436
 
        [int res_query(const char *, int, int, unsigned char *, int)],
2437
 
        [RES_QUERY])
2438
 
])
2439
 
 
2440
 
AC_DEFUN([AC_CHECK_DN_SKIPNAME],
2441
 
[
2442
 
        KDE_CHECK_FUNC_EXT(dn_skipname, [
2443
 
#include <sys/types.h>
2444
 
#include <netinet/in.h>
2445
 
#include <arpa/nameser.h>
2446
 
#include <resolv.h>
2447
 
],
2448
 
[
2449
 
dn_skipname (NULL, NULL);
2450
 
],
2451
 
        [int dn_skipname (unsigned char *, unsigned char *)],
2452
 
        [DN_SKIPNAME])
2453
 
])
2454
 
 
2455
 
 
2456
 
AC_DEFUN([AC_FIND_GIF],
 
2297
AC_DEFUN(AC_FIND_GIF,
2457
2298
   [AC_MSG_CHECKING([for giflib])
2458
2299
AC_CACHE_VAL(ac_cv_lib_gif,
2459
2300
[ac_save_LIBS="$LIBS"
2460
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
2301
if test "x$kde_use_qt_emb" != "xyes"; then
2461
2302
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2462
2303
else
2463
2304
LIBS="$all_libraries -lgif"
2487
2328
fi
2488
2329
])
2489
2330
 
2490
 
AC_DEFUN([KDE_FIND_JPEG_HELPER],
 
2331
AC_DEFUN(KDE_FIND_JPEG_HELPER,
2491
2332
[
2492
2333
AC_MSG_CHECKING([for libjpeg$2])
2493
2334
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2494
2335
[
 
2336
AC_LANG_C
2495
2337
ac_save_LIBS="$LIBS"
2496
2338
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2497
2339
ac_save_CFLAGS="$CFLAGS"
2529
2371
 
2530
2372
])
2531
2373
 
2532
 
AC_DEFUN([AC_FIND_JPEG],
 
2374
AC_DEFUN(AC_FIND_JPEG,
2533
2375
[
2534
2376
dnl first look for libraries
2535
2377
KDE_FIND_JPEG_HELPER(6b, 6b,
2581
2423
])
2582
2424
])
2583
2425
 
2584
 
AC_DEFUN([KDE_CHECK_QT_JPEG],
 
2426
AC_DEFUN(KDE_CHECK_QT_JPEG,
2585
2427
[
2586
 
if test -n "$LIBJPEG"; then
2587
2428
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2588
2429
AC_CACHE_VAL(kde_cv_qt_jpeg,
2589
2430
[
2605
2446
LIBS="$ac_save_LIBS"
2606
2447
CXXFLAGS="$ac_save_CXXFLAGS"
2607
2448
AC_LANG_RESTORE
2608
 
fi
2609
2449
])
2610
2450
 
2611
2451
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2618
2458
 
2619
2459
])
2620
2460
 
2621
 
AC_DEFUN([AC_FIND_ZLIB],
 
2461
AC_DEFUN(AC_FIND_ZLIB,
2622
2462
[
2623
2463
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2624
2464
AC_MSG_CHECKING([for libz])
2625
2465
AC_CACHE_VAL(ac_cv_lib_z,
2626
2466
[
 
2467
AC_LANG_C
2627
2468
kde_save_LIBS="$LIBS"
2628
2469
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2629
2470
kde_save_CFLAGS="$CFLAGS"
2632
2473
[
2633
2474
#include<zlib.h>
2634
2475
],
2635
 
[
2636
 
  char buf[42];
2637
 
  gzFile f = (gzFile) 0;
2638
 
  /* this would segfault.. but we only link, don't run */
2639
 
  (void) gzgets(f, buf, sizeof(buf));
2640
 
 
2641
 
  return (zlibVersion() == ZLIB_VERSION); 
2642
 
],
 
2476
            [return (zlibVersion() == ZLIB_VERSION); ],
2643
2477
            eval "ac_cv_lib_z='-lz'",
2644
2478
            eval "ac_cv_lib_z=no")
2645
2479
LIBS="$kde_save_LIBS"
2648
2482
if test ! "$ac_cv_lib_z" = no; then
2649
2483
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2650
2484
  LIBZ="$ac_cv_lib_z"
 
2485
  AC_SUBST(LIBZ)
2651
2486
  AC_MSG_RESULT($ac_cv_lib_z)
2652
2487
else
2653
 
  AC_MSG_ERROR(not found. 
2654
 
          Possibly configure picks up an outdated version
2655
 
          installed by XFree86. Remove it from your system.
2656
 
 
2657
 
          Check your installation and look into config.log)
 
2488
  AC_MSG_ERROR(not found. Check your installation and look into config.log)
2658
2489
  LIBZ=""
 
2490
  AC_SUBST(LIBZ)
2659
2491
fi
2660
 
AC_SUBST(LIBZ)
2661
2492
])
2662
2493
 
2663
 
AC_DEFUN([KDE_TRY_TIFFLIB],
 
2494
AC_DEFUN(KDE_TRY_TIFFLIB,
2664
2495
[
2665
2496
AC_MSG_CHECKING([for libtiff $1])
2666
2497
 
2669
2500
AC_LANG_SAVE
2670
2501
AC_LANG_CPLUSPLUS
2671
2502
kde_save_LIBS="$LIBS"
2672
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
2503
if test "x$kde_use_qt_emb" != "xyes"; then
2673
2504
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2674
2505
else
2675
2506
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2706
2537
 
2707
2538
])
2708
2539
 
2709
 
AC_DEFUN([AC_FIND_TIFF],
 
2540
AC_DEFUN(AC_FIND_TIFF,
2710
2541
[
2711
2542
AC_REQUIRE([K_PATH_X])
2712
2543
AC_REQUIRE([AC_FIND_ZLIB])
2720
2551
])
2721
2552
 
2722
2553
 
2723
 
AC_DEFUN([AC_FIND_PNG],
 
2554
AC_DEFUN(AC_FIND_PNG,
2724
2555
[
2725
2556
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2726
2557
AC_REQUIRE([AC_FIND_ZLIB])
2728
2559
AC_CACHE_VAL(ac_cv_lib_png,
2729
2560
[
2730
2561
kde_save_LIBS="$LIBS"
2731
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
2562
if test "x$kde_use_qt_emb" != "xyes"; then
2732
2563
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2733
2564
else
2734
2565
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2735
2566
fi
2736
2567
kde_save_CFLAGS="$CFLAGS"
2737
2568
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2738
 
 
 
2569
AC_LANG_C
2739
2570
AC_TRY_LINK(dnl
2740
2571
    [
2741
2572
    #include<png.h>
2763
2594
fi
2764
2595
])
2765
2596
 
2766
 
 
2767
 
AC_DEFUN([AC_FIND_JASPER],
2768
 
[
2769
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2770
 
AC_REQUIRE([AC_FIND_JPEG])
2771
 
AC_MSG_CHECKING([for jasper])
2772
 
AC_CACHE_VAL(ac_cv_jasper,
2773
 
[
2774
 
kde_save_LIBS="$LIBS"
2775
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2776
 
kde_save_CFLAGS="$CFLAGS"
2777
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2778
 
 
2779
 
AC_TRY_LINK(dnl
2780
 
    [
2781
 
    #include<jasper/jasper.h>
2782
 
    ],
2783
 
    [
2784
 
    return( jas_init() );
2785
 
    ],
2786
 
    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2787
 
    eval "ac_cv_jasper=no"
2788
 
)
2789
 
LIBS="$kde_save_LIBS"
2790
 
CFLAGS="$kde_save_CFLAGS"
2791
 
])dnl
2792
 
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2793
 
  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2794
 
  LIB_JASPER="$ac_cv_jasper"
2795
 
  AC_MSG_RESULT($ac_cv_jasper)
2796
 
else
2797
 
  AC_MSG_RESULT(no)
2798
 
  LIB_JASPER=""
2799
 
fi
2800
 
AC_SUBST(LIB_JASPER)
2801
 
])
2802
 
 
2803
 
AC_DEFUN([AC_CHECK_BOOL],
 
2597
AC_DEFUN(AC_CHECK_BOOL,
2804
2598
[
2805
2599
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2806
2600
])
2807
2601
 
2808
 
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
 
2602
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
2809
2603
[
2810
2604
AC_MSG_CHECKING(if you need GNU extensions)
2811
2605
AC_CACHE_VAL(ac_cv_gnu_extensions,
2833
2627
fi
2834
2628
])
2835
2629
 
2836
 
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
 
2630
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
2837
2631
[
2838
 
AC_MSG_CHECKING([whether $CXX supports -$1])
2839
 
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
 
2632
AC_MSG_CHECKING(whether $CXX supports -$1)
 
2633
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
2840
2634
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2841
2635
[
2842
2636
  AC_LANG_SAVE
2858
2652
fi
2859
2653
])
2860
2654
 
2861
 
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
2862
 
[
2863
 
AC_MSG_CHECKING([whether $CC supports -$1])
2864
 
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2865
 
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
2866
 
[
2867
 
  AC_LANG_SAVE
2868
 
  AC_LANG_C
2869
 
  save_CFLAGS="$CFLAGS"
2870
 
  CFLAGS="$CFLAGS -$1"
2871
 
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
2872
 
  CFLAGS="$save_CFLAGS"
2873
 
  AC_LANG_RESTORE
2874
 
])
2875
 
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
2876
 
 AC_MSG_RESULT(yes)
2877
 
 :
2878
 
 $2
2879
 
else
2880
 
 AC_MSG_RESULT(no)
2881
 
 :
2882
 
 $3
2883
 
fi
2884
 
])
2885
 
 
2886
 
 
2887
2655
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2888
2656
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2889
2657
dnl it's all white-space separated
2890
 
AC_DEFUN([AC_REMOVE_FORBIDDEN],
 
2658
AC_DEFUN(AC_REMOVE_FORBIDDEN,
2891
2659
[ __val=$$1
2892
2660
  __forbid=" $2 "
2893
2661
  if test -n "$__val"; then
2907
2675
  fi
2908
2676
])
2909
2677
 
2910
 
 
2911
 
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
2912
 
[
2913
 
  AC_MSG_CHECKING([whether $CC is blacklisted])
2914
 
 
2915
 
  dnl In theory we have tu run this test against $CC and $CXX
2916
 
  dnl in C and in C++ mode, because its perfectly legal for
2917
 
  dnl the user to mix compiler versions, since C has a defined
2918
 
  dnl ABI. 
2919
 
  dnl 
2920
 
  dnl For now, we assume the user is not on crack.
2921
 
 
2922
 
  AC_TRY_COMPILE([
2923
 
#ifdef __GNUC__
2924
 
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
2925
 
choke me
2926
 
#endif
2927
 
#endif
2928
 
], ,
2929
 
  kde_bad_compiler=no, 
2930
 
  kde_bad_compiler=yes
2931
 
)
2932
 
 
2933
 
  AC_MSG_RESULT($kde_bad_compiler)
2934
 
 
2935
 
if test "$kde_bad_compiler" = "yes"; then
2936
 
  AC_MSG_ERROR([
2937
 
 
2938
 
This particular compiler version is blacklisted because it
2939
 
is known to miscompile KDE. Please use a newer version, or
2940
 
if that is not yet available, choose an older version. 
2941
 
 
2942
 
Please do not report a bug or bother us reporting this
2943
 
configure error. We know about it, and we introduced
2944
 
it by intention to avoid untraceable bugs or crashes in KDE.
2945
 
 
2946
 
])
2947
 
fi
2948
 
 
2949
 
])
2950
 
 
2951
2678
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2952
 
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
 
2679
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
2953
2680
[dnl
2954
2681
if test "x$kde_use_qt_emb" != "xyes"; then
2955
2682
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2960
2687
fi
2961
2688
])
2962
2689
 
2963
 
AC_DEFUN([AC_CHECK_COMPILERS],
 
2690
AC_DEFUN(AC_CHECK_COMPILERS,
2964
2691
[
2965
 
  AC_ARG_ENABLE(debug,
2966
 
                AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
 
2692
  AC_ARG_ENABLE(debug,[  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]],
2967
2693
  [
2968
2694
    case $enableval in
2969
2695
      yes)
2985
2711
  ])
2986
2712
 
2987
2713
  dnl Just for configure --help
2988
 
  AC_ARG_ENABLE(dummyoption,
2989
 
                AC_HELP_STRING([--disable-debug],
2990
 
                               [disables debug output and debug symbols [default=no]]),
2991
 
                [],[])
 
2714
  AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
2992
2715
 
2993
 
  AC_ARG_ENABLE(strict,
2994
 
                AC_HELP_STRING([--enable-strict],
2995
 
                              [compiles with strict compiler options (may not work!)]),
 
2716
  AC_ARG_ENABLE(strict,[  --enable-strict         compiles with strict compiler options (may not work!)],
2996
2717
   [
2997
2718
    if test $enableval = "no"; then
2998
2719
         kde_use_strict_options="no"
3001
2722
    fi
3002
2723
   ], [kde_use_strict_options="no"])
3003
2724
 
3004
 
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
 
2725
  AC_ARG_ENABLE(warnings,[  --disable-warnings      disables compilation with -Wall and similiar],
3005
2726
   [
3006
2727
    if test $enableval = "no"; then
3007
2728
         kde_use_warnings="no"
3015
2736
    kde_use_warnings=yes
3016
2737
  fi
3017
2738
 
3018
 
  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
 
2739
  AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
3019
2740
    [kde_use_profiling=$enableval],
3020
2741
    [kde_use_profiling="no"]
3021
2742
  )
3022
2743
 
 
2744
  AC_ARG_ENABLE(gcov,[  --enable-gcov           enables gcov test coverage support [default=no]],
 
2745
    [kde_use_gcov=$enableval],
 
2746
    [kde_use_gcov=no]
 
2747
  )
 
2748
 
3023
2749
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
3024
2750
  CFLAGS=" $CFLAGS"
3025
2751
 
3029
2755
 
3030
2756
  if test "$GCC" = "yes"; then
3031
2757
    if test "$kde_use_debug_code" != "no"; then
3032
 
      if test $kde_use_debug_code = "full"; then
3033
 
        CFLAGS="-g3 -fno-inline $CFLAGS"
 
2758
      if test $kde_use_debug_code = "full" || test $kde_use_gcov = "yes"; then
 
2759
        CFLAGS="-g3 $CFLAGS"
3034
2760
      else
3035
2761
        CFLAGS="-g -O2 $CFLAGS"
3036
2762
      fi
3057
2783
 
3058
2784
  AC_PROG_CXX
3059
2785
 
3060
 
  KDE_CHECK_FOR_BAD_COMPILER
3061
 
 
3062
2786
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3063
2787
    if test "$kde_use_debug_code" != "no"; then
3064
2788
      if test "$CXX" = "KCC"; then
3065
2789
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3066
2790
      else
3067
2791
        if test "$kde_use_debug_code" = "full"; then
3068
 
          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
 
2792
          CXXFLAGS="-g3 $CXXFLAGS"
3069
2793
        else
3070
2794
          CXXFLAGS="-g -O2 $CXXFLAGS"
3071
2795
        fi
3096
2820
    ])
3097
2821
  fi
3098
2822
 
 
2823
  if test "$kde_use_gcov" = "yes"; then
 
2824
    KDE_CHECK_COMPILER_FLAG(fprofile-arcs,
 
2825
    [
 
2826
      CFLAGS="-fprofile-arcs -ftest-coverage $CFLAGS"
 
2827
      CXXFLAGS="-fprofile-arcs -ftest-coverage $CXXFLAGS"
 
2828
    ])
 
2829
  fi
 
2830
 
3099
2831
  if test "$kde_use_warnings" = "yes"; then
3100
2832
      if test "$GCC" = "yes"; then
3101
 
        CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
3102
2833
        case $host in
3103
2834
          *-*-linux-gnu)        
3104
 
            CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3105
 
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
3106
 
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3107
 
            KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
 
2835
            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
 
2836
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
3108
2837
          ;;
3109
2838
        esac
 
2839
        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3110
2840
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3111
2841
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3112
 
        dnl ### FIXME: revert for KDE 4
3113
 
        KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
 
2842
        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
3114
2843
     fi
3115
2844
  fi
3116
2845
 
3117
 
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
 
2846
  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
3118
2847
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3119
2848
  fi
3120
 
 
3121
 
  AC_ARG_ENABLE(pch,
3122
 
     AC_HELP_STRING([--enable-pch],
3123
 
                    [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3124
 
    [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3125
 
 
3126
 
  HAVE_GCC_VISIBILITY=0
3127
 
  AC_SUBST([HAVE_GCC_VISIBILITY])
3128
 
 
 
2849
    
3129
2850
  if test "$GXX" = "yes"; then
3130
2851
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3131
2852
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3132
 
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3133
2853
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
3134
 
    ENABLE_PERMISSIVE_FLAG="-fpermissive"
3135
 
 
3136
 
    if test "$kde_use_pch" = "yes"; then
3137
 
        AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3138
 
        echo >conftest.h
3139
 
        if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3140
 
            kde_gcc_supports_pch=yes
3141
 
            AC_MSG_RESULT(yes)
3142
 
        else
3143
 
            kde_gcc_supports_pch=no
3144
 
            AC_MSG_RESULT(no)
3145
 
        fi
3146
 
        if test "$kde_gcc_supports_pch" = "yes"; then
3147
 
            AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3148
 
            if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3149
 
                kde_gcc_supports_pch=yes
3150
 
                AC_MSG_RESULT(yes)
3151
 
            else
3152
 
                kde_gcc_supports_pch=no
3153
 
                AC_MSG_RESULT(no)
3154
 
            fi
3155
 
        fi
3156
 
        rm -f conftest.h conftest.h.gch
3157
 
    fi
3158
2854
  fi
3159
 
  AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3160
2855
  if test "$CXX" = "KCC"; then
3161
2856
    dnl unfortunately we currently cannot disable exception support in KCC
3162
2857
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3163
2858
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3164
2859
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
3165
2860
 
 
2861
    AC_ARG_ENABLE(pch,[  --enable-pch            enables precompiled header support (currently only KCC) [default=no]],
 
2862
    [
 
2863
      kde_use_pch=$enableval
 
2864
    ],[kde_use_pch=no])
 
2865
 
3166
2866
    if test "$kde_use_pch" = "yes"; then
3167
2867
      dnl TODO: support --pch-dir!
3168
2868
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3213
2913
  AC_PROG_CXXCPP
3214
2914
 
3215
2915
  if test "$GCC" = yes; then
 
2916
     NOOPT_CXXFLAGS=-O0
3216
2917
     NOOPT_CFLAGS=-O0
3217
2918
  fi
3218
 
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3219
 
 
3220
 
  AC_ARG_ENABLE(coverage,
3221
 
    AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3222
 
      if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3223
 
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3224
 
        ac_coverage_linker="-lgcc"
3225
 
      elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3226
 
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3227
 
        ac_coverage_linker=""
3228
 
      else
3229
 
        AC_MSG_ERROR([coverage with your compiler is not supported])
3230
 
      fi
3231
 
      CFLAGS="$CFLAGS $ac_coverage_compiler"
3232
 
      CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3233
 
      LDFLAGS="$LDFLAGS $ac_coverage_linker"
3234
 
    ])
3235
2919
 
3236
2920
  AC_SUBST(NOOPT_CXXFLAGS)
3237
2921
  AC_SUBST(NOOPT_CFLAGS)
3238
 
  AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3239
2922
 
3240
 
  KDE_CHECK_NEW_LDFLAGS
3241
2923
  KDE_CHECK_FINAL
3242
 
  KDE_CHECK_CLOSURE
3243
 
  KDE_CHECK_NMCHECK
3244
2924
 
3245
2925
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3246
2926
])
3247
2927
 
3248
 
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
3249
 
  [
3250
 
    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
3251
 
      [
3252
 
        AC_LANG_SAVE
3253
 
        AC_LANG_CPLUSPLUS
3254
 
 
3255
 
        safe_CXXFLAGS=$CXXFLAGS
3256
 
        safe_LDFLAGS=$LDFLAGS
3257
 
        CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
3258
 
        LDFLAGS="$LDFLAGS -shared -fPIC"
3259
 
 
3260
 
        AC_TRY_LINK(
3261
 
        [
3262
 
          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
3263
 
          #include <string>
3264
 
          int some_function( void ) __attribute__ ((visibility("default")));
3265
 
          int some_function( void )
3266
 
          {
3267
 
            std::string s("blafasel");
3268
 
            return 0;
3269
 
          }
3270
 
        ], [/* elvis is alive */],
3271
 
        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
3272
 
 
3273
 
        CXXFLAGS=$safe_CXXFLAGS
3274
 
        LDFLAGS=$safe_LDFLAGS
3275
 
        AC_LANG_RESTORE
3276
 
      ]
3277
 
    )
3278
 
 
3279
 
    if test x$kde_cv_val_gcc_visibility_bug = xno; then
3280
 
      CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
3281
 
    fi
3282
 
  ]
3283
 
)
3284
 
 
3285
 
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
3286
 
[
3287
 
  AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
3288
 
 
3289
 
  if test "x$GXX" = "xyes"; then
3290
 
    kde_have_gcc_visibility=no
3291
 
    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
3292
 
    [
3293
 
      kde_have_gcc_visibility=yes
3294
 
      AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
3295
 
        [
3296
 
          AC_LANG_SAVE
3297
 
          AC_LANG_CPLUSPLUS
3298
 
 
3299
 
          safe_CXXFLAGS=$CXXFLAGS
3300
 
          CXXFLAGS="$CXXFLAGS $all_includes"
3301
 
 
3302
 
          AC_TRY_COMPILE(
3303
 
          [
3304
 
#include <qglobal.h>
3305
 
#if Q_EXPORT - 0 != 0
3306
 
/* if this compiles, then Q_EXPORT is undefined */
3307
 
/* if Q_EXPORT is nonempty, this will break compilation */
3308
 
#endif
3309
 
          ], [/* elvis is alive */],
3310
 
          kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
3311
 
 
3312
 
          CXXFLAGS=$safe_CXXFLAGS
3313
 
          AC_LANG_RESTORE
3314
 
        ]
3315
 
      )
3316
 
 
3317
 
      if test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then
3318
 
        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
3319
 
        KDE_CHECK_VISIBILITY_GCC_BUG
3320
 
        HAVE_GCC_VISIBILITY=1
3321
 
        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3322
 
      fi
3323
 
    ])
3324
 
  fi
3325
 
])
3326
 
 
3327
 
AC_DEFUN([KDE_ADD_DEPENDENCIES],
 
2928
AC_DEFUN(KDE_ADD_DEPENDENCIES,
3328
2929
[
3329
2930
   [A]M_DEPENDENCIES(CC)
3330
2931
   [A]M_DEPENDENCIES(CXX)
3331
2932
])
3332
2933
 
3333
2934
dnl just a wrapper to clean up configure.in
3334
 
AC_DEFUN([KDE_PROG_LIBTOOL],
 
2935
AC_DEFUN(KDE_PROG_LIBTOOL,
3335
2936
[
3336
2937
AC_REQUIRE([AC_CHECK_COMPILERS])
3337
2938
AC_REQUIRE([AC_ENABLE_SHARED])
3340
2941
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3341
2942
AC_REQUIRE([KDE_CHECK_LIB64])
3342
2943
 
 
2944
AC_LANG_SAVE
 
2945
AC_LANG_C
3343
2946
AC_OBJEXT
3344
2947
AC_EXEEXT
 
2948
AC_LANG_RESTORE
3345
2949
 
3346
2950
AM_PROG_LIBTOOL
3347
2951
AC_LIBTOOL_CXX
3348
2952
 
3349
2953
LIBTOOL_SHELL="/bin/sh ./libtool"
3350
2954
#  LIBTOOL="$LIBTOOL --silent"
3351
 
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
 
2955
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3352
2956
AC_SUBST(KDE_PLUGIN)
3353
2957
 
3354
 
# we patch configure quite some so we better keep that consistent for incremental runs 
3355
 
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
 
2958
AC_ARG_ENABLE(objprelink, [  --enable-objprelink     prelink apps using objprelink (obsolete)],
 
2959
       kde_use_objprelink=$enableval, kde_use_objprelink=no)
 
2960
  if test "x$kde_use_objprelink" = "xyes"; then 
 
2961
        AC_MSG_WARN([
 
2962
------------------------------------------------------------
 
2963
Configuration option --enable-objprelink is no longer useful.
 
2964
See http:://objprelink.sourceforge.net for details:
 
2965
1- Recent binutils are fast enough to do without objprelink.
 
2966
2- Newer versions of objprelink do not need this option.
 
2967
------------------------------------------------------------
 
2968
])
 
2969
  fi
3356
2970
])
3357
2971
 
3358
 
AC_DEFUN([KDE_CHECK_LIB64],
 
2972
AC_DEFUN(KDE_CHECK_LIB64,
3359
2973
[
3360
 
    kdelibsuff="$kde_libs_suffix"
3361
 
    if test -z "$kdelibsuff"; then
3362
 
       kdelibsuff=no
3363
 
    fi
 
2974
    kdelibsuff=none
3364
2975
    AC_ARG_ENABLE(libsuffix,
3365
2976
        AC_HELP_STRING([--enable-libsuffix],
3366
2977
            [/lib directory suffix (64,32,none[=default])]),
3367
2978
            kdelibsuff=$enableval)
3368
2979
    # TODO: add an auto case that compiles a little C app to check
3369
2980
    # where the glibc is
3370
 
    if test "$kdelibsuff" = "no"; then
 
2981
    if test "$kdelibsuff" = "none"; then
3371
2982
       kdelibsuff=
3372
2983
    fi
3373
2984
    if test -z "$kdelibsuff"; then
3378
2989
            libdir="$libdir${kdelibsuff}"
3379
2990
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
3380
2991
        fi
3381
 
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
 
2992
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
3382
2993
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3383
2994
    fi
3384
2995
])
3385
2996
 
3386
 
AC_DEFUN([KDE_CHECK_TYPES],
 
2997
AC_DEFUN(KDE_CHECK_TYPES,
3387
2998
[  AC_CHECK_SIZEOF(int, 4)dnl
3388
 
   AC_CHECK_SIZEOF(short)dnl
3389
2999
  AC_CHECK_SIZEOF(long, 4)dnl
3390
3000
  AC_CHECK_SIZEOF(char *, 4)dnl
 
3001
  AC_CHECK_SIZEOF(char, 1)dnl
3391
3002
])dnl
3392
3003
 
3393
 
dnl Not used - kept for compat only?
3394
 
AC_DEFUN([KDE_DO_IT_ALL],
 
3004
AC_DEFUN(KDE_DO_IT_ALL,
3395
3005
[
3396
3006
AC_CANONICAL_SYSTEM
3397
3007
AC_ARG_PROGRAM
3404
3014
AC_PATH_KDE
3405
3015
])
3406
3016
 
3407
 
AC_DEFUN([AC_CHECK_RPATH],
 
3017
AC_DEFUN(AC_CHECK_RPATH,
3408
3018
[
3409
3019
AC_MSG_CHECKING(for rpath)
3410
3020
AC_ARG_ENABLE(rpath,
3411
 
      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
 
3021
      [  --disable-rpath         do not use the rpath feature of ld],
3412
3022
      USE_RPATH=$enableval, USE_RPATH=yes)
3413
3023
 
3414
3024
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3415
3025
 
3416
 
  KDE_RPATH="-R \$(libdir)"
3417
 
 
3418
 
  if test "$kde_libraries" != "$libdir"; then
3419
 
      KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3420
 
  fi
 
3026
  KDE_RPATH="-R \$(kde_libraries)"
3421
3027
 
3422
3028
  if test -n "$qt_libraries"; then
3423
3029
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3424
3030
  fi
3425
3031
  dnl $x_libraries is set to /usr/lib in case
3426
3032
  if test -n "$X_LDFLAGS"; then
3427
 
    X_RPATH="-R \$(x_libraries)"
 
3033
    X_RPATH="-R \$(x_libraries)" 
3428
3034
    KDE_RPATH="$KDE_RPATH $X_RPATH"
3429
3035
  fi
3430
3036
  if test -n "$KDE_EXTRA_RPATH"; then
3438
3044
])
3439
3045
 
3440
3046
dnl Check for the type of the third argument of getsockname
3441
 
AC_DEFUN([AC_CHECK_SOCKLEN_T],
3442
 
[
3443
 
   AC_MSG_CHECKING(for socklen_t)
3444
 
   AC_CACHE_VAL(kde_cv_socklen_t,
3445
 
   [
3446
 
      AC_LANG_PUSH(C++)
3447
 
      kde_cv_socklen_t=no
 
3047
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
 
3048
  AC_MSG_CHECKING(for socklen_t)
 
3049
  AC_CACHE_VAL(ac_cv_socklen_t, [
 
3050
    AC_LANG_SAVE
 
3051
    AC_LANG_CPLUSPLUS
 
3052
    AC_TRY_COMPILE([
 
3053
#include <sys/types.h>
 
3054
#include <sys/socket.h>
 
3055
      ],[
 
3056
socklen_t a=0;
 
3057
getsockname(0,(struct sockaddr*)0, &a);
 
3058
      ],
 
3059
      ac_cv_socklen_t=socklen_t,
3448
3060
      AC_TRY_COMPILE([
3449
 
         #include <sys/types.h>
3450
 
         #include <sys/socket.h>
3451
 
      ],
3452
 
      [
3453
 
         socklen_t len;
3454
 
         getpeername(0,0,&len);
3455
 
      ],
3456
 
      [
3457
 
         kde_cv_socklen_t=yes
3458
 
         kde_cv_socklen_t_equiv=socklen_t
3459
 
      ])
3460
 
      AC_LANG_POP(C++)
3461
 
   ])
3462
 
   AC_MSG_RESULT($kde_cv_socklen_t)
3463
 
   if test $kde_cv_socklen_t = no; then
3464
 
      AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3465
 
      AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3466
 
      [
3467
 
         kde_cv_socklen_t_equiv=int
3468
 
         AC_LANG_PUSH(C++)
3469
 
         for t in int size_t unsigned long "unsigned long"; do
3470
 
            AC_TRY_COMPILE([
3471
 
               #include <sys/types.h>
3472
 
               #include <sys/socket.h>
3473
 
            ],
3474
 
            [
3475
 
               $t len;
3476
 
               getpeername(0,0,&len);
3477
 
            ],
3478
 
            [
3479
 
               kde_cv_socklen_t_equiv="$t"
3480
 
               break
3481
 
            ])
3482
 
         done
3483
 
         AC_LANG_POP(C++)
3484
 
      ])
3485
 
      AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3486
 
   fi
3487
 
   AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3488
 
                     [type to use in place of socklen_t if not defined])
3489
 
   AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3490
 
                     [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
 
3061
#include <sys/types.h>
 
3062
#include <sys/socket.h>
 
3063
        ],[
 
3064
int a=0;
 
3065
getsockname(0,(struct sockaddr*)0, &a);
 
3066
        ],
 
3067
        ac_cv_socklen_t=int,
 
3068
        ac_cv_socklen_t=size_t
 
3069
      )
 
3070
    )
 
3071
    AC_LANG_RESTORE
 
3072
  ])
 
3073
 
 
3074
  AC_MSG_RESULT($ac_cv_socklen_t)
 
3075
  if test "$ac_cv_socklen_t" != "socklen_t"; then
 
3076
    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
 
3077
        [Define the real type of socklen_t])
 
3078
  fi
 
3079
  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
 
3080
 
3491
3081
])
3492
3082
 
3493
3083
dnl This is a merge of some macros out of the gettext aclocal.m4
3506
3096
dnl >
3507
3097
dnl for this file it is relicensed under LGPL
3508
3098
 
3509
 
AC_DEFUN([AM_KDE_WITH_NLS],
 
3099
AC_DEFUN(AM_KDE_WITH_NLS,
3510
3100
  [
3511
3101
    dnl If we use NLS figure out what method
3512
3102
 
3549
3139
 
3550
3140
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3551
3141
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3552
 
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
 
3142
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
3553
3143
[# Extract the first word of "$2", so it can be a program name with args.
3554
3144
set dummy $2; ac_word=[$]2
3555
3145
AC_MSG_CHECKING([for $ac_word])
3591
3181
 
3592
3182
# serial 1
3593
3183
 
3594
 
AC_DEFUN([AM_LC_MESSAGES],
 
3184
AC_DEFUN(AM_LC_MESSAGES,
3595
3185
  [if test $ac_cv_header_locale_h = yes; then
3596
3186
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3597
3187
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3637
3227
# serial 1
3638
3228
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3639
3229
 
3640
 
AC_DEFUN([AM_KDE_GNU_GETTEXT],
 
3230
AC_DEFUN(AM_KDE_GNU_GETTEXT,
3641
3231
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3642
3232
   AC_REQUIRE([AC_PROG_RANLIB])dnl
3643
3233
   AC_REQUIRE([AC_HEADER_STDC])dnl
3699
3289
 
3700
3290
  ])
3701
3291
 
3702
 
AC_DEFUN([AC_HAVE_XPM],
 
3292
AC_DEFUN(AC_HAVE_XPM,
3703
3293
 [AC_REQUIRE_CPP()dnl
3704
3294
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3705
3295
 
3706
3296
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3707
3297
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3708
3298
 
3709
 
 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
 
3299
 AC_ARG_WITH(xpm, [  --without-xpm           disable color pixmap XPM tests],
3710
3300
        xpm_test=$withval, xpm_test="yes")
3711
3301
 if test "x$xpm_test" = xno; then
3712
3302
   ac_cv_have_xpm=no
3714
3304
   AC_MSG_CHECKING(for XPM)
3715
3305
   AC_CACHE_VAL(ac_cv_have_xpm,
3716
3306
   [
 
3307
    AC_LANG_C
3717
3308
    ac_save_ldflags="$LDFLAGS"
3718
3309
    ac_save_cflags="$CFLAGS"
3719
 
    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
3310
    if test "x$kde_use_qt_emb" != "xyes"; then
3720
3311
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3721
3312
    else
3722
3313
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3754
3345
 AC_SUBST(XPMLIB)
3755
3346
])
3756
3347
 
3757
 
AC_DEFUN([AC_HAVE_DPMS],
 
3348
AC_DEFUN(AC_HAVE_DPMS,
3758
3349
 [AC_REQUIRE_CPP()dnl
3759
3350
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3760
3351
 
3762
3353
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3763
3354
 DPMS_LIB=
3764
3355
 
3765
 
 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
 
3356
 AC_ARG_WITH(dpms, [  --without-dpms          disable DPMS power saving],
3766
3357
        dpms_test=$withval, dpms_test="yes")
3767
3358
 if test "x$dpms_test" = xno; then
3768
3359
   ac_cv_have_dpms=no
3772
3363
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3773
3364
   AC_CACHE_VAL(ac_cv_have_dpms,
3774
3365
   [
3775
 
    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
 
3366
    if test "x$kde_use_qt_emb" = "xyes"; then
3776
3367
      AC_MSG_RESULT(no)
3777
3368
      ac_cv_have_dpms="no"
3778
3369
    else
 
3370
      AC_LANG_C
3779
3371
      ac_save_ldflags="$LDFLAGS"
3780
3372
      ac_save_cflags="$CFLAGS"
3781
3373
      ac_save_libs="$LIBS"
3782
 
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
3783
 
      LIBS="-lX11 -lXext $LIBSOCKET"
 
3374
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3784
3375
      CFLAGS="$CFLAGS $X_INCLUDES"
3785
3376
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3786
3377
      AC_TRY_LINK([
3791
3382
          int foo_test_dpms()
3792
3383
          { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3793
3384
          ac_cv_have_dpms="yes", [
3794
 
              LIBS="-lXdpms $LIBS"
 
3385
              LDFLAGS="$ac_save_ldflags"
 
3386
              CFLAGS="$ac_save_cflags"
 
3387
              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
 
3388
              LIBS="$LIBS -lXdpms"
 
3389
              CFLAGS="$CFLAGS $X_INCLUDES"
 
3390
              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3795
3391
              AC_TRY_LINK([
3796
3392
                  #include <X11/Xproto.h>
3797
3393
                  #include <X11/X.h>
3833
3429
    $1
3834
3430
  fi
3835
3431
 fi
3836
 
 ac_save_cflags="$CFLAGS"
3837
 
 CFLAGS="$CFLAGS $X_INCLUDES"
3838
 
 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3839
 
 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3840
 
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3841
 
 AC_CHECK_DECL(DPMSCapable,
3842
 
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3843
 
   [#include <X11/extensions/dpms.h>])
3844
 
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3845
 
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3846
 
 AC_CHECK_DECL(DPMSInfo,
3847
 
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3848
 
   [#include <X11/extensions/dpms.h>])
3849
 
 CFLAGS="$ac_save_cflags"
3850
3432
 AC_SUBST(DPMSINC)
3851
3433
 AC_SUBST(DPMSLIB)
3852
3434
])
3853
3435
 
3854
 
AC_DEFUN([AC_HAVE_GL],
 
3436
AC_DEFUN(AC_HAVE_GL,
3855
3437
 [AC_REQUIRE_CPP()dnl
3856
3438
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3857
3439
 
3858
3440
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3859
3441
 test -z "$GL_INCLUDE" && GL_INCLUDE=
3860
3442
 
3861
 
 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
 
3443
 AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
3862
3444
        gl_test=$withval, gl_test="yes")
3863
3445
 if test "x$kde_use_qt_emb" = "xyes"; then
3864
3446
   # GL and Qt Embedded is a no-go for now.
3871
3453
   [
3872
3454
    AC_LANG_SAVE
3873
3455
    AC_LANG_CPLUSPLUS
3874
 
    ac_save_ldflags=$LDFLAGS
3875
 
    ac_save_cxxflags=$CXXFLAGS
3876
 
    ac_save_libs=$LIBS
3877
 
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
3878
 
    LIBS="$LIBS -lGL -lGLU"
3879
 
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
3880
 
    LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
 
3456
    ac_save_ldflags="$LDFLAGS"
 
3457
    ac_save_cxxflags="$CXXFLAGS"
 
3458
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
 
3459
    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
 
3460
    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3881
3461
    CXXFLAGS="$CFLAGS $X_INCLUDES"
3882
3462
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3883
3463
    AC_TRY_LINK([#include <GL/gl.h>
3884
3464
#include <GL/glu.h>
3885
3465
], [],
3886
 
        ac_cv_have_gl="yes", ac_cv_have_gl="no")
 
3466
        ac_cv_have_gl="mesa", ac_cv_have_gl="no")
 
3467
    if test "x$ac_cv_have_gl" = "xno"; then
 
3468
      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
 
3469
      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
 
3470
      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
 
3471
      CXXFLAGS="$ac_save_cflags $X_INCLUDES"
 
3472
      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
 
3473
      AC_TRY_LINK([#include <GL/gl.h>
 
3474
#include <GL/glu.h>
 
3475
], [],
 
3476
          ac_cv_have_gl="yes", ac_cv_have_gl="no")
 
3477
    fi
3887
3478
    AC_LANG_RESTORE
3888
 
    LDFLAGS=$ac_save_ldflags
3889
 
    CXXFLAGS=$ac_save_cxxflags
3890
 
    LIBS=$ac_save_libs
 
3479
    LDFLAGS="$ac_save_ldflags"
 
3480
    CXXFLAGS="$ac_save_cxxflags"
3891
3481
   ])dnl
3892
3482
 
3893
3483
  if test "$ac_cv_have_gl" = "no"; then
3898
3488
  else
3899
3489
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3900
3490
    if test "$GL_LDFLAGS" = ""; then
3901
 
       GLLIB='-lGLU -lGL $(LIB_X11)'
 
3491
       if test "$ac_cv_have_gl" = "mesa"; then
 
3492
          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
 
3493
       else
 
3494
          GLLIB='-lGLU -lGL $(LIB_X11)'
 
3495
       fi
3902
3496
    else
3903
 
       GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
 
3497
       if test "$ac_cv_have_gl" = "mesa"; then
 
3498
          GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
 
3499
       else
 
3500
          GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
 
3501
       fi
3904
3502
    fi
3905
3503
    if test "$GL_INCLUDE" = ""; then
3906
3504
       GLINC=""
3918
3516
 
3919
3517
 dnl shadow password and PAM magic - maintained by ossi@kde.org
3920
3518
 
3921
 
AC_DEFUN([KDE_PAM], [
 
3519
AC_DEFUN(KDE_PAM, [
3922
3520
  AC_REQUIRE([KDE_CHECK_LIBDL])
3923
3521
 
3924
 
  want_pam=
3925
3522
  AC_ARG_WITH(pam,
3926
 
    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
 
3523
    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
3927
3524
    [ if test "x$withval" = "xyes"; then
3928
 
        want_pam=yes
 
3525
        use_pam=yes
3929
3526
        pam_service=kde
3930
3527
      elif test "x$withval" = "xno"; then
3931
 
        want_pam=no
 
3528
        use_pam=no
3932
3529
      else
3933
 
        want_pam=yes
 
3530
        use_pam=yes
3934
3531
        pam_service=$withval
3935
3532
      fi
3936
 
    ], [ pam_service=kde ])
3937
 
 
3938
 
  use_pam=
3939
 
  PAMLIBS=
3940
 
  if test "x$want_pam" != xno; then
3941
 
    AC_CHECK_LIB(pam, pam_start, [
3942
 
      AC_CHECK_HEADER(security/pam_appl.h,
3943
 
        [ pam_header=security/pam_appl.h ],
3944
 
        [ AC_CHECK_HEADER(pam/pam_appl.h,
3945
 
            [ pam_header=pam/pam_appl.h ],
3946
 
            [
3947
 
    AC_MSG_WARN([PAM detected, but no headers found!
3948
 
Make sure you have the necessary development packages installed.])
3949
 
            ]
3950
 
          )
3951
 
        ]
3952
 
      )
3953
 
    ], , $LIBDL)
3954
 
    if test -z "$pam_header"; then
3955
 
      if test "x$want_pam" = xyes; then
3956
 
        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
3957
 
      fi
3958
 
    else
3959
 
      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3960
 
      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3961
 
      use_pam=yes
3962
 
 
3963
 
      dnl darwin claims to be something special
3964
 
      if test "$pam_header" = "pam/pam_appl.h"; then
3965
 
        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
3966
 
      fi
3967
 
 
3968
 
      dnl test whether struct pam_message is const (Linux) or not (Sun)
3969
 
      AC_MSG_CHECKING(for const pam_message)
3970
 
      AC_EGREP_HEADER([struct pam_message], $pam_header,
3971
 
        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3972
 
                          [AC_MSG_RESULT([const: Linux-type PAM])],
3973
 
                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
3974
 
                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3975
 
                          )],
3976
 
        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3977
 
    fi
 
3533
      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
 
3534
    ], [
 
3535
      AC_CACHE_VAL(ac_cv_path_pam,
 
3536
        [ use_pam=no
 
3537
          AC_CHECK_LIB(pam, pam_start,
 
3538
            [ AC_CHECK_HEADER(security/pam_appl.h,
 
3539
                [ use_pam=yes
 
3540
                  pam_service=kde ]) 
 
3541
            ], , $LIBDL)
 
3542
          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
 
3543
        ])
 
3544
    ])
 
3545
  eval "$ac_cv_path_pam"
 
3546
 
 
3547
  AC_MSG_CHECKING(for PAM)
 
3548
  if test "x$use_pam" = xno; then
 
3549
    AC_MSG_RESULT(no)
 
3550
    PAMLIBS=""
 
3551
  else
 
3552
    AC_MSG_RESULT(yes)
 
3553
    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
 
3554
    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
 
3555
 
 
3556
    dnl test whether struct pam_message is const (Linux) or not (Sun)
 
3557
    AC_MSG_CHECKING(for const pam_message)
 
3558
    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
 
3559
      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
 
3560
                        [AC_MSG_RESULT([const: Linux-type PAM])],
 
3561
                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
 
3562
                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
 
3563
                        )],
 
3564
      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3978
3565
  fi
3979
3566
 
3980
3567
  AC_SUBST(PAMLIBS)
3981
3568
])
3982
3569
 
3983
3570
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3984
 
AC_DEFUN([DEF_PAM_SERVICE], [
 
3571
AC_DEFUN(DEF_PAM_SERVICE, [
3985
3572
  AC_ARG_WITH($1-pam,
3986
 
    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
 
3573
    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
3987
3574
    [ if test "x$use_pam" = xyes; then
3988
 
        $3_PAM_SERVICE=$withval
 
3575
        $3_PAM_SERVICE="$withval"
3989
3576
      else
3990
3577
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3991
3578
You may want to enforce it by using --with-pam.])
4002
3589
    AC_SUBST($3_PAM_SERVICE)
4003
3590
])
4004
3591
 
4005
 
AC_DEFUN([KDE_SHADOWPASSWD], [
 
3592
AC_DEFUN(KDE_SHADOWPASSWD, [
4006
3593
  AC_REQUIRE([KDE_PAM])
4007
3594
 
4008
3595
  AC_CHECK_LIB(shadow, getspent,
4025
3612
  AC_MSG_CHECKING([for shadow passwords])
4026
3613
 
4027
3614
  AC_ARG_WITH(shadow,
4028
 
    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
 
3615
    [  --with-shadow              If you want shadow password support ],
4029
3616
    [ if test "x$withval" != "xno"; then
4030
3617
        use_shadow=yes
4031
3618
      else
4059
3646
 
4060
3647
])
4061
3648
 
4062
 
AC_DEFUN([KDE_PASSWDLIBS], [
 
3649
AC_DEFUN(KDE_PASSWDLIBS, [
4063
3650
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
4064
3651
  AC_REQUIRE([KDE_PAM])
4065
3652
  AC_REQUIRE([KDE_SHADOWPASSWD])
4085
3672
  AC_SUBST(PASSWDLIBS)
4086
3673
])
4087
3674
 
4088
 
AC_DEFUN([KDE_CHECK_LIBDL],
 
3675
AC_DEFUN(KDE_CHECK_LIBDL,
4089
3676
[
4090
3677
AC_CHECK_LIB(dl, dlopen, [
4091
3678
LIBDL="-ldl"
4100
3687
AC_SUBST(LIBDL)
4101
3688
])
4102
3689
 
4103
 
AC_DEFUN([KDE_CHECK_DLOPEN],
 
3690
AC_DEFUN(KDE_CHECK_DLOPEN,
4104
3691
[
4105
3692
KDE_CHECK_LIBDL
4106
3693
AC_CHECK_HEADERS(dlfcn.h dl.h)
4115
3702
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4116
3703
dnl (MM)
4117
3704
AC_ARG_ENABLE(dlopen,
4118
 
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
 
3705
[  --disable-dlopen        link statically [default=no]] ,
4119
3706
enable_dlopen=$enableval,
4120
3707
enable_dlopen=yes)
4121
3708
 
4140
3727
 
4141
3728
])
4142
3729
 
4143
 
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
 
3730
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
4144
3731
[
4145
3732
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4146
3733
KDE_PROG_LIBTOOL
4160
3747
fi
4161
3748
])
4162
3749
 
4163
 
AC_DEFUN([KDE_ADD_INCLUDES],
 
3750
AC_DEFUN(KDE_ADD_INCLUDES,
4164
3751
[
4165
3752
if test -z "$1"; then
4166
3753
  test_include="Pix.h"
4197
3784
])
4198
3785
])
4199
3786
 
4200
 
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
4201
 
[
4202
 
  dnl This code is here specifically to handle the
4203
 
  dnl various flavors of threading library on FreeBSD
4204
 
  dnl 4-, 5-, and 6-, and the (weird) rules around it.
4205
 
  dnl There may be an environment PTHREAD_LIBS that 
4206
 
  dnl specifies what to use; otherwise, search for it.
4207
 
  dnl -pthread is special cased and unsets LIBPTHREAD
4208
 
  dnl below if found.
4209
 
  LIBPTHREAD=""
4210
 
 
4211
 
  if test -n "$PTHREAD_LIBS"; then
4212
 
    if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4213
 
      LIBPTHREAD="PTHREAD"
4214
 
    else
4215
 
      PTHREAD_LIBS_save="$PTHREAD_LIBS"
4216
 
      PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4217
 
      AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4218
 
      KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4219
 
          LIBPTHREAD="$PTHREAD_LIBS_save"])
4220
 
      PTHREAD_LIBS="$PTHREAD_LIBS_save"
4221
 
    fi
4222
 
  fi
4223
 
 
4224
 
  dnl Is this test really needed, in the face of the Tru64 test below?
4225
 
  if test -z "$LIBPTHREAD"; then
4226
 
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4227
 
  fi
4228
 
 
4229
 
  dnl This is a special Tru64 check, see BR 76171 issue #18.
4230
 
  if test -z "$LIBPTHREAD" ; then
4231
 
    AC_MSG_CHECKING([for pthread_create in -lpthread])
4232
 
    kde_safe_libs=$LIBS
4233
 
    LIBS="$LIBS -lpthread"
4234
 
    AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4235
 
        AC_MSG_RESULT(yes)
4236
 
        LIBPTHREAD="-lpthread"],[
4237
 
        AC_MSG_RESULT(no)])
4238
 
    LIBS=$kde_safe_libs
4239
 
  fi
4240
 
 
4241
 
  dnl Un-special-case for FreeBSD.
4242
 
  if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4243
 
    LIBPTHREAD=""
4244
 
  fi
4245
 
 
4246
 
  AC_SUBST(LIBPTHREAD)
4247
 
])
4248
 
 
4249
 
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
4250
 
[
 
3787
 
 
3788
AC_DEFUN(KDE_CHECK_MICO,
 
3789
[
 
3790
AC_REQUIRE([KDE_CHECK_LIBDL])
 
3791
AC_REQUIRE([KDE_MISC_TESTS])
 
3792
AC_MSG_CHECKING(for MICO)
 
3793
 
 
3794
if test -z "$MICODIR"; then
 
3795
    kde_micodir=/usr/local
 
3796
 else
 
3797
    kde_micodir="$MICODIR"
 
3798
fi
 
3799
 
 
3800
AC_ARG_WITH(micodir,
 
3801
  [  --with-micodir=micodir  where mico is installed ],
 
3802
  kde_micodir=$withval,
 
3803
  kde_micodir=$kde_micodir
 
3804
)
 
3805
 
 
3806
AC_CACHE_VAL(kde_cv_mico_incdir,
 
3807
[
 
3808
  mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
 
3809
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
 
3810
 
 
3811
])
 
3812
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
 
3813
 
 
3814
if test ! -r  $kde_micodir/include/CORBA.h; then
 
3815
  AC_MSG_ERROR([No CORBA.h found, specify another micodir])
 
3816
fi
 
3817
 
 
3818
AC_MSG_RESULT($kde_micodir)
 
3819
 
 
3820
MICO_INCLUDES=-I$kde_micodir/include
 
3821
AC_SUBST(MICO_INCLUDES)
 
3822
MICO_LDFLAGS=-L$kde_micodir/lib
 
3823
AC_SUBST(MICO_LDFLAGS)
 
3824
micodir=$kde_micodir
 
3825
AC_SUBST(micodir)
 
3826
 
 
3827
AC_MSG_CHECKING([for MICO version])
 
3828
AC_CACHE_VAL(kde_cv_mico_version,
 
3829
[
 
3830
AC_LANG_C
 
3831
cat >conftest.$ac_ext <<EOF
 
3832
#include <stdio.h>
 
3833
#include <mico/version.h>
 
3834
int main() {
 
3835
 
 
3836
   printf("MICO_VERSION=%s\n",MICO_VERSION);
 
3837
   return (0);
 
3838
}
 
3839
EOF
 
3840
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
 
3841
if AC_TRY_EVAL(ac_compile); then
 
3842
  if eval `./conftest 2>&5`; then
 
3843
    kde_cv_mico_version=$MICO_VERSION
 
3844
  else
 
3845
    AC_MSG_ERROR([your system is not able to execute a small application to
 
3846
    find MICO version! Check $kde_micodir/include/mico/version.h])
 
3847
  fi
 
3848
else
 
3849
  AC_MSG_ERROR([your system is not able to compile a small application to
 
3850
  find MICO version! Check $kde_micodir/include/mico/version.h])
 
3851
fi
 
3852
])
 
3853
 
 
3854
dnl installed MICO version
 
3855
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
 
3856
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
 
3857
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
 
3858
 
 
3859
if test "x$1" = "x"; then
 
3860
 req_version="2.3.0"
 
3861
else
 
3862
 req_version=$1
 
3863
fi
 
3864
 
 
3865
dnl required MICO version
 
3866
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
 
3867
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
 
3868
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
 
3869
 
 
3870
if test "$mico_v_maj" -lt "$req_v_maj" || \
 
3871
   ( test "$mico_v_maj" -eq "$req_v_maj" && \
 
3872
        test "$mico_v_mid" -lt "$req_v_mid" ) || \
 
3873
   ( test "$mico_v_mid" -eq "$req_v_mid" && \
 
3874
        test "$mico_v_min" -lt "$req_v_min" )
 
3875
 
 
3876
then
 
3877
  AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
 
3878
at least is required. You should upgrade MICO.])
 
3879
else
 
3880
  AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
 
3881
fi
 
3882
 
 
3883
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
 
3884
AC_SUBST(LIBMICO)
 
3885
if test -z "$IDL"; then
 
3886
  IDL='$(kde_bindir)/cuteidl'
 
3887
fi
 
3888
AC_SUBST(IDL)
 
3889
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
 
3890
AC_SUBST(IDL_DEPENDENCIES)
 
3891
 
 
3892
idldir="\$(includedir)/idl"
 
3893
AC_SUBST(idldir)
 
3894
 
 
3895
])
 
3896
 
 
3897
AC_DEFUN(KDE_CHECK_MINI_STL,
 
3898
[
 
3899
AC_REQUIRE([KDE_CHECK_MICO])
 
3900
 
 
3901
AC_MSG_CHECKING(if we use mico's mini-STL)
 
3902
AC_CACHE_VAL(kde_cv_have_mini_stl,
 
3903
[
 
3904
AC_LANG_SAVE
 
3905
AC_LANG_CPLUSPLUS
 
3906
kde_save_cxxflags="$CXXFLAGS"
 
3907
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
 
3908
AC_TRY_COMPILE(
 
3909
[
 
3910
#include <mico/config.h>
 
3911
],
 
3912
[
 
3913
#ifdef HAVE_MINI_STL
 
3914
#error "nothing"
 
3915
#endif
 
3916
],
 
3917
kde_cv_have_mini_stl=no,
 
3918
kde_cv_have_mini_stl=yes)
 
3919
CXXFLAGS="$kde_save_cxxflags"
 
3920
AC_LANG_RESTORE
 
3921
])
 
3922
 
 
3923
if test "x$kde_cv_have_mini_stl" = "xyes"; then
 
3924
   AC_MSG_RESULT(yes)
 
3925
   $1
 
3926
else
 
3927
   AC_MSG_RESULT(no)
 
3928
   $2
 
3929
fi
 
3930
])
 
3931
 
 
3932
])
 
3933
 
 
3934
 
 
3935
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
 
3936
[
 
3937
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
 
3938
AC_SUBST(LIBPTHREAD)
 
3939
])
 
3940
 
 
3941
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
 
3942
[
 
3943
    AC_ARG_ENABLE(kernel-threads, [  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
 
3944
        kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
 
3945
 
 
3946
    if test "$kde_use_kernthreads" = "yes"; then
 
3947
      ac_save_CXXFLAGS="$CXXFLAGS"
 
3948
      ac_save_CFLAGS="$CFLAGS"
 
3949
      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
 
3950
      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
 
3951
      AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
 
3952
      CXXFLAGS="$ac_save_CXXFLAGS"
 
3953
      CFLAGS="$ac_save_CFLAGS"
 
3954
      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
 
3955
        kde_use_kernthreads=no
 
3956
      else
 
3957
        dnl Add proper -I and -l statements
 
3958
        AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
 
3959
        if test "x$LIBPTHREAD" = "x"; then
 
3960
          kde_use_kernthreads=no
 
3961
        else
 
3962
          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
 
3963
        fi
 
3964
      fi
 
3965
    else 
4251
3966
      USE_THREADS=""
4252
3967
      if test -z "$LIBPTHREAD"; then
4253
 
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
 
3968
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
4254
3969
      fi
 
3970
    fi
4255
3971
 
4256
3972
    AH_VERBATIM(__svr_define, [
4257
3973
#if defined(__SVR4) && !defined(__svr4__)
4264
3980
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4265
3981
                ;;
4266
3982
        freebsd*)
4267
 
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
 
3983
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4268
3984
                ;;
4269
3985
        aix*)
4270
3986
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4283
3999
    AC_SUBST(LIBPTHREAD)
4284
4000
])
4285
4001
 
4286
 
AC_DEFUN([KDE_CHECK_THREADING],
 
4002
AC_DEFUN(KDE_CHECK_THREADING,
4287
4003
[
4288
4004
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4289
4005
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4297
4013
  else
4298
4014
    kde_check_threading_default=yes
4299
4015
  fi
4300
 
  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
 
4016
  AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
4301
4017
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4302
4018
  if test "x$kde_use_threading" = "xyes"; then
4303
4019
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4304
4020
  fi
4305
4021
])
4306
4022
 
4307
 
AC_DEFUN([KDE_TRY_LINK_PYTHON],
 
4023
AC_DEFUN(KDE_TRY_LINK_PYTHON,
4308
4024
[
4309
4025
if test "$kde_python_link_found" = no; then
4310
4026
 
4316
4032
 
4317
4033
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4318
4034
[
 
4035
AC_LANG_SAVE
 
4036
AC_LANG_C
4319
4037
kde_save_cflags="$CFLAGS"
4320
4038
CFLAGS="$CFLAGS $PYTHONINC"
4321
4039
kde_save_libs="$LIBS"
4348
4066
  AC_MSG_RESULT(no)
4349
4067
  $4
4350
4068
fi
 
4069
AC_LANG_RESTORE
4351
4070
 
4352
4071
fi
4353
4072
 
4354
4073
])
4355
4074
 
4356
 
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
 
4075
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
4357
4076
[
4358
4077
AC_MSG_CHECKING([for Python directory])
4359
4078
 
4367
4086
])
4368
4087
 
4369
4088
AC_ARG_WITH(pythondir,
4370
 
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
 
4089
[  --with-pythondir=pythondir   use python installed in pythondir ],
4371
4090
[
4372
4091
  ac_python_dir=$withval
4373
4092
], ac_python_dir=$kde_cv_pythondir
4376
4095
AC_MSG_RESULT($ac_python_dir)
4377
4096
])
4378
4097
 
4379
 
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
 
4098
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
4380
4099
[
4381
4100
AC_REQUIRE([KDE_CHECK_LIBDL])
4382
4101
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4402
4121
 
4403
4122
PYTHONINC=-I$python_incdir
4404
4123
 
4405
 
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4406
 
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4407
 
if test ! -r $python_libdir/libpython$version.so; then
4408
 
  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
 
4124
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
 
4125
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
 
4126
if test ! -r $python_libdir/libpython$version.a; then
 
4127
  AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
 
4128
  python_libdir=$python_libdir/python$version/config
4409
4129
  if test ! -r $python_libdir/libpython$version.a; then
4410
 
    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4411
 
    python_libdir=$python_libdir/python$version/config
4412
 
    if test ! -r $python_libdir/libpython$version.a; then
4413
 
      python_libdir=no
4414
 
    fi
 
4130
    python_libdir=no
4415
4131
  fi
4416
4132
fi
4417
4133
 
4421
4137
  LIBPYTHON=-lpython$version
4422
4138
fi
4423
4139
 
 
4140
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
4424
4141
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4425
4142
python_moddir=$python_moddir/python$version
4426
4143
if test ! -r $python_moddir/copy.py; then
4450
4167
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4451
4168
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4452
4169
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4453
 
  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4454
4170
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4455
4171
        [AC_MSG_WARN([it seems, Python depends on another library.
4456
 
    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
 
4172
    Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4457
4173
    and contact the authors to let them know about this problem])
4458
4174
        ])
4459
4175
 
4468
4184
])
4469
4185
 
4470
4186
 
4471
 
AC_DEFUN([KDE_CHECK_PYTHON],
4472
 
[
4473
 
  KDE_CHECK_PYTHON_INTERN("2.4",
4474
 
   [KDE_CHECK_PYTHON_INTERN("2.3", 
4475
 
     [KDE_CHECK_PYTHON_INTERN("2.2", 
4476
 
       [KDE_CHECK_PYTHON_INTERN("2.1", 
4477
 
         [KDE_CHECK_PYTHON_INTERN("2.0", 
4478
 
           [KDE_CHECK_PYTHON_INTERN($1, $2) ])
4479
 
         ])
4480
 
       ])
4481
 
     ])
4482
 
  ])
4483
 
])
4484
 
 
4485
 
AC_DEFUN([KDE_CHECK_STL],
 
4187
AC_DEFUN(KDE_CHECK_PYTHON,
 
4188
[
 
4189
  KDE_CHECK_PYTHON_INTERN("2.3", 
 
4190
    [KDE_CHECK_PYTHON_INTERN("2.2", 
 
4191
      [KDE_CHECK_PYTHON_INTERN("2.1", 
 
4192
        [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
 
4193
  ])])])
 
4194
])
 
4195
 
 
4196
AC_DEFUN(KDE_CHECK_STL_SGI,
 
4197
[
 
4198
    AC_MSG_CHECKING([if STL implementation is SGI like])
 
4199
    AC_CACHE_VAL(kde_cv_stl_type_sgi,
 
4200
    [
 
4201
      AC_TRY_COMPILE([
 
4202
#include <string>
 
4203
using namespace std;
 
4204
],[
 
4205
  string astring="Hallo Welt.";
 
4206
  astring.erase(0, 6); // now astring is "Welt"
 
4207
  return 0;
 
4208
], kde_cv_stl_type_sgi=yes,
 
4209
   kde_cv_stl_type_sgi=no)
 
4210
])
 
4211
 
 
4212
   AC_MSG_RESULT($kde_cv_stl_type_sgi)
 
4213
 
 
4214
   if test "$kde_cv_stl_type_sgi" = "yes"; then
 
4215
        AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
 
4216
   fi
 
4217
])
 
4218
 
 
4219
AC_DEFUN(KDE_CHECK_STL_HP,
 
4220
[
 
4221
    AC_MSG_CHECKING([if STL implementation is HP like])
 
4222
    AC_CACHE_VAL(kde_cv_stl_type_hp,
 
4223
    [
 
4224
      AC_TRY_COMPILE([
 
4225
#include <string>
 
4226
using namespace std;
 
4227
],[
 
4228
  string astring="Hello World";
 
4229
  astring.remove(0, 6); // now astring is "World"
 
4230
  return 0;
 
4231
], kde_cv_stl_type_hp=yes,
 
4232
   kde_cv_stl_type_hp=no)
 
4233
])
 
4234
   AC_MSG_RESULT($kde_cv_stl_type_hp)
 
4235
 
 
4236
   if test "$kde_cv_stl_type_hp" = "yes"; then
 
4237
        AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
 
4238
   fi
 
4239
])
 
4240
 
 
4241
AC_DEFUN(KDE_CHECK_STL,
4486
4242
[
4487
4243
    AC_LANG_SAVE
4488
4244
    AC_LANG_CPLUSPLUS
4489
4245
    ac_save_CXXFLAGS="$CXXFLAGS"
4490
4246
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4491
 
 
4492
 
    AC_MSG_CHECKING([if C++ programs can be compiled])
4493
 
    AC_CACHE_VAL(kde_cv_stl_works,
4494
 
    [
4495
 
      AC_TRY_COMPILE([
4496
 
#include <string>
4497
 
using namespace std;
4498
 
],[
4499
 
  string astring="Hallo Welt.";
4500
 
  astring.erase(0, 6); // now astring is "Welt"
4501
 
  return 0;
4502
 
], kde_cv_stl_works=yes,
4503
 
   kde_cv_stl_works=no)
4504
 
])
4505
 
 
4506
 
   AC_MSG_RESULT($kde_cv_stl_works)
4507
 
 
4508
 
   if test "$kde_cv_stl_works" = "yes"; then
4509
 
     # back compatible
4510
 
         AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4511
 
   else
4512
 
         AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4513
 
Check config.log for details - if you're using a Linux distribution you might miss
4514
 
a package named similar to libstdc++-dev.])
4515
 
   fi
4516
 
 
4517
 
   CXXFLAGS="$ac_save_CXXFLAGS"
4518
 
   AC_LANG_RESTORE
4519
 
])
4520
 
 
4521
 
AC_DEFUN([AC_FIND_QIMGIO],
 
4247
    KDE_CHECK_STL_SGI
 
4248
 
 
4249
    if test "$kde_cv_stl_type_sgi" = "no"; then
 
4250
       KDE_CHECK_STL_HP
 
4251
 
 
4252
       if test "$kde_cv_stl_type_hp" = "no"; then
 
4253
         AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
 
4254
       fi
 
4255
    fi
 
4256
 
 
4257
    CXXFLAGS="$ac_save_CXXFLAGS"
 
4258
    AC_LANG_RESTORE
 
4259
])
 
4260
 
 
4261
AC_DEFUN(AC_FIND_QIMGIO,
4522
4262
   [AC_REQUIRE([AC_FIND_JPEG])
4523
4263
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4524
4264
AC_MSG_CHECKING([for qimgio])
4557
4297
fi
4558
4298
])
4559
4299
 
4560
 
AC_DEFUN([AM_DISABLE_LIBRARIES],
 
4300
AC_DEFUN(KDE_CHECK_ANSI,
 
4301
[
 
4302
])
 
4303
 
 
4304
AC_DEFUN(KDE_CHECK_INSURE,
 
4305
[
 
4306
  AC_ARG_ENABLE(insure, [  --enable-insure             use insure++ for debugging [default=no]],
 
4307
  [
 
4308
  if test $enableval = "no"; dnl
 
4309
        then ac_use_insure="no"
 
4310
        else ac_use_insure="yes"
 
4311
   fi
 
4312
  ], [ac_use_insure="no"])
 
4313
 
 
4314
  AC_MSG_CHECKING(if we will use Insure++ to debug)
 
4315
  AC_MSG_RESULT($ac_use_insure)
 
4316
  if test "$ac_use_insure" = "yes"; dnl
 
4317
       then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
 
4318
   fi
 
4319
])
 
4320
 
 
4321
AC_DEFUN(AM_DISABLE_LIBRARIES,
4561
4322
[
4562
4323
    AC_PROVIDE([AM_ENABLE_STATIC])
4563
4324
    AC_PROVIDE([AM_ENABLE_SHARED])
4566
4327
])
4567
4328
 
4568
4329
 
4569
 
AC_DEFUN([AC_CHECK_UTMP_FILE],
 
4330
AC_DEFUN(AC_CHECK_UTMP_FILE,
4570
4331
[
4571
4332
    AC_MSG_CHECKING([for utmp file])
4572
4333
 
4599
4360
])
4600
4361
 
4601
4362
 
4602
 
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
 
4363
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
4603
4364
[
4604
4365
 
4605
4366
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4606
 
TOPSUBDIRS=""
4607
4367
 
4608
4368
if test ! -s $srcdir/subdirs; then
4609
4369
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
 
4370
  TOPSUBDIRS=""
4610
4371
  files=`cd $srcdir && ls -1`
4611
4372
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4612
4373
  for i in $dirs; do
4614
4375
  done
4615
4376
fi
4616
4377
 
4617
 
ac_topsubdirs=
4618
4378
if test -s $srcdir/inst-apps; then
4619
4379
  ac_topsubdirs="`cat $srcdir/inst-apps`"
4620
 
elif test -s $srcdir/subdirs; then
 
4380
else
4621
4381
  ac_topsubdirs="`cat $srcdir/subdirs`"
4622
4382
fi
4623
4383
 
4634
4394
    install_it="no"
4635
4395
  fi
4636
4396
  AC_MSG_RESULT($install_it)
4637
 
  vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
 
4397
  vari=`echo $i | sed -e 's,[[-+.]],_,g'`
4638
4398
  if test $install_it = "yes"; then
4639
4399
    TOPSUBDIRS="$TOPSUBDIRS $i"
4640
4400
    eval "$vari""_SUBDIR_included=yes"
4646
4406
AC_SUBST(TOPSUBDIRS)
4647
4407
])
4648
4408
 
4649
 
AC_DEFUN([KDE_CHECK_NAMESPACES],
 
4409
AC_DEFUN(KDE_CHECK_NAMESPACES,
4650
4410
[
4651
4411
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4652
4412
AC_LANG_SAVE
4672
4432
AC_LANG_RESTORE
4673
4433
])
4674
4434
 
 
4435
AC_DEFUN(KDE_CHECK_NEWLIBS,
 
4436
[
 
4437
 
 
4438
])
 
4439
 
4675
4440
dnl ------------------------------------------------------------------------
4676
4441
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4677
4442
dnl ------------------------------------------------------------------------
4678
4443
dnl
4679
 
AC_DEFUN([AC_CHECK_S_ISSOCK],
 
4444
AC_DEFUN(AC_CHECK_S_ISSOCK,
4680
4445
[
4681
4446
AC_MSG_CHECKING(for S_ISSOCK)
4682
4447
AC_CACHE_VAL(ac_cv_have_s_issock,
4683
4448
[
 
4449
AC_LANG_SAVE
 
4450
AC_LANG_C
4684
4451
AC_TRY_LINK(
4685
4452
[
4686
4453
#include <sys/stat.h>
4691
4458
],
4692
4459
ac_cv_have_s_issock=yes,
4693
4460
ac_cv_have_s_issock=no)
 
4461
AC_LANG_RESTORE
4694
4462
])
4695
4463
AC_MSG_RESULT($ac_cv_have_s_issock)
4696
4464
if test "$ac_cv_have_s_issock" = "yes"; then
4711
4479
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4712
4480
dnl ------------------------------------------------------------------------
4713
4481
dnl
4714
 
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
 
4482
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
4715
4483
[
4716
4484
AC_MSG_CHECKING(for MAXPATHLEN)
4717
4485
AC_CACHE_VAL(ac_cv_maxpathlen,
4718
4486
[
 
4487
AC_LANG_C
4719
4488
cat > conftest.$ac_ext <<EOF
4720
4489
#ifdef STDC_HEADERS
4721
4490
# include <stdlib.h>
4745
4514
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4746
4515
])
4747
4516
 
4748
 
AC_DEFUN([KDE_CHECK_HEADER],
4749
 
[
 
4517
dnl -------------------------------------------------------------------------
 
4518
dnl See if the compiler supports a template repository         bero@redhat.de
 
4519
dnl -------------------------------------------------------------------------
 
4520
AC_DEFUN(KDE_COMPILER_REPO,
 
4521
[
 
4522
  REPO=""
 
4523
  NOREPO=""
 
4524
 
 
4525
  KDE_CHECK_COMPILER_FLAG(frepo,
 
4526
   [
 
4527
     REPO="-frepo"
 
4528
     NOREPO="-fno-repo"
 
4529
   ])
 
4530
 
 
4531
  if test -z "$REPO"; then
 
4532
  KDE_CHECK_COMPILER_FLAG(instances=explicit,
 
4533
  [
 
4534
     REPO="-instances=explicit"
 
4535
     NOREPO="-instances=extern"
 
4536
  ])
 
4537
  fi
 
4538
 
 
4539
  if test -n "$REPO"; then
 
4540
     AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
 
4541
                [C++ compiler supports template repository])
 
4542
     $1
 
4543
  fi
 
4544
 
 
4545
  AC_SUBST(REPO)
 
4546
  AC_SUBST(NOREPO)
 
4547
])
 
4548
 
 
4549
AC_DEFUN(KDE_CHECK_HEADER,
 
4550
[
 
4551
   AC_LANG_SAVE
4750
4552
   kde_safe_cppflags=$CPPFLAGS
4751
4553
   CPPFLAGS="$CPPFLAGS $all_includes"
4752
 
   AC_LANG_SAVE
4753
4554
   AC_LANG_CPLUSPLUS
4754
 
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
 
4555
   AC_CHECK_HEADER($1, $2, $3, $4)
 
4556
   CPPFLAGS=$kde_safe_cppflags
4755
4557
   AC_LANG_RESTORE
4756
 
   CPPFLAGS=$kde_safe_cppflags
4757
4558
])
4758
4559
 
4759
 
AC_DEFUN([KDE_CHECK_HEADERS],
 
4560
AC_DEFUN(KDE_CHECK_HEADERS,
4760
4561
[
4761
4562
   AH_CHECK_HEADERS([$1])
4762
4563
   AC_LANG_SAVE
4768
4569
   AC_LANG_RESTORE
4769
4570
])
4770
4571
 
4771
 
AC_DEFUN([KDE_FAST_CONFIGURE],
 
4572
AC_DEFUN(KDE_FAST_CONFIGURE,
4772
4573
[
4773
4574
  dnl makes configure fast (needs perl)
4774
 
  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
 
4575
  AC_ARG_ENABLE(fast-perl, [  --disable-fast-perl     disable fast Makefile generation (needs perl)],
4775
4576
      with_fast_perl=$enableval, with_fast_perl=yes)
4776
4577
])
4777
4578
 
4778
 
AC_DEFUN([KDE_CONF_FILES],
 
4579
AC_DEFUN(KDE_CONF_FILES,
4779
4580
[
4780
4581
  val=
4781
4582
  if test -f $srcdir/configure.files ; then
4790
4591
  AC_SUBST(CONF_FILES)
4791
4592
])dnl
4792
4593
 
4793
 
dnl This sets the prefix, for arts and kdelibs
4794
 
dnl Do NOT use in any other module.
4795
 
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
4796
 
AC_DEFUN([KDE_SET_PREFIX_CORE],
 
4594
AC_DEFUN(KDE_SET_PREFIX,
4797
4595
[
4798
4596
  unset CDPATH
4799
4597
  dnl make $KDEDIR the default for the installation
4803
4601
    prefix=$ac_default_prefix
4804
4602
    ac_configure_args="$ac_configure_args --prefix=$prefix"
4805
4603
  fi
4806
 
  # And delete superfluous '/' to make compares easier
4807
 
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4808
 
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4809
 
 
4810
 
  kde_libs_prefix='$(prefix)'
4811
 
  kde_libs_htmldir='$(kde_htmldir)'
4812
 
  AC_SUBST(kde_libs_prefix)
4813
 
  AC_SUBST(kde_libs_htmldir)
4814
 
  KDE_FAST_CONFIGURE
4815
 
  KDE_CONF_FILES
4816
 
])
4817
 
 
4818
 
 
4819
 
AC_DEFUN([KDE_SET_PREFIX],
4820
 
[
4821
 
  unset CDPATH
4822
 
  dnl We can't give real code to that macro, only a value.
4823
 
  dnl It only matters for --help, since we set the prefix in this function anyway.
4824
 
  AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
4825
 
 
4826
 
  KDE_SET_DEFAULT_BINDIRS
4827
 
  if test "x$prefix" = "xNONE"; then
4828
 
    dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
4829
 
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4830
 
  else
4831
 
    dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
4832
 
    kde_save_PATH="$PATH"
4833
 
    PATH="$exec_prefix/bin:$prefix/bin:$PATH"
4834
 
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4835
 
    PATH="$kde_save_PATH"
4836
 
  fi
4837
 
 
4838
 
  kde_libs_prefix=`$KDECONFIG --prefix`
4839
 
  if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
4840
 
       AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
4841
 
                    This means it has been moved since you installed it.
4842
 
                    This won't work. Please recompile kdelibs for the new prefix.
4843
 
                    ])
4844
 
  fi
4845
 
  kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
4846
 
  kde_libs_suffix=`$KDECONFIG --libsuffix`
4847
 
 
4848
 
  AC_MSG_CHECKING([where to install])
4849
 
  if test "x$prefix" = "xNONE"; then
4850
 
    prefix=$kde_libs_prefix
4851
 
    AC_MSG_RESULT([$prefix (as returned by kde-config)])
4852
 
  else
4853
 
    dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
4854
 
    given_prefix=$prefix
4855
 
    AC_MSG_RESULT([$prefix (as requested)])
4856
 
  fi
4857
 
 
4858
 
  # And delete superfluous '/' to make compares easier
4859
 
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4860
 
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4861
 
  given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4862
 
 
4863
 
  AC_SUBST(KDECONFIG)
4864
 
  AC_SUBST(kde_libs_prefix)
4865
 
  AC_SUBST(kde_libs_htmldir)
4866
 
 
 
4604
  # And delete superflous '/' to make compares easier
 
4605
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4606
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4867
4607
  KDE_FAST_CONFIGURE
4868
4608
  KDE_CONF_FILES
4869
4609
])
4934
4674
  fi
4935
4675
])dnl
4936
4676
 
4937
 
AC_DEFUN([KDE_LANG_CPLUSPLUS],
 
4677
AC_DEFUN(KDE_LANG_CPLUSPLUS,
4938
4678
[AC_LANG_CPLUSPLUS
4939
4679
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4940
4680
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4945
4685
KDE_LANG_CPLUSPLUS
4946
4686
])
4947
4687
 
4948
 
AC_DEFUN([KDE_CHECK_LONG_LONG],
 
4688
AC_DEFUN(KDE_CHECK_LONG_LONG,
4949
4689
[
4950
4690
AC_MSG_CHECKING(for long long)
4951
4691
AC_CACHE_VAL(kde_cv_c_long_long,
4965
4705
fi
4966
4706
])
4967
4707
 
4968
 
AC_DEFUN([KDE_CHECK_LIB],
 
4708
AC_DEFUN(KDE_CHECK_LIB,
4969
4709
[
4970
4710
     kde_save_LDFLAGS="$LDFLAGS"
4971
4711
     dnl AC_CHECK_LIB modifies LIBS, so save it here
4981
4721
     LIBS="$kde_save_LIBS"
4982
4722
])
4983
4723
 
4984
 
AC_DEFUN([KDE_JAVA_PREFIX],
 
4724
AC_DEFUN(KDE_JAVA_PREFIX,
4985
4725
[
4986
4726
        dir=`dirname "$1"`
4987
4727
        base=`basename "$1"`
5004
4744
])
5005
4745
 
5006
4746
dnl KDE_CHEC_JAVA_DIR(onlyjre)
5007
 
AC_DEFUN([KDE_CHECK_JAVA_DIR],
 
4747
AC_DEFUN(KDE_CHECK_JAVA_DIR,
5008
4748
[
5009
4749
 
5010
4750
AC_ARG_WITH(java,
5011
 
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
 
4751
[  --with-java=javadir     use java installed in javadir, --without-java disables ],
5012
4752
[  ac_java_dir=$withval
5013
4753
], ac_java_dir=""
5014
4754
)
5020
4760
   kde_java_bindir=no
5021
4761
   kde_java_includedir=no
5022
4762
   kde_java_libjvmdir=no
5023
 
   kde_java_libgcjdir=no
5024
4763
   kde_java_libhpidir=no
5025
4764
else
5026
4765
  if test "x$ac_java_dir" = "x"; then
5027
4766
     
5028
4767
     
5029
 
      dnl No option set -> collect list of candidate paths
5030
 
      if test -n "$JAVA_HOME"; then
5031
 
        KDE_JAVA_PREFIX($JAVA_HOME)
5032
 
      fi
 
4768
      dnl No option set -> look in $PATH
5033
4769
      KDE_JAVA_PREFIX(/usr/j2se)
5034
 
      KDE_JAVA_PREFIX(/usr/lib/j2se)
5035
4770
      KDE_JAVA_PREFIX(/usr/j*dk*)
5036
4771
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
5037
4772
      KDE_JAVA_PREFIX(/opt/j*sdk*)
5044
4779
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
5045
4780
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
5046
4781
      KDE_JAVA_PREFIX(/opt/java*)
5047
 
 
 
4782
    
5048
4783
      kde_cv_path="NONE"
5049
4784
      kde_save_IFS=$IFS
5050
4785
      IFS=':'
5051
4786
      for dir in $PATH; do
5052
 
          if test -d "$dir"; then
5053
 
              javadirs="$javadirs $dir"
5054
 
          fi
 
4787
          javadirs="$javadirs $dir"
5055
4788
      done
5056
4789
      IFS=$kde_save_IFS
5057
4790
      jredirs=
5058
4791
 
5059
 
      dnl Now javadirs contains a list of paths that exist, all ending with bin/
5060
4792
      for dir in $javadirs; do
5061
 
          dnl Check for the java executable
5062
 
          if test -x "$dir/java"; then
5063
 
              dnl And also check for a libjvm.so somewhere under there
5064
 
              dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
5065
 
              if test "$dir" != "/usr/bin"; then
5066
 
                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5067
 
                  if test ! -f $libjvmdir/libjvm.so; then continue; fi
5068
 
                  jredirs="$jredirs $dir"
5069
 
              fi
 
4793
          if test ! -d $dir; then break; fi
 
4794
          if test -x "$dir/java"; then
 
4795
                libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
4796
                if test ! -f $libjvmdir/libjvm.so; then continue; fi
 
4797
                jredirs="$jredirs $dir"
5070
4798
          fi
5071
4799
      done
5072
4800
 
5073
 
      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
5074
4801
      JAVAC=
5075
4802
      JAVA=
5076
4803
      kde_java_bindir=no
5105
4832
 
5106
4833
  dnl Look for libjvm.so
5107
4834
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5108
 
  dnl Look for libgcj.so
5109
 
  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5110
4835
  dnl Look for libhpi.so and avoid green threads
5111
4836
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5112
4837
 
5128
4853
 
5129
4854
    jni_includes="-I$kde_java_includedir"
5130
4855
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5131
 
    dnl and under linux here.. 
5132
 
    
5133
 
    dnl not needed for gcj
5134
 
 
5135
 
    if test "x$kde_java_libgcjdir" = "x"; then 
5136
 
      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5137
 
      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5138
 
      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5139
 
    fi
 
4856
    dnl and under linux here..
 
4857
    test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
 
4858
    test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
 
4859
    test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5140
4860
 
5141
4861
  else
5142
4862
    JAVAC=
5143
4863
    jni_includes=
5144
4864
  fi
5145
4865
 
5146
 
  if test "x$kde_java_libgcjdir" = "x"; then 
5147
 
     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5148
 
        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5149
 
     fi 
5150
 
  else
5151
 
     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5152
 
        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5153
 
     fi 
5154
 
  fi
 
4866
  if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
 
4867
     AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
 
4868
  fi 
5155
4869
 
5156
4870
  if test ! -x "$kde_java_bindir/java"; then
5157
4871
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5158
4872
  fi
5159
4873
 
5160
 
  dnl not needed for gcj compile
5161
 
 
5162
 
  if test "x$kde_java_libgcjdir" = "x"; then 
5163
 
      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5164
 
        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5165
 
      fi
 
4874
  if test ! -r "$kde_java_libhpidir/libhpi.so"; then
 
4875
    AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5166
4876
  fi
5167
4877
 
5168
4878
  if test -n "$jni_includes"; then
5201
4911
    JAVAH=$kde_java_bindir/javah
5202
4912
    JAR=$kde_java_bindir/jar
5203
4913
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5204
 
    if test "x$kde_java_libgcjdir" = "x"; then 
5205
 
      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5206
 
    else
5207
 
      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5208
 
    fi
 
4914
    JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5209
4915
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
5210
4916
 
5211
4917
  else
5212
4918
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5213
4919
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
5214
4920
  fi
5215
 
elif test -d "/Library/Java/Home"; then
5216
 
  kde_java_bindir="/Library/Java/Home/bin"
5217
 
  jni_includes="-I/Library/Java/Home/include"
5218
 
 
5219
 
  JAVAC=$kde_java_bindir/javac
5220
 
  JAVAH=$kde_java_bindir/javah
5221
 
  JAR=$kde_java_bindir/jar
5222
 
  JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
5223
 
 
5224
 
  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5225
 
  AC_MSG_RESULT([Apple Java Framework])
5226
 
else
 
4921
else # no
5227
4922
  AC_MSG_RESULT([none found])
5228
4923
fi
5229
4924
 
5248
4943
m4_define([mm_car2], [[$@]])
5249
4944
m4_define([_mm_foreach],
5250
4945
[m4_if(m4_quote($2), [], [],
5251
 
       [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5252
 
                                                   mm_car2(m4_shift($2)),
5253
 
                                                   [$3])])])
 
4946
       [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
 
4947
                                                     mm_car2(m4_shift($2)),
 
4948
                                                     [$3])])])
5254
4949
m4_define([AC_FOREACH],
5255
4950
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5256
4951
 
5257
 
AC_DEFUN([KDE_NEED_FLEX],
 
4952
AC_DEFUN(KDE_NEED_FLEX,
5258
4953
[
5259
4954
kde_libs_safe=$LIBS
5260
4955
LIBS="$LIBS $USER_LDFLAGS"
5266
4961
AC_SUBST(LEXLIB)
5267
4962
])
5268
4963
 
5269
 
AC_DEFUN([AC_PATH_QTOPIA],
 
4964
AC_DEFUN(AC_PATH_QTOPIA,
5270
4965
[
5271
4966
  dnl TODO: use AC_CACHE_VAL
5272
4967
 
5295
4990
  ac_qtopia_incdir=NO
5296
4991
 
5297
4992
  AC_ARG_WITH(qtopia-dir,
5298
 
              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
 
4993
              [  --with-qtopia-dir=DIR   where the root of Qtopia is installed ],
5299
4994
              [  ac_qtopia_incdir="$withval"/include] ) 
5300
4995
  
5301
4996
  qtopia_incdirs=""
5370
5065
])
5371
5066
 
5372
5067
 
5373
 
AC_DEFUN([KDE_INIT_DOXYGEN],
 
5068
AC_DEFUN(KDE_INIT_DOXYGEN,
5374
5069
[
5375
5070
AC_MSG_CHECKING([for Qt docs])
5376
5071
kde_qtdir=
5378
5073
  kde_qtdir="$with_qt_dir"
5379
5074
fi
5380
5075
 
5381
 
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
 
5076
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html ], QTDOCDIR)
5382
5077
AC_MSG_RESULT($QTDOCDIR)
5383
5078
 
5384
5079
AC_SUBST(QTDOCDIR)
5407
5102
])
5408
5103
 
5409
5104
 
5410
 
AC_DEFUN([AC_FIND_BZIP2],
 
5105
AC_DEFUN(AC_FIND_BZIP2,
5411
5106
[
5412
5107
AC_MSG_CHECKING([for bzDecompress in libbz2])
5413
5108
AC_CACHE_VAL(ac_cv_lib_bzip2,
5414
5109
[
5415
 
AC_LANG_SAVE
5416
 
AC_LANG_CPLUSPLUS
 
5110
AC_LANG_C
5417
5111
kde_save_LIBS="$LIBS"
5418
5112
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5419
 
kde_save_CXXFLAGS="$CXXFLAGS"
5420
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
5113
kde_save_CFLAGS="$CFLAGS"
 
5114
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
5421
5115
AC_TRY_LINK(dnl
5422
5116
[
5423
5117
#define BZ_NO_STDIO
5427
5121
            eval "ac_cv_lib_bzip2='-lbz2'",
5428
5122
            eval "ac_cv_lib_bzip2=no")
5429
5123
LIBS="$kde_save_LIBS"
5430
 
CXXFLAGS="$kde_save_CXXFLAGS"
5431
 
AC_LANG_RESTORE
 
5124
CFLAGS="$kde_save_CFLAGS"
5432
5125
])dnl
5433
5126
AC_MSG_RESULT($ac_cv_lib_bzip2)
5434
5127
 
5452
5145
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5453
5146
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5454
5147
   [
5455
 
   AC_LANG_SAVE
5456
5148
   AC_LANG_CPLUSPLUS
5457
5149
   kde_save_LIBS="$LIBS"
5458
5150
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5469
5161
               eval "ac_cv_lib_bzip2_prefix=no")
5470
5162
   LIBS="$kde_save_LIBS"
5471
5163
   CXXFLAGS="$kde_save_CXXFLAGS"
5472
 
   AC_LANG_RESTORE
5473
5164
   ])dnl
5474
5165
 
5475
5166
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5476
5167
   
 
5168
 
 
5169
 
5477
5170
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5478
5171
     BZIP2DIR=bzip2
5479
5172
    
5494
5187
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5495
5188
dnl ------------------------------------------------------------------------
5496
5189
dnl
5497
 
AC_DEFUN([KDE_CHECK_SSL],
 
5190
AC_DEFUN(KDE_CHECK_SSL,
5498
5191
[
5499
5192
LIBSSL="-lssl -lcrypto"
5500
5193
AC_REQUIRE([KDE_CHECK_LIB64])
5503
5196
ssl_libraries=""
5504
5197
ssl_includes=""
5505
5198
AC_ARG_WITH(ssl-dir,
5506
 
    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
 
5199
    [  --with-ssl-dir=DIR      where the root of OpenSSL is installed],
5507
5200
    [  ac_ssl_includes="$withval"/include
5508
5201
       ac_ssl_libraries="$withval"/lib$kdelibsuff
5509
5202
    ])
5510
5203
 
5511
5204
want_ssl=yes
5512
5205
AC_ARG_WITH(ssl,
5513
 
    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
 
5206
    [  --without-ssl           disable SSL checks],
5514
5207
    [want_ssl=$withval])
5515
5208
 
5516
5209
if test $want_ssl = yes; then
5539
5232
 
5540
5233
  ac_ssl_libraries="$ssl_libdir"
5541
5234
 
 
5235
  AC_LANG_SAVE
 
5236
  AC_LANG_C
 
5237
 
 
5238
  ac_cflags_safe="$CFLAGS"
5542
5239
  ac_ldflags_safe="$LDFLAGS"
5543
5240
  ac_libs_safe="$LIBS"
5544
5241
 
 
5242
  CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
5545
5243
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5546
5244
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5547
5245
 
5551
5249
  ac_ssl_rsaref="no"
5552
5250
  )
5553
5251
 
 
5252
  CFLAGS="$ac_cflags_safe"
5554
5253
  LDFLAGS="$ac_ldflags_safe"
5555
5254
  LIBS="$ac_libs_safe"
5556
5255
 
 
5256
  AC_LANG_RESTORE
 
5257
 
5557
5258
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5558
5259
    have_ssl=no
5559
5260
  else
5581
5282
  dnl Check for SSL version
5582
5283
  AC_CACHE_VAL(ac_cv_ssl_version,
5583
5284
  [
 
5285
    AC_LANG_SAVE
 
5286
    AC_LANG_C 
5584
5287
 
5585
5288
    cat >conftest.$ac_ext <<EOF
5586
5289
#include <openssl/opensslv.h>
5599
5302
    }
5600
5303
EOF
5601
5304
 
5602
 
    ac_save_CPPFLAGS=$CPPFLAGS
5603
 
    if test "$ac_ssl_includes" != "/usr/include"; then
5604
 
        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5605
 
    fi
5606
 
 
5607
 
    if AC_TRY_EVAL(ac_link); then 
 
5305
    ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
 
5306
    if AC_TRY_EVAL(ac_compile); then 
5608
5307
 
5609
5308
      if eval `./conftest 2>&5`; then
5610
5309
        if test $ssl_version = error; then
5627
5326
      Check config.log, and if you can't figure it out, send a mail to 
5628
5327
      David Faure <faure@kde.org>, attaching your config.log])
5629
5328
    fi 
5630
 
    CPPFLAGS=$ac_save_CPPFLAGS
 
5329
 
 
5330
    AC_LANG_RESTORE
5631
5331
 
5632
5332
  ])
5633
5333
 
5655
5355
  fi
5656
5356
fi
5657
5357
 
5658
 
SSL_INCLUDES=
5659
 
 
5660
 
if test "$ssl_includes" = "/usr/include"; then
5661
 
  if test -f /usr/kerberos/include/krb5.h; then
5662
 
        SSL_INCLUDES="-I/usr/kerberos/include"
5663
 
  fi
5664
 
elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5665
 
  SSL_INCLUDES="-I$ssl_includes"
 
5358
if test "$ssl_includes" = "/usr/include" || test  "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
 
5359
 SSL_INCLUDES="";
 
5360
else
 
5361
 SSL_INCLUDES="-I$ssl_includes"
5666
5362
fi
5667
5363
 
5668
 
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
 
5364
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
5669
5365
 SSL_LDFLAGS=""
5670
5366
else
5671
5367
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5676
5372
AC_SUBST(LIBSSL)
5677
5373
])
5678
5374
 
5679
 
AC_DEFUN([KDE_CHECK_STRLCPY],
 
5375
AC_DEFUN(KDE_CHECK_STRLCPY,
5680
5376
[
5681
 
  AC_REQUIRE([AC_CHECK_STRLCAT])
5682
 
  AC_REQUIRE([AC_CHECK_STRLCPY])
 
5377
  AC_CHECK_STRLCPY
 
5378
  AC_CHECK_STRLCAT
5683
5379
  AC_CHECK_SIZEOF(size_t)
5684
5380
  AC_CHECK_SIZEOF(unsigned long)
5685
5381
 
5686
 
  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
 
5382
  AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)])
5687
5383
  AC_TRY_COMPILE(,[
5688
5384
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5689
5385
       choke me
5690
5386
    #endif
5691
 
    ],AC_MSG_RESULT([yes]),[
5692
 
      AC_MSG_RESULT(no)
 
5387
    ],[AC_MSG_RESULT([yes])],[
 
5388
      AC_MSG_RESULT([no])
5693
5389
      AC_MSG_ERROR([
5694
 
       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
 
5390
       Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long)
5695
5391
       does not apply. Please mail kde-devel@kde.org with a description of your system!
5696
5392
      ])
5697
5393
  ])
5698
5394
])
5699
5395
 
5700
 
AC_DEFUN([KDE_CHECK_BINUTILS],
5701
 
[
5702
 
  AC_MSG_CHECKING([if ld supports unversioned version maps])
5703
 
 
5704
 
  kde_save_LDFLAGS="$LDFLAGS"
5705
 
  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5706
 
  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5707
 
  AC_TRY_LINK([int foo;],
5708
 
[
5709
 
#ifdef __INTEL_COMPILER
5710
 
icc apparently does not support libtools version-info and version-script
5711
 
at the same time. Dunno where the bug is, but until somebody figured out,
5712
 
better disable the optional version scripts.
5713
 
#endif
5714
 
 
5715
 
  foo = 42;
5716
 
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5717
 
  LDFLAGS="$kde_save_LDFLAGS"
5718
 
  rm -f conftest.map
5719
 
  AM_CONDITIONAL(include_VERSION_SCRIPT, 
5720
 
    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5721
 
 
5722
 
  AC_MSG_RESULT($kde_supports_versionmaps)
5723
 
])
5724
 
 
5725
 
AC_DEFUN([AM_PROG_OBJC],[
5726
 
AC_CHECK_PROGS(OBJC, gcc, gcc)
5727
 
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5728
 
if test "x${OBJCFLAGS-unset}" = xunset; then
5729
 
   OBJCFLAGS="-g -O2"
5730
 
fi
5731
 
AC_SUBST(OBJCFLAGS)
5732
 
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5733
 
])
5734
 
 
5735
 
AC_DEFUN([KDE_CHECK_PERL],
5736
 
[
5737
 
        KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5738
 
                    AC_MSG_ERROR([No Perl found in your $PATH.
5739
 
We need perl to generate some code.])
5740
 
        ])
5741
 
    AC_SUBST(PERL)
5742
 
])
5743
 
 
5744
 
AC_DEFUN([KDE_CHECK_LARGEFILE],
5745
 
[
5746
 
AC_SYS_LARGEFILE
5747
 
if test "$ac_cv_sys_file_offset_bits" != no; then
5748
 
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5749
 
fi
5750
 
 
5751
 
if test "x$ac_cv_sys_large_files" != "xno"; then
5752
 
  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5753
 
fi
5754
 
 
5755
 
])
5756
 
 
5757
 
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
5758
 
dnl which allows to search for libs that get installed into the KDE prefix.
5759
 
dnl
5760
 
dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
5761
 
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
5762
 
dnl also defines KSTUFF_PKG_ERRORS on error
5763
 
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5764
 
 
5765
 
   PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5766
 
   if test "$prefix" != "$kde_libs_prefix"; then
5767
 
       PKG_CONFIG_PATH="$kde_libs_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5768
 
   fi
5769
 
   export PKG_CONFIG_PATH
5770
 
   PKG_CHECK_MODULES($1,$2,$3,$4)
5771
 
])
5772
 
 
5773
 
## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
 
5396
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5774
5397
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
5775
5398
## Free Software Foundation, Inc.
5776
5399
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5794
5417
## configuration script generated by Autoconf, you may include it under
5795
5418
## the same distribution terms that you use for the rest of that program.
5796
5419
 
5797
 
# serial 46 AC_PROG_LIBTOOL
 
5420
# serial 47 AC_PROG_LIBTOOL
 
5421
 
 
5422
# AC_PROG_LIBTOOL
 
5423
# ---------------
5798
5424
AC_DEFUN([AC_PROG_LIBTOOL],
5799
5425
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5800
5426
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5802
5428
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
5803
5429
    [AC_LIBTOOL_CXX],
5804
5430
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5805
 
])])
 
5431
  ])])
5806
5432
 
5807
5433
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5808
5434
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5810
5436
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5811
5437
    [AC_LIBTOOL_GCJ],
5812
5438
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5813
 
        [AC_LIBTOOL_GCJ],
5814
 
        [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5815
 
          [AC_LIBTOOL_GCJ],
5816
 
        [ifdef([AC_PROG_GCJ],
5817
 
               [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
5818
 
])])
5819
 
         ifdef([A][M_PROG_GCJ],
5820
 
               [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
5821
 
])])
5822
 
         ifdef([LT_AC_PROG_GCJ],
5823
 
               [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
5824
 
])])])])])])
5825
 
 
 
5439
      [AC_LIBTOOL_GCJ],
 
5440
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
5441
        [AC_LIBTOOL_GCJ],
 
5442
      [ifdef([AC_PROG_GCJ],
 
5443
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
5444
       ifdef([A][M_PROG_GCJ],
 
5445
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
5446
       ifdef([LT_AC_PROG_GCJ],
 
5447
             [define([LT_AC_PROG_GCJ],
 
5448
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
5449
])])# AC_PROG_LIBTOOL
 
5450
 
 
5451
 
 
5452
# _AC_PROG_LIBTOOL
 
5453
# ----------------
5826
5454
AC_DEFUN([_AC_PROG_LIBTOOL],
5827
5455
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5828
5456
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5829
5457
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5830
5458
 
5831
 
# Save cache, so that ltconfig can load it
5832
 
AC_CACHE_SAVE
5833
 
 
5834
 
# Actually configure libtool.  ac_aux_dir is where install-sh is found.
5835
 
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
5836
 
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
5837
 
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
5838
 
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
5839
 
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
5840
 
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
5841
 
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
5842
 
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
5843
 
|| AC_MSG_ERROR([libtool configure failed])
5844
 
 
5845
 
# Reload cache, that may have been modified by ltconfig
5846
 
AC_CACHE_LOAD
5847
 
 
5848
5459
# This can be used to rebuild libtool when needed
5849
 
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
 
5460
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5850
5461
 
5851
5462
# Always use our own libtool.
5852
 
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
5463
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5853
5464
AC_SUBST(LIBTOOL)dnl
5854
5465
 
5855
 
# Redirect the config.log output again, so that the ltconfig log is not
5856
 
# clobbered by the next message.
5857
 
exec 5>>./config.log
5858
 
])
5859
 
 
 
5466
# Prevent multiple expansion
 
5467
define([AC_PROG_LIBTOOL], [])
 
5468
])# _AC_PROG_LIBTOOL
 
5469
 
 
5470
 
 
5471
# AC_LIBTOOL_SETUP
 
5472
# ----------------
5860
5473
AC_DEFUN([AC_LIBTOOL_SETUP],
5861
 
[AC_PREREQ(2.13)dnl
 
5474
[AC_PREREQ(2.50)dnl
5862
5475
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5863
5476
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5864
5477
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5868
5481
AC_REQUIRE([AC_PROG_LD])dnl
5869
5482
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5870
5483
AC_REQUIRE([AC_PROG_NM])dnl
 
5484
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
5485
 
5871
5486
AC_REQUIRE([AC_PROG_LN_S])dnl
5872
5487
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5873
5488
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5875
5490
AC_REQUIRE([AC_EXEEXT])dnl
5876
5491
dnl
5877
5492
 
 
5493
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
5494
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
5495
AC_LIBTOOL_OBJDIR
 
5496
 
 
5497
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
5498
_LT_AC_PROG_ECHO_BACKSLASH
 
5499
 
 
5500
case $host_os in
 
5501
aix3*)
 
5502
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
5503
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
5504
  # vanish in a puff of smoke.
 
5505
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
5506
    COLLECT_NAMES=
 
5507
    export COLLECT_NAMES
 
5508
  fi
 
5509
  ;;
 
5510
esac
 
5511
 
 
5512
# Sed substitution that helps us do robust quoting.  It backslashifies
 
5513
# metacharacters that are still active within double-quoted strings.
 
5514
Xsed='sed -e s/^X//'
 
5515
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
5516
 
 
5517
# Same as above, but do not quote variable references.
 
5518
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
5519
 
 
5520
# Sed substitution to delay expansion of an escaped shell variable in a
 
5521
# double_quote_subst'ed string.
 
5522
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
5523
 
 
5524
# Sed substitution to avoid accidental globbing in evaled expressions
 
5525
no_glob_subst='s/\*/\\\*/g'
 
5526
 
 
5527
# Constants:
 
5528
rm="rm -f"
 
5529
 
 
5530
# Global variables:
 
5531
default_ofile=libtool
 
5532
can_build_shared=yes
 
5533
 
 
5534
# All known linkers require a `.a' archive for static linking (except M$VC,
 
5535
# which needs '.lib').
 
5536
libext=a
 
5537
ltmain="$ac_aux_dir/ltmain.sh"
 
5538
ofile="$default_ofile"
 
5539
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
5540
 
 
5541
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
5542
AC_CHECK_TOOL(STRIP, strip, :)
 
5543
 
 
5544
old_CC="$CC"
 
5545
old_CFLAGS="$CFLAGS"
 
5546
 
 
5547
# Set sane defaults for various variables
 
5548
test -z "$AR" && AR=ar
 
5549
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
5550
test -z "$AS" && AS=as
 
5551
test -z "$CC" && CC=cc
 
5552
test -z "$LTCC" && LTCC=$CC
 
5553
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
5554
test -z "$LD" && LD=ld
 
5555
test -z "$LN_S" && LN_S="ln -s"
 
5556
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
5557
test -z "$NM" && NM=nm
 
5558
test -z "$SED" && SED=sed
 
5559
test -z "$OBJDUMP" && OBJDUMP=objdump
 
5560
test -z "$RANLIB" && RANLIB=:
 
5561
test -z "$STRIP" && STRIP=:
 
5562
test -z "$ac_objext" && ac_objext=o
 
5563
 
 
5564
# Determine commands to create old-style static archives.
 
5565
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
5566
old_postinstall_cmds='chmod 644 $oldlib'
 
5567
old_postuninstall_cmds=
 
5568
 
 
5569
if test -n "$RANLIB"; then
 
5570
  case $host_os in
 
5571
  openbsd*)
 
5572
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
5573
    ;;
 
5574
  *)
 
5575
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
5576
    ;;
 
5577
  esac
 
5578
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
5579
fi
 
5580
 
5878
5581
# Only perform the check for file, if the check method requires it
5879
5582
case $deplibs_check_method in
5880
5583
file_magic*)
5884
5587
  ;;
5885
5588
esac
5886
5589
 
5887
 
AC_CHECK_TOOL(RANLIB, ranlib, :)
5888
 
AC_CHECK_TOOL(STRIP, strip, :)
5889
 
 
5890
 
# Check for any special flags to pass to ltconfig.
5891
 
libtool_flags="--cache-file=$cache_file"
5892
 
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
5893
 
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
5894
 
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
5895
 
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
5896
 
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
5897
 
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
5898
 
[libtool_flags="$libtool_flags --enable-dlopen"])
 
5590
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5899
5591
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5900
 
[libtool_flags="$libtool_flags --enable-win32-dll"])
5901
 
AC_ARG_ENABLE(libtool-lock,
5902
 
  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
5903
 
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
5904
 
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
5905
 
 
5906
 
AC_ARG_WITH(pic,
5907
 
  [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
5908
 
     pic_mode="$withval", pic_mode=default)
5909
 
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
5910
 
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
 
5592
enable_win32_dll=yes, enable_win32_dll=no)
 
5593
 
 
5594
AC_ARG_ENABLE([libtool-lock],
 
5595
    [AC_HELP_STRING([--disable-libtool-lock],
 
5596
        [avoid locking (might break parallel builds)])])
 
5597
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
5598
 
 
5599
AC_ARG_WITH([pic],
 
5600
    [AC_HELP_STRING([--with-pic],
 
5601
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
5602
    [pic_mode="$withval"],
 
5603
    [pic_mode=default])
 
5604
test -z "$pic_mode" && pic_mode=default
 
5605
 
 
5606
# Use C for the default configuration in the libtool script
 
5607
tagname=
 
5608
AC_LIBTOOL_LANG_C_CONFIG
 
5609
_LT_AC_TAGCONFIG
 
5610
])# AC_LIBTOOL_SETUP
 
5611
 
 
5612
 
 
5613
# _LT_AC_SYS_COMPILER
 
5614
# -------------------
 
5615
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
5616
[AC_REQUIRE([AC_PROG_CC])dnl
 
5617
 
 
5618
# If no C compiler was specified, use CC.
 
5619
LTCC=${LTCC-"$CC"}
 
5620
 
 
5621
# Allow CC to be a program name with arguments.
 
5622
set dummy $CC
 
5623
compiler="[$]2"
 
5624
])# _LT_AC_SYS_COMPILER
 
5625
 
 
5626
 
 
5627
# _LT_AC_SYS_LIBPATH_AIX
 
5628
# ----------------------
 
5629
# Links a minimal program and checks the executable
 
5630
# for the system default hardcoded library path. In most cases,
 
5631
# this is /usr/lib:/lib, but when the MPI compilers are used
 
5632
# the location of the communication and MPI libs are included too.
 
5633
# If we don't find anything, use the default library path according
 
5634
# to the aix ld manual.
 
5635
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
5636
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
5637
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
5638
}'`
 
5639
# Check for a 64-bit object if we didn't find anything.
 
5640
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
5641
}'`; fi],[])
 
5642
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
5643
])# _LT_AC_SYS_LIBPATH_AIX
 
5644
 
 
5645
 
 
5646
# _LT_AC_PROG_ECHO_BACKSLASH
 
5647
# --------------------------
 
5648
# Add some code to the start of the generated configure script which
 
5649
# will find an echo command which doesn't interpret backslashes.
 
5650
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
 
5651
[ifdef([AC_DIVERSION_NOTICE],
 
5652
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
5653
         [AC_DIVERT_PUSH(NOTICE)])
 
5654
 
 
5655
# Check that we are running under the correct shell.
 
5656
SHELL=${CONFIG_SHELL-/bin/sh}
 
5657
 
 
5658
case X$ECHO in
 
5659
X*--fallback-echo)
 
5660
  # Remove one level of quotation (which was required for Make).
 
5661
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
5662
  ;;
 
5663
esac
 
5664
 
 
5665
echo=${ECHO-echo}
 
5666
if test "X[$]1" = X--no-reexec; then
 
5667
  # Discard the --no-reexec flag, and continue.
 
5668
  shift
 
5669
elif test "X[$]1" = X--fallback-echo; then
 
5670
  # Avoid inline document here, it may be left over
 
5671
  :
 
5672
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
 
5673
  # Yippee, $echo works!
 
5674
  :
 
5675
else
 
5676
  # Restart under the correct shell.
 
5677
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
5678
fi
 
5679
 
 
5680
if test "X[$]1" = X--fallback-echo; then
 
5681
  # used as fallback echo
 
5682
  shift
 
5683
  cat <<EOF
 
5684
[$]*
 
5685
EOF
 
5686
  exit 0
 
5687
fi
 
5688
 
 
5689
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
5690
# if CDPATH is set.
 
5691
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
5692
 
 
5693
if test -z "$ECHO"; then
 
5694
if test "X${echo_test_string+set}" != Xset; then
 
5695
# find a string as large as possible, as long as the shell can cope with it
 
5696
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
5697
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
5698
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
 
5699
       echo_test_string="`eval $cmd`" &&
 
5700
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
 
5701
    then
 
5702
      break
 
5703
    fi
 
5704
  done
 
5705
fi
 
5706
 
 
5707
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
5708
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
5709
   test "X$echo_testing_string" = "X$echo_test_string"; then
 
5710
  :
 
5711
else
 
5712
  # The Solaris, AIX, and Digital Unix default echo programs unquote
 
5713
  # backslashes.  This makes it impossible to quote backslashes using
 
5714
  #   echo "$something" | sed 's/\\/\\\\/g'
 
5715
  #
 
5716
  # So, first we look for a working echo in the user's PATH.
 
5717
 
 
5718
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
5719
  for dir in $PATH /usr/ucb; do
 
5720
    IFS="$lt_save_ifs"
 
5721
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
5722
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
5723
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
5724
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
5725
      echo="$dir/echo"
 
5726
      break
 
5727
    fi
 
5728
  done
 
5729
  IFS="$lt_save_ifs"
 
5730
 
 
5731
  if test "X$echo" = Xecho; then
 
5732
    # We didn't find a better echo, so look for alternatives.
 
5733
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
 
5734
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
 
5735
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
5736
      # This shell has a builtin print -r that does the trick.
 
5737
      echo='print -r'
 
5738
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
 
5739
         test "X$CONFIG_SHELL" != X/bin/ksh; then
 
5740
      # If we have ksh, try running configure again with it.
 
5741
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
5742
      export ORIGINAL_CONFIG_SHELL
 
5743
      CONFIG_SHELL=/bin/ksh
 
5744
      export CONFIG_SHELL
 
5745
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
5746
    else
 
5747
      # Try using printf.
 
5748
      echo='printf %s\n'
 
5749
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
5750
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
5751
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
5752
        # Cool, printf works
 
5753
        :
 
5754
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
5755
           test "X$echo_testing_string" = 'X\t' &&
 
5756
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
5757
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
5758
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
5759
        export CONFIG_SHELL
 
5760
        SHELL="$CONFIG_SHELL"
 
5761
        export SHELL
 
5762
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
5763
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
5764
           test "X$echo_testing_string" = 'X\t' &&
 
5765
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
5766
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
5767
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
5768
      else
 
5769
        # maybe with a smaller string...
 
5770
        prev=:
 
5771
 
 
5772
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
5773
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
 
5774
          then
 
5775
            break
 
5776
          fi
 
5777
          prev="$cmd"
 
5778
        done
 
5779
 
 
5780
        if test "$prev" != 'sed 50q "[$]0"'; then
 
5781
          echo_test_string=`eval $prev`
 
5782
          export echo_test_string
 
5783
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
5784
        else
 
5785
          # Oops.  We lost completely, so just stick with echo.
 
5786
          echo=echo
 
5787
        fi
 
5788
      fi
 
5789
    fi
 
5790
  fi
 
5791
fi
 
5792
fi
 
5793
 
 
5794
# Copy echo and quote the copy suitably for passing to libtool from
 
5795
# the Makefile, instead of quoting the original, which is used later.
 
5796
ECHO=$echo
 
5797
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
5798
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
5799
fi
 
5800
 
 
5801
AC_SUBST(ECHO)
 
5802
AC_DIVERT_POP
 
5803
])# _LT_AC_PROG_ECHO_BACKSLASH
 
5804
 
 
5805
 
 
5806
# _LT_AC_LOCK
 
5807
# -----------
 
5808
AC_DEFUN([_LT_AC_LOCK],
 
5809
[AC_ARG_ENABLE([libtool-lock],
 
5810
    [AC_HELP_STRING([--disable-libtool-lock],
 
5811
        [avoid locking (might break parallel builds)])])
 
5812
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5911
5813
 
5912
5814
# Some flags need to be propagated to the compiler or linker for good
5913
5815
# libtool support.
5914
5816
case $host in
 
5817
ia64-*-hpux*)
 
5818
  # Find out which ABI we are using.
 
5819
  echo 'int i;' > conftest.$ac_ext
 
5820
  if AC_TRY_EVAL(ac_compile); then
 
5821
    case `/usr/bin/file conftest.$ac_objext` in
 
5822
    *ELF-32*)
 
5823
      HPUX_IA64_MODE="32"
 
5824
      ;;
 
5825
    *ELF-64*)
 
5826
      HPUX_IA64_MODE="64"
 
5827
      ;;
 
5828
    esac
 
5829
  fi
 
5830
  rm -rf conftest*
 
5831
  ;;
5915
5832
*-*-irix6*)
5916
5833
  # Find out which ABI we are using.
5917
5834
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5931
5848
  rm -rf conftest*
5932
5849
  ;;
5933
5850
 
 
5851
*-*-linux*)
 
5852
  # Test if the compiler is 64bit
 
5853
  echo 'int i;' > conftest.$ac_ext
 
5854
  if AC_TRY_EVAL(ac_compile); then
 
5855
    case `/usr/bin/file conftest.$ac_objext` in
 
5856
    *"ELF 32"*)
 
5857
      LINUX_64_MODE="32"
 
5858
      ;;
 
5859
    *"ELF 64"*)
 
5860
      LINUX_64_MODE="64"
 
5861
      ;;
 
5862
    esac
 
5863
  fi
 
5864
  rm -rf conftest*
 
5865
  ;;
 
5866
  
5934
5867
*-*-sco3.2v5*)
5935
5868
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5936
5869
  SAVE_CFLAGS="$CFLAGS"
5937
5870
  CFLAGS="$CFLAGS -belf"
5938
5871
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5939
 
    [AC_LANG_SAVE
5940
 
     AC_LANG_C
 
5872
    [AC_LANG_PUSH(C)
5941
5873
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5942
 
     AC_LANG_RESTORE])
 
5874
     AC_LANG_POP])
5943
5875
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5944
5876
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5945
5877
    CFLAGS="$SAVE_CFLAGS"
5946
5878
  fi
5947
5879
  ;;
5948
 
 
5949
5880
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5950
5881
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5951
5882
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5977
5908
  ;;
5978
5909
  ])
5979
5910
esac
5980
 
])
5981
 
 
5982
 
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
5983
 
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
5984
 
 
5985
 
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
5986
 
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
5987
 
 
5988
 
# AC_ENABLE_SHARED - implement the --enable-shared flag
5989
 
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
5990
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
5991
 
#   `yes'.
 
5911
 
 
5912
need_locks="$enable_libtool_lock"
 
5913
 
 
5914
])# _LT_AC_LOCK
 
5915
 
 
5916
 
 
5917
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
5918
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
5919
# ----------------------------------------------------------------
 
5920
# Check whether the given compiler option works
 
5921
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
5922
[AC_CACHE_CHECK([$1], [$2],
 
5923
  [$2=no
 
5924
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
5925
   save_CFLAGS="$CFLAGS"
 
5926
   CFLAGS="$CFLAGS $3"
 
5927
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
5928
   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
 
5929
     # The compiler can only warn and ignore the option if not recognized
 
5930
     # So say no if there are warnings
 
5931
     if test -s conftest.err; then
 
5932
       # Append any errors to the config.log.
 
5933
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
5934
     else
 
5935
       $2=yes
 
5936
     fi
 
5937
   fi
 
5938
   $rm conftest*
 
5939
   CFLAGS="$save_CFLAGS"
 
5940
])
 
5941
 
 
5942
if test x"[$]$2" = xyes; then
 
5943
    ifelse([$5], , :, [$5])
 
5944
else
 
5945
    ifelse([$6], , :, [$6])
 
5946
fi
 
5947
])# AC_LIBTOOL_COMPILER_OPTION
 
5948
 
 
5949
 
 
5950
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
5951
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
5952
# ------------------------------------------------------------
 
5953
# Check whether the given compiler option works
 
5954
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
5955
[AC_CACHE_CHECK([$1], [$2],
 
5956
  [$2=no
 
5957
   save_LDFLAGS="$LDFLAGS"
 
5958
   LDFLAGS="$LDFLAGS $3"
 
5959
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
 
5960
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
5961
     # The compiler can only warn and ignore the option if not recognized
 
5962
     # So say no if there are warnings
 
5963
     if test -s conftest.err; then
 
5964
       # Append any errors to the config.log.
 
5965
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
5966
     else
 
5967
       $2=yes
 
5968
     fi
 
5969
   fi
 
5970
   $rm conftest*
 
5971
   LDFLAGS="$save_LDFLAGS"
 
5972
])
 
5973
 
 
5974
if test x"[$]$2" = xyes; then
 
5975
    ifelse([$4], , :, [$4])
 
5976
else
 
5977
    ifelse([$5], , :, [$5])
 
5978
fi
 
5979
])# AC_LIBTOOL_LINKER_OPTION
 
5980
 
 
5981
 
 
5982
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
5983
# --------------------------
 
5984
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
5985
[# find the maximum length of command line arguments
 
5986
AC_MSG_CHECKING([the maximum length of command line arguments])
 
5987
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
5988
  i=0
 
5989
  testring="ABCD"
 
5990
 
 
5991
  case $host_os in
 
5992
  msdosdjgpp*)
 
5993
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
5994
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
5995
    # during glob expansion).  Even if it were fixed, the result of this
 
5996
    # check would be larger than it should be.
 
5997
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
5998
    ;;
 
5999
 
 
6000
  gnu*)
 
6001
    # Under GNU Hurd, this test is not required because there is
 
6002
    # no limit to the length of command line arguments.
 
6003
    # Libtool will interpret -1 as no limit whatsoever
 
6004
    lt_cv_sys_max_cmd_len=-1;
 
6005
    ;;
 
6006
 
 
6007
  *)
 
6008
    # If test is not a shell built-in, we'll probably end up computing a
 
6009
    # maximum length that is only half of the actual maximum length, but
 
6010
    # we can't tell.
 
6011
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
 
6012
               = "XX$testring") >/dev/null 2>&1 &&
 
6013
            new_result=`expr "X$testring" : ".*" 2>&1` &&
 
6014
            lt_cv_sys_max_cmd_len=$new_result &&
 
6015
            test $i != 17 # 1/2 MB should be enough
 
6016
    do
 
6017
      i=`expr $i + 1`
 
6018
      testring=$testring$testring
 
6019
    done
 
6020
    testring=
 
6021
    # Add a significant safety factor because C++ compilers can tack on massive
 
6022
    # amounts of additional arguments before passing them to the linker.
 
6023
    # It appears as though 1/2 is a usable value.
 
6024
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
6025
    ;;
 
6026
  esac
 
6027
])
 
6028
if test -n $lt_cv_sys_max_cmd_len ; then
 
6029
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
6030
else
 
6031
  AC_MSG_RESULT(none)
 
6032
fi
 
6033
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
6034
 
 
6035
 
 
6036
# _LT_AC_CHECK_DLFCN
 
6037
# --------------------
 
6038
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
6039
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
6040
])# _LT_AC_CHECK_DLFCN
 
6041
 
 
6042
 
 
6043
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
6044
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
6045
# ------------------------------------------------------------------
 
6046
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 
6047
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6048
if test "$cross_compiling" = yes; then :
 
6049
  [$4]
 
6050
else
 
6051
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
6052
  lt_status=$lt_dlunknown
 
6053
  cat > conftest.$ac_ext <<EOF
 
6054
[#line __oline__ "configure"
 
6055
#include "confdefs.h"
 
6056
 
 
6057
#if HAVE_DLFCN_H
 
6058
#include <dlfcn.h>
 
6059
#endif
 
6060
 
 
6061
#include <stdio.h>
 
6062
 
 
6063
#ifdef RTLD_GLOBAL
 
6064
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
6065
#else
 
6066
#  ifdef DL_GLOBAL
 
6067
#    define LT_DLGLOBAL         DL_GLOBAL
 
6068
#  else
 
6069
#    define LT_DLGLOBAL         0
 
6070
#  endif
 
6071
#endif
 
6072
 
 
6073
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
6074
   find out it does not work in some platform. */
 
6075
#ifndef LT_DLLAZY_OR_NOW
 
6076
#  ifdef RTLD_LAZY
 
6077
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
6078
#  else
 
6079
#    ifdef DL_LAZY
 
6080
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
6081
#    else
 
6082
#      ifdef RTLD_NOW
 
6083
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
6084
#      else
 
6085
#        ifdef DL_NOW
 
6086
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
6087
#        else
 
6088
#          define LT_DLLAZY_OR_NOW      0
 
6089
#        endif
 
6090
#      endif
 
6091
#    endif
 
6092
#  endif
 
6093
#endif
 
6094
 
 
6095
#ifdef __cplusplus
 
6096
extern "C" void exit (int);
 
6097
#endif
 
6098
 
 
6099
void fnord() { int i=42;}
 
6100
int main ()
 
6101
{
 
6102
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
6103
  int status = $lt_dlunknown;
 
6104
 
 
6105
  if (self)
 
6106
    {
 
6107
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
6108
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
6109
      /* dlclose (self); */
 
6110
    }
 
6111
 
 
6112
    exit (status);
 
6113
}]
 
6114
EOF
 
6115
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
6116
    (./conftest; exit; ) 2>/dev/null
 
6117
    lt_status=$?
 
6118
    case x$lt_status in
 
6119
      x$lt_dlno_uscore) $1 ;;
 
6120
      x$lt_dlneed_uscore) $2 ;;
 
6121
      x$lt_unknown|x*) $3 ;;
 
6122
    esac
 
6123
  else :
 
6124
    # compilation failed
 
6125
    $3
 
6126
  fi
 
6127
fi
 
6128
rm -fr conftest*
 
6129
])# _LT_AC_TRY_DLOPEN_SELF
 
6130
 
 
6131
 
 
6132
# AC_LIBTOOL_DLOPEN_SELF
 
6133
# -------------------
 
6134
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 
6135
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6136
if test "x$enable_dlopen" != xyes; then
 
6137
  enable_dlopen=unknown
 
6138
  enable_dlopen_self=unknown
 
6139
  enable_dlopen_self_static=unknown
 
6140
else
 
6141
  lt_cv_dlopen=no
 
6142
  lt_cv_dlopen_libs=
 
6143
 
 
6144
  case $host_os in
 
6145
  beos*)
 
6146
    lt_cv_dlopen="load_add_on"
 
6147
    lt_cv_dlopen_libs=
 
6148
    lt_cv_dlopen_self=yes
 
6149
    ;;
 
6150
 
 
6151
  cygwin* | mingw* | pw32*)
 
6152
    lt_cv_dlopen="LoadLibrary"
 
6153
    lt_cv_dlopen_libs=
 
6154
   ;;
 
6155
 
 
6156
  *)
 
6157
    AC_CHECK_FUNC([shl_load],
 
6158
          [lt_cv_dlopen="shl_load"],
 
6159
      [AC_CHECK_LIB([dld], [shl_load],
 
6160
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
6161
        [AC_CHECK_FUNC([dlopen],
 
6162
              [lt_cv_dlopen="dlopen"],
 
6163
          [AC_CHECK_LIB([dl], [dlopen],
 
6164
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
6165
            [AC_CHECK_LIB([svld], [dlopen],
 
6166
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
6167
              [AC_CHECK_LIB([dld], [dld_link],
 
6168
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
6169
              ])
 
6170
            ])
 
6171
          ])
 
6172
        ])
 
6173
      ])
 
6174
    ;;
 
6175
  esac
 
6176
 
 
6177
  if test "x$lt_cv_dlopen" != xno; then
 
6178
    enable_dlopen=yes
 
6179
  else
 
6180
    enable_dlopen=no
 
6181
  fi
 
6182
 
 
6183
  case $lt_cv_dlopen in
 
6184
  dlopen)
 
6185
    save_CPPFLAGS="$CPPFLAGS"
 
6186
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
6187
 
 
6188
    save_LDFLAGS="$LDFLAGS"
 
6189
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
6190
 
 
6191
    save_LIBS="$LIBS"
 
6192
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
6193
 
 
6194
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
6195
          lt_cv_dlopen_self, [dnl
 
6196
          _LT_AC_TRY_DLOPEN_SELF(
 
6197
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
6198
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
6199
    ])
 
6200
 
 
6201
    if test "x$lt_cv_dlopen_self" = xyes; then
 
6202
      LDFLAGS="$LDFLAGS $link_static_flag"
 
6203
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
6204
          lt_cv_dlopen_self_static, [dnl
 
6205
          _LT_AC_TRY_DLOPEN_SELF(
 
6206
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
6207
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
6208
      ])
 
6209
    fi
 
6210
 
 
6211
    CPPFLAGS="$save_CPPFLAGS"
 
6212
    LDFLAGS="$save_LDFLAGS"
 
6213
    LIBS="$save_LIBS"
 
6214
    ;;
 
6215
  esac
 
6216
 
 
6217
  case $lt_cv_dlopen_self in
 
6218
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
6219
  *) enable_dlopen_self=unknown ;;
 
6220
  esac
 
6221
 
 
6222
  case $lt_cv_dlopen_self_static in
 
6223
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
6224
  *) enable_dlopen_self_static=unknown ;;
 
6225
  esac
 
6226
fi
 
6227
])# AC_LIBTOOL_DLOPEN_SELF
 
6228
 
 
6229
 
 
6230
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
6231
# ---------------------------------
 
6232
# Check to see if options -c and -o are simultaneously supported by compiler
 
6233
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
6234
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
6235
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
6236
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
6237
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
6238
   $rm -r conftest 2>/dev/null
 
6239
   mkdir conftest
 
6240
   cd conftest
 
6241
   mkdir out
 
6242
   ifelse([$1],[],[save_CFLAGS="$CFLAGS"
 
6243
                   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
 
6244
          [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
 
6245
                   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
 
6246
          [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
 
6247
                   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
 
6248
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6249
 
 
6250
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
 
6251
   # that will create temporary files in the current directory regardless of
 
6252
   # the output directory.  Thus, making CWD read-only will cause this test
 
6253
   # to fail, enabling locking or at least warning the user not to do parallel
 
6254
   # builds.
 
6255
   chmod -w .
 
6256
 
 
6257
   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
 
6258
   then
 
6259
     # The compiler can only warn and ignore the option if not recognized
 
6260
     # So say no if there are warnings
 
6261
     if test -s out/conftest.err; then
 
6262
       # Append any errors to the config.log.
 
6263
       cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
 
6264
     else
 
6265
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
6266
     fi
 
6267
   fi
 
6268
   ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
 
6269
          [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
 
6270
          [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
 
6271
   chmod u+w .
 
6272
   $rm conftest* out/*
 
6273
   rmdir out
 
6274
   cd ..
 
6275
   rmdir conftest
 
6276
   $rm conftest*
 
6277
])
 
6278
])# AC_LIBTOOL_PROG_CC_C_O
 
6279
 
 
6280
 
 
6281
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
6282
# -----------------------------------------
 
6283
# Check to see if we can do hard links to lock some files if needed
 
6284
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
6285
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
6286
 
 
6287
hard_links="nottested"
 
6288
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
6289
  # do not overwrite the value of need_locks provided by the user
 
6290
  AC_MSG_CHECKING([if we can lock with hard links])
 
6291
  hard_links=yes
 
6292
  $rm conftest*
 
6293
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
6294
  touch conftest.a
 
6295
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
6296
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
6297
  AC_MSG_RESULT([$hard_links])
 
6298
  if test "$hard_links" = no; then
 
6299
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
6300
    need_locks=warn
 
6301
  fi
 
6302
else
 
6303
  need_locks=no
 
6304
fi
 
6305
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
6306
 
 
6307
 
 
6308
# AC_LIBTOOL_OBJDIR
 
6309
# -----------------
 
6310
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
6311
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
6312
[rm -f .libs 2>/dev/null
 
6313
mkdir .libs 2>/dev/null
 
6314
if test -d .libs; then
 
6315
  lt_cv_objdir=.libs
 
6316
else
 
6317
  # MS-DOS does not allow filenames that begin with a dot.
 
6318
  lt_cv_objdir=_libs
 
6319
fi
 
6320
rmdir .libs 2>/dev/null])
 
6321
objdir=$lt_cv_objdir
 
6322
])# AC_LIBTOOL_OBJDIR
 
6323
 
 
6324
 
 
6325
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
6326
# ----------------------------------------------
 
6327
# Check hardcoding attributes.
 
6328
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
6329
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
6330
_LT_AC_TAGVAR(hardcode_action, $1)=
 
6331
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
6332
   test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
 
6333
 
 
6334
  # We can hardcode non-existant directories.
 
6335
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
 
6336
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
6337
     # have to relink, otherwise we might link with an installed library
 
6338
     # when we should be linking with a yet-to-be-installed one
 
6339
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
6340
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
 
6341
    # Linking always hardcodes the temporary library directory.
 
6342
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
 
6343
  else
 
6344
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
6345
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
 
6346
  fi
 
6347
else
 
6348
  # We cannot hardcode anything, or else we can only hardcode existing
 
6349
  # directories.
 
6350
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
6351
fi
 
6352
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
6353
 
 
6354
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
6355
  # Fast installation is not supported
 
6356
  enable_fast_install=no
 
6357
elif test "$shlibpath_overrides_runpath" = yes ||
 
6358
     test "$enable_shared" = no; then
 
6359
  # Fast installation is not necessary
 
6360
  enable_fast_install=needless
 
6361
fi
 
6362
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
6363
 
 
6364
 
 
6365
# AC_LIBTOOL_SYS_LIB_STRIP
 
6366
# ------------------------
 
6367
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
6368
[striplib=
 
6369
old_striplib=
 
6370
AC_MSG_CHECKING([whether stripping libraries is possible])
 
6371
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 
6372
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
6373
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
6374
  AC_MSG_RESULT([yes])
 
6375
else
 
6376
  AC_MSG_RESULT([no])
 
6377
fi
 
6378
])# AC_LIBTOOL_SYS_LIB_STRIP
 
6379
 
 
6380
 
 
6381
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
6382
# -----------------------------
 
6383
# PORTME Fill in your ld.so characteristics
 
6384
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
6385
[AC_MSG_CHECKING([dynamic linker characteristics])
 
6386
library_names_spec=
 
6387
libname_spec='lib$name'
 
6388
soname_spec=
 
6389
postinstall_cmds=
 
6390
postuninstall_cmds=
 
6391
finish_cmds=
 
6392
finish_eval=
 
6393
shlibpath_var=
 
6394
shlibpath_overrides_runpath=unknown
 
6395
version_type=none
 
6396
dynamic_linker="$host_os ld.so"
 
6397
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
6398
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
6399
need_lib_prefix=unknown
 
6400
hardcode_into_libs=no
 
6401
 
 
6402
# when you set need_version to no, make sure it does not cause -set_version
 
6403
# flags to be left without arguments
 
6404
need_version=unknown
 
6405
 
 
6406
case $host_os in
 
6407
aix3*)
 
6408
  version_type=linux
 
6409
  library_names_spec='${libname}${release}.so$versuffix $libname.a'
 
6410
  shlibpath_var=LIBPATH
 
6411
 
 
6412
  # AIX 3 has no versioning support, so we append a major version to the name.
 
6413
  soname_spec='${libname}${release}.so$major'
 
6414
  ;;
 
6415
 
 
6416
aix4* | aix5*)
 
6417
  version_type=linux
 
6418
  if test "$host_cpu" = ia64; then
 
6419
    # AIX 5 supports IA64
 
6420
    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
 
6421
    shlibpath_var=LD_LIBRARY_PATH
 
6422
  else
 
6423
    # With GCC up to 2.95.x, collect2 would create an import file
 
6424
    # for dependence libraries.  The import file would start with
 
6425
    # the line `#! .'.  This would cause the generated library to
 
6426
    # depend on `.', always an invalid library.  This was fixed in
 
6427
    # development snapshots of GCC prior to 3.0.
 
6428
    case $host_os in
 
6429
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
6430
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
6431
           echo ' yes '
 
6432
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
6433
        :
 
6434
      else
 
6435
        can_build_shared=no
 
6436
      fi
 
6437
      ;;
 
6438
    esac
 
6439
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
6440
    # soname into executable. Probably we can add versioning support to
 
6441
    # collect2, so additional links can be useful in future.
 
6442
    if test "$aix_use_runtimelinking" = yes; then
 
6443
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
6444
      # instead of lib<name>.a to let people know that these are not
 
6445
      # typical AIX shared libraries.
 
6446
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6447
    else
 
6448
      # We preserve .a as extension for shared libraries through AIX4.2
 
6449
      # and later when we are not doing run time linking.
 
6450
      library_names_spec='${libname}${release}.a $libname.a'
 
6451
      soname_spec='${libname}${release}.so$major'
 
6452
    fi
 
6453
    shlibpath_var=LIBPATH
 
6454
  fi
 
6455
  ;;
 
6456
 
 
6457
amigaos*)
 
6458
  library_names_spec='$libname.ixlibrary $libname.a'
 
6459
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
6460
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
 
6461
  ;;
 
6462
 
 
6463
beos*)
 
6464
  library_names_spec='${libname}.so'
 
6465
  dynamic_linker="$host_os ld.so"
 
6466
  shlibpath_var=LIBRARY_PATH
 
6467
  ;;
 
6468
 
 
6469
bsdi4*)
 
6470
  version_type=linux
 
6471
  need_version=no
 
6472
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6473
  soname_spec='${libname}${release}.so$major'
 
6474
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
6475
  shlibpath_var=LD_LIBRARY_PATH
 
6476
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
6477
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
6478
  # the default ld.so.conf also contains /usr/contrib/lib and
 
6479
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
6480
  # libtool to hard-code these into programs
 
6481
  ;;
 
6482
 
 
6483
cygwin* | mingw* | pw32*)
 
6484
  version_type=windows
 
6485
  need_version=no
 
6486
  need_lib_prefix=no
 
6487
  case $GCC,$host_os in
 
6488
  yes,cygwin*)
 
6489
    library_names_spec='$libname.dll.a'
 
6490
    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
 
6491
    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
 
6492
    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
 
6493
      dldir=$destdir/`dirname \$dlpath`~
 
6494
      test -d \$dldir || mkdir -p \$dldir~
 
6495
      $install_prog .libs/$dlname \$dldir/$dlname'
 
6496
    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
6497
      dlpath=$dir/\$dldll~
 
6498
       $rm \$dlpath'
 
6499
    ;;
 
6500
  yes,mingw*)
 
6501
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
 
6502
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
 
6503
    if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
 
6504
      # It is most probably a Windows format PATH printed by
 
6505
      # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
6506
      # path with ; separators, and with drive letters. We can handle the
 
6507
      # drive letters (cygwin fileutils understands them), so leave them,
 
6508
      # especially as we might pass files found there to a mingw objdump,
 
6509
      # which wouldn't understand a cygwinified path. Ahh.
 
6510
      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
 
6511
    else
 
6512
      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
 
6513
    fi
 
6514
    ;;
 
6515
  yes,pw32*)
 
6516
    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
 
6517
    ;;
 
6518
  *)
 
6519
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
 
6520
    ;;
 
6521
  esac
 
6522
  dynamic_linker='Win32 ld.exe'
 
6523
  # FIXME: first we should search . and the directory the executable is in
 
6524
  shlibpath_var=PATH
 
6525
  ;;
 
6526
 
 
6527
darwin* | rhapsody*)
 
6528
  dynamic_linker="$host_os dyld"
 
6529
  version_type=darwin
 
6530
  need_lib_prefix=no
 
6531
  need_version=no
 
6532
  # FIXME: Relying on posixy $() will cause problems for
 
6533
  #        cross-compilation, but unfortunately the echo tests do not
 
6534
  #        yet detect zsh echo's removal of \ escapes.
 
6535
  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
 
6536
  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
 
6537
  shlibpath_overrides_runpath=yes
 
6538
  shlibpath_var=DYLD_LIBRARY_PATH
 
6539
  ;;
 
6540
 
 
6541
dgux*)
 
6542
  version_type=linux
 
6543
  need_lib_prefix=no
 
6544
  need_version=no
 
6545
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6546
  soname_spec='${libname}${release}.so$major'
 
6547
  shlibpath_var=LD_LIBRARY_PATH
 
6548
  ;;
 
6549
 
 
6550
freebsd1*)
 
6551
  dynamic_linker=no
 
6552
  ;;
 
6553
 
 
6554
freebsd*)
 
6555
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
6556
  version_type=freebsd-$objformat
 
6557
  case $version_type in
 
6558
    freebsd-elf*)
 
6559
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
6560
      need_version=no
 
6561
      need_lib_prefix=no
 
6562
      ;;
 
6563
    freebsd-*)
 
6564
      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
 
6565
      need_version=yes
 
6566
      ;;
 
6567
  esac
 
6568
  shlibpath_var=LD_LIBRARY_PATH
 
6569
  case $host_os in
 
6570
  freebsd2*)
 
6571
    shlibpath_overrides_runpath=yes
 
6572
    ;;
 
6573
  freebsd3.[01]* | freebsdelf3.[01]*)
 
6574
    shlibpath_overrides_runpath=yes
 
6575
    hardcode_into_libs=yes
 
6576
    ;;
 
6577
  *) # from 3.2 on
 
6578
    shlibpath_overrides_runpath=no
 
6579
    hardcode_into_libs=yes
 
6580
    ;;
 
6581
  esac
 
6582
  ;;
 
6583
 
 
6584
gnu*)
 
6585
  version_type=linux
 
6586
  need_lib_prefix=no
 
6587
  need_version=no
 
6588
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
 
6589
  soname_spec='${libname}${release}.so$major'
 
6590
  shlibpath_var=LD_LIBRARY_PATH
 
6591
  hardcode_into_libs=yes
 
6592
  ;;
 
6593
 
 
6594
hpux9* | hpux10* | hpux11*)
 
6595
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
6596
  # link against other versions.
 
6597
  version_type=sunos
 
6598
  need_lib_prefix=no
 
6599
  need_version=no
 
6600
  if test "$host_cpu" = ia64; then
 
6601
    hardcode_into_libs=yes
 
6602
    dynamic_linker="$host_os dld.so"
 
6603
    shlibpath_var=LD_LIBRARY_PATH
 
6604
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
6605
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6606
    soname_spec='${libname}${release}.so$major'
 
6607
    if test "X$HPUX_IA64_MODE" = X32; then
 
6608
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
6609
    else
 
6610
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
6611
    fi
 
6612
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
6613
  else
 
6614
    dynamic_linker="$host_os dld.sl"
 
6615
    shlibpath_var=SHLIB_PATH
 
6616
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
6617
    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
 
6618
    soname_spec='${libname}${release}.sl$major'
 
6619
  fi
 
6620
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
6621
  postinstall_cmds='chmod 555 $lib'
 
6622
  ;;
 
6623
 
 
6624
irix5* | irix6* | nonstopux*)
 
6625
  case $host_os in
 
6626
    nonstopux*) version_type=nonstopux ;;
 
6627
    *)          version_type=irix ;;
 
6628
  esac
 
6629
  need_lib_prefix=no
 
6630
  need_version=no
 
6631
  soname_spec='${libname}${release}.so$major'
 
6632
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
 
6633
  case $host_os in
 
6634
  irix5* | nonstopux*)
 
6635
    libsuff= shlibsuff=
 
6636
    ;;
 
6637
  *)
 
6638
    case $LD in # libtool.m4 will add one of these switches to LD
 
6639
    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
 
6640
    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
 
6641
    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
6642
    *) libsuff= shlibsuff= libmagic=never-match;;
 
6643
    esac
 
6644
    ;;
 
6645
  esac
 
6646
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
6647
  shlibpath_overrides_runpath=no
 
6648
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
6649
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
6650
  ;;
 
6651
 
 
6652
# No shared lib support for Linux oldld, aout, or coff.
 
6653
linux*oldld* | linux*aout* | linux*coff*)
 
6654
  dynamic_linker=no
 
6655
  ;;
 
6656
 
 
6657
# This must be Linux ELF.
 
6658
linux*)
 
6659
  version_type=linux
 
6660
  need_lib_prefix=no
 
6661
  need_version=no
 
6662
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6663
  soname_spec='${libname}${release}.so$major'
 
6664
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
6665
  libsuff=
 
6666
  if test "x$LINUX_64_MODE" = x64; then
 
6667
    # Some platforms are per default 64-bit, so there's no /lib64
 
6668
    if test -d /lib64; then
 
6669
      libsuff=64
 
6670
    fi
 
6671
  fi
 
6672
  shlibpath_var=LD_LIBRARY_PATH
 
6673
  shlibpath_overrides_runpath=no
 
6674
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
 
6675
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
 
6676
  # This implies no fast_install, which is unacceptable.
 
6677
  # Some rework will be needed to allow for fast_install
 
6678
  # before this can be enabled.
 
6679
  hardcode_into_libs=yes
 
6680
 
 
6681
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
6682
  # powerpc, because MkLinux only supported shared libraries with the
 
6683
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
6684
  # most powerpc-linux boxes support dynamic linking these days and
 
6685
  # people can always --disable-shared, the test was removed, and we
 
6686
  # assume the GNU/Linux dynamic linker is in use.
 
6687
  dynamic_linker='GNU/Linux ld.so'
 
6688
  ;;
 
6689
 
 
6690
netbsd*)
 
6691
  version_type=sunos
 
6692
  need_lib_prefix=no
 
6693
  need_version=no
 
6694
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
6695
    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
6696
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
6697
    dynamic_linker='NetBSD (a.out) ld.so'
 
6698
  else
 
6699
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
 
6700
    soname_spec='${libname}${release}.so$major'
 
6701
    dynamic_linker='NetBSD ld.elf_so'
 
6702
  fi
 
6703
  shlibpath_var=LD_LIBRARY_PATH
 
6704
  shlibpath_overrides_runpath=yes
 
6705
  hardcode_into_libs=yes
 
6706
  ;;
 
6707
 
 
6708
newsos6)
 
6709
  version_type=linux
 
6710
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6711
  shlibpath_var=LD_LIBRARY_PATH
 
6712
  shlibpath_overrides_runpath=yes
 
6713
  ;;
 
6714
 
 
6715
nto-qnx)
 
6716
  version_type=linux
 
6717
  need_lib_prefix=no
 
6718
  need_version=no
 
6719
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6720
  soname_spec='${libname}${release}.so$major'
 
6721
  shlibpath_var=LD_LIBRARY_PATH
 
6722
  shlibpath_overrides_runpath=yes
 
6723
  ;;
 
6724
 
 
6725
openbsd*)
 
6726
  version_type=sunos
 
6727
  need_lib_prefix=no
 
6728
  need_version=no
 
6729
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
6730
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
6731
  shlibpath_var=LD_LIBRARY_PATH
 
6732
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6733
    case $host_os in
 
6734
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
6735
        shlibpath_overrides_runpath=no
 
6736
        ;;
 
6737
      *)
 
6738
        shlibpath_overrides_runpath=yes
 
6739
        ;;
 
6740
      esac
 
6741
  else
 
6742
    shlibpath_overrides_runpath=yes
 
6743
  fi
 
6744
  ;;
 
6745
 
 
6746
os2*)
 
6747
  libname_spec='$name'
 
6748
  need_lib_prefix=no
 
6749
  library_names_spec='$libname.dll $libname.a'
 
6750
  dynamic_linker='OS/2 ld.exe'
 
6751
  shlibpath_var=LIBPATH
 
6752
  ;;
 
6753
 
 
6754
osf3* | osf4* | osf5*)
 
6755
  version_type=osf
 
6756
  need_lib_prefix=no
 
6757
  need_version=no
 
6758
  soname_spec='${libname}${release}.so'
 
6759
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
6760
  shlibpath_var=LD_LIBRARY_PATH
 
6761
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
6762
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
6763
  ;;
 
6764
 
 
6765
sco3.2v5*)
 
6766
  version_type=osf
 
6767
  soname_spec='${libname}${release}.so$major'
 
6768
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6769
  shlibpath_var=LD_LIBRARY_PATH
 
6770
  ;;
 
6771
 
 
6772
solaris*)
 
6773
  version_type=linux
 
6774
  need_lib_prefix=no
 
6775
  need_version=no
 
6776
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6777
  soname_spec='${libname}${release}.so$major'
 
6778
  shlibpath_var=LD_LIBRARY_PATH
 
6779
  shlibpath_overrides_runpath=yes
 
6780
  hardcode_into_libs=yes
 
6781
  # ldd complains unless libraries are executable
 
6782
  postinstall_cmds='chmod +x $lib'
 
6783
  ;;
 
6784
 
 
6785
sunos4*)
 
6786
  version_type=sunos
 
6787
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
6788
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
6789
  shlibpath_var=LD_LIBRARY_PATH
 
6790
  shlibpath_overrides_runpath=yes
 
6791
  if test "$with_gnu_ld" = yes; then
 
6792
    need_lib_prefix=no
 
6793
  fi
 
6794
  need_version=yes
 
6795
  ;;
 
6796
 
 
6797
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
6798
  version_type=linux
 
6799
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6800
  soname_spec='${libname}${release}.so$major'
 
6801
  shlibpath_var=LD_LIBRARY_PATH
 
6802
  case $host_vendor in
 
6803
    sni)
 
6804
      shlibpath_overrides_runpath=no
 
6805
      ;;
 
6806
    motorola)
 
6807
      need_lib_prefix=no
 
6808
      need_version=no
 
6809
      shlibpath_overrides_runpath=no
 
6810
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
6811
      ;;
 
6812
  esac
 
6813
  ;;
 
6814
 
 
6815
sysv4*MP*)
 
6816
  if test -d /usr/nec ;then
 
6817
    version_type=linux
 
6818
    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
 
6819
    soname_spec='$libname.so.$major'
 
6820
    shlibpath_var=LD_LIBRARY_PATH
 
6821
  fi
 
6822
  ;;
 
6823
 
 
6824
uts4*)
 
6825
  version_type=linux
 
6826
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6827
  soname_spec='${libname}${release}.so$major'
 
6828
  shlibpath_var=LD_LIBRARY_PATH
 
6829
  ;;
 
6830
 
 
6831
*)
 
6832
  dynamic_linker=no
 
6833
  ;;
 
6834
esac
 
6835
AC_MSG_RESULT([$dynamic_linker])
 
6836
test "$dynamic_linker" = no && can_build_shared=no
 
6837
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
6838
 
 
6839
 
 
6840
# _LT_AC_TAGCONFIG
 
6841
# ----------------
 
6842
AC_DEFUN([_LT_AC_TAGCONFIG],
 
6843
[AC_ARG_WITH([tags],
 
6844
    [AC_HELP_STRING([--with-tags=TAGS],
 
6845
        [include additional configurations @<:@CXX,GCJ@:>@])],
 
6846
    [tagnames="$withval"],
 
6847
    [tagnames="CXX,GCJ"
 
6848
    case $host_os in
 
6849
      mingw*|cygwin*) tagnames="$tagnames,RC" ;;
 
6850
    esac])
 
6851
 
 
6852
if test -f "$ltmain" && test -n "$tagnames"; then
 
6853
  if test ! -f "${ofile}"; then
 
6854
    AC_MSG_WARN([output file `$ofile' does not exist])
 
6855
  fi
 
6856
 
 
6857
  if test -z "$LTCC"; then
 
6858
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
6859
    if test -z "$LTCC"; then
 
6860
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
 
6861
    else
 
6862
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
6863
    fi
 
6864
  fi
 
6865
 
 
6866
  # Extract list of available tagged configurations in $ofile.
 
6867
  # Note that this assumes the entire list is on one line.
 
6868
  available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
6869
 
 
6870
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
6871
  for tagname in $tagnames; do
 
6872
    IFS="$lt_save_ifs"
 
6873
    # Check whether tagname contains only valid characters
 
6874
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
6875
    "") ;;
 
6876
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
6877
        ;;
 
6878
    esac
 
6879
 
 
6880
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
6881
    then
 
6882
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
6883
    fi
 
6884
 
 
6885
    # Update the list of available tags.
 
6886
    if test -n "$tagname"; then
 
6887
      echo appending configuration tag \"$tagname\" to $ofile
 
6888
 
 
6889
      case $tagname in
 
6890
      CXX)
 
6891
        AC_LIBTOOL_LANG_CXX_CONFIG
 
6892
        ;;
 
6893
 
 
6894
      GCJ)
 
6895
        AC_LIBTOOL_LANG_GCJ_CONFIG
 
6896
        ;;
 
6897
 
 
6898
      RC)
 
6899
        AC_LIBTOOL_LANG_RC_CONFIG
 
6900
        ;;
 
6901
 
 
6902
      *)
 
6903
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
6904
        ;;
 
6905
      esac
 
6906
 
 
6907
      # Append the new tag name to the list of available tags.
 
6908
      available_tags="$available_tags $tagname"
 
6909
    fi
 
6910
  done
 
6911
  IFS="$lt_save_ifs"
 
6912
 
 
6913
  # Now substitute the updated list of available tags.
 
6914
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
6915
    mv "${ofile}T" "$ofile"
 
6916
    chmod +x "$ofile"
 
6917
  else
 
6918
    rm -f "${ofile}T"
 
6919
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
6920
  fi
 
6921
fi
 
6922
])# _LT_AC_TAGCONFIG
 
6923
 
 
6924
 
 
6925
# AC_LIBTOOL_DLOPEN
 
6926
# -----------------
 
6927
# enable checks for dlopen support
 
6928
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
6929
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
6930
])# AC_LIBTOOL_DLOPEN
 
6931
 
 
6932
 
 
6933
# AC_LIBTOOL_WIN32_DLL
 
6934
# --------------------
 
6935
# declare package support for building win32 dll's
 
6936
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
6937
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
6938
])# AC_LIBTOOL_WIN32_DLL
 
6939
 
 
6940
 
 
6941
# AC_ENABLE_SHARED([DEFAULT])
 
6942
# ---------------------------
 
6943
# implement the --enable-shared flag
 
6944
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
5992
6945
AC_DEFUN([AC_ENABLE_SHARED],
5993
6946
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
5994
 
AC_ARG_ENABLE(shared,
5995
 
changequote(<<, >>)dnl
5996
 
<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
5997
 
changequote([, ])dnl
5998
 
[p=${PACKAGE-default}
5999
 
case $enableval in
6000
 
yes) enable_shared=yes ;;
6001
 
no) enable_shared=no ;;
6002
 
*)
6003
 
  enable_shared=no
6004
 
  # Look at the argument we got.  We use all the common list separators.
6005
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6006
 
  for pkg in $enableval; do
6007
 
    if test "X$pkg" = "X$p"; then
6008
 
      enable_shared=yes
6009
 
    fi
6010
 
  done
6011
 
  IFS="$ac_save_ifs"
6012
 
  ;;
6013
 
esac],
6014
 
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
6015
 
])
6016
 
 
6017
 
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
6018
 
AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6019
 
AC_ENABLE_SHARED(no)])
6020
 
 
6021
 
# AC_ENABLE_STATIC - implement the --enable-static flag
6022
 
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
6023
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
6024
 
#   `yes'.
 
6947
AC_ARG_ENABLE([shared],
 
6948
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
6949
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
6950
    [p=${PACKAGE-default}
 
6951
    case $enableval in
 
6952
    yes) enable_shared=yes ;;
 
6953
    no) enable_shared=no ;;
 
6954
    *)
 
6955
      enable_shared=no
 
6956
      # Look at the argument we got.  We use all the common list separators.
 
6957
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
6958
      for pkg in $enableval; do
 
6959
        IFS="$lt_save_ifs"
 
6960
        if test "X$pkg" = "X$p"; then
 
6961
          enable_shared=yes
 
6962
        fi
 
6963
      done
 
6964
      IFS="$lt_save_ifs"
 
6965
      ;;
 
6966
    esac],
 
6967
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
6968
])# AC_ENABLE_SHARED
 
6969
 
 
6970
 
 
6971
# AC_DISABLE_SHARED
 
6972
# -----------------
 
6973
#- set the default shared flag to --disable-shared
 
6974
AC_DEFUN([AC_DISABLE_SHARED],
 
6975
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
6976
AC_ENABLE_SHARED(no)
 
6977
])# AC_DISABLE_SHARED
 
6978
 
 
6979
 
 
6980
# AC_ENABLE_STATIC([DEFAULT])
 
6981
# ---------------------------
 
6982
# implement the --enable-static flag
 
6983
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
6025
6984
AC_DEFUN([AC_ENABLE_STATIC],
6026
6985
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
6027
 
AC_ARG_ENABLE(static,
6028
 
changequote(<<, >>)dnl
6029
 
<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
6030
 
changequote([, ])dnl
6031
 
[p=${PACKAGE-default}
6032
 
case $enableval in
6033
 
yes) enable_static=yes ;;
6034
 
no) enable_static=no ;;
6035
 
*)
6036
 
  enable_static=no
6037
 
  # Look at the argument we got.  We use all the common list separators.
6038
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6039
 
  for pkg in $enableval; do
6040
 
    if test "X$pkg" = "X$p"; then
6041
 
      enable_static=yes
6042
 
    fi
6043
 
  done
6044
 
  IFS="$ac_save_ifs"
6045
 
  ;;
6046
 
esac],
6047
 
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
6048
 
])
6049
 
 
6050
 
# AC_DISABLE_STATIC - set the default static flag to --disable-static
 
6986
AC_ARG_ENABLE([static],
 
6987
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
6988
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
6989
    [p=${PACKAGE-default}
 
6990
    case $enableval in
 
6991
    yes) enable_static=yes ;;
 
6992
    no) enable_static=no ;;
 
6993
    *)
 
6994
     enable_static=no
 
6995
      # Look at the argument we got.  We use all the common list separators.
 
6996
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
6997
      for pkg in $enableval; do
 
6998
        IFS="$lt_save_ifs"
 
6999
        if test "X$pkg" = "X$p"; then
 
7000
          enable_static=yes
 
7001
        fi
 
7002
      done
 
7003
      IFS="$lt_save_ifs"
 
7004
      ;;
 
7005
    esac],
 
7006
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
7007
])# AC_ENABLE_STATIC
 
7008
 
 
7009
 
 
7010
# AC_DISABLE_STATIC
 
7011
# -----------------
 
7012
# set the default static flag to --disable-static
6051
7013
AC_DEFUN([AC_DISABLE_STATIC],
6052
7014
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6053
 
AC_ENABLE_STATIC(no)])
6054
 
 
6055
 
 
6056
 
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
6057
 
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
6058
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
6059
 
#   `yes'.
 
7015
AC_ENABLE_STATIC(no)
 
7016
])# AC_DISABLE_STATIC
 
7017
 
 
7018
 
 
7019
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
7020
# ---------------------------------
 
7021
# implement the --enable-fast-install flag
 
7022
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
6060
7023
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
6061
7024
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
6062
 
AC_ARG_ENABLE(fast-install,
6063
 
changequote(<<, >>)dnl
6064
 
<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
6065
 
changequote([, ])dnl
6066
 
[p=${PACKAGE-default}
6067
 
case $enableval in
6068
 
yes) enable_fast_install=yes ;;
6069
 
no) enable_fast_install=no ;;
6070
 
*)
6071
 
  enable_fast_install=no
6072
 
  # Look at the argument we got.  We use all the common list separators.
6073
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6074
 
  for pkg in $enableval; do
6075
 
    if test "X$pkg" = "X$p"; then
6076
 
      enable_fast_install=yes
6077
 
    fi
6078
 
  done
6079
 
  IFS="$ac_save_ifs"
6080
 
  ;;
6081
 
esac],
6082
 
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
6083
 
])
6084
 
 
6085
 
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
 
7025
AC_ARG_ENABLE([fast-install],
 
7026
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
7027
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
7028
    [p=${PACKAGE-default}
 
7029
    case $enableval in
 
7030
    yes) enable_fast_install=yes ;;
 
7031
    no) enable_fast_install=no ;;
 
7032
    *)
 
7033
      enable_fast_install=no
 
7034
      # Look at the argument we got.  We use all the common list separators.
 
7035
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7036
      for pkg in $enableval; do
 
7037
        IFS="$lt_save_ifs"
 
7038
        if test "X$pkg" = "X$p"; then
 
7039
          enable_fast_install=yes
 
7040
        fi
 
7041
      done
 
7042
      IFS="$lt_save_ifs"
 
7043
      ;;
 
7044
    esac],
 
7045
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
7046
])# AC_ENABLE_FAST_INSTALL
 
7047
 
 
7048
 
 
7049
# AC_DISABLE_FAST_INSTALL
 
7050
# -----------------------
 
7051
# set the default to --disable-fast-install
6086
7052
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
6087
7053
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6088
 
AC_ENABLE_FAST_INSTALL(no)])
6089
 
 
6090
 
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
6091
 
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
6092
 
#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
6093
 
#   `both'.
 
7054
AC_ENABLE_FAST_INSTALL(no)
 
7055
])# AC_DISABLE_FAST_INSTALL
 
7056
 
 
7057
 
 
7058
# AC_LIBTOOL_PICMODE([MODE])
 
7059
# --------------------------
 
7060
# implement the --with-pic flag
 
7061
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
6094
7062
AC_DEFUN([AC_LIBTOOL_PICMODE],
6095
7063
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6096
 
pic_mode=ifelse($#,1,$1,default)])
6097
 
 
6098
 
 
6099
 
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
 
7064
pic_mode=ifelse($#,1,$1,default)
 
7065
])# AC_LIBTOOL_PICMODE
 
7066
 
 
7067
 
 
7068
# AC_PATH_TOOL_PREFIX
 
7069
# -------------------
 
7070
# find a file program which can recognise shared library
6100
7071
AC_DEFUN([AC_PATH_TOOL_PREFIX],
6101
7072
[AC_MSG_CHECKING([for $1])
6102
7073
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
6103
7074
[case $MAGIC_CMD in
6104
 
  /*)
 
7075
[[\\/*] |  ?:[\\/]*])
6105
7076
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6106
7077
  ;;
6107
 
  ?:/*)
6108
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
6109
 
  ;;
6110
 
  *)
6111
 
  ac_save_MAGIC_CMD="$MAGIC_CMD"
6112
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
7078
*)
 
7079
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
7080
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6113
7081
dnl $ac_dummy forces splitting on constant user-supplied paths.
6114
7082
dnl POSIX.2 word splitting is done only on the output of word expansions,
6115
7083
dnl not every word.  This closes a longstanding sh security hole.
6116
7084
  ac_dummy="ifelse([$2], , $PATH, [$2])"
6117
7085
  for ac_dir in $ac_dummy; do
 
7086
    IFS="$lt_save_ifs"
6118
7087
    test -z "$ac_dir" && ac_dir=.
6119
7088
    if test -f $ac_dir/$1; then
6120
7089
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
6145
7114
      break
6146
7115
    fi
6147
7116
  done
6148
 
  IFS="$ac_save_ifs"
6149
 
  MAGIC_CMD="$ac_save_MAGIC_CMD"
 
7117
  IFS="$lt_save_ifs"
 
7118
  MAGIC_CMD="$lt_save_MAGIC_CMD"
6150
7119
  ;;
6151
7120
esac])
6152
7121
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6155
7124
else
6156
7125
  AC_MSG_RESULT(no)
6157
7126
fi
6158
 
])
6159
 
 
6160
 
 
6161
 
# AC_PATH_MAGIC - find a file program which can recognise a shared library
 
7127
])# AC_PATH_TOOL_PREFIX
 
7128
 
 
7129
 
 
7130
# AC_PATH_MAGIC
 
7131
# -------------
 
7132
# find a file program which can recognise a shared library
6162
7133
AC_DEFUN([AC_PATH_MAGIC],
6163
 
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
6164
 
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
 
7134
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
6165
7135
if test -z "$lt_cv_path_MAGIC_CMD"; then
6166
7136
  if test -n "$ac_tool_prefix"; then
6167
 
    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
 
7137
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
6168
7138
  else
6169
7139
    MAGIC_CMD=:
6170
7140
  fi
6171
7141
fi
6172
 
])
6173
 
 
6174
 
 
6175
 
# AC_PROG_LD - find the path to the GNU or non-GNU linker
 
7142
])# AC_PATH_MAGIC
 
7143
 
 
7144
 
 
7145
# AC_PROG_LD
 
7146
# ----------
 
7147
# find the path to the GNU or non-GNU linker
6176
7148
AC_DEFUN([AC_PROG_LD],
6177
 
[AC_ARG_WITH(gnu-ld,
6178
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
6179
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
7149
[AC_ARG_WITH([gnu-ld],
 
7150
    [AC_HELP_STRING([--with-gnu-ld],
 
7151
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
7152
    [test "$withval" = no || with_gnu_ld=yes],
 
7153
    [with_gnu_ld=no])
6180
7154
AC_REQUIRE([AC_PROG_CC])dnl
6181
7155
AC_REQUIRE([AC_CANONICAL_HOST])dnl
6182
7156
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6193
7167
  esac
6194
7168
  case $ac_prog in
6195
7169
    # Accept absolute paths.
6196
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
6197
 
      re_direlt=['/[^/][^/]*/\.\./']
 
7170
    [[\\/]]* | ?:[[\\/]]*)
 
7171
      re_direlt='/[[^/]][[^/]]*/\.\./'
6198
7172
      # Canonicalize the path of ld
6199
7173
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6200
7174
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6218
7192
fi
6219
7193
AC_CACHE_VAL(lt_cv_path_LD,
6220
7194
[if test -z "$LD"; then
6221
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
7195
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6222
7196
  for ac_dir in $PATH; do
 
7197
    IFS="$lt_save_ifs"
6223
7198
    test -z "$ac_dir" && ac_dir=.
6224
7199
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6225
7200
      lt_cv_path_LD="$ac_dir/$ac_prog"
6233
7208
      fi
6234
7209
    fi
6235
7210
  done
6236
 
  IFS="$ac_save_ifs"
 
7211
  IFS="$lt_save_ifs"
6237
7212
else
6238
7213
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
6239
7214
fi])
6245
7220
fi
6246
7221
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
6247
7222
AC_PROG_LD_GNU
6248
 
])
6249
 
 
 
7223
])# AC_PROG_LD
 
7224
 
 
7225
 
 
7226
# AC_PROG_LD_GNU
 
7227
# --------------
6250
7228
AC_DEFUN([AC_PROG_LD_GNU],
6251
7229
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
6252
7230
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
6256
7234
  lt_cv_prog_gnu_ld=no
6257
7235
fi])
6258
7236
with_gnu_ld=$lt_cv_prog_gnu_ld
6259
 
])
6260
 
 
6261
 
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
 
7237
])# AC_PROG_LD_GNU
 
7238
 
 
7239
 
 
7240
# AC_PROG_LD_RELOAD_FLAG
 
7241
# ----------------------
 
7242
# find reload flag for linker
6262
7243
#   -- PORTME Some linkers may need a different reload flag.
6263
7244
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
6264
 
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
6265
 
[lt_cv_ld_reload_flag='-r'])
 
7245
[AC_CACHE_CHECK([for $LD option to reload object files],
 
7246
  lt_cv_ld_reload_flag,
 
7247
  [lt_cv_ld_reload_flag='-r'])
6266
7248
reload_flag=$lt_cv_ld_reload_flag
6267
 
test -n "$reload_flag" && reload_flag=" $reload_flag"
6268
 
])
6269
 
 
6270
 
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
 
7249
case $reload_flag in
 
7250
"" | " "*) ;;
 
7251
*) reload_flag=" $reload_flag" ;;
 
7252
esac
 
7253
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
7254
])# AC_PROG_LD_RELOAD_FLAG
 
7255
 
 
7256
 
 
7257
# AC_DEPLIBS_CHECK_METHOD
 
7258
# -----------------------
 
7259
# how to check for library dependencies
6271
7260
#  -- PORTME fill in with the dynamic library characteristics
6272
7261
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
6273
7262
[AC_CACHE_CHECK([how to recognise dependant libraries],
6281
7270
# `unknown' -- same as none, but documents that we really don't know.
6282
7271
# 'pass_all' -- all dependencies passed with no checks.
6283
7272
# 'test_compile' -- check by making test program.
6284
 
# 'file_magic [regex]' -- check by looking for files in library path
 
7273
# 'file_magic [[regex]]' -- check by looking for files in library path
6285
7274
# which responds to the $file_magic_cmd with a given egrep regex.
6286
7275
# If you have `file' or equivalent on your system and you're not sure
6287
7276
# whether `pass_all' will *always* work, you probably want this one.
6288
7277
 
6289
7278
case $host_os in
6290
 
aix*)
 
7279
aix4* | aix5*)
6291
7280
  lt_cv_deplibs_check_method=pass_all
6292
7281
  ;;
6293
7282
 
6296
7285
  ;;
6297
7286
 
6298
7287
bsdi4*)
6299
 
  lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
 
7288
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
6300
7289
  lt_cv_file_magic_cmd='/usr/bin/file -L'
6301
7290
  lt_cv_file_magic_test_file=/shlib/libc.so
6302
7291
  ;;
6303
7292
 
6304
 
cygwin* | mingw* |pw32*)
 
7293
cygwin* | mingw* | pw32*)
6305
7294
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6306
7295
  lt_cv_file_magic_cmd='$OBJDUMP -f'
6307
7296
  ;;
6310
7299
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
6311
7300
  lt_cv_file_magic_cmd='/usr/bin/file -L'
6312
7301
  case "$host_os" in
6313
 
  rhapsody* | darwin1.[012])
6314
 
    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
 
7302
  rhapsody* | darwin1.[[012]])
 
7303
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
6315
7304
    ;;
6316
7305
  *) # Darwin 1.3 on
6317
7306
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
6319
7308
  esac
6320
7309
  ;;
6321
7310
 
6322
 
freebsd* )
 
7311
freebsd*)
6323
7312
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6324
7313
    case $host_cpu in
6325
7314
    i*86 )
6326
7315
      # Not sure whether the presence of OpenBSD here was a mistake.
6327
7316
      # Let's accept both of them until this is cleared up.
6328
 
      lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
 
7317
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
6329
7318
      lt_cv_file_magic_cmd=/usr/bin/file
6330
7319
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6331
7320
      ;;
6339
7328
  lt_cv_deplibs_check_method=pass_all
6340
7329
  ;;
6341
7330
 
6342
 
hpux10.20*|hpux11*)
6343
 
  lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
 
7331
hpux10.20* | hpux11*)
6344
7332
  lt_cv_file_magic_cmd=/usr/bin/file
6345
 
  lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
7333
  if test "$host_cpu" = ia64; then
 
7334
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
7335
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
7336
  else
 
7337
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
7338
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
7339
  fi
6346
7340
  ;;
6347
7341
 
6348
 
irix5* | irix6*)
 
7342
irix5* | irix6* | nonstopux*)
6349
7343
  case $host_os in
6350
 
  irix5*)
 
7344
  irix5* | nonstopux*)
6351
7345
    # this will be overridden with pass_all, but let us keep it just in case
6352
7346
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
6353
7347
    ;;
6359
7353
    *) libmagic=never-match;;
6360
7354
    esac
6361
7355
    # this will be overridden with pass_all, but let us keep it just in case
6362
 
    lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
 
7356
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
6363
7357
    ;;
6364
7358
  esac
6365
7359
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
6367
7361
  ;;
6368
7362
 
6369
7363
# This must be Linux ELF.
6370
 
linux-gnu*)
 
7364
linux*)
6371
7365
  case $host_cpu in
6372
 
  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
 
7366
  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
 
7367
    lt_cv_deplibs_check_method=pass_all ;;
 
7368
  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
 
7369
  arm* )
6373
7370
    lt_cv_deplibs_check_method=pass_all ;;
6374
7371
  *)
6375
7372
    # glibc up to 2.1.1 does not perform some relocations on ARM
6376
 
    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
 
7373
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
6377
7374
  esac
6378
7375
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
6379
7376
  ;;
6380
7377
 
6381
7378
netbsd*)
6382
7379
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6383
 
    [lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
6384
 
  else
6385
 
    [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
6386
 
  fi
6387
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
6388
 
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6389
 
  ;;
6390
 
 
6391
 
openbsd* )
6392
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6393
 
    case "$host_cpu" in
6394
 
    i*86 )
6395
 
      changequote(,)dnl
6396
 
      lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
6397
 
      changequote([, ])dnl
6398
 
      lt_cv_file_magic_cmd=/usr/bin/file
6399
 
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6400
 
      ;;
6401
 
    esac
6402
 
  else
6403
 
    lt_cv_deplibs_check_method=pass_all
6404
 
  fi
6405
 
  ;;
6406
 
 
6407
 
newsos6)
6408
 
  [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
 
7380
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
 
7381
  else
 
7382
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
 
7383
  fi
 
7384
  ;;
 
7385
 
 
7386
newos6*)
 
7387
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
6409
7388
  lt_cv_file_magic_cmd=/usr/bin/file
6410
7389
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
6411
7390
  ;;
6412
7391
 
 
7392
nto-qnx)
 
7393
  lt_cv_deplibs_check_method=unknown
 
7394
  ;;
 
7395
 
 
7396
openbsd*)
 
7397
  lt_cv_file_magic_cmd=/usr/bin/file
 
7398
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
7399
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
7400
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
 
7401
  else
 
7402
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
 
7403
  fi
 
7404
  ;;
 
7405
 
6413
7406
osf3* | osf4* | osf5*)
6414
7407
  # this will be overridden with pass_all, but let us keep it just in case
6415
7408
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
6428
7421
 
6429
7422
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6430
7423
  case $host_vendor in
6431
 
  ncr)
6432
 
    lt_cv_deplibs_check_method=pass_all
6433
 
    ;;
6434
7424
  motorola)
6435
 
    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]']
 
7425
    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]]'
6436
7426
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6437
7427
    ;;
 
7428
  ncr)
 
7429
    lt_cv_deplibs_check_method=pass_all
 
7430
    ;;
 
7431
  sequent)
 
7432
    lt_cv_file_magic_cmd='/bin/file'
 
7433
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
7434
    ;;
 
7435
  sni)
 
7436
    lt_cv_file_magic_cmd='/bin/file'
 
7437
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
7438
    lt_cv_file_magic_test_file=/lib/libc.so
 
7439
    ;;
6438
7440
  esac
6439
7441
  ;;
 
7442
 
 
7443
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
7444
  lt_cv_deplibs_check_method=pass_all
 
7445
  ;;
6440
7446
esac
6441
7447
])
6442
7448
file_magic_cmd=$lt_cv_file_magic_cmd
6443
7449
deplibs_check_method=$lt_cv_deplibs_check_method
6444
 
])
6445
 
 
6446
 
 
6447
 
# AC_PROG_NM - find the path to a BSD-compatible name lister
 
7450
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
7451
])# AC_DEPLIBS_CHECK_METHOD
 
7452
 
 
7453
 
 
7454
# AC_PROG_NM
 
7455
# ----------
 
7456
# find the path to a BSD-compatible name lister
6448
7457
AC_DEFUN([AC_PROG_NM],
6449
 
[AC_MSG_CHECKING([for BSD-compatible nm])
6450
 
AC_CACHE_VAL(lt_cv_path_NM,
 
7458
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
6451
7459
[if test -n "$NM"; then
6452
7460
  # Let the user override the test.
6453
7461
  lt_cv_path_NM="$NM"
6454
7462
else
6455
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
7463
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6456
7464
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
7465
    IFS="$lt_save_ifs"
6457
7466
    test -z "$ac_dir" && ac_dir=.
6458
 
    tmp_nm=$ac_dir/${ac_tool_prefix}nm
6459
 
    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
 
7467
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
 
7468
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6460
7469
      # Check to see if the nm accepts a BSD-compat flag.
6461
7470
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6462
7471
      #   nm: unknown option "B" ignored
6463
7472
      # Tru64's nm complains that /dev/null is an invalid object file
6464
 
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
 
7473
      if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
6465
7474
        lt_cv_path_NM="$tmp_nm -B"
6466
7475
        break
6467
 
      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
 
7476
      elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
6468
7477
        lt_cv_path_NM="$tmp_nm -p"
6469
7478
        break
6470
7479
      else
6473
7482
      fi
6474
7483
    fi
6475
7484
  done
6476
 
  IFS="$ac_save_ifs"
 
7485
  IFS="$lt_save_ifs"
6477
7486
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6478
7487
fi])
6479
7488
NM="$lt_cv_path_NM"
6480
 
AC_MSG_RESULT([$NM])
6481
 
])
6482
 
 
6483
 
# AC_CHECK_LIBM - check for math library
 
7489
])# AC_PROG_NM
 
7490
 
 
7491
 
 
7492
# AC_CHECK_LIBM
 
7493
# -------------
 
7494
# check for math library
6484
7495
AC_DEFUN([AC_CHECK_LIBM],
6485
7496
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
6486
7497
LIBM=
6496
7507
  AC_CHECK_LIB(m, main, LIBM="-lm")
6497
7508
  ;;
6498
7509
esac
6499
 
])
6500
 
 
6501
 
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
6502
 
# the libltdl convenience library and INCLTDL to the include flags for
6503
 
# the libltdl header and adds --enable-ltdl-convenience to the
6504
 
# configure arguments.  Note that LIBLTDL and INCLTDL are not
6505
 
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
6506
 
# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
6507
 
# with '${top_builddir}/' and INCLTDL will be prefixed with
 
7510
])# AC_CHECK_LIBM
 
7511
 
 
7512
 
 
7513
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
7514
# -----------------------------------
 
7515
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
7516
# LTDLINCL to the include flags for the libltdl header and adds
 
7517
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
 
7518
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
7519
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
 
7520
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
6508
7521
# '${top_srcdir}/' (note the single quotes!).  If your package is not
6509
7522
# flat and you're not using automake, define top_builddir and
6510
7523
# top_srcdir appropriately in the Makefiles.
6516
7529
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
6517
7530
  esac
6518
7531
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
6519
 
  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
6520
 
])
6521
 
 
6522
 
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
6523
 
# the libltdl installable library and INCLTDL to the include flags for
6524
 
# the libltdl header and adds --enable-ltdl-install to the configure
6525
 
# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
6526
 
# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
6527
 
# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
6528
 
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
6529
 
# with '${top_srcdir}/' (note the single quotes!).  If your package is
6530
 
# not flat and you're not using automake, define top_builddir and
6531
 
# top_srcdir appropriately in the Makefiles.
 
7532
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
7533
  # For backwards non-gettext consistent compatibility...
 
7534
  INCLTDL="$LTDLINCL"
 
7535
])# AC_LIBLTDL_CONVENIENCE
 
7536
 
 
7537
 
 
7538
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
7539
# -----------------------------------
 
7540
# sets LIBLTDL to the link flags for the libltdl installable library and
 
7541
# LTDLINCL to the include flags for the libltdl header and adds
 
7542
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
 
7543
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
7544
# DIRECTORY is not provided and an installed libltdl is not found, it is
 
7545
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
 
7546
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
 
7547
# quotes!).  If your package is not flat and you're not using automake,
 
7548
# define top_builddir and top_srcdir appropriately in the Makefiles.
6532
7549
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
6533
7550
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
6534
7551
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6543
7560
  if test x"$enable_ltdl_install" = x"yes"; then
6544
7561
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
6545
7562
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
6546
 
    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
7563
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
6547
7564
  else
6548
7565
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
6549
7566
    LIBLTDL="-lltdl"
6550
 
    INCLTDL=
 
7567
    LTDLINCL=
6551
7568
  fi
6552
 
])
 
7569
  # For backwards non-gettext consistent compatibility...
 
7570
  INCLTDL="$LTDLINCL"
 
7571
])# AC_LIBLTDL_INSTALLABLE
 
7572
 
6553
7573
 
6554
7574
# If this macro is not defined by Autoconf, define it here.
6555
7575
ifdef([AC_PROVIDE_IFELSE],
6556
7576
      [],
6557
7577
      [define([AC_PROVIDE_IFELSE],
6558
 
              [ifdef([AC_PROVIDE_$1],
6559
 
                     [$2], [$3])])])
6560
 
 
6561
 
# AC_LIBTOOL_CXX - enable support for C++ libraries
6562
 
AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
6563
 
 
6564
 
AC_DEFUN([_AC_LIBTOOL_CXX],
 
7578
              [ifdef([AC_PROVIDE_$1],
 
7579
                     [$2], [$3])])])
 
7580
 
 
7581
 
 
7582
# AC_LIBTOOL_CXX
 
7583
# --------------
 
7584
# enable support for C++ libraries
 
7585
AC_DEFUN([AC_LIBTOOL_CXX],
 
7586
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
7587
])# AC_LIBTOOL_CXX
 
7588
 
 
7589
 
 
7590
# _LT_AC_LANG_CXX
 
7591
# ---------------
 
7592
AC_DEFUN([_LT_AC_LANG_CXX],
6565
7593
[AC_REQUIRE([AC_PROG_CXX])
6566
7594
AC_REQUIRE([AC_PROG_CXXCPP])
6567
 
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
6568
 
lt_save_CC="$CC"
6569
 
lt_save_CFLAGS="$CFLAGS"
6570
 
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
6571
 
dnl is set to the C++ compiler.
6572
 
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
6573
 
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
6574
 
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
6575
 
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
6576
 
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
6577
 
deplibs_check_method="$deplibs_check_method" \
6578
 
file_magic_cmd="$file_magic_cmd" \
6579
 
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
6580
 
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
6581
 
|| AC_MSG_ERROR([libtool tag configuration failed])
6582
 
CC="$lt_save_CC"
6583
 
CFLAGS="$lt_save_CFLAGS"
6584
 
 
6585
 
# Redirect the config.log output again, so that the ltconfig log is not
6586
 
# clobbered by the next message.
6587
 
exec 5>>./config.log
6588
 
])
6589
 
 
6590
 
# AC_LIBTOOL_GCJ - enable support for GCJ libraries
6591
 
AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
6592
 
 
6593
 
AC_DEFUN([_AC_LIBTOOL_GCJ],
6594
 
[AC_REQUIRE([AC_PROG_LIBTOOL])
6595
 
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
7595
])# _LT_AC_LANG_CXX
 
7596
 
 
7597
 
 
7598
# AC_LIBTOOL_GCJ
 
7599
# --------------
 
7600
# enable support for GCJ libraries
 
7601
AC_DEFUN([AC_LIBTOOL_GCJ],
 
7602
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
7603
])# AC_LIBTOOL_GCJ
 
7604
 
 
7605
 
 
7606
# _LT_AC_LANG_GCJ
 
7607
# ---------------
 
7608
AC_DEFUN([_LT_AC_LANG_GCJ],
 
7609
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
6596
7610
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
6597
7611
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
6598
7612
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
6599
 
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
6600
 
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
6601
 
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
6602
 
lt_save_CC="$CC"
6603
 
lt_save_CFLAGS="$CFLAGS"
6604
 
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
6605
 
dnl is set to the C++ compiler.
6606
 
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
6607
 
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
6608
 
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
6609
 
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
6610
 
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
6611
 
deplibs_check_method="$deplibs_check_method" \
6612
 
file_magic_cmd="$file_magic_cmd" \
6613
 
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
6614
 
--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
6615
 
|| AC_MSG_ERROR([libtool tag configuration failed])
6616
 
CC="$lt_save_CC"
6617
 
CFLAGS="$lt_save_CFLAGS"
6618
 
 
6619
 
# Redirect the config.log output again, so that the ltconfig log is not
6620
 
# clobbered by the next message.
6621
 
exec 5>>./config.log
6622
 
])
6623
 
 
6624
 
dnl old names
 
7613
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
7614
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
7615
])# _LT_AC_LANG_GCJ
 
7616
 
 
7617
 
 
7618
# AC_LIBTOOL_RC
 
7619
# --------------
 
7620
# enable support for Windows resource files
 
7621
AC_DEFUN([AC_LIBTOOL_RC],
 
7622
[AC_REQUIRE([AC_PROG_RC])
 
7623
])# AC_LIBTOOL_RC
 
7624
 
 
7625
 
 
7626
# AC_LIBTOOL_LANG_C_CONFIG
 
7627
# ------------------------
 
7628
# Ensure that the configuration vars for the C compiler are
 
7629
# suitably defined.  Those variables are subsequently used by
 
7630
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
7631
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
7632
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
7633
[lt_save_CC="$CC"
 
7634
AC_LANG_PUSH(C)
 
7635
 
 
7636
# Source file extension for C test sources.
 
7637
ac_ext=c
 
7638
 
 
7639
# Object file extension for compiled C test sources.
 
7640
objext=o
 
7641
_LT_AC_TAGVAR(objext, $1)=$objext
 
7642
 
 
7643
# Code to be used in simple compile tests
 
7644
lt_simple_compile_test_code="int some_variable = 0;"
 
7645
 
 
7646
# Code to be used in simple link tests
 
7647
lt_simple_link_test_code='main(){return(0);}'
 
7648
 
 
7649
_LT_AC_SYS_COMPILER
 
7650
 
 
7651
#
 
7652
# Check for any special shared library compilation flags.
 
7653
#
 
7654
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
 
7655
if test "$GCC" = no; then
 
7656
  case $host_os in
 
7657
  sco3.2v5*)
 
7658
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
 
7659
    ;;
 
7660
  esac
 
7661
fi
 
7662
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
 
7663
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
 
7664
  if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
 
7665
  else
 
7666
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
 
7667
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
 
7668
  fi
 
7669
fi
 
7670
 
 
7671
 
 
7672
#
 
7673
# Check to make sure the static flag actually works.
 
7674
#
 
7675
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
 
7676
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
7677
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
 
7678
  [],
 
7679
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
7680
 
 
7681
 
 
7682
## CAVEAT EMPTOR:
 
7683
## There is no encapsulation within the following macros, do not change
 
7684
## the running order or otherwise move them around unless you know exactly
 
7685
## what you are doing...
 
7686
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
7687
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
7688
AC_LIBTOOL_PROG_CC_C_O($1)
 
7689
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
7690
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
7691
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
7692
AC_LIBTOOL_SYS_LIB_STRIP
 
7693
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
7694
AC_LIBTOOL_DLOPEN_SELF($1)
 
7695
 
 
7696
# Report which librarie types wil actually be built
 
7697
AC_MSG_CHECKING([if libtool supports shared libraries])
 
7698
AC_MSG_RESULT([$can_build_shared])
 
7699
 
 
7700
AC_MSG_CHECKING([whether to build shared libraries])
 
7701
test "$can_build_shared" = "no" && enable_shared=no
 
7702
 
 
7703
# On AIX, shared libraries and static libraries use the same namespace, and
 
7704
# are all built from PIC.
 
7705
case "$host_os" in
 
7706
aix3*)
 
7707
  test "$enable_shared" = yes && enable_static=no
 
7708
  if test -n "$RANLIB"; then
 
7709
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
7710
    postinstall_cmds='$RANLIB $lib'
 
7711
  fi
 
7712
  ;;
 
7713
 
 
7714
aix4*)
 
7715
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
7716
    test "$enable_shared" = yes && enable_static=no
 
7717
  fi
 
7718
  ;;
 
7719
esac
 
7720
AC_MSG_RESULT([$enable_shared])
 
7721
 
 
7722
AC_MSG_CHECKING([whether to build static libraries])
 
7723
# Make sure either enable_shared or enable_static is yes.
 
7724
test "$enable_shared" = yes || enable_static=yes
 
7725
AC_MSG_RESULT([$enable_static])
 
7726
 
 
7727
AC_LIBTOOL_CONFIG($1)
 
7728
 
 
7729
AC_LANG_POP
 
7730
CC="$lt_save_CC"
 
7731
])# AC_LIBTOOL_LANG_C_CONFIG
 
7732
 
 
7733
 
 
7734
# AC_LIBTOOL_LANG_CXX_CONFIG
 
7735
# --------------------------
 
7736
# Ensure that the configuration vars for the C compiler are
 
7737
# suitably defined.  Those variables are subsequently used by
 
7738
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
7739
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
7740
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
7741
[AC_LANG_PUSH(C++)
 
7742
AC_REQUIRE([AC_PROG_CXX])
 
7743
AC_REQUIRE([AC_PROG_CXXCPP])
 
7744
 
 
7745
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
7746
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
7747
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
7748
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
7749
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
7750
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7751
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7752
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
7753
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
7754
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
7755
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7756
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
7757
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
7758
 
 
7759
# Dependencies to place before and after the object being linked:
 
7760
_LT_AC_TAGVAR(predep_objects, $1)=
 
7761
_LT_AC_TAGVAR(postdep_objects, $1)=
 
7762
_LT_AC_TAGVAR(predeps, $1)=
 
7763
_LT_AC_TAGVAR(postdeps, $1)=
 
7764
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
7765
 
 
7766
# Source file extension for C test sources.
 
7767
ac_ext=cc
 
7768
 
 
7769
# Object file extension for compiled C test sources.
 
7770
objext=o
 
7771
_LT_AC_TAGVAR(objext, $1)=$objext
 
7772
 
 
7773
# Code to be used in simple compile tests
 
7774
lt_simple_compile_test_code="int some_variable = 0;"
 
7775
 
 
7776
# Code to be used in simple link tests
 
7777
lt_simple_link_test_code='int main(int char *[]) { return(0); }'
 
7778
 
 
7779
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7780
_LT_AC_SYS_COMPILER
 
7781
 
 
7782
# Allow CC to be a program name with arguments.
 
7783
lt_save_CC="$CC"
 
7784
CC=${CXX-"c++"}
 
7785
set dummy $CC
 
7786
compiler="[$]2"
 
7787
_LT_AC_TAGVAR(compiler, $1)=$CC
 
7788
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
7789
 
 
7790
# We don't want -fno-exception wen compiling C++ code, so set the
 
7791
# no_builtin_flag separately
 
7792
if test "$GXX" = yes; then
 
7793
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
7794
else
 
7795
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
7796
fi
 
7797
 
 
7798
if test "$GXX" = yes; then
 
7799
  # Set up default GNU C++ configuration
 
7800
 
 
7801
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
7802
  # archiving commands below assume that GNU ld is being used.
 
7803
  if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
 
7804
      egrep 'GNU ld' > /dev/null; then
 
7805
    with_gnu_ld=yes
 
7806
 
 
7807
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7808
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
7809
 
 
7810
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
7811
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7812
 
 
7813
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
7814
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
7815
    #     investigate it a little bit more. (MM)
 
7816
    wlarc='${wl}'
 
7817
 
 
7818
    # ancient GNU ld didn't support --whole-archive et. al.
 
7819
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
7820
        egrep 'no-whole-archive' > /dev/null; then
 
7821
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
7822
    else
 
7823
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
7824
    fi
 
7825
  else
 
7826
    with_gnu_ld=no
 
7827
    wlarc=
 
7828
 
 
7829
    # A generic and very simple default shared library creation
 
7830
    # command for GNU C++ for the case where it uses the native
 
7831
    # linker, instead of GNU ld.  If possible, this setting should
 
7832
    # overridden to take advantage of the native linker features on
 
7833
    # the platform it is being used on.
 
7834
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
7835
  fi
 
7836
 
 
7837
  # Commands to make compiler produce verbose output that lists
 
7838
  # what "hidden" libraries, object files and flags are used when
 
7839
  # linking a shared library.
 
7840
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
 
7841
 
 
7842
else
 
7843
  GXX=no
 
7844
  with_gnu_ld=no
 
7845
  wlarc=
 
7846
fi
 
7847
 
 
7848
# PORTME: fill in a description of your system's C++ link characteristics
 
7849
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
7850
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
7851
case $host_os in
 
7852
  aix3*)
 
7853
    # FIXME: insert proper C++ library support
 
7854
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7855
    ;;
 
7856
  aix4* | aix5*)
 
7857
    if test "$host_cpu" = ia64; then
 
7858
      # On IA64, the linker does run time linking by default, so we don't
 
7859
      # have to do anything special.
 
7860
      aix_use_runtimelinking=no
 
7861
      exp_sym_flag='-Bexport'
 
7862
      no_entry_flag=""
 
7863
    else
 
7864
      # KDE requires run time linking.  Make it the default.
 
7865
      aix_use_runtimelinking=yes
 
7866
      exp_sym_flag='-bexport'
 
7867
      no_entry_flag='-bnoentry'
 
7868
    fi
 
7869
 
 
7870
    # When large executables or shared objects are built, AIX ld can
 
7871
    # have problems creating the table of contents.  If linking a library
 
7872
    # or program results in "error TOC overflow" add -mminimal-toc to
 
7873
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
7874
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
7875
 
 
7876
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
7877
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7878
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7879
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
7880
 
 
7881
    if test "$GXX" = yes; then
 
7882
      case $host_os in aix4.[012]|aix4.[012].*)
 
7883
      # We only want to do this on AIX 4.2 and lower, the check
 
7884
      # below for broken collect2 doesn't work under 4.3+
 
7885
        collect2name=`${CC} -print-prog-name=collect2`
 
7886
        if test -f "$collect2name" && \
 
7887
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
7888
        then
 
7889
          # We have reworked collect2
 
7890
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7891
        else
 
7892
          # We have old collect2
 
7893
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
7894
          # It fails to find uninstalled libraries when the uninstalled
 
7895
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
7896
          # to unsupported forces relinking
 
7897
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7898
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7899
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
7900
        fi
 
7901
      esac
 
7902
      shared_flag='-shared'
 
7903
    else
 
7904
      # not using gcc
 
7905
      if test "$host_cpu" = ia64; then
 
7906
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
7907
        # chokes on -Wl,-G. The following line is correct:
 
7908
        shared_flag='-G'
 
7909
      else
 
7910
        if test "$aix_use_runtimelinking" = yes; then
 
7911
          shared_flag='-qmkshrobj ${wl}-G'
 
7912
        else
 
7913
          shared_flag='-qmkshrobj'
 
7914
        fi
 
7915
      fi
 
7916
    fi
 
7917
 
 
7918
    # Let the compiler handle the export list.
 
7919
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
7920
    if test "$aix_use_runtimelinking" = yes; then
 
7921
      # Warning - without using the other runtime loading flags (-brtl),
 
7922
      # -berok will link without error, but may produce a broken library.
 
7923
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
7924
      # Determine the default libpath from the value encoded in an empty executable.
 
7925
      _LT_AC_SYS_LIBPATH_AIX
 
7926
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7927
 
 
7928
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
 
7929
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
7930
     else
 
7931
      if test "$host_cpu" = ia64; then
 
7932
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
7933
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
7934
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
7935
      else
 
7936
        # Determine the default libpath from the value encoded in an empty executable.
 
7937
        _LT_AC_SYS_LIBPATH_AIX
 
7938
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7939
        # Warning - without using the other run time loading flags,
 
7940
        # -berok will link without error, but may produce a broken library.
 
7941
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
7942
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
7943
        # -bexpall does not export symbols beginning with underscore (_)
 
7944
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
7945
        # Exported symbols can be pulled into shared objects from archives
 
7946
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
7947
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7948
        # This is similar to how AIX traditionally builds it's shared libraries.
 
7949
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
7950
      fi
 
7951
    fi
 
7952
    ;;
 
7953
  chorus*)
 
7954
    case $cc_basename in
 
7955
      *)
 
7956
        # FIXME: insert proper C++ library support
 
7957
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7958
        ;;
 
7959
    esac
 
7960
    ;;
 
7961
  dgux*)
 
7962
    case $cc_basename in
 
7963
      ec++)
 
7964
        # FIXME: insert proper C++ library support
 
7965
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7966
        ;;
 
7967
      ghcx)
 
7968
        # Green Hills C++ Compiler
 
7969
        # FIXME: insert proper C++ library support
 
7970
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7971
        ;;
 
7972
      *)
 
7973
        # FIXME: insert proper C++ library support
 
7974
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7975
        ;;
 
7976
    esac
 
7977
    ;;
 
7978
  freebsd[12]*)
 
7979
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
7980
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7981
    ;;
 
7982
  freebsd-elf*)
 
7983
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
7984
    ;;
 
7985
  freebsd*)
 
7986
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
7987
    # conventions
 
7988
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
7989
    ;;
 
7990
  gnu*)
 
7991
    ;;
 
7992
  hpux*)
 
7993
    if test $with_gnu_ld = no; then
 
7994
      if test "$host_cpu" = ia64; then
 
7995
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7996
      else
 
7997
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
7998
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
7999
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
8000
      fi
 
8001
    fi
 
8002
    if test "$host_cpu" = ia64; then
 
8003
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8004
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8005
    else
 
8006
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8007
    fi
 
8008
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
8009
                                            # but as the default
 
8010
                                            # location of the library.
 
8011
 
 
8012
    case $cc_basename in
 
8013
      CC)
 
8014
        # FIXME: insert proper C++ library support
 
8015
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8016
        ;;
 
8017
      aCC)
 
8018
        case $host_os in
 
8019
        hpux9*)
 
8020
          _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
8021
          ;;
 
8022
        *)
 
8023
          if test "$host_cpu" = ia64; then
 
8024
            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
8025
          else
 
8026
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8027
          fi
 
8028
          ;;
 
8029
        esac
 
8030
        # Commands to make compiler produce verbose output that lists
 
8031
        # what "hidden" libraries, object files and flags are used when
 
8032
        # linking a shared library.
 
8033
        #
 
8034
        # There doesn't appear to be a way to prevent this compiler from
 
8035
        # explicitly linking system object files so we need to strip them
 
8036
        # from the output so that they don't get included in the library
 
8037
        # dependencies.
 
8038
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8039
        ;;
 
8040
      *)
 
8041
        if test "$GXX" = yes; then
 
8042
          if test $with_gnu_ld = no; then
 
8043
            case $host_os in
 
8044
            hpux9*)
 
8045
              _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
8046
              ;;
 
8047
            *)
 
8048
              if test "$host_cpu" = ia64; then
 
8049
                _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
8050
              else
 
8051
                _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8052
              fi
 
8053
              ;;
 
8054
            esac
 
8055
          fi
 
8056
        else
 
8057
          # FIXME: insert proper C++ library support
 
8058
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8059
        fi
 
8060
        ;;
 
8061
    esac
 
8062
    ;;
 
8063
  irix5* | irix6*)
 
8064
    case $cc_basename in
 
8065
      CC)
 
8066
        # SGI C++
 
8067
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
8068
 
 
8069
        # Archives containing C++ object files must be created using
 
8070
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
8071
        # necessary to make sure instantiated templates are included
 
8072
        # in the archive.
 
8073
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
8074
        ;;
 
8075
      *)
 
8076
        if test "$GXX" = yes; then
 
8077
          if test "$with_gnu_ld" = no; then
 
8078
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
8079
          else
 
8080
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
 
8081
          fi
 
8082
        fi
 
8083
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8084
        ;;
 
8085
    esac
 
8086
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8087
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8088
    ;;
 
8089
  linux*)
 
8090
    case $cc_basename in
 
8091
      KCC)
 
8092
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8093
 
 
8094
        # KCC will only create a shared library if the output file
 
8095
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8096
        # to its proper name (with version) after linking.
 
8097
        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
8098
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
8099
 
 
8100
        # Commands to make compiler produce verbose output that lists
 
8101
        # what "hidden" libraries, object files and flags are used when
 
8102
        # linking a shared library.
 
8103
        #
 
8104
        # There doesn't appear to be a way to prevent this compiler from
 
8105
        # explicitly linking system object files so we need to strip them
 
8106
        # from the output so that they don't get included in the library
 
8107
        # dependencies.
 
8108
        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8109
 
 
8110
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
8111
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
8112
 
 
8113
        # Archives containing C++ object files must be created using
 
8114
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
8115
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
8116
        ;;
 
8117
      cxx)
 
8118
        # Compaq C++
 
8119
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8120
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
8121
 
 
8122
        runpath_var=LD_RUN_PATH
 
8123
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8124
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8125
 
 
8126
        # Commands to make compiler produce verbose output that lists
 
8127
        # what "hidden" libraries, object files and flags are used when
 
8128
        # linking a shared library.
 
8129
        #
 
8130
        # There doesn't appear to be a way to prevent this compiler from
 
8131
        # explicitly linking system object files so we need to strip them
 
8132
        # from the output so that they don't get included in the library
 
8133
        # dependencies.
 
8134
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8135
        ;;
 
8136
    esac
 
8137
    ;;
 
8138
  lynxos*)
 
8139
    # FIXME: insert proper C++ library support
 
8140
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8141
    ;;
 
8142
  m88k*)
 
8143
    # FIXME: insert proper C++ library support
 
8144
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8145
    ;;
 
8146
  mvs*)
 
8147
    case $cc_basename in
 
8148
      cxx)
 
8149
        # FIXME: insert proper C++ library support
 
8150
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8151
        ;;
 
8152
      *)
 
8153
        # FIXME: insert proper C++ library support
 
8154
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8155
        ;;
 
8156
    esac
 
8157
    ;;
 
8158
  netbsd*)
 
8159
    # NetBSD uses g++ - do we need to do anything?
 
8160
    ;;
 
8161
  osf3*)
 
8162
    case $cc_basename in
 
8163
      KCC)
 
8164
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8165
 
 
8166
        # KCC will only create a shared library if the output file
 
8167
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8168
        # to its proper name (with version) after linking.
 
8169
        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
8170
 
 
8171
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8172
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8173
 
 
8174
        # Archives containing C++ object files must be created using
 
8175
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
8176
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
8177
 
 
8178
        ;;
 
8179
      RCC)
 
8180
        # Rational C++ 2.4.1
 
8181
        # FIXME: insert proper C++ library support
 
8182
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8183
        ;;
 
8184
      cxx)
 
8185
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8186
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
8187
 
 
8188
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8189
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8190
 
 
8191
        # Commands to make compiler produce verbose output that lists
 
8192
        # what "hidden" libraries, object files and flags are used when
 
8193
        # linking a shared library.
 
8194
        #
 
8195
        # There doesn't appear to be a way to prevent this compiler from
 
8196
        # explicitly linking system object files so we need to strip them
 
8197
        # from the output so that they don't get included in the library
 
8198
        # dependencies.
 
8199
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8200
        ;;
 
8201
      *)
 
8202
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8203
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8204
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
8205
 
 
8206
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8207
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8208
 
 
8209
          # Commands to make compiler produce verbose output that lists
 
8210
          # what "hidden" libraries, object files and flags are used when
 
8211
          # linking a shared library.
 
8212
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
 
8213
 
 
8214
        else
 
8215
          # FIXME: insert proper C++ library support
 
8216
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8217
        fi
 
8218
        ;;
 
8219
    esac
 
8220
    ;;
 
8221
  osf4* | osf5*)
 
8222
    case $cc_basename in
 
8223
      KCC)
 
8224
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8225
 
 
8226
        # KCC will only create a shared library if the output file
 
8227
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8228
        # to its proper name (with version) after linking.
 
8229
        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
8230
 
 
8231
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8232
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8233
 
 
8234
        # Archives containing C++ object files must be created using
 
8235
        # the KAI C++ compiler.
 
8236
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
8237
        ;;
 
8238
      RCC)
 
8239
        # Rational C++ 2.4.1
 
8240
        # FIXME: insert proper C++ library support
 
8241
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8242
        ;;
 
8243
      cxx)
 
8244
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
8245
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
8246
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
 
8247
          echo "-hidden">> $lib.exp~
 
8248
          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
 
8249
          $rm $lib.exp'
 
8250
 
 
8251
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8252
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8253
 
 
8254
        # Commands to make compiler produce verbose output that lists
 
8255
        # what "hidden" libraries, object files and flags are used when
 
8256
        # linking a shared library.
 
8257
        #
 
8258
        # There doesn't appear to be a way to prevent this compiler from
 
8259
        # explicitly linking system object files so we need to strip them
 
8260
        # from the output so that they don't get included in the library
 
8261
        # dependencies.
 
8262
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8263
        ;;
 
8264
      *)
 
8265
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8266
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8267
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
8268
 
 
8269
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8270
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8271
 
 
8272
          # Commands to make compiler produce verbose output that lists
 
8273
          # what "hidden" libraries, object files and flags are used when
 
8274
          # linking a shared library.
 
8275
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
 
8276
 
 
8277
        else
 
8278
          # FIXME: insert proper C++ library support
 
8279
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8280
        fi
 
8281
        ;;
 
8282
    esac
 
8283
    ;;
 
8284
  psos*)
 
8285
    # FIXME: insert proper C++ library support
 
8286
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8287
    ;;
 
8288
  sco*)
 
8289
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8290
    case $cc_basename in
 
8291
      CC)
 
8292
        # FIXME: insert proper C++ library support
 
8293
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8294
        ;;
 
8295
      *)
 
8296
        # FIXME: insert proper C++ library support
 
8297
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8298
        ;;
 
8299
    esac
 
8300
    ;;
 
8301
  sunos4*)
 
8302
    case $cc_basename in
 
8303
      CC)
 
8304
        # Sun C++ 4.x
 
8305
        # FIXME: insert proper C++ library support
 
8306
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8307
        ;;
 
8308
      lcc)
 
8309
        # Lucid
 
8310
        # FIXME: insert proper C++ library support
 
8311
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8312
        ;;
 
8313
      *)
 
8314
        # FIXME: insert proper C++ library support
 
8315
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8316
        ;;
 
8317
    esac
 
8318
    ;;
 
8319
  solaris*)
 
8320
    case $cc_basename in
 
8321
      CC)
 
8322
        # Sun C++ 4.2, 5.x and Centerline C++
 
8323
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
8324
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8325
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8326
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
8327
 
 
8328
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
8329
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8330
        case $host_os in
 
8331
          solaris2.[0-5] | solaris2.[0-5].*) ;;
 
8332
          *)
 
8333
            # The C++ compiler is used as linker so we must use $wl
 
8334
            # flag to pass the commands to the underlying system
 
8335
            # linker.
 
8336
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
8337
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
8338
            ;;
 
8339
        esac
 
8340
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8341
 
 
8342
        # Commands to make compiler produce verbose output that lists
 
8343
        # what "hidden" libraries, object files and flags are used when
 
8344
        # linking a shared library.
 
8345
        #
 
8346
        # There doesn't appear to be a way to prevent this compiler from
 
8347
        # explicitly linking system object files so we need to strip them
 
8348
        # from the output so that they don't get included in the library
 
8349
        # dependencies.
 
8350
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8351
 
 
8352
        # Archives containing C++ object files must be created using
 
8353
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
8354
        # necessary to make sure instantiated templates are included
 
8355
        # in the archive.
 
8356
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
8357
        ;;
 
8358
      gcx)
 
8359
        # Green Hills C++ Compiler
 
8360
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8361
 
 
8362
        # The C++ compiler must be used to create the archive.
 
8363
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
8364
        ;;
 
8365
      *)
 
8366
        # GNU C++ compiler with Solaris linker
 
8367
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8368
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
8369
          if $CC --version | egrep -v '^2\.7' > /dev/null; then
 
8370
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
 
8371
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8372
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
 
8373
 
 
8374
            # Commands to make compiler produce verbose output that lists
 
8375
            # what "hidden" libraries, object files and flags are used when
 
8376
            # linking a shared library.
 
8377
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
 
8378
          else
 
8379
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
8380
            # platform.
 
8381
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
 
8382
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8383
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
 
8384
 
 
8385
            # Commands to make compiler produce verbose output that lists
 
8386
            # what "hidden" libraries, object files and flags are used when
 
8387
            # linking a shared library.
 
8388
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
 
8389
          fi
 
8390
 
 
8391
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
8392
        fi
 
8393
        ;;
 
8394
    esac
 
8395
    ;;
 
8396
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
 
8397
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8398
    ;;
 
8399
  tandem*)
 
8400
    case $cc_basename in
 
8401
      NCC)
 
8402
        # NonStop-UX NCC 3.20
 
8403
        # FIXME: insert proper C++ library support
 
8404
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8405
        ;;
 
8406
      *)
 
8407
        # FIXME: insert proper C++ library support
 
8408
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8409
        ;;
 
8410
    esac
 
8411
    ;;
 
8412
  vxworks*)
 
8413
    # FIXME: insert proper C++ library support
 
8414
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8415
    ;;
 
8416
  *)
 
8417
    # FIXME: insert proper C++ library support
 
8418
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8419
    ;;
 
8420
esac
 
8421
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
8422
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
8423
 
 
8424
# Figure out "hidden" C++ library dependencies from verbose
 
8425
# compiler output whening linking a shared library.
 
8426
cat > conftest.$ac_ext <<EOF
 
8427
class Foo
 
8428
{
 
8429
public:
 
8430
  Foo (void) { a = 0; }
 
8431
private:
 
8432
  int a;
 
8433
};
 
8434
EOF
 
8435
 
 
8436
 
 
8437
if AC_TRY_EVAL(ac_compile); then
 
8438
  # Parse the compiler output and extract the necessary
 
8439
  # objects, libraries and library flags.
 
8440
 
 
8441
  # Sentinel used to keep track of whether or not we are before
 
8442
  # the conftest object file.
 
8443
  pre_test_object_deps_done=no
 
8444
 
 
8445
  # The `*' in the case matches for architectures that use `case' in
 
8446
  # $output_verbose_cmd can trigger glob expansion during the loop
 
8447
  # eval without this substitution.
 
8448
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
8449
 
 
8450
  for p in `eval $output_verbose_link_cmd`; do
 
8451
    case $p in
 
8452
 
 
8453
    -L* | -R* | -l*)
 
8454
       # Some compilers place space between "-{L,R}" and the path.
 
8455
       # Remove the space.
 
8456
       if test $p = "-L" \
 
8457
          || test $p = "-R"; then
 
8458
         prev=$p
 
8459
         continue
 
8460
       else
 
8461
         prev=
 
8462
       fi
 
8463
 
 
8464
       if test "$pre_test_object_deps_done" = no; then
 
8465
         case $p in
 
8466
         -L* | -R*)
 
8467
           # Internal compiler library paths should come after those
 
8468
           # provided the user.  The postdeps already come after the
 
8469
           # user supplied libs so there is no need to process them.
 
8470
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
8471
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
8472
           else
 
8473
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
8474
           fi
 
8475
           ;;
 
8476
         # The "-l" case would never come before the object being
 
8477
         # linked, so don't bother handling this case.
 
8478
         esac
 
8479
       else
 
8480
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
8481
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
8482
         else
 
8483
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
8484
         fi
 
8485
       fi
 
8486
       ;;
 
8487
 
 
8488
    *.$objext|*.$libext)
 
8489
       # This assumes that the test object file only shows up
 
8490
       # once in the compiler output.
 
8491
       if test "$p" = "conftest.$objext"; then
 
8492
         pre_test_object_deps_done=yes
 
8493
         continue
 
8494
       fi
 
8495
 
 
8496
       if test "$pre_test_object_deps_done" = no; then
 
8497
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
8498
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
8499
         else
 
8500
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
8501
         fi
 
8502
       else
 
8503
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
8504
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
8505
         else
 
8506
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
8507
         fi
 
8508
       fi
 
8509
       ;;
 
8510
 
 
8511
    *) ;; # Ignore the rest.
 
8512
 
 
8513
    esac
 
8514
  done
 
8515
 
 
8516
  # Clean up.
 
8517
  rm -f a.out
 
8518
else
 
8519
  echo "libtool.m4: error: problem compiling C++ test program"
 
8520
fi
 
8521
 
 
8522
$rm -f confest.$objext
 
8523
 
 
8524
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
8525
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
8526
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
 
8527
esac
 
8528
 
 
8529
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
8530
_LT_AC_TAGVAR(LD, $1)="$LD"
 
8531
 
 
8532
## CAVEAT EMPTOR:
 
8533
## There is no encapsulation within the following macros, do not change
 
8534
## the running order or otherwise move them around unless you know exactly
 
8535
## what you are doing...
 
8536
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
8537
AC_LIBTOOL_PROG_CC_C_O($1)
 
8538
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
8539
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
8540
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
8541
AC_LIBTOOL_SYS_LIB_STRIP
 
8542
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
8543
AC_LIBTOOL_DLOPEN_SELF($1)
 
8544
 
 
8545
AC_LIBTOOL_CONFIG($1)
 
8546
 
 
8547
AC_LANG_POP
 
8548
CC="$lt_save_CC"
 
8549
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
8550
 
 
8551
 
 
8552
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
8553
# --------------------------
 
8554
# Ensure that the configuration vars for the C compiler are
 
8555
# suitably defined.  Those variables are subsequently used by
 
8556
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
8557
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
8558
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
8559
[AC_LANG_SAVE
 
8560
 
 
8561
# Source file extension for C test sources.
 
8562
ac_ext=java
 
8563
 
 
8564
# Object file extension for compiled C test sources.
 
8565
objext=o
 
8566
_LT_AC_TAGVAR(objext, $1)=$objext
 
8567
 
 
8568
# Code to be used in simple compile tests
 
8569
lt_simple_compile_test_code="class foo {}"
 
8570
 
 
8571
# Code to be used in simple link tests
 
8572
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
 
8573
 
 
8574
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8575
_LT_AC_SYS_COMPILER
 
8576
 
 
8577
# Allow CC to be a program name with arguments.
 
8578
lt_save_CC="$CC"
 
8579
CC=${GCJ-"gcj"}
 
8580
set dummy $CC
 
8581
compiler="[$]2"
 
8582
_LT_AC_TAGVAR(compiler, $1)=$CC
 
8583
 
 
8584
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
8585
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8586
 
 
8587
## CAVEAT EMPTOR:
 
8588
## There is no encapsulation within the following macros, do not change
 
8589
## the running order or otherwise move them around unless you know exactly
 
8590
## what you are doing...
 
8591
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
8592
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
8593
AC_LIBTOOL_PROG_CC_C_O($1)
 
8594
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
8595
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
8596
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
8597
AC_LIBTOOL_SYS_LIB_STRIP
 
8598
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
8599
AC_LIBTOOL_DLOPEN_SELF($1)
 
8600
 
 
8601
AC_LIBTOOL_CONFIG($1)
 
8602
 
 
8603
AC_LANG_RESTORE
 
8604
CC="$lt_save_CC"
 
8605
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
8606
 
 
8607
 
 
8608
# AC_LIBTOOL_LANG_RC_CONFIG
 
8609
# --------------------------
 
8610
# Ensure that the configuration vars for the Windows resource compiler are
 
8611
# suitably defined.  Those variables are subsequently used by
 
8612
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
8613
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
8614
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
8615
[AC_LANG_SAVE
 
8616
 
 
8617
# Source file extension for RC test sources.
 
8618
ac_ext=rc
 
8619
 
 
8620
# Object file extension for compiled RC test sources.
 
8621
objext=o
 
8622
_LT_AC_TAGVAR(objext, $1)=$objext
 
8623
 
 
8624
# Code to be used in simple compile tests
 
8625
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
8626
 
 
8627
# Code to be used in simple link tests
 
8628
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
8629
 
 
8630
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8631
_LT_AC_SYS_COMPILER
 
8632
 
 
8633
# Allow CC to be a program name with arguments.
 
8634
lt_save_CC="$CC"
 
8635
CC=${RC-"windres"}
 
8636
set dummy $CC
 
8637
compiler="[$]2"
 
8638
_LT_AC_TAGVAR(compiler, $1)=$CC
 
8639
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
8640
 
 
8641
AC_LIBTOOL_CONFIG($1)
 
8642
 
 
8643
AC_LANG_RESTORE
 
8644
CC="$lt_save_CC"
 
8645
])# AC_LIBTOOL_LANG_RC_CONFIG
 
8646
 
 
8647
 
 
8648
# AC_LIBTOOL_CONFIG([TAGNAME])
 
8649
# ----------------------------
 
8650
# If TAGNAME is not passed, then create an initial libtool script
 
8651
# with a default configuration from the untagged config vars.  Otherwise
 
8652
# add code to config.status for appending the configuration named by
 
8653
# TAGNAME from the matching tagged config vars.
 
8654
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
8655
[# The else clause should only fire when bootstrapping the
 
8656
# libtool distribution, otherwise you forgot to ship ltmain.sh
 
8657
# with your package, and you will get complaints that there are
 
8658
# no rules to generate ltmain.sh.
 
8659
if test -f "$ltmain"; then
 
8660
  # Now quote all the things that may contain metacharacters while being
 
8661
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 
8662
  # variables and quote the copies for generation of the libtool script.
 
8663
  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
 
8664
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
8665
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
8666
    deplibs_check_method reload_flag reload_cmds need_locks \
 
8667
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
8668
    lt_cv_sys_global_symbol_to_c_name_address \
 
8669
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 
8670
    old_postinstall_cmds old_postuninstall_cmds \
 
8671
    _LT_AC_TAGVAR(compiler, $1) \
 
8672
    _LT_AC_TAGVAR(CC, $1) \
 
8673
    _LT_AC_TAGVAR(LD, $1) \
 
8674
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
8675
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
8676
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
8677
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
8678
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
8679
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
8680
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
8681
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
8682
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
8683
    _LT_AC_TAGVAR(predep_objects, $1) \
 
8684
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
8685
    _LT_AC_TAGVAR(predeps, $1) \
 
8686
    _LT_AC_TAGVAR(postdeps, $1) \
 
8687
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
8688
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
8689
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
8690
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
8691
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
8692
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
8693
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
8694
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
8695
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
8696
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
8697
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
8698
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
8699
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
8700
    _LT_AC_TAGVAR(include_expsyms, $1); do
 
8701
 
 
8702
    case $var in
 
8703
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
8704
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
8705
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
8706
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
8707
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
8708
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
8709
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
8710
    postinstall_cmds | postuninstall_cmds | \
 
8711
    old_postinstall_cmds | old_postuninstall_cmds | \
 
8712
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
8713
      # Double-quote double-evaled strings.
 
8714
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 
8715
      ;;
 
8716
    *)
 
8717
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 
8718
      ;;
 
8719
    esac
 
8720
  done
 
8721
 
 
8722
  case $lt_echo in
 
8723
  *'\[$]0 --fallback-echo"')
 
8724
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
8725
    ;;
 
8726
  esac
 
8727
 
 
8728
ifelse([$1], [],
 
8729
  [cfgfile="${ofile}T"
 
8730
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
8731
  $rm -f "$cfgfile"
 
8732
  AC_MSG_NOTICE([creating $ofile])],
 
8733
  [cfgfile="$ofile"])
 
8734
 
 
8735
  cat <<__EOF__ >> "$cfgfile"
 
8736
ifelse([$1], [],
 
8737
[#! $SHELL
 
8738
 
 
8739
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
8740
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 
8741
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
8742
#
 
8743
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
8744
# Free Software Foundation, Inc.
 
8745
#
 
8746
# This file is part of GNU Libtool:
 
8747
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
8748
#
 
8749
# This program is free software; you can redistribute it and/or modify
 
8750
# it under the terms of the GNU General Public License as published by
 
8751
# the Free Software Foundation; either version 2 of the License, or
 
8752
# (at your option) any later version.
 
8753
#
 
8754
# This program is distributed in the hope that it will be useful, but
 
8755
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
8756
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
8757
# General Public License for more details.
 
8758
#
 
8759
# You should have received a copy of the GNU General Public License
 
8760
# along with this program; if not, write to the Free Software
 
8761
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
8762
#
 
8763
# As a special exception to the GNU General Public License, if you
 
8764
# distribute this file as part of a program that contains a
 
8765
# configuration script generated by Autoconf, you may include it under
 
8766
# the same distribution terms that you use for the rest of that program.
 
8767
 
 
8768
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
 
8769
Xsed="sed -e s/^X//"
 
8770
 
 
8771
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
8772
# if CDPATH is set.
 
8773
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
8774
 
 
8775
# The names of the tagged configurations supported by this script.
 
8776
available_tags=
 
8777
 
 
8778
# ### BEGIN LIBTOOL CONFIG],
 
8779
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
 
8780
 
 
8781
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
8782
 
 
8783
# Shell to use when invoking shell scripts.
 
8784
SHELL=$lt_SHELL
 
8785
 
 
8786
# Whether or not to build shared libraries.
 
8787
build_libtool_libs=$enable_shared
 
8788
 
 
8789
# Whether or not to build static libraries.
 
8790
build_old_libs=$enable_static
 
8791
 
 
8792
# Whether or not to add -lc for building shared libraries.
 
8793
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
8794
 
 
8795
# Whether or not to optimize for fast installation.
 
8796
fast_install=$enable_fast_install
 
8797
 
 
8798
# The host system.
 
8799
host_alias=$host_alias
 
8800
host=$host
 
8801
 
 
8802
# An echo program that does not interpret backslashes.
 
8803
echo=$lt_echo
 
8804
 
 
8805
# The archiver.
 
8806
AR=$lt_AR
 
8807
AR_FLAGS=$lt_AR_FLAGS
 
8808
 
 
8809
# A C compiler.
 
8810
LTCC=$lt_LTCC
 
8811
 
 
8812
# A language-specific compiler.
 
8813
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 
8814
 
 
8815
# Is the compiler the GNU C compiler?
 
8816
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
8817
 
 
8818
# The linker used to build libraries.
 
8819
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
 
8820
 
 
8821
# Whether we need hard or soft links.
 
8822
LN_S=$lt_LN_S
 
8823
 
 
8824
# A BSD-compatible nm program.
 
8825
NM=$lt_NM
 
8826
 
 
8827
# A sed program that does not truncate output.
 
8828
SED=$lt_SED
 
8829
 
 
8830
# A symbol stripping program
 
8831
STRIP=$STRIP
 
8832
 
 
8833
# Used to examine libraries when file_magic_cmd begins "file"
 
8834
MAGIC_CMD=$MAGIC_CMD
 
8835
 
 
8836
# Used on cygwin: DLL creation program.
 
8837
DLLTOOL="$DLLTOOL"
 
8838
 
 
8839
# Used on cygwin: object dumper.
 
8840
OBJDUMP="$OBJDUMP"
 
8841
 
 
8842
# Used on cygwin: assembler.
 
8843
AS="$AS"
 
8844
 
 
8845
# The name of the directory that contains temporary libtool files.
 
8846
objdir=$objdir
 
8847
 
 
8848
# How to create reloadable object files.
 
8849
reload_flag=$lt_reload_flag
 
8850
reload_cmds=$lt_reload_cmds
 
8851
 
 
8852
# How to pass a linker flag through the compiler.
 
8853
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
8854
 
 
8855
# Object file suffix (normally "o").
 
8856
objext="$ac_objext"
 
8857
 
 
8858
# Old archive suffix (normally "a").
 
8859
libext="$libext"
 
8860
 
 
8861
# Executable file suffix (normally "").
 
8862
exeext="$exeext"
 
8863
 
 
8864
# Additional compiler flags for building library objects.
 
8865
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
 
8866
pic_mode=$pic_mode
 
8867
 
 
8868
# What is the maximum length of a command?
 
8869
max_cmd_len=$lt_cv_sys_max_cmd_len
 
8870
 
 
8871
# Does compiler simultaneously support -c and -o options?
 
8872
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
8873
 
 
8874
# Must we lock files when doing compilation ?
 
8875
need_locks=$lt_need_locks
 
8876
 
 
8877
# Do we need the lib prefix for modules?
 
8878
need_lib_prefix=$need_lib_prefix
 
8879
 
 
8880
# Do we need a version for libraries?
 
8881
need_version=$need_version
 
8882
 
 
8883
# Whether dlopen is supported.
 
8884
dlopen_support=$enable_dlopen
 
8885
 
 
8886
# Whether dlopen of programs is supported.
 
8887
dlopen_self=$enable_dlopen_self
 
8888
 
 
8889
# Whether dlopen of statically linked programs is supported.
 
8890
dlopen_self_static=$enable_dlopen_self_static
 
8891
 
 
8892
# Compiler flag to prevent dynamic linking.
 
8893
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
 
8894
 
 
8895
# Compiler flag to turn off builtin functions.
 
8896
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
 
8897
 
 
8898
# Compiler flag to allow reflexive dlopens.
 
8899
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
 
8900
 
 
8901
# Compiler flag to generate shared objects directly from archives.
 
8902
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
 
8903
 
 
8904
# Compiler flag to generate thread-safe objects.
 
8905
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
 
8906
 
 
8907
# Library versioning type.
 
8908
version_type=$version_type
 
8909
 
 
8910
# Format of library name prefix.
 
8911
libname_spec=$lt_libname_spec
 
8912
 
 
8913
# List of archive names.  First name is the real one, the rest are links.
 
8914
# The last name is the one that the linker finds with -lNAME.
 
8915
library_names_spec=$lt_library_names_spec
 
8916
 
 
8917
# The coded name of the library, if different from the real name.
 
8918
soname_spec=$lt_soname_spec
 
8919
 
 
8920
# Commands used to build and install an old-style archive.
 
8921
RANLIB=$lt_RANLIB
 
8922
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
 
8923
old_postinstall_cmds=$lt_old_postinstall_cmds
 
8924
old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
8925
 
 
8926
# Create an old-style archive from a shared archive.
 
8927
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
 
8928
 
 
8929
# Create a temporary old-style archive to link instead of a shared archive.
 
8930
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
 
8931
 
 
8932
# Commands used to build and install a shared archive.
 
8933
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
8934
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
 
8935
postinstall_cmds=$lt_postinstall_cmds
 
8936
postuninstall_cmds=$lt_postuninstall_cmds
 
8937
 
 
8938
# Commands to strip libraries.
 
8939
old_striplib=$lt_old_striplib
 
8940
striplib=$lt_striplib
 
8941
 
 
8942
# Dependencies to place before the objects being linked to create a
 
8943
# shared library.
 
8944
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
8945
 
 
8946
# Dependencies to place after the objects being linked to create a
 
8947
# shared library.
 
8948
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
8949
 
 
8950
# Dependencies to place before the objects being linked to create a
 
8951
# shared library.
 
8952
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
8953
 
 
8954
# Dependencies to place after the objects being linked to create a
 
8955
# shared library.
 
8956
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
8957
 
 
8958
# The library search path used internally by the compiler when linking
 
8959
# a shared library.
 
8960
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
8961
 
 
8962
# Method to check whether dependent libraries are shared objects.
 
8963
deplibs_check_method=$lt_deplibs_check_method
 
8964
 
 
8965
# Command to use when deplibs_check_method == file_magic.
 
8966
file_magic_cmd=$lt_file_magic_cmd
 
8967
 
 
8968
# Flag that allows shared libraries with undefined symbols to be built.
 
8969
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
8970
 
 
8971
# Flag that forces no undefined symbols.
 
8972
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
 
8973
 
 
8974
# Commands used to finish a libtool library installation in a directory.
 
8975
finish_cmds=$lt_finish_cmds
 
8976
 
 
8977
# Same as above, but a single script fragment to be evaled but not shown.
 
8978
finish_eval=$lt_finish_eval
 
8979
 
 
8980
# Take the output of nm and produce a listing of raw symbols and C names.
 
8981
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
8982
 
 
8983
# Transform the output of nm in a proper C declaration
 
8984
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
8985
 
 
8986
# Transform the output of nm in a C name address pair
 
8987
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
8988
 
 
8989
# This is the shared library runtime path variable.
 
8990
runpath_var=$runpath_var
 
8991
 
 
8992
# This is the shared library path variable.
 
8993
shlibpath_var=$shlibpath_var
 
8994
 
 
8995
# Is shlibpath searched before the hard-coded library search path?
 
8996
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
8997
 
 
8998
# How to hardcode a shared library path into an executable.
 
8999
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
 
9000
 
 
9001
# Whether we should hardcode library paths into libraries.
 
9002
hardcode_into_libs=$hardcode_into_libs
 
9003
 
 
9004
# Flag to hardcode \$libdir into a binary during linking.
 
9005
# This must work even if \$libdir does not exist.
 
9006
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
9007
 
 
9008
# Whether we need a single -rpath flag with a separated argument.
 
9009
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
 
9010
 
 
9011
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 
9012
# resulting binary.
 
9013
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
 
9014
 
 
9015
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 
9016
# resulting binary.
 
9017
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
 
9018
 
 
9019
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 
9020
# the resulting binary.
 
9021
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
9022
 
 
9023
# Variables whose values should be saved in libtool wrapper scripts and
 
9024
# restored at relink time.
 
9025
variables_saved_for_relink="$variables_saved_for_relink"
 
9026
 
 
9027
# Whether libtool must link a program against all its dependency libraries.
 
9028
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
 
9029
 
 
9030
# Compile-time system search path for libraries
 
9031
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
9032
 
 
9033
# Run-time system search path for libraries
 
9034
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
9035
 
 
9036
# Fix the shell variable \$srcfile for the compiler.
 
9037
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
 
9038
 
 
9039
# Set to yes if exported symbols are required.
 
9040
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
 
9041
 
 
9042
# The commands to list exported symbols.
 
9043
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
 
9044
 
 
9045
# The commands to extract the exported symbol list from a shared archive.
 
9046
extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
9047
 
 
9048
# Symbols that should not be listed in the preloaded symbols.
 
9049
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
 
9050
 
 
9051
# Symbols that must always be exported.
 
9052
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
 
9053
 
 
9054
ifelse([$1],[],
 
9055
[# ### END LIBTOOL CONFIG],
 
9056
[# ### END LIBTOOL TAG CONFIG: $tagname])
 
9057
 
 
9058
__EOF__
 
9059
 
 
9060
ifelse([$1],[], [
 
9061
  case $host_os in
 
9062
  aix3*)
 
9063
    cat <<\EOF >> "$cfgfile"
 
9064
 
 
9065
# AIX sometimes has problems with the GCC collect2 program.  For some
 
9066
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
9067
# vanish in a puff of smoke.
 
9068
if test "X${COLLECT_NAMES+set}" != Xset; then
 
9069
  COLLECT_NAMES=
 
9070
  export COLLECT_NAMES
 
9071
fi
 
9072
EOF
 
9073
    ;;
 
9074
 
 
9075
  cygwin* | mingw* | pw32* | os2*)
 
9076
    cat <<'EOF' >> "$cfgfile"
 
9077
    # This is a source program that is used to create dlls on Windows
 
9078
    # Don't remove nor modify the starting and closing comments
 
9079
    _LT_AC_FILE_LTDLL_C
 
9080
    # This is a source program that is used to create import libraries
 
9081
    # on Windows for dlls which lack them. Don't remove nor modify the
 
9082
    # starting and closing comments
 
9083
    _LT_AC_FILE_IMPGEN_C
 
9084
EOF
 
9085
    ;;
 
9086
  esac
 
9087
 
 
9088
  # We use sed instead of cat because bash on DJGPP gets confused if
 
9089
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
9090
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
9091
  # is reportedly fixed, but why not run on old versions too?
 
9092
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
9093
 
 
9094
  mv -f "$cfgfile" "$ofile" || \
 
9095
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
9096
  chmod +x "$ofile"
 
9097
])
 
9098
else
 
9099
  # If there is no Makefile yet, we rely on a make rule to execute
 
9100
  # `config.status --recheck' to rerun these tests and create the
 
9101
  # libtool script then.
 
9102
  test -f Makefile && make "$ltmain"
 
9103
fi
 
9104
])# AC_LIBTOOL_CONFIG
 
9105
 
 
9106
 
 
9107
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
9108
# -------------------------------------------
 
9109
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
9110
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
9111
 
 
9112
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
9113
 
 
9114
if test "$GCC" = yes; then
 
9115
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
9116
 
 
9117
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
9118
    lt_cv_prog_compiler_rtti_exceptions,
 
9119
    [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
 
9120
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
9121
fi
 
9122
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
9123
 
 
9124
 
 
9125
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
9126
# ---------------------------------
 
9127
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
9128
[AC_REQUIRE([AC_CANONICAL_HOST])
 
9129
AC_REQUIRE([AC_PROG_NM])
 
9130
AC_REQUIRE([AC_OBJEXT])
 
9131
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
9132
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
9133
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
9134
[
 
9135
# These are sane defaults that work on at least a few old systems.
 
9136
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
9137
 
 
9138
# Character class describing NM global symbol codes.
 
9139
symcode='[[BCDEGRST]]'
 
9140
 
 
9141
# Regexp to match symbols that can be accessed directly from C.
 
9142
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
9143
 
 
9144
# Transform the above into a raw symbol and a C symbol.
 
9145
symxfrm='\1 \2\3 \3'
 
9146
 
 
9147
# Transform an extracted symbol line into a proper C declaration
 
9148
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
9149
 
 
9150
# Transform an extracted symbol line into symbol name and symbol address
 
9151
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
9152
 
 
9153
# Define system-specific variables.
 
9154
case $host_os in
 
9155
aix*)
 
9156
  symcode='[[BCDT]]'
 
9157
  ;;
 
9158
cygwin* | mingw* | pw32*)
 
9159
  symcode='[[ABCDGISTW]]'
 
9160
  ;;
 
9161
hpux*) # Its linker distinguishes data from code symbols
 
9162
  if test "$host_cpu" = ia64; then
 
9163
    symcode='[[ABCDEGRST]]'
 
9164
  fi
 
9165
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
9166
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
9167
  ;;
 
9168
irix* | nonstopux*)
 
9169
  symcode='[[BCDEGRST]]'
 
9170
  ;;
 
9171
solaris* | sysv5*)
 
9172
  symcode='[[BDT]]'
 
9173
  ;;
 
9174
sysv4)
 
9175
  symcode='[[DFNSTU]]'
 
9176
  ;;
 
9177
esac
 
9178
 
 
9179
# Handle CRLF in mingw tool chain
 
9180
opt_cr=
 
9181
case $host_os in
 
9182
mingw*)
 
9183
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
9184
  ;;
 
9185
esac
 
9186
 
 
9187
# If we're using GNU nm, then use its standard symbol codes.
 
9188
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
 
9189
  symcode='[[ABCDGISTW]]'
 
9190
fi
 
9191
 
 
9192
# Try without a prefix undercore, then with it.
 
9193
for ac_symprfx in "" "_"; do
 
9194
 
 
9195
  # Write the raw and C identifiers.
 
9196
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
9197
 
 
9198
  # Check to see that the pipe works correctly.
 
9199
  pipe_works=no
 
9200
 
 
9201
  rm -f conftest*
 
9202
  cat > conftest.$ac_ext <<EOF
 
9203
#ifdef __cplusplus
 
9204
extern "C" {
 
9205
#endif
 
9206
char nm_test_var;
 
9207
void nm_test_func(){}
 
9208
#ifdef __cplusplus
 
9209
}
 
9210
#endif
 
9211
int main(){nm_test_var='a';nm_test_func();return(0);}
 
9212
EOF
 
9213
 
 
9214
  if AC_TRY_EVAL(ac_compile); then
 
9215
    # Now try to grab the symbols.
 
9216
    nlist=conftest.nm
 
9217
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
9218
      # Try sorting and uniquifying the output.
 
9219
      if sort "$nlist" | uniq > "$nlist"T; then
 
9220
        mv -f "$nlist"T "$nlist"
 
9221
      else
 
9222
        rm -f "$nlist"T
 
9223
      fi
 
9224
 
 
9225
      # Make sure that we snagged all the symbols we need.
 
9226
      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
 
9227
        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
 
9228
          cat <<EOF > conftest.$ac_ext
 
9229
#ifdef __cplusplus
 
9230
extern "C" {
 
9231
#endif
 
9232
 
 
9233
EOF
 
9234
          # Now generate the symbol file.
 
9235
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
9236
 
 
9237
          cat <<EOF >> conftest.$ac_ext
 
9238
#if defined (__STDC__) && __STDC__
 
9239
# define lt_ptr_t void *
 
9240
#else
 
9241
# define lt_ptr_t char *
 
9242
# define const
 
9243
#endif
 
9244
 
 
9245
/* The mapping between symbol names and symbols. */
 
9246
const struct {
 
9247
  const char *name;
 
9248
  lt_ptr_t address;
 
9249
}
 
9250
lt_preloaded_symbols[[]] =
 
9251
{
 
9252
EOF
 
9253
          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
9254
          cat <<\EOF >> conftest.$ac_ext
 
9255
  {0, (lt_ptr_t) 0}
 
9256
};
 
9257
 
 
9258
#ifdef __cplusplus
 
9259
}
 
9260
#endif
 
9261
EOF
 
9262
          # Now try linking the two files.
 
9263
          mv conftest.$ac_objext conftstm.$ac_objext
 
9264
          lt_save_LIBS="$LIBS"
 
9265
          lt_save_CFLAGS="$CFLAGS"
 
9266
          LIBS="conftstm.$ac_objext"
 
9267
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
9268
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
9269
            pipe_works=yes
 
9270
          fi
 
9271
          LIBS="$lt_save_LIBS"
 
9272
          CFLAGS="$lt_save_CFLAGS"
 
9273
        else
 
9274
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
9275
        fi
 
9276
      else
 
9277
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
9278
      fi
 
9279
    else
 
9280
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
9281
    fi
 
9282
  else
 
9283
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
9284
    cat conftest.$ac_ext >&5
 
9285
  fi
 
9286
  rm -f conftest* conftst*
 
9287
 
 
9288
  # Do not use the global_symbol_pipe unless it works.
 
9289
  if test "$pipe_works" = yes; then
 
9290
    break
 
9291
  else
 
9292
    lt_cv_sys_global_symbol_pipe=
 
9293
  fi
 
9294
done
 
9295
])
 
9296
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
9297
  lt_cv_sys_global_symbol_to_cdecl=
 
9298
fi
 
9299
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
9300
  AC_MSG_RESULT(failed)
 
9301
else
 
9302
  AC_MSG_RESULT(ok)
 
9303
fi
 
9304
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
9305
 
 
9306
 
 
9307
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
9308
# ---------------------------------------
 
9309
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
9310
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
9311
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9312
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
9313
 
 
9314
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
9315
 ifelse([$1],[CXX],[
 
9316
  # C++ specific cases for pic, static, wl, etc.
 
9317
  if test "$GXX" = yes; then
 
9318
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9319
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
9320
 
 
9321
    case $host_os in
 
9322
    aix*)
 
9323
      # All AIX code is PIC.
 
9324
      if test "$host_cpu" = ia64; then
 
9325
        # AIX 5 now supports IA64 processor
 
9326
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9327
      fi
 
9328
      ;;
 
9329
    amigaos*)
 
9330
      # FIXME: we need at least 68020 code to build shared libraries, but
 
9331
      # adding the `-m68020' flag to GCC prevents building anything better,
 
9332
      # like `-m68040'.
 
9333
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
9334
      ;;
 
9335
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
9336
      # PIC is the default for these OSes.
 
9337
      ;;
 
9338
    cygwin* | mingw* | os2*)
 
9339
      # This hack is so that the source file can tell whether it is being
 
9340
      # built for inclusion in a dll (and should export symbols for example).
 
9341
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
9342
      ;;
 
9343
    darwin* | rhapsody*)
 
9344
      # PIC is the default on this platform
 
9345
      # Common symbols not allowed in MH_DYLIB files
 
9346
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
9347
      ;;
 
9348
    *djgpp*)
 
9349
      # DJGPP does not support shared libraries at all
 
9350
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9351
      ;;
 
9352
    sysv4*MP*)
 
9353
      if test -d /usr/nec; then
 
9354
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
9355
      fi
 
9356
      ;;
 
9357
    hpux*)
 
9358
      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
 
9359
      if test "$host_cpu" != ia64; then
 
9360
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9361
      fi
 
9362
      ;;
 
9363
    *)
 
9364
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9365
      ;;
 
9366
    esac
 
9367
  else
 
9368
    case $host_os in
 
9369
      aix4* | aix5*)
 
9370
        # All AIX code is PIC.
 
9371
        if test "$host_cpu" = ia64; then
 
9372
          # AIX 5 now supports IA64 processor
 
9373
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9374
        else
 
9375
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
9376
        fi
 
9377
        ;;
 
9378
      chorus*)
 
9379
        case $cc_basename in
 
9380
        cxch68)
 
9381
          # Green Hills C++ Compiler
 
9382
          # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 
9383
          ;;
 
9384
        esac
 
9385
        ;;
 
9386
      dgux*)
 
9387
        case $cc_basename in
 
9388
          ec++)
 
9389
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9390
            ;;
 
9391
          ghcx)
 
9392
            # Green Hills C++ Compiler
 
9393
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9394
            ;;
 
9395
          *)
 
9396
            ;;
 
9397
        esac
 
9398
        ;;
 
9399
      freebsd*)
 
9400
        # FreeBSD uses GNU C++
 
9401
        ;;
 
9402
      hpux9* | hpux10* | hpux11*)
 
9403
        case $cc_basename in
 
9404
          CC)
 
9405
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9406
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
9407
            if test "$host_cpu" != ia64; then
 
9408
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
9409
            fi
 
9410
            ;;
 
9411
          aCC)
 
9412
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9413
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
9414
            if test "$host_cpu" != ia64; then
 
9415
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
9416
            fi
 
9417
            ;;
 
9418
          *)
 
9419
            ;;
 
9420
        esac
 
9421
        ;;
 
9422
      irix5* | irix6* | nonstopux*)
 
9423
        case $cc_basename in
 
9424
          CC)
 
9425
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9426
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9427
            # CC pic flag -KPIC is the default.
 
9428
            ;;
 
9429
          *)
 
9430
            ;;
 
9431
        esac
 
9432
        ;;
 
9433
      linux*)
 
9434
        case $cc_basename in
 
9435
          KCC)
 
9436
            # KAI C++ Compiler
 
9437
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
9438
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9439
            ;;
 
9440
          cxx)
 
9441
            # Compaq C++
 
9442
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
9443
            # Linux and Compaq Tru64 Unix objects are PIC.
 
9444
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9445
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9446
            ;;
 
9447
          *)
 
9448
            ;;
 
9449
        esac
 
9450
        ;;
 
9451
      lynxos*)
 
9452
        ;;
 
9453
      m88k*)
 
9454
        ;;
 
9455
      mvs*)
 
9456
        case $cc_basename in
 
9457
          cxx)
 
9458
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
9459
            ;;
 
9460
          *)
 
9461
            ;;
 
9462
        esac
 
9463
        ;;
 
9464
      netbsd*)
 
9465
        ;;
 
9466
      osf3* | osf4* | osf5*)
 
9467
        case $cc_basename in
 
9468
          KCC)
 
9469
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
9470
            ;;
 
9471
          RCC)
 
9472
            # Rational C++ 2.4.1
 
9473
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9474
            ;;
 
9475
          cxx)
 
9476
            # Digital/Compaq C++
 
9477
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9478
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
9479
            # Linux and Compaq Tru64 Unix objects are PIC.
 
9480
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9481
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9482
            ;;
 
9483
          *)
 
9484
            ;;
 
9485
        esac
 
9486
        ;;
 
9487
      psos*)
 
9488
        ;;
 
9489
      sco*)
 
9490
        case $cc_basename in
 
9491
          CC)
 
9492
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9493
            ;;
 
9494
          *)
 
9495
            ;;
 
9496
        esac
 
9497
        ;;
 
9498
      solaris*)
 
9499
        case $cc_basename in
 
9500
          CC)
 
9501
            # Sun C++ 4.2, 5.x and Centerline C++
 
9502
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9503
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9504
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
9505
            ;;
 
9506
          gcx)
 
9507
            # Green Hills C++ Compiler
 
9508
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
9509
            ;;
 
9510
          *)
 
9511
            ;;
 
9512
        esac
 
9513
        ;;
 
9514
      sunos4*)
 
9515
        case $cc_basename in
 
9516
          CC)
 
9517
            # Sun C++ 4.x
 
9518
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9519
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9520
            ;;
 
9521
          lcc)
 
9522
            # Lucid
 
9523
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9524
            ;;
 
9525
          *)
 
9526
            ;;
 
9527
        esac
 
9528
        ;;
 
9529
      tandem*)
 
9530
        case $cc_basename in
 
9531
          NCC)
 
9532
            # NonStop-UX NCC 3.20
 
9533
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9534
            ;;
 
9535
          *)
 
9536
            ;;
 
9537
        esac
 
9538
        ;;
 
9539
      unixware*)
 
9540
        ;;
 
9541
      vxworks*)
 
9542
        ;;
 
9543
      *)
 
9544
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
9545
        ;;
 
9546
    esac
 
9547
  fi
 
9548
],
 
9549
[
 
9550
  if test "$GCC" = yes; then
 
9551
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9552
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
9553
 
 
9554
    case $host_os in
 
9555
      aix*)
 
9556
      # All AIX code is PIC.
 
9557
      if test "$host_cpu" = ia64; then
 
9558
        # AIX 5 now supports IA64 processor
 
9559
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9560
      fi
 
9561
      ;;
 
9562
 
 
9563
    amigaos*)
 
9564
      # FIXME: we need at least 68020 code to build shared libraries, but
 
9565
      # adding the `-m68020' flag to GCC prevents building anything better,
 
9566
      # like `-m68040'.
 
9567
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
9568
      ;;
 
9569
 
 
9570
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
9571
      # PIC is the default for these OSes.
 
9572
      ;;
 
9573
 
 
9574
    cygwin* | mingw* | pw32* | os2*)
 
9575
      # This hack is so that the source file can tell whether it is being
 
9576
      # built for inclusion in a dll (and should export symbols for example).
 
9577
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
9578
      ;;
 
9579
 
 
9580
    darwin* | rhapsody*)
 
9581
      # PIC is the default on this platform
 
9582
      # Common symbols not allowed in MH_DYLIB files
 
9583
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
9584
      ;;
 
9585
 
 
9586
    msdosdjgpp*)
 
9587
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
9588
      # on systems that don't support them.
 
9589
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
9590
      enable_shared=no
 
9591
      ;;
 
9592
 
 
9593
    sysv4*MP*)
 
9594
      if test -d /usr/nec; then
 
9595
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
9596
      fi
 
9597
      ;;
 
9598
 
 
9599
    hpux*)
 
9600
      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
 
9601
      if test "$host_cpu" != ia64; then
 
9602
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9603
      fi
 
9604
      ;;
 
9605
 
 
9606
    *)
 
9607
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9608
      ;;
 
9609
    esac
 
9610
  else
 
9611
    # PORTME Check for flag to pass linker flags through the system compiler.
 
9612
    case $host_os in
 
9613
    aix*)
 
9614
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9615
      if test "$host_cpu" = ia64; then
 
9616
        # AIX 5 now supports IA64 processor
 
9617
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9618
      else
 
9619
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
9620
      fi
 
9621
      ;;
 
9622
 
 
9623
    cygwin* | mingw* | pw32* | os2*)
 
9624
      # This hack is so that the source file can tell whether it is being
 
9625
      # built for inclusion in a dll (and should export symbols for example).
 
9626
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
9627
      ;;
 
9628
 
 
9629
    hpux9* | hpux10* | hpux11*)
 
9630
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9631
      if test "$host_cpu" != ia64; then
 
9632
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
9633
      fi
 
9634
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
9635
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
9636
      ;;
 
9637
 
 
9638
    irix5* | irix6* | nonstopux*)
 
9639
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9640
      # PIC (with -KPIC) is the default.
 
9641
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9642
      ;;
 
9643
 
 
9644
    newsos6)
 
9645
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9646
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9647
      ;;
 
9648
 
 
9649
    osf3* | osf4* | osf5*)
 
9650
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9651
      # All OSF/1 code is PIC.
 
9652
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9653
      ;;
 
9654
 
 
9655
    sco3.2v5*)
 
9656
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
 
9657
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
 
9658
      ;;
 
9659
 
 
9660
    solaris*)
 
9661
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9662
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9663
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9664
      ;;
 
9665
 
 
9666
    sunos4*)
 
9667
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
9668
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
9669
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9670
      ;;
 
9671
 
 
9672
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
9673
      if test "x$host_vendor" = xsni; then
 
9674
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
 
9675
      else
 
9676
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9677
      fi
 
9678
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9679
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9680
      ;;
 
9681
 
 
9682
    sysv4*MP*)
 
9683
      if test -d /usr/nec ;then
 
9684
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
9685
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9686
      fi
 
9687
      ;;
 
9688
 
 
9689
    uts4*)
 
9690
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9691
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9692
      ;;
 
9693
 
 
9694
    *)
 
9695
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
9696
      ;;
 
9697
    esac
 
9698
  fi
 
9699
])
 
9700
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
9701
 
 
9702
#
 
9703
# Check to make sure the PIC flag actually works.
 
9704
#
 
9705
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
9706
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
9707
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
9708
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
 
9709
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
9710
     "" | " "*) ;;
 
9711
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
9712
     esac],
 
9713
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9714
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
9715
fi
 
9716
case "$host_os" in
 
9717
  # For platforms which do not support PIC, -DPIC is meaningless:
 
9718
  *djgpp*)
 
9719
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9720
    ;;
 
9721
  *)
 
9722
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
 
9723
    ;;
 
9724
esac
 
9725
])
 
9726
 
 
9727
 
 
9728
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
9729
# ------------------------------------
 
9730
# See if the linker supports building shared libraries.
 
9731
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
9732
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
9733
ifelse([$1],[CXX],[
 
9734
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
9735
  case $host_os in
 
9736
  aix4* | aix5*)
 
9737
    # If we're using GNU nm, then we don't want the "-C" option.
 
9738
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
9739
    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
 
9740
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
9741
    else
 
9742
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
9743
    fi
 
9744
    ;;
 
9745
  cygwin* | mingw* | pw32*)
 
9746
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
9747
  ;;
 
9748
  *)
 
9749
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
9750
  ;;
 
9751
  esac
 
9752
],[
 
9753
  runpath_var=
 
9754
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
9755
 
 
9756
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
9757
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
 
9758
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
9759
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
9760
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
9761
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
9762
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
9763
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
9764
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
9765
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
9766
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
9767
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
9768
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
9769
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
9770
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
9771
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
9772
  # include_expsyms should be a list of space-separated symbols to be *always*
 
9773
  # included in the symbol list
 
9774
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
9775
  # exclude_expsyms can be an egrep regular expression of symbols to exclude
 
9776
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
9777
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
9778
  # as well as any symbol that contains `d'.
 
9779
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
9780
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
9781
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
9782
  # the symbol is explicitly referenced.  Since portable code cannot
 
9783
  # rely on this symbol name, it's probably fine to never include it in
 
9784
  # preloaded symbol tables.
 
9785
  extract_expsyms_cmds=
 
9786
 
 
9787
  case $host_os in
 
9788
  cygwin* | mingw* | pw32*)
 
9789
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
9790
    # When not using gcc, we currently assume that we are using
 
9791
    # Microsoft Visual C++.
 
9792
    if test "$GCC" != yes; then
 
9793
      with_gnu_ld=no
 
9794
    fi
 
9795
    ;;
 
9796
  openbsd*)
 
9797
    with_gnu_ld=no
 
9798
    ;;
 
9799
  esac
 
9800
 
 
9801
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
9802
  if test "$with_gnu_ld" = yes; then
 
9803
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
9804
    wlarc='${wl}'
 
9805
 
 
9806
    # See if GNU ld supports shared libraries.
 
9807
    case $host_os in
 
9808
    aix3* | aix4* | aix5*)
 
9809
      # On AIX/PPC, the GNU linker is very broken
 
9810
      if test "$host_cpu" != ia64; then
 
9811
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9812
        cat <<EOF 1>&2
 
9813
 
 
9814
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
9815
*** to be unable to reliably create shared libraries on AIX.
 
9816
*** Therefore, libtool is disabling shared libraries support.  If you
 
9817
*** really care for shared libraries, you may want to modify your PATH
 
9818
*** so that a non-GNU linker is found, and then restart.
 
9819
 
 
9820
EOF
 
9821
      fi
 
9822
      ;;
 
9823
 
 
9824
    amigaos*)
 
9825
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
9826
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
9827
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
9828
 
 
9829
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
9830
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
9831
      # to version 4, is to share data among multiple programs linked
 
9832
      # with the same dynamic library.  Since this doesn't match the
 
9833
      # behavior of shared libraries on other platforms, we can't use
 
9834
      # them.
 
9835
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9836
      ;;
 
9837
 
 
9838
    beos*)
 
9839
      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
9840
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
9841
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
9842
        # support --undefined.  This deserves some investigation.  FIXME
 
9843
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9844
      else
 
9845
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9846
      fi
 
9847
      ;;
 
9848
 
 
9849
    cygwin* | mingw* | pw32*)
 
9850
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
 
9851
      # no search path for DLLs.
 
9852
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
9853
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
9854
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
9855
 
 
9856
      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
 
9857
        sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
 
9858
        test -f $output_objdir/impgen.exe || (cd $output_objdir && \
 
9859
        if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
 
9860
        else $CC -o impgen impgen.c ; fi)~
 
9861
        $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
 
9862
 
 
9863
      _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
 
9864
 
 
9865
      # cygwin and mingw dlls have different entry points and sets of symbols
 
9866
      # to exclude.
 
9867
      # FIXME: what about values for MSVC?
 
9868
      dll_entry=__cygwin_dll_entry@12
 
9869
      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
 
9870
      case $host_os in
 
9871
      mingw*)
 
9872
        # mingw values
 
9873
        dll_entry=_DllMainCRTStartup@12
 
9874
        dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
 
9875
        ;;
 
9876
      esac
 
9877
 
 
9878
      # mingw and cygwin differ, and it's simplest to just exclude the union
 
9879
      # of the two symbol sets.
 
9880
      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
 
9881
 
 
9882
      # recent cygwin and mingw systems supply a stub DllMain which the user
 
9883
      # can override, but on older systems we have to supply one (in ltdll.c)
 
9884
      if test "x$lt_cv_need_dllmain" = "xyes"; then
 
9885
        ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
 
9886
        ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
 
9887
        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
 
9888
      else
 
9889
        ltdll_obj=
 
9890
        ltdll_cmds=
 
9891
      fi
 
9892
 
 
9893
      # Extract the symbol export list from an `--export-all' def file,
 
9894
      # then regenerate the def file from the symbol export list, so that
 
9895
      # the compiled dll only exports the symbol export list.
 
9896
      # Be careful not to strip the DATA tag left by newer dlltools.
 
9897
      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
 
9898
        $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
 
9899
        sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
 
9900
 
 
9901
      # If the export-symbols file already is a .def file (1st line
 
9902
      # is EXPORTS), use it as is.
 
9903
      # If DATA tags from a recent dlltool are present, honour them!
 
9904
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
 
9905
          cp $export_symbols $output_objdir/$soname-def;
 
9906
        else
 
9907
          echo EXPORTS > $output_objdir/$soname-def;
 
9908
          _lt_hint=1;
 
9909
          cat $export_symbols | while read symbol; do
 
9910
           set dummy \$symbol;
 
9911
           case \[$]# in
 
9912
             2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
 
9913
             *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
 
9914
           esac;
 
9915
           _lt_hint=`expr 1 + \$_lt_hint`;
 
9916
          done;
 
9917
        fi~
 
9918
        '"$ltdll_cmds"'
 
9919
        $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
 
9920
        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
 
9921
        $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
 
9922
        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
 
9923
        $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
 
9924
      ;;
 
9925
 
 
9926
    netbsd*)
 
9927
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
9928
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
9929
        wlarc=
 
9930
      else
 
9931
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9932
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
9933
      fi
 
9934
      ;;
 
9935
 
 
9936
    solaris* | sysv5*)
 
9937
      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
 
9938
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9939
        cat <<EOF 1>&2
 
9940
 
 
9941
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
9942
*** create shared libraries on Solaris systems.  Therefore, libtool
 
9943
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
9944
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
9945
*** your PATH or compiler configuration so that the native linker is
 
9946
*** used, and then restart.
 
9947
 
 
9948
EOF
 
9949
      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
9950
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9951
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
9952
      else
 
9953
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9954
      fi
 
9955
      ;;
 
9956
 
 
9957
    sunos4*)
 
9958
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
9959
      wlarc=
 
9960
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
9961
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
9962
      ;;
 
9963
 
 
9964
    *)
 
9965
      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
9966
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9967
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
9968
      else
 
9969
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9970
      fi
 
9971
      ;;
 
9972
    esac
 
9973
 
 
9974
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
 
9975
      runpath_var=LD_RUN_PATH
 
9976
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
9977
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
9978
      case $host_os in
 
9979
      cygwin* | mingw* | pw32*)
 
9980
        # dlltool doesn't understand --whole-archive et. al.
 
9981
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
9982
        ;;
 
9983
      *)
 
9984
        # ancient GNU ld didn't support --whole-archive et. al.
 
9985
        if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
 
9986
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
9987
        else
 
9988
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
9989
        fi
 
9990
        ;;
 
9991
      esac
 
9992
    fi
 
9993
  else
 
9994
    # PORTME fill in a description of your system's linker (not GNU ld)
 
9995
    case $host_os in
 
9996
    aix3*)
 
9997
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
9998
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
9999
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 
10000
      # Note: this linker hardcodes the directories in LIBPATH if there
 
10001
      # are no directories specified by -L.
 
10002
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10003
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
10004
        # Neither direct hardcoding nor static linking is supported with a
 
10005
        # broken collect2.
 
10006
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
10007
      fi
 
10008
      ;;
 
10009
 
 
10010
    aix4* | aix5*)
 
10011
      if test "$host_cpu" = ia64; then
 
10012
        # On IA64, the linker does run time linking by default, so we don't
 
10013
        # have to do anything special.
 
10014
        aix_use_runtimelinking=no
 
10015
        exp_sym_flag='-Bexport'
 
10016
        no_entry_flag=""
 
10017
      else
 
10018
        # If we're using GNU nm, then we don't want the "-C" option.
 
10019
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
10020
        if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
 
10021
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
10022
        else
 
10023
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
10024
        fi
 
10025
 
 
10026
        # KDE requires run time linking.  Make it the default.
 
10027
        aix_use_runtimelinking=yes
 
10028
        exp_sym_flag='-bexport'
 
10029
        no_entry_flag='-bnoentry'
 
10030
      fi
 
10031
 
 
10032
      # When large executables or shared objects are built, AIX ld can
 
10033
      # have problems creating the table of contents.  If linking a library
 
10034
      # or program results in "error TOC overflow" add -mminimal-toc to
 
10035
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
10036
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
10037
 
 
10038
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
10039
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10040
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
10041
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10042
 
 
10043
      if test "$GCC" = yes; then
 
10044
        case $host_os in aix4.[012]|aix4.[012].*)
 
10045
        # We only want to do this on AIX 4.2 and lower, the check
 
10046
        # below for broken collect2 doesn't work under 4.3+
 
10047
          collect2name=`${CC} -print-prog-name=collect2`
 
10048
          if test -f "$collect2name" && \
 
10049
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
10050
          then
 
10051
          # We have reworked collect2
 
10052
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10053
          else
 
10054
          # We have old collect2
 
10055
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
10056
          # It fails to find uninstalled libraries when the uninstalled
 
10057
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
10058
          # to unsupported forces relinking
 
10059
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10060
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10061
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
10062
          fi
 
10063
        esac
 
10064
        shared_flag='-shared'
 
10065
      else
 
10066
        # not using gcc
 
10067
        if test "$host_cpu" = ia64; then
 
10068
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
10069
        # chokes on -Wl,-G. The following line is correct:
 
10070
          shared_flag='-G'
 
10071
        else
 
10072
        if test "$aix_use_runtimelinking" = yes; then
 
10073
            shared_flag='-qmkshrobj ${wl}-G'
 
10074
          else
 
10075
            shared_flag='-qmkshrobj'
 
10076
        fi
 
10077
        fi
 
10078
      fi
 
10079
 
 
10080
      # Let the compiler handle the export list.
 
10081
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
10082
      if test "$aix_use_runtimelinking" = yes; then
 
10083
        # Warning - without using the other runtime loading flags (-brtl),
 
10084
        # -berok will link without error, but may produce a broken library.
 
10085
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
10086
       # Determine the default libpath from the value encoded in an empty executable.
 
10087
        _LT_AC_SYS_LIBPATH_AIX
 
10088
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
10089
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
 
10090
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
10091
       else
 
10092
        if test "$host_cpu" = ia64; then
 
10093
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
10094
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
10095
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
10096
        else
 
10097
         # Determine the default libpath from the value encoded in an empty executable.
 
10098
         _LT_AC_SYS_LIBPATH_AIX
 
10099
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
10100
          # Warning - without using the other run time loading flags,
 
10101
          # -berok will link without error, but may produce a broken library.
 
10102
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
10103
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
10104
          # -bexpall does not export symbols beginning with underscore (_)
 
10105
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
10106
          # Exported symbols can be pulled into shared objects from archives
 
10107
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
10108
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
10109
          # This is similar to how AIX traditionally builds it's shared libraries.
 
10110
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
10111
        fi
 
10112
      fi
 
10113
      ;;
 
10114
 
 
10115
    amigaos*)
 
10116
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
10117
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10118
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10119
      # see comment about different semantics on the GNU ld section
 
10120
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10121
      ;;
 
10122
 
 
10123
    bsdi4*)
 
10124
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
10125
      ;;
 
10126
 
 
10127
    cygwin* | mingw* | pw32*)
 
10128
      # When not using gcc, we currently assume that we are using
 
10129
      # Microsoft Visual C++.
 
10130
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
10131
      # no search path for DLLs.
 
10132
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
10133
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10134
      # Tell ltmain to make .lib files, not .a files.
 
10135
      libext=lib
 
10136
      # FIXME: Setting linknames here is a bad hack.
 
10137
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
10138
      # The linker will automatically build a .lib file if we build a DLL.
 
10139
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
10140
      # FIXME: Should let the user specify the lib program.
 
10141
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
10142
      fix_srcfile_path='`cygpath -w "$srcfile"`'
 
10143
      ;;
 
10144
 
 
10145
    darwin* | rhapsody*)
 
10146
      case "$host_os" in
 
10147
      rhapsody* | darwin1.[[012]])
 
10148
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
10149
        ;;
 
10150
      *) # Darwin 1.3 on
 
10151
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
10152
        ;;
 
10153
      esac
 
10154
 
 
10155
      # FIXME: Relying on posixy $() will cause problems for
 
10156
      #        cross-compilation, but unfortunately the echo tests do not
 
10157
      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
 
10158
      #        `"' quotes if we put them in here... so don't!
 
10159
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
 
10160
      # We need to add '_' to the symbols in $export_symbols first
 
10161
      #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
 
10162
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10163
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10164
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
10165
      ;;
 
10166
 
 
10167
    dgux*)
 
10168
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10169
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10170
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10171
      ;;
 
10172
 
 
10173
    freebsd1*)
 
10174
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10175
      ;;
 
10176
 
 
10177
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
10178
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
10179
    # does not break anything, and helps significantly (at the cost of a little
 
10180
    # extra space).
 
10181
    freebsd2.2*)
 
10182
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
10183
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10184
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10185
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10186
      ;;
 
10187
 
 
10188
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
10189
    freebsd2*)
 
10190
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10191
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10192
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10193
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10194
      ;;
 
10195
 
 
10196
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
10197
    freebsd*)
 
10198
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
10199
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10200
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10201
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10202
      ;;
 
10203
 
 
10204
    hpux9* | hpux10* | hpux11*)
 
10205
      if test "$GCC" = yes; then
 
10206
        case $host_os in
 
10207
          hpux9*)
 
10208
            _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
10209
            ;;
 
10210
          *)
 
10211
            if test "$host_cpu" = ia64; then
 
10212
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10213
            else
 
10214
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
10215
            fi
 
10216
            ;;
 
10217
        esac
 
10218
      else
 
10219
        case $host_os in
 
10220
          hpux9*)
 
10221
            _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
10222
            ;;
 
10223
          *)
 
10224
            if test "$host_cpu" = ia64; then
 
10225
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10226
            else
 
10227
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
10228
            fi
 
10229
            ;;
 
10230
        esac
 
10231
      fi
 
10232
      if test "$host_cpu" = ia64; then
 
10233
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10234
        _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10235
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10236
      else
 
10237
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
10238
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10239
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10240
      fi
 
10241
      # hardcode_minus_L: Not really in the search PATH,
 
10242
      # but as the default location of the library.
 
10243
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10244
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10245
      ;;
 
10246
 
 
10247
    irix5* | irix6* | nonstopux*)
 
10248
      if test "$GCC" = yes; then
 
10249
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
10250
      else
 
10251
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
10252
      fi
 
10253
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10254
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10255
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10256
      ;;
 
10257
 
 
10258
    netbsd*)
 
10259
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
10260
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
10261
      else
 
10262
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
10263
      fi
 
10264
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10265
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10266
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10267
      ;;
 
10268
 
 
10269
    newsos6)
 
10270
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10271
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10272
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10273
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10274
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10275
      ;;
 
10276
 
 
10277
    openbsd*)
 
10278
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10279
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10280
 
 
10281
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
10282
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
10283
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
10284
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10285
      else
 
10286
       case $host_os in
 
10287
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
10288
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10289
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10290
           ;;
 
10291
         *)
 
10292
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
10293
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
10294
           ;;
 
10295
       esac
 
10296
      fi
 
10297
      ;;
 
10298
 
 
10299
    os2*)
 
10300
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10301
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10302
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10303
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
10304
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
10305
      ;;
 
10306
 
 
10307
    osf3*)
 
10308
      if test "$GCC" = yes; then
 
10309
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
10310
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
10311
      else
 
10312
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
10313
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
10314
      fi
 
10315
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10316
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10317
      ;;
 
10318
 
 
10319
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
10320
      if test "$GCC" = yes; then
 
10321
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
10322
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
10323
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10324
      else
 
10325
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
10326
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
10327
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 
10328
        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
 
10329
 
 
10330
        # Both c and cxx compiler support -rpath directly
 
10331
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
10332
      fi
 
10333
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10334
      ;;
 
10335
 
 
10336
    sco3.2v5*)
 
10337
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10338
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10339
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
10340
      runpath_var=LD_RUN_PATH
 
10341
      hardcode_runpath_var=yes
 
10342
      ;;
 
10343
 
 
10344
    solaris*)
 
10345
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
10346
      if test "$GCC" = yes; then
 
10347
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10348
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10349
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
10350
      else
 
10351
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10352
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10353
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
10354
      fi
 
10355
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10356
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10357
      case $host_os in
 
10358
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
10359
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
 
10360
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
10361
      esac
 
10362
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10363
      ;;
 
10364
 
 
10365
    sunos4*)
 
10366
      if test "x$host_vendor" = xsequent; then
 
10367
        # Use $CC to link under sequent, because it throws in some extra .o
 
10368
        # files that make .init and .fini sections work.
 
10369
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
10370
      else
 
10371
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
10372
      fi
 
10373
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10374
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10375
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10376
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10377
      ;;
 
10378
 
 
10379
    sysv4)
 
10380
      if test "x$host_vendor" = xsni; then
 
10381
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10382
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
10383
      else
 
10384
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10385
        _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
10386
      fi
 
10387
      runpath_var='LD_RUN_PATH'
 
10388
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10389
      ;;
 
10390
 
 
10391
    sysv4.3*)
 
10392
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10393
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10394
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
10395
      ;;
 
10396
 
 
10397
    sysv4*MP*)
 
10398
      if test -d /usr/nec; then
 
10399
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10400
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10401
        runpath_var=LD_RUN_PATH
 
10402
        hardcode_runpath_var=yes
 
10403
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
10404
      fi
 
10405
      ;;
 
10406
 
 
10407
    sysv4.2uw2*)
 
10408
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
10409
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10410
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
10411
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10412
      hardcode_runpath_var=yes
 
10413
      runpath_var=LD_RUN_PATH
 
10414
      ;;
 
10415
 
 
10416
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
 
10417
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
 
10418
      if test "$GCC" = yes; then
 
10419
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10420
      else
 
10421
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10422
      fi
 
10423
      runpath_var='LD_RUN_PATH'
 
10424
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10425
      ;;
 
10426
 
 
10427
    sysv5*)
 
10428
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
10429
      # $CC -shared without GNU ld will not create a library from C++
 
10430
      # object files and a static libstdc++, better avoid it by now
 
10431
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10432
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10433
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
10434
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
10435
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10436
      runpath_var='LD_RUN_PATH'
 
10437
      ;;
 
10438
 
 
10439
    uts4*)
 
10440
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10441
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10442
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10443
      ;;
 
10444
 
 
10445
    *)
 
10446
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10447
      ;;
 
10448
    esac
 
10449
  fi
 
10450
])
 
10451
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
10452
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
10453
 
 
10454
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
10455
if test "$GCC" = yes; then
 
10456
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
10457
fi
 
10458
 
 
10459
#
 
10460
# Do we need to explicitly link libc?
 
10461
#
 
10462
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
10463
if test "$enable_shared" = yes && test "$GCC" = yes; then
 
10464
  case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
10465
  *'~'*)
 
10466
    # FIXME: we may have to deal with multi-command sequences.
 
10467
    ;;
 
10468
  '$CC '*)
 
10469
    # Test whether the compiler implicitly links with -lc since on some
 
10470
    # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
10471
    # to ld, don't add -lc before -lgcc.
 
10472
    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
10473
    $rm conftest*
 
10474
    echo 'static int dummy;' > conftest.$ac_ext
 
10475
 
 
10476
    if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
10477
      soname=conftest
 
10478
      lib=conftest
 
10479
      libobjs=conftest.$ac_objext
 
10480
      deplibs=
 
10481
      wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
10482
      compiler_flags=-v
 
10483
      linker_flags=-v
 
10484
      verstring=
 
10485
      output_objdir=.
 
10486
      libname=conftest
 
10487
      lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
10488
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
10489
      if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
10490
      then
 
10491
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
10492
      else
 
10493
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
10494
      fi
 
10495
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
10496
    else
 
10497
      cat conftest.err 1>&5
 
10498
    fi
 
10499
    $rm conftest*
 
10500
    AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
10501
    ;;
 
10502
  esac
 
10503
fi
 
10504
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
10505
 
 
10506
 
 
10507
# _LT_AC_FILE_LTDLL_C
 
10508
# -------------------
 
10509
# Be careful that the start marker always follows a newline.
 
10510
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
 
10511
# /* ltdll.c starts here */
 
10512
# #define WIN32_LEAN_AND_MEAN
 
10513
# #include <windows.h>
 
10514
# #undef WIN32_LEAN_AND_MEAN
 
10515
# #include <stdio.h>
 
10516
#
 
10517
# #ifndef __CYGWIN__
 
10518
# #  ifdef __CYGWIN32__
 
10519
# #    define __CYGWIN__ __CYGWIN32__
 
10520
# #  endif
 
10521
# #endif
 
10522
#
 
10523
# #ifdef __cplusplus
 
10524
# extern "C" {
 
10525
# #endif
 
10526
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
 
10527
# #ifdef __cplusplus
 
10528
# }
 
10529
# #endif
 
10530
#
 
10531
# #ifdef __CYGWIN__
 
10532
# #include <cygwin/cygwin_dll.h>
 
10533
# DECLARE_CYGWIN_DLL( DllMain );
 
10534
# #endif
 
10535
# HINSTANCE __hDllInstance_base;
 
10536
#
 
10537
# BOOL APIENTRY
 
10538
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
 
10539
# {
 
10540
#   __hDllInstance_base = hInst;
 
10541
#   return TRUE;
 
10542
# }
 
10543
# /* ltdll.c ends here */
 
10544
])# _LT_AC_FILE_LTDLL_C
 
10545
 
 
10546
 
 
10547
# _LT_AC_FILE_IMPGEN_C
 
10548
# --------------------
 
10549
# Be careful that the start marker always follows a newline.
 
10550
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
 
10551
# /* impgen.c starts here */
 
10552
# /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
 
10553
#
 
10554
#  This file is part of GNU libtool.
 
10555
#
 
10556
#  This program is free software; you can redistribute it and/or modify
 
10557
#  it under the terms of the GNU General Public License as published by
 
10558
#  the Free Software Foundation; either version 2 of the License, or
 
10559
#  (at your option) any later version.
 
10560
#
 
10561
#  This program is distributed in the hope that it will be useful,
 
10562
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10563
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10564
#  GNU General Public License for more details.
 
10565
#
 
10566
#  You should have received a copy of the GNU General Public License
 
10567
#  along with this program; if not, write to the Free Software
 
10568
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
10569
#  */
 
10570
#
 
10571
# #include <stdio.h>            /* for printf() */
 
10572
# #include <unistd.h>           /* for open(), lseek(), read() */
 
10573
# #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
 
10574
# #include <string.h>           /* for strdup() */
 
10575
#
 
10576
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
 
10577
# #ifndef O_BINARY
 
10578
# #define O_BINARY 0
 
10579
# #endif
 
10580
#
 
10581
# static unsigned int
 
10582
# pe_get16 (fd, offset)
 
10583
#      int fd;
 
10584
#      int offset;
 
10585
# {
 
10586
#   unsigned char b[2];
 
10587
#   lseek (fd, offset, SEEK_SET);
 
10588
#   read (fd, b, 2);
 
10589
#   return b[0] + (b[1]<<8);
 
10590
# }
 
10591
#
 
10592
# static unsigned int
 
10593
# pe_get32 (fd, offset)
 
10594
#     int fd;
 
10595
#     int offset;
 
10596
# {
 
10597
#   unsigned char b[4];
 
10598
#   lseek (fd, offset, SEEK_SET);
 
10599
#   read (fd, b, 4);
 
10600
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
 
10601
# }
 
10602
#
 
10603
# static unsigned int
 
10604
# pe_as32 (ptr)
 
10605
#      void *ptr;
 
10606
# {
 
10607
#   unsigned char *b = ptr;
 
10608
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
 
10609
# }
 
10610
#
 
10611
# int
 
10612
# main (argc, argv)
 
10613
#     int argc;
 
10614
#     char *argv[];
 
10615
# {
 
10616
#     int dll;
 
10617
#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
 
10618
#     unsigned long export_rva, export_size, nsections, secptr, expptr;
 
10619
#     unsigned long name_rvas, nexp;
 
10620
#     unsigned char *expdata, *erva;
 
10621
#     char *filename, *dll_name;
 
10622
#
 
10623
#     filename = argv[1];
 
10624
#
 
10625
#     dll = open(filename, O_RDONLY|O_BINARY);
 
10626
#     if (dll < 1)
 
10627
#       return 1;
 
10628
#
 
10629
#     dll_name = filename;
 
10630
#
 
10631
#     for (i=0; filename[i]; i++)
 
10632
#       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
 
10633
#           dll_name = filename + i +1;
 
10634
#
 
10635
#     pe_header_offset = pe_get32 (dll, 0x3c);
 
10636
#     opthdr_ofs = pe_header_offset + 4 + 20;
 
10637
#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
 
10638
#
 
10639
#     if (num_entries < 1) /* no exports */
 
10640
#       return 1;
 
10641
#
 
10642
#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
 
10643
#     export_size = pe_get32 (dll, opthdr_ofs + 100);
 
10644
#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
 
10645
#     secptr = (pe_header_offset + 4 + 20 +
 
10646
#             pe_get16 (dll, pe_header_offset + 4 + 16));
 
10647
#
 
10648
#     expptr = 0;
 
10649
#     for (i = 0; i < nsections; i++)
 
10650
#     {
 
10651
#       char sname[8];
 
10652
#       unsigned long secptr1 = secptr + 40 * i;
 
10653
#       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
 
10654
#       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
 
10655
#       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
 
10656
#       lseek(dll, secptr1, SEEK_SET);
 
10657
#       read(dll, sname, 8);
 
10658
#       if (vaddr <= export_rva && vaddr+vsize > export_rva)
 
10659
#       {
 
10660
#           expptr = fptr + (export_rva - vaddr);
 
10661
#           if (export_rva + export_size > vaddr + vsize)
 
10662
#               export_size = vsize - (export_rva - vaddr);
 
10663
#           break;
 
10664
#       }
 
10665
#     }
 
10666
#
 
10667
#     expdata = (unsigned char*)malloc(export_size);
 
10668
#     lseek (dll, expptr, SEEK_SET);
 
10669
#     read (dll, expdata, export_size);
 
10670
#     erva = expdata - export_rva;
 
10671
#
 
10672
#     nexp = pe_as32 (expdata+24);
 
10673
#     name_rvas = pe_as32 (expdata+32);
 
10674
#
 
10675
#     printf ("EXPORTS\n");
 
10676
#     for (i = 0; i<nexp; i++)
 
10677
#     {
 
10678
#       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
 
10679
#       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
 
10680
#     }
 
10681
#
 
10682
#     return 0;
 
10683
# }
 
10684
# /* impgen.c ends here */
 
10685
])# _LT_AC_FILE_IMPGEN_C
 
10686
 
 
10687
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
10688
# ---------------------------------
 
10689
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
10690
 
 
10691
 
 
10692
# old names
6625
10693
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6626
10694
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6627
10695
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6630
10698
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6631
10699
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6632
10700
 
6633
 
dnl This is just to silence aclocal about the macro not being used
6634
 
ifelse([AC_DISABLE_FAST_INSTALL])dnl
 
10701
# This is just to silence aclocal about the macro not being used
 
10702
ifelse([AC_DISABLE_FAST_INSTALL])
6635
10703
 
6636
10704
AC_DEFUN([LT_AC_PROG_GCJ],
6637
10705
[AC_CHECK_TOOL(GCJ, gcj, no)
6638
10706
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6639
10707
  AC_SUBST(GCJFLAGS)
6640
10708
])
 
10709
 
 
10710
AC_DEFUN([LT_AC_PROG_RC],
 
10711
[AC_CHECK_TOOL(RC, windres, no)
 
10712
])
 
10713
 
 
10714
############################################################
 
10715
# NOTE: This macro has been submitted for inclusion into   #
 
10716
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
10717
#  a released version of Autoconf we should remove this    #
 
10718
#  macro and use it instead.                               #
 
10719
############################################################
 
10720
# LT_AC_PROG_SED
 
10721
# --------------
 
10722
# Check for a fully-functional sed program, that truncates
 
10723
# as few characters as possible.  Prefer GNU sed if found.
 
10724
AC_DEFUN([LT_AC_PROG_SED],
 
10725
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
10726
AC_CACHE_VAL(lt_cv_path_SED,
 
10727
[# Loop through the user's path and test for sed and gsed.
 
10728
# Then use that list of sed's as ones to test for truncation.
 
10729
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
10730
for as_dir in $PATH
 
10731
do
 
10732
  IFS=$as_save_IFS
 
10733
  test -z "$as_dir" && as_dir=.
 
10734
  for ac_prog in sed gsed; do
 
10735
    for ac_exec_ext in '' $ac_executable_extensions; do
 
10736
      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 
10737
        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
 
10738
      fi
 
10739
    done
 
10740
  done
 
10741
done
 
10742
 
 
10743
  # Create a temporary directory, and hook for its removal unless debugging.
 
10744
$debug ||
 
10745
{
 
10746
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
 
10747
  trap '{ (exit 1); exit 1; }' 1 2 13 15
 
10748
}
 
10749
 
 
10750
# Create a (secure) tmp directory for tmp files.
 
10751
: ${TMPDIR=/tmp}
 
10752
{
 
10753
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
 
10754
  test -n "$tmp" && test -d "$tmp"
 
10755
}  ||
 
10756
{
 
10757
  tmp=$TMPDIR/sed$$-$RANDOM
 
10758
  (umask 077 && mkdir $tmp)
 
10759
} ||
 
10760
{
 
10761
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
 
10762
   { (exit 1); exit 1; }
 
10763
}
 
10764
  _max=0
 
10765
  _count=0
 
10766
  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
10767
  # along with /bin/sed that truncates output.
 
10768
  for _sed in $_sed_list /usr/xpg4/bin/sed; do
 
10769
    test ! -f ${_sed} && break
 
10770
    cat /dev/null > "$tmp/sed.in"
 
10771
    _count=0
 
10772
    echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
 
10773
    # Check for GNU sed and select it if it is found.
 
10774
    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
 
10775
      lt_cv_path_SED=${_sed}
 
10776
      break;
 
10777
    fi
 
10778
    while true; do
 
10779
      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
 
10780
      mv "$tmp/sed.tmp" "$tmp/sed.in"
 
10781
      cp "$tmp/sed.in" "$tmp/sed.nl"
 
10782
      echo >>"$tmp/sed.nl"
 
10783
      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
 
10784
      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
 
10785
      # 10000 chars as input seems more than enough
 
10786
      test $_count -gt 10 && break
 
10787
      _count=`expr $_count + 1`
 
10788
      if test $_count -gt $_max; then
 
10789
        _max=$_count
 
10790
        lt_cv_path_SED=$_sed
 
10791
      fi
 
10792
    done
 
10793
  done
 
10794
  rm -rf "$tmp"
 
10795
])
 
10796
AC_MSG_RESULT([$SED])
 
10797
])