~ubuntu-branches/ubuntu/intrepid/gwenview/intrepid

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Christopher Martin
  • Date: 2004-06-13 18:55:04 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040613185504-net8ekxoswwvyxs9
Tags: 1.1.3-1
New upstream release. Translations now included.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl aclocal.m4 generated automatically by aclocal 1.4
2
 
 
3
 
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4
 
dnl This file is free software; the Free Software Foundation
5
 
dnl gives unlimited permission to copy and/or distribute it,
6
 
dnl with or without modifications, as long as this notice is preserved.
7
 
 
8
 
dnl This program is distributed in the hope that it will be useful,
9
 
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
 
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
 
dnl PARTICULAR PURPOSE.
 
1
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
4
# Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
12
13
 
13
14
 
14
15
dnl    This file is part of the KDE libraries/packages
32
33
 
33
34
dnl IMPORTANT NOTE:
34
35
dnl Please do not modify this file unless you expect your modifications to be
35
 
dnl carried into every other module in the repository. If you decide that you
36
 
dnl really want to modify it, contact coolo@kde.org mentioning that you have
37
 
dnl and that the modified file should be committed to every module.
 
36
dnl carried into every other module in the repository. 
38
37
dnl
39
38
dnl Single-module modifications are best placed in configure.in for kdelibs
40
39
dnl and kdebase or configure.in.in if present.
41
40
 
42
 
dnl ------------------------------------------------------------------------
43
 
dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
44
 
dnl thanks to Raja R Harinath.
45
 
dnl ------------------------------------------------------------------------
46
 
dnl
47
 
ifdef([_AC_PATH_X_DIRECT],[],
48
 
   [AC_DEFUN([_AC_PATH_X_DIRECT],[AC_PATH_X_DIRECT])])
49
 
ifdef([_AC_PATH_X_XMKMF],[],
50
 
   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
 
41
# KDE_PATH_X_DIRECT
 
42
dnl Internal subroutine of AC_PATH_X.
 
43
dnl Set ac_x_includes and/or ac_x_libraries.
 
44
AC_DEFUN([KDE_PATH_X_DIRECT],
 
45
[
 
46
AC_REQUIRE([KDE_CHECK_LIB64])
 
47
 
 
48
if test "$ac_x_includes" = NO; then
 
49
  # Guess where to find include files, by looking for this one X11 .h file.
 
50
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
 
51
 
 
52
  # First, try using that file with no special directory specified.
 
53
AC_TRY_CPP([#include <$x_direct_test_include>],
 
54
[# We can compile using X headers with no special include directory.
 
55
ac_x_includes=],
 
56
[# Look for the header file in a standard set of common directories.
 
57
# Check X11 before X11Rn because it is often a symlink to the current release.
 
58
  for ac_dir in               \
 
59
    /usr/X11/include          \
 
60
    /usr/X11R6/include        \
 
61
    /usr/X11R5/include        \
 
62
    /usr/X11R4/include        \
 
63
                              \
 
64
    /usr/include/X11          \
 
65
    /usr/include/X11R6        \
 
66
    /usr/include/X11R5        \
 
67
    /usr/include/X11R4        \
 
68
                              \
 
69
    /usr/local/X11/include    \
 
70
    /usr/local/X11R6/include  \
 
71
    /usr/local/X11R5/include  \
 
72
    /usr/local/X11R4/include  \
 
73
                              \
 
74
    /usr/local/include/X11    \
 
75
    /usr/local/include/X11R6  \
 
76
    /usr/local/include/X11R5  \
 
77
    /usr/local/include/X11R4  \
 
78
                              \
 
79
    /usr/X386/include         \
 
80
    /usr/x386/include         \
 
81
    /usr/XFree86/include/X11  \
 
82
                              \
 
83
    /usr/include              \
 
84
    /usr/local/include        \
 
85
    /usr/unsupported/include  \
 
86
    /usr/athena/include       \
 
87
    /usr/local/x11r5/include  \
 
88
    /usr/lpp/Xamples/include  \
 
89
                              \
 
90
    /usr/openwin/include      \
 
91
    /usr/openwin/share/include \
 
92
    ; \
 
93
  do
 
94
    if test -r "$ac_dir/$x_direct_test_include"; then
 
95
      ac_x_includes=$ac_dir
 
96
      break
 
97
    fi
 
98
  done])
 
99
fi # $ac_x_includes = NO
 
100
 
 
101
if test "$ac_x_libraries" = NO; then
 
102
  # Check for the libraries.
 
103
 
 
104
  test -z "$x_direct_test_library" && x_direct_test_library=Xt
 
105
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
 
106
 
 
107
  # See if we find them without any special options.
 
108
  # Don't add to $LIBS permanently.
 
109
  ac_save_LIBS="$LIBS"
 
110
  LIBS="-l$x_direct_test_library $LIBS"
 
111
AC_TRY_LINK(, [${x_direct_test_function}()],
 
112
[LIBS="$ac_save_LIBS"
 
113
# We can link X programs with no special library path.
 
114
ac_x_libraries=],
 
115
[LIBS="$ac_save_LIBS"
 
116
# First see if replacing the include by lib works.
 
117
# Check X11 before X11Rn because it is often a symlink to the current release.
 
118
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
 
119
    /usr/X11/lib${kdelibsuff}           \
 
120
    /usr/X11R6/lib${kdelibsuff}         \
 
121
    /usr/X11R5/lib${kdelibsuff}         \
 
122
    /usr/X11R4/lib${kdelibsuff}         \
 
123
                                        \
 
124
    /usr/lib${kdelibsuff}/X11           \
 
125
    /usr/lib${kdelibsuff}/X11R6         \
 
126
    /usr/lib${kdelibsuff}/X11R5         \
 
127
    /usr/lib${kdelibsuff}/X11R4         \
 
128
                                        \
 
129
    /usr/local/X11/lib${kdelibsuff}     \
 
130
    /usr/local/X11R6/lib${kdelibsuff}   \
 
131
    /usr/local/X11R5/lib${kdelibsuff}   \
 
132
    /usr/local/X11R4/lib${kdelibsuff}   \
 
133
                                        \
 
134
    /usr/local/lib${kdelibsuff}/X11     \
 
135
    /usr/local/lib${kdelibsuff}/X11R6   \
 
136
    /usr/local/lib${kdelibsuff}/X11R5   \
 
137
    /usr/local/lib${kdelibsuff}/X11R4   \
 
138
                                        \
 
139
    /usr/X386/lib${kdelibsuff}          \
 
140
    /usr/x386/lib${kdelibsuff}          \
 
141
    /usr/XFree86/lib${kdelibsuff}/X11   \
 
142
                                        \
 
143
    /usr/lib${kdelibsuff}               \
 
144
    /usr/local/lib${kdelibsuff}         \
 
145
    /usr/unsupported/lib${kdelibsuff}   \
 
146
    /usr/athena/lib${kdelibsuff}        \
 
147
    /usr/local/x11r5/lib${kdelibsuff}   \
 
148
    /usr/lpp/Xamples/lib${kdelibsuff}   \
 
149
    /lib/usr/lib${kdelibsuff}/X11       \
 
150
                                        \
 
151
    /usr/openwin/lib${kdelibsuff}       \
 
152
    /usr/openwin/share/lib${kdelibsuff} \
 
153
    ; \
 
154
do
 
155
dnl Don't even attempt the hair of trying to link an X program!
 
156
  for ac_extension in a so sl; do
 
157
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
 
158
      ac_x_libraries=$ac_dir
 
159
      break 2
 
160
    fi
 
161
  done
 
162
done])
 
163
fi # $ac_x_libraries = NO
 
164
])
 
165
 
51
166
 
52
167
dnl ------------------------------------------------------------------------
53
168
dnl Find a file (or one of more files in a list of dirs)
54
169
dnl ------------------------------------------------------------------------
55
170
dnl
56
 
AC_DEFUN(AC_FIND_FILE,
 
171
AC_DEFUN([AC_FIND_FILE],
57
172
[
58
173
$3=NO
59
174
for i in $2;
70
185
done
71
186
])
72
187
 
73
 
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
74
 
dnl     if-not-found, test-parameter)
75
 
AC_DEFUN(KDE_FIND_PATH,
 
188
dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
 
189
dnl     if-not-found, test-parameter, prepend-path)
 
190
dnl
 
191
dnl Look for program-name in list-of-dirs+$PATH.
 
192
dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
 
193
dnl If found, $variable-name is set. If not, if-not-found is evaluated.
 
194
dnl test-parameter: if set, the program is executed with this arg,
 
195
dnl                 and only a successful exit code is required.
 
196
AC_DEFUN([KDE_FIND_PATH],
76
197
[
77
198
   AC_MSG_CHECKING([for $1])
78
199
   if test -n "$$2"; then
83
204
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
84
205
        [
85
206
        kde_cv_path="NONE"
86
 
        dirs="$3"
87
207
        kde_save_IFS=$IFS
88
208
        IFS=':'
 
209
        dirs=""
89
210
        for dir in $PATH; do
90
211
          dirs="$dirs $dir"
91
 
        done
 
212
        done
 
213
        if test -z "$6"; then  dnl Append dirs in PATH (default)
 
214
          dirs="$3 $dirs"
 
215
        else  dnl Prepend dirs in PATH (if 6th arg is set)
 
216
          dirs="$dirs $3"
 
217
        fi
92
218
        IFS=$kde_save_IFS
93
219
 
94
220
        for dir in $dirs; do
125
251
   fi
126
252
])
127
253
 
128
 
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
 
254
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
129
255
[
130
256
    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
131
257
Please check whether you installed Qt correctly.
137
263
])
138
264
])
139
265
 
140
 
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
 
266
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
141
267
[
142
268
    AC_MSG_WARN([No Qt ui compiler (uic) found!
143
269
Please check whether you installed Qt correctly.
149
275
])
150
276
])
151
277
 
 
278
 
 
279
AC_DEFUN([KDE_CHECK_UIC_FLAG],
 
280
[
 
281
    AC_MSG_CHECKING([whether uic supports -$1 ])
 
282
    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
 
283
    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
 
284
    [
 
285
        cat >conftest.ui <<EOT
 
286
        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
 
287
EOT
 
288
        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
 
289
        if AC_TRY_EVAL(ac_uic_testrun); then
 
290
            eval "kde_cv_prog_uic_$kde_cache=yes"
 
291
        else
 
292
            eval "kde_cv_prog_uic_$kde_cache=no"
 
293
        fi
 
294
        rm -f conftest*
 
295
    ])
 
296
 
 
297
    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
 
298
        AC_MSG_RESULT([yes])
 
299
        :
 
300
        $3
 
301
    else
 
302
        AC_MSG_RESULT([no])
 
303
        :
 
304
        $4
 
305
    fi
 
306
])
 
307
 
 
308
 
152
309
dnl ------------------------------------------------------------------------
153
310
dnl Find the meta object compiler and the ui compiler in the PATH,
154
311
dnl in $QTDIR/bin, and some more usual places
155
312
dnl ------------------------------------------------------------------------
156
313
dnl
157
 
AC_DEFUN(AC_PATH_QT_MOC_UIC,
 
314
AC_DEFUN([AC_PATH_QT_MOC_UIC],
158
315
[
 
316
   AC_REQUIRE([KDE_CHECK_PERL])
159
317
   qt_bindirs=""
160
318
   for dir in $kde_qt_dirs; do
161
319
      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
167
325
 
168
326
   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
169
327
   if test -z "$UIC_NOT_NEEDED"; then
170
 
     KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
171
 
     if test -z "$UIC" ; then
 
328
     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
 
329
     if test -z "$UIC_PATH" ; then
172
330
       KDE_UIC_ERROR_MESSAGE
173
331
       exit 1
 
332
     else
 
333
       UIC=$UIC_PATH
 
334
 
 
335
       if test $kde_qtver = 3; then
 
336
         KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
 
337
         KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
 
338
 
 
339
         if test x$ac_uic_supports_libpath = xyes; then
 
340
             UIC="$UIC -L \$(kde_widgetdir)"
 
341
         fi
 
342
         if test x$ac_uic_supports_nounload = xyes; then
 
343
             UIC="$UIC -nounload"
 
344
         fi
 
345
       fi
174
346
     fi
175
347
   else
176
348
     UIC="echo uic not available: "
178
350
 
179
351
   AC_SUBST(MOC)
180
352
   AC_SUBST(UIC)
 
353
 
 
354
   UIC_TR="i18n"
 
355
   if test $kde_qtver = 3; then
 
356
     UIC_TR="tr2i18n"
 
357
   fi
 
358
 
 
359
   AC_SUBST(UIC_TR)
181
360
])
182
361
 
183
 
AC_DEFUN(KDE_1_CHECK_PATHS,
 
362
AC_DEFUN([KDE_1_CHECK_PATHS],
184
363
[
185
364
  KDE_1_CHECK_PATH_HEADERS
186
365
 
228
407
 
229
408
])
230
409
 
231
 
AC_DEFUN(KDE_SET_PATHS,
 
410
AC_DEFUN([KDE_SET_PATHS],
232
411
[
233
412
  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
234
413
        kde_htmldir=\"$kde_htmldir\" \
239
418
        kde_locale=\"$kde_locale\" \
240
419
        kde_cgidir=\"$kde_cgidir\" \
241
420
        kde_confdir=\"$kde_confdir\" \
 
421
        kde_kcfgdir=\"$kde_kcfgdir\" \
242
422
        kde_mimedir=\"$kde_mimedir\" \
243
423
        kde_toolbardir=\"$kde_toolbardir\" \
244
424
        kde_wallpaperdir=\"$kde_wallpaperdir\" \
247
427
        kde_servicesdir=\"$kde_servicesdir\" \
248
428
        kde_servicetypesdir=\"$kde_servicetypesdir\" \
249
429
        kde_moduledir=\"$kde_moduledir\" \
 
430
        kde_styledir=\"$kde_styledir\" \
 
431
        kde_widgetdir=\"$kde_widgetdir\" \
 
432
        xdg_appsdir=\"$xdg_appsdir\" \
 
433
        xdg_menudir=\"$xdg_menudir\" \
 
434
        xdg_directorydir=\"$xdg_directorydir\" \
250
435
        kde_result=$1"
251
436
])
252
437
 
253
 
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
 
438
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
254
439
[
255
440
if test "$1" = "default"; then
256
441
 
257
442
  if test -z "$kde_htmldir"; then
258
 
    kde_htmldir='\${prefix}/share/doc/HTML'
 
443
    kde_htmldir='\${datadir}/doc/HTML'
259
444
  fi
260
445
  if test -z "$kde_appsdir"; then
261
 
    kde_appsdir='\${prefix}/share/applnk'
 
446
    kde_appsdir='\${datadir}/applnk'
262
447
  fi
263
448
  if test -z "$kde_icondir"; then
264
 
    kde_icondir='\${prefix}/share/icons'
 
449
    kde_icondir='\${datadir}/icons'
265
450
  fi
266
451
  if test -z "$kde_sounddir"; then
267
 
    kde_sounddir='\${prefix}/share/sounds'
 
452
    kde_sounddir='\${datadir}/sounds'
268
453
  fi
269
454
  if test -z "$kde_datadir"; then
270
 
    kde_datadir='\${prefix}/share/apps'
 
455
    kde_datadir='\${datadir}/apps'
271
456
  fi
272
457
  if test -z "$kde_locale"; then
273
 
    kde_locale='\${prefix}/share/locale'
 
458
    kde_locale='\${datadir}/locale'
274
459
  fi
275
460
  if test -z "$kde_cgidir"; then
276
461
    kde_cgidir='\${exec_prefix}/cgi-bin'
277
462
  fi
278
463
  if test -z "$kde_confdir"; then
279
 
    kde_confdir='\${prefix}/share/config'
 
464
    kde_confdir='\${datadir}/config'
 
465
  fi
 
466
  if test -z "$kde_kcfgdir"; then
 
467
    kde_kcfgdir='\${datadir}/config.kcfg'
280
468
  fi
281
469
  if test -z "$kde_mimedir"; then
282
 
    kde_mimedir='\${prefix}/share/mimelnk'
 
470
    kde_mimedir='\${datadir}/mimelnk'
283
471
  fi
284
472
  if test -z "$kde_toolbardir"; then
285
 
    kde_toolbardir='\${prefix}/share/toolbar'
 
473
    kde_toolbardir='\${datadir}/toolbar'
286
474
  fi
287
475
  if test -z "$kde_wallpaperdir"; then
288
 
    kde_wallpaperdir='\${prefix}/share/wallpapers'
 
476
    kde_wallpaperdir='\${datadir}/wallpapers'
289
477
  fi
290
478
  if test -z "$kde_templatesdir"; then
291
 
    kde_templatesdir='\${prefix}/share/templates'
 
479
    kde_templatesdir='\${datadir}/templates'
292
480
  fi
293
481
  if test -z "$kde_bindir"; then
294
482
    kde_bindir='\${exec_prefix}/bin'
295
483
  fi
296
484
  if test -z "$kde_servicesdir"; then
297
 
    kde_servicesdir='\${prefix}/share/services'
 
485
    kde_servicesdir='\${datadir}/services'
298
486
  fi
299
487
  if test -z "$kde_servicetypesdir"; then
300
 
    kde_servicetypesdir='\${prefix}/share/servicetypes'
 
488
    kde_servicetypesdir='\${datadir}/servicetypes'
301
489
  fi
302
490
  if test -z "$kde_moduledir"; then
303
 
    kde_moduledir='\${exec_prefix}/lib/kde2'
 
491
    if test "$kde_qtver" = "2"; then
 
492
      kde_moduledir='\${libdir}/kde2'
 
493
    else
 
494
      kde_moduledir='\${libdir}/kde3'
 
495
    fi
 
496
  fi
 
497
  if test -z "$kde_styledir"; then
 
498
    kde_styledir='\${libdir}/kde3/plugins/styles'
 
499
  fi
 
500
  if test -z "$kde_widgetdir"; then
 
501
    kde_widgetdir='\${libdir}/kde3/plugins/designer'
 
502
  fi
 
503
  if test -z "$xdg_appsdir"; then
 
504
    xdg_appsdir='\${datadir}/applications/kde'
 
505
  fi
 
506
  if test -z "$xdg_menudir"; then
 
507
    xdg_menudir='\${sysconfdir}/xdg/menus'
 
508
  fi
 
509
  if test -z "$xdg_directorydir"; then
 
510
    xdg_directorydir='\${datadir}/desktop-directories'
304
511
  fi
305
512
 
306
513
  KDE_SET_PATHS(defaults)
317
524
fi
318
525
])
319
526
 
320
 
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
 
527
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
321
528
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
322
529
   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
323
530
   test -z "$kde_datadir" || test -z "$kde_locale"  ||
324
531
   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
 
532
   test -z "$kde_kcfgdir" ||
325
533
   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
326
534
   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
327
535
   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
328
536
   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
329
 
   test "$kde_have_all_paths" != "yes"; then
 
537
   test -z "$kde_styledir" || test -z "kde_widgetdir" ||
 
538
   test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
 
539
   test "x$kde_have_all_paths" != "xyes"; then
330
540
     kde_have_all_paths=no
331
541
  fi
332
542
])
333
543
 
334
 
AC_DEFUN(KDE_MISSING_PROG_ERROR,
 
544
AC_DEFUN([KDE_MISSING_PROG_ERROR],
335
545
[
336
546
    AC_MSG_ERROR([The important program $1 was not found!
337
547
Please check whether you installed KDE correctly.
338
548
])
339
549
])
340
550
 
341
 
AC_DEFUN(KDE_SUBST_PROGRAMS,
342
 
[
343
 
 
344
 
        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde2/bin /usr/kde/bin /usr/local/kde/bin"
345
 
        if test -n "$KDEDIRS"; then
346
 
           kde_save_IFS=$IFS
347
 
           IFS=:
348
 
           for dir in $KDEDIRS; do
349
 
                kde_default_bindirs="$dir/bin $kde_default_bindirs "
350
 
           done
351
 
           IFS=$kde_save_IFS
352
 
        fi
353
 
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
 
551
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
 
552
[
 
553
    AC_MSG_ERROR([The important program $1 was not found!
 
554
Please check whether you installed aRts correctly or use
 
555
--without-arts to compile without aRts support (this will remove functionality).
 
556
])
 
557
])
 
558
 
 
559
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
 
560
[
 
561
    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"
 
562
    test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
 
563
    if test -n "$KDEDIRS"; then
 
564
       kde_save_IFS=$IFS
 
565
       IFS=:
 
566
       for dir in $KDEDIRS; do
 
567
            kde_default_bindirs="$dir/bin $kde_default_bindirs "
 
568
       done
 
569
       IFS=$kde_save_IFS
 
570
    fi
 
571
])
 
572
 
 
573
AC_DEFUN([KDE_SUBST_PROGRAMS],
 
574
[
 
575
    AC_ARG_WITH(arts,
 
576
        AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
 
577
        [build_arts=$withval],
 
578
        [build_arts=yes]
 
579
    )
 
580
    AM_CONDITIONAL(include_ARTS, test "$build_arts" != "no")
 
581
    if test "$build_arts" == "no"; then
 
582
        AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
 
583
    fi
 
584
 
 
585
        KDE_SET_DEFAULT_BINDIRS
 
586
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
354
587
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
355
588
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
356
 
        KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
357
 
        KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
358
 
        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
 
589
        if test "$build_arts" != "no"; then
 
590
          KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
 
591
          KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
 
592
        fi
359
593
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
360
 
      
 
594
 
 
595
        kde32ornewer=1
 
596
        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
 
597
            kde32ornewer=
 
598
        else
 
599
            if test "$kde_qtver" = "3" && test "$kde_qtsubver" -le 1; then
 
600
                kde32ornewer=
 
601
            fi
 
602
        fi
 
603
 
 
604
        if test -n "$kde32ornewer"; then
 
605
            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
 
606
            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
 
607
        fi
 
608
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [XMLLINT=""])
 
609
 
361
610
        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
362
 
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde2/share /opt/kde/share $prefix/share"
 
611
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
363
612
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
364
613
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
365
614
            if test "$KDE_XSL_STYLESHEET" = "NO"; then
370
619
        fi
371
620
 
372
621
        DCOP_DEPENDENCIES='$(DCOPIDL)'
 
622
        if test -n "$kde32ornewer"; then
 
623
            KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
 
624
            DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
 
625
            AC_SUBST(KCONFIG_COMPILER)
 
626
            AC_SUBST(KCFG_DEPENDENCIES)
 
627
            AC_SUBST(DCOPIDLNG)
 
628
        fi
373
629
        AC_SUBST(DCOPIDL)
374
630
        AC_SUBST(DCOPIDL2CPP)
375
631
        AC_SUBST(DCOP_DEPENDENCIES)
376
632
        AC_SUBST(MCOPIDL)
377
633
        AC_SUBST(ARTSCCONFIG)
378
 
        AC_SUBST(KDECONFIG)
379
634
        AC_SUBST(MEINPROC)
380
635
        AC_SUBST(KDE_XSL_STYLESHEET)
381
 
 
382
 
        if test -x "$KDECONFIG"; then # it can be "compiled"
383
 
          kde_libs_prefix=`$KDECONFIG --prefix`
384
 
          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
385
 
               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
386
 
                          This means it has been moved since you installed it.
387
 
                          This won't work. Please recompile kdelibs for the new prefix.
388
 
                          ])
389
 
           fi
390
 
           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
391
 
        else
392
 
           kde_libs_prefix='$(prefix)'
393
 
           kde_libs_htmldir='$(kde_htmldir)'
394
 
        fi
395
 
        AC_SUBST(kde_libs_prefix)
396
 
        AC_SUBST(kde_libs_htmldir)
 
636
        AC_SUBST(XMLLINT)
397
637
])dnl
398
638
 
399
 
AC_DEFUN(AC_CREATE_KFSSTND,
 
639
AC_DEFUN([AC_CREATE_KFSSTND],
400
640
[
401
641
AC_REQUIRE([AC_CHECK_RPATH])
402
642
 
414
654
  # wrong values were cached, may be, we can set better ones
415
655
  kde_result=
416
656
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
417
 
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir=
 
657
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
418
658
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
419
659
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
420
660
  kde_have_all_paths=
 
661
  kde_styledir=
 
662
  kde_widgetdir=
 
663
  xdg_appsdir = xdg_menudir= xdg_directorydir= 
421
664
  KDE_SET_DEFAULT_PATHS($1)
422
665
  eval "$kde_cv_all_paths"
423
666
  KDE_CHECK_PATHS_FOR_COMPLETENESS
441
684
 
442
685
])
443
686
 
444
 
AC_DEFUN(AC_SUBST_KFSSTND,
 
687
AC_DEFUN([AC_SUBST_KFSSTND],
445
688
[
446
689
AC_SUBST(kde_htmldir)
447
690
AC_SUBST(kde_appsdir)
450
693
AC_SUBST(kde_datadir)
451
694
AC_SUBST(kde_locale)
452
695
AC_SUBST(kde_confdir)
 
696
AC_SUBST(kde_kcfgdir)
453
697
AC_SUBST(kde_mimedir)
454
698
AC_SUBST(kde_wallpaperdir)
455
699
AC_SUBST(kde_bindir)
 
700
dnl X Desktop Group standards
 
701
AC_SUBST(xdg_appsdir)
 
702
AC_SUBST(xdg_menudir)
 
703
AC_SUBST(xdg_directorydir)
456
704
dnl for KDE 2
457
705
AC_SUBST(kde_templatesdir)
458
706
AC_SUBST(kde_servicesdir)
459
707
AC_SUBST(kde_servicetypesdir)
460
708
AC_SUBST(kde_moduledir)
 
709
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
 
710
AC_SUBST(kde_styledir)
 
711
AC_SUBST(kde_widgetdir)
461
712
if test "$kde_qtver" = 1; then
462
713
  kde_minidir="$kde_icondir/mini"
463
714
else
470
721
dnl AC_SUBST(kde_toolbardir)
471
722
])
472
723
 
473
 
AC_DEFUN(KDE_MISC_TESTS,
 
724
AC_DEFUN([KDE_MISC_TESTS],
474
725
[
475
 
   AC_LANG_C
476
726
   dnl Checks for libraries.
477
727
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
478
728
   AC_SUBST(LIBUTIL)
491
741
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
492
742
   fi
493
743
   AC_CHECK_SOCKLEN_T
494
 
   AC_LANG_C
495
744
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
496
745
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
497
746
      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
516
765
   AC_CHECK_FUNC(shmat, ,
517
766
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
518
767
   
519
 
   # Solaris 2.6 and others need -lresolv for res_init
520
 
   AC_CHECK_FUNCS(res_init, , [
521
 
     kde_libs_safe="$LIBS"
522
 
     LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
523
 
     AC_TRY_LINK(
524
 
[
525
 
#include <resolv.h>
526
 
],
527
 
528
 
res_init(); 
529
 
],
530
 
        LIBRESOLV="-lresolv"
531
 
        X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
532
 
        AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
533
 
     )
534
 
     LIBS=$kde_libs_safe
 
768
   # more headers that need to be explicitly included on darwin
 
769
   AC_CHECK_HEADERS(sys/types.h stdint.h)
 
770
 
 
771
   # sys/bitypes.h is needed for uint32_t and friends on Tru64
 
772
   AC_CHECK_HEADERS(sys/bitypes.h)
 
773
 
 
774
   # darwin requires a poll emulation library
 
775
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
 
776
 
 
777
   # CoreAudio framework
 
778
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
 
779
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
 
780
     FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
535
781
   ])
536
782
 
 
783
   AC_CHECK_RES_INIT
 
784
   AC_SUBST(LIB_POLL)
 
785
   AC_SUBST(FRAMEWORK_COREAUDIO)
537
786
   LIBSOCKET="$X_EXTRA_LIBS"
538
787
   AC_SUBST(LIBSOCKET)
539
 
   AC_SUBST(LIBRESOLV)
540
788
   AC_SUBST(X_EXTRA_LIBS)
541
789
   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
542
790
   AC_SUBST(LIBUCB)
552
800
 
553
801
   KDE_CHECK_TYPES
554
802
   KDE_CHECK_LIBDL
 
803
   KDE_CHECK_STRLCPY
 
804
 
 
805
# darwin needs this to initialize the environment
 
806
AC_CHECK_HEADERS(crt_externs.h)
 
807
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
 
808
 
 
809
AH_VERBATIM(_DARWIN_ENVIRON,
 
810
[
 
811
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
 
812
# include <sys/time.h>
 
813
# include <crt_externs.h>
 
814
# define environ (*_NSGetEnviron())
 
815
#endif
 
816
])
 
817
 
 
818
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
 
819
[
 
820
/*
 
821
 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
 
822
 * that defines bzero.
 
823
 */
 
824
 
 
825
#if defined(_AIX)
 
826
#include <strings.h>
 
827
#endif
 
828
])
 
829
 
 
830
AC_CHECK_FUNCS([vsnprintf snprintf])
 
831
 
 
832
AH_VERBATIM(_TRU64,[
 
833
/*
 
834
 * On HP-UX, the declaration of vsnprintf() is needed every time !
 
835
 */
 
836
 
 
837
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
 
838
#if __STDC__
 
839
#include <stdarg.h>
 
840
#include <stdlib.h>
 
841
#else
 
842
#include <varargs.h>
 
843
#endif
 
844
#ifdef __cplusplus
 
845
extern "C"
 
846
#endif
 
847
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
 
848
#ifdef __cplusplus
 
849
extern "C"
 
850
#endif
 
851
int snprintf(char *str, size_t n, char const *fmt, ...);
 
852
#endif
 
853
])
 
854
 
555
855
])
556
856
 
557
857
dnl ------------------------------------------------------------------------
559
859
dnl macro AC_PATH_X
560
860
dnl ------------------------------------------------------------------------
561
861
dnl
562
 
AC_DEFUN(K_PATH_X,
 
862
AC_DEFUN([K_PATH_X],
563
863
[
564
 
AC_REQUIRE([AC_PROG_CPP])dnl
565
864
AC_REQUIRE([KDE_MISC_TESTS])dnl
 
865
AC_REQUIRE([KDE_CHECK_LIB64])
 
866
 
 
867
AC_ARG_ENABLE(
 
868
  embedded,
 
869
  AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
 
870
  kde_use_qt_emb=$enableval,
 
871
  kde_use_qt_emb=no
 
872
)
 
873
 
 
874
AC_ARG_ENABLE(
 
875
  qtopia,
 
876
  AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
 
877
  kde_use_qt_emb_palm=$enableval,
 
878
  kde_use_qt_emb_palm=no
 
879
)
 
880
 
 
881
AC_ARG_ENABLE(
 
882
  mac,
 
883
  AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
 
884
  kde_use_qt_mac=$enableval,
 
885
  kde_use_qt_mac=no
 
886
)
 
887
 
 
888
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
 
889
 
566
890
AC_MSG_CHECKING(for X)
567
 
AC_LANG_SAVE
568
 
AC_LANG_C
 
891
 
569
892
AC_CACHE_VAL(kde_cv_have_x,
570
893
[# One or both of the vars are not set, and there is no cached value.
571
894
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
583
906
ac_x_libraries=$kde_x_libraries
584
907
ac_x_includes=$kde_x_includes
585
908
 
586
 
_AC_PATH_X_DIRECT
 
909
KDE_PATH_X_DIRECT
587
910
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
588
911
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
589
912
dnl location. The correct location is /usr/lib32 or an undefined value
603
926
    ac_x_includes="."
604
927
  fi
605
928
  if test -z "$ac_x_libraries"; then
606
 
    ac_x_libraries="/usr/lib"
 
929
    ac_x_libraries="/usr/lib${kdelibsuff}"
607
930
  fi
608
931
esac
609
932
#from now on we use our own again
659
982
all_includes="$X_INCLUDES"
660
983
all_libraries="$X_LDFLAGS"
661
984
 
662
 
AC_SUBST(X_INCLUDES)
663
 
AC_SUBST(X_LDFLAGS)
664
 
AC_SUBST(x_libraries)
665
 
AC_SUBST(x_includes)
666
 
 
667
985
# Check for libraries that X11R6 Xt/Xaw programs need.
668
986
ac_save_LDFLAGS="$LDFLAGS"
669
987
LDFLAGS="$LDFLAGS $X_LDFLAGS"
675
993
#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
676
994
AC_CHECK_LIB(ICE, IceConnectionNumber,
677
995
  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
678
 
AC_SUBST(LIBSM)
679
996
LDFLAGS="$ac_save_LDFLAGS"
680
997
 
681
 
AC_SUBST(X_PRE_LIBS)
682
 
 
683
998
LIB_X11='-lX11 $(LIBSOCKET)'
684
 
AC_SUBST(LIB_X11)
685
999
 
686
1000
AC_MSG_CHECKING(for libXext)
687
1001
AC_CACHE_VAL(kde_cv_have_libXext,
703
1017
],
704
1018
kde_cv_have_libXext=yes,
705
1019
kde_cv_have_libXext=no
706
 
   )
 
1020
)
707
1021
 
708
1022
LDFLAGS=$kde_ldflags_safe
709
1023
LIBS=$kde_libs_safe
710
 
 ])
 
1024
])
711
1025
 
712
1026
AC_MSG_RESULT($kde_cv_have_libXext)
713
1027
 
717
1031
them either.])
718
1032
fi
719
1033
 
720
 
AC_MSG_CHECKING(for Xinerama)
721
 
 
722
 
 AC_ARG_WITH(xinerama,
723
 
  [  --with-xinerama         enable support for Xinerama ],
724
 
  [
725
 
    no_xinerama=no
726
 
  ], [
727
 
    no_xinerama=yes
728
 
  ]
729
 
)
730
 
 
731
 
kde_save_LDFLAGS="$LDFLAGS"
732
 
kde_save_CFLAGS="$CFLAGS"
733
 
kde_save_LIBS="$LIBS"
734
 
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
735
 
CFLAGS="$CFLAGS -I$x_includes"
736
 
LIBS="-lXinerama -lXext"
737
 
 
738
 
if test "x$no_xinerama" = "xno"; then
739
 
 
740
 
  AC_CACHE_VAL(ac_cv_have_xinerama,
741
 
  [
742
 
          AC_TRY_LINK([#include <X11/Xlib.h>
743
 
                        #include <X11/extensions/Xinerama.h>],
744
 
                  [XineramaIsActive(NULL);],
745
 
                  [ac_cv_have_xinerama="yes"],
746
 
                  [ac_cv_have_xinerama="no"])
747
 
  ])
748
 
else
749
 
  ac_cv_have_xinerama=no;
750
 
fi
751
 
 
752
 
AC_MSG_RESULT($ac_cv_have_xinerama)
753
 
 
754
 
LIBXINERAMA=""
755
 
 
756
 
if test "$ac_cv_have_xinerama" = "yes"; then
757
 
  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
758
 
  LIBXINERAMA="-lXinerama"
759
 
fi
760
 
 
761
 
AC_SUBST(LIBXINERAMA)
762
 
 
763
 
LDFLAGS="$kde_save_LDFLAGS"
764
 
CFLAGS="$kde_save_CFLAGS"
765
 
LIBS="$kde_save_LIBS"
766
 
 
767
 
AC_LANG_RESTORE
 
1034
LIB_XEXT="-lXext"
 
1035
QTE_NORTTI=""
 
1036
 
 
1037
elif test "$kde_use_qt_emb" = "yes"; then
 
1038
  dnl We're using QT Embedded
 
1039
  CPPFLAGS=-DQWS
 
1040
  CXXFLAGS="$CXXFLAGS -fno-rtti"
 
1041
  QTE_NORTTI="-fno-rtti -DQWS"
 
1042
  X_PRE_LIBS=""
 
1043
  LIB_X11=""
 
1044
  LIB_XEXT=""
 
1045
  LIB_XRENDER=""
 
1046
  LIBSM=""
 
1047
  X_INCLUDES=""
 
1048
  X_LDFLAGS=""
 
1049
  x_includes=""
 
1050
  x_libraries=""
 
1051
elif test "$kde_use_qt_mac" = "yes"; then
 
1052
  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
 
1053
  dnl be included to get the information) --Sam
 
1054
  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
 
1055
  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
 
1056
  X_PRE_LIBS=""
 
1057
  LIB_X11=""
 
1058
  LIB_XEXT=""
 
1059
  LIB_XRENDER=""
 
1060
  LIBSM=""
 
1061
  X_INCLUDES=""
 
1062
  X_LDFLAGS=""
 
1063
  x_includes=""
 
1064
  x_libraries=""
 
1065
fi
 
1066
AC_SUBST(X_PRE_LIBS)
 
1067
AC_SUBST(LIB_X11)
 
1068
AC_SUBST(LIB_XRENDER)
 
1069
AC_SUBST(LIBSM)
 
1070
AC_SUBST(X_INCLUDES)
 
1071
AC_SUBST(X_LDFLAGS)
 
1072
AC_SUBST(x_includes)
 
1073
AC_SUBST(x_libraries)
 
1074
AC_SUBST(QTE_NORTTI)
 
1075
AC_SUBST(LIB_XEXT)
768
1076
 
769
1077
])
770
1078
 
771
 
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
 
1079
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
772
1080
[
773
1081
AC_REQUIRE([KDE_USE_QT])
774
1082
cat > conftest.$ac_ext <<EOF
785
1093
 
786
1094
if test $kde_qtsubver -gt 0; then
787
1095
cat >> conftest.$ac_ext <<EOF
788
 
#include <qiconview.h>
 
1096
#if QT_VERSION < 210
 
1097
#error 1
 
1098
#endif
789
1099
EOF
790
1100
fi
 
1101
fi
791
1102
 
 
1103
if test "$kde_qtver" = "3"; then
 
1104
cat >> conftest.$ac_ext <<EOF
 
1105
#include <qcursor.h>
 
1106
#include <qstylefactory.h>
 
1107
#include <private/qucomextra_p.h>
 
1108
EOF
792
1109
fi
793
1110
 
794
1111
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
801
1118
if test "$kde_qtver" = "2"; then
802
1119
cat >> conftest.$ac_ext <<EOF
803
1120
    QStringList *t = new QStringList();
 
1121
    Q_UNUSED(t);
804
1122
EOF
805
1123
if test $kde_qtsubver -gt 0; then
806
1124
cat >> conftest.$ac_ext <<EOF
807
 
    QIconView iv(0);
808
 
    iv.setWordWrapIconText(false);
809
1125
    QString s;
810
1126
    s.setLatin1("Elvis is alive", 14);
811
 
    int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
812
 
EOF
813
 
fi
 
1127
EOF
 
1128
fi
 
1129
fi
 
1130
if test "$kde_qtver" = "3"; then
 
1131
cat >> conftest.$ac_ext <<EOF
 
1132
    (void)QStyleFactory::create(QString::null);
 
1133
    QCursor c(Qt::WhatsThisCursor);
 
1134
EOF
814
1135
fi
815
1136
cat >> conftest.$ac_ext <<EOF
816
1137
    return 0;
818
1139
EOF
819
1140
])
820
1141
 
821
 
AC_DEFUN(KDE_USE_QT,
 
1142
AC_DEFUN([KDE_USE_QT],
822
1143
[
823
 
 
824
1144
if test -z "$1"; then
825
 
  kde_qtver=2
826
 
  kde_qtsubver=1
 
1145
  # Current default Qt version: 3.2
 
1146
  kde_qtver=3
 
1147
  kde_qtsubver=2
827
1148
else
828
 
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9]\+\.\([0-9]\+\).*#\1#'`
829
 
  # following is the check if subversion isn�t found in passed argument
 
1149
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
 
1150
  # following is the check if subversion isnt found in passed argument
830
1151
  if test "$kde_qtsubver" = "$1"; then
831
1152
    kde_qtsubver=1
832
1153
  fi
833
 
  kde_qtver=`echo "$1" | sed -e 's#^\([0-9]\+\)\..*#\1#'`
 
1154
  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
834
1155
  if test "$kde_qtver" = "1"; then
835
1156
    kde_qtsubver=42
836
 
  else
837
 
   # this is the version number fallback to 2.1, unless major version is 1 or 2
838
 
   if test "$kde_qtver" != "2"; then
839
 
    kde_qtver=2
840
 
    kde_qtsubver=1
841
 
   fi
842
1157
  fi
843
1158
fi
844
1159
 
845
1160
if test -z "$2"; then
846
 
  if test $kde_qtver = 2; then
 
1161
  if test "$kde_qtver" = "2"; then
847
1162
    if test $kde_qtsubver -gt 0; then
848
1163
      kde_qt_minversion=">= Qt 2.2.2"
849
1164
    else
850
1165
      kde_qt_minversion=">= Qt 2.0.2"
851
1166
    fi
852
 
  else
 
1167
  fi
 
1168
  if test "$kde_qtver" = "3"; then
 
1169
    if test $kde_qtsubver -gt 0; then
 
1170
         if test $kde_qtsubver -gt 1; then
 
1171
            kde_qt_minversion=">= Qt 3.2"
 
1172
         else
 
1173
            kde_qt_minversion=">= Qt 3.1 (20021021)"
 
1174
         fi
 
1175
    else
 
1176
      kde_qt_minversion=">= Qt 3.0"
 
1177
    fi
 
1178
  fi
 
1179
  if test "$kde_qtver" = "1"; then
853
1180
    kde_qt_minversion=">= 1.42 and < 2.0"
854
1181
  fi
855
1182
else
856
 
   kde_qt_minversion=$2
 
1183
   kde_qt_minversion="$2"
857
1184
fi
858
1185
 
859
1186
if test -z "$3"; then
 
1187
   if test $kde_qtver = 3; then
 
1188
     if test $kde_qtsubver -gt 0; then
 
1189
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00"
 
1190
       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
 
1191
       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
 
1192
     else
 
1193
       kde_qt_verstring="QT_VERSION >= 300"
 
1194
     fi
 
1195
   fi
860
1196
   if test $kde_qtver = 2; then
861
 
    if test $kde_qtsubver -gt 0; then
862
 
      kde_qt_verstring="QT_VERSION >= 222"
863
 
    else
864
 
      kde_qt_verstring="QT_VERSION >= 200"
865
 
    fi
866
 
   else
 
1197
     if test $kde_qtsubver -gt 0; then
 
1198
       kde_qt_verstring="QT_VERSION >= 222"
 
1199
     else
 
1200
       kde_qt_verstring="QT_VERSION >= 200"
 
1201
     fi
 
1202
   fi
 
1203
   if test $kde_qtver = 1; then
867
1204
    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
868
 
  fi
 
1205
   fi
869
1206
else
870
 
   kde_qt_verstring=$3
 
1207
   kde_qt_verstring="$3"
871
1208
fi
872
1209
 
 
1210
if test $kde_qtver = 3; then
 
1211
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
 
1212
fi
873
1213
if test $kde_qtver = 2; then
874
1214
   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
875
 
else
 
1215
fi
 
1216
if test $kde_qtver = 1; then
876
1217
   kde_qt_dirs="$QTDIR /usr/lib/qt"
877
1218
fi
878
1219
])
879
1220
 
880
 
AC_DEFUN(KDE_CHECK_QT_DIRECT,
 
1221
AC_DEFUN([KDE_CHECK_QT_DIRECT],
881
1222
[
882
1223
AC_REQUIRE([KDE_USE_QT])
883
1224
AC_MSG_CHECKING([if Qt compiles without flags])
893
1234
 
894
1235
CXXFLAGS="$CXXFLAGS -I$qt_includes"
895
1236
LDFLAGS="$LDFLAGS $X_LDFLAGS"
 
1237
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
896
1238
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
 
1239
else
 
1240
LIBS="$LIBQT $LIBSOCKET"
 
1241
fi
897
1242
LD_LIBRARY_PATH=
898
1243
export LD_LIBRARY_PATH
899
1244
LIBRARY_PATH=
936
1281
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
937
1282
dnl ------------------------------------------------------------------------
938
1283
dnl
939
 
AC_DEFUN(AC_PATH_QT_1_3,
 
1284
AC_DEFUN([AC_PATH_QT_1_3],
940
1285
[
941
1286
AC_REQUIRE([K_PATH_X])
942
1287
AC_REQUIRE([KDE_USE_QT])
 
1288
AC_REQUIRE([KDE_CHECK_LIB64])
943
1289
 
944
1290
dnl ------------------------------------------------------------------------
945
1291
dnl Add configure flag to enable linking to MT version of Qt library.
947
1293
 
948
1294
AC_ARG_ENABLE(
949
1295
  mt,
950
 
  [  --enable-mt             link to threaded Qt (experimental)],
 
1296
  AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
951
1297
  kde_use_qt_mt=$enableval,
952
 
  kde_use_qt_mt=no
 
1298
  [
 
1299
    if test $kde_qtver = 3; then
 
1300
      kde_use_qt_mt=yes
 
1301
    else
 
1302
      kde_use_qt_mt=no
 
1303
    fi
 
1304
  ]
953
1305
)
954
1306
 
955
1307
USING_QT_MT=""
956
1308
 
957
1309
dnl ------------------------------------------------------------------------
958
 
dnl If we got --enable-qt-mt then adjust some vars for the host.
 
1310
dnl If we not get --disable-qt-mt then adjust some vars for the host.
959
1311
dnl ------------------------------------------------------------------------
960
1312
 
 
1313
KDE_MT_LDFLAGS=
 
1314
KDE_MT_LIBS=
961
1315
if test "x$kde_use_qt_mt" = "xyes"; then
962
 
 
963
 
  case $host in
964
 
  *-*-linux-*)
965
 
    if test "x$GCC" = "xyes"; then
966
 
      CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT -pthread"
967
 
      X_EXTRA_LIBS="$X_EXTRA_LIBS -pthread"
968
 
    else
969
 
      AC_MSG_WARN([Compiler is not gcc. MT support disabled.])
970
 
    fi
971
 
    ;;
972
 
  *)
973
 
    AC_MSG_WARN([MT not yet supported on $host - disabled.])
974
 
    ;;
975
 
  esac
976
 
 
 
1316
  KDE_CHECK_THREADING
 
1317
  if test "x$kde_use_threading" = "xyes"; then
 
1318
    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
 
1319
    KDE_MT_LDFLAGS="$USE_THREADS"
 
1320
    KDE_MT_LIBS="$LIBPTHREAD"
 
1321
  else
 
1322
    kde_use_qt_mt=no
 
1323
  fi
977
1324
fi
 
1325
AC_SUBST(KDE_MT_LDFLAGS)
 
1326
AC_SUBST(KDE_MT_LIBS)
978
1327
 
979
1328
kde_qt_was_given=yes
980
1329
 
981
1330
dnl ------------------------------------------------------------------------
982
1331
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
983
1332
dnl ------------------------------------------------------------------------
984
 
 
985
1333
if test -z "$LIBQT_GLOB"; then
986
 
 
987
 
  LIBQT_GLOB="libqt.*"
988
 
 
 
1334
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1335
    LIBQT_GLOB="libqte.*"
 
1336
  else
 
1337
    LIBQT_GLOB="libqt.*"
 
1338
  fi
989
1339
fi
990
1340
 
991
1341
if test -z "$LIBQT"; then
992
 
 
993
 
  LIBQT="-lqt"
994
 
  kde_int_qt="-lqt"
 
1342
dnl ------------------------------------------------------------
 
1343
dnl If we got --enable-embedded then adjust the Qt library name.
 
1344
dnl ------------------------------------------------------------
 
1345
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1346
    qtlib="qte"
 
1347
  else
 
1348
    qtlib="qt"
 
1349
  fi
 
1350
 
 
1351
  kde_int_qt="-l$qtlib"
 
1352
else
 
1353
  kde_int_qt="$LIBQT"
 
1354
  kde_lib_qt_set=yes
 
1355
fi
 
1356
 
 
1357
if test -z "$LIBQPE"; then
 
1358
dnl ------------------------------------------------------------
 
1359
dnl If we got --enable-palmtop then add -lqpe to the link line
 
1360
dnl ------------------------------------------------------------
 
1361
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1362
    if test "x$kde_use_qt_emb_palm" = "xyes"; then
 
1363
      LIB_QPE="-lqpe"
 
1364
    else
 
1365
      LIB_QPE=""
 
1366
    fi
 
1367
  else
 
1368
    LIB_QPE=""
 
1369
  fi
 
1370
fi
995
1371
 
996
1372
dnl ------------------------------------------------------------------------
997
1373
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
998
1374
dnl ------------------------------------------------------------------------
999
1375
 
1000
 
  if test "x$kde_use_qt_mt" = "xyes"; then
1001
 
 
1002
 
      case $host in
1003
 
      *-*-linux-*)
1004
 
        if test "x$GCC" = "xyes"; then
1005
 
          LIBQT="-lqt-mt"
1006
 
          kde_int_qt="-lqt-mt"
1007
 
          LIBQT_GLOB="libqt-mt.*"
1008
 
          USING_QT_MT="using -mt"
1009
 
        fi
1010
 
      ;;
1011
 
      esac
 
1376
if test "x$kde_use_qt_mt" = "xyes"; then
 
1377
  if test -z "$LIBQT"; then
 
1378
    LIBQT="-l$qtlib-mt"
 
1379
    kde_int_qt="-l$qtlib-mt"
 
1380
  else
 
1381
    LIBQT="$qtlib-mt"
 
1382
    kde_int_qt="$qtlib-mt"
1012
1383
  fi
1013
 
 
1014
 
  kde_qt_was_given=no
1015
 
 
 
1384
  LIBQT_GLOB="lib$qtlib-mt.*"
 
1385
  USING_QT_MT="using -mt"
1016
1386
else
1017
 
  kde_int_qt="$LIBQT"
 
1387
  LIBQT="-l$qtlib"
1018
1388
fi
1019
1389
 
1020
 
if test $kde_qtver = 2; then
 
1390
if test $kde_qtver != 1; then
1021
1391
 
1022
1392
  AC_REQUIRE([AC_FIND_PNG])
1023
1393
  AC_REQUIRE([AC_FIND_JPEG])
1024
1394
  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1025
1395
fi
1026
1396
 
 
1397
if test $kde_qtver = 3; then
 
1398
  AC_REQUIRE([KDE_CHECK_LIBDL])
 
1399
  LIBQT="$LIBQT $LIBDL"
 
1400
fi
 
1401
 
1027
1402
AC_MSG_CHECKING([for Qt])
1028
1403
 
 
1404
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1029
1405
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
 
1406
fi
1030
1407
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1031
1408
qt_libraries=""
1032
1409
qt_includes=""
1033
1410
AC_ARG_WITH(qt-dir,
1034
 
    [  --with-qt-dir=DIR       where the root of Qt is installed ],
 
1411
    AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1035
1412
    [  ac_qt_includes="$withval"/include
1036
 
       ac_qt_libraries="$withval"/lib
 
1413
       ac_qt_libraries="$withval"/lib${kdelibsuff}
1037
1414
       ac_qt_bindir="$withval"/bin
1038
1415
    ])
1039
1416
 
1040
1417
AC_ARG_WITH(qt-includes,
1041
 
    [  --with-qt-includes=DIR  where the Qt includes are. ],
 
1418
    AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1042
1419
    [
1043
1420
       ac_qt_includes="$withval"
1044
1421
    ])
1046
1423
kde_qt_libs_given=no
1047
1424
 
1048
1425
AC_ARG_WITH(qt-libraries,
1049
 
    [  --with-qt-libraries=DIR where the Qt library is installed.],
 
1426
    AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1050
1427
    [  ac_qt_libraries="$withval"
1051
1428
       kde_qt_libs_given=yes
1052
1429
    ])
1058
1435
for dir in $kde_qt_dirs; do
1059
1436
   qt_incdirs="$qt_incdirs $dir/include $dir"
1060
1437
done
1061
 
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"
 
1438
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"
1062
1439
if test ! "$ac_qt_includes" = "NO"; then
1063
1440
   qt_incdirs="$ac_qt_includes $qt_incdirs"
1064
1441
fi
1065
1442
 
1066
 
if test "$kde_qtver" = "2"; then
 
1443
if test "$kde_qtver" != "1"; then
1067
1444
  kde_qt_header=qstyle.h
1068
1445
else
1069
1446
  kde_qt_header=qglobal.h
1074
1451
 
1075
1452
qt_libdirs=""
1076
1453
for dir in $kde_qt_dirs; do
1077
 
   qt_libdirs="$qt_libdirs $dir/lib $dir"
 
1454
   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1078
1455
done
1079
1456
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1080
1457
if test ! "$ac_qt_libraries" = "NO"; then
1088
1465
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1089
1466
  done
1090
1467
fi
 
1468
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
 
1469
  if test -e "$a"; then
 
1470
    LIBQT="$LIBQT ${kde_int_qt}_incremental"
 
1471
    break
 
1472
  fi
 
1473
done
1091
1474
 
1092
1475
ac_qt_libraries="$qt_libdir"
1093
1476
 
1099
1482
ac_libs_safe="$LIBS"
1100
1483
 
1101
1484
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1102
 
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS"
1103
 
LIBS="$LIBS $LIBQT"
 
1485
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
 
1486
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1104
1487
 
1105
1488
KDE_PRINT_QT_PROGRAM
1106
1489
 
1120
1503
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1121
1504
  ac_cv_have_qt="have_qt=no"
1122
1505
  ac_qt_notfound=""
 
1506
  missing_qt_mt=""
1123
1507
  if test "$ac_qt_includes" = NO; then
1124
1508
    if test "$ac_qt_libraries" = NO; then
1125
1509
      ac_qt_notfound="(headers and libraries)";
1127
1511
      ac_qt_notfound="(headers)";
1128
1512
    fi
1129
1513
  else
1130
 
    ac_qt_notfound="(libraries)";
 
1514
    if test "x$kde_use_qt_mt" = "xyes"; then
 
1515
       missing_qt_mt="
 
1516
Make sure that you have compiled Qt with thread support!"
 
1517
       ac_qt_notfound="(library $qtlib-mt)";
 
1518
    else
 
1519
       ac_qt_notfound="(library $qtlib)";
 
1520
    fi
1131
1521
  fi
1132
1522
 
1133
1523
  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1134
 
For more details about this problem, look at the end of config.log.])
 
1524
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1135
1525
else
1136
1526
  have_qt="yes"
1137
1527
fi
1150
1540
  qt_includes="$ac_qt_includes"
1151
1541
fi
1152
1542
 
1153
 
if test ! "$kde_qt_libs_given" = "yes"; then
1154
 
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
 
1543
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
 
1544
     KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1155
1545
fi
1156
1546
 
1157
1547
AC_SUBST(qt_libraries)
1158
1548
AC_SUBST(qt_includes)
1159
1549
 
1160
1550
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1161
 
 QT_INCLUDES="";
 
1551
 QT_INCLUDES=""
1162
1552
else
1163
1553
 QT_INCLUDES="-I$qt_includes"
1164
1554
 all_includes="$QT_INCLUDES $all_includes"
1170
1560
 QT_LDFLAGS="-L$qt_libraries"
1171
1561
 all_libraries="$all_libraries $QT_LDFLAGS"
1172
1562
fi
 
1563
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1173
1564
 
1174
1565
AC_SUBST(QT_INCLUDES)
1175
1566
AC_SUBST(QT_LDFLAGS)
1176
1567
AC_PATH_QT_MOC_UIC
1177
1568
 
1178
 
LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
 
1569
KDE_CHECK_QT_JPEG
 
1570
 
 
1571
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
1572
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
 
1573
else
 
1574
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
 
1575
fi
 
1576
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
 
1577
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
 
1578
  if test -e "$a"; then
 
1579
     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
 
1580
     break
 
1581
  fi
 
1582
done
 
1583
 
1179
1584
AC_SUBST(LIB_QT)
 
1585
AC_SUBST(LIB_QPE)
1180
1586
 
 
1587
AC_SUBST(kde_qtver)
1181
1588
])
1182
1589
 
1183
 
AC_DEFUN(AC_PATH_QT,
 
1590
AC_DEFUN([AC_PATH_QT],
1184
1591
[
1185
1592
AC_PATH_QT_1_3
1186
1593
])
1187
1594
 
1188
 
AC_DEFUN(KDE_CHECK_FINAL,
1189
 
[
1190
 
  AC_ARG_ENABLE(final, [  --enable-final          build size optimized apps (experimental - needs lots of memory)],
 
1595
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
 
1596
[
 
1597
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
 
1598
 
 
1599
if test x$ac_uic_supports_libpath = xyes; then
 
1600
 
 
1601
AC_MSG_CHECKING([if UIC has KDE plugins available])
 
1602
AC_CACHE_VAL(kde_cv_uic_plugins,
 
1603
[
 
1604
cat > actest.ui << EOF
 
1605
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
 
1606
<class>NewConnectionDialog</class>
 
1607
<widget class="QDialog">
 
1608
   <widget class="KLineEdit">
 
1609
        <property name="name">
 
1610
           <cstring>testInput</cstring>
 
1611
        </property>
 
1612
   </widget>
 
1613
</widget>
 
1614
</UI>
 
1615
EOF
 
1616
       
 
1617
 
 
1618
 
 
1619
kde_cv_uic_plugins=no
 
1620
kde_line="$UIC_PATH -L $kde_widgetdir"
 
1621
if test x$ac_uic_supports_nounload = xyes; then
 
1622
   kde_line="$kde_line -nounload"
 
1623
fi
 
1624
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
 
1625
if AC_TRY_EVAL(kde_line); then
 
1626
        # if you're trying to debug this check and think it's incorrect,
 
1627
        # better check your installation. The check _is_ correct - your
 
1628
        # installation is not.
 
1629
        if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
 
1630
                kde_cv_uic_plugins=yes
 
1631
        fi
 
1632
fi
 
1633
rm -f actest.ui actest.cpp
 
1634
])
 
1635
 
 
1636
AC_MSG_RESULT([$kde_cv_uic_plugins])
 
1637
if test "$kde_cv_uic_plugins" != yes; then
 
1638
        AC_MSG_ERROR([you need to install kdelibs first.])
 
1639
fi
 
1640
fi
 
1641
])
 
1642
 
 
1643
AC_DEFUN([KDE_CHECK_FINAL],
 
1644
[
 
1645
  AC_ARG_ENABLE(final,
 
1646
        AC_HELP_STRING([--enable-final],
 
1647
                       [build size optimized apps (experimental - needs lots of memory)]),
1191
1648
        kde_use_final=$enableval, kde_use_final=no)
1192
1649
 
1193
 
  KDE_COMPILER_REPO
1194
1650
  if test "x$kde_use_final" = "xyes"; then
1195
1651
      KDE_USE_FINAL_TRUE=""
1196
1652
      KDE_USE_FINAL_FALSE="#"
1200
1656
  fi
1201
1657
  AC_SUBST(KDE_USE_FINAL_TRUE)
1202
1658
  AC_SUBST(KDE_USE_FINAL_FALSE)
1203
 
 
1204
 
  AC_ARG_ENABLE(closure, [  --disable-closure       don't delay template instantiation],
1205
 
        kde_use_closure=$enableval, kde_use_closure=yes)
1206
 
 
 
1659
])
 
1660
 
 
1661
AC_DEFUN([KDE_CHECK_CLOSURE],
 
1662
[
 
1663
  AC_ARG_ENABLE(closure,
 
1664
                AC_HELP_STRING([--enable-closure],[delay template instantiation]),
 
1665
        kde_use_closure=$enableval, kde_use_closure=no)
 
1666
 
 
1667
  KDE_NO_UNDEFINED=""
1207
1668
  if test "x$kde_use_closure" = "xyes"; then
1208
1669
       KDE_USE_CLOSURE_TRUE=""
1209
1670
       KDE_USE_CLOSURE_FALSE="#"
1211
1672
  else
1212
1673
       KDE_USE_CLOSURE_TRUE="#"
1213
1674
       KDE_USE_CLOSURE_FALSE=""
 
1675
       KDE_NO_UNDEFINED=""
 
1676
       case $host in 
 
1677
         *-*-linux-gnu)
 
1678
           KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
 
1679
                [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
 
1680
                [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
 
1681
                [KDE_NO_UNDEFINED=""])],
 
1682
            [KDE_NO_UNDEFINED=""])
 
1683
           ;;
 
1684
       esac
1214
1685
  fi
1215
1686
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
1216
1687
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
 
1688
  AC_SUBST(KDE_NO_UNDEFINED)
 
1689
])
 
1690
 
 
1691
AC_DEFUN([KDE_CHECK_NMCHECK],
 
1692
[
 
1693
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
 
1694
        kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
 
1695
 
 
1696
  if test "$kde_use_nmcheck" = "yes"; then
 
1697
      KDE_USE_NMCHECK_TRUE=""
 
1698
      KDE_USE_NMCHECK_FALSE="#"
 
1699
   else
 
1700
      KDE_USE_NMCHECK_TRUE="#"
 
1701
      KDE_USE_NMCHECK_FALSE=""
 
1702
  fi
 
1703
  AC_SUBST(KDE_USE_NMCHECK_TRUE)
 
1704
  AC_SUBST(KDE_USE_NMCHECK_FALSE)
 
1705
])
 
1706
 
 
1707
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
 
1708
savex=$exec_prefix
 
1709
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
1710
tmp=$$2
 
1711
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
 
1712
exec_prefix=$savex
1217
1713
])
1218
1714
 
1219
1715
dnl ------------------------------------------------------------------------
1222
1718
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1223
1719
dnl ------------------------------------------------------------------------
1224
1720
dnl
1225
 
AC_DEFUN(AC_BASE_PATH_KDE,
 
1721
AC_DEFUN([AC_BASE_PATH_KDE],
1226
1722
[
1227
 
AC_PREREQ([2.13])
 
1723
AC_REQUIRE([KDE_CHECK_STL])
1228
1724
AC_REQUIRE([AC_PATH_QT])dnl
 
1725
AC_REQUIRE([KDE_CHECK_LIB64])
 
1726
 
1229
1727
AC_CHECK_RPATH
1230
1728
AC_MSG_CHECKING([for KDE])
1231
1729
 
1232
1730
if test "${prefix}" != NONE; then
1233
 
  kde_includes=${prefix}/include
1234
 
  ac_kde_includes=$prefix/include
1235
 
 
1236
 
  if test "${exec_prefix}" != NONE; then
1237
 
    kde_libraries=${exec_prefix}/lib
1238
 
    ac_kde_libraries=$exec_prefix/lib
1239
 
  else
1240
 
    kde_libraries=${prefix}/lib
1241
 
    ac_kde_libraries=$prefix/lib
1242
 
  fi
 
1731
  kde_includes=${includedir}
 
1732
  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
 
1733
 
 
1734
  kde_libraries=${libdir}
 
1735
  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
 
1736
 
1243
1737
else
1244
1738
  ac_kde_includes=
1245
1739
  ac_kde_libraries=
1260
1754
 
1261
1755
if test -z "$1"; then
1262
1756
 
1263
 
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde2/include /opt/kde/include $x_includes $qt_includes"
 
1757
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"
1264
1758
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1265
1759
kde_incdirs="$ac_kde_includes $kde_incdirs"
1266
1760
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1272
1766
So, check this please and use another prefix!])
1273
1767
fi
1274
1768
 
1275
 
kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde2/lib /opt/kde/lib /usr/X11R6/kde/lib"
1276
 
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
1277
 
kde_libdirs="$ac_kde_libraries $kde_libdirs"
 
1769
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}"
 
1770
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
 
1771
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1278
1772
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1279
1773
ac_kde_libraries="$kde_libdir"
1280
1774
 
 
1775
kde_widgetdir=NO
 
1776
dnl this might be somewhere else
 
1777
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
 
1778
 
1281
1779
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1282
1780
AC_MSG_ERROR([
1283
1781
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1284
1782
So, check this please and use another prefix!])
1285
1783
fi
1286
 
ac_kde_libraries="$kde_libdir"
1287
 
 
1288
 
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then
 
1784
 
 
1785
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
 
1786
AC_MSG_ERROR([
 
1787
I can't find the designer plugins. These are required and should have been installed
 
1788
by kdelibs])
 
1789
fi
 
1790
 
 
1791
if test -n "$kde_widgetdir"; then
 
1792
    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
 
1793
fi
 
1794
 
 
1795
 
 
1796
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1289
1797
  ac_cv_have_kde="have_kde=no"
1290
1798
else
1291
1799
  ac_cv_have_kde="have_kde=yes \
1292
1800
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1293
1801
fi
1294
1802
 
1295
 
else dnl test -z $1
 
1803
else dnl test -z $1, e.g. from kdelibs
1296
1804
 
1297
1805
  ac_cv_have_kde="have_kde=no"
1298
1806
 
1315
1823
  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1316
1824
 fi
1317
1825
 
1318
 
 kde_libraries="${ac_kde_exec_prefix}/lib"
1319
 
 kde_includes=${ac_kde_prefix}/include
 
1826
 kde_libraries="${libdir}"
 
1827
 kde_includes="${includedir}"
1320
1828
 
1321
1829
else
1322
1830
  ac_cv_have_kde="have_kde=yes \
1335
1843
 KDE_INCLUDES="-I$kde_includes"
1336
1844
 all_includes="$KDE_INCLUDES $all_includes"
1337
1845
fi
 
1846
 
 
1847
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1338
1848
 
1339
1849
KDE_LDFLAGS="-L$kde_libraries"
1340
1850
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
1351
1861
AC_SUBST(all_includes)
1352
1862
AC_SUBST(all_libraries)
1353
1863
 
 
1864
if test -z "$1"; then
 
1865
KDE_CHECK_UIC_PLUGINS
 
1866
fi
 
1867
 
 
1868
ac_kde_libraries="$kde_libdir"
 
1869
 
1354
1870
AC_SUBST(AUTODIRS)
 
1871
 
 
1872
 
1355
1873
])
1356
1874
 
1357
 
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
 
1875
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1358
1876
[
1359
1877
AC_MSG_CHECKING(for extra includes)
1360
 
AC_ARG_WITH(extra-includes, [  --with-extra-includes=DIR
1361
 
                          adds non standard include paths],
 
1878
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1362
1879
  kde_use_extra_includes="$withval",
1363
1880
  kde_use_extra_includes=NONE
1364
1881
)
1383
1900
 
1384
1901
kde_extra_libs=
1385
1902
AC_MSG_CHECKING(for extra libs)
1386
 
AC_ARG_WITH(extra-libs, [  --with-extra-libs=DIR   adds non standard library paths],
 
1903
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1387
1904
  kde_use_extra_libs=$withval,
1388
1905
  kde_use_extra_libs=NONE
1389
1906
)
1409
1926
 
1410
1927
])
1411
1928
 
1412
 
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
 
1929
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1413
1930
[
1414
1931
    AC_MSG_CHECKING([for KDE headers installed])
1415
1932
    AC_LANG_SAVE
1440
1957
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1441
1958
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1442
1959
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
 
1960
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
 
1961
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
 
1962
    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
 
1963
    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
 
1964
    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
 
1965
    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
1443
1966
    return 0;
1444
1967
    }
1445
1968
EOF
1446
1969
 
1447
 
 ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
 
1970
 ac_save_CPPFLAGS=$CPPFLAGS
 
1971
 CPPFLAGS="$all_includes $CPPFLAGS"
1448
1972
 if AC_TRY_EVAL(ac_compile); then
1449
1973
   AC_MSG_RESULT(yes)
1450
1974
 else
1452
1976
Check, if you installed the KDE header files correctly.
1453
1977
For more details about this problem, look at the end of config.log.])
1454
1978
  fi
 
1979
  CPPFLAGS=$ac_save_CPPFLAGS
1455
1980
 
1456
1981
  AC_LANG_RESTORE
1457
1982
])
1458
1983
 
1459
 
AC_DEFUN(KDE_CHECK_KDEQTADDON,
 
1984
AC_DEFUN([KDE_CHECK_KDEQTADDON],
1460
1985
[
1461
1986
AC_MSG_CHECKING(for kde-qt-addon)
1462
1987
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1481
2006
 
1482
2007
 LDFLAGS=$kde_ldflags_safe
1483
2008
 LIBS=$kde_libs_safe
1484
 
 kde_cxxflags_safe="$CXXFLAGS"
 
2009
 CXXFLAGS=$kde_cxxflags_safe
1485
2010
])
1486
2011
 
1487
2012
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1492
2017
fi
1493
2018
])
1494
2019
 
1495
 
AC_DEFUN(KDE_CHECK_KIMGIO,
1496
 
[
1497
 
   AC_REQUIRE([AC_BASE_PATH_KDE])
1498
 
   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1499
 
   AC_REQUIRE([AC_FIND_TIFF])
1500
 
   AC_REQUIRE([AC_FIND_JPEG])
1501
 
   AC_REQUIRE([AC_FIND_PNG])
1502
 
   AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
1503
 
 
1504
 
   if test "$1" = "existance"; then
1505
 
     AC_LANG_SAVE
1506
 
     AC_LANG_CPLUSPLUS
1507
 
     kde_save_LIBS="$LIBS"
1508
 
     LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
1509
 
     AC_CHECK_LIB(kimgio, kimgioRegister, [
1510
 
      LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
1511
 
      LIBS="$kde_save_LIBS"
1512
 
      AC_LANG_RESTORE
1513
 
   else
1514
 
      LIBKIMGIO_EXISTS=yes
1515
 
   fi
1516
 
 
1517
 
   if test "$LIBKIMGIO_EXISTS" = "yes"; then
1518
 
     LIB_KIMGIO='-lkimgio'
1519
 
   else
1520
 
     LIB_KIMGIO=''
1521
 
   fi
1522
 
   AC_SUBST(LIB_KIMGIO)
1523
 
])
1524
 
 
1525
 
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
 
2020
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
1526
2021
[
1527
2022
   AC_REQUIRE([KDE_MISC_TESTS])
1528
2023
   AC_REQUIRE([KDE_CHECK_LIBDL])
1529
2024
   AC_REQUIRE([K_PATH_X])
1530
2025
 
1531
 
if test $kde_qtver = 2; then
1532
 
   LIB_KDECORE='-lkdecore'
1533
 
   AC_SUBST(LIB_KDECORE)
1534
 
   LIB_KDEUI='-lkdeui'
1535
 
   AC_SUBST(LIB_KDEUI)
1536
 
   LIB_KFORMULA='-lkformula'
1537
 
   AC_SUBST(LIB_KFORMULA)
1538
 
   LIB_KIO='-lkio'
1539
 
   AC_SUBST(LIB_KIO)
1540
 
   LIB_KSYCOCA='-lksycoca'
1541
 
   AC_SUBST(LIB_KSYCOCA)
1542
 
   LIB_SMB='-lsmb'
1543
 
   AC_SUBST(LIB_SMB)
1544
 
   LIB_KFILE='-lkfile'
1545
 
   AC_SUBST(LIB_KFILE)
1546
 
   LIB_KAB='-lkab'
1547
 
   AC_SUBST(LIB_KAB)
1548
 
   LIB_KHTML='-lkhtml'
1549
 
   AC_SUBST(LIB_KHTML)
1550
 
   LIB_KSPELL='-lkspell'
1551
 
   AC_SUBST(LIB_KSPELL)
1552
 
   LIB_KPARTS='-lkparts'
1553
 
   AC_SUBST(LIB_KPARTS)
1554
 
   LIB_KWRITE='-lkwrite'
1555
 
   AC_SUBST(LIB_KWRITE)
 
2026
if test $kde_qtver = 3; then
 
2027
   AC_SUBST(LIB_KDECORE, "-lkdecore")
 
2028
   AC_SUBST(LIB_KDEUI, "-lkdeui")
 
2029
   AC_SUBST(LIB_KIO, "-lkio")
 
2030
   AC_SUBST(LIB_SMB, "-lsmb")
 
2031
   AC_SUBST(LIB_KAB, "-lkab")
 
2032
   AC_SUBST(LIB_KABC, "-lkabc")
 
2033
   AC_SUBST(LIB_KHTML, "-lkhtml")
 
2034
   AC_SUBST(LIB_KSPELL, "-lkspell")
 
2035
   AC_SUBST(LIB_KPARTS, "-lkparts")
 
2036
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
 
2037
   AC_SUBST(LIB_KUTILS, "-lkutils")
 
2038
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
 
2039
# these are for backward compatibility
 
2040
   AC_SUBST(LIB_KSYCOCA, "-lkio")
 
2041
   AC_SUBST(LIB_KFILE, "-lkio")
 
2042
elif test $kde_qtver = 2; then
 
2043
   AC_SUBST(LIB_KDECORE, "-lkdecore")
 
2044
   AC_SUBST(LIB_KDEUI, "-lkdeui")
 
2045
   AC_SUBST(LIB_KIO, "-lkio")
 
2046
   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
 
2047
   AC_SUBST(LIB_SMB, "-lsmb")
 
2048
   AC_SUBST(LIB_KFILE, "-lkfile")
 
2049
   AC_SUBST(LIB_KAB, "-lkab")
 
2050
   AC_SUBST(LIB_KHTML, "-lkhtml")
 
2051
   AC_SUBST(LIB_KSPELL, "-lkspell")
 
2052
   AC_SUBST(LIB_KPARTS, "-lkparts")
 
2053
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1556
2054
else
1557
 
   LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
1558
 
   AC_SUBST(LIB_KDECORE)
1559
 
   LIB_KDEUI='-lkdeui $(LIB_KDECORE)'
1560
 
   AC_SUBST(LIB_KDEUI)
1561
 
   LIB_KFM='-lkfm $(LIB_KDECORE)'
1562
 
   AC_SUBST(LIB_KFM)
1563
 
   LIB_KFILE='-lkfile $(LIB_KFM) $(LIB_KDEUI)'
1564
 
   AC_SUBST(LIB_KFILE)
1565
 
   LIB_KAB='-lkab $(LIB_KIMGIO) $(LIB_KDECORE)'
1566
 
   AC_SUBST(LIB_KAB)
 
2055
   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
 
2056
   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
 
2057
   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
 
2058
   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
 
2059
   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
1567
2060
fi
1568
2061
])
1569
2062
 
1570
 
AC_DEFUN(AC_PATH_KDE,
 
2063
AC_DEFUN([AC_PATH_KDE],
1571
2064
[
1572
2065
  AC_BASE_PATH_KDE
1573
 
  AC_ARG_ENABLE(path-check, [  --disable-path-check    don't try to find out, where to install],
 
2066
  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
1574
2067
  [
1575
2068
  if test "$enableval" = "no";
1576
2069
    then ac_use_path_checking="default"
1591
2084
  KDE_CREATE_LIBS_ALIASES
1592
2085
])
1593
2086
 
1594
 
dnl obsolete
1595
 
AC_DEFUN(AC_CHECK_SETENV,
1596
 
[
1597
 
   AC_OBSOLETE([$0], [; instead use AC_CHECK_FUNCS([setenv unsetenv])])dnl 
1598
 
   AC_CHECK_FUNCS([setenv unsetenv])
1599
 
])
1600
 
 
1601
 
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
1602
 
[
1603
 
AC_MSG_CHECKING(for getdomainname)
1604
 
AC_CACHE_VAL(ac_cv_func_getdomainname,
 
2087
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
 
2088
AC_DEFUN([KDE_CHECK_FUNC_EXT],
 
2089
[
 
2090
AC_MSG_CHECKING(for $1)
 
2091
AC_CACHE_VAL(kde_cv_func_$1,
1605
2092
[
1606
2093
AC_LANG_SAVE
1607
2094
AC_LANG_CPLUSPLUS
1608
2095
save_CXXFLAGS="$CXXFLAGS"
1609
2096
kde_safe_LIBS="$LIBS"
1610
2097
LIBS="$LIBS $X_EXTRA_LIBS"
1611
 
if test "$GCC" = "yes"; then
 
2098
if test "$GXX" = "yes"; then
1612
2099
CXXFLAGS="$CXXFLAGS -pedantic-errors"
1613
2100
fi
1614
2101
AC_TRY_COMPILE([
1615
 
#include <stdlib.h>
1616
 
#include <unistd.h>
 
2102
$2
1617
2103
],
1618
2104
[
1619
 
char buffer[200];
1620
 
getdomainname(buffer, 200);
 
2105
$3
1621
2106
],
1622
 
ac_cv_func_getdomainname=yes,
1623
 
ac_cv_func_getdomainname=no)
 
2107
kde_cv_func_$1=yes,
 
2108
kde_cv_func_$1=no)
1624
2109
CXXFLAGS="$save_CXXFLAGS"
1625
 
LIBS=$kde_safe_LIBS
 
2110
LIBS="$kde_safe_LIBS"
1626
2111
AC_LANG_RESTORE
1627
2112
])
1628
 
AC_MSG_RESULT($ac_cv_func_getdomainname)
1629
 
 
1630
 
AC_MSG_CHECKING([if getdomainname needs custom prototype])
1631
 
AC_CACHE_VAL(ac_cv_proto_getdomainname,
 
2113
 
 
2114
AC_MSG_RESULT($kde_cv_func_$1)
 
2115
 
 
2116
AC_MSG_CHECKING([if $1 needs custom prototype])
 
2117
AC_CACHE_VAL(kde_cv_proto_$1,
1632
2118
[
 
2119
if test "x$kde_cv_func_$1" = xyes; then
 
2120
  kde_cv_proto_$1=no
 
2121
else
 
2122
  case "$1" in
 
2123
        setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
 
2124
                kde_cv_proto_$1="yes - in libkdefakes"
 
2125
                ;;
 
2126
        *)
 
2127
                kde_cv_proto_$1=unknown
 
2128
                ;;
 
2129
  esac
 
2130
fi
 
2131
 
 
2132
if test "x$kde_cv_proto_$1" = xunknown; then
 
2133
 
1633
2134
AC_LANG_SAVE
1634
2135
AC_LANG_CPLUSPLUS
1635
 
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
1636
 
  ac_cv_proto_getdomainname=no
1637
 
else
1638
2136
  kde_safe_libs=$LIBS
1639
2137
  LIBS="$LIBS $X_EXTRA_LIBS"
1640
2138
  AC_TRY_LINK([
1641
 
#include <stdlib.h>
1642
 
#include <unistd.h>
 
2139
$2
1643
2140
 
1644
 
extern "C" int getdomainname (char *, int);
 
2141
extern "C" $4;
1645
2142
],
1646
2143
[
1647
 
char buffer[200];
1648
 
getdomainname(buffer, 200);
 
2144
$3
1649
2145
],
1650
 
  ac_cv_func_getdomainname=yes
1651
 
  ac_cv_proto_getdomainname=yes,
1652
 
  AC_MSG_RESULT([fatal error])
1653
 
  AC_MSG_ERROR([getdomainname unavailable]))
1654
 
fi
 
2146
[ kde_cv_func_$1=yes
 
2147
  kde_cv_proto_$1=yes ],
 
2148
  [kde_cv_proto_$1="$1 unavailable"]
 
2149
)
1655
2150
LIBS=$kde_safe_libs
1656
2151
AC_LANG_RESTORE
1657
 
])
1658
 
AC_MSG_RESULT($ac_cv_proto_getdomainname)
1659
 
 
1660
 
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
1661
 
  AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname])
1662
 
fi
1663
 
if eval "test \"`echo $ac_cv_proto_getdomainname`\" = no"; then
1664
 
  AC_DEFINE(HAVE_GETDOMAINNAME_PROTO, 1,
1665
 
  [Define if you have getdomainname prototype])
1666
 
fi
1667
 
 
1668
 
])
1669
 
 
1670
 
AC_DEFUN(AC_CHECK_GETHOSTNAME,
1671
 
[
1672
 
 
1673
 
AC_MSG_CHECKING([for gethostname])
1674
 
AC_CACHE_VAL(ac_cv_func_gethostname,
1675
 
[
1676
 
AC_LANG_SAVE
1677
 
AC_LANG_CPLUSPLUS
1678
 
save_CXXFLAGS="$CXXFLAGS"
1679
 
if test "$GCC" = "yes"; then
1680
 
CXXFLAGS="$CXXFLAGS -pedantic-errors"
1681
 
fi
1682
 
AC_TRY_LINK([
1683
 
#include <stdlib.h>
1684
 
#include <unistd.h>
1685
 
],
1686
 
[
1687
 
char buffer[200];
1688
 
gethostname(buffer, 200);
1689
 
],
1690
 
ac_cv_func_gethostname=yes,
1691
 
ac_cv_func_gethostname=no)
1692
 
CXXFLAGS="$save_CXXFLAGS"
1693
 
AC_LANG_RESTORE
1694
 
])
1695
 
AC_MSG_RESULT($ac_cv_func_gethostname)
1696
 
 
1697
 
AC_MSG_CHECKING([if gethostname needs custom prototype])
1698
 
AC_CACHE_VAL(ac_cv_proto_gethostname,
1699
 
[
1700
 
AC_LANG_SAVE
1701
 
AC_LANG_CPLUSPLUS
1702
 
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
1703
 
  ac_cv_proto_gethostname=no
1704
 
else
1705
 
  AC_TRY_LINK([
1706
 
#include <stdlib.h>
1707
 
#include <unistd.h>
1708
 
 
1709
 
extern "C" int gethostname (char *, int);
1710
 
],
1711
 
[
1712
 
char buffer[200];
1713
 
gethostname(buffer, 200);
1714
 
],
1715
 
  ac_cv_func_gethostname=yes
1716
 
  ac_cv_proto_gethostname=yes,
1717
 
  AC_MSG_RESULT([fatal error])
1718
 
  AC_MSG_ERROR(gethostname unavailable))
1719
 
fi
1720
 
AC_LANG_RESTORE
1721
 
])
1722
 
AC_MSG_RESULT($ac_cv_proto_gethostname)
1723
 
 
1724
 
if eval "test \"`echo $ac_cv_proto_gethostname`\" = no"; then
1725
 
  AC_DEFINE(HAVE_GETHOSTNAME_PROTO, 1,
1726
 
  [Define if you have gethostname prototype])
1727
 
fi
1728
 
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
1729
 
  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
1730
 
fi
1731
 
])
1732
 
 
1733
 
AC_DEFUN(AC_CHECK_USLEEP,
1734
 
[
1735
 
AC_MSG_CHECKING([for usleep])
1736
 
AC_CACHE_VAL(ac_cv_func_usleep,
1737
 
[
1738
 
AC_LANG_SAVE
1739
 
AC_LANG_CPLUSPLUS
1740
 
ac_libs_safe="$LIBS"
1741
 
LIBS="$LIBS $LIBUCB"
1742
 
AC_TRY_LINK([
1743
 
#include <stdlib.h>
1744
 
#include <unistd.h>
1745
 
],
1746
 
[
 
2152
fi
 
2153
])
 
2154
AC_MSG_RESULT($kde_cv_proto_$1)
 
2155
 
 
2156
if test "x$kde_cv_func_$1" = xyes; then
 
2157
  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
 
2158
  $6
 
2159
fi
 
2160
if test "x$kde_cv_proto_$1" = xno; then
 
2161
  AC_DEFINE(HAVE_$5_PROTO, 1,
 
2162
  [Define if you have the $1 prototype])
 
2163
fi
 
2164
 
 
2165
AH_VERBATIM([_HAVE_$5_PROTO],
 
2166
[
 
2167
#if !defined(HAVE_$5_PROTO)
 
2168
#ifdef __cplusplus
 
2169
extern "C" {
 
2170
#endif
 
2171
$4;
 
2172
#ifdef __cplusplus
 
2173
}
 
2174
#endif
 
2175
#endif
 
2176
])
 
2177
])
 
2178
 
 
2179
AC_DEFUN([AC_CHECK_SETENV],
 
2180
[
 
2181
        KDE_CHECK_FUNC_EXT(setenv, [
 
2182
#include <stdlib.h>
 
2183
], 
 
2184
                [setenv("VAR", "VALUE", 1);],
 
2185
                [int setenv (const char *, const char *, int)],
 
2186
                [SETENV])
 
2187
])
 
2188
 
 
2189
AC_DEFUN([AC_CHECK_UNSETENV],
 
2190
[
 
2191
        KDE_CHECK_FUNC_EXT(unsetenv, [
 
2192
#include <stdlib.h>
 
2193
], 
 
2194
                [unsetenv("VAR");],
 
2195
                [void unsetenv (const char *)],
 
2196
                [UNSETENV])
 
2197
])
 
2198
 
 
2199
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
 
2200
[
 
2201
        KDE_CHECK_FUNC_EXT(getdomainname, [
 
2202
#include <stdlib.h>
 
2203
#include <unistd.h>
 
2204
#include <netdb.h>
 
2205
], 
 
2206
                [
 
2207
char buffer[200];
 
2208
getdomainname(buffer, 200);
 
2209
],      
 
2210
                [#include <sys/types.h>
 
2211
                int getdomainname (char *, size_t)],
 
2212
                [GETDOMAINNAME])
 
2213
])
 
2214
 
 
2215
AC_DEFUN([AC_CHECK_GETHOSTNAME],
 
2216
[
 
2217
        KDE_CHECK_FUNC_EXT(gethostname, [
 
2218
#include <stdlib.h>
 
2219
#include <unistd.h>
 
2220
], 
 
2221
                [
 
2222
char buffer[200];
 
2223
gethostname(buffer, 200);
 
2224
],      
 
2225
                [int gethostname (char *, unsigned int)],
 
2226
                [GETHOSTNAME])
 
2227
])
 
2228
 
 
2229
AC_DEFUN([AC_CHECK_USLEEP],
 
2230
[
 
2231
        KDE_CHECK_FUNC_EXT(usleep, [
 
2232
#include <unistd.h>
 
2233
], 
 
2234
                [
1747
2235
usleep(200);
1748
 
],
1749
 
ac_cv_func_usleep=yes,
1750
 
ac_cv_func_usleep=no)
1751
 
LIBS="$ac_libs_safe"
1752
 
AC_LANG_RESTORE
1753
 
])
1754
 
AC_MSG_RESULT($ac_cv_func_usleep)
1755
 
if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then
1756
 
  AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function])
1757
 
fi
1758
 
])
1759
 
 
1760
 
AC_DEFUN(AC_CHECK_RANDOM,
1761
 
[
1762
 
AC_MSG_CHECKING([for random])
1763
 
AC_CACHE_VAL(ac_cv_func_random,
1764
 
[
1765
 
AC_LANG_SAVE
1766
 
AC_LANG_CPLUSPLUS
1767
 
ac_libs_safe="$LIBS"
1768
 
LIBS="$LIBS $LIBUCB"
1769
 
AC_TRY_LINK([
 
2236
],      
 
2237
                [int usleep (unsigned int)],
 
2238
                [USLEEP])
 
2239
])
 
2240
 
 
2241
 
 
2242
AC_DEFUN([AC_CHECK_RANDOM],
 
2243
[
 
2244
        KDE_CHECK_FUNC_EXT(random, [
1770
2245
#include <stdlib.h>
1771
 
],
1772
 
[
 
2246
], 
 
2247
                [
1773
2248
random();
1774
 
],
1775
 
ac_cv_func_random=yes,
1776
 
ac_cv_func_random=no)
1777
 
LIBS="$ac_libs_safe"
1778
 
AC_LANG_RESTORE
1779
 
])
1780
 
AC_MSG_RESULT($ac_cv_func_random)
1781
 
if eval "test \"`echo $ac_cv_func_random`\" = yes"; then
1782
 
  AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random])
1783
 
fi
1784
 
])
1785
 
 
1786
 
AC_DEFUN(AC_FIND_GIF,
 
2249
],      
 
2250
                [long int random(void)],
 
2251
                [RANDOM])
 
2252
 
 
2253
        KDE_CHECK_FUNC_EXT(srandom, [
 
2254
#include <stdlib.h>
 
2255
], 
 
2256
                [
 
2257
srandom(27);
 
2258
],      
 
2259
                [void srandom(unsigned int)],
 
2260
                [SRANDOM])
 
2261
 
 
2262
])
 
2263
 
 
2264
AC_DEFUN([AC_CHECK_INITGROUPS],
 
2265
[
 
2266
        KDE_CHECK_FUNC_EXT(initgroups, [
 
2267
#include <sys/types.h>
 
2268
#include <unistd.h>
 
2269
#include <grp.h>
 
2270
],
 
2271
        [
 
2272
char buffer[200];
 
2273
initgroups(buffer, 27);
 
2274
],
 
2275
        [int initgroups(const char *, gid_t)],
 
2276
        [INITGROUPS])
 
2277
])
 
2278
 
 
2279
AC_DEFUN([AC_CHECK_MKSTEMPS],
 
2280
[
 
2281
        KDE_CHECK_FUNC_EXT(mkstemps, [
 
2282
#include <stdlib.h>
 
2283
#include <unistd.h>
 
2284
],
 
2285
        [
 
2286
mkstemps("/tmp/aaaXXXXXX", 6);
 
2287
],
 
2288
        [int mkstemps(char *, int)],
 
2289
        [MKSTEMPS])
 
2290
])
 
2291
 
 
2292
AC_DEFUN([AC_CHECK_MKDTEMP],
 
2293
[
 
2294
        KDE_CHECK_FUNC_EXT(mkdtemp, [
 
2295
#include <stdlib.h>
 
2296
#include <unistd.h>
 
2297
],
 
2298
        [
 
2299
mkdtemp("/tmp/aaaXXXXXX");
 
2300
],
 
2301
        [char *mkdtemp(char *)],
 
2302
        [MKDTEMP])
 
2303
])
 
2304
 
 
2305
 
 
2306
AC_DEFUN([AC_CHECK_RES_INIT],
 
2307
[
 
2308
  AC_MSG_CHECKING([if res_init needs -lresolv])
 
2309
  kde_libs_safe="$LIBS"
 
2310
  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
 
2311
  AC_TRY_LINK(
 
2312
    [
 
2313
#include <sys/types.h>
 
2314
#include <netinet/in.h>
 
2315
#include <arpa/nameser.h>
 
2316
#include <resolv.h>
 
2317
    ],
 
2318
    [
 
2319
      res_init(); 
 
2320
    ],
 
2321
    [
 
2322
      LIBRESOLV="-lresolv"
 
2323
      AC_MSG_RESULT(yes)
 
2324
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
 
2325
    ],
 
2326
    [ AC_MSG_RESULT(no) ]
 
2327
  )
 
2328
  LIBS=$kde_libs_safe
 
2329
  AC_SUBST(LIBRESOLV)
 
2330
 
 
2331
  AC_MSG_CHECKING([if res_init is available])
 
2332
  AC_TRY_COMPILE(
 
2333
    [
 
2334
#include <sys/types.h>
 
2335
#include <netinet/in.h>
 
2336
#include <arpa/nameser.h>
 
2337
#include <resolv.h>
 
2338
    ],
 
2339
    [
 
2340
      res_init();
 
2341
    ],
 
2342
    [
 
2343
      AC_MSG_RESULT(yes)
 
2344
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
 
2345
    ],
 
2346
    [ AC_MSG_RESULT(no) ]
 
2347
  )
 
2348
])
 
2349
 
 
2350
AC_DEFUN([AC_CHECK_STRLCPY],
 
2351
[
 
2352
        KDE_CHECK_FUNC_EXT(strlcpy, [
 
2353
#include <string.h>
 
2354
],
 
2355
[ char buf[20];
 
2356
  strlcpy(buf, "KDE function test", sizeof(buf));
 
2357
],
 
2358
        [unsigned long strlcpy(char*, const char*, unsigned long)],
 
2359
        [STRLCPY])
 
2360
])
 
2361
 
 
2362
AC_DEFUN([AC_CHECK_STRLCAT],
 
2363
[
 
2364
        KDE_CHECK_FUNC_EXT(strlcat, [
 
2365
#include <string.h>
 
2366
],
 
2367
[ char buf[20];
 
2368
  buf[0]='\0';
 
2369
  strlcat(buf, "KDE function test", sizeof(buf));
 
2370
],
 
2371
        [unsigned long strlcat(char*, const char*, unsigned long)],
 
2372
        [STRLCAT])
 
2373
])
 
2374
 
 
2375
AC_DEFUN([AC_FIND_GIF],
1787
2376
   [AC_MSG_CHECKING([for giflib])
1788
2377
AC_CACHE_VAL(ac_cv_lib_gif,
1789
2378
[ac_save_LIBS="$LIBS"
 
2379
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1790
2380
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
 
2381
else
 
2382
LIBS="$all_libraries -lgif"
 
2383
fi
1791
2384
AC_TRY_LINK(dnl
1792
2385
[
1793
2386
#ifdef __cplusplus
1813
2406
fi
1814
2407
])
1815
2408
 
1816
 
AC_DEFUN(KDE_FIND_JPEG_HELPER,
 
2409
AC_DEFUN([KDE_FIND_JPEG_HELPER],
1817
2410
[
1818
2411
AC_MSG_CHECKING([for libjpeg$2])
1819
2412
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
1820
2413
[
1821
 
AC_LANG_C
1822
2414
ac_save_LIBS="$LIBS"
1823
2415
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
1824
2416
ac_save_CFLAGS="$CFLAGS"
1856
2448
 
1857
2449
])
1858
2450
 
1859
 
AC_DEFUN(AC_FIND_JPEG,
 
2451
AC_DEFUN([AC_FIND_JPEG],
1860
2452
[
1861
2453
dnl first look for libraries
1862
2454
KDE_FIND_JPEG_HELPER(6b, 6b,
1869
2461
 
1870
2462
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
1871
2463
dnl requires system dependent includes loaded before it)
1872
 
jpeg_incdirs="/usr/include /usr/local/include $kde_extra_includes"
 
2464
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
1873
2465
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
1874
2466
test "x$jpeg_incdir" = xNO && jpeg_incdir=
1875
2467
 
1896
2488
fi
1897
2489
 
1898
2490
AC_SUBST(LIBJPEG)
1899
 
])
1900
 
 
1901
 
AC_DEFUN(AC_FIND_ZLIB,
 
2491
AH_VERBATIM(_AC_CHECK_JPEG,
 
2492
[/*
 
2493
 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
 
2494
 * headers and I'm too lazy to write a configure test as long as only
 
2495
 * unixware is related
 
2496
 */
 
2497
#ifdef _UNIXWARE
 
2498
#define HAVE_BOOLEAN
 
2499
#endif
 
2500
])
 
2501
])
 
2502
 
 
2503
AC_DEFUN([KDE_CHECK_QT_JPEG],
 
2504
[
 
2505
if test -n "$LIBJPEG"; then
 
2506
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
 
2507
AC_CACHE_VAL(kde_cv_qt_jpeg,
 
2508
[
 
2509
AC_LANG_SAVE
 
2510
AC_LANG_CPLUSPLUS
 
2511
ac_save_LIBS="$LIBS"
 
2512
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
 
2513
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
 
2514
ac_save_CXXFLAGS="$CXXFLAGS"
 
2515
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
2516
AC_TRY_LINK(
 
2517
[#include <qapplication.h>],
 
2518
            [
 
2519
            int argc;
 
2520
            char** argv;
 
2521
            QApplication app(argc, argv);],
 
2522
            eval "kde_cv_qt_jpeg=no",
 
2523
            eval "kde_cv_qt_jpeg=yes")
 
2524
LIBS="$ac_save_LIBS"
 
2525
CXXFLAGS="$ac_save_CXXFLAGS"
 
2526
AC_LANG_RESTORE
 
2527
fi
 
2528
])
 
2529
 
 
2530
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
 
2531
  AC_MSG_RESULT(yes)
 
2532
  LIBJPEG_QT='$(LIBJPEG)'
 
2533
else
 
2534
  AC_MSG_RESULT(no)
 
2535
  LIBJPEG_QT=
 
2536
fi
 
2537
 
 
2538
])
 
2539
 
 
2540
AC_DEFUN([AC_FIND_ZLIB],
1902
2541
[
1903
2542
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1904
2543
AC_MSG_CHECKING([for libz])
1905
2544
AC_CACHE_VAL(ac_cv_lib_z,
1906
2545
[
1907
 
AC_LANG_C
1908
2546
kde_save_LIBS="$LIBS"
1909
2547
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
1910
2548
kde_save_CFLAGS="$CFLAGS"
1913
2551
[
1914
2552
#include<zlib.h>
1915
2553
],
1916
 
            [return (zlibVersion() == ZLIB_VERSION); ],
 
2554
[
 
2555
  char buf[42];
 
2556
  gzFile f = (gzFile) 0;
 
2557
  /* this would segfault.. but we only link, don't run */
 
2558
  (void) gzgets(f, buf, sizeof(buf));
 
2559
 
 
2560
  return (zlibVersion() == ZLIB_VERSION); 
 
2561
],
1917
2562
            eval "ac_cv_lib_z='-lz'",
1918
2563
            eval "ac_cv_lib_z=no")
1919
2564
LIBS="$kde_save_LIBS"
1922
2567
if test ! "$ac_cv_lib_z" = no; then
1923
2568
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
1924
2569
  LIBZ="$ac_cv_lib_z"
1925
 
  AC_SUBST(LIBZ)
1926
2570
  AC_MSG_RESULT($ac_cv_lib_z)
1927
2571
else
1928
 
  AC_MSG_ERROR(not found. Check your installation and look into config.log)
 
2572
  AC_MSG_ERROR(not found. 
 
2573
          Possibly configure picks up an outdated version
 
2574
          installed by XFree86. Remove it from your system.
 
2575
 
 
2576
          Check your installation and look into config.log)
1929
2577
  LIBZ=""
1930
 
  AC_SUBST(LIBZ)
1931
2578
fi
 
2579
AC_SUBST(LIBZ)
1932
2580
])
1933
2581
 
1934
 
AC_DEFUN(KDE_TRY_TIFFLIB,
 
2582
AC_DEFUN([KDE_TRY_TIFFLIB],
1935
2583
[
1936
2584
AC_MSG_CHECKING([for libtiff $1])
1937
2585
 
1940
2588
AC_LANG_SAVE
1941
2589
AC_LANG_CPLUSPLUS
1942
2590
kde_save_LIBS="$LIBS"
 
2591
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1943
2592
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
 
2593
else
 
2594
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
 
2595
fi
1944
2596
kde_save_CXXFLAGS="$CXXFLAGS"
1945
2597
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
1946
2598
 
1973
2625
 
1974
2626
])
1975
2627
 
1976
 
AC_DEFUN(AC_FIND_TIFF,
 
2628
AC_DEFUN([AC_FIND_TIFF],
1977
2629
[
1978
2630
AC_REQUIRE([K_PATH_X])
1979
2631
AC_REQUIRE([AC_FIND_ZLIB])
1987
2639
])
1988
2640
 
1989
2641
 
1990
 
AC_DEFUN(AC_FIND_PNG,
 
2642
AC_DEFUN([AC_FIND_PNG],
1991
2643
[
1992
2644
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1993
2645
AC_REQUIRE([AC_FIND_ZLIB])
1995
2647
AC_CACHE_VAL(ac_cv_lib_png,
1996
2648
[
1997
2649
kde_save_LIBS="$LIBS"
 
2650
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1998
2651
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
 
2652
else
 
2653
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
 
2654
fi
1999
2655
kde_save_CFLAGS="$CFLAGS"
2000
2656
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2001
 
AC_LANG_C
 
2657
 
2002
2658
AC_TRY_LINK(dnl
2003
2659
    [
2004
2660
    #include<png.h>
2026
2682
fi
2027
2683
])
2028
2684
 
2029
 
AC_DEFUN(AC_CHECK_BOOL,
 
2685
 
 
2686
AC_DEFUN([AC_FIND_JASPER],
 
2687
[
 
2688
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2689
AC_REQUIRE([AC_FIND_JPEG])
 
2690
AC_MSG_CHECKING([for jasper])
 
2691
AC_CACHE_VAL(ac_cv_jasper,
 
2692
[
 
2693
kde_save_LIBS="$LIBS"
 
2694
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
 
2695
kde_save_CFLAGS="$CFLAGS"
 
2696
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2697
 
 
2698
AC_TRY_LINK(dnl
 
2699
    [
 
2700
    #include<jasper/jasper.h>
 
2701
    ],
 
2702
    [
 
2703
    return( jas_init() );
 
2704
    ],
 
2705
    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
 
2706
    eval "ac_cv_jasper=no"
 
2707
)
 
2708
LIBS="$kde_save_LIBS"
 
2709
CFLAGS="$kde_save_CFLAGS"
 
2710
])dnl
 
2711
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
 
2712
  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
 
2713
  LIB_JASPER="$ac_cv_jasper"
 
2714
  AC_MSG_RESULT($ac_cv_jasper)
 
2715
else
 
2716
  AC_MSG_RESULT(no)
 
2717
  LIB_JASPER=""
 
2718
fi
 
2719
AC_SUBST(LIB_JASPER)
 
2720
])
 
2721
 
 
2722
AC_DEFUN([AC_CHECK_BOOL],
2030
2723
[
2031
2724
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2032
2725
])
2033
2726
 
2034
 
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
 
2727
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2035
2728
[
2036
2729
AC_MSG_CHECKING(if you need GNU extensions)
2037
2730
AC_CACHE_VAL(ac_cv_gnu_extensions,
2059
2752
fi
2060
2753
])
2061
2754
 
2062
 
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
 
2755
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2063
2756
[
2064
 
dnl AC_REQUIRE([AC_CHECK_COMPILERS]) <- breaks with autoconf 2.50
2065
 
AC_MSG_CHECKING(whether $CXX supports -$1)
2066
 
kde_cache=`echo $1 | sed 'y%.=/+-%___p_%'`
 
2757
AC_MSG_CHECKING([whether $CXX supports -$1])
 
2758
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2067
2759
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2068
2760
[
2069
 
echo 'int main() { return 0; }' >conftest.cc
2070
 
eval "kde_cv_prog_cxx_$kde_cache=no"
2071
 
if test -z "`$CXX -$1 -c conftest.cc 2>&1`"; then
2072
 
  if test -z "`$CXX -$1 -o conftest conftest.o 2>&1`"; then
2073
 
    eval "kde_cv_prog_cxx_$kde_cache=yes"
2074
 
  fi
2075
 
fi
2076
 
rm -f conftest*
 
2761
  AC_LANG_SAVE
 
2762
  AC_LANG_CPLUSPLUS
 
2763
  save_CXXFLAGS="$CXXFLAGS"
 
2764
  CXXFLAGS="$CXXFLAGS -$1"
 
2765
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
 
2766
  CXXFLAGS="$save_CXXFLAGS"
 
2767
  AC_LANG_RESTORE
2077
2768
])
2078
2769
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2079
2770
 AC_MSG_RESULT(yes)
2086
2777
fi
2087
2778
])
2088
2779
 
 
2780
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
 
2781
[
 
2782
AC_MSG_CHECKING([whether $CC supports -$1])
 
2783
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
 
2784
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
 
2785
[
 
2786
  AC_LANG_SAVE
 
2787
  AC_LANG_C
 
2788
  save_CFLAGS="$CFLAGS"
 
2789
  CFLAGS="$CFLAGS -$1"
 
2790
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
 
2791
  CFLAGS="$save_CFLAGS"
 
2792
  AC_LANG_RESTORE
 
2793
])
 
2794
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
 
2795
 AC_MSG_RESULT(yes)
 
2796
 :
 
2797
 $2
 
2798
else
 
2799
 AC_MSG_RESULT(no)
 
2800
 :
 
2801
 $3
 
2802
fi
 
2803
])
 
2804
 
 
2805
 
2089
2806
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2090
2807
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2091
2808
dnl it's all white-space separated
2092
 
AC_DEFUN(AC_REMOVE_FORBIDDEN,
 
2809
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2093
2810
[ __val=$$1
2094
2811
  __forbid=" $2 "
2095
2812
  if test -n "$__val"; then
2110
2827
])
2111
2828
 
2112
2829
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2113
 
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
 
2830
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2114
2831
[dnl
 
2832
if test "x$kde_use_qt_emb" != "xyes"; then
2115
2833
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2116
2834
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
 
2835
else
 
2836
 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
 
2837
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
 
2838
fi
2117
2839
])
2118
2840
 
2119
 
AC_DEFUN(AC_CHECK_COMPILERS,
 
2841
AC_DEFUN([AC_CHECK_COMPILERS],
2120
2842
[
2121
 
  AC_ARG_ENABLE(debug,[  --enable-debug          enables debug symbols [default=no]],
 
2843
  AC_ARG_ENABLE(debug,
 
2844
                AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
2122
2845
  [
2123
 
   if test $enableval = "no"; dnl
2124
 
     then
2125
 
       kde_use_debug_code="no"
2126
 
       kde_use_debug_define=yes
2127
 
     else
2128
 
       kde_use_debug_code="yes"
2129
 
       kde_use_debug_define=no
2130
 
   fi
 
2846
    case $enableval in
 
2847
      yes)
 
2848
        kde_use_debug_code="yes"
 
2849
        kde_use_debug_define=no
 
2850
        ;;
 
2851
      full)
 
2852
        kde_use_debug_code="full"
 
2853
        kde_use_debug_define=no
 
2854
        ;;
 
2855
      *)
 
2856
        kde_use_debug_code="no"
 
2857
        kde_use_debug_define=yes
 
2858
        ;;
 
2859
    esac
2131
2860
  ], 
2132
2861
    [kde_use_debug_code="no"
2133
2862
      kde_use_debug_define=no
2134
2863
  ])
2135
2864
 
2136
2865
  dnl Just for configure --help
2137
 
  AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
 
2866
  AC_ARG_ENABLE(dummyoption,
 
2867
                AC_HELP_STRING([--disable-debug],
 
2868
                               [disables debug output and debug symbols [default=no]]),
 
2869
                [],[])
2138
2870
 
2139
 
  AC_ARG_ENABLE(strict,[  --enable-strict         compiles with strict compiler options (may not work!)],
 
2871
  AC_ARG_ENABLE(strict,
 
2872
                AC_HELP_STRING([--enable-strict],
 
2873
                              [compiles with strict compiler options (may not work!)]),
2140
2874
   [
2141
2875
    if test $enableval = "no"; then
2142
2876
         kde_use_strict_options="no"
2145
2879
    fi
2146
2880
   ], [kde_use_strict_options="no"])
2147
2881
 
2148
 
  AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
 
2882
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similiar]),
 
2883
   [
 
2884
    if test $enableval = "no"; then
 
2885
         kde_use_warnings="no"
 
2886
       else
 
2887
         kde_use_warnings="yes"
 
2888
    fi
 
2889
   ], [kde_use_warnings="yes"])
 
2890
 
 
2891
  dnl enable warnings for debug build
 
2892
  if test "$kde_use_debug_code" != "no"; then
 
2893
    kde_use_warnings=yes
 
2894
  fi
 
2895
 
 
2896
  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
2149
2897
    [kde_use_profiling=$enableval],
2150
2898
    [kde_use_profiling="no"]
2151
2899
  )
2155
2903
 
2156
2904
  AC_PROG_CC 
2157
2905
 
 
2906
  AC_PROG_CPP
 
2907
 
2158
2908
  if test "$GCC" = "yes"; then
2159
 
    if test "$kde_use_debug_code" = "yes"; then
2160
 
      CFLAGS="-g -O2 $CFLAGS"
2161
 
      case $host in
2162
 
        *-*-linux-gnu)  
2163
 
          CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2164
 
        ;;
2165
 
      esac
 
2909
    if test "$kde_use_debug_code" != "no"; then
 
2910
      if test $kde_use_debug_code = "full"; then
 
2911
        CFLAGS="-g3 -fno-inline $CFLAGS"
 
2912
      else
 
2913
        CFLAGS="-g -O2 $CFLAGS"
 
2914
      fi
2166
2915
    else
2167
2916
      CFLAGS="-O2 $CFLAGS"
2168
2917
    fi
2172
2921
    CFLAGS="-DNDEBUG $CFLAGS"
2173
2922
  fi
2174
2923
 
 
2924
 
2175
2925
  case "$host" in
2176
2926
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2177
2927
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2185
2935
 
2186
2936
  AC_PROG_CXX
2187
2937
 
2188
 
  if test "$GXX" = "yes"; then
2189
 
    if test "$kde_use_debug_code" = "yes"; then
2190
 
      CXXFLAGS="-g -O2 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
2191
 
 
2192
 
      KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2193
 
      KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
 
2938
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
 
2939
    if test "$kde_use_debug_code" != "no"; then
 
2940
      if test "$CXX" = "KCC"; then
 
2941
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
 
2942
      else
 
2943
        if test "$kde_use_debug_code" = "full"; then
 
2944
          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
 
2945
        else
 
2946
          CXXFLAGS="-g -O2 $CXXFLAGS"
 
2947
        fi
 
2948
      fi
2194
2949
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2195
2950
 
2196
 
      case $host in  dnl
2197
 
      *-*-linux-gnu)
2198
 
        CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion $CXXFLAGS"
2199
 
        ;;
2200
 
      esac
2201
 
 
2202
 
      if test "$kde_use_strict_options" = "yes"; then
2203
 
        CXXFLAGS="-Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align $CXXFLAGS"
2204
 
      fi
2205
 
 
2206
 
      if test "$kde_very_strict" = "yes"; then
2207
 
        CXXFLAGS="-Wold-style-cast -Wredundant-decls -Wconversion $CXXFLAGS"
2208
 
      fi
 
2951
      dnl convenience compiler flags
 
2952
      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
 
2953
      AC_SUBST(WOVERLOADED_VIRTUAL)
2209
2954
    else
2210
 
      CXXFLAGS="-O2 $CXXFLAGS"
 
2955
      if test "$CXX" = "KCC"; then
 
2956
        CXXFLAGS="+K3 $CXXFLAGS"
 
2957
      else
 
2958
        CXXFLAGS="-O2 $CXXFLAGS"
 
2959
      fi  
2211
2960
    fi
2212
2961
  fi
2213
2962
 
2214
2963
  if test "$kde_use_debug_define" = "yes"; then
2215
 
    CXXFLAGS="-DNDEBUG $CXXFLAGS"
 
2964
    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2216
2965
  fi  
2217
2966
 
2218
2967
  if test "$kde_use_profiling" = "yes"; then
2222
2971
      CXXFLAGS="-pg $CXXFLAGS"
2223
2972
    ])
2224
2973
  fi
 
2974
 
 
2975
  if test "$kde_use_warnings" = "yes"; then
 
2976
      if test "$GCC" = "yes"; then
 
2977
        CXXFLAGS="-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
 
2978
        case $host in
 
2979
          *-*-linux-gnu)        
 
2980
            CFLAGS="-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
 
2981
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
 
2982
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
 
2983
            KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
 
2984
          ;;
 
2985
        esac
 
2986
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
 
2987
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
 
2988
        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
 
2989
     fi
 
2990
  fi
 
2991
 
 
2992
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
 
2993
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
 
2994
  fi
2225
2995
    
2226
 
  KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2227
 
  KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2228
 
  KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
 
2996
  if test "$GXX" = "yes"; then
 
2997
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
 
2998
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
 
2999
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
 
3000
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
 
3001
    ENABLE_PERMISSIVE_FLAG="-fpermissive"
 
3002
  fi
 
3003
  if test "$CXX" = "KCC"; then
 
3004
    dnl unfortunately we currently cannot disable exception support in KCC
 
3005
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
 
3006
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
 
3007
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
 
3008
 
 
3009
    AC_ARG_ENABLE(pch,
 
3010
        AC_HELP_STRING([--enable-pch],
 
3011
                       [enables precompiled header support (currently only KCC) [default=no]]),
 
3012
    [
 
3013
      kde_use_pch=$enableval
 
3014
    ],[kde_use_pch=no])
 
3015
 
 
3016
    if test "$kde_use_pch" = "yes"; then
 
3017
      dnl TODO: support --pch-dir!
 
3018
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
 
3019
      dnl the below works (but the dir must exist), but it's
 
3020
      dnl useless for a whole package.
 
3021
      dnl The are precompiled headers for each source file, so when compiling
 
3022
      dnl from scratch, it doesn't make a difference, and they take up
 
3023
      dnl around ~5Mb _per_ sourcefile.
 
3024
      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
 
3025
      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
 
3026
    fi
 
3027
    dnl this flag controls inlining. by default KCC inlines in optimisation mode
 
3028
    dnl all implementations that are defined inside the class {} declaration. 
 
3029
    dnl because of templates-compatibility with broken gcc compilers, this
 
3030
    dnl can cause excessive inlining. This flag limits it to a sane level
 
3031
    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
 
3032
    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
 
3033
    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
 
3034
    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
 
3035
    dnl Some source files are shared between multiple executables
 
3036
    dnl (or libraries) and some of those need template instantiations.
 
3037
    dnl In that case KCC needs to compile those sources with
 
3038
    dnl --one_instantiation_per_object.  To make it easy for us we compile
 
3039
    dnl _all_ objects with that flag (--one_per is a shorthand).
 
3040
    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
 
3041
  fi
2229
3042
  AC_SUBST(USE_EXCEPTIONS)
2230
3043
  dnl obsolete macro - provided to keep things going
2231
3044
  USE_RTTI=
2249
3062
 
2250
3063
  AC_PROG_CXXCPP
2251
3064
 
2252
 
  # the following is to allow programs, that are known to
2253
 
  # have problems when compiled with -O2
2254
 
  if test -n "$CXXFLAGS"; then
2255
 
      kde_safe_IFS=$IFS
2256
 
      IFS=" "
2257
 
      NOOPT_CXXFLAGS=""
2258
 
      for i in $CXXFLAGS; do
2259
 
        case $i in
2260
 
          -O*)
2261
 
                ;;
2262
 
          *)
2263
 
                NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
2264
 
                ;;
2265
 
        esac
2266
 
      done
2267
 
      IFS=$kde_safe_IFS
 
3065
  if test "$GCC" = yes; then
 
3066
     NOOPT_CFLAGS=-O0
2268
3067
  fi
 
3068
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
2269
3069
 
2270
3070
  AC_SUBST(NOOPT_CXXFLAGS)
 
3071
  AC_SUBST(NOOPT_CFLAGS)
 
3072
  AC_SUBST(ENABLE_PERMISSIVE_FLAG)
2271
3073
 
2272
3074
  KDE_CHECK_FINAL
 
3075
  KDE_CHECK_CLOSURE
 
3076
  KDE_CHECK_NMCHECK
2273
3077
 
2274
3078
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
2275
 
 
2276
 
  KDE_CXXFLAGS=
2277
 
  AC_SUBST(KDE_CXXFLAGS)
2278
3079
])
2279
3080
 
2280
 
AC_DEFUN(KDE_ADD_DEPENDENCIES,
 
3081
AC_DEFUN([KDE_ADD_DEPENDENCIES],
2281
3082
[
2282
3083
   [A]M_DEPENDENCIES(CC)
2283
3084
   [A]M_DEPENDENCIES(CXX)
2284
3085
])
2285
3086
 
2286
3087
dnl just a wrapper to clean up configure.in
2287
 
AC_DEFUN(KDE_PROG_LIBTOOL,
 
3088
AC_DEFUN([KDE_PROG_LIBTOOL],
2288
3089
[
2289
3090
AC_REQUIRE([AC_CHECK_COMPILERS])
2290
3091
AC_REQUIRE([AC_ENABLE_SHARED])
2291
3092
AC_REQUIRE([AC_ENABLE_STATIC])
2292
3093
 
2293
3094
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
 
3095
AC_REQUIRE([KDE_CHECK_LIB64])
2294
3096
 
2295
 
AC_LANG_SAVE
2296
 
AC_LANG_C
2297
3097
AC_OBJEXT
2298
3098
AC_EXEEXT
2299
 
AC_LANG_RESTORE
2300
3099
 
2301
3100
AM_PROG_LIBTOOL
2302
3101
AC_LIBTOOL_CXX
2303
3102
 
2304
3103
LIBTOOL_SHELL="/bin/sh ./libtool"
2305
3104
#  LIBTOOL="$LIBTOOL --silent"
2306
 
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH)"
 
3105
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
2307
3106
AC_SUBST(KDE_PLUGIN)
2308
3107
 
2309
 
AC_ARG_ENABLE(objprelink, [  --enable-objprelink     prelink apps using objprelink (experimental [only tested on linux/386])],
2310
 
       kde_use_objprelink=$enableval, kde_use_objprelink=no)
2311
 
  if test "x$kde_use_objprelink" = "xyes"; then 
2312
 
 
2313
 
      KDE_FIND_PATH(objprelink, OBJPRELINK, [], [kde_use_objprelink=no])   
2314
 
     
2315
 
      if test "x$kde_use_objprelink" = "xyes"; then
2316
 
      AC_MSG_CHECKING([Patching libtool to run objprelink.])
2317
 
      mv libtool libtool.orig
2318
 
      cat > libtool <<\EOF
2319
 
#! /bin/sh
2320
 
for n ; do case $n in
2321
 
  *.o)  test -r $n && echo objprelink $n && objprelink $n ;;
2322
 
  *.lo) m=`basename $n .lo`".o" && test -r $m && echo objprelink $m && objprelink $m 
2323
 
        m=".libs/$m" && test -r $m && echo objprelink $m && objprelink $m ;;
2324
 
esac; done
2325
 
EOF
2326
 
      cat >> libtool libtool.orig
2327
 
      rm libtool.orig
2328
 
      chmod a+x libtool
2329
 
      AC_MSG_RESULT(done)
2330
 
        fi
2331
 
  fi
2332
 
])
2333
 
 
2334
 
AC_DEFUN(KDE_CHECK_TYPES,
 
3108
# we patch configure quite some so we better keep that consistent for incremental runs 
 
3109
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
 
3110
])
 
3111
 
 
3112
AC_DEFUN([KDE_CHECK_LIB64],
 
3113
[
 
3114
    kdelibsuff=no
 
3115
    AC_ARG_ENABLE(libsuffix,
 
3116
        AC_HELP_STRING([--enable-libsuffix],
 
3117
            [/lib directory suffix (64,32,none[=default])]),
 
3118
            kdelibsuff=$enableval)
 
3119
    # TODO: add an auto case that compiles a little C app to check
 
3120
    # where the glibc is
 
3121
    if test "$kdelibsuff" = "no"; then
 
3122
       kdelibsuff=
 
3123
    fi
 
3124
    if test -z "$kdelibsuff"; then
 
3125
        AC_MSG_RESULT([not using lib directory suffix])
 
3126
        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
 
3127
    else
 
3128
        if test "$libdir" = '${exec_prefix}/lib'; then
 
3129
            libdir="$libdir${kdelibsuff}"
 
3130
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
 
3131
        fi
 
3132
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
 
3133
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
 
3134
    fi
 
3135
])
 
3136
 
 
3137
AC_DEFUN([KDE_CHECK_TYPES],
2335
3138
[  AC_CHECK_SIZEOF(int, 4)dnl
 
3139
   AC_CHECK_SIZEOF(short)dnl
2336
3140
  AC_CHECK_SIZEOF(long, 4)dnl
2337
3141
  AC_CHECK_SIZEOF(char *, 4)dnl
2338
 
  AC_CHECK_SIZEOF(char, 1)dnl
2339
3142
])dnl
2340
3143
 
2341
 
AC_DEFUN(KDE_DO_IT_ALL,
 
3144
dnl Not used - kept for compat only?
 
3145
AC_DEFUN([KDE_DO_IT_ALL],
2342
3146
[
2343
3147
AC_CANONICAL_SYSTEM
2344
3148
AC_ARG_PROGRAM
2351
3155
AC_PATH_KDE
2352
3156
])
2353
3157
 
2354
 
AC_DEFUN(AC_CHECK_RPATH,
 
3158
AC_DEFUN([AC_CHECK_RPATH],
2355
3159
[
2356
3160
AC_MSG_CHECKING(for rpath)
2357
3161
AC_ARG_ENABLE(rpath,
2358
 
      [  --disable-rpath         do not use the rpath feature of ld],
 
3162
      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
2359
3163
      USE_RPATH=$enableval, USE_RPATH=yes)
2360
3164
 
2361
3165
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
2367
3171
  fi
2368
3172
  dnl $x_libraries is set to /usr/lib in case
2369
3173
  if test -n "$X_LDFLAGS"; then
2370
 
    KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
 
3174
    X_RPATH="-R \$(x_libraries)"
 
3175
    KDE_RPATH="$KDE_RPATH $X_RPATH"
2371
3176
  fi
2372
3177
  if test -n "$KDE_EXTRA_RPATH"; then
2373
3178
    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
2375
3180
fi
2376
3181
AC_SUBST(KDE_EXTRA_RPATH)
2377
3182
AC_SUBST(KDE_RPATH)
 
3183
AC_SUBST(X_RPATH)
2378
3184
AC_MSG_RESULT($USE_RPATH)
2379
3185
])
2380
3186
 
2381
3187
dnl Check for the type of the third argument of getsockname
2382
 
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
 
3188
AC_DEFUN([AC_CHECK_SOCKLEN_T], [
2383
3189
  AC_MSG_CHECKING(for socklen_t)
2384
3190
  AC_CACHE_VAL(ac_cv_socklen_t, [
2385
3191
    AC_LANG_SAVE
2431
3237
dnl >
2432
3238
dnl for this file it is relicensed under LGPL
2433
3239
 
2434
 
AC_DEFUN(AM_KDE_WITH_NLS,
 
3240
AC_DEFUN([AM_KDE_WITH_NLS],
2435
3241
  [
2436
3242
    dnl If we use NLS figure out what method
2437
3243
 
2474
3280
 
2475
3281
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
2476
3282
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2477
 
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
 
3283
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
2478
3284
[# Extract the first word of "$2", so it can be a program name with args.
2479
3285
set dummy $2; ac_word=[$]2
2480
3286
AC_MSG_CHECKING([for $ac_word])
2516
3322
 
2517
3323
# serial 1
2518
3324
 
2519
 
AC_DEFUN(AM_LC_MESSAGES,
 
3325
AC_DEFUN([AM_LC_MESSAGES],
2520
3326
  [if test $ac_cv_header_locale_h = yes; then
2521
3327
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2522
3328
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2562
3368
# serial 1
2563
3369
# Stephan Kulow: I put a KDE in it to avoid name conflicts
2564
3370
 
2565
 
AC_DEFUN(AM_KDE_GNU_GETTEXT,
 
3371
AC_DEFUN([AM_KDE_GNU_GETTEXT],
2566
3372
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2567
3373
   AC_REQUIRE([AC_PROG_RANLIB])dnl
2568
3374
   AC_REQUIRE([AC_HEADER_STDC])dnl
2571
3377
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
2572
3378
   AC_REQUIRE([AC_FUNC_MMAP])dnl
2573
3379
   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
2574
 
   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h string.h values.h alloca.h])
2575
 
   AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
 
3380
   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
 
3381
   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
2576
3382
__argz_count __argz_stringify __argz_next])
2577
3383
 
2578
3384
   AC_MSG_CHECKING(for stpcpy)
2579
3385
   AC_CACHE_VAL(kde_cv_func_stpcpy,
2580
3386
   [
2581
3387
   kde_safe_cxxflags=$CXXFLAGS
2582
 
   CXXFLAGS="-Wmissing-prototypes -Werror"
 
3388
   CXXFLAGS="-Werror"
2583
3389
   AC_LANG_SAVE
2584
3390
   AC_LANG_CPLUSPLUS
2585
3391
   AC_TRY_COMPILE([
2624
3430
 
2625
3431
  ])
2626
3432
 
2627
 
AC_DEFUN(AC_HAVE_XPM,
 
3433
AC_DEFUN([AC_HAVE_XPM],
2628
3434
 [AC_REQUIRE_CPP()dnl
2629
3435
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2630
3436
 
2631
3437
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
2632
3438
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
2633
3439
 
2634
 
 AC_ARG_WITH(xpm, [  --without-xpm           disable color pixmap XPM tests],
 
3440
 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
2635
3441
        xpm_test=$withval, xpm_test="yes")
2636
3442
 if test "x$xpm_test" = xno; then
2637
3443
   ac_cv_have_xpm=no
2639
3445
   AC_MSG_CHECKING(for XPM)
2640
3446
   AC_CACHE_VAL(ac_cv_have_xpm,
2641
3447
   [
2642
 
    AC_LANG_C
2643
3448
    ac_save_ldflags="$LDFLAGS"
2644
3449
    ac_save_cflags="$CFLAGS"
2645
 
    LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
 
3450
    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
3451
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
 
3452
    else
 
3453
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
 
3454
    fi
2646
3455
    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
2647
3456
    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
2648
3457
    AC_TRY_LINK([#include <X11/xpm.h>],[],
2676
3485
 AC_SUBST(XPMLIB)
2677
3486
])
2678
3487
 
2679
 
AC_DEFUN(AC_HAVE_DPMS,
 
3488
AC_DEFUN([AC_HAVE_DPMS],
2680
3489
 [AC_REQUIRE_CPP()dnl
2681
3490
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2682
3491
 
2684
3493
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
2685
3494
 DPMS_LIB=
2686
3495
 
2687
 
 AC_ARG_WITH(dpms, [  --without-dpms          disable DPMS power saving],
 
3496
 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
2688
3497
        dpms_test=$withval, dpms_test="yes")
2689
3498
 if test "x$dpms_test" = xno; then
2690
3499
   ac_cv_have_dpms=no
2694
3503
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
2695
3504
   AC_CACHE_VAL(ac_cv_have_dpms,
2696
3505
   [
2697
 
    AC_LANG_C
2698
 
    ac_save_ldflags="$LDFLAGS"
2699
 
    ac_save_cflags="$CFLAGS"
2700
 
    ac_save_libs="$LIBS"
2701
 
    LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
2702
 
    CFLAGS="$CFLAGS $X_INCLUDES"
2703
 
    test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
2704
 
    AC_TRY_LINK([
2705
 
        #include <X11/Xproto.h>
2706
 
        #include <X11/X.h>
2707
 
        #include <X11/Xlib.h>
2708
 
        #include <X11/extensions/dpms.h>
2709
 
        int foo_test_dpms()
2710
 
        { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
2711
 
        ac_cv_have_dpms="yes", [
2712
 
            LDFLAGS="$ac_save_ldflags"
2713
 
            CFLAGS="$ac_save_cflags"
2714
 
            LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
2715
 
            LIBS="$LIBS -lXdpms"
2716
 
            CFLAGS="$CFLAGS $X_INCLUDES"
2717
 
            test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
2718
 
            AC_TRY_LINK([
2719
 
                #include <X11/Xproto.h>
2720
 
                #include <X11/X.h>
2721
 
                #include <X11/Xlib.h>
2722
 
                #include <X11/extensions/dpms.h>
2723
 
                int foo_test_dpms()
2724
 
                { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
2725
 
                [
2726
 
                ac_cv_have_dpms="-lXdpms"
2727
 
                ],ac_cv_have_dpms="no")
2728
 
            ])
2729
 
    LDFLAGS="$ac_save_ldflags"
2730
 
    CFLAGS="$ac_save_cflags"
2731
 
    LIBS="$ac_save_libs"
 
3506
    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
 
3507
      AC_MSG_RESULT(no)
 
3508
      ac_cv_have_dpms="no"
 
3509
    else
 
3510
      ac_save_ldflags="$LDFLAGS"
 
3511
      ac_save_cflags="$CFLAGS"
 
3512
      ac_save_libs="$LIBS"
 
3513
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
 
3514
      CFLAGS="$CFLAGS $X_INCLUDES"
 
3515
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3516
      AC_TRY_LINK([
 
3517
          #include <X11/Xproto.h>
 
3518
          #include <X11/X.h>
 
3519
          #include <X11/Xlib.h>
 
3520
          #include <X11/extensions/dpms.h>
 
3521
          int foo_test_dpms()
 
3522
          { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
 
3523
          ac_cv_have_dpms="yes", [
 
3524
              LDFLAGS="$ac_save_ldflags"
 
3525
              CFLAGS="$ac_save_cflags"
 
3526
              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
 
3527
              LIBS="$LIBS -lXdpms"
 
3528
              CFLAGS="$CFLAGS $X_INCLUDES"
 
3529
              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3530
              AC_TRY_LINK([
 
3531
                  #include <X11/Xproto.h>
 
3532
                  #include <X11/X.h>
 
3533
                  #include <X11/Xlib.h>
 
3534
                  #include <X11/extensions/dpms.h>
 
3535
                  int foo_test_dpms()
 
3536
                  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
 
3537
                  [
 
3538
                  ac_cv_have_dpms="-lXdpms"
 
3539
                  ],ac_cv_have_dpms="no")
 
3540
              ])
 
3541
      LDFLAGS="$ac_save_ldflags"
 
3542
      CFLAGS="$ac_save_cflags"
 
3543
      LIBS="$ac_save_libs"
 
3544
    fi
2732
3545
   ])dnl
2733
3546
 
2734
3547
  if test "$ac_cv_have_dpms" = no; then
2755
3568
    $1
2756
3569
  fi
2757
3570
 fi
 
3571
 ac_save_cflags="$CFLAGS"
 
3572
 CFLAGS="$CFLAGS $X_INCLUDES"
 
3573
 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3574
 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
 
3575
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
 
3576
 AC_CHECK_DECL(DPMSCapable,
 
3577
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
 
3578
   [#include <X11/extensions/dpms.h>])
 
3579
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
 
3580
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
 
3581
 AC_CHECK_DECL(DPMSInfo,
 
3582
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
 
3583
   [#include <X11/extensions/dpms.h>])
 
3584
 CFLAGS="$ac_save_cflags"
2758
3585
 AC_SUBST(DPMSINC)
2759
3586
 AC_SUBST(DPMSLIB)
2760
3587
])
2761
3588
 
2762
 
AC_DEFUN(AC_HAVE_GL,
 
3589
AC_DEFUN([AC_HAVE_GL],
2763
3590
 [AC_REQUIRE_CPP()dnl
2764
3591
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2765
3592
 
2766
3593
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
2767
3594
 test -z "$GL_INCLUDE" && GL_INCLUDE=
2768
3595
 
2769
 
 AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
 
3596
 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
2770
3597
        gl_test=$withval, gl_test="yes")
2771
 
 if test "x$gl_test" = xno; then
 
3598
 if test "x$kde_use_qt_emb" = "xyes"; then
 
3599
   # GL and Qt Embedded is a no-go for now.
 
3600
   ac_cv_have_gl=no
 
3601
 elif test "x$gl_test" = xno; then
2772
3602
   ac_cv_have_gl=no
2773
3603
 else
2774
3604
   AC_MSG_CHECKING(for GL)
2775
3605
   AC_CACHE_VAL(ac_cv_have_gl,
2776
3606
   [
2777
 
    AC_LANG_C
 
3607
    AC_LANG_SAVE
 
3608
    AC_LANG_CPLUSPLUS
2778
3609
    ac_save_ldflags="$LDFLAGS"
2779
 
    ac_save_cflags="$CFLAGS"
2780
 
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU -lX11 -lXext -lm $LIBSOCKET"
2781
 
    CFLAGS="$CFLAGS $X_INCLUDES"
 
3610
    ac_save_cxxflags="$CXXFLAGS"
 
3611
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
 
3612
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
 
3613
    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
 
3614
    CXXFLAGS="$CFLAGS $X_INCLUDES"
2782
3615
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
2783
3616
    AC_TRY_LINK([#include <GL/gl.h>
2784
 
#include <GL/glu.h>           
 
3617
#include <GL/glu.h>
2785
3618
], [],
2786
3619
        ac_cv_have_gl="mesa", ac_cv_have_gl="no")
2787
3620
    if test "x$ac_cv_have_gl" = "xno"; then
2788
 
      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU -lX11 -lXext -lm $LIBSOCKET"
2789
 
      CFLAGS="$ac_save_cflags $X_INCLUDES"
 
3621
      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
 
3622
      test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
 
3623
      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
 
3624
      CXXFLAGS="$ac_save_cflags $X_INCLUDES"
2790
3625
      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
2791
3626
      AC_TRY_LINK([#include <GL/gl.h>
2792
3627
#include <GL/glu.h>
2793
3628
], [],
2794
3629
          ac_cv_have_gl="yes", ac_cv_have_gl="no")
2795
3630
    fi
 
3631
    AC_LANG_RESTORE
2796
3632
    LDFLAGS="$ac_save_ldflags"
2797
 
    CFLAGS="$ac_save_cflags"
 
3633
    CXXFLAGS="$ac_save_cxxflags"
2798
3634
   ])dnl
2799
3635
 
2800
3636
  if test "$ac_cv_have_gl" = "no"; then
2806
3642
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
2807
3643
    if test "$GL_LDFLAGS" = ""; then
2808
3644
       if test "$ac_cv_have_gl" = "mesa"; then
2809
 
          GLLIB='-lMesaGL -lMesaGLU $(LIB_X11)'
 
3645
          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
2810
3646
       else
2811
 
          GLLIB='-lGL -lGLU $(LIB_X11)'
 
3647
          GLLIB='-lGLU -lGL $(LIB_X11)'
2812
3648
       fi
2813
3649
    else
2814
3650
       if test "$ac_cv_have_gl" = "mesa"; then
2815
 
          GLLIB="$GL_LDFLAGS -lMesaGL -lMesaGLU "'$(LIB_X11)'
 
3651
          GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
2816
3652
       else
2817
 
          GLLIB="$GL_LDFLAGS -lGL -lGLU "'$(LIB_X11)'
 
3653
          GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
2818
3654
       fi
2819
3655
    fi
2820
3656
    if test "$GL_INCLUDE" = ""; then
2833
3669
 
2834
3670
 dnl shadow password and PAM magic - maintained by ossi@kde.org
2835
3671
 
2836
 
AC_DEFUN(KDE_PAM, [
 
3672
AC_DEFUN([KDE_PAM], [
2837
3673
  AC_REQUIRE([KDE_CHECK_LIBDL])
2838
3674
 
 
3675
  want_pam=
2839
3676
  AC_ARG_WITH(pam,
2840
 
    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
 
3677
    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
2841
3678
    [ if test "x$withval" = "xyes"; then
2842
 
        use_pam=yes
 
3679
        want_pam=yes
2843
3680
        pam_service=kde
2844
3681
      elif test "x$withval" = "xno"; then
2845
 
        use_pam=no
 
3682
        want_pam=no
2846
3683
      else
2847
 
        use_pam=yes
 
3684
        want_pam=yes
2848
3685
        pam_service=$withval
2849
3686
      fi
2850
 
      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
2851
 
    ], [
2852
 
      AC_CACHE_VAL(ac_cv_path_pam,
2853
 
        [ use_pam=no
2854
 
          AC_CHECK_LIB(pam, pam_start,
2855
 
            [ AC_CHECK_HEADER(security/pam_appl.h, 
2856
 
                [ use_pam=yes
2857
 
                  pam_service=kde ]) 
2858
 
            ], , $LIBDL)
2859
 
          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
2860
 
        ])
2861
 
    ])
2862
 
  eval "$ac_cv_path_pam"
2863
 
 
2864
 
  AC_MSG_CHECKING(for PAM)
2865
 
  if test "x$use_pam" = xno; then
2866
 
    AC_MSG_RESULT(no)
2867
 
    PAMLIBS=""
2868
 
  else
2869
 
    AC_MSG_RESULT(yes)
2870
 
    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
2871
 
    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
2872
 
 
2873
 
    dnl test whether struct pam_message is const (Linux) or not (Sun)
2874
 
    AC_MSG_CHECKING(for const pam_message)
2875
 
    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
2876
 
      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
2877
 
                        [AC_MSG_RESULT([const: Linux-type PAM])],
2878
 
                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
2879
 
                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
2880
 
                        )],
2881
 
      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
 
3687
    ], [ pam_service=kde ])
 
3688
 
 
3689
  use_pam=
 
3690
  PAMLIBS=
 
3691
  if test "x$want_pam" != xno; then
 
3692
    AC_CHECK_LIB(pam, pam_start, [
 
3693
      AC_CHECK_HEADER(security/pam_appl.h,
 
3694
        [ pam_header=security/pam_appl.h ],
 
3695
        [ AC_CHECK_HEADER(pam/pam_appl.h,
 
3696
            [ pam_header=pam/pam_appl.h ],
 
3697
            [
 
3698
    AC_MSG_WARN([PAM detected, but no headers found!
 
3699
Make sure you have the necessary development packages installed.])
 
3700
            ]
 
3701
          )
 
3702
        ]
 
3703
      )
 
3704
    ], , $LIBDL)
 
3705
    if test -z "$pam_header"; then
 
3706
      if test "x$want_pam" = xyes; then
 
3707
        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
 
3708
      fi
 
3709
    else
 
3710
      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
 
3711
      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
 
3712
      use_pam=yes
 
3713
 
 
3714
      dnl darwin claims to be something special
 
3715
      if test "$pam_header" = "pam/pam_appl.h"; then
 
3716
        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
 
3717
      fi
 
3718
 
 
3719
      dnl test whether struct pam_message is const (Linux) or not (Sun)
 
3720
      AC_MSG_CHECKING(for const pam_message)
 
3721
      AC_EGREP_HEADER([struct pam_message], $pam_header,
 
3722
        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
 
3723
                          [AC_MSG_RESULT([const: Linux-type PAM])],
 
3724
                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
 
3725
                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
 
3726
                          )],
 
3727
        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
 
3728
    fi
2882
3729
  fi
2883
3730
 
2884
3731
  AC_SUBST(PAMLIBS)
2885
3732
])
2886
3733
 
2887
3734
dnl DEF_PAM_SERVICE(arg name, full name, define name)
2888
 
AC_DEFUN(DEF_PAM_SERVICE, [
 
3735
AC_DEFUN([DEF_PAM_SERVICE], [
2889
3736
  AC_ARG_WITH($1-pam,
2890
 
    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
 
3737
    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
2891
3738
    [ if test "x$use_pam" = xyes; then
2892
 
        $3_PAM_SERVICE="$withval"
 
3739
        $3_PAM_SERVICE=$withval
2893
3740
      else
2894
3741
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
2895
3742
You may want to enforce it by using --with-pam.])
2906
3753
    AC_SUBST($3_PAM_SERVICE)
2907
3754
])
2908
3755
 
2909
 
AC_DEFUN(KDE_SHADOWPASSWD, [
 
3756
AC_DEFUN([KDE_SHADOWPASSWD], [
2910
3757
  AC_REQUIRE([KDE_PAM])
2911
3758
 
2912
3759
  AC_CHECK_LIB(shadow, getspent,
2929
3776
  AC_MSG_CHECKING([for shadow passwords])
2930
3777
 
2931
3778
  AC_ARG_WITH(shadow,
2932
 
    [  --with-shadow              If you want shadow password support ],
 
3779
    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
2933
3780
    [ if test "x$withval" != "xno"; then
2934
3781
        use_shadow=yes
2935
3782
      else
2963
3810
 
2964
3811
])
2965
3812
 
2966
 
AC_DEFUN(KDE_PASSWDLIBS, [
 
3813
AC_DEFUN([KDE_PASSWDLIBS], [
2967
3814
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
2968
3815
  AC_REQUIRE([KDE_PAM])
2969
3816
  AC_REQUIRE([KDE_SHADOWPASSWD])
2974
3821
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
2975
3822
  fi
2976
3823
 
 
3824
  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
 
3825
  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
 
3826
  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
 
3827
  dnl may need to read /etc/master.passwd).
 
3828
  case $host in
 
3829
  *-*-freebsd*)
 
3830
    SETUIDFLAGS="-m 4755 -o root"
 
3831
    ;;
 
3832
  *)
 
3833
    ;;
 
3834
  esac
 
3835
 
2977
3836
  AC_SUBST(PASSWDLIBS)
2978
3837
])
2979
3838
 
2980
 
AC_DEFUN(KDE_CHECK_LIBDL,
 
3839
AC_DEFUN([KDE_CHECK_LIBDL],
2981
3840
[
2982
3841
AC_CHECK_LIB(dl, dlopen, [
2983
3842
LIBDL="-ldl"
2992
3851
AC_SUBST(LIBDL)
2993
3852
])
2994
3853
 
2995
 
AC_DEFUN(KDE_CHECK_DLOPEN,
 
3854
AC_DEFUN([KDE_CHECK_DLOPEN],
2996
3855
[
2997
3856
KDE_CHECK_LIBDL
2998
3857
AC_CHECK_HEADERS(dlfcn.h dl.h)
3007
3866
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3008
3867
dnl (MM)
3009
3868
AC_ARG_ENABLE(dlopen,
3010
 
[  --disable-dlopen        link statically [default=no]] ,
 
3869
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
3011
3870
enable_dlopen=$enableval,
3012
3871
enable_dlopen=yes)
3013
3872
 
3032
3891
 
3033
3892
])
3034
3893
 
3035
 
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
 
3894
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
3036
3895
[
3037
3896
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3038
3897
KDE_PROG_LIBTOOL
3052
3911
fi
3053
3912
])
3054
3913
 
3055
 
AC_DEFUN(KDE_ADD_INCLUDES,
 
3914
AC_DEFUN([KDE_ADD_INCLUDES],
3056
3915
[
3057
3916
if test -z "$1"; then
3058
3917
  test_include="Pix.h"
3089
3948
])
3090
3949
])
3091
3950
 
3092
 
 
3093
 
AC_DEFUN(KDE_CHECK_MICO,
3094
 
[
3095
 
AC_REQUIRE([KDE_CHECK_LIBDL])
3096
 
AC_REQUIRE([KDE_MISC_TESTS])
3097
 
AC_MSG_CHECKING(for MICO)
3098
 
 
3099
 
if test -z "$MICODIR"; then
3100
 
    kde_micodir=/usr/local
3101
 
 else
3102
 
    kde_micodir="$MICODIR"
3103
 
fi
3104
 
 
3105
 
AC_ARG_WITH(micodir,
3106
 
  [  --with-micodir=micodir  where mico is installed ],
3107
 
  kde_micodir=$withval,
3108
 
  kde_micodir=$kde_micodir
3109
 
)
3110
 
 
3111
 
AC_CACHE_VAL(kde_cv_mico_incdir,
3112
 
[
3113
 
  mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
3114
 
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
3115
 
 
3116
 
])
3117
 
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
3118
 
 
3119
 
if test ! -r  $kde_micodir/include/CORBA.h; then
3120
 
  AC_MSG_ERROR([No CORBA.h found, specify another micodir])
3121
 
fi
3122
 
 
3123
 
AC_MSG_RESULT($kde_micodir)
3124
 
 
3125
 
MICO_INCLUDES=-I$kde_micodir/include
3126
 
AC_SUBST(MICO_INCLUDES)
3127
 
MICO_LDFLAGS=-L$kde_micodir/lib
3128
 
AC_SUBST(MICO_LDFLAGS)
3129
 
micodir=$kde_micodir
3130
 
AC_SUBST(micodir)
3131
 
 
3132
 
AC_MSG_CHECKING([for MICO version])
3133
 
AC_CACHE_VAL(kde_cv_mico_version,
3134
 
[
3135
 
AC_LANG_C
3136
 
cat >conftest.$ac_ext <<EOF
3137
 
#include <stdio.h>
3138
 
#include <mico/version.h>
3139
 
int main() {
3140
 
 
3141
 
   printf("MICO_VERSION=%s\n",MICO_VERSION);
3142
 
   return (0);
3143
 
}
3144
 
EOF
3145
 
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
3146
 
if AC_TRY_EVAL(ac_compile); then
3147
 
  if eval `./conftest 2>&5`; then
3148
 
    kde_cv_mico_version=$MICO_VERSION
3149
 
  else
3150
 
    AC_MSG_ERROR([your system is not able to execute a small application to
3151
 
    find MICO version! Check $kde_micodir/include/mico/version.h])
3152
 
  fi
3153
 
else
3154
 
  AC_MSG_ERROR([your system is not able to compile a small application to
3155
 
  find MICO version! Check $kde_micodir/include/mico/version.h])
3156
 
fi
3157
 
])
3158
 
 
3159
 
dnl installed MICO version
3160
 
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3161
 
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3162
 
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3163
 
 
3164
 
if test "x$1" = "x"; then
3165
 
 req_version="2.3.0"
3166
 
else
3167
 
 req_version=$1
3168
 
fi
3169
 
 
3170
 
dnl required MICO version
3171
 
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3172
 
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3173
 
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3174
 
 
3175
 
if test "$mico_v_maj" -lt "$req_v_maj" || \
3176
 
   ( test "$mico_v_maj" -eq "$req_v_maj" && \
3177
 
        test "$mico_v_mid" -lt "$req_v_mid" ) || \
3178
 
   ( test "$mico_v_mid" -eq "$req_v_mid" && \
3179
 
        test "$mico_v_min" -lt "$req_v_min" )
3180
 
 
3181
 
then
3182
 
  AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
3183
 
at least is required. You should upgrade MICO.])
3184
 
else
3185
 
  AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
3186
 
fi
3187
 
 
3188
 
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
3189
 
AC_SUBST(LIBMICO)
3190
 
if test -z "$IDL"; then
3191
 
  IDL='$(kde_bindir)/cuteidl'
3192
 
fi
3193
 
AC_SUBST(IDL)
3194
 
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
3195
 
AC_SUBST(IDL_DEPENDENCIES)
3196
 
 
3197
 
idldir="\$(includedir)/idl"
3198
 
AC_SUBST(idldir)
3199
 
 
3200
 
])
3201
 
 
3202
 
AC_DEFUN(KDE_CHECK_MINI_STL,
3203
 
[
3204
 
AC_REQUIRE([KDE_CHECK_MICO])
3205
 
 
3206
 
AC_MSG_CHECKING(if we use mico's mini-STL)
3207
 
AC_CACHE_VAL(kde_cv_have_mini_stl,
3208
 
[
3209
 
AC_LANG_SAVE
3210
 
AC_LANG_CPLUSPLUS
3211
 
kde_save_cxxflags="$CXXFLAGS"
3212
 
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
3213
 
AC_TRY_COMPILE(
3214
 
[
3215
 
#include <mico/config.h>
3216
 
],
3217
 
[
3218
 
#ifdef HAVE_MINI_STL
3219
 
#error "nothing"
3220
 
#endif
3221
 
],
3222
 
kde_cv_have_mini_stl=no,
3223
 
kde_cv_have_mini_stl=yes)
3224
 
CXXFLAGS="$kde_save_cxxflags"
3225
 
AC_LANG_RESTORE
3226
 
])
3227
 
 
3228
 
if test "x$kde_cv_have_mini_stl" = "xyes"; then
3229
 
   AC_MSG_RESULT(yes)
3230
 
   $1
3231
 
else
3232
 
   AC_MSG_RESULT(no)
3233
 
   $2
3234
 
fi
3235
 
])
3236
 
 
3237
 
])
3238
 
 
3239
 
 
3240
 
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
3241
 
[
3242
 
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3243
 
AC_SUBST(LIBPTHREAD)
3244
 
])
3245
 
 
3246
 
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
3247
 
[
3248
 
    AC_ARG_ENABLE(kernel-threads, [  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
3249
 
        kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
3250
 
 
3251
 
    if test "$kde_use_kernthreads" = "yes"; then
3252
 
      ac_save_CXXFLAGS="$CXXFLAGS"
3253
 
      ac_save_CFLAGS="$CXXFLAGS"
3254
 
      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
3255
 
      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
3256
 
      AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
3257
 
      CXXFLAGS="$ac_save_CXXFLAGS"
3258
 
      CFLAGS="$ac_save_CFLAGS"
3259
 
      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
3260
 
        kde_use_kernthreads=no
3261
 
      else
3262
 
        dnl Add proper -I and -l statements
3263
 
        AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
3264
 
        if test "x$LIBPTHREAD" = "x"; then
3265
 
          kde_use_kernthreads=no
3266
 
        else
3267
 
          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
3268
 
        fi
3269
 
      fi
3270
 
    else 
 
3951
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
 
3952
[
 
3953
  LIBPTHREAD=""
 
3954
 
 
3955
  if test -n "$PTHREAD_LIBS"; then
 
3956
    PTHREAD_LIBS_save="$PTHREAD_LIBS"
 
3957
    PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
 
3958
    KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [LIBPTHREAD="$PTHREAD_LIBS_save"] )
 
3959
    PTHREAD_LIBS="$PTHREAD_LIBS_save"
 
3960
  fi
 
3961
 
 
3962
  if test -z "$LIBPTHREAD"; then
 
3963
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
 
3964
  fi
 
3965
 
 
3966
  AC_SUBST(LIBPTHREAD)
 
3967
])
 
3968
 
 
3969
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
 
3970
[
3271
3971
      USE_THREADS=""
3272
3972
      if test -z "$LIBPTHREAD"; then
3273
 
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
 
3973
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
3274
3974
      fi
3275
 
    fi
3276
3975
 
 
3976
    AH_VERBATIM(__svr_define, [
 
3977
#if defined(__SVR4) && !defined(__svr4__)
 
3978
#define __svr4__ 1
 
3979
#endif
 
3980
])
3277
3981
    case $host_os in
3278
3982
        solaris*)
3279
3983
                KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3280
3984
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3281
 
                echo "Setting Solaris pthread compilation options"
3282
3985
                ;;
3283
3986
        freebsd*)
3284
 
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3285
 
                echo "Setting FreeBSD pthread compilation options"
 
3987
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
3286
3988
                ;;
3287
3989
        aix*)
3288
3990
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3289
3991
                LIBPTHREAD="$LIBPTHREAD -lc_r"
3290
 
                echo "Setting AIX pthread compilation options"
3291
3992
                ;;
3292
3993
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3293
 
                USE_THREADS="$USE_THREADS -DPIC -fPIC"
3294
 
                echo "Setting Linux pthread compilation options"
 
3994
                if test "$CXX" = "KCC"; then
 
3995
                  CXXFLAGS="$CXXFLAGS --thread_safe"
 
3996
                  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
 
3997
                fi
3295
3998
                ;;
3296
3999
        *)
3297
4000
                ;;
3300
4003
    AC_SUBST(LIBPTHREAD)
3301
4004
])
3302
4005
 
3303
 
AC_DEFUN(KDE_CHECK_THREADING,
 
4006
AC_DEFUN([KDE_CHECK_THREADING],
3304
4007
[
3305
4008
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3306
4009
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
3307
4010
  dnl default is yes if libpthread is found and no if no libpthread is available
3308
4011
  if test -z "$LIBPTHREAD"; then
3309
 
    kde_check_threading_default=no
 
4012
    if test -z "$USE_THREADS"; then
 
4013
      kde_check_threading_default=no
 
4014
    else
 
4015
      kde_check_threading_default=yes
 
4016
    fi
3310
4017
  else
3311
4018
    kde_check_threading_default=yes
3312
4019
  fi
3313
 
  AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
 
4020
  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
3314
4021
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
3315
 
 
3316
4022
  if test "x$kde_use_threading" = "xyes"; then
3317
4023
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
3318
4024
  fi
3319
4025
])
3320
4026
 
3321
 
AC_DEFUN(KDE_TRY_LINK_PYTHON,
 
4027
AC_DEFUN([KDE_TRY_LINK_PYTHON],
3322
4028
[
3323
4029
if test "$kde_python_link_found" = no; then
3324
4030
 
3330
4036
 
3331
4037
AC_CACHE_VAL(kde_cv_try_link_python_$1,
3332
4038
[
3333
 
AC_LANG_SAVE
3334
 
AC_LANG_C
3335
4039
kde_save_cflags="$CFLAGS"
3336
4040
CFLAGS="$CFLAGS $PYTHONINC"
3337
4041
kde_save_libs="$LIBS"
3364
4068
  AC_MSG_RESULT(no)
3365
4069
  $4
3366
4070
fi
3367
 
AC_LANG_RESTORE
3368
4071
 
3369
4072
fi
3370
4073
 
3371
4074
])
3372
4075
 
3373
 
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
 
4076
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
3374
4077
[
3375
4078
AC_MSG_CHECKING([for Python directory])
3376
4079
 
3384
4087
])
3385
4088
 
3386
4089
AC_ARG_WITH(pythondir,
3387
 
[  --with-pythondir=pythondir   use python installed in pythondir ],
 
4090
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
3388
4091
[
3389
4092
  ac_python_dir=$withval
3390
4093
], ac_python_dir=$kde_cv_pythondir
3393
4096
AC_MSG_RESULT($ac_python_dir)
3394
4097
])
3395
4098
 
3396
 
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
 
4099
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
3397
4100
[
3398
4101
AC_REQUIRE([KDE_CHECK_LIBDL])
3399
4102
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3419
4122
 
3420
4123
PYTHONINC=-I$python_incdir
3421
4124
 
3422
 
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
3423
 
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
3424
 
if test ! -r $python_libdir/libpython$version.a; then
3425
 
  AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
3426
 
  python_libdir=$python_libdir/python$version/config
 
4125
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
 
4126
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
 
4127
if test ! -r $python_libdir/libpython$version.so; then
 
4128
  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
3427
4129
  if test ! -r $python_libdir/libpython$version.a; then
3428
 
    python_libdir=no
 
4130
    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
 
4131
    python_libdir=$python_libdir/python$version/config
 
4132
    if test ! -r $python_libdir/libpython$version.a; then
 
4133
      python_libdir=no
 
4134
    fi
3429
4135
  fi
3430
4136
fi
3431
4137
 
3435
4141
  LIBPYTHON=-lpython$version
3436
4142
fi
3437
4143
 
3438
 
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
3439
4144
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
3440
4145
python_moddir=$python_moddir/python$version
3441
4146
if test ! -r $python_moddir/copy.py; then
3458
4163
  KDE_TRY_LINK_PYTHON(m, -lm)
3459
4164
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
3460
4165
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
 
4166
  KDE_TRY_LINK_PYTHON(db2, -ldb2)
3461
4167
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
3462
4168
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
3463
4169
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
3464
4170
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
3465
4171
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
 
4172
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
 
4173
  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
3466
4174
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
3467
4175
        [AC_MSG_WARN([it seems, Python depends on another library.
3468
 
    Pleae use \"make LIBPYTHON='-lpython$version -lotherlib'\" to fix this
 
4176
    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
3469
4177
    and contact the authors to let them know about this problem])
3470
 
 
3471
4178
        ])
3472
4179
 
3473
4180
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
3481
4188
])
3482
4189
 
3483
4190
 
3484
 
AC_DEFUN(KDE_CHECK_PYTHON,
 
4191
AC_DEFUN([KDE_CHECK_PYTHON],
3485
4192
[
3486
 
  KDE_CHECK_PYTHON_INTERN("2.1", [KDE_CHECK_PYTHON_INTERN("2.0",
3487
 
        [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
3488
 
  ])
 
4193
  KDE_CHECK_PYTHON_INTERN("2.3", 
 
4194
   [KDE_CHECK_PYTHON_INTERN("2.2", 
 
4195
     [KDE_CHECK_PYTHON_INTERN("2.1", 
 
4196
       [KDE_CHECK_PYTHON_INTERN("2.0", 
 
4197
         [KDE_CHECK_PYTHON_INTERN($1, $2) ])
 
4198
       ])
 
4199
     ])
 
4200
   ])
3489
4201
])
3490
4202
 
3491
 
AC_DEFUN(KDE_CHECK_STL_SGI,
 
4203
AC_DEFUN([KDE_CHECK_STL],
3492
4204
[
3493
 
    AC_MSG_CHECKING([if STL implementation is SGI like])
3494
 
    AC_CACHE_VAL(kde_cv_stl_type_sgi,
 
4205
    AC_LANG_SAVE
 
4206
    AC_LANG_CPLUSPLUS
 
4207
    ac_save_CXXFLAGS="$CXXFLAGS"
 
4208
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
 
4209
 
 
4210
    AC_MSG_CHECKING([if C++ programs can be compiled])
 
4211
    AC_CACHE_VAL(kde_cv_stl_works,
3495
4212
    [
3496
4213
      AC_TRY_COMPILE([
3497
4214
#include <string>
3500
4217
  string astring="Hallo Welt.";
3501
4218
  astring.erase(0, 6); // now astring is "Welt"
3502
4219
  return 0;
3503
 
], kde_cv_stl_type_sgi=yes,
3504
 
   kde_cv_stl_type_sgi=no)
3505
 
])
3506
 
 
3507
 
   AC_MSG_RESULT($kde_cv_stl_type_sgi)
3508
 
 
3509
 
   if test "$kde_cv_stl_type_sgi" = "yes"; then
3510
 
        AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
3511
 
   fi
3512
 
])
3513
 
 
3514
 
AC_DEFUN(KDE_CHECK_STL_HP,
3515
 
[
3516
 
    AC_MSG_CHECKING([if STL implementation is HP like])
3517
 
    AC_CACHE_VAL(kde_cv_stl_type_hp,
3518
 
    [
3519
 
      AC_TRY_COMPILE([
3520
 
#include <string>
3521
 
using namespace std;
3522
 
],[
3523
 
  string astring="Hello World";
3524
 
  astring.remove(0, 6); // now astring is "World"
3525
 
  return 0;
3526
 
], kde_cv_stl_type_hp=yes,
3527
 
   kde_cv_stl_type_hp=no)
3528
 
])
3529
 
   AC_MSG_RESULT($kde_cv_stl_type_hp)
3530
 
 
3531
 
   if test "$kde_cv_stl_type_hp" = "yes"; then
3532
 
        AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
3533
 
   fi
3534
 
])
3535
 
 
3536
 
AC_DEFUN(KDE_CHECK_STL,
3537
 
[
3538
 
    AC_LANG_SAVE
3539
 
    AC_LANG_CPLUSPLUS
3540
 
    ac_save_CXXFLAGS="$CXXFLAGS"
3541
 
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
3542
 
    KDE_CHECK_STL_SGI
3543
 
 
3544
 
    if test "$kde_cv_stl_type_sgi" = "no"; then
3545
 
       KDE_CHECK_STL_HP
3546
 
 
3547
 
       if test "$kde_cv_stl_type_hp" = "no"; then
3548
 
         AC_MSG_ERROR("no known STL type found")
3549
 
       fi
3550
 
    fi
3551
 
 
3552
 
    CXXFLAGS="$ac_save_CXXFLAGS"
3553
 
    AC_LANG_RESTORE
3554
 
])
3555
 
 
3556
 
AC_DEFUN(AC_FIND_QIMGIO,
 
4220
], kde_cv_stl_works=yes,
 
4221
   kde_cv_stl_works=no)
 
4222
])
 
4223
 
 
4224
   AC_MSG_RESULT($kde_cv_stl_works)
 
4225
 
 
4226
   if test "$kde_cv_stl_works" = "yes"; then
 
4227
     # back compatible
 
4228
         AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
 
4229
   else
 
4230
         AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
 
4231
Check config.log for details - if you're using a Linux distribution you might miss
 
4232
a package named similiar to libstd++-dev.])
 
4233
   fi
 
4234
 
 
4235
   CXXFLAGS="$ac_save_CXXFLAGS"
 
4236
   AC_LANG_RESTORE
 
4237
])
 
4238
 
 
4239
AC_DEFUN([AC_FIND_QIMGIO],
3557
4240
   [AC_REQUIRE([AC_FIND_JPEG])
3558
4241
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3559
4242
AC_MSG_CHECKING([for qimgio])
3592
4275
fi
3593
4276
])
3594
4277
 
3595
 
AC_DEFUN(KDE_CHECK_ANSI,
3596
 
[
3597
 
])
3598
 
 
3599
 
AC_DEFUN(KDE_CHECK_INSURE,
3600
 
[
3601
 
  AC_ARG_ENABLE(insure, [  --enable-insure             use insure++ for debugging [default=no]],
3602
 
  [
3603
 
  if test $enableval = "no"; dnl
3604
 
        then ac_use_insure="no"
3605
 
        else ac_use_insure="yes"
3606
 
   fi
3607
 
  ], [ac_use_insure="no"])
3608
 
 
3609
 
  AC_MSG_CHECKING(if we will use Insure++ to debug)
3610
 
  AC_MSG_RESULT($ac_use_insure)
3611
 
  if test "$ac_use_insure" = "yes"; dnl
3612
 
       then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
3613
 
   fi
3614
 
])
3615
 
 
3616
 
AC_DEFUN(AM_DISABLE_LIBRARIES,
 
4278
AC_DEFUN([AM_DISABLE_LIBRARIES],
3617
4279
[
3618
4280
    AC_PROVIDE([AM_ENABLE_STATIC])
3619
4281
    AC_PROVIDE([AM_ENABLE_SHARED])
3622
4284
])
3623
4285
 
3624
4286
 
3625
 
AC_DEFUN(AC_CHECK_UTMP_FILE,
 
4287
AC_DEFUN([AC_CHECK_UTMP_FILE],
3626
4288
[
3627
4289
    AC_MSG_CHECKING([for utmp file])
3628
4290
 
3655
4317
])
3656
4318
 
3657
4319
 
3658
 
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
 
4320
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
3659
4321
[
3660
4322
 
3661
4323
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
3670
4332
  done
3671
4333
fi
3672
4334
 
 
4335
ac_topsubdirs=
3673
4336
if test -s $srcdir/inst-apps; then
3674
4337
  ac_topsubdirs="`cat $srcdir/inst-apps`"
3675
 
else
 
4338
elif test -s $srcdir/subdirs; then
3676
4339
  ac_topsubdirs="`cat $srcdir/subdirs`"
3677
4340
fi
3678
4341
 
3689
4352
    install_it="no"
3690
4353
  fi
3691
4354
  AC_MSG_RESULT($install_it)
 
4355
  vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
3692
4356
  if test $install_it = "yes"; then
3693
4357
    TOPSUBDIRS="$TOPSUBDIRS $i"
 
4358
    eval "$vari""_SUBDIR_included=yes"
 
4359
  else
 
4360
    eval "$vari""_SUBDIR_included=no"
3694
4361
  fi
3695
4362
done
3696
4363
 
3697
4364
AC_SUBST(TOPSUBDIRS)
3698
4365
])
3699
4366
 
3700
 
AC_DEFUN(KDE_CHECK_NAMESPACES,
 
4367
AC_DEFUN([KDE_CHECK_NAMESPACES],
3701
4368
[
3702
4369
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
3703
4370
AC_LANG_SAVE
3723
4390
AC_LANG_RESTORE
3724
4391
])
3725
4392
 
3726
 
AC_DEFUN(KDE_CHECK_NEWLIBS,
3727
 
[
3728
 
 
3729
 
])
3730
 
 
3731
4393
dnl ------------------------------------------------------------------------
3732
4394
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
3733
4395
dnl ------------------------------------------------------------------------
3734
4396
dnl
3735
 
AC_DEFUN(AC_CHECK_S_ISSOCK,
 
4397
AC_DEFUN([AC_CHECK_S_ISSOCK],
3736
4398
[
3737
4399
AC_MSG_CHECKING(for S_ISSOCK)
3738
4400
AC_CACHE_VAL(ac_cv_have_s_issock,
3739
4401
[
3740
 
AC_LANG_SAVE
3741
 
AC_LANG_C
3742
4402
AC_TRY_LINK(
3743
4403
[
3744
4404
#include <sys/stat.h>
3749
4409
],
3750
4410
ac_cv_have_s_issock=yes,
3751
4411
ac_cv_have_s_issock=no)
3752
 
AC_LANG_RESTORE
3753
4412
])
3754
4413
AC_MSG_RESULT($ac_cv_have_s_issock)
3755
4414
if test "$ac_cv_have_s_issock" = "yes"; then
3756
4415
  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
3757
4416
fi
 
4417
 
 
4418
AH_VERBATIM(_ISSOCK,
 
4419
[
 
4420
#ifndef HAVE_S_ISSOCK
 
4421
#define HAVE_S_ISSOCK
 
4422
#define S_ISSOCK(mode) (1==0)
 
4423
#endif
 
4424
])
 
4425
 
3758
4426
])
3759
4427
 
3760
4428
dnl ------------------------------------------------------------------------
3761
4429
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
3762
4430
dnl ------------------------------------------------------------------------
3763
4431
dnl
3764
 
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
 
4432
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
3765
4433
[
3766
4434
AC_MSG_CHECKING(for MAXPATHLEN)
3767
4435
AC_CACHE_VAL(ac_cv_maxpathlen,
3768
4436
[
3769
 
AC_LANG_C
3770
4437
cat > conftest.$ac_ext <<EOF
3771
4438
#ifdef STDC_HEADERS
3772
4439
# include <stdlib.h>
3796
4463
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
3797
4464
])
3798
4465
 
3799
 
dnl -------------------------------------------------------------------------
3800
 
dnl See if the compiler supports a template repository         bero@redhat.de
3801
 
dnl -------------------------------------------------------------------------
3802
 
AC_DEFUN(KDE_COMPILER_REPO,
3803
 
[
3804
 
  REPO=""
3805
 
  NOREPO=""
3806
 
 
3807
 
  KDE_CHECK_COMPILER_FLAG(frepo,
3808
 
   [
3809
 
     REPO="-frepo"
3810
 
     NOREPO="-fno-repo"
3811
 
   ])
3812
 
 
3813
 
  if test -z "$REPO"; then
3814
 
  KDE_CHECK_COMPILER_FLAG(instances=explicit,
3815
 
  [
3816
 
     REPO="-instances=explicit"
3817
 
     NOREPO="-instances=extern"
3818
 
  ])
3819
 
  fi
3820
 
 
3821
 
  if test -n "$REPO"; then
3822
 
     AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
3823
 
                [C++ compiler supports template repository])
3824
 
     $1
3825
 
  fi
3826
 
 
3827
 
  AC_SUBST(REPO)
3828
 
  AC_SUBST(NOREPO)
3829
 
])
3830
 
 
3831
 
AC_DEFUN(KDE_CHECK_HEADER,
3832
 
[
3833
 
   AC_LANG_SAVE
3834
 
   kde_safe_cppflags=$CPPFLAGS
3835
 
   CPPFLAGS="$CPPFLAGS $all_includes"
3836
 
   AC_LANG_CPLUSPLUS
3837
 
   AC_CHECK_HEADER($1, $2, $3)
3838
 
   CPPFLAGS=$kde_safe_cppflags
3839
 
   AC_LANG_RESTORE
3840
 
])
3841
 
 
3842
 
AC_DEFUN(KDE_CHECK_QWSPRITEFIELD,
3843
 
[
3844
 
  KDE_CHECK_HEADER(QwSpriteField.h, ,
3845
 
  [
3846
 
    AC_MSG_WARN([you don't have QwSpriteField.h somewhere. Please install
3847
 
       QwSpriteField out of kdesupport.])
3848
 
      $1
3849
 
  ])
3850
 
])
3851
 
 
3852
 
AC_DEFUN(KDE_FAST_CONFIGURE,
 
4466
AC_DEFUN([KDE_CHECK_HEADER],
 
4467
[
 
4468
   AC_LANG_SAVE
 
4469
   kde_safe_cppflags=$CPPFLAGS
 
4470
   CPPFLAGS="$CPPFLAGS $all_includes"
 
4471
   AC_LANG_CPLUSPLUS
 
4472
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
 
4473
   CPPFLAGS=$kde_safe_cppflags
 
4474
   AC_LANG_RESTORE
 
4475
])
 
4476
 
 
4477
AC_DEFUN([KDE_CHECK_HEADERS],
 
4478
[
 
4479
   AH_CHECK_HEADERS([$1])
 
4480
   AC_LANG_SAVE
 
4481
   kde_safe_cppflags=$CPPFLAGS
 
4482
   CPPFLAGS="$CPPFLAGS $all_includes"
 
4483
   AC_LANG_CPLUSPLUS
 
4484
   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
 
4485
   CPPFLAGS=$kde_safe_cppflags
 
4486
   AC_LANG_RESTORE
 
4487
])
 
4488
 
 
4489
AC_DEFUN([KDE_FAST_CONFIGURE],
3853
4490
[
3854
4491
  dnl makes configure fast (needs perl)
3855
 
  AC_ARG_ENABLE(fast-perl, [  --disable-fast-perl     disable fast Makefile generation (needs perl)],
 
4492
  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
3856
4493
      with_fast_perl=$enableval, with_fast_perl=yes)
3857
4494
])
3858
4495
 
3859
 
AC_DEFUN(KDE_CONF_FILES,
 
4496
AC_DEFUN([KDE_CONF_FILES],
3860
4497
[
3861
4498
  val=
3862
4499
  if test -f $srcdir/configure.files ; then
3871
4508
  AC_SUBST(CONF_FILES)
3872
4509
])dnl
3873
4510
 
3874
 
AC_DEFUN(KDE_SET_PREFIX,
 
4511
dnl This sets the prefix, for arts and kdelibs
 
4512
dnl Do NOT use in any other module.
 
4513
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
 
4514
AC_DEFUN([KDE_SET_PREFIX_CORE],
3875
4515
[
3876
4516
  unset CDPATH
3877
4517
  dnl make $KDEDIR the default for the installation
3879
4519
 
3880
4520
  if test "x$prefix" = "xNONE"; then
3881
4521
    prefix=$ac_default_prefix
3882
 
    ac_configure_args="$ac_configure_args --prefix $prefix"
3883
 
  fi
 
4522
    ac_configure_args="$ac_configure_args --prefix=$prefix"
 
4523
  fi
 
4524
  # And delete superfluous '/' to make compares easier
 
4525
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4526
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4527
  KDE_FAST_CONFIGURE
 
4528
  KDE_CONF_FILES
 
4529
])
 
4530
 
 
4531
 
 
4532
AC_DEFUN([KDE_SET_PREFIX],
 
4533
[
 
4534
  unset CDPATH
 
4535
  dnl We can't give real code to that macro, only a value.
 
4536
  dnl It only matters for --help, since we set the prefix in this function anyway.
 
4537
  AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
 
4538
 
 
4539
  KDE_SET_DEFAULT_BINDIRS
 
4540
  if test "x$prefix" = "xNONE"; then
 
4541
    dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
 
4542
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
 
4543
  else
 
4544
    dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
 
4545
    kde_save_PATH="$PATH"
 
4546
    PATH="$exec_prefix/bin:$prefix/bin:$PATH"
 
4547
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
 
4548
    PATH="$kde_save_PATH"
 
4549
  fi
 
4550
 
 
4551
  kde_libs_prefix=`$KDECONFIG --prefix`
 
4552
  if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
 
4553
       AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
 
4554
                    This means it has been moved since you installed it.
 
4555
                    This won't work. Please recompile kdelibs for the new prefix.
 
4556
                    ])
 
4557
  fi
 
4558
  kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
 
4559
 
 
4560
  AC_MSG_CHECKING([where to install])
 
4561
  if test "x$prefix" = "xNONE"; then
 
4562
    prefix=$kde_libs_prefix
 
4563
    AC_MSG_RESULT([$prefix (as returned by kde-config)])
 
4564
  else
 
4565
    dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
 
4566
    given_prefix=$prefix
 
4567
    AC_MSG_RESULT([$prefix (as requested)])
 
4568
  fi
 
4569
 
 
4570
  # And delete superfluous '/' to make compares easier
 
4571
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4572
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4573
  given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4574
 
 
4575
  AC_SUBST(KDECONFIG)
 
4576
  AC_SUBST(kde_libs_prefix)
 
4577
  AC_SUBST(kde_libs_htmldir)
 
4578
 
3884
4579
  KDE_FAST_CONFIGURE
3885
4580
  KDE_CONF_FILES
3886
4581
])
3951
4646
  fi
3952
4647
])dnl
3953
4648
 
3954
 
AC_DEFUN(KDE_LANG_CPLUSPLUS,
 
4649
AC_DEFUN([KDE_LANG_CPLUSPLUS],
3955
4650
[AC_LANG_CPLUSPLUS
3956
4651
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
3957
4652
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
3962
4657
KDE_LANG_CPLUSPLUS
3963
4658
])
3964
4659
 
3965
 
AC_DEFUN(KDE_CHECK_LONG_LONG,
 
4660
AC_DEFUN([KDE_CHECK_LONG_LONG],
3966
4661
[
3967
4662
AC_MSG_CHECKING(for long long)
3968
4663
AC_CACHE_VAL(kde_cv_c_long_long,
3974
4669
  foo = foo+1;
3975
4670
  ],
3976
4671
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
 
4672
  AC_LANG_RESTORE
3977
4673
])
3978
4674
AC_MSG_RESULT($kde_cv_c_long_long)
3979
4675
if test "$kde_cv_c_long_long" = yes; then
3981
4677
fi
3982
4678
])
3983
4679
 
3984
 
AC_DEFUN(KDE_CHECK_LIB,
 
4680
AC_DEFUN([KDE_CHECK_LIB],
3985
4681
[
 
4682
     kde_save_LDFLAGS="$LDFLAGS"
 
4683
     dnl AC_CHECK_LIB modifies LIBS, so save it here
3986
4684
     kde_save_LIBS="$LIBS"
3987
 
     LIBS="$LIBS $all_libraries"
 
4685
     LDFLAGS="$LDFLAGS $all_libraries"
3988
4686
     case $host_os in
3989
 
      aix*) LIBS="-brtl $LIBS"
3990
 
        test "$GCC" = yes && LIBS="-Wl,$LIBS"
 
4687
      aix*) LDFLAGS="-brtl $LDFLAGS"
 
4688
        test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
3991
4689
        ;;
3992
4690
     esac
3993
4691
     AC_CHECK_LIB($1, $2, $3, $4, $5)
 
4692
     LDFLAGS="$kde_save_LDFLAGS"
3994
4693
     LIBS="$kde_save_LIBS"
3995
4694
])
3996
4695
 
3997
 
 
3998
 
 
3999
 
 
4000
 
AC_DEFUN(KDE_CHECK_INITGROUPS,
4001
 
4002
 
  AC_REQUIRE([AC_CANONICAL_HOST])
4003
 
  AC_CHECK_FUNCS(initgroups)
4004
 
  if test "x$ac_cv_func_initgroups" = "xyes"; then
4005
 
    case $host_os in
4006
 
      aix*) AC_LANG_SAVE
4007
 
            AC_LANG_CPLUSPLUS
4008
 
            AC_MSG_CHECKING([for initgroups prototype])
4009
 
            AC_CACHE_VAL(kde_cv_check_initgroups_proto,
4010
 
            [ AC_TRY_COMPILE(
4011
 
              [ #include <grp.h>
4012
 
              ],
4013
 
              [ char buffer[10];
4014
 
                gid_t id;
4015
 
                int x = initgroups(buffer,id);
4016
 
              ],
4017
 
              kde_cv_check_initgroups_proto=yes,
4018
 
              kde_cv_check_initgroups_proto=no)
4019
 
            ])
4020
 
            AC_MSG_RESULT($kde_cv_check_initgroups_proto)
4021
 
            AC_LANG_RESTORE
4022
 
            ;;
4023
 
      *)
4024
 
            kde_cv_check_initgroups_proto=yes
4025
 
            ;;
4026
 
    esac
4027
 
  else
4028
 
    kde_cv_check_initgroups_proto=no
4029
 
  fi
4030
 
  if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
4031
 
    kde_check_initgroups_proto=1
4032
 
  else
4033
 
    kde_check_initgroups_proto=0
4034
 
  fi
4035
 
  AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
4036
 
           [initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
 
4696
AC_DEFUN([KDE_JAVA_PREFIX],
 
4697
[
 
4698
        dir=`dirname "$1"`
 
4699
        base=`basename "$1"`
 
4700
        list=`ls -1 $dir 2> /dev/null`
 
4701
        for entry in $list; do 
 
4702
                if test -d $dir/$entry/bin; then
 
4703
                        case $entry in
 
4704
                           $base)
 
4705
                                javadirs="$javadirs $dir/$entry/bin"
 
4706
                                ;;
 
4707
                        esac
 
4708
                elif test -d $dir/$entry/jre/bin; then
 
4709
                        case $entry in
 
4710
                           $base)
 
4711
                                javadirs="$javadirs $dir/$entry/jre/bin"
 
4712
                                ;;
 
4713
                        esac
 
4714
                fi
 
4715
        done
4037
4716
])
4038
4717
 
4039
 
 
4040
 
AC_DEFUN(KDE_CHECK_JAVA_DIR,
 
4718
dnl KDE_CHEC_JAVA_DIR(onlyjre)
 
4719
AC_DEFUN([KDE_CHECK_JAVA_DIR],
4041
4720
[
4042
 
AC_MSG_CHECKING([for Java directory])
4043
4721
 
4044
4722
AC_ARG_WITH(java,
4045
 
[  --with-java=javadir     use java installed in javadir, --without-java disables ],
 
4723
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
4046
4724
[  ac_java_dir=$withval
4047
4725
], ac_java_dir=""
4048
4726
)
4049
4727
 
 
4728
AC_MSG_CHECKING([for Java])
 
4729
 
4050
4730
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4051
 
if test "x$ac_java_dir" = xno; then
4052
 
   kde_cv_java_bindir=no
4053
 
   kde_cv_java_includedir=no
4054
 
   kde_cv_java_libjvmdir=no
4055
 
   kde_cv_java_libhpidir=no
 
4731
if test "x$ac_java_dir" = "xno"; then
 
4732
   kde_java_bindir=no
 
4733
   kde_java_includedir=no
 
4734
   kde_java_libjvmdir=no
 
4735
   kde_java_libgcjdir=no
 
4736
   kde_java_libhpidir=no
4056
4737
else
4057
 
  if test "x$ac_java_dir" = x; then
4058
 
    dnl No option set -> look in $PATH
4059
 
    AC_CACHE_VAL(kde_cv_java_bindir,
4060
 
    [
4061
 
      dnl First look for javac in $PATH. If not found we'll look at the option.
4062
 
      KDE_FIND_PATH(javac, JAVAC, [], [])
 
4738
  if test "x$ac_java_dir" = "x"; then
 
4739
     
 
4740
     
 
4741
      dnl No option set -> collect list of candidate paths
 
4742
      if test -n "$JAVA_HOME"; then
 
4743
        KDE_JAVA_PREFIX($JAVA_HOME)
 
4744
      fi
 
4745
      KDE_JAVA_PREFIX(/usr/j2se)
 
4746
      KDE_JAVA_PREFIX(/usr/lib/j2se)
 
4747
      KDE_JAVA_PREFIX(/usr/j*dk*)
 
4748
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
 
4749
      KDE_JAVA_PREFIX(/opt/j*sdk*)
 
4750
      KDE_JAVA_PREFIX(/usr/lib/java*)
 
4751
      KDE_JAVA_PREFIX(/usr/java*)
 
4752
      KDE_JAVA_PREFIX(/usr/java/j*dk*)
 
4753
      KDE_JAVA_PREFIX(/usr/java/j*re*)
 
4754
      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
 
4755
      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
 
4756
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
 
4757
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
 
4758
      KDE_JAVA_PREFIX(/opt/java*)
 
4759
 
 
4760
      kde_cv_path="NONE"
 
4761
      kde_save_IFS=$IFS
 
4762
      IFS=':'
 
4763
      for dir in $PATH; do
 
4764
          if test -d "$dir"; then
 
4765
              javadirs="$javadirs $dir"
 
4766
          fi
 
4767
      done
 
4768
      IFS=$kde_save_IFS
 
4769
      jredirs=
 
4770
 
 
4771
      dnl Now javadirs contains a list of paths that exist, all ending with bin/
 
4772
      for dir in $javadirs; do
 
4773
          dnl Check for the java executable
 
4774
          if test -x "$dir/java"; then
 
4775
              dnl And also check for a libjvm.so somewhere under there
 
4776
              dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
 
4777
              if test "$dir" != "/usr/bin"; then
 
4778
                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
4779
                  if test ! -f $libjvmdir/libjvm.so; then continue; fi
 
4780
                  jredirs="$jredirs $dir"
 
4781
              fi
 
4782
          fi
 
4783
      done
 
4784
 
 
4785
      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
 
4786
      JAVAC=
 
4787
      JAVA=
 
4788
      kde_java_bindir=no
 
4789
      for dir in $jredirs; do
 
4790
          JAVA="$dir/java"
 
4791
          kde_java_bindir=$dir
 
4792
          if test -x "$dir/javac"; then
 
4793
                JAVAC="$dir/javac"
 
4794
                break
 
4795
          fi
 
4796
      done
 
4797
 
4063
4798
      if test -n "$JAVAC"; then
4064
 
          kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
4065
4799
          dnl this substitution might not work - well, we test for jni.h below
4066
 
          kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
 
4800
          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4067
4801
      else
4068
 
          kde_cv_java_bindir=no
 
4802
          kde_java_includedir=no
4069
4803
      fi
4070
 
    ])
4071
4804
  else
4072
4805
    dnl config option set
4073
 
    kde_cv_java_bindir=$ac_java_dir/bin
4074
 
    kde_cv_java_includedir=$ac_java_dir/include
 
4806
    kde_java_bindir=$ac_java_dir/bin
 
4807
    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
 
4808
        kde_java_includedir=no
 
4809
    else
 
4810
        kde_java_includedir=$ac_java_dir/include
 
4811
    fi
4075
4812
  fi
4076
4813
fi
4077
4814
 
4078
 
dnl Look for libjvm.so
4079
 
kde_cv_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4080
 
dnl Look for libhpi.so and avoid green threads
4081
 
kde_cv_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
 
4815
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
 
4816
if test "x$kde_java_bindir" != "xno"; then
4082
4817
 
4083
 
dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
4084
 
if test ! "x$kde_cv_java_bindir" = xno; then
 
4818
  dnl Look for libjvm.so
 
4819
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
4820
  dnl Look for libgcj.so
 
4821
  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
 
4822
  dnl Look for libhpi.so and avoid green threads
 
4823
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
4085
4824
 
4086
4825
  dnl Now check everything's fine under there
4087
 
 
4088
 
  if test ! -x "$kde_cv_java_bindir/javac"; then
4089
 
    AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
4090
 
  fi
4091
 
  if test ! -x "$kde_cv_java_bindir/javah"; then
4092
 
    AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
4093
 
  fi
4094
 
  if test ! -x "$kde_cv_java_bindir/jar"; then
4095
 
    AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
4096
 
  fi
4097
 
  if test ! -r "$kde_cv_java_includedir/jni.h"; then
4098
 
    AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
4099
 
  fi
4100
 
  if test ! -r "$kde_cv_java_libjvmdir/libjvm.so"; then
4101
 
    AC_MSG_ERROR([libjvm.so not found under $kde_cv_java_libjvmdir. Use --without-java.])
4102
 
  fi
4103
 
  if test ! -r "$kde_cv_java_libhpidir/libhpi.so"; then
4104
 
    AC_MSG_ERROR([libhpi.so not found under $kde_cv_java_libhpidir. Use --without-java.])
4105
 
  fi
4106
 
 
4107
 
  jni_includes="-I$kde_cv_java_includedir"
4108
 
  dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4109
 
  dnl and under linux here..
4110
 
  test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
4111
 
  test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
4112
 
 
4113
 
  dnl Check for JNI version
 
4826
  dnl the include dir is our flag for having the JDK
 
4827
  if test -d "$kde_java_includedir"; then
 
4828
    if test ! -x "$kde_java_bindir/javac"; then
 
4829
      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
 
4830
    fi
 
4831
    if test ! -x "$kde_java_bindir/javah"; then
 
4832
      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4833
    fi
 
4834
    if test ! -x "$kde_java_bindir/jar"; then
 
4835
      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4836
    fi
 
4837
    if test ! -r "$kde_java_includedir/jni.h"; then
 
4838
      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
 
4839
    fi
 
4840
 
 
4841
    jni_includes="-I$kde_java_includedir"
 
4842
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
 
4843
    dnl and under linux here.. 
 
4844
    
 
4845
    dnl not needed for gcj
 
4846
 
 
4847
    if test "x$kde_java_libgcjdir" = "x"; then 
 
4848
      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
 
4849
      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
 
4850
      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
 
4851
    fi
 
4852
 
 
4853
  else
 
4854
    JAVAC=
 
4855
    jni_includes=
 
4856
  fi
 
4857
 
 
4858
  if test "x$kde_java_libgcjdir" = "x"; then 
 
4859
     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
 
4860
        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
 
4861
     fi 
 
4862
  else
 
4863
     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
 
4864
        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
 
4865
     fi 
 
4866
  fi
 
4867
 
 
4868
  if test ! -x "$kde_java_bindir/java"; then
 
4869
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4870
  fi
 
4871
 
 
4872
  dnl not needed for gcj compile
 
4873
 
 
4874
  if test "x$kde_java_libgcjdir" = "x"; then 
 
4875
      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
 
4876
        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
 
4877
      fi
 
4878
  fi
 
4879
 
 
4880
  if test -n "$jni_includes"; then
 
4881
    dnl Check for JNI version
 
4882
    AC_LANG_SAVE
 
4883
    AC_LANG_CPLUSPLUS
 
4884
    ac_cxxflags_safe="$CXXFLAGS"
 
4885
    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
 
4886
 
 
4887
    AC_TRY_COMPILE([
 
4888
  #include <jni.h>
 
4889
              ],
 
4890
              [
 
4891
  #ifndef JNI_VERSION_1_2
 
4892
  Syntax Error
 
4893
  #endif
 
4894
              ],[ kde_jni_works=yes ],
 
4895
              [ kde_jni_works=no ])
 
4896
 
 
4897
    if test $kde_jni_works = no; then
 
4898
      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
 
4899
                    You need to have Java Development Kit (JDK) version 1.2. 
 
4900
 
 
4901
                    Use --with-java to specify another location.
 
4902
                    Use --without-java to configure without java support.
 
4903
                    Or download a newer JDK and try again. 
 
4904
                    See e.g. http://java.sun.com/products/jdk/1.2 ])
 
4905
    fi
 
4906
 
 
4907
    CXXFLAGS="$ac_cxxflags_safe"    
 
4908
    AC_LANG_RESTORE
 
4909
 
 
4910
    dnl All tests ok, inform and subst the variables
 
4911
 
 
4912
    JAVAC=$kde_java_bindir/javac
 
4913
    JAVAH=$kde_java_bindir/javah
 
4914
    JAR=$kde_java_bindir/jar
 
4915
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
4916
    if test "x$kde_java_libgcjdir" = "x"; then 
 
4917
      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
 
4918
    else
 
4919
      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
 
4920
    fi
 
4921
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
 
4922
 
 
4923
  else
 
4924
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
4925
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
 
4926
  fi
 
4927
elif test -d "/Library/Java/Home"; then
 
4928
  kde_java_bindir="/Library/Java/Home/bin"
 
4929
  jni_includes="-I/Library/Java/Home/include"
 
4930
 
 
4931
  JAVAC=$kde_java_bindir/javac
 
4932
  JAVAH=$kde_java_bindir/javah
 
4933
  JAR=$kde_java_bindir/jar
 
4934
  JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
 
4935
 
 
4936
  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
4937
  AC_MSG_RESULT([Apple Java Framework])
 
4938
else
 
4939
  AC_MSG_RESULT([none found])
 
4940
fi
 
4941
 
 
4942
AC_SUBST(JAVAC)
 
4943
AC_SUBST(JAVAH)
 
4944
AC_SUBST(JAR)
 
4945
AC_SUBST(JVMLIBS)
 
4946
AC_SUBST(jni_includes)
 
4947
 
 
4948
# for backward compat
 
4949
kde_cv_java_includedir=$kde_java_includedir
 
4950
kde_cv_java_bindir=$kde_java_bindir
 
4951
])
 
4952
 
 
4953
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
 
4954
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
 
4955
dnl big packages, m4_foreach is dog-slow.  So use our own version of
 
4956
dnl it.  (matz@kde.org)
 
4957
m4_define([mm_foreach],
 
4958
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
 
4959
m4_define([mm_car], [[$1]])
 
4960
m4_define([mm_car2], [[$@]])
 
4961
m4_define([_mm_foreach],
 
4962
[m4_if(m4_quote($2), [], [],
 
4963
       [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
 
4964
                                                   mm_car2(m4_shift($2)),
 
4965
                                                   [$3])])])
 
4966
m4_define([AC_FOREACH],
 
4967
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
 
4968
 
 
4969
AC_DEFUN([KDE_NEED_FLEX],
 
4970
[
 
4971
kde_libs_safe=$LIBS
 
4972
LIBS="$LIBS $USER_LDFLAGS"
 
4973
AM_PROG_LEX
 
4974
LIBS=$kde_libs_safe
 
4975
if test -z "$LEXLIB"; then
 
4976
    AC_MSG_ERROR([You need to have flex installed.])
 
4977
fi
 
4978
AC_SUBST(LEXLIB)
 
4979
])
 
4980
 
 
4981
AC_DEFUN([AC_PATH_QTOPIA],
 
4982
[
 
4983
  dnl TODO: use AC_CACHE_VAL
 
4984
 
 
4985
  if test -z "$1"; then
 
4986
    qtopia_minver_maj=1
 
4987
    qtopia_minver_min=5
 
4988
    qtopia_minver_pat=0
 
4989
  else
 
4990
    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
 
4991
    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
 
4992
    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
 
4993
  fi
 
4994
 
 
4995
  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
 
4996
  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
 
4997
 
 
4998
  AC_REQUIRE([AC_PATH_QT])
 
4999
 
 
5000
  AC_MSG_CHECKING([for Qtopia])
 
5001
 
 
5002
  LIB_QTOPIA="-lqpe"
 
5003
  AC_SUBST(LIB_QTOPIA)
 
5004
 
 
5005
  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
 
5006
 
 
5007
  ac_qtopia_incdir=NO
 
5008
 
 
5009
  AC_ARG_WITH(qtopia-dir,
 
5010
              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
 
5011
              [  ac_qtopia_incdir="$withval"/include] ) 
 
5012
  
 
5013
  qtopia_incdirs=""
 
5014
  for dir in $kde_qtopia_dirs; do
 
5015
    qtopia_incdirs="$qtopia_incdirs $dir/include"
 
5016
  done
 
5017
 
 
5018
  if test ! "$ac_qtopia_incdir" = "NO"; then
 
5019
    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
 
5020
  fi
 
5021
 
 
5022
  qtopia_incdir=""
 
5023
  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
 
5024
  ac_qtopia_incdir="$qtopia_incdir"
 
5025
 
 
5026
  if test -z "$qtopia_incdir"; then
 
5027
    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
 
5028
  fi
 
5029
 
 
5030
  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
 
5031
  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
 
5032
  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
 
5033
 
 
5034
  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
 
5035
  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
 
5036
  if test "$qtopia_ver" -lt "$qtopia_minver"; then
 
5037
    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
 
5038
is required.])
 
5039
  fi
 
5040
 
4114
5041
  AC_LANG_SAVE
4115
5042
  AC_LANG_CPLUSPLUS
 
5043
 
4116
5044
  ac_cxxflags_safe="$CXXFLAGS"
4117
 
  CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4118
 
 
4119
 
  AC_TRY_COMPILE([
4120
 
#include <jni.h>
4121
 
            ],
4122
 
            [
4123
 
#ifndef JNI_VERSION_1_2
4124
 
Syntax Error
4125
 
#endif
4126
 
            ],[ 
4127
 
            ],[ AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
4128
 
                  You need to have Java Development Kit (JDK) version 1.2. 
4129
 
        
4130
 
                  Use --with-java to specify another location.
4131
 
                  Use --without-java to configure without java support.
4132
 
                  Or download a newer JDK and try again. 
4133
 
                  See e.g. http://java.sun.com/products/jdk/1.2 ])
4134
 
            ])
4135
 
 
4136
 
  CXXFLAGS="$ac_cxxflags_safe"    
 
5045
  ac_ldflags_safe="$LDFLAGS"
 
5046
  ac_libs_safe="$LIBS"
 
5047
 
 
5048
  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
 
5049
  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
 
5050
  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
 
5051
 
 
5052
  cat > conftest.$ac_ext <<EOF
 
5053
#include "confdefs.h"
 
5054
#include <qpe/qpeapplication.h>
 
5055
#include <qpe/version.h>
 
5056
 
 
5057
int main( int argc, char **argv )
 
5058
{
 
5059
    QPEApplication app( argc, argv );
 
5060
    return 0;
 
5061
}
 
5062
EOF
 
5063
 
 
5064
  if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
5065
    rm -f conftest*
 
5066
  else
 
5067
    rm -f conftest*
 
5068
    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
 
5069
the end of config.log])
 
5070
  fi
 
5071
 
 
5072
  CXXFLAGS="$ac_cxxflags_safe"
 
5073
  LDFLAGS="$ac_ldflags_safe"
 
5074
  LIBS="$ac_libs_safe"
 
5075
 
4137
5076
  AC_LANG_RESTORE
4138
5077
 
4139
 
  dnl All tests ok, inform and subst the variables
4140
 
  AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
4141
 
 
4142
 
  JAVAC=$kde_cv_java_bindir/javac
4143
 
  AC_SUBST(JAVAC)
4144
 
  JAVAH=$kde_cv_java_bindir/javah
4145
 
  AC_SUBST(JAVAH)
4146
 
  JAR=$kde_cv_java_bindir/jar
4147
 
  AC_SUBST(JAR)
4148
 
  AC_SUBST(jni_includes)
4149
 
  JVMLIBS="-L$kde_cv_java_libjvmdir -ljvm -L$kde_cv_java_libhpidir -lhpi"
4150
 
  AC_SUBST(JVMLIBS)
4151
 
fi
4152
 
])
4153
 
 
4154
 
# serial 46 AC_PROG_LIBTOOL
 
5078
  QTOPIA_INCLUDES="-I$qtopia_incdir"
 
5079
  AC_SUBST(QTOPIA_INCLUDES)
 
5080
 
 
5081
  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
 
5082
])
 
5083
 
 
5084
 
 
5085
AC_DEFUN([KDE_INIT_DOXYGEN],
 
5086
[
 
5087
AC_MSG_CHECKING([for Qt docs])
 
5088
kde_qtdir=
 
5089
if test "${with_qt_dir+set}" = set; then
 
5090
  kde_qtdir="$with_qt_dir"
 
5091
fi
 
5092
 
 
5093
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)
 
5094
AC_MSG_RESULT($QTDOCDIR)
 
5095
 
 
5096
AC_SUBST(QTDOCDIR)
 
5097
 
 
5098
KDE_FIND_PATH(dot, DOT, [], [])
 
5099
if test -n "$DOT"; then
 
5100
  KDE_HAVE_DOT="YES"
 
5101
else
 
5102
  KDE_HAVE_DOT="NO"
 
5103
fi
 
5104
AC_SUBST(KDE_HAVE_DOT)
 
5105
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
 
5106
AC_SUBST(DOXYGEN)
 
5107
 
 
5108
DOXYGEN_PROJECT_NAME="$1"
 
5109
DOXYGEN_PROJECT_NUMBER="$2"
 
5110
AC_SUBST(DOXYGEN_PROJECT_NAME)
 
5111
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
 
5112
 
 
5113
KDE_HAS_DOXYGEN=no
 
5114
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
 
5115
  KDE_HAS_DOXYGEN=yes
 
5116
fi
 
5117
AC_SUBST(KDE_HAS_DOXYGEN)
 
5118
 
 
5119
])
 
5120
 
 
5121
 
 
5122
AC_DEFUN([AC_FIND_BZIP2],
 
5123
[
 
5124
AC_MSG_CHECKING([for bzDecompress in libbz2])
 
5125
AC_CACHE_VAL(ac_cv_lib_bzip2,
 
5126
[
 
5127
AC_LANG_SAVE
 
5128
AC_LANG_CPLUSPLUS
 
5129
kde_save_LIBS="$LIBS"
 
5130
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
 
5131
kde_save_CXXFLAGS="$CXXFLAGS"
 
5132
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
5133
AC_TRY_LINK(dnl
 
5134
[
 
5135
#define BZ_NO_STDIO
 
5136
#include<bzlib.h>
 
5137
],
 
5138
            [ bz_stream s; (void) bzDecompress(&s); ],
 
5139
            eval "ac_cv_lib_bzip2='-lbz2'",
 
5140
            eval "ac_cv_lib_bzip2=no")
 
5141
LIBS="$kde_save_LIBS"
 
5142
CXXFLAGS="$kde_save_CXXFLAGS"
 
5143
AC_LANG_RESTORE
 
5144
])dnl
 
5145
AC_MSG_RESULT($ac_cv_lib_bzip2)
 
5146
 
 
5147
if test ! "$ac_cv_lib_bzip2" = no; then
 
5148
  BZIP2DIR=bzip2
 
5149
 
 
5150
  LIBBZ2="$ac_cv_lib_bzip2"
 
5151
  AC_SUBST(LIBBZ2)
 
5152
 
 
5153
else
 
5154
 
 
5155
   cxx_shared_flag=
 
5156
   ld_shared_flag=
 
5157
   KDE_CHECK_COMPILER_FLAG(shared, [
 
5158
        ld_shared_flag="-shared"
 
5159
   ])
 
5160
   KDE_CHECK_COMPILER_FLAG(fPIC, [
 
5161
        cxx_shared_flag="-fPIC"
 
5162
   ])
 
5163
 
 
5164
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
 
5165
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
 
5166
   [
 
5167
   AC_LANG_SAVE
 
5168
   AC_LANG_CPLUSPLUS
 
5169
   kde_save_LIBS="$LIBS"
 
5170
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
 
5171
   kde_save_CXXFLAGS="$CXXFLAGS"
 
5172
   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
 
5173
 
 
5174
   AC_TRY_LINK(dnl
 
5175
   [
 
5176
   #define BZ_NO_STDIO
 
5177
   #include<bzlib.h>
 
5178
   ],
 
5179
               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
 
5180
               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
 
5181
               eval "ac_cv_lib_bzip2_prefix=no")
 
5182
   LIBS="$kde_save_LIBS"
 
5183
   CXXFLAGS="$kde_save_CXXFLAGS"
 
5184
   AC_LANG_RESTORE
 
5185
   ])dnl
 
5186
 
 
5187
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
 
5188
   
 
5189
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
 
5190
     BZIP2DIR=bzip2
 
5191
    
 
5192
     LIBBZ2="$ac_cv_lib_bzip2_prefix"
 
5193
     AC_SUBST(LIBBZ2)
 
5194
 
 
5195
     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
 
5196
   dnl else, we just ignore this
 
5197
   fi
 
5198
 
 
5199
fi
 
5200
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
 
5201
])
 
5202
 
 
5203
dnl ------------------------------------------------------------------------
 
5204
dnl Try to find the SSL headers and libraries.
 
5205
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
 
5206
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
 
5207
dnl ------------------------------------------------------------------------
 
5208
dnl
 
5209
AC_DEFUN([KDE_CHECK_SSL],
 
5210
[
 
5211
LIBSSL="-lssl -lcrypto"
 
5212
AC_REQUIRE([KDE_CHECK_LIB64])
 
5213
 
 
5214
ac_ssl_includes=NO ac_ssl_libraries=NO
 
5215
ssl_libraries=""
 
5216
ssl_includes=""
 
5217
AC_ARG_WITH(ssl-dir,
 
5218
    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
 
5219
    [  ac_ssl_includes="$withval"/include
 
5220
       ac_ssl_libraries="$withval"/lib$kdelibsuff
 
5221
    ])
 
5222
 
 
5223
want_ssl=yes
 
5224
AC_ARG_WITH(ssl,
 
5225
    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
 
5226
    [want_ssl=$withval])
 
5227
 
 
5228
if test $want_ssl = yes; then
 
5229
 
 
5230
AC_MSG_CHECKING(for OpenSSL)
 
5231
 
 
5232
AC_CACHE_VAL(ac_cv_have_ssl,
 
5233
[#try to guess OpenSSL locations
 
5234
  
 
5235
  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
 
5236
  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
 
5237
  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
 
5238
  ac_ssl_includes="$ssl_incdir"
 
5239
 
 
5240
  ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
 
5241
  if test ! "$ac_ssl_libraries" = "NO"; then
 
5242
    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
 
5243
  fi
 
5244
 
 
5245
  test=NONE
 
5246
  ssl_libdir=NONE
 
5247
  for dir in $ssl_libdirs; do
 
5248
    try="ls -1 $dir/libssl*"
 
5249
    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
 
5250
  done
 
5251
 
 
5252
  ac_ssl_libraries="$ssl_libdir"
 
5253
 
 
5254
  ac_ldflags_safe="$LDFLAGS"
 
5255
  ac_libs_safe="$LIBS"
 
5256
 
 
5257
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
 
5258
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
 
5259
 
 
5260
  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
 
5261
  ac_ssl_rsaref="yes"
 
5262
  ,
 
5263
  ac_ssl_rsaref="no"
 
5264
  )
 
5265
 
 
5266
  LDFLAGS="$ac_ldflags_safe"
 
5267
  LIBS="$ac_libs_safe"
 
5268
 
 
5269
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
 
5270
    have_ssl=no
 
5271
  else
 
5272
    have_ssl=yes;
 
5273
  fi
 
5274
 
 
5275
  ])
 
5276
 
 
5277
  eval "$ac_cv_have_ssl"
 
5278
 
 
5279
  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
 
5280
 
 
5281
  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
 
5282
  AC_MSG_RESULT($ac_ssl_rsaref)
 
5283
 
 
5284
  AC_MSG_CHECKING([for easter eggs])
 
5285
  AC_MSG_RESULT([none found])
 
5286
 
 
5287
else
 
5288
  have_ssl=no
 
5289
fi
 
5290
 
 
5291
if test "$have_ssl" = yes; then
 
5292
  AC_MSG_CHECKING(for OpenSSL version)
 
5293
  dnl Check for SSL version
 
5294
  AC_CACHE_VAL(ac_cv_ssl_version,
 
5295
  [
 
5296
 
 
5297
    cat >conftest.$ac_ext <<EOF
 
5298
#include <openssl/opensslv.h>
 
5299
#include <stdio.h>
 
5300
    int main() {
 
5301
 
 
5302
#ifndef OPENSSL_VERSION_NUMBER
 
5303
      printf("ssl_version=\\"error\\"\n");
 
5304
#else
 
5305
      if (OPENSSL_VERSION_NUMBER < 0x00906000)
 
5306
        printf("ssl_version=\\"old\\"\n");
 
5307
      else
 
5308
        printf("ssl_version=\\"ok\\"\n");
 
5309
#endif
 
5310
     return (0);
 
5311
    }
 
5312
EOF
 
5313
 
 
5314
    ac_save_CPPFLAGS=$CPPFLAGS
 
5315
    if test "$ac_ssl_includes" != "/usr/include"; then
 
5316
        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
 
5317
    fi
 
5318
 
 
5319
    if AC_TRY_EVAL(ac_link); then 
 
5320
 
 
5321
      if eval `./conftest 2>&5`; then
 
5322
        if test $ssl_version = error; then
 
5323
          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
 
5324
        else
 
5325
          if test $ssl_version = old; then
 
5326
            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
 
5327
            have_ssl=no
 
5328
          fi
 
5329
        fi
 
5330
        ac_cv_ssl_version="ssl_version=$ssl_version"
 
5331
      else
 
5332
        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
 
5333
        Check config.log, and if you can't figure it out, send a mail to 
 
5334
        David Faure <faure@kde.org>, attaching your config.log])
 
5335
      fi
 
5336
 
 
5337
    else
 
5338
      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
 
5339
      Check config.log, and if you can't figure it out, send a mail to 
 
5340
      David Faure <faure@kde.org>, attaching your config.log])
 
5341
    fi 
 
5342
    CPPFLAGS=$ac_save_CPPFLAGS
 
5343
 
 
5344
  ])
 
5345
 
 
5346
  eval "$ac_cv_ssl_version"
 
5347
  AC_MSG_RESULT($ssl_version)
 
5348
fi
 
5349
 
 
5350
if test "$have_ssl" != yes; then
 
5351
  LIBSSL="";
 
5352
else
 
5353
  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
 
5354
  ac_cv_have_ssl="have_ssl=yes \
 
5355
    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
 
5356
  
 
5357
  
 
5358
  ssl_libraries="$ac_ssl_libraries"
 
5359
  ssl_includes="$ac_ssl_includes"
 
5360
 
 
5361
  if test "$ac_ssl_rsaref" = yes; then
 
5362
    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
 
5363
  fi
 
5364
 
 
5365
  if test $ssl_version = "old"; then
 
5366
    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
 
5367
  fi
 
5368
fi
 
5369
 
 
5370
SSL_INCLUDES=
 
5371
 
 
5372
if test "$ssl_includes" = "/usr/include"; then
 
5373
  if test -f /usr/kerberos/include/krb5.h; then
 
5374
        SSL_INCLUDES="-I/usr/kerberos/include"
 
5375
  fi
 
5376
elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
 
5377
  SSL_INCLUDES="-I$ssl_includes"
 
5378
fi
 
5379
 
 
5380
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
 
5381
 SSL_LDFLAGS=""
 
5382
else
 
5383
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
 
5384
fi
 
5385
 
 
5386
AC_SUBST(SSL_INCLUDES)
 
5387
AC_SUBST(SSL_LDFLAGS)
 
5388
AC_SUBST(LIBSSL)
 
5389
])
 
5390
 
 
5391
AC_DEFUN([KDE_CHECK_STRLCPY],
 
5392
[
 
5393
  AC_REQUIRE([AC_CHECK_STRLCAT])
 
5394
  AC_REQUIRE([AC_CHECK_STRLCPY])
 
5395
  AC_CHECK_SIZEOF(size_t)
 
5396
  AC_CHECK_SIZEOF(unsigned long)
 
5397
 
 
5398
  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
 
5399
  AC_TRY_COMPILE(,[
 
5400
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
 
5401
       choke me
 
5402
    #endif
 
5403
    ],AC_MSG_RESULT([yes]),[
 
5404
      AC_MSG_RESULT(no)
 
5405
      AC_MSG_ERROR([
 
5406
       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
 
5407
       does not apply. Please mail kde-devel@kde.org with a description of your system!
 
5408
      ])
 
5409
  ])
 
5410
])
 
5411
 
 
5412
AC_DEFUN([KDE_CHECK_BINUTILS],
 
5413
[
 
5414
  AC_MSG_CHECKING([if ld supports unversioned version maps])
 
5415
 
 
5416
  kde_save_LDFLAGS="$LDFLAGS"
 
5417
  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
 
5418
  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
 
5419
  AC_TRY_LINK([int foo;],
 
5420
[
 
5421
#ifdef __INTEL_COMPILER
 
5422
icc apparently does not support libtools version-info and version-script
 
5423
at the same time. Dunno where the bug is, but until somebody figured out,
 
5424
better disable the optional version scripts.
 
5425
#endif
 
5426
 
 
5427
  foo = 42;
 
5428
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
 
5429
  LDFLAGS="$kde_save_LDFLAGS"
 
5430
  rm -f conftest.map
 
5431
  AM_CONDITIONAL(include_VERSION_SCRIPT, 
 
5432
    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
 
5433
 
 
5434
  AC_MSG_RESULT($kde_supports_versionmaps)
 
5435
])
 
5436
 
 
5437
AC_DEFUN([AM_PROG_OBJC],[
 
5438
AC_CHECK_PROGS(OBJC, gcc, gcc)
 
5439
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
 
5440
if test "x${OBJCFLAGS-unset}" = xunset; then
 
5441
   OBJCFLAGS="-g -O2"
 
5442
fi
 
5443
AC_SUBST(OBJCFLAGS)
 
5444
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
 
5445
])
 
5446
 
 
5447
AC_DEFUN([KDE_CHECK_PERL],
 
5448
[
 
5449
        KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
 
5450
                    AC_MSG_ERROR([No Perl found in your $PATH.
 
5451
We need perl to generate some code.])
 
5452
        ])
 
5453
    AC_SUBST(PERL)
 
5454
])
 
5455
 
 
5456
AC_DEFUN([KDE_CHECK_LARGEFILE],
 
5457
[
 
5458
AC_SYS_LARGEFILE
 
5459
if test "$ac_cv_sys_file_offset_bits" != no; then
 
5460
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
 
5461
fi
 
5462
 
 
5463
if test "x$ac_cv_sys_large_files" != "xno"; then
 
5464
  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
 
5465
fi
 
5466
 
 
5467
])
 
5468
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
5469
 
 
5470
# serial 47 AC_PROG_LIBTOOL
 
5471
 
 
5472
 
 
5473
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
5474
# -----------------------------------------------------------
 
5475
# If this macro is not defined by Autoconf, define it here.
 
5476
m4_ifdef([AC_PROVIDE_IFELSE],
 
5477
         [],
 
5478
         [m4_define([AC_PROVIDE_IFELSE],
 
5479
                 [m4_ifdef([AC_PROVIDE_$1],
 
5480
                           [$2], [$3])])])
 
5481
 
 
5482
 
 
5483
# AC_PROG_LIBTOOL
 
5484
# ---------------
4155
5485
AC_DEFUN([AC_PROG_LIBTOOL],
4156
5486
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
4157
5487
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
4159
5489
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
4160
5490
    [AC_LIBTOOL_CXX],
4161
5491
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
 
5492
  ])])
 
5493
dnl And a similar setup for Fortran 77 support
 
5494
  AC_PROVIDE_IFELSE([AC_PROG_F77],
 
5495
    [AC_LIBTOOL_F77],
 
5496
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
4162
5497
])])
4163
5498
 
4164
5499
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
4167
5502
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
4168
5503
    [AC_LIBTOOL_GCJ],
4169
5504
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
4170
 
        [AC_LIBTOOL_GCJ],
4171
 
        [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
4172
 
          [AC_LIBTOOL_GCJ],
4173
 
        [ifdef([AC_PROG_GCJ],
4174
 
               [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
4175
 
])])
4176
 
         ifdef([A][M_PROG_GCJ],
4177
 
               [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
4178
 
])])
4179
 
         ifdef([LT_AC_PROG_GCJ],
4180
 
               [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
4181
 
])])])])])])
4182
 
 
 
5505
      [AC_LIBTOOL_GCJ],
 
5506
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
5507
        [AC_LIBTOOL_GCJ],
 
5508
      [ifdef([AC_PROG_GCJ],
 
5509
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
5510
       ifdef([A][M_PROG_GCJ],
 
5511
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
5512
       ifdef([LT_AC_PROG_GCJ],
 
5513
             [define([LT_AC_PROG_GCJ],
 
5514
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
5515
])])# AC_PROG_LIBTOOL
 
5516
 
 
5517
 
 
5518
# _AC_PROG_LIBTOOL
 
5519
# ----------------
4183
5520
AC_DEFUN([_AC_PROG_LIBTOOL],
4184
5521
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
4185
5522
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
5523
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
4186
5524
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
4187
5525
 
4188
 
# Save cache, so that ltconfig can load it
4189
 
AC_CACHE_SAVE
4190
 
 
4191
 
# Actually configure libtool.  ac_aux_dir is where install-sh is found.
4192
 
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
4193
 
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4194
 
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4195
 
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4196
 
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4197
 
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
4198
 
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
4199
 
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
4200
 
|| AC_MSG_ERROR([libtool configure failed])
4201
 
 
4202
 
# Reload cache, that may have been modified by ltconfig
4203
 
AC_CACHE_LOAD
4204
 
 
4205
5526
# This can be used to rebuild libtool when needed
4206
 
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
 
5527
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
4207
5528
 
4208
5529
# Always use our own libtool.
4209
 
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
5530
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
4210
5531
AC_SUBST(LIBTOOL)dnl
4211
5532
 
4212
 
# Redirect the config.log output again, so that the ltconfig log is not
4213
 
# clobbered by the next message.
4214
 
exec 5>>./config.log
4215
 
])
4216
 
 
 
5533
# Prevent multiple expansion
 
5534
define([AC_PROG_LIBTOOL], [])
 
5535
])# _AC_PROG_LIBTOOL
 
5536
 
 
5537
 
 
5538
# AC_LIBTOOL_SETUP
 
5539
# ----------------
4217
5540
AC_DEFUN([AC_LIBTOOL_SETUP],
4218
 
[AC_PREREQ(2.13)dnl
 
5541
[AC_PREREQ(2.50)dnl
4219
5542
AC_REQUIRE([AC_ENABLE_SHARED])dnl
4220
5543
AC_REQUIRE([AC_ENABLE_STATIC])dnl
4221
5544
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
4225
5548
AC_REQUIRE([AC_PROG_LD])dnl
4226
5549
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
4227
5550
AC_REQUIRE([AC_PROG_NM])dnl
 
5551
 
4228
5552
AC_REQUIRE([AC_PROG_LN_S])dnl
4229
5553
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
4230
5554
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
4232
5556
AC_REQUIRE([AC_EXEEXT])dnl
4233
5557
dnl
4234
5558
 
 
5559
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
5560
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
5561
AC_LIBTOOL_OBJDIR
 
5562
 
 
5563
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
5564
_LT_AC_PROG_ECHO_BACKSLASH
 
5565
 
 
5566
case $host_os in
 
5567
aix3*)
 
5568
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
5569
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
5570
  # vanish in a puff of smoke.
 
5571
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
5572
    COLLECT_NAMES=
 
5573
    export COLLECT_NAMES
 
5574
  fi
 
5575
  ;;
 
5576
esac
 
5577
 
 
5578
# Sed substitution that helps us do robust quoting.  It backslashifies
 
5579
# metacharacters that are still active within double-quoted strings.
 
5580
Xsed='sed -e s/^X//'
 
5581
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
5582
 
 
5583
# Same as above, but do not quote variable references.
 
5584
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
5585
 
 
5586
# Sed substitution to delay expansion of an escaped shell variable in a
 
5587
# double_quote_subst'ed string.
 
5588
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
5589
 
 
5590
# Sed substitution to avoid accidental globbing in evaled expressions
 
5591
no_glob_subst='s/\*/\\\*/g'
 
5592
 
 
5593
# Constants:
 
5594
rm="rm -f"
 
5595
 
 
5596
# Global variables:
 
5597
default_ofile=libtool
 
5598
can_build_shared=yes
 
5599
 
 
5600
# All known linkers require a `.a' archive for static linking (except M$VC,
 
5601
# which needs '.lib').
 
5602
libext=a
 
5603
ltmain="$ac_aux_dir/ltmain.sh"
 
5604
ofile="$default_ofile"
 
5605
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
5606
 
 
5607
AC_CHECK_TOOL(AR, ar, false)
 
5608
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
5609
AC_CHECK_TOOL(STRIP, strip, :)
 
5610
 
 
5611
old_CC="$CC"
 
5612
old_CFLAGS="$CFLAGS"
 
5613
 
 
5614
# Set sane defaults for various variables
 
5615
test -z "$AR" && AR=ar
 
5616
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
5617
test -z "$AS" && AS=as
 
5618
test -z "$CC" && CC=cc
 
5619
test -z "$LTCC" && LTCC=$CC
 
5620
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
5621
test -z "$LD" && LD=ld
 
5622
test -z "$LN_S" && LN_S="ln -s"
 
5623
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
5624
test -z "$NM" && NM=nm
 
5625
test -z "$SED" && SED=sed
 
5626
test -z "$OBJDUMP" && OBJDUMP=objdump
 
5627
test -z "$RANLIB" && RANLIB=:
 
5628
test -z "$STRIP" && STRIP=:
 
5629
test -z "$ac_objext" && ac_objext=o
 
5630
 
 
5631
# Determine commands to create old-style static archives.
 
5632
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
5633
old_postinstall_cmds='chmod 644 $oldlib'
 
5634
old_postuninstall_cmds=
 
5635
 
 
5636
if test -n "$RANLIB"; then
 
5637
  case $host_os in
 
5638
  openbsd*)
 
5639
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
5640
    ;;
 
5641
  *)
 
5642
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
5643
    ;;
 
5644
  esac
 
5645
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
5646
fi
 
5647
 
4235
5648
# Only perform the check for file, if the check method requires it
4236
5649
case $deplibs_check_method in
4237
5650
file_magic*)
4241
5654
  ;;
4242
5655
esac
4243
5656
 
4244
 
AC_CHECK_TOOL(RANLIB, ranlib, :)
4245
 
AC_CHECK_TOOL(STRIP, strip, :)
4246
 
 
4247
 
# Check for any special flags to pass to ltconfig.
4248
 
libtool_flags="--cache-file=$cache_file"
4249
 
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
4250
 
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
4251
 
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
4252
 
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
4253
 
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
4254
 
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
4255
 
[libtool_flags="$libtool_flags --enable-dlopen"])
4256
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
4257
 
[libtool_flags="$libtool_flags --enable-win32-dll"])
4258
 
AC_ARG_ENABLE(libtool-lock,
4259
 
  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
4260
 
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
4261
 
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
4262
 
 
4263
 
AC_ARG_WITH(pic,
4264
 
  [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
4265
 
     pic_mode="$withval", pic_mode=default)
4266
 
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
4267
 
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
 
5657
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
5658
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
5659
enable_win32_dll=yes, enable_win32_dll=no)
 
5660
 
 
5661
AC_ARG_ENABLE([libtool-lock],
 
5662
    [AC_HELP_STRING([--disable-libtool-lock],
 
5663
        [avoid locking (might break parallel builds)])])
 
5664
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
5665
 
 
5666
AC_ARG_WITH([pic],
 
5667
    [AC_HELP_STRING([--with-pic],
 
5668
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
5669
    [pic_mode="$withval"],
 
5670
    [pic_mode=default])
 
5671
test -z "$pic_mode" && pic_mode=default
 
5672
 
 
5673
# Use C for the default configuration in the libtool script
 
5674
tagname=
 
5675
AC_LIBTOOL_LANG_C_CONFIG
 
5676
_LT_AC_TAGCONFIG
 
5677
])# AC_LIBTOOL_SETUP
 
5678
 
 
5679
 
 
5680
# _LT_AC_SYS_COMPILER
 
5681
# -------------------
 
5682
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
5683
[AC_REQUIRE([AC_PROG_CC])dnl
 
5684
 
 
5685
# If no C compiler was specified, use CC.
 
5686
LTCC=${LTCC-"$CC"}
 
5687
 
 
5688
# Allow CC to be a program name with arguments.
 
5689
compiler=$CC
 
5690
])# _LT_AC_SYS_COMPILER
 
5691
 
 
5692
 
 
5693
# _LT_AC_SYS_LIBPATH_AIX
 
5694
# ----------------------
 
5695
# Links a minimal program and checks the executable
 
5696
# for the system default hardcoded library path. In most cases,
 
5697
# this is /usr/lib:/lib, but when the MPI compilers are used
 
5698
# the location of the communication and MPI libs are included too.
 
5699
# If we don't find anything, use the default library path according
 
5700
# to the aix ld manual.
 
5701
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
5702
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
5703
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
5704
}'`
 
5705
# Check for a 64-bit object if we didn't find anything.
 
5706
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; }
 
5707
}'`; fi],[])
 
5708
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
5709
])# _LT_AC_SYS_LIBPATH_AIX
 
5710
 
 
5711
 
 
5712
# _LT_AC_SHELL_INIT(ARG)
 
5713
# ----------------------
 
5714
AC_DEFUN([_LT_AC_SHELL_INIT],
 
5715
[ifdef([AC_DIVERSION_NOTICE],
 
5716
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
5717
         [AC_DIVERT_PUSH(NOTICE)])
 
5718
$1
 
5719
AC_DIVERT_POP
 
5720
])# _LT_AC_SHELL_INIT
 
5721
 
 
5722
 
 
5723
# _LT_AC_PROG_ECHO_BACKSLASH
 
5724
# --------------------------
 
5725
# Add some code to the start of the generated configure script which
 
5726
# will find an echo command which doesn't interpret backslashes.
 
5727
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
 
5728
[_LT_AC_SHELL_INIT([
 
5729
# Check that we are running under the correct shell.
 
5730
SHELL=${CONFIG_SHELL-/bin/sh}
 
5731
 
 
5732
case X$ECHO in
 
5733
X*--fallback-echo)
 
5734
  # Remove one level of quotation (which was required for Make).
 
5735
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
5736
  ;;
 
5737
esac
 
5738
 
 
5739
echo=${ECHO-echo}
 
5740
if test "X[$]1" = X--no-reexec; then
 
5741
  # Discard the --no-reexec flag, and continue.
 
5742
  shift
 
5743
elif test "X[$]1" = X--fallback-echo; then
 
5744
  # Avoid inline document here, it may be left over
 
5745
  :
 
5746
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
 
5747
  # Yippee, $echo works!
 
5748
  :
 
5749
else
 
5750
  # Restart under the correct shell.
 
5751
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
5752
fi
 
5753
 
 
5754
if test "X[$]1" = X--fallback-echo; then
 
5755
  # used as fallback echo
 
5756
  shift
 
5757
  cat <<EOF
 
5758
[$]*
 
5759
EOF
 
5760
  exit 0
 
5761
fi
 
5762
 
 
5763
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
5764
# if CDPATH is set.
 
5765
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
5766
 
 
5767
if test -z "$ECHO"; then
 
5768
if test "X${echo_test_string+set}" != Xset; then
 
5769
# find a string as large as possible, as long as the shell can cope with it
 
5770
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
5771
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
5772
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
 
5773
       echo_test_string="`eval $cmd`" &&
 
5774
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
 
5775
    then
 
5776
      break
 
5777
    fi
 
5778
  done
 
5779
fi
 
5780
 
 
5781
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
5782
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
5783
   test "X$echo_testing_string" = "X$echo_test_string"; then
 
5784
  :
 
5785
else
 
5786
  # The Solaris, AIX, and Digital Unix default echo programs unquote
 
5787
  # backslashes.  This makes it impossible to quote backslashes using
 
5788
  #   echo "$something" | sed 's/\\/\\\\/g'
 
5789
  #
 
5790
  # So, first we look for a working echo in the user's PATH.
 
5791
 
 
5792
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
5793
  for dir in $PATH /usr/ucb; do
 
5794
    IFS="$lt_save_ifs"
 
5795
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
5796
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
5797
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
5798
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
5799
      echo="$dir/echo"
 
5800
      break
 
5801
    fi
 
5802
  done
 
5803
  IFS="$lt_save_ifs"
 
5804
 
 
5805
  if test "X$echo" = Xecho; then
 
5806
    # We didn't find a better echo, so look for alternatives.
 
5807
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
 
5808
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
 
5809
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
5810
      # This shell has a builtin print -r that does the trick.
 
5811
      echo='print -r'
 
5812
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
 
5813
         test "X$CONFIG_SHELL" != X/bin/ksh; then
 
5814
      # If we have ksh, try running configure again with it.
 
5815
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
5816
      export ORIGINAL_CONFIG_SHELL
 
5817
      CONFIG_SHELL=/bin/ksh
 
5818
      export CONFIG_SHELL
 
5819
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
5820
    else
 
5821
      # Try using printf.
 
5822
      echo='printf %s\n'
 
5823
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
5824
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
5825
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
5826
        # Cool, printf works
 
5827
        :
 
5828
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
5829
           test "X$echo_testing_string" = 'X\t' &&
 
5830
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
5831
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
5832
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
5833
        export CONFIG_SHELL
 
5834
        SHELL="$CONFIG_SHELL"
 
5835
        export SHELL
 
5836
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
5837
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
5838
           test "X$echo_testing_string" = 'X\t' &&
 
5839
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
5840
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
5841
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
5842
      else
 
5843
        # maybe with a smaller string...
 
5844
        prev=:
 
5845
 
 
5846
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
5847
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
 
5848
          then
 
5849
            break
 
5850
          fi
 
5851
          prev="$cmd"
 
5852
        done
 
5853
 
 
5854
        if test "$prev" != 'sed 50q "[$]0"'; then
 
5855
          echo_test_string=`eval $prev`
 
5856
          export echo_test_string
 
5857
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
5858
        else
 
5859
          # Oops.  We lost completely, so just stick with echo.
 
5860
          echo=echo
 
5861
        fi
 
5862
      fi
 
5863
    fi
 
5864
  fi
 
5865
fi
 
5866
fi
 
5867
 
 
5868
# Copy echo and quote the copy suitably for passing to libtool from
 
5869
# the Makefile, instead of quoting the original, which is used later.
 
5870
ECHO=$echo
 
5871
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
5872
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
5873
fi
 
5874
 
 
5875
AC_SUBST(ECHO)
 
5876
])])# _LT_AC_PROG_ECHO_BACKSLASH
 
5877
 
 
5878
 
 
5879
# _LT_AC_LOCK
 
5880
# -----------
 
5881
AC_DEFUN([_LT_AC_LOCK],
 
5882
[AC_ARG_ENABLE([libtool-lock],
 
5883
    [AC_HELP_STRING([--disable-libtool-lock],
 
5884
        [avoid locking (might break parallel builds)])])
 
5885
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4268
5886
 
4269
5887
# Some flags need to be propagated to the compiler or linker for good
4270
5888
# libtool support.
4271
5889
case $host in
 
5890
ia64-*-hpux*)
 
5891
  # Find out which ABI we are using.
 
5892
  echo 'int i;' > conftest.$ac_ext
 
5893
  if AC_TRY_EVAL(ac_compile); then
 
5894
    case `/usr/bin/file conftest.$ac_objext` in
 
5895
    *ELF-32*)
 
5896
      HPUX_IA64_MODE="32"
 
5897
      ;;
 
5898
    *ELF-64*)
 
5899
      HPUX_IA64_MODE="64"
 
5900
      ;;
 
5901
    esac
 
5902
  fi
 
5903
  rm -rf conftest*
 
5904
  ;;
4272
5905
*-*-irix6*)
4273
5906
  # Find out which ABI we are using.
4274
5907
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
4275
5908
  if AC_TRY_EVAL(ac_compile); then
 
5909
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
5910
    case `/usr/bin/file conftest.$ac_objext` in
 
5911
    *32-bit*)
 
5912
      LD="${LD-ld} -melf32bsmip"
 
5913
      ;;
 
5914
    *N32*)
 
5915
      LD="${LD-ld} -melf32bmipn32"
 
5916
      ;;
 
5917
    *64-bit*)
 
5918
      LD="${LD-ld} -melf64bmip"
 
5919
      ;;
 
5920
    esac
 
5921
   else
4276
5922
    case `/usr/bin/file conftest.$ac_objext` in
4277
5923
    *32-bit*)
4278
5924
      LD="${LD-ld} -32"
4284
5930
      LD="${LD-ld} -64"
4285
5931
      ;;
4286
5932
    esac
 
5933
   fi
 
5934
  fi
 
5935
  rm -rf conftest*
 
5936
  ;;
 
5937
 
 
5938
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
5939
  # Find out which ABI we are using.
 
5940
  echo 'int i;' > conftest.$ac_ext
 
5941
  if AC_TRY_EVAL(ac_compile); then
 
5942
    case "`/usr/bin/file conftest.o`" in
 
5943
    *32-bit*)
 
5944
      LINUX_64_MODE="32"
 
5945
      case $host in
 
5946
        x86_64-*linux*)
 
5947
          LD="${LD-ld} -m elf_i386"
 
5948
          ;;
 
5949
        ppc64-*linux*)
 
5950
          LD="${LD-ld} -m elf32ppclinux"
 
5951
          ;;
 
5952
        s390x-*linux*)
 
5953
          LD="${LD-ld} -m elf_s390"
 
5954
          ;;
 
5955
        sparc64-*linux*)
 
5956
          LD="${LD-ld} -m elf32_sparc"
 
5957
          ;;
 
5958
      esac
 
5959
      ;;
 
5960
    *64-bit*)
 
5961
      LINUX_64_MODE="64"
 
5962
      case $host in
 
5963
        x86_64-*linux*)
 
5964
          LD="${LD-ld} -m elf_x86_64"
 
5965
          ;;
 
5966
        ppc*-*linux*|powerpc*-*linux*)
 
5967
          LD="${LD-ld} -m elf64ppc"
 
5968
          ;;
 
5969
        s390*-*linux*)
 
5970
          LD="${LD-ld} -m elf64_s390"
 
5971
          ;;
 
5972
        sparc*-*linux*)
 
5973
          LD="${LD-ld} -m elf64_sparc"
 
5974
          ;;
 
5975
      esac
 
5976
      ;;
 
5977
    esac
4287
5978
  fi
4288
5979
  rm -rf conftest*
4289
5980
  ;;
4293
5984
  SAVE_CFLAGS="$CFLAGS"
4294
5985
  CFLAGS="$CFLAGS -belf"
4295
5986
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
4296
 
    [AC_LANG_SAVE
4297
 
     AC_LANG_C
 
5987
    [AC_LANG_PUSH(C)
4298
5988
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
4299
 
     AC_LANG_RESTORE])
 
5989
     AC_LANG_POP])
4300
5990
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4301
5991
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4302
5992
    CFLAGS="$SAVE_CFLAGS"
4303
5993
  fi
4304
5994
  ;;
4305
 
 
4306
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
5995
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
4307
5996
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
4308
5997
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
4309
5998
  AC_CHECK_TOOL(AS, as, false)
4310
5999
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
4311
 
 
4312
 
  # recent cygwin and mingw systems supply a stub DllMain which the user
4313
 
  # can override, but on older systems we have to supply one
4314
 
  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
4315
 
    [AC_TRY_LINK([],
4316
 
      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4317
 
      DllMain (0, 0, 0);],
4318
 
      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
4319
 
 
4320
 
  case $host/$CC in
4321
 
  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4322
 
    # old mingw systems require "-dll" to link a DLL, while more recent ones
4323
 
    # require "-mdll"
4324
 
    SAVE_CFLAGS="$CFLAGS"
4325
 
    CFLAGS="$CFLAGS -mdll"
4326
 
    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
4327
 
      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
4328
 
    CFLAGS="$SAVE_CFLAGS" ;;
4329
 
  *-*-cygwin* | *-*-pw32*)
4330
 
    # cygwin systems need to pass --dll to the linker, and not link
4331
 
    # crt.o which will require a WinMain@16 definition.
4332
 
    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4333
 
  esac
4334
6000
  ;;
4335
6001
  ])
4336
6002
esac
4337
 
])
4338
 
 
4339
 
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
4340
 
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
4341
 
 
4342
 
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
4343
 
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
4344
 
 
4345
 
# AC_ENABLE_SHARED - implement the --enable-shared flag
4346
 
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
4347
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
4348
 
#   `yes'.
 
6003
 
 
6004
need_locks="$enable_libtool_lock"
 
6005
 
 
6006
])# _LT_AC_LOCK
 
6007
 
 
6008
 
 
6009
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
6010
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
6011
# ----------------------------------------------------------------
 
6012
# Check whether the given compiler option works
 
6013
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
6014
[AC_REQUIRE([LT_AC_PROG_SED])
 
6015
AC_CACHE_CHECK([$1], [$2],
 
6016
  [$2=no
 
6017
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
6018
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6019
   lt_compiler_flag="$3"
 
6020
   # Insert the option either (1) after the last *FLAGS variable, or
 
6021
   # (2) before a word containing "conftest.", or (3) at the end.
 
6022
   # Note that $ac_compile itself does not contain backslashes and begins
 
6023
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
6024
   # The option is referenced via a variable to avoid confusing sed.
 
6025
   lt_compile=`echo "$ac_compile" | $SED \
 
6026
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
6027
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
6028
   -e 's:$: $lt_compiler_flag:'`
 
6029
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
6030
   (eval "$lt_compile" 2>conftest.err)
 
6031
   ac_status=$?
 
6032
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
6033
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
6034
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
6035
     # The compiler can only warn and ignore the option if not recognized
 
6036
     # So say no if there are warnings
 
6037
     if test ! -s conftest.err; then
 
6038
       $2=yes
 
6039
     fi
 
6040
   fi
 
6041
   $rm conftest*
 
6042
])
 
6043
 
 
6044
if test x"[$]$2" = xyes; then
 
6045
    ifelse([$5], , :, [$5])
 
6046
else
 
6047
    ifelse([$6], , :, [$6])
 
6048
fi
 
6049
])# AC_LIBTOOL_COMPILER_OPTION
 
6050
 
 
6051
 
 
6052
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
6053
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
6054
# ------------------------------------------------------------
 
6055
# Check whether the given compiler option works
 
6056
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
6057
[AC_CACHE_CHECK([$1], [$2],
 
6058
  [$2=no
 
6059
   save_LDFLAGS="$LDFLAGS"
 
6060
   LDFLAGS="$LDFLAGS $3"
 
6061
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
 
6062
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
6063
     # The compiler can only warn and ignore the option if not recognized
 
6064
     # So say no if there are warnings
 
6065
     if test -s conftest.err; then
 
6066
       # Append any errors to the config.log.
 
6067
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
6068
     else
 
6069
       $2=yes
 
6070
     fi
 
6071
   fi
 
6072
   $rm conftest*
 
6073
   LDFLAGS="$save_LDFLAGS"
 
6074
])
 
6075
 
 
6076
if test x"[$]$2" = xyes; then
 
6077
    ifelse([$4], , :, [$4])
 
6078
else
 
6079
    ifelse([$5], , :, [$5])
 
6080
fi
 
6081
])# AC_LIBTOOL_LINKER_OPTION
 
6082
 
 
6083
 
 
6084
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
6085
# --------------------------
 
6086
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
6087
[# find the maximum length of command line arguments
 
6088
AC_MSG_CHECKING([the maximum length of command line arguments])
 
6089
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
6090
  i=0
 
6091
  testring="ABCD"
 
6092
 
 
6093
  case $build_os in
 
6094
  msdosdjgpp*)
 
6095
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
6096
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
6097
    # during glob expansion).  Even if it were fixed, the result of this
 
6098
    # check would be larger than it should be.
 
6099
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
6100
    ;;
 
6101
 
 
6102
  gnu*)
 
6103
    # Under GNU Hurd, this test is not required because there is
 
6104
    # no limit to the length of command line arguments.
 
6105
    # Libtool will interpret -1 as no limit whatsoever
 
6106
    lt_cv_sys_max_cmd_len=-1;
 
6107
    ;;
 
6108
 
 
6109
  cygwin* | mingw*)
 
6110
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
6111
    # about 5 minutes as the teststring grows exponentially.
 
6112
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
6113
    # you end up with a "frozen" computer, even though with patience
 
6114
    # the test eventually succeeds (with a max line length of 256k).
 
6115
    # Instead, let's just punt: use the minimum linelength reported by
 
6116
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
6117
    lt_cv_sys_max_cmd_len=8192;
 
6118
    ;;
 
6119
 
 
6120
 *)
 
6121
    # If test is not a shell built-in, we'll probably end up computing a
 
6122
    # maximum length that is only half of the actual maximum length, but
 
6123
    # we can't tell.
 
6124
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
 
6125
               = "XX$testring") >/dev/null 2>&1 &&
 
6126
            new_result=`expr "X$testring" : ".*" 2>&1` &&
 
6127
            lt_cv_sys_max_cmd_len=$new_result &&
 
6128
            test $i != 17 # 1/2 MB should be enough
 
6129
    do
 
6130
      i=`expr $i + 1`
 
6131
      testring=$testring$testring
 
6132
    done
 
6133
    testring=
 
6134
    # Add a significant safety factor because C++ compilers can tack on massive
 
6135
    # amounts of additional arguments before passing them to the linker.
 
6136
    # It appears as though 1/2 is a usable value.
 
6137
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
6138
    ;;
 
6139
  esac
 
6140
])
 
6141
if test -n $lt_cv_sys_max_cmd_len ; then
 
6142
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
6143
else
 
6144
  AC_MSG_RESULT(none)
 
6145
fi
 
6146
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
6147
 
 
6148
 
 
6149
# _LT_AC_CHECK_DLFCN
 
6150
# --------------------
 
6151
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
6152
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
6153
])# _LT_AC_CHECK_DLFCN
 
6154
 
 
6155
 
 
6156
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
6157
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
6158
# ------------------------------------------------------------------
 
6159
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 
6160
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6161
if test "$cross_compiling" = yes; then :
 
6162
  [$4]
 
6163
else
 
6164
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
6165
  lt_status=$lt_dlunknown
 
6166
  cat > conftest.$ac_ext <<EOF
 
6167
[#line __oline__ "configure"
 
6168
#include "confdefs.h"
 
6169
 
 
6170
#if HAVE_DLFCN_H
 
6171
#include <dlfcn.h>
 
6172
#endif
 
6173
 
 
6174
#include <stdio.h>
 
6175
 
 
6176
#ifdef RTLD_GLOBAL
 
6177
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
6178
#else
 
6179
#  ifdef DL_GLOBAL
 
6180
#    define LT_DLGLOBAL         DL_GLOBAL
 
6181
#  else
 
6182
#    define LT_DLGLOBAL         0
 
6183
#  endif
 
6184
#endif
 
6185
 
 
6186
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
6187
   find out it does not work in some platform. */
 
6188
#ifndef LT_DLLAZY_OR_NOW
 
6189
#  ifdef RTLD_LAZY
 
6190
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
6191
#  else
 
6192
#    ifdef DL_LAZY
 
6193
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
6194
#    else
 
6195
#      ifdef RTLD_NOW
 
6196
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
6197
#      else
 
6198
#        ifdef DL_NOW
 
6199
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
6200
#        else
 
6201
#          define LT_DLLAZY_OR_NOW      0
 
6202
#        endif
 
6203
#      endif
 
6204
#    endif
 
6205
#  endif
 
6206
#endif
 
6207
 
 
6208
#ifdef __cplusplus
 
6209
extern "C" void exit (int);
 
6210
#endif
 
6211
 
 
6212
void fnord() { int i=42;}
 
6213
int main ()
 
6214
{
 
6215
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
6216
  int status = $lt_dlunknown;
 
6217
 
 
6218
  if (self)
 
6219
    {
 
6220
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
6221
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
6222
      /* dlclose (self); */
 
6223
    }
 
6224
 
 
6225
    exit (status);
 
6226
}]
 
6227
EOF
 
6228
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
6229
    (./conftest; exit; ) 2>/dev/null
 
6230
    lt_status=$?
 
6231
    case x$lt_status in
 
6232
      x$lt_dlno_uscore) $1 ;;
 
6233
      x$lt_dlneed_uscore) $2 ;;
 
6234
      x$lt_unknown|x*) $3 ;;
 
6235
    esac
 
6236
  else :
 
6237
    # compilation failed
 
6238
    $3
 
6239
  fi
 
6240
fi
 
6241
rm -fr conftest*
 
6242
])# _LT_AC_TRY_DLOPEN_SELF
 
6243
 
 
6244
 
 
6245
# AC_LIBTOOL_DLOPEN_SELF
 
6246
# -------------------
 
6247
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 
6248
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6249
if test "x$enable_dlopen" != xyes; then
 
6250
  enable_dlopen=unknown
 
6251
  enable_dlopen_self=unknown
 
6252
  enable_dlopen_self_static=unknown
 
6253
else
 
6254
  lt_cv_dlopen=no
 
6255
  lt_cv_dlopen_libs=
 
6256
 
 
6257
  case $host_os in
 
6258
  beos*)
 
6259
    lt_cv_dlopen="load_add_on"
 
6260
    lt_cv_dlopen_libs=
 
6261
    lt_cv_dlopen_self=yes
 
6262
    ;;
 
6263
 
 
6264
  mingw* | pw32*)
 
6265
    lt_cv_dlopen="LoadLibrary"
 
6266
    lt_cv_dlopen_libs=
 
6267
   ;;
 
6268
 
 
6269
  cygwin*)
 
6270
    lt_cv_dlopen="dlopen"
 
6271
    lt_cv_dlopen_libs=
 
6272
   ;;
 
6273
 
 
6274
  darwin*)
 
6275
  # if libdl is installed we need to link against it
 
6276
    AC_CHECK_LIB([dl], [dlopen],
 
6277
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
6278
    lt_cv_dlopen="dyld"
 
6279
    lt_cv_dlopen_libs=
 
6280
    lt_cv_dlopen_self=yes
 
6281
    ])
 
6282
   ;;
 
6283
    
 
6284
  *)
 
6285
    AC_CHECK_FUNC([shl_load],
 
6286
          [lt_cv_dlopen="shl_load"],
 
6287
      [AC_CHECK_LIB([dld], [shl_load],
 
6288
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
6289
        [AC_CHECK_FUNC([dlopen],
 
6290
              [lt_cv_dlopen="dlopen"],
 
6291
          [AC_CHECK_LIB([dl], [dlopen],
 
6292
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
6293
            [AC_CHECK_LIB([svld], [dlopen],
 
6294
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
6295
              [AC_CHECK_LIB([dld], [dld_link],
 
6296
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
6297
              ])
 
6298
            ])
 
6299
          ])
 
6300
        ])
 
6301
      ])
 
6302
    ;;
 
6303
  esac
 
6304
 
 
6305
  if test "x$lt_cv_dlopen" != xno; then
 
6306
    enable_dlopen=yes
 
6307
  else
 
6308
    enable_dlopen=no
 
6309
  fi
 
6310
 
 
6311
  case $lt_cv_dlopen in
 
6312
  dlopen)
 
6313
    save_CPPFLAGS="$CPPFLAGS"
 
6314
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
6315
 
 
6316
    save_LDFLAGS="$LDFLAGS"
 
6317
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
6318
 
 
6319
    save_LIBS="$LIBS"
 
6320
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
6321
 
 
6322
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
6323
          lt_cv_dlopen_self, [dnl
 
6324
          _LT_AC_TRY_DLOPEN_SELF(
 
6325
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
6326
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
6327
    ])
 
6328
 
 
6329
    if test "x$lt_cv_dlopen_self" = xyes; then
 
6330
      LDFLAGS="$LDFLAGS $link_static_flag"
 
6331
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
6332
          lt_cv_dlopen_self_static, [dnl
 
6333
          _LT_AC_TRY_DLOPEN_SELF(
 
6334
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
6335
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
6336
      ])
 
6337
    fi
 
6338
 
 
6339
    CPPFLAGS="$save_CPPFLAGS"
 
6340
    LDFLAGS="$save_LDFLAGS"
 
6341
    LIBS="$save_LIBS"
 
6342
    ;;
 
6343
  esac
 
6344
 
 
6345
  case $lt_cv_dlopen_self in
 
6346
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
6347
  *) enable_dlopen_self=unknown ;;
 
6348
  esac
 
6349
 
 
6350
  case $lt_cv_dlopen_self_static in
 
6351
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
6352
  *) enable_dlopen_self_static=unknown ;;
 
6353
  esac
 
6354
fi
 
6355
])# AC_LIBTOOL_DLOPEN_SELF
 
6356
 
 
6357
 
 
6358
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
6359
# ---------------------------------
 
6360
# Check to see if options -c and -o are simultaneously supported by compiler
 
6361
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
6362
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
6363
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
6364
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
6365
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
6366
   $rm -r conftest 2>/dev/null
 
6367
   mkdir conftest
 
6368
   cd conftest
 
6369
   mkdir out
 
6370
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6371
 
 
6372
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
 
6373
   # that will create temporary files in the current directory regardless of
 
6374
   # the output directory.  Thus, making CWD read-only will cause this test
 
6375
   # to fail, enabling locking or at least warning the user not to do parallel
 
6376
   # builds.
 
6377
   chmod -w .
 
6378
 
 
6379
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
6380
   # Insert the option either (1) after the last *FLAGS variable, or
 
6381
   # (2) before a word containing "conftest.", or (3) at the end.
 
6382
   # Note that $ac_compile itself does not contain backslashes and begins
 
6383
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
6384
   lt_compile=`echo "$ac_compile" | $SED \
 
6385
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
6386
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
6387
   -e 's:$: $lt_compiler_flag:'`
 
6388
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
6389
   (eval "$lt_compile" 2>out/conftest.err)
 
6390
   ac_status=$?
 
6391
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
6392
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
6393
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
6394
   then
 
6395
     # The compiler can only warn and ignore the option if not recognized
 
6396
     # So say no if there are warnings
 
6397
     if test ! -s out/conftest.err; then
 
6398
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
6399
     fi
 
6400
   fi
 
6401
   chmod u+w .
 
6402
   $rm conftest* out/*
 
6403
   rmdir out
 
6404
   cd ..
 
6405
   rmdir conftest
 
6406
   $rm conftest*
 
6407
])
 
6408
])# AC_LIBTOOL_PROG_CC_C_O
 
6409
 
 
6410
 
 
6411
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
6412
# -----------------------------------------
 
6413
# Check to see if we can do hard links to lock some files if needed
 
6414
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
6415
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
6416
 
 
6417
hard_links="nottested"
 
6418
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
6419
  # do not overwrite the value of need_locks provided by the user
 
6420
  AC_MSG_CHECKING([if we can lock with hard links])
 
6421
  hard_links=yes
 
6422
  $rm conftest*
 
6423
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
6424
  touch conftest.a
 
6425
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
6426
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
6427
  AC_MSG_RESULT([$hard_links])
 
6428
  if test "$hard_links" = no; then
 
6429
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
6430
    need_locks=warn
 
6431
  fi
 
6432
else
 
6433
  need_locks=no
 
6434
fi
 
6435
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
6436
 
 
6437
 
 
6438
# AC_LIBTOOL_OBJDIR
 
6439
# -----------------
 
6440
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
6441
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
6442
[rm -f .libs 2>/dev/null
 
6443
mkdir .libs 2>/dev/null
 
6444
if test -d .libs; then
 
6445
  lt_cv_objdir=.libs
 
6446
else
 
6447
  # MS-DOS does not allow filenames that begin with a dot.
 
6448
  lt_cv_objdir=_libs
 
6449
fi
 
6450
rmdir .libs 2>/dev/null])
 
6451
objdir=$lt_cv_objdir
 
6452
])# AC_LIBTOOL_OBJDIR
 
6453
 
 
6454
 
 
6455
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
6456
# ----------------------------------------------
 
6457
# Check hardcoding attributes.
 
6458
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
6459
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
6460
_LT_AC_TAGVAR(hardcode_action, $1)=
 
6461
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
6462
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
 
6463
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
 
6464
 
 
6465
  # We can hardcode non-existant directories.
 
6466
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
 
6467
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
6468
     # have to relink, otherwise we might link with an installed library
 
6469
     # when we should be linking with a yet-to-be-installed one
 
6470
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
6471
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
 
6472
    # Linking always hardcodes the temporary library directory.
 
6473
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
 
6474
  else
 
6475
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
6476
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
 
6477
  fi
 
6478
else
 
6479
  # We cannot hardcode anything, or else we can only hardcode existing
 
6480
  # directories.
 
6481
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
6482
fi
 
6483
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
6484
 
 
6485
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
6486
  # Fast installation is not supported
 
6487
  enable_fast_install=no
 
6488
elif test "$shlibpath_overrides_runpath" = yes ||
 
6489
     test "$enable_shared" = no; then
 
6490
  # Fast installation is not necessary
 
6491
  enable_fast_install=needless
 
6492
fi
 
6493
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
6494
 
 
6495
 
 
6496
# AC_LIBTOOL_SYS_LIB_STRIP
 
6497
# ------------------------
 
6498
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
6499
[striplib=
 
6500
old_striplib=
 
6501
AC_MSG_CHECKING([whether stripping libraries is possible])
 
6502
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 
6503
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
6504
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
6505
  AC_MSG_RESULT([yes])
 
6506
else
 
6507
# FIXME - insert some real tests, host_os isn't really good enough
 
6508
  case $host_os in
 
6509
   darwin*)
 
6510
       if test -n "$STRIP" ; then
 
6511
         striplib="$STRIP -x"
 
6512
         AC_MSG_RESULT([yes])
 
6513
       else
 
6514
  AC_MSG_RESULT([no])
 
6515
fi
 
6516
       ;;
 
6517
   *)
 
6518
  AC_MSG_RESULT([no])
 
6519
    ;;
 
6520
  esac  
 
6521
fi
 
6522
])# AC_LIBTOOL_SYS_LIB_STRIP
 
6523
 
 
6524
 
 
6525
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
6526
# -----------------------------
 
6527
# PORTME Fill in your ld.so characteristics
 
6528
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
6529
[AC_MSG_CHECKING([dynamic linker characteristics])
 
6530
library_names_spec=
 
6531
libname_spec='lib$name'
 
6532
soname_spec=
 
6533
shrext=".so"
 
6534
postinstall_cmds=
 
6535
postuninstall_cmds=
 
6536
finish_cmds=
 
6537
finish_eval=
 
6538
shlibpath_var=
 
6539
shlibpath_overrides_runpath=unknown
 
6540
version_type=none
 
6541
dynamic_linker="$host_os ld.so"
 
6542
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
6543
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
6544
need_lib_prefix=unknown
 
6545
hardcode_into_libs=no
 
6546
 
 
6547
# when you set need_version to no, make sure it does not cause -set_version
 
6548
# flags to be left without arguments
 
6549
need_version=unknown
 
6550
 
 
6551
case $host_os in
 
6552
aix3*)
 
6553
  version_type=linux
 
6554
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
6555
  shlibpath_var=LIBPATH
 
6556
 
 
6557
  # AIX 3 has no versioning support, so we append a major version to the name.
 
6558
  soname_spec='${libname}${release}${shared_ext}$major'
 
6559
  ;;
 
6560
 
 
6561
aix4* | aix5*)
 
6562
  version_type=linux
 
6563
  need_lib_prefix=no
 
6564
  need_version=no
 
6565
  hardcode_into_libs=yes
 
6566
  if test "$host_cpu" = ia64; then
 
6567
    # AIX 5 supports IA64
 
6568
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
6569
    shlibpath_var=LD_LIBRARY_PATH
 
6570
  else
 
6571
    # With GCC up to 2.95.x, collect2 would create an import file
 
6572
    # for dependence libraries.  The import file would start with
 
6573
    # the line `#! .'.  This would cause the generated library to
 
6574
    # depend on `.', always an invalid library.  This was fixed in
 
6575
    # development snapshots of GCC prior to 3.0.
 
6576
    case $host_os in
 
6577
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
6578
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
6579
           echo ' yes '
 
6580
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
6581
        :
 
6582
      else
 
6583
        can_build_shared=no
 
6584
      fi
 
6585
      ;;
 
6586
    esac
 
6587
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
6588
    # soname into executable. Probably we can add versioning support to
 
6589
    # collect2, so additional links can be useful in future.
 
6590
    if test "$aix_use_runtimelinking" = yes; then
 
6591
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
6592
      # instead of lib<name>.a to let people know that these are not
 
6593
      # typical AIX shared libraries.
 
6594
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6595
    else
 
6596
      # We preserve .a as extension for shared libraries through AIX4.2
 
6597
      # and later when we are not doing run time linking.
 
6598
      library_names_spec='${libname}${release}.a $libname.a'
 
6599
      soname_spec='${libname}${release}${shared_ext}$major'
 
6600
    fi
 
6601
    shlibpath_var=LIBPATH
 
6602
  fi
 
6603
  ;;
 
6604
 
 
6605
amigaos*)
 
6606
  library_names_spec='$libname.ixlibrary $libname.a'
 
6607
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
6608
  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'
 
6609
  ;;
 
6610
 
 
6611
beos*)
 
6612
  library_names_spec='${libname}${shared_ext}'
 
6613
  dynamic_linker="$host_os ld.so"
 
6614
  shlibpath_var=LIBRARY_PATH
 
6615
  ;;
 
6616
 
 
6617
bsdi4*)
 
6618
  version_type=linux
 
6619
  need_version=no
 
6620
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6621
  soname_spec='${libname}${release}${shared_ext}$major'
 
6622
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
6623
  shlibpath_var=LD_LIBRARY_PATH
 
6624
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
6625
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
6626
  # the default ld.so.conf also contains /usr/contrib/lib and
 
6627
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
6628
  # libtool to hard-code these into programs
 
6629
  ;;
 
6630
 
 
6631
cygwin* | mingw* | pw32*)
 
6632
  version_type=windows
 
6633
  shrext=".dll"
 
6634
  need_version=no
 
6635
  need_lib_prefix=no
 
6636
 
 
6637
  case $GCC,$host_os in
 
6638
  yes,cygwin* | yes,mingw* | yes,pw32*)
 
6639
    library_names_spec='$libname.dll.a'
 
6640
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
6641
    postinstall_cmds='base_file=`basename \${file}`~
 
6642
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
 
6643
      dldir=$destdir/`dirname \$dlpath`~
 
6644
      test -d \$dldir || mkdir -p \$dldir~
 
6645
      $install_prog $dir/$dlname \$dldir/$dlname'
 
6646
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
6647
      dlpath=$dir/\$dldll~
 
6648
       $rm \$dlpath'
 
6649
    shlibpath_overrides_runpath=yes
 
6650
 
 
6651
    case $host_os in
 
6652
    cygwin*)
 
6653
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
6654
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
6655
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
6656
      ;;
 
6657
    mingw*)
 
6658
      # MinGW DLLs use traditional 'lib' prefix
 
6659
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
6660
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
6661
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
 
6662
        # It is most probably a Windows format PATH printed by
 
6663
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
6664
        # path with ; separators, and with drive letters. We can handle the
 
6665
        # drive letters (cygwin fileutils understands them), so leave them,
 
6666
        # especially as we might pass files found there to a mingw objdump,
 
6667
        # which wouldn't understand a cygwinified path. Ahh.
 
6668
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
6669
      else
 
6670
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
6671
      fi
 
6672
      ;;
 
6673
    pw32*)
 
6674
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
6675
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
6676
      ;;
 
6677
    esac
 
6678
    ;;
 
6679
 
 
6680
  *)
 
6681
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
6682
    ;;
 
6683
  esac
 
6684
  dynamic_linker='Win32 ld.exe'
 
6685
  # FIXME: first we should search . and the directory the executable is in
 
6686
  shlibpath_var=PATH
 
6687
  ;;
 
6688
 
 
6689
darwin* | rhapsody*)
 
6690
  dynamic_linker="$host_os dyld"
 
6691
  version_type=darwin
 
6692
  need_lib_prefix=no
 
6693
  need_version=no
 
6694
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
6695
  soname_spec='${libname}${release}${major}$shared_ext'
 
6696
  shlibpath_overrides_runpath=yes
 
6697
  shlibpath_var=DYLD_LIBRARY_PATH
 
6698
  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
 
6699
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 
6700
  if test "$GCC" = yes; then
 
6701
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
 
6702
  else
 
6703
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 
6704
  fi
 
6705
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
6706
  ;;
 
6707
 
 
6708
dgux*)
 
6709
  version_type=linux
 
6710
  need_lib_prefix=no
 
6711
  need_version=no
 
6712
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
6713
  soname_spec='${libname}${release}${shared_ext}$major'
 
6714
  shlibpath_var=LD_LIBRARY_PATH
 
6715
  ;;
 
6716
 
 
6717
freebsd1*)
 
6718
  dynamic_linker=no
 
6719
  ;;
 
6720
 
 
6721
freebsd*-gnu*)
 
6722
  version_type=linux
 
6723
  need_lib_prefix=no
 
6724
  need_version=no
 
6725
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
6726
  soname_spec='${libname}${release}${shared_ext}$major'
 
6727
  shlibpath_var=LD_LIBRARY_PATH
 
6728
  shlibpath_overrides_runpath=no
 
6729
  hardcode_into_libs=yes
 
6730
  dynamic_linker='GNU ld.so'
 
6731
  ;;
 
6732
 
 
6733
freebsd*)
 
6734
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
6735
  version_type=freebsd-$objformat
 
6736
  case $version_type in
 
6737
    freebsd-elf*)
 
6738
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
6739
      need_version=no
 
6740
      need_lib_prefix=no
 
6741
      ;;
 
6742
    freebsd-*)
 
6743
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
6744
      need_version=yes
 
6745
      ;;
 
6746
  esac
 
6747
  shlibpath_var=LD_LIBRARY_PATH
 
6748
  case $host_os in
 
6749
  freebsd2*)
 
6750
    shlibpath_overrides_runpath=yes
 
6751
    ;;
 
6752
  freebsd3.[01]* | freebsdelf3.[01]*)
 
6753
    shlibpath_overrides_runpath=yes
 
6754
    hardcode_into_libs=yes
 
6755
    ;;
 
6756
  *) # from 3.2 on
 
6757
    shlibpath_overrides_runpath=no
 
6758
    hardcode_into_libs=yes
 
6759
    ;;
 
6760
  esac
 
6761
  ;;
 
6762
 
 
6763
gnu*)
 
6764
  version_type=linux
 
6765
  need_lib_prefix=no
 
6766
  need_version=no
 
6767
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
6768
  soname_spec='${libname}${release}${shared_ext}$major'
 
6769
  shlibpath_var=LD_LIBRARY_PATH
 
6770
  hardcode_into_libs=yes
 
6771
  ;;
 
6772
 
 
6773
hpux9* | hpux10* | hpux11*)
 
6774
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
6775
  # link against other versions.
 
6776
  version_type=sunos
 
6777
  need_lib_prefix=no
 
6778
  need_version=no
 
6779
  case "$host_cpu" in
 
6780
  ia64*)
 
6781
    shrext='.so'
 
6782
    hardcode_into_libs=yes
 
6783
    dynamic_linker="$host_os dld.so"
 
6784
    shlibpath_var=LD_LIBRARY_PATH
 
6785
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
6786
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6787
    soname_spec='${libname}${release}${shared_ext}$major'
 
6788
    if test "X$HPUX_IA64_MODE" = X32; then
 
6789
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
6790
    else
 
6791
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
6792
    fi
 
6793
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
6794
    ;;
 
6795
   hppa*64*)
 
6796
     shrext='.sl'
 
6797
     hardcode_into_libs=yes
 
6798
     dynamic_linker="$host_os dld.sl"
 
6799
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
6800
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
6801
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6802
     soname_spec='${libname}${release}${shared_ext}$major'
 
6803
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
6804
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
6805
     ;;
 
6806
   *)
 
6807
    shrext='.sl'
 
6808
    dynamic_linker="$host_os dld.sl"
 
6809
    shlibpath_var=SHLIB_PATH
 
6810
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
6811
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6812
    soname_spec='${libname}${release}${shared_ext}$major'
 
6813
    ;;
 
6814
  esac
 
6815
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
6816
  postinstall_cmds='chmod 555 $lib'
 
6817
  ;;
 
6818
 
 
6819
irix5* | irix6* | nonstopux*)
 
6820
  case $host_os in
 
6821
    nonstopux*) version_type=nonstopux ;;
 
6822
    *)
 
6823
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
6824
                version_type=linux
 
6825
        else
 
6826
                version_type=irix
 
6827
        fi ;;
 
6828
  esac
 
6829
  need_lib_prefix=no
 
6830
  need_version=no
 
6831
  soname_spec='${libname}${release}${shared_ext}$major'
 
6832
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
6833
  case $host_os in
 
6834
  irix5* | nonstopux*)
 
6835
    libsuff= shlibsuff=
 
6836
    ;;
 
6837
  *)
 
6838
    case $LD in # libtool.m4 will add one of these switches to LD
 
6839
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
6840
      libsuff= shlibsuff= libmagic=32-bit;;
 
6841
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
6842
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
6843
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
6844
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
6845
    *) libsuff= shlibsuff= libmagic=never-match;;
 
6846
    esac
 
6847
    ;;
 
6848
  esac
 
6849
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
6850
  shlibpath_overrides_runpath=no
 
6851
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
6852
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
6853
  hardcode_into_libs=yes
 
6854
  ;;
 
6855
 
 
6856
# No shared lib support for Linux oldld, aout, or coff.
 
6857
linux*oldld* | linux*aout* | linux*coff*)
 
6858
  dynamic_linker=no
 
6859
  ;;
 
6860
 
 
6861
# This must be Linux ELF.
 
6862
linux*)
 
6863
  version_type=linux
 
6864
  need_lib_prefix=no
 
6865
  need_version=no
 
6866
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6867
  soname_spec='${libname}${release}${shared_ext}$major'
 
6868
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
6869
  libsuff=
 
6870
  if test "x$LINUX_64_MODE" = x64; then
 
6871
    # Some platforms are per default 64-bit, so there's no /lib64
 
6872
    if test -d /lib64; then
 
6873
      libsuff=64
 
6874
    fi
 
6875
  fi
 
6876
  shlibpath_var=LD_LIBRARY_PATH
 
6877
  shlibpath_overrides_runpath=no
 
6878
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
 
6879
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
 
6880
  # This implies no fast_install, which is unacceptable.
 
6881
  # Some rework will be needed to allow for fast_install
 
6882
  # before this can be enabled.
 
6883
  hardcode_into_libs=yes
 
6884
 
 
6885
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
6886
  # powerpc, because MkLinux only supported shared libraries with the
 
6887
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
6888
  # most powerpc-linux boxes support dynamic linking these days and
 
6889
  # people can always --disable-shared, the test was removed, and we
 
6890
  # assume the GNU/Linux dynamic linker is in use.
 
6891
  dynamic_linker='GNU/Linux ld.so'
 
6892
  ;;
 
6893
 
 
6894
netbsd*)
 
6895
  version_type=sunos
 
6896
  need_lib_prefix=no
 
6897
  need_version=no
 
6898
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
6899
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
6900
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
6901
    dynamic_linker='NetBSD (a.out) ld.so'
 
6902
  else
 
6903
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
 
6904
    soname_spec='${libname}${release}${shared_ext}$major'
 
6905
    dynamic_linker='NetBSD ld.elf_so'
 
6906
  fi
 
6907
  shlibpath_var=LD_LIBRARY_PATH
 
6908
  shlibpath_overrides_runpath=yes
 
6909
  hardcode_into_libs=yes
 
6910
  ;;
 
6911
 
 
6912
newsos6)
 
6913
  version_type=linux
 
6914
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6915
  shlibpath_var=LD_LIBRARY_PATH
 
6916
  shlibpath_overrides_runpath=yes
 
6917
  ;;
 
6918
 
 
6919
nto-qnx*)
 
6920
  version_type=linux
 
6921
  need_lib_prefix=no
 
6922
  need_version=no
 
6923
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6924
  soname_spec='${libname}${release}${shared_ext}$major'
 
6925
  shlibpath_var=LD_LIBRARY_PATH
 
6926
  shlibpath_overrides_runpath=yes
 
6927
  ;;
 
6928
 
 
6929
openbsd*)
 
6930
  version_type=sunos
 
6931
  need_lib_prefix=no
 
6932
  need_version=no
 
6933
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
6934
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
6935
  shlibpath_var=LD_LIBRARY_PATH
 
6936
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6937
    case $host_os in
 
6938
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
6939
        shlibpath_overrides_runpath=no
 
6940
        ;;
 
6941
      *)
 
6942
        shlibpath_overrides_runpath=yes
 
6943
        ;;
 
6944
      esac
 
6945
  else
 
6946
    shlibpath_overrides_runpath=yes
 
6947
  fi
 
6948
  ;;
 
6949
 
 
6950
os2*)
 
6951
  libname_spec='$name'
 
6952
  shrext=".dll"
 
6953
  need_lib_prefix=no
 
6954
  library_names_spec='$libname${shared_ext} $libname.a'
 
6955
  dynamic_linker='OS/2 ld.exe'
 
6956
  shlibpath_var=LIBPATH
 
6957
  ;;
 
6958
 
 
6959
osf3* | osf4* | osf5*)
 
6960
  version_type=osf
 
6961
  need_lib_prefix=no
 
6962
  need_version=no
 
6963
  soname_spec='${libname}${release}${shared_ext}$major'
 
6964
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6965
  shlibpath_var=LD_LIBRARY_PATH
 
6966
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
6967
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
6968
  ;;
 
6969
 
 
6970
sco3.2v5*)
 
6971
  version_type=osf
 
6972
  soname_spec='${libname}${release}${shared_ext}$major'
 
6973
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6974
  shlibpath_var=LD_LIBRARY_PATH
 
6975
  ;;
 
6976
 
 
6977
solaris*)
 
6978
  version_type=linux
 
6979
  need_lib_prefix=no
 
6980
  need_version=no
 
6981
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6982
  soname_spec='${libname}${release}${shared_ext}$major'
 
6983
  shlibpath_var=LD_LIBRARY_PATH
 
6984
  shlibpath_overrides_runpath=yes
 
6985
  hardcode_into_libs=yes
 
6986
  # ldd complains unless libraries are executable
 
6987
  postinstall_cmds='chmod +x $lib'
 
6988
  ;;
 
6989
 
 
6990
sunos4*)
 
6991
  version_type=sunos
 
6992
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
6993
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
6994
  shlibpath_var=LD_LIBRARY_PATH
 
6995
  shlibpath_overrides_runpath=yes
 
6996
  if test "$with_gnu_ld" = yes; then
 
6997
    need_lib_prefix=no
 
6998
  fi
 
6999
  need_version=yes
 
7000
  ;;
 
7001
 
 
7002
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
7003
  version_type=linux
 
7004
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7005
  soname_spec='${libname}${release}${shared_ext}$major'
 
7006
  shlibpath_var=LD_LIBRARY_PATH
 
7007
  case $host_vendor in
 
7008
    sni)
 
7009
      shlibpath_overrides_runpath=no
 
7010
      need_lib_prefix=no
 
7011
      export_dynamic_flag_spec='${wl}-Blargedynsym'
 
7012
      runpath_var=LD_RUN_PATH
 
7013
      ;;
 
7014
    siemens)
 
7015
      need_lib_prefix=no
 
7016
      ;;
 
7017
    motorola)
 
7018
      need_lib_prefix=no
 
7019
      need_version=no
 
7020
      shlibpath_overrides_runpath=no
 
7021
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
7022
      ;;
 
7023
  esac
 
7024
  ;;
 
7025
 
 
7026
sysv4*MP*)
 
7027
  if test -d /usr/nec ;then
 
7028
    version_type=linux
 
7029
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
7030
    soname_spec='$libname${shared_ext}.$major'
 
7031
    shlibpath_var=LD_LIBRARY_PATH
 
7032
  fi
 
7033
  ;;
 
7034
 
 
7035
uts4*)
 
7036
  version_type=linux
 
7037
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7038
  soname_spec='${libname}${release}${shared_ext}$major'
 
7039
  shlibpath_var=LD_LIBRARY_PATH
 
7040
  ;;
 
7041
 
 
7042
*)
 
7043
  dynamic_linker=no
 
7044
  ;;
 
7045
esac
 
7046
AC_MSG_RESULT([$dynamic_linker])
 
7047
test "$dynamic_linker" = no && can_build_shared=no
 
7048
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
7049
 
 
7050
 
 
7051
# _LT_AC_TAGCONFIG
 
7052
# ----------------
 
7053
AC_DEFUN([_LT_AC_TAGCONFIG],
 
7054
[AC_ARG_WITH([tags],
 
7055
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
 
7056
        [include additional configurations @<:@automatic@:>@])],
 
7057
    [tagnames="$withval"])
 
7058
 
 
7059
if test -f "$ltmain" && test -n "$tagnames"; then
 
7060
  if test ! -f "${ofile}"; then
 
7061
    AC_MSG_WARN([output file `$ofile' does not exist])
 
7062
  fi
 
7063
 
 
7064
  if test -z "$LTCC"; then
 
7065
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
7066
    if test -z "$LTCC"; then
 
7067
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
 
7068
    else
 
7069
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
7070
    fi
 
7071
  fi
 
7072
 
 
7073
  # Extract list of available tagged configurations in $ofile.
 
7074
  # Note that this assumes the entire list is on one line.
 
7075
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
7076
 
 
7077
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7078
  for tagname in $tagnames; do
 
7079
    IFS="$lt_save_ifs"
 
7080
    # Check whether tagname contains only valid characters
 
7081
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
7082
    "") ;;
 
7083
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
7084
        ;;
 
7085
    esac
 
7086
 
 
7087
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
7088
    then
 
7089
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
7090
    fi
 
7091
 
 
7092
    # Update the list of available tags.
 
7093
    if test -n "$tagname"; then
 
7094
      echo appending configuration tag \"$tagname\" to $ofile
 
7095
 
 
7096
      case $tagname in
 
7097
      CXX)
 
7098
        if test -n "$CXX" && test "X$CXX" != "Xno"; then
 
7099
          AC_LIBTOOL_LANG_CXX_CONFIG
 
7100
        else
 
7101
          tagname=""
 
7102
        fi
 
7103
        ;;
 
7104
 
 
7105
      F77)
 
7106
        if test -n "$F77" && test "X$F77" != "Xno"; then
 
7107
          AC_LIBTOOL_LANG_F77_CONFIG
 
7108
        else
 
7109
          tagname=""
 
7110
        fi
 
7111
        ;;
 
7112
 
 
7113
      GCJ)
 
7114
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
7115
          AC_LIBTOOL_LANG_GCJ_CONFIG
 
7116
        else
 
7117
          tagname=""
 
7118
        fi
 
7119
        ;;
 
7120
 
 
7121
      RC)
 
7122
        AC_LIBTOOL_LANG_RC_CONFIG
 
7123
        ;;
 
7124
 
 
7125
      *)
 
7126
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
7127
        ;;
 
7128
      esac
 
7129
 
 
7130
      # Append the new tag name to the list of available tags.
 
7131
      if test -n "$tagname" ; then
 
7132
      available_tags="$available_tags $tagname"
 
7133
    fi
 
7134
    fi
 
7135
  done
 
7136
  IFS="$lt_save_ifs"
 
7137
 
 
7138
  # Now substitute the updated list of available tags.
 
7139
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
7140
    mv "${ofile}T" "$ofile"
 
7141
    chmod +x "$ofile"
 
7142
  else
 
7143
    rm -f "${ofile}T"
 
7144
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
7145
  fi
 
7146
fi
 
7147
])# _LT_AC_TAGCONFIG
 
7148
 
 
7149
 
 
7150
# AC_LIBTOOL_DLOPEN
 
7151
# -----------------
 
7152
# enable checks for dlopen support
 
7153
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
7154
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
7155
])# AC_LIBTOOL_DLOPEN
 
7156
 
 
7157
 
 
7158
# AC_LIBTOOL_WIN32_DLL
 
7159
# --------------------
 
7160
# declare package support for building win32 dll's
 
7161
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
7162
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
7163
])# AC_LIBTOOL_WIN32_DLL
 
7164
 
 
7165
 
 
7166
# AC_ENABLE_SHARED([DEFAULT])
 
7167
# ---------------------------
 
7168
# implement the --enable-shared flag
 
7169
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
4349
7170
AC_DEFUN([AC_ENABLE_SHARED],
4350
7171
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
4351
 
AC_ARG_ENABLE(shared,
4352
 
changequote(<<, >>)dnl
4353
 
<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
4354
 
changequote([, ])dnl
4355
 
[p=${PACKAGE-default}
4356
 
case $enableval in
4357
 
yes) enable_shared=yes ;;
4358
 
no) enable_shared=no ;;
4359
 
*)
4360
 
  enable_shared=no
4361
 
  # Look at the argument we got.  We use all the common list separators.
4362
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4363
 
  for pkg in $enableval; do
4364
 
    if test "X$pkg" = "X$p"; then
4365
 
      enable_shared=yes
4366
 
    fi
4367
 
  done
4368
 
  IFS="$ac_save_ifs"
4369
 
  ;;
4370
 
esac],
4371
 
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
4372
 
])
4373
 
 
4374
 
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
4375
 
AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4376
 
AC_ENABLE_SHARED(no)])
4377
 
 
4378
 
# AC_ENABLE_STATIC - implement the --enable-static flag
4379
 
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
4380
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
4381
 
#   `yes'.
 
7172
AC_ARG_ENABLE([shared],
 
7173
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
7174
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
7175
    [p=${PACKAGE-default}
 
7176
    case $enableval in
 
7177
    yes) enable_shared=yes ;;
 
7178
    no) enable_shared=no ;;
 
7179
    *)
 
7180
      enable_shared=no
 
7181
      # Look at the argument we got.  We use all the common list separators.
 
7182
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7183
      for pkg in $enableval; do
 
7184
        IFS="$lt_save_ifs"
 
7185
        if test "X$pkg" = "X$p"; then
 
7186
          enable_shared=yes
 
7187
        fi
 
7188
      done
 
7189
      IFS="$lt_save_ifs"
 
7190
      ;;
 
7191
    esac],
 
7192
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
7193
])# AC_ENABLE_SHARED
 
7194
 
 
7195
 
 
7196
# AC_DISABLE_SHARED
 
7197
# -----------------
 
7198
#- set the default shared flag to --disable-shared
 
7199
AC_DEFUN([AC_DISABLE_SHARED],
 
7200
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7201
AC_ENABLE_SHARED(no)
 
7202
])# AC_DISABLE_SHARED
 
7203
 
 
7204
 
 
7205
# AC_ENABLE_STATIC([DEFAULT])
 
7206
# ---------------------------
 
7207
# implement the --enable-static flag
 
7208
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
4382
7209
AC_DEFUN([AC_ENABLE_STATIC],
4383
7210
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4384
 
AC_ARG_ENABLE(static,
4385
 
changequote(<<, >>)dnl
4386
 
<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
4387
 
changequote([, ])dnl
4388
 
[p=${PACKAGE-default}
4389
 
case $enableval in
4390
 
yes) enable_static=yes ;;
4391
 
no) enable_static=no ;;
4392
 
*)
4393
 
  enable_static=no
4394
 
  # Look at the argument we got.  We use all the common list separators.
4395
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4396
 
  for pkg in $enableval; do
4397
 
    if test "X$pkg" = "X$p"; then
4398
 
      enable_static=yes
4399
 
    fi
4400
 
  done
4401
 
  IFS="$ac_save_ifs"
4402
 
  ;;
4403
 
esac],
4404
 
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
4405
 
])
4406
 
 
4407
 
# AC_DISABLE_STATIC - set the default static flag to --disable-static
 
7211
AC_ARG_ENABLE([static],
 
7212
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
7213
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
7214
    [p=${PACKAGE-default}
 
7215
    case $enableval in
 
7216
    yes) enable_static=yes ;;
 
7217
    no) enable_static=no ;;
 
7218
    *)
 
7219
     enable_static=no
 
7220
      # Look at the argument we got.  We use all the common list separators.
 
7221
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7222
      for pkg in $enableval; do
 
7223
        IFS="$lt_save_ifs"
 
7224
        if test "X$pkg" = "X$p"; then
 
7225
          enable_static=yes
 
7226
        fi
 
7227
      done
 
7228
      IFS="$lt_save_ifs"
 
7229
      ;;
 
7230
    esac],
 
7231
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
7232
])# AC_ENABLE_STATIC
 
7233
 
 
7234
 
 
7235
# AC_DISABLE_STATIC
 
7236
# -----------------
 
7237
# set the default static flag to --disable-static
4408
7238
AC_DEFUN([AC_DISABLE_STATIC],
4409
7239
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4410
 
AC_ENABLE_STATIC(no)])
4411
 
 
4412
 
 
4413
 
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
4414
 
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4415
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
4416
 
#   `yes'.
 
7240
AC_ENABLE_STATIC(no)
 
7241
])# AC_DISABLE_STATIC
 
7242
 
 
7243
 
 
7244
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
7245
# ---------------------------------
 
7246
# implement the --enable-fast-install flag
 
7247
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
4417
7248
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4418
7249
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4419
 
AC_ARG_ENABLE(fast-install,
4420
 
changequote(<<, >>)dnl
4421
 
<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4422
 
changequote([, ])dnl
4423
 
[p=${PACKAGE-default}
4424
 
case $enableval in
4425
 
yes) enable_fast_install=yes ;;
4426
 
no) enable_fast_install=no ;;
4427
 
*)
4428
 
  enable_fast_install=no
4429
 
  # Look at the argument we got.  We use all the common list separators.
4430
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4431
 
  for pkg in $enableval; do
4432
 
    if test "X$pkg" = "X$p"; then
4433
 
      enable_fast_install=yes
4434
 
    fi
4435
 
  done
4436
 
  IFS="$ac_save_ifs"
4437
 
  ;;
4438
 
esac],
4439
 
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4440
 
])
4441
 
 
4442
 
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
 
7250
AC_ARG_ENABLE([fast-install],
 
7251
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
7252
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
7253
    [p=${PACKAGE-default}
 
7254
    case $enableval in
 
7255
    yes) enable_fast_install=yes ;;
 
7256
    no) enable_fast_install=no ;;
 
7257
    *)
 
7258
      enable_fast_install=no
 
7259
      # Look at the argument we got.  We use all the common list separators.
 
7260
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7261
      for pkg in $enableval; do
 
7262
        IFS="$lt_save_ifs"
 
7263
        if test "X$pkg" = "X$p"; then
 
7264
          enable_fast_install=yes
 
7265
        fi
 
7266
      done
 
7267
      IFS="$lt_save_ifs"
 
7268
      ;;
 
7269
    esac],
 
7270
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
7271
])# AC_ENABLE_FAST_INSTALL
 
7272
 
 
7273
 
 
7274
# AC_DISABLE_FAST_INSTALL
 
7275
# -----------------------
 
7276
# set the default to --disable-fast-install
4443
7277
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4444
7278
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4445
 
AC_ENABLE_FAST_INSTALL(no)])
4446
 
 
4447
 
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
4448
 
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
4449
 
#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
4450
 
#   `both'.
 
7279
AC_ENABLE_FAST_INSTALL(no)
 
7280
])# AC_DISABLE_FAST_INSTALL
 
7281
 
 
7282
 
 
7283
# AC_LIBTOOL_PICMODE([MODE])
 
7284
# --------------------------
 
7285
# implement the --with-pic flag
 
7286
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
4451
7287
AC_DEFUN([AC_LIBTOOL_PICMODE],
4452
7288
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4453
 
pic_mode=ifelse($#,1,$1,default)])
4454
 
 
4455
 
 
4456
 
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
 
7289
pic_mode=ifelse($#,1,$1,default)
 
7290
])# AC_LIBTOOL_PICMODE
 
7291
 
 
7292
 
 
7293
# AC_PROG_EGREP
 
7294
# -------------
 
7295
# This is predefined starting with Autoconf 2.54, so this conditional
 
7296
# definition can be removed once we require Autoconf 2.54 or later.
 
7297
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 
7298
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 
7299
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
7300
    then ac_cv_prog_egrep='grep -E'
 
7301
    else ac_cv_prog_egrep='egrep'
 
7302
    fi])
 
7303
 EGREP=$ac_cv_prog_egrep
 
7304
 AC_SUBST([EGREP])
 
7305
])])
 
7306
 
 
7307
 
 
7308
# AC_PATH_TOOL_PREFIX
 
7309
# -------------------
 
7310
# find a file program which can recognise shared library
4457
7311
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4458
 
[AC_MSG_CHECKING([for $1])
 
7312
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
7313
AC_MSG_CHECKING([for $1])
4459
7314
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4460
7315
[case $MAGIC_CMD in
4461
 
  /*)
 
7316
[[\\/*] |  ?:[\\/]*])
4462
7317
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4463
7318
  ;;
4464
 
  ?:/*)
4465
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4466
 
  ;;
4467
 
  *)
4468
 
  ac_save_MAGIC_CMD="$MAGIC_CMD"
4469
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
7319
*)
 
7320
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
7321
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4470
7322
dnl $ac_dummy forces splitting on constant user-supplied paths.
4471
7323
dnl POSIX.2 word splitting is done only on the output of word expansions,
4472
7324
dnl not every word.  This closes a longstanding sh security hole.
4473
7325
  ac_dummy="ifelse([$2], , $PATH, [$2])"
4474
7326
  for ac_dir in $ac_dummy; do
 
7327
    IFS="$lt_save_ifs"
4475
7328
    test -z "$ac_dir" && ac_dir=.
4476
7329
    if test -f $ac_dir/$1; then
4477
7330
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4481
7334
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4482
7335
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4483
7336
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4484
 
            egrep "$file_magic_regex" > /dev/null; then
 
7337
            $EGREP "$file_magic_regex" > /dev/null; then
4485
7338
            :
4486
7339
          else
4487
7340
            cat <<EOF 1>&2
4502
7355
      break
4503
7356
    fi
4504
7357
  done
4505
 
  IFS="$ac_save_ifs"
4506
 
  MAGIC_CMD="$ac_save_MAGIC_CMD"
 
7358
  IFS="$lt_save_ifs"
 
7359
  MAGIC_CMD="$lt_save_MAGIC_CMD"
4507
7360
  ;;
4508
7361
esac])
4509
7362
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4512
7365
else
4513
7366
  AC_MSG_RESULT(no)
4514
7367
fi
4515
 
])
4516
 
 
4517
 
 
4518
 
# AC_PATH_MAGIC - find a file program which can recognise a shared library
 
7368
])# AC_PATH_TOOL_PREFIX
 
7369
 
 
7370
 
 
7371
# AC_PATH_MAGIC
 
7372
# -------------
 
7373
# find a file program which can recognise a shared library
4519
7374
AC_DEFUN([AC_PATH_MAGIC],
4520
 
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4521
 
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
 
7375
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4522
7376
if test -z "$lt_cv_path_MAGIC_CMD"; then
4523
7377
  if test -n "$ac_tool_prefix"; then
4524
 
    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
 
7378
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4525
7379
  else
4526
7380
    MAGIC_CMD=:
4527
7381
  fi
4528
7382
fi
4529
 
])
4530
 
 
4531
 
 
4532
 
# AC_PROG_LD - find the path to the GNU or non-GNU linker
 
7383
])# AC_PATH_MAGIC
 
7384
 
 
7385
 
 
7386
# AC_PROG_LD
 
7387
# ----------
 
7388
# find the pathname to the GNU or non-GNU linker
4533
7389
AC_DEFUN([AC_PROG_LD],
4534
 
[AC_ARG_WITH(gnu-ld,
4535
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
4536
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
7390
[AC_ARG_WITH([gnu-ld],
 
7391
    [AC_HELP_STRING([--with-gnu-ld],
 
7392
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
7393
    [test "$withval" = no || with_gnu_ld=yes],
 
7394
    [with_gnu_ld=no])
 
7395
AC_REQUIRE([LT_AC_PROG_SED])dnl
4537
7396
AC_REQUIRE([AC_PROG_CC])dnl
4538
7397
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4539
7398
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4540
7399
ac_prog=ld
4541
7400
if test "$GCC" = yes; then
4542
7401
  # Check if gcc -print-prog-name=ld gives a path.
4543
 
  AC_MSG_CHECKING([for ld used by GCC])
 
7402
  AC_MSG_CHECKING([for ld used by $CC])
4544
7403
  case $host in
4545
7404
  *-*-mingw*)
4546
7405
    # gcc leaves a trailing carriage return which upsets mingw
4550
7409
  esac
4551
7410
  case $ac_prog in
4552
7411
    # Accept absolute paths.
4553
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
4554
 
      re_direlt=['/[^/][^/]*/\.\./']
4555
 
      # Canonicalize the path of ld
4556
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
7412
    [[\\/]]* | ?:[[\\/]]*)
 
7413
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
7414
      # Canonicalize the pathname of ld
 
7415
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
4557
7416
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4558
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
7417
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
4559
7418
      done
4560
7419
      test -z "$LD" && LD="$ac_prog"
4561
7420
      ;;
4575
7434
fi
4576
7435
AC_CACHE_VAL(lt_cv_path_LD,
4577
7436
[if test -z "$LD"; then
4578
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
7437
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4579
7438
  for ac_dir in $PATH; do
 
7439
    IFS="$lt_save_ifs"
4580
7440
    test -z "$ac_dir" && ac_dir=.
4581
7441
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4582
7442
      lt_cv_path_LD="$ac_dir/$ac_prog"
4583
7443
      # Check to see if the program is GNU ld.  I'd rather use --version,
4584
7444
      # but apparently some GNU ld's only accept -v.
4585
7445
      # Break only if it was the GNU/non-GNU ld that we prefer.
4586
 
      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
 
7446
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
7447
      *GNU* | *'with BFD'*)
4587
7448
        test "$with_gnu_ld" != no && break
4588
 
      else
 
7449
        ;;
 
7450
      *)
4589
7451
        test "$with_gnu_ld" != yes && break
4590
 
      fi
 
7452
        ;;
 
7453
      esac
4591
7454
    fi
4592
7455
  done
4593
 
  IFS="$ac_save_ifs"
 
7456
  IFS="$lt_save_ifs"
4594
7457
else
4595
7458
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4596
7459
fi])
4602
7465
fi
4603
7466
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4604
7467
AC_PROG_LD_GNU
4605
 
])
4606
 
 
 
7468
])# AC_PROG_LD
 
7469
 
 
7470
 
 
7471
# AC_PROG_LD_GNU
 
7472
# --------------
4607
7473
AC_DEFUN([AC_PROG_LD_GNU],
4608
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
7474
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
7475
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4609
7476
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4610
 
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
 
7477
case `$LD -v 2>&1 </dev/null` in
 
7478
*GNU* | *'with BFD'*)
4611
7479
  lt_cv_prog_gnu_ld=yes
4612
 
else
 
7480
  ;;
 
7481
*)
4613
7482
  lt_cv_prog_gnu_ld=no
4614
 
fi])
 
7483
  ;;
 
7484
esac])
4615
7485
with_gnu_ld=$lt_cv_prog_gnu_ld
4616
 
])
4617
 
 
4618
 
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
 
7486
])# AC_PROG_LD_GNU
 
7487
 
 
7488
 
 
7489
# AC_PROG_LD_RELOAD_FLAG
 
7490
# ----------------------
 
7491
# find reload flag for linker
4619
7492
#   -- PORTME Some linkers may need a different reload flag.
4620
7493
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4621
 
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4622
 
[lt_cv_ld_reload_flag='-r'])
 
7494
[AC_CACHE_CHECK([for $LD option to reload object files],
 
7495
  lt_cv_ld_reload_flag,
 
7496
  [lt_cv_ld_reload_flag='-r'])
4623
7497
reload_flag=$lt_cv_ld_reload_flag
4624
 
test -n "$reload_flag" && reload_flag=" $reload_flag"
4625
 
])
4626
 
 
4627
 
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
 
7498
case $reload_flag in
 
7499
"" | " "*) ;;
 
7500
*) reload_flag=" $reload_flag" ;;
 
7501
esac
 
7502
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
7503
])# AC_PROG_LD_RELOAD_FLAG
 
7504
 
 
7505
 
 
7506
# AC_DEPLIBS_CHECK_METHOD
 
7507
# -----------------------
 
7508
# how to check for library dependencies
4628
7509
#  -- PORTME fill in with the dynamic library characteristics
4629
7510
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4630
 
[AC_CACHE_CHECK([how to recognise dependant libraries],
 
7511
[AC_CACHE_CHECK([how to recognise dependent libraries],
4631
7512
lt_cv_deplibs_check_method,
4632
7513
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4633
7514
lt_cv_file_magic_test_file=
4638
7519
# `unknown' -- same as none, but documents that we really don't know.
4639
7520
# 'pass_all' -- all dependencies passed with no checks.
4640
7521
# 'test_compile' -- check by making test program.
4641
 
# 'file_magic [regex]' -- check by looking for files in library path
4642
 
# which responds to the $file_magic_cmd with a given egrep regex.
 
7522
# 'file_magic [[regex]]' -- check by looking for files in library path
 
7523
# which responds to the $file_magic_cmd with a given extended regex.
4643
7524
# If you have `file' or equivalent on your system and you're not sure
4644
7525
# whether `pass_all' will *always* work, you probably want this one.
4645
7526
 
4646
7527
case $host_os in
4647
 
aix*)
 
7528
aix4* | aix5*)
4648
7529
  lt_cv_deplibs_check_method=pass_all
4649
7530
  ;;
4650
7531
 
4653
7534
  ;;
4654
7535
 
4655
7536
bsdi4*)
4656
 
  lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
 
7537
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4657
7538
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4658
7539
  lt_cv_file_magic_test_file=/shlib/libc.so
4659
7540
  ;;
4660
7541
 
4661
 
cygwin* | mingw* |pw32*)
4662
 
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4663
 
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
7542
cygwin*)
 
7543
  lt_cv_deplibs_check_method=pass_all
 
7544
  ;;
 
7545
  
 
7546
mingw* | pw32*)
 
7547
  # win32_libid is a shell function defined in ltmain.sh
 
7548
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
7549
  lt_cv_file_magic_cmd='win32_libid'
4664
7550
  ;;
4665
7551
 
4666
7552
darwin* | rhapsody*)
 
7553
  # this will be overwritten by pass_all, but leave it in just in case
4667
7554
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4668
7555
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4669
7556
  case "$host_os" in
4670
 
  rhapsody* | darwin1.[012])
4671
 
    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
 
7557
  rhapsody* | darwin1.[[012]])
 
7558
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
4672
7559
    ;;
4673
7560
  *) # Darwin 1.3 on
4674
7561
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4675
7562
    ;;
4676
7563
  esac
 
7564
  lt_cv_deplibs_check_method=pass_all
4677
7565
  ;;
4678
7566
 
4679
 
freebsd* )
 
7567
freebsd*)
4680
7568
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4681
7569
    case $host_cpu in
4682
7570
    i*86 )
4683
7571
      # Not sure whether the presence of OpenBSD here was a mistake.
4684
7572
      # Let's accept both of them until this is cleared up.
4685
 
      lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
 
7573
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4686
7574
      lt_cv_file_magic_cmd=/usr/bin/file
4687
7575
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4688
7576
      ;;
4696
7584
  lt_cv_deplibs_check_method=pass_all
4697
7585
  ;;
4698
7586
 
4699
 
hpux10.20*|hpux11*)
4700
 
  lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
 
7587
hpux10.20* | hpux11*)
4701
7588
  lt_cv_file_magic_cmd=/usr/bin/file
4702
 
  lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
7589
  case "$host_cpu" in
 
7590
  ia64*)
 
7591
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
7592
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
7593
    ;;
 
7594
  hppa*64*)
 
7595
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
 
7596
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
7597
    ;;
 
7598
  *)
 
7599
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
7600
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
7601
    ;;
 
7602
  esac
4703
7603
  ;;
4704
7604
 
4705
 
irix5* | irix6*)
 
7605
irix5* | irix6* | nonstopux*)
4706
7606
  case $host_os in
4707
 
  irix5*)
 
7607
  irix5* | nonstopux*)
4708
7608
    # this will be overridden with pass_all, but let us keep it just in case
4709
7609
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4710
7610
    ;;
4716
7616
    *) libmagic=never-match;;
4717
7617
    esac
4718
7618
    # this will be overridden with pass_all, but let us keep it just in case
4719
 
    lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
 
7619
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4720
7620
    ;;
4721
7621
  esac
4722
7622
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4724
7624
  ;;
4725
7625
 
4726
7626
# This must be Linux ELF.
4727
 
linux-gnu*)
 
7627
linux*)
4728
7628
  case $host_cpu in
4729
 
  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
 
7629
  alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
 
7630
    lt_cv_deplibs_check_method=pass_all ;;
 
7631
  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
 
7632
  arm* )
4730
7633
    lt_cv_deplibs_check_method=pass_all ;;
4731
7634
  *)
4732
7635
    # glibc up to 2.1.1 does not perform some relocations on ARM
4733
 
    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
 
7636
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4734
7637
  esac
4735
7638
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4736
7639
  ;;
4737
7640
 
4738
7641
netbsd*)
4739
7642
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4740
 
    [lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
4741
 
  else
4742
 
    [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
4743
 
  fi
4744
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4745
 
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4746
 
  ;;
4747
 
 
4748
 
openbsd* )
4749
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4750
 
    case "$host_cpu" in
4751
 
    i*86 )
4752
 
      changequote(,)dnl
4753
 
      lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
4754
 
      changequote([, ])dnl
4755
 
      lt_cv_file_magic_cmd=/usr/bin/file
4756
 
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4757
 
      ;;
4758
 
    esac
4759
 
  else
4760
 
    lt_cv_deplibs_check_method=pass_all
4761
 
  fi
4762
 
  ;;
4763
 
 
4764
 
newsos6)
4765
 
  [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
 
7643
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
7644
  else
 
7645
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
7646
  fi
 
7647
  ;;
 
7648
 
 
7649
newos6*)
 
7650
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4766
7651
  lt_cv_file_magic_cmd=/usr/bin/file
4767
7652
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4768
7653
  ;;
4769
7654
 
 
7655
nto-qnx*)
 
7656
  lt_cv_deplibs_check_method=unknown
 
7657
  ;;
 
7658
 
 
7659
openbsd*)
 
7660
  lt_cv_file_magic_cmd=/usr/bin/file
 
7661
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
7662
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
7663
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
 
7664
  else
 
7665
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
 
7666
  fi
 
7667
  ;;
 
7668
 
4770
7669
osf3* | osf4* | osf5*)
4771
7670
  # this will be overridden with pass_all, but let us keep it just in case
4772
7671
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4785
7684
 
4786
7685
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4787
7686
  case $host_vendor in
4788
 
  ncr)
4789
 
    lt_cv_deplibs_check_method=pass_all
4790
 
    ;;
4791
7687
  motorola)
4792
 
    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]']
 
7688
    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]]'
4793
7689
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4794
7690
    ;;
 
7691
  ncr)
 
7692
    lt_cv_deplibs_check_method=pass_all
 
7693
    ;;
 
7694
  sequent)
 
7695
    lt_cv_file_magic_cmd='/bin/file'
 
7696
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
7697
    ;;
 
7698
  sni)
 
7699
    lt_cv_file_magic_cmd='/bin/file'
 
7700
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
7701
    lt_cv_file_magic_test_file=/lib/libc.so
 
7702
    ;;
 
7703
  siemens)
 
7704
    lt_cv_deplibs_check_method=pass_all
 
7705
    ;;
4795
7706
  esac
4796
7707
  ;;
 
7708
 
 
7709
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
7710
  lt_cv_deplibs_check_method=pass_all
 
7711
  ;;
4797
7712
esac
4798
7713
])
4799
7714
file_magic_cmd=$lt_cv_file_magic_cmd
4800
7715
deplibs_check_method=$lt_cv_deplibs_check_method
4801
 
])
4802
 
 
4803
 
 
4804
 
# AC_PROG_NM - find the path to a BSD-compatible name lister
 
7716
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
7717
])# AC_DEPLIBS_CHECK_METHOD
 
7718
 
 
7719
 
 
7720
# AC_PROG_NM
 
7721
# ----------
 
7722
# find the pathname to a BSD-compatible name lister
4805
7723
AC_DEFUN([AC_PROG_NM],
4806
 
[AC_MSG_CHECKING([for BSD-compatible nm])
4807
 
AC_CACHE_VAL(lt_cv_path_NM,
 
7724
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4808
7725
[if test -n "$NM"; then
4809
7726
  # Let the user override the test.
4810
7727
  lt_cv_path_NM="$NM"
4811
7728
else
4812
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
7729
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4813
7730
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
7731
    IFS="$lt_save_ifs"
4814
7732
    test -z "$ac_dir" && ac_dir=.
4815
 
    tmp_nm=$ac_dir/${ac_tool_prefix}nm
4816
 
    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
 
7733
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
 
7734
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4817
7735
      # Check to see if the nm accepts a BSD-compat flag.
4818
7736
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4819
7737
      #   nm: unknown option "B" ignored
4820
7738
      # Tru64's nm complains that /dev/null is an invalid object file
4821
 
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
 
7739
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
7740
      */dev/null* | *'Invalid file or object type'*)
4822
7741
        lt_cv_path_NM="$tmp_nm -B"
4823
7742
        break
4824
 
      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4825
 
        lt_cv_path_NM="$tmp_nm -p"
4826
 
        break
4827
 
      else
4828
 
        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4829
 
        continue # so that we can try to find one that supports BSD flags
4830
 
      fi
 
7743
        ;;
 
7744
      *)
 
7745
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
7746
        */dev/null*)
 
7747
          lt_cv_path_NM="$tmp_nm -p"
 
7748
          break
 
7749
          ;;
 
7750
        *)
 
7751
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
7752
          continue # so that we can try to find one that supports BSD flags
 
7753
          ;;
 
7754
        esac
 
7755
      esac
4831
7756
    fi
4832
7757
  done
4833
 
  IFS="$ac_save_ifs"
 
7758
  IFS="$lt_save_ifs"
4834
7759
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4835
7760
fi])
4836
7761
NM="$lt_cv_path_NM"
4837
 
AC_MSG_RESULT([$NM])
4838
 
])
4839
 
 
4840
 
# AC_CHECK_LIBM - check for math library
 
7762
])# AC_PROG_NM
 
7763
 
 
7764
 
 
7765
# AC_CHECK_LIBM
 
7766
# -------------
 
7767
# check for math library
4841
7768
AC_DEFUN([AC_CHECK_LIBM],
4842
7769
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4843
7770
LIBM=
4844
7771
case $host in
4845
 
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4846
 
  # These system don't have libm
 
7772
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
7773
  # These system don't have libm, or don't need it
4847
7774
  ;;
4848
7775
*-ncr-sysv4.3*)
4849
7776
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4850
 
  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
 
7777
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4851
7778
  ;;
4852
7779
*)
4853
 
  AC_CHECK_LIB(m, main, LIBM="-lm")
 
7780
  AC_CHECK_LIB(m, cos, LIBM="-lm")
4854
7781
  ;;
4855
7782
esac
4856
 
])
4857
 
 
4858
 
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4859
 
# the libltdl convenience library and INCLTDL to the include flags for
4860
 
# the libltdl header and adds --enable-ltdl-convenience to the
4861
 
# configure arguments.  Note that LIBLTDL and INCLTDL are not
4862
 
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
4863
 
# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
4864
 
# with '${top_builddir}/' and INCLTDL will be prefixed with
 
7783
])# AC_CHECK_LIBM
 
7784
 
 
7785
 
 
7786
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
7787
# -----------------------------------
 
7788
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
7789
# LTDLINCL to the include flags for the libltdl header and adds
 
7790
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
 
7791
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
7792
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
 
7793
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
4865
7794
# '${top_srcdir}/' (note the single quotes!).  If your package is not
4866
7795
# flat and you're not using automake, define top_builddir and
4867
7796
# top_srcdir appropriately in the Makefiles.
4873
7802
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4874
7803
  esac
4875
7804
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4876
 
  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4877
 
])
4878
 
 
4879
 
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4880
 
# the libltdl installable library and INCLTDL to the include flags for
4881
 
# the libltdl header and adds --enable-ltdl-install to the configure
4882
 
# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4883
 
# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
4884
 
# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
4885
 
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4886
 
# with '${top_srcdir}/' (note the single quotes!).  If your package is
4887
 
# not flat and you're not using automake, define top_builddir and
4888
 
# top_srcdir appropriately in the Makefiles.
 
7805
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
7806
  # For backwards non-gettext consistent compatibility...
 
7807
  INCLTDL="$LTDLINCL"
 
7808
])# AC_LIBLTDL_CONVENIENCE
 
7809
 
 
7810
 
 
7811
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
7812
# -----------------------------------
 
7813
# sets LIBLTDL to the link flags for the libltdl installable library and
 
7814
# LTDLINCL to the include flags for the libltdl header and adds
 
7815
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
 
7816
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
7817
# DIRECTORY is not provided and an installed libltdl is not found, it is
 
7818
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
 
7819
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
 
7820
# quotes!).  If your package is not flat and you're not using automake,
 
7821
# define top_builddir and top_srcdir appropriately in the Makefiles.
4889
7822
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4890
7823
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4891
7824
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4892
 
  AC_CHECK_LIB(ltdl, main,
 
7825
  AC_CHECK_LIB(ltdl, lt_dlinit,
4893
7826
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4894
7827
  [if test x"$enable_ltdl_install" = xno; then
4895
7828
     AC_MSG_WARN([libltdl not installed, but installation disabled])
4900
7833
  if test x"$enable_ltdl_install" = x"yes"; then
4901
7834
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4902
7835
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4903
 
    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
7836
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4904
7837
  else
4905
7838
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4906
7839
    LIBLTDL="-lltdl"
4907
 
    INCLTDL=
 
7840
    LTDLINCL=
4908
7841
  fi
4909
 
])
4910
 
 
4911
 
# If this macro is not defined by Autoconf, define it here.
4912
 
ifdef([AC_PROVIDE_IFELSE],
4913
 
      [],
4914
 
      [define([AC_PROVIDE_IFELSE],
4915
 
              [ifdef([AC_PROVIDE_$1],
4916
 
                     [$2], [$3])])])
4917
 
 
4918
 
# AC_LIBTOOL_CXX - enable support for C++ libraries
4919
 
AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
4920
 
 
4921
 
AC_DEFUN([_AC_LIBTOOL_CXX],
 
7842
  # For backwards non-gettext consistent compatibility...
 
7843
  INCLTDL="$LTDLINCL"
 
7844
])# AC_LIBLTDL_INSTALLABLE
 
7845
 
 
7846
 
 
7847
# AC_LIBTOOL_CXX
 
7848
# --------------
 
7849
# enable support for C++ libraries
 
7850
AC_DEFUN([AC_LIBTOOL_CXX],
 
7851
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
7852
])# AC_LIBTOOL_CXX
 
7853
 
 
7854
 
 
7855
# _LT_AC_LANG_CXX
 
7856
# ---------------
 
7857
AC_DEFUN([_LT_AC_LANG_CXX],
4922
7858
[AC_REQUIRE([AC_PROG_CXX])
4923
7859
AC_REQUIRE([AC_PROG_CXXCPP])
4924
 
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
4925
 
lt_save_CC="$CC"
4926
 
lt_save_CFLAGS="$CFLAGS"
4927
 
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
4928
 
dnl is set to the C++ compiler.
4929
 
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
4930
 
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4931
 
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4932
 
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4933
 
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4934
 
deplibs_check_method="$deplibs_check_method" \
4935
 
file_magic_cmd="$file_magic_cmd" \
4936
 
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
4937
 
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
4938
 
|| AC_MSG_ERROR([libtool tag configuration failed])
4939
 
CC="$lt_save_CC"
4940
 
CFLAGS="$lt_save_CFLAGS"
4941
 
 
4942
 
# Redirect the config.log output again, so that the ltconfig log is not
4943
 
# clobbered by the next message.
4944
 
exec 5>>./config.log
4945
 
])
4946
 
 
4947
 
# AC_LIBTOOL_GCJ - enable support for GCJ libraries
4948
 
AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
4949
 
 
4950
 
AC_DEFUN([_AC_LIBTOOL_GCJ],
4951
 
[AC_REQUIRE([AC_PROG_LIBTOOL])
4952
 
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
7860
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
 
7861
])# _LT_AC_LANG_CXX
 
7862
 
 
7863
 
 
7864
# AC_LIBTOOL_F77
 
7865
# --------------
 
7866
# enable support for Fortran 77 libraries
 
7867
AC_DEFUN([AC_LIBTOOL_F77],
 
7868
[AC_REQUIRE([_LT_AC_LANG_F77])
 
7869
])# AC_LIBTOOL_F77
 
7870
 
 
7871
 
 
7872
# _LT_AC_LANG_F77
 
7873
# ---------------
 
7874
AC_DEFUN([_LT_AC_LANG_F77],
 
7875
[AC_REQUIRE([AC_PROG_F77])
 
7876
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
 
7877
])# _LT_AC_LANG_F77
 
7878
 
 
7879
 
 
7880
# AC_LIBTOOL_GCJ
 
7881
# --------------
 
7882
# enable support for GCJ libraries
 
7883
AC_DEFUN([AC_LIBTOOL_GCJ],
 
7884
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
7885
])# AC_LIBTOOL_GCJ
 
7886
 
 
7887
 
 
7888
# _LT_AC_LANG_GCJ
 
7889
# ---------------
 
7890
AC_DEFUN([_LT_AC_LANG_GCJ],
 
7891
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4953
7892
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4954
7893
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4955
7894
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4956
 
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4957
 
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4958
 
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
4959
 
lt_save_CC="$CC"
4960
 
lt_save_CFLAGS="$CFLAGS"
4961
 
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
4962
 
dnl is set to the C++ compiler.
4963
 
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
4964
 
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4965
 
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4966
 
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4967
 
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4968
 
deplibs_check_method="$deplibs_check_method" \
4969
 
file_magic_cmd="$file_magic_cmd" \
4970
 
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
4971
 
--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
4972
 
|| AC_MSG_ERROR([libtool tag configuration failed])
4973
 
CC="$lt_save_CC"
4974
 
CFLAGS="$lt_save_CFLAGS"
4975
 
 
4976
 
# Redirect the config.log output again, so that the ltconfig log is not
4977
 
# clobbered by the next message.
4978
 
exec 5>>./config.log
4979
 
])
4980
 
 
4981
 
dnl old names
 
7895
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
7896
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
7897
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
 
7898
])# _LT_AC_LANG_GCJ
 
7899
 
 
7900
 
 
7901
# AC_LIBTOOL_RC
 
7902
# --------------
 
7903
# enable support for Windows resource files
 
7904
AC_DEFUN([AC_LIBTOOL_RC],
 
7905
[AC_REQUIRE([LT_AC_PROG_RC])
 
7906
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
 
7907
])# AC_LIBTOOL_RC
 
7908
 
 
7909
 
 
7910
# AC_LIBTOOL_LANG_C_CONFIG
 
7911
# ------------------------
 
7912
# Ensure that the configuration vars for the C compiler are
 
7913
# suitably defined.  Those variables are subsequently used by
 
7914
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
7915
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
7916
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
7917
[lt_save_CC="$CC"
 
7918
AC_LANG_PUSH(C)
 
7919
 
 
7920
# Source file extension for C test sources.
 
7921
ac_ext=c
 
7922
 
 
7923
# Object file extension for compiled C test sources.
 
7924
objext=o
 
7925
_LT_AC_TAGVAR(objext, $1)=$objext
 
7926
 
 
7927
# Code to be used in simple compile tests
 
7928
lt_simple_compile_test_code="int some_variable = 0;\n"
 
7929
 
 
7930
# Code to be used in simple link tests
 
7931
lt_simple_link_test_code='int main(){return(0);}\n'
 
7932
 
 
7933
_LT_AC_SYS_COMPILER
 
7934
 
 
7935
#
 
7936
# Check for any special shared library compilation flags.
 
7937
#
 
7938
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
 
7939
if test "$GCC" = no; then
 
7940
  case $host_os in
 
7941
  sco3.2v5*)
 
7942
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
 
7943
    ;;
 
7944
  esac
 
7945
fi
 
7946
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
 
7947
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
 
7948
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
 
7949
  else
 
7950
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
 
7951
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
 
7952
  fi
 
7953
fi
 
7954
 
 
7955
 
 
7956
#
 
7957
# Check to make sure the static flag actually works.
 
7958
#
 
7959
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
 
7960
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
7961
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
 
7962
  [],
 
7963
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
7964
 
 
7965
 
 
7966
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
7967
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
7968
AC_LIBTOOL_PROG_CC_C_O($1)
 
7969
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
7970
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
7971
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
7972
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
7973
AC_LIBTOOL_SYS_LIB_STRIP
 
7974
AC_LIBTOOL_DLOPEN_SELF($1)
 
7975
 
 
7976
# Report which librarie types wil actually be built
 
7977
AC_MSG_CHECKING([if libtool supports shared libraries])
 
7978
AC_MSG_RESULT([$can_build_shared])
 
7979
 
 
7980
AC_MSG_CHECKING([whether to build shared libraries])
 
7981
test "$can_build_shared" = "no" && enable_shared=no
 
7982
 
 
7983
# On AIX, shared libraries and static libraries use the same namespace, and
 
7984
# are all built from PIC.
 
7985
case "$host_os" in
 
7986
aix3*)
 
7987
  test "$enable_shared" = yes && enable_static=no
 
7988
  if test -n "$RANLIB"; then
 
7989
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
7990
    postinstall_cmds='$RANLIB $lib'
 
7991
  fi
 
7992
  ;;
 
7993
 
 
7994
aix4*)
 
7995
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
7996
    test "$enable_shared" = yes && enable_static=no
 
7997
  fi
 
7998
  ;;
 
7999
  darwin* | rhapsody*)
 
8000
  if test "$GCC" = yes; then
 
8001
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8002
    case "$host_os" in
 
8003
    rhapsody* | darwin1.[[012]])
 
8004
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
8005
      ;;
 
8006
    *) # Darwin 1.3 on
 
8007
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
8008
      ;;
 
8009
    esac
 
8010
    output_verbose_link_cmd='echo'
 
8011
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
 
8012
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
8013
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
8014
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8015
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8016
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8017
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
8018
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
8019
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
8020
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8021
  else
 
8022
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8023
  fi  
 
8024
    ;;  
 
8025
esac
 
8026
AC_MSG_RESULT([$enable_shared])
 
8027
 
 
8028
AC_MSG_CHECKING([whether to build static libraries])
 
8029
# Make sure either enable_shared or enable_static is yes.
 
8030
test "$enable_shared" = yes || enable_static=yes
 
8031
AC_MSG_RESULT([$enable_static])
 
8032
 
 
8033
AC_LIBTOOL_CONFIG($1)
 
8034
 
 
8035
AC_LANG_POP
 
8036
CC="$lt_save_CC"
 
8037
])# AC_LIBTOOL_LANG_C_CONFIG
 
8038
 
 
8039
 
 
8040
# AC_LIBTOOL_LANG_CXX_CONFIG
 
8041
# --------------------------
 
8042
# Ensure that the configuration vars for the C compiler are
 
8043
# suitably defined.  Those variables are subsequently used by
 
8044
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
8045
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
8046
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
8047
[AC_LANG_PUSH(C++)
 
8048
AC_REQUIRE([AC_PROG_CXX])
 
8049
AC_REQUIRE([AC_PROG_CXXCPP])
 
8050
 
 
8051
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8052
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
8053
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
8054
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
8055
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
8056
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8057
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
8058
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
8059
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
8060
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
8061
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
8062
_LT_AC_TAGVAR(module_cmds, $1)=
 
8063
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
8064
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
8065
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8066
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
8067
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
8068
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
8069
 
 
8070
# Dependencies to place before and after the object being linked:
 
8071
_LT_AC_TAGVAR(predep_objects, $1)=
 
8072
_LT_AC_TAGVAR(postdep_objects, $1)=
 
8073
_LT_AC_TAGVAR(predeps, $1)=
 
8074
_LT_AC_TAGVAR(postdeps, $1)=
 
8075
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
8076
 
 
8077
# Source file extension for C++ test sources.
 
8078
ac_ext=cc
 
8079
 
 
8080
# Object file extension for compiled C++ test sources.
 
8081
objext=o
 
8082
_LT_AC_TAGVAR(objext, $1)=$objext
 
8083
 
 
8084
# Code to be used in simple compile tests
 
8085
lt_simple_compile_test_code="int some_variable = 0;\n"
 
8086
 
 
8087
# Code to be used in simple link tests
 
8088
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
 
8089
 
 
8090
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8091
_LT_AC_SYS_COMPILER
 
8092
 
 
8093
# Allow CC to be a program name with arguments.
 
8094
lt_save_CC=$CC
 
8095
lt_save_LD=$LD
 
8096
lt_save_GCC=$GCC
 
8097
GCC=$GXX
 
8098
lt_save_with_gnu_ld=$with_gnu_ld
 
8099
lt_save_path_LD=$lt_cv_path_LD
 
8100
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
8101
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
8102
else
 
8103
  unset lt_cv_prog_gnu_ld
 
8104
fi
 
8105
if test -n "${lt_cv_path_LDCXX+set}"; then
 
8106
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
8107
else
 
8108
  unset lt_cv_path_LD
 
8109
fi
 
8110
test -z "${LDCXX+set}" || LD=$LDCXX
 
8111
CC=${CXX-"c++"}
 
8112
compiler=$CC
 
8113
_LT_AC_TAGVAR(compiler, $1)=$CC
 
8114
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
8115
 
 
8116
# We don't want -fno-exception wen compiling C++ code, so set the
 
8117
# no_builtin_flag separately
 
8118
if test "$GXX" = yes; then
 
8119
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
8120
else
 
8121
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
8122
fi
 
8123
 
 
8124
if test "$GXX" = yes; then
 
8125
  # Set up default GNU C++ configuration
 
8126
 
 
8127
  AC_PROG_LD
 
8128
 
 
8129
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
8130
  # archiving commands below assume that GNU ld is being used.
 
8131
  if test "$with_gnu_ld" = yes; then
 
8132
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8133
    _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'
 
8134
 
 
8135
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
8136
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
8137
 
 
8138
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
8139
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
8140
    #     investigate it a little bit more. (MM)
 
8141
    wlarc='${wl}'
 
8142
 
 
8143
    # ancient GNU ld didn't support --whole-archive et. al.
 
8144
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
8145
        grep 'no-whole-archive' > /dev/null; then
 
8146
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
8147
    else
 
8148
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
8149
    fi
 
8150
  else
 
8151
    with_gnu_ld=no
 
8152
    wlarc=
 
8153
 
 
8154
    # A generic and very simple default shared library creation
 
8155
    # command for GNU C++ for the case where it uses the native
 
8156
    # linker, instead of GNU ld.  If possible, this setting should
 
8157
    # overridden to take advantage of the native linker features on
 
8158
    # the platform it is being used on.
 
8159
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
8160
  fi
 
8161
 
 
8162
  # Commands to make compiler produce verbose output that lists
 
8163
  # what "hidden" libraries, object files and flags are used when
 
8164
  # linking a shared library.
 
8165
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
8166
 
 
8167
else
 
8168
  GXX=no
 
8169
  with_gnu_ld=no
 
8170
  wlarc=
 
8171
fi
 
8172
 
 
8173
# PORTME: fill in a description of your system's C++ link characteristics
 
8174
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
8175
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
8176
case $host_os in
 
8177
  aix3*)
 
8178
    # FIXME: insert proper C++ library support
 
8179
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8180
    ;;
 
8181
  aix4* | aix5*)
 
8182
    if test "$host_cpu" = ia64; then
 
8183
      # On IA64, the linker does run time linking by default, so we don't
 
8184
      # have to do anything special.
 
8185
      aix_use_runtimelinking=no
 
8186
      exp_sym_flag='-Bexport'
 
8187
      no_entry_flag=""
 
8188
    else
 
8189
      # KDE requires run time linking.  Make it the default.
 
8190
      aix_use_runtimelinking=yes
 
8191
      exp_sym_flag='-bexport'
 
8192
      no_entry_flag='-bnoentry'
 
8193
    fi
 
8194
 
 
8195
    # When large executables or shared objects are built, AIX ld can
 
8196
    # have problems creating the table of contents.  If linking a library
 
8197
    # or program results in "error TOC overflow" add -mminimal-toc to
 
8198
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
8199
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
8200
 
 
8201
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
8202
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8203
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
8204
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8205
 
 
8206
    if test "$GXX" = yes; then
 
8207
      case $host_os in aix4.[012]|aix4.[012].*)
 
8208
      # We only want to do this on AIX 4.2 and lower, the check
 
8209
      # below for broken collect2 doesn't work under 4.3+
 
8210
        collect2name=`${CC} -print-prog-name=collect2`
 
8211
        if test -f "$collect2name" && \
 
8212
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
8213
        then
 
8214
          # We have reworked collect2
 
8215
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8216
        else
 
8217
          # We have old collect2
 
8218
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
8219
          # It fails to find uninstalled libraries when the uninstalled
 
8220
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
8221
          # to unsupported forces relinking
 
8222
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
8223
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
8224
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
8225
        fi
 
8226
      esac
 
8227
      shared_flag='-shared'
 
8228
    else
 
8229
      # not using gcc
 
8230
      if test "$host_cpu" = ia64; then
 
8231
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
8232
        # chokes on -Wl,-G. The following line is correct:
 
8233
        shared_flag='-G'
 
8234
      else
 
8235
        if test "$aix_use_runtimelinking" = yes; then
 
8236
          shared_flag='-qmkshrobj ${wl}-G'
 
8237
        else
 
8238
          shared_flag='-qmkshrobj'
 
8239
        fi
 
8240
      fi
 
8241
    fi
 
8242
 
 
8243
    # Let the compiler handle the export list.
 
8244
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
8245
    if test "$aix_use_runtimelinking" = yes; then
 
8246
      # Warning - without using the other runtime loading flags (-brtl),
 
8247
      # -berok will link without error, but may produce a broken library.
 
8248
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
8249
      # Determine the default libpath from the value encoded in an empty executable.
 
8250
      _LT_AC_SYS_LIBPATH_AIX
 
8251
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
8252
 
 
8253
      _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"
 
8254
      _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"
 
8255
     else
 
8256
      if test "$host_cpu" = ia64; then
 
8257
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
8258
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
8259
        _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"
 
8260
      else
 
8261
        # Determine the default libpath from the value encoded in an empty executable.
 
8262
        _LT_AC_SYS_LIBPATH_AIX
 
8263
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
8264
        # Warning - without using the other run time loading flags,
 
8265
        # -berok will link without error, but may produce a broken library.
 
8266
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
8267
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
8268
        # -bexpall does not export symbols beginning with underscore (_)
 
8269
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
8270
        # Exported symbols can be pulled into shared objects from archives
 
8271
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
8272
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
8273
        # This is similar to how AIX traditionally builds it's shared libraries.
 
8274
        _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'
 
8275
      fi
 
8276
    fi
 
8277
    ;;
 
8278
  chorus*)
 
8279
    case $cc_basename in
 
8280
      *)
 
8281
        # FIXME: insert proper C++ library support
 
8282
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8283
        ;;
 
8284
    esac
 
8285
    ;;
 
8286
 
 
8287
  cygwin* | mingw* | pw32*)
 
8288
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
8289
    # as there is no search path for DLLs.
 
8290
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
8291
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
 
8292
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
8293
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
8294
 
 
8295
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
8296
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
8297
      # If the export-symbols file already is a .def file (1st line
 
8298
      # is EXPORTS), use it as is; otherwise, prepend...
 
8299
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
8300
        cp $export_symbols $output_objdir/$soname.def;
 
8301
      else
 
8302
        echo EXPORTS > $output_objdir/$soname.def;
 
8303
        cat $export_symbols >> $output_objdir/$soname.def;
 
8304
      fi~
 
8305
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
8306
    else
 
8307
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8308
    fi
 
8309
  ;;
 
8310
 
 
8311
  darwin* | rhapsody*)
 
8312
  if test "$GXX" = yes; then
 
8313
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8314
    case "$host_os" in
 
8315
    rhapsody* | darwin1.[[012]])
 
8316
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
8317
      ;;
 
8318
    *) # Darwin 1.3 on
 
8319
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
8320
      ;;
 
8321
    esac
 
8322
    lt_int_apple_cc_single_mod=no
 
8323
    output_verbose_link_cmd='echo'
 
8324
    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
 
8325
      lt_int_apple_cc_single_mod=yes
 
8326
    fi
 
8327
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
8328
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
8329
    else
 
8330
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
8331
    fi
 
8332
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
8333
 
 
8334
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
8335
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
8336
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8337
    else
 
8338
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8339
    fi
 
8340
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8341
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8342
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
8343
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
8344
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
8345
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8346
  else
 
8347
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8348
  fi
 
8349
    ;;
 
8350
 
 
8351
  dgux*)
 
8352
    case $cc_basename in
 
8353
      ec++)
 
8354
        # FIXME: insert proper C++ library support
 
8355
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8356
        ;;
 
8357
      ghcx)
 
8358
        # Green Hills C++ Compiler
 
8359
        # FIXME: insert proper C++ library support
 
8360
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8361
        ;;
 
8362
      *)
 
8363
        # FIXME: insert proper C++ library support
 
8364
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8365
        ;;
 
8366
    esac
 
8367
    ;;
 
8368
  freebsd[12]*)
 
8369
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
8370
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8371
    ;;
 
8372
  freebsd-elf*)
 
8373
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8374
    ;;
 
8375
  freebsd*)
 
8376
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
8377
    # conventions
 
8378
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
8379
    ;;
 
8380
  gnu*)
 
8381
    ;;
 
8382
  hpux9*)
 
8383
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
8384
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8385
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
8386
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8387
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
8388
                                # but as the default
 
8389
                                # location of the library.
 
8390
 
 
8391
    case $cc_basename in
 
8392
    CC)
 
8393
      # FIXME: insert proper C++ library support
 
8394
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8395
      ;;
 
8396
    aCC)
 
8397
      _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'
 
8398
      # Commands to make compiler produce verbose output that lists
 
8399
      # what "hidden" libraries, object files and flags are used when
 
8400
      # linking a shared library.
 
8401
      #
 
8402
      # There doesn't appear to be a way to prevent this compiler from
 
8403
      # explicitly linking system object files so we need to strip them
 
8404
      # from the output so that they don't get included in the library
 
8405
      # dependencies.
 
8406
      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'
 
8407
      ;;
 
8408
    *)
 
8409
      if test "$GXX" = yes; then
 
8410
        _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'
 
8411
      else
 
8412
        # FIXME: insert proper C++ library support
 
8413
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8414
      fi
 
8415
      ;;
 
8416
    esac
 
8417
    ;;
 
8418
  hpux10*|hpux11*)
 
8419
    if test $with_gnu_ld = no; then
 
8420
      case "$host_cpu" in
 
8421
      hppa*64*)
 
8422
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
8423
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
8424
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8425
        ;;
 
8426
      ia64*)
 
8427
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
8428
        ;;
 
8429
      *)
 
8430
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
8431
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8432
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
8433
        ;;
 
8434
      esac
 
8435
    fi
 
8436
    case "$host_cpu" in
 
8437
    hppa*64*)
 
8438
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8439
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8440
      ;;
 
8441
    ia64*)
 
8442
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8443
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8444
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
8445
                                              # but as the default
 
8446
                                              # location of the library.
 
8447
      ;;
 
8448
    *)
 
8449
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8450
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
8451
                                              # but as the default
 
8452
                                              # location of the library.
 
8453
      ;;
 
8454
    esac
 
8455
 
 
8456
    case $cc_basename in
 
8457
      CC)
 
8458
        # FIXME: insert proper C++ library support
 
8459
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8460
        ;;
 
8461
      aCC)
 
8462
        case "$host_cpu" in
 
8463
        hppa*64*|ia64*)
 
8464
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
8465
          ;;
 
8466
        *)
 
8467
          _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'
 
8468
          ;;
 
8469
        esac
 
8470
        # Commands to make compiler produce verbose output that lists
 
8471
        # what "hidden" libraries, object files and flags are used when
 
8472
        # linking a shared library.
 
8473
        #
 
8474
        # There doesn't appear to be a way to prevent this compiler from
 
8475
        # explicitly linking system object files so we need to strip them
 
8476
        # from the output so that they don't get included in the library
 
8477
        # dependencies.
 
8478
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8479
        ;;
 
8480
      *)
 
8481
        if test "$GXX" = yes; then
 
8482
          if test $with_gnu_ld = no; then
 
8483
            case "$host_cpu" in
 
8484
            ia64*|hppa*64*)
 
8485
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
8486
              ;;
 
8487
            *)
 
8488
              _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'
 
8489
              ;;
 
8490
            esac
 
8491
          fi
 
8492
        else
 
8493
          # FIXME: insert proper C++ library support
 
8494
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8495
        fi
 
8496
        ;;
 
8497
    esac
 
8498
    ;;
 
8499
  irix5* | irix6*)
 
8500
    case $cc_basename in
 
8501
      CC)
 
8502
        # SGI C++
 
8503
        _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'
 
8504
 
 
8505
        # Archives containing C++ object files must be created using
 
8506
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
8507
        # necessary to make sure instantiated templates are included
 
8508
        # in the archive.
 
8509
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
8510
        ;;
 
8511
      *)
 
8512
        if test "$GXX" = yes; then
 
8513
          if test "$with_gnu_ld" = no; then
 
8514
            _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'
 
8515
          else
 
8516
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
 
8517
          fi
 
8518
        fi
 
8519
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8520
        ;;
 
8521
    esac
 
8522
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8523
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8524
    ;;
 
8525
  linux*)
 
8526
    case $cc_basename in
 
8527
      KCC)
 
8528
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8529
 
 
8530
        # KCC will only create a shared library if the output file
 
8531
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8532
        # to its proper name (with version) after linking.
 
8533
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
8534
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
8535
        # Commands to make compiler produce verbose output that lists
 
8536
        # what "hidden" libraries, object files and flags are used when
 
8537
        # linking a shared library.
 
8538
        #
 
8539
        # There doesn't appear to be a way to prevent this compiler from
 
8540
        # explicitly linking system object files so we need to strip them
 
8541
        # from the output so that they don't get included in the library
 
8542
        # dependencies.
 
8543
        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8544
 
 
8545
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
8546
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
8547
 
 
8548
        # Archives containing C++ object files must be created using
 
8549
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
8550
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
8551
        ;;
 
8552
      icpc)
 
8553
        # Intel C++
 
8554
        with_gnu_ld=yes
 
8555
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8556
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8557
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
8558
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8559
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
8560
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
8561
        ;;
 
8562
      cxx)
 
8563
        # Compaq C++
 
8564
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8565
        _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'
 
8566
 
 
8567
        runpath_var=LD_RUN_PATH
 
8568
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8569
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8570
 
 
8571
        # Commands to make compiler produce verbose output that lists
 
8572
        # what "hidden" libraries, object files and flags are used when
 
8573
        # linking a shared library.
 
8574
        #
 
8575
        # There doesn't appear to be a way to prevent this compiler from
 
8576
        # explicitly linking system object files so we need to strip them
 
8577
        # from the output so that they don't get included in the library
 
8578
        # dependencies.
 
8579
        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'
 
8580
        ;;
 
8581
    esac
 
8582
    ;;
 
8583
  lynxos*)
 
8584
    # FIXME: insert proper C++ library support
 
8585
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8586
    ;;
 
8587
  m88k*)
 
8588
    # FIXME: insert proper C++ library support
 
8589
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8590
    ;;
 
8591
  mvs*)
 
8592
    case $cc_basename in
 
8593
      cxx)
 
8594
        # FIXME: insert proper C++ library support
 
8595
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8596
        ;;
 
8597
      *)
 
8598
        # FIXME: insert proper C++ library support
 
8599
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8600
        ;;
 
8601
    esac
 
8602
    ;;
 
8603
  netbsd*)
 
8604
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
8605
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
8606
      wlarc=
 
8607
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
8608
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8609
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8610
    fi
 
8611
    # Workaround some broken pre-1.5 toolchains
 
8612
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
8613
    ;;
 
8614
  osf3*)
 
8615
    case $cc_basename in
 
8616
      KCC)
 
8617
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8618
 
 
8619
        # KCC will only create a shared library if the output file
 
8620
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8621
        # to its proper name (with version) after linking.
 
8622
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
8623
 
 
8624
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8625
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8626
 
 
8627
        # Archives containing C++ object files must be created using
 
8628
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
8629
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
8630
 
 
8631
        ;;
 
8632
      RCC)
 
8633
        # Rational C++ 2.4.1
 
8634
        # FIXME: insert proper C++ library support
 
8635
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8636
        ;;
 
8637
      cxx)
 
8638
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8639
        _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'
 
8640
 
 
8641
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8642
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8643
 
 
8644
        # Commands to make compiler produce verbose output that lists
 
8645
        # what "hidden" libraries, object files and flags are used when
 
8646
        # linking a shared library.
 
8647
        #
 
8648
        # There doesn't appear to be a way to prevent this compiler from
 
8649
        # explicitly linking system object files so we need to strip them
 
8650
        # from the output so that they don't get included in the library
 
8651
        # dependencies.
 
8652
        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'
 
8653
        ;;
 
8654
      *)
 
8655
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8656
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8657
          _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'
 
8658
 
 
8659
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8660
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8661
 
 
8662
          # Commands to make compiler produce verbose output that lists
 
8663
          # what "hidden" libraries, object files and flags are used when
 
8664
          # linking a shared library.
 
8665
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
8666
 
 
8667
        else
 
8668
          # FIXME: insert proper C++ library support
 
8669
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8670
        fi
 
8671
        ;;
 
8672
    esac
 
8673
    ;;
 
8674
  osf4* | osf5*)
 
8675
    case $cc_basename in
 
8676
      KCC)
 
8677
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8678
 
 
8679
        # KCC will only create a shared library if the output file
 
8680
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8681
        # to its proper name (with version) after linking.
 
8682
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
8683
 
 
8684
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8685
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8686
 
 
8687
        # Archives containing C++ object files must be created using
 
8688
        # the KAI C++ compiler.
 
8689
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
8690
        ;;
 
8691
      RCC)
 
8692
        # Rational C++ 2.4.1
 
8693
        # FIXME: insert proper C++ library support
 
8694
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8695
        ;;
 
8696
      cxx)
 
8697
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
8698
        _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'
 
8699
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
8700
          echo "-hidden">> $lib.exp~
 
8701
          $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~
 
8702
          $rm $lib.exp'
 
8703
 
 
8704
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8705
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8706
 
 
8707
        # Commands to make compiler produce verbose output that lists
 
8708
        # what "hidden" libraries, object files and flags are used when
 
8709
        # linking a shared library.
 
8710
        #
 
8711
        # There doesn't appear to be a way to prevent this compiler from
 
8712
        # explicitly linking system object files so we need to strip them
 
8713
        # from the output so that they don't get included in the library
 
8714
        # dependencies.
 
8715
        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'
 
8716
        ;;
 
8717
      *)
 
8718
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8719
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8720
         _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'
 
8721
 
 
8722
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8723
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8724
 
 
8725
          # Commands to make compiler produce verbose output that lists
 
8726
          # what "hidden" libraries, object files and flags are used when
 
8727
          # linking a shared library.
 
8728
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
8729
 
 
8730
        else
 
8731
          # FIXME: insert proper C++ library support
 
8732
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8733
        fi
 
8734
        ;;
 
8735
    esac
 
8736
    ;;
 
8737
  psos*)
 
8738
    # FIXME: insert proper C++ library support
 
8739
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8740
    ;;
 
8741
  sco*)
 
8742
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8743
    case $cc_basename in
 
8744
      CC)
 
8745
        # FIXME: insert proper C++ library support
 
8746
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8747
        ;;
 
8748
      *)
 
8749
        # FIXME: insert proper C++ library support
 
8750
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8751
        ;;
 
8752
    esac
 
8753
    ;;
 
8754
  sunos4*)
 
8755
    case $cc_basename in
 
8756
      CC)
 
8757
        # Sun C++ 4.x
 
8758
        # FIXME: insert proper C++ library support
 
8759
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8760
        ;;
 
8761
      lcc)
 
8762
        # Lucid
 
8763
        # FIXME: insert proper C++ library support
 
8764
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8765
        ;;
 
8766
      *)
 
8767
        # FIXME: insert proper C++ library support
 
8768
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8769
        ;;
 
8770
    esac
 
8771
    ;;
 
8772
  solaris*)
 
8773
    case $cc_basename in
 
8774
      CC)
 
8775
        # Sun C++ 4.2, 5.x and Centerline C++
 
8776
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
8777
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8778
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8779
        $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'
 
8780
 
 
8781
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
8782
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8783
        case $host_os in
 
8784
          solaris2.[0-5] | solaris2.[0-5].*) ;;
 
8785
          *)
 
8786
            # The C++ compiler is used as linker so we must use $wl
 
8787
            # flag to pass the commands to the underlying system
 
8788
            # linker.
 
8789
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
8790
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
8791
            ;;
 
8792
        esac
 
8793
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8794
 
 
8795
        # Commands to make compiler produce verbose output that lists
 
8796
        # what "hidden" libraries, object files and flags are used when
 
8797
        # linking a shared library.
 
8798
        #
 
8799
        # There doesn't appear to be a way to prevent this compiler from
 
8800
        # explicitly linking system object files so we need to strip them
 
8801
        # from the output so that they don't get included in the library
 
8802
        # dependencies.
 
8803
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8804
 
 
8805
        # Archives containing C++ object files must be created using
 
8806
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
8807
        # necessary to make sure instantiated templates are included
 
8808
        # in the archive.
 
8809
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
8810
        ;;
 
8811
      gcx)
 
8812
        # Green Hills C++ Compiler
 
8813
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8814
 
 
8815
        # The C++ compiler must be used to create the archive.
 
8816
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
8817
        ;;
 
8818
      *)
 
8819
        # GNU C++ compiler with Solaris linker
 
8820
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8821
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
8822
          if $CC --version | grep -v '^2\.7' > /dev/null; then
 
8823
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8824
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8825
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
8826
 
 
8827
            # Commands to make compiler produce verbose output that lists
 
8828
            # what "hidden" libraries, object files and flags are used when
 
8829
            # linking a shared library.
 
8830
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
8831
          else
 
8832
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
8833
            # platform.
 
8834
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8835
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8836
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
8837
 
 
8838
            # Commands to make compiler produce verbose output that lists
 
8839
            # what "hidden" libraries, object files and flags are used when
 
8840
            # linking a shared library.
 
8841
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
8842
          fi
 
8843
 
 
8844
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
8845
        fi
 
8846
        ;;
 
8847
    esac
 
8848
    ;;
 
8849
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
 
8850
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8851
    ;;
 
8852
  tandem*)
 
8853
    case $cc_basename in
 
8854
      NCC)
 
8855
        # NonStop-UX NCC 3.20
 
8856
        # FIXME: insert proper C++ library support
 
8857
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8858
        ;;
 
8859
      *)
 
8860
        # FIXME: insert proper C++ library support
 
8861
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8862
        ;;
 
8863
    esac
 
8864
    ;;
 
8865
  vxworks*)
 
8866
    # FIXME: insert proper C++ library support
 
8867
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8868
    ;;
 
8869
  *)
 
8870
    # FIXME: insert proper C++ library support
 
8871
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8872
    ;;
 
8873
esac
 
8874
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
8875
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
8876
 
 
8877
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
8878
_LT_AC_TAGVAR(LD, $1)="$LD"
 
8879
 
 
8880
AC_LIBTOOL_POSTDEP_PREDEP($1)
 
8881
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
8882
AC_LIBTOOL_PROG_CC_C_O($1)
 
8883
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
8884
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
8885
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
8886
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
8887
AC_LIBTOOL_SYS_LIB_STRIP
 
8888
AC_LIBTOOL_DLOPEN_SELF($1)
 
8889
 
 
8890
AC_LIBTOOL_CONFIG($1)
 
8891
 
 
8892
AC_LANG_POP
 
8893
CC=$lt_save_CC
 
8894
LDCXX=$LD
 
8895
LD=$lt_save_LD
 
8896
GCC=$lt_save_GCC
 
8897
with_gnu_ldcxx=$with_gnu_ld
 
8898
with_gnu_ld=$lt_save_with_gnu_ld
 
8899
lt_cv_path_LDCXX=$lt_cv_path_LD
 
8900
lt_cv_path_LD=$lt_save_path_LD
 
8901
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
8902
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
8903
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
8904
 
 
8905
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
8906
# ------------------------
 
8907
# Figure out "hidden" library dependencies from verbose
 
8908
# compiler output when linking a shared library.
 
8909
# Parse the compiler output and extract the necessary
 
8910
# objects, libraries and library flags.
 
8911
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
8912
dnl we can't use the lt_simple_compile_test_code here,
 
8913
dnl because it contains code intended for an executable,
 
8914
dnl not a library.  It's possible we should let each
 
8915
dnl tag define a new lt_????_link_test_code variable,
 
8916
dnl but it's only used here...
 
8917
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
 
8918
int a;
 
8919
void foo (void) { a = 0; }
 
8920
EOF
 
8921
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
 
8922
class Foo
 
8923
{
 
8924
public:
 
8925
  Foo (void) { a = 0; }
 
8926
private:
 
8927
  int a;
 
8928
};
 
8929
EOF
 
8930
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
 
8931
      subroutine foo
 
8932
      implicit none
 
8933
      integer*4 a
 
8934
      a=0
 
8935
      return
 
8936
      end
 
8937
EOF
 
8938
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
 
8939
public class foo {
 
8940
  private int a;
 
8941
  public void bar (void) {
 
8942
    a = 0;
 
8943
  }
 
8944
};
 
8945
EOF
 
8946
])
 
8947
dnl Parse the compiler output and extract the necessary
 
8948
dnl objects, libraries and library flags.
 
8949
if AC_TRY_EVAL(ac_compile); then
 
8950
  # Parse the compiler output and extract the necessary
 
8951
  # objects, libraries and library flags.
 
8952
 
 
8953
  # Sentinel used to keep track of whether or not we are before
 
8954
  # the conftest object file.
 
8955
  pre_test_object_deps_done=no
 
8956
 
 
8957
  # The `*' in the case matches for architectures that use `case' in
 
8958
  # $output_verbose_cmd can trigger glob expansion during the loop
 
8959
  # eval without this substitution.
 
8960
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
8961
 
 
8962
  for p in `eval $output_verbose_link_cmd`; do
 
8963
    case $p in
 
8964
 
 
8965
    -L* | -R* | -l*)
 
8966
       # Some compilers place space between "-{L,R}" and the path.
 
8967
       # Remove the space.
 
8968
       if test $p = "-L" \
 
8969
          || test $p = "-R"; then
 
8970
         prev=$p
 
8971
         continue
 
8972
       else
 
8973
         prev=
 
8974
       fi
 
8975
 
 
8976
       if test "$pre_test_object_deps_done" = no; then
 
8977
         case $p in
 
8978
         -L* | -R*)
 
8979
           # Internal compiler library paths should come after those
 
8980
           # provided the user.  The postdeps already come after the
 
8981
           # user supplied libs so there is no need to process them.
 
8982
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
8983
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
8984
           else
 
8985
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
8986
           fi
 
8987
           ;;
 
8988
         # The "-l" case would never come before the object being
 
8989
         # linked, so don't bother handling this case.
 
8990
         esac
 
8991
       else
 
8992
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
8993
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
8994
         else
 
8995
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
8996
         fi
 
8997
       fi
 
8998
       ;;
 
8999
 
 
9000
    *.$objext|*.$libext)
 
9001
       # This assumes that the test object file only shows up
 
9002
       # once in the compiler output.
 
9003
       if test "$p" = "conftest.$objext"; then
 
9004
         pre_test_object_deps_done=yes
 
9005
         continue
 
9006
       fi
 
9007
 
 
9008
       if test "$pre_test_object_deps_done" = no; then
 
9009
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
9010
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
9011
         else
 
9012
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
9013
         fi
 
9014
       else
 
9015
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
9016
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
9017
         else
 
9018
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
9019
         fi
 
9020
       fi
 
9021
       ;;
 
9022
 
 
9023
    *) ;; # Ignore the rest.
 
9024
 
 
9025
    esac
 
9026
  done
 
9027
 
 
9028
  # Clean up.
 
9029
  rm -f a.out a.exe
 
9030
else
 
9031
  echo "libtool.m4: error: problem compiling $1 test program"
 
9032
fi
 
9033
 
 
9034
$rm -f confest.$objext
 
9035
 
 
9036
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
9037
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
9038
esac
 
9039
])# AC_LIBTOOL_POSTDEP_PREDEP
 
9040
 
 
9041
# AC_LIBTOOL_LANG_F77_CONFIG
 
9042
# ------------------------
 
9043
# Ensure that the configuration vars for the C compiler are
 
9044
# suitably defined.  Those variables are subsequently used by
 
9045
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
9046
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
 
9047
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
 
9048
[AC_REQUIRE([AC_PROG_F77])
 
9049
AC_LANG_PUSH(Fortran 77)
 
9050
 
 
9051
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9052
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
9053
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
9054
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
9055
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
9056
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
9057
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
9058
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
9059
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
9060
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
9061
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
9062
_LT_AC_TAGVAR(module_cmds, $1)=
 
9063
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
9064
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
9065
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
9066
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
9067
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
9068
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
9069
 
 
9070
# Source file extension for f77 test sources.
 
9071
ac_ext=f
 
9072
 
 
9073
# Object file extension for compiled f77 test sources.
 
9074
objext=o
 
9075
_LT_AC_TAGVAR(objext, $1)=$objext
 
9076
 
 
9077
# Code to be used in simple compile tests
 
9078
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
9079
 
 
9080
# Code to be used in simple link tests
 
9081
lt_simple_link_test_code="      program t\n      end\n"
 
9082
 
 
9083
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
9084
_LT_AC_SYS_COMPILER
 
9085
 
 
9086
# Allow CC to be a program name with arguments.
 
9087
lt_save_CC="$CC"
 
9088
CC=${F77-"f77"}
 
9089
compiler=$CC
 
9090
_LT_AC_TAGVAR(compiler, $1)=$CC
 
9091
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
9092
 
 
9093
AC_MSG_CHECKING([if libtool supports shared libraries])
 
9094
AC_MSG_RESULT([$can_build_shared])
 
9095
 
 
9096
AC_MSG_CHECKING([whether to build shared libraries])
 
9097
test "$can_build_shared" = "no" && enable_shared=no
 
9098
 
 
9099
# On AIX, shared libraries and static libraries use the same namespace, and
 
9100
# are all built from PIC.
 
9101
case "$host_os" in
 
9102
aix3*)
 
9103
  test "$enable_shared" = yes && enable_static=no
 
9104
  if test -n "$RANLIB"; then
 
9105
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
9106
    postinstall_cmds='$RANLIB $lib'
 
9107
  fi
 
9108
  ;;
 
9109
aix4*)
 
9110
  test "$enable_shared" = yes && enable_static=no
 
9111
  ;;
 
9112
esac
 
9113
AC_MSG_RESULT([$enable_shared])
 
9114
 
 
9115
AC_MSG_CHECKING([whether to build static libraries])
 
9116
# Make sure either enable_shared or enable_static is yes.
 
9117
test "$enable_shared" = yes || enable_static=yes
 
9118
AC_MSG_RESULT([$enable_static])
 
9119
 
 
9120
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
9121
 
 
9122
_LT_AC_TAGVAR(GCC, $1)="$G77"
 
9123
_LT_AC_TAGVAR(LD, $1)="$LD"
 
9124
 
 
9125
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
9126
AC_LIBTOOL_PROG_CC_C_O($1)
 
9127
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
9128
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
9129
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
9130
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
9131
AC_LIBTOOL_SYS_LIB_STRIP
 
9132
 
 
9133
 
 
9134
AC_LIBTOOL_CONFIG($1)
 
9135
 
 
9136
AC_LANG_POP
 
9137
CC="$lt_save_CC"
 
9138
])# AC_LIBTOOL_LANG_F77_CONFIG
 
9139
 
 
9140
 
 
9141
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
9142
# --------------------------
 
9143
# Ensure that the configuration vars for the C compiler are
 
9144
# suitably defined.  Those variables are subsequently used by
 
9145
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
9146
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
9147
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
9148
[AC_LANG_SAVE
 
9149
 
 
9150
# Source file extension for Java test sources.
 
9151
ac_ext=java
 
9152
 
 
9153
# Object file extension for compiled Java test sources.
 
9154
objext=o
 
9155
_LT_AC_TAGVAR(objext, $1)=$objext
 
9156
 
 
9157
# Code to be used in simple compile tests
 
9158
lt_simple_compile_test_code="class foo {}\n"
 
9159
 
 
9160
# Code to be used in simple link tests
 
9161
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
 
9162
 
 
9163
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
9164
_LT_AC_SYS_COMPILER
 
9165
 
 
9166
# Allow CC to be a program name with arguments.
 
9167
lt_save_CC="$CC"
 
9168
CC=${GCJ-"gcj"}
 
9169
compiler=$CC
 
9170
_LT_AC_TAGVAR(compiler, $1)=$CC
 
9171
 
 
9172
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
9173
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9174
 
 
9175
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
9176
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
9177
AC_LIBTOOL_PROG_CC_C_O($1)
 
9178
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
9179
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
9180
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
9181
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
9182
AC_LIBTOOL_SYS_LIB_STRIP
 
9183
AC_LIBTOOL_DLOPEN_SELF($1)
 
9184
 
 
9185
AC_LIBTOOL_CONFIG($1)
 
9186
 
 
9187
AC_LANG_RESTORE
 
9188
CC="$lt_save_CC"
 
9189
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
9190
 
 
9191
 
 
9192
# AC_LIBTOOL_LANG_RC_CONFIG
 
9193
# --------------------------
 
9194
# Ensure that the configuration vars for the Windows resource compiler are
 
9195
# suitably defined.  Those variables are subsequently used by
 
9196
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
9197
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
9198
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
9199
[AC_LANG_SAVE
 
9200
 
 
9201
# Source file extension for RC test sources.
 
9202
ac_ext=rc
 
9203
 
 
9204
# Object file extension for compiled RC test sources.
 
9205
objext=o
 
9206
_LT_AC_TAGVAR(objext, $1)=$objext
 
9207
 
 
9208
# Code to be used in simple compile tests
 
9209
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
9210
 
 
9211
# Code to be used in simple link tests
 
9212
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
9213
 
 
9214
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
9215
_LT_AC_SYS_COMPILER
 
9216
 
 
9217
# Allow CC to be a program name with arguments.
 
9218
lt_save_CC="$CC"
 
9219
CC=${RC-"windres"}
 
9220
compiler=$CC
 
9221
_LT_AC_TAGVAR(compiler, $1)=$CC
 
9222
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
9223
 
 
9224
AC_LIBTOOL_CONFIG($1)
 
9225
 
 
9226
AC_LANG_RESTORE
 
9227
CC="$lt_save_CC"
 
9228
])# AC_LIBTOOL_LANG_RC_CONFIG
 
9229
 
 
9230
 
 
9231
# AC_LIBTOOL_CONFIG([TAGNAME])
 
9232
# ----------------------------
 
9233
# If TAGNAME is not passed, then create an initial libtool script
 
9234
# with a default configuration from the untagged config vars.  Otherwise
 
9235
# add code to config.status for appending the configuration named by
 
9236
# TAGNAME from the matching tagged config vars.
 
9237
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
9238
[# The else clause should only fire when bootstrapping the
 
9239
# libtool distribution, otherwise you forgot to ship ltmain.sh
 
9240
# with your package, and you will get complaints that there are
 
9241
# no rules to generate ltmain.sh.
 
9242
if test -f "$ltmain"; then
 
9243
  # See if we are running on zsh, and set the options which allow our commands through
 
9244
  # without removal of \ escapes.
 
9245
  if test -n "${ZSH_VERSION+set}" ; then
 
9246
    setopt NO_GLOB_SUBST
 
9247
  fi  
 
9248
  # Now quote all the things that may contain metacharacters while being
 
9249
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 
9250
  # variables and quote the copies for generation of the libtool script.
 
9251
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
 
9252
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
9253
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
9254
    deplibs_check_method reload_flag reload_cmds need_locks \
 
9255
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
9256
    lt_cv_sys_global_symbol_to_c_name_address \
 
9257
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 
9258
    old_postinstall_cmds old_postuninstall_cmds \
 
9259
    _LT_AC_TAGVAR(compiler, $1) \
 
9260
    _LT_AC_TAGVAR(CC, $1) \
 
9261
    _LT_AC_TAGVAR(LD, $1) \
 
9262
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
9263
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
9264
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
9265
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
9266
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
9267
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
9268
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
9269
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
 
9270
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
9271
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
9272
    _LT_AC_TAGVAR(predep_objects, $1) \
 
9273
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
9274
    _LT_AC_TAGVAR(predeps, $1) \
 
9275
    _LT_AC_TAGVAR(postdeps, $1) \
 
9276
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
9277
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
9278
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
9279
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
9280
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
9281
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
9282
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
9283
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
9284
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
9285
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
9286
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
 
9287
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
9288
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
 
9289
    _LT_AC_TAGVAR(module_cmds, $1) \
 
9290
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
 
9291
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
9292
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
9293
    _LT_AC_TAGVAR(include_expsyms, $1); do
 
9294
 
 
9295
    case $var in
 
9296
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
9297
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
9298
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
9299
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
9300
    _LT_AC_TAGVAR(module_cmds, $1) | \
 
9301
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
 
9302
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
9303
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
9304
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
9305
    postinstall_cmds | postuninstall_cmds | \
 
9306
    old_postinstall_cmds | old_postuninstall_cmds | \
 
9307
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
9308
      # Double-quote double-evaled strings.
 
9309
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 
9310
      ;;
 
9311
    *)
 
9312
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 
9313
      ;;
 
9314
    esac
 
9315
  done
 
9316
 
 
9317
  case $lt_echo in
 
9318
  *'\[$]0 --fallback-echo"')
 
9319
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
9320
    ;;
 
9321
  esac
 
9322
 
 
9323
ifelse([$1], [],
 
9324
  [cfgfile="${ofile}T"
 
9325
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
9326
  $rm -f "$cfgfile"
 
9327
  AC_MSG_NOTICE([creating $ofile])],
 
9328
  [cfgfile="$ofile"])
 
9329
 
 
9330
  cat <<__EOF__ >> "$cfgfile"
 
9331
ifelse([$1], [],
 
9332
[#! $SHELL
 
9333
 
 
9334
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
9335
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 
9336
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
9337
#
 
9338
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
9339
# Free Software Foundation, Inc.
 
9340
#
 
9341
# This file is part of GNU Libtool:
 
9342
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
9343
#
 
9344
# This program is free software; you can redistribute it and/or modify
 
9345
# it under the terms of the GNU General Public License as published by
 
9346
# the Free Software Foundation; either version 2 of the License, or
 
9347
# (at your option) any later version.
 
9348
#
 
9349
# This program is distributed in the hope that it will be useful, but
 
9350
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
9351
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
9352
# General Public License for more details.
 
9353
#
 
9354
# You should have received a copy of the GNU General Public License
 
9355
# along with this program; if not, write to the Free Software
 
9356
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
9357
#
 
9358
# As a special exception to the GNU General Public License, if you
 
9359
# distribute this file as part of a program that contains a
 
9360
# configuration script generated by Autoconf, you may include it under
 
9361
# the same distribution terms that you use for the rest of that program.
 
9362
 
 
9363
# A sed program that does not truncate output.
 
9364
SED=$lt_SED
 
9365
 
 
9366
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
 
9367
Xsed="$SED -e s/^X//"
 
9368
 
 
9369
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
9370
# if CDPATH is set.
 
9371
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
9372
 
 
9373
# The names of the tagged configurations supported by this script.
 
9374
available_tags=
 
9375
 
 
9376
# ### BEGIN LIBTOOL CONFIG],
 
9377
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
 
9378
 
 
9379
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
9380
 
 
9381
# Shell to use when invoking shell scripts.
 
9382
SHELL=$lt_SHELL
 
9383
 
 
9384
# Whether or not to build shared libraries.
 
9385
build_libtool_libs=$enable_shared
 
9386
 
 
9387
# Whether or not to build static libraries.
 
9388
build_old_libs=$enable_static
 
9389
 
 
9390
# Whether or not to add -lc for building shared libraries.
 
9391
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
9392
 
 
9393
# Whether or not to disallow shared libs when runtime libs are static
 
9394
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
 
9395
 
 
9396
# Whether or not to optimize for fast installation.
 
9397
fast_install=$enable_fast_install
 
9398
 
 
9399
# The host system.
 
9400
host_alias=$host_alias
 
9401
host=$host
 
9402
 
 
9403
# An echo program that does not interpret backslashes.
 
9404
echo=$lt_echo
 
9405
 
 
9406
# The archiver.
 
9407
AR=$lt_AR
 
9408
AR_FLAGS=$lt_AR_FLAGS
 
9409
 
 
9410
# A C compiler.
 
9411
LTCC=$lt_LTCC
 
9412
 
 
9413
# A language-specific compiler.
 
9414
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 
9415
 
 
9416
# Is the compiler the GNU C compiler?
 
9417
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
9418
 
 
9419
# An ERE matcher.
 
9420
EGREP=$lt_EGREP
 
9421
 
 
9422
# The linker used to build libraries.
 
9423
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
 
9424
 
 
9425
# Whether we need hard or soft links.
 
9426
LN_S=$lt_LN_S
 
9427
 
 
9428
# A BSD-compatible nm program.
 
9429
NM=$lt_NM
 
9430
 
 
9431
# A symbol stripping program
 
9432
STRIP=$STRIP
 
9433
 
 
9434
# Used to examine libraries when file_magic_cmd begins "file"
 
9435
MAGIC_CMD=$MAGIC_CMD
 
9436
 
 
9437
# Used on cygwin: DLL creation program.
 
9438
DLLTOOL="$DLLTOOL"
 
9439
 
 
9440
# Used on cygwin: object dumper.
 
9441
OBJDUMP="$OBJDUMP"
 
9442
 
 
9443
# Used on cygwin: assembler.
 
9444
AS="$AS"
 
9445
 
 
9446
# The name of the directory that contains temporary libtool files.
 
9447
objdir=$objdir
 
9448
 
 
9449
# How to create reloadable object files.
 
9450
reload_flag=$lt_reload_flag
 
9451
reload_cmds=$lt_reload_cmds
 
9452
 
 
9453
# How to pass a linker flag through the compiler.
 
9454
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
9455
 
 
9456
# Object file suffix (normally "o").
 
9457
objext="$ac_objext"
 
9458
 
 
9459
# Old archive suffix (normally "a").
 
9460
libext="$libext"
 
9461
 
 
9462
# Shared library suffix (normally ".so").
 
9463
shrext='$shrext'
 
9464
 
 
9465
# Executable file suffix (normally "").
 
9466
exeext="$exeext"
 
9467
 
 
9468
# Additional compiler flags for building library objects.
 
9469
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
 
9470
pic_mode=$pic_mode
 
9471
 
 
9472
# What is the maximum length of a command?
 
9473
max_cmd_len=$lt_cv_sys_max_cmd_len
 
9474
 
 
9475
# Does compiler simultaneously support -c and -o options?
 
9476
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
9477
 
 
9478
# Must we lock files when doing compilation ?
 
9479
need_locks=$lt_need_locks
 
9480
 
 
9481
# Do we need the lib prefix for modules?
 
9482
need_lib_prefix=$need_lib_prefix
 
9483
 
 
9484
# Do we need a version for libraries?
 
9485
need_version=$need_version
 
9486
 
 
9487
# Whether dlopen is supported.
 
9488
dlopen_support=$enable_dlopen
 
9489
 
 
9490
# Whether dlopen of programs is supported.
 
9491
dlopen_self=$enable_dlopen_self
 
9492
 
 
9493
# Whether dlopen of statically linked programs is supported.
 
9494
dlopen_self_static=$enable_dlopen_self_static
 
9495
 
 
9496
# Compiler flag to prevent dynamic linking.
 
9497
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
 
9498
 
 
9499
# Compiler flag to turn off builtin functions.
 
9500
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
 
9501
 
 
9502
# Compiler flag to allow reflexive dlopens.
 
9503
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
 
9504
 
 
9505
# Compiler flag to generate shared objects directly from archives.
 
9506
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
 
9507
 
 
9508
# Compiler flag to generate thread-safe objects.
 
9509
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
 
9510
 
 
9511
# Library versioning type.
 
9512
version_type=$version_type
 
9513
 
 
9514
# Format of library name prefix.
 
9515
libname_spec=$lt_libname_spec
 
9516
 
 
9517
# List of archive names.  First name is the real one, the rest are links.
 
9518
# The last name is the one that the linker finds with -lNAME.
 
9519
library_names_spec=$lt_library_names_spec
 
9520
 
 
9521
# The coded name of the library, if different from the real name.
 
9522
soname_spec=$lt_soname_spec
 
9523
 
 
9524
# Commands used to build and install an old-style archive.
 
9525
RANLIB=$lt_RANLIB
 
9526
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
 
9527
old_postinstall_cmds=$lt_old_postinstall_cmds
 
9528
old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
9529
 
 
9530
# Create an old-style archive from a shared archive.
 
9531
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
 
9532
 
 
9533
# Create a temporary old-style archive to link instead of a shared archive.
 
9534
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
 
9535
 
 
9536
# Commands used to build and install a shared archive.
 
9537
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
9538
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
 
9539
postinstall_cmds=$lt_postinstall_cmds
 
9540
postuninstall_cmds=$lt_postuninstall_cmds
 
9541
 
 
9542
# Commands used to build a loadable module (assumed same as above if empty)
 
9543
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
 
9544
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
9545
 
 
9546
# Commands to strip libraries.
 
9547
old_striplib=$lt_old_striplib
 
9548
striplib=$lt_striplib
 
9549
 
 
9550
# Dependencies to place before the objects being linked to create a
 
9551
# shared library.
 
9552
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
9553
 
 
9554
# Dependencies to place after the objects being linked to create a
 
9555
# shared library.
 
9556
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
9557
 
 
9558
# Dependencies to place before the objects being linked to create a
 
9559
# shared library.
 
9560
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
9561
 
 
9562
# Dependencies to place after the objects being linked to create a
 
9563
# shared library.
 
9564
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
9565
 
 
9566
# The library search path used internally by the compiler when linking
 
9567
# a shared library.
 
9568
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
9569
 
 
9570
# Method to check whether dependent libraries are shared objects.
 
9571
deplibs_check_method=$lt_deplibs_check_method
 
9572
 
 
9573
# Command to use when deplibs_check_method == file_magic.
 
9574
file_magic_cmd=$lt_file_magic_cmd
 
9575
 
 
9576
# Flag that allows shared libraries with undefined symbols to be built.
 
9577
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
9578
 
 
9579
# Flag that forces no undefined symbols.
 
9580
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
 
9581
 
 
9582
# Commands used to finish a libtool library installation in a directory.
 
9583
finish_cmds=$lt_finish_cmds
 
9584
 
 
9585
# Same as above, but a single script fragment to be evaled but not shown.
 
9586
finish_eval=$lt_finish_eval
 
9587
 
 
9588
# Take the output of nm and produce a listing of raw symbols and C names.
 
9589
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
9590
 
 
9591
# Transform the output of nm in a proper C declaration
 
9592
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
9593
 
 
9594
# Transform the output of nm in a C name address pair
 
9595
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
9596
 
 
9597
# This is the shared library runtime path variable.
 
9598
runpath_var=$runpath_var
 
9599
 
 
9600
# This is the shared library path variable.
 
9601
shlibpath_var=$shlibpath_var
 
9602
 
 
9603
# Is shlibpath searched before the hard-coded library search path?
 
9604
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
9605
 
 
9606
# How to hardcode a shared library path into an executable.
 
9607
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
 
9608
 
 
9609
# Whether we should hardcode library paths into libraries.
 
9610
hardcode_into_libs=$hardcode_into_libs
 
9611
 
 
9612
# Flag to hardcode \$libdir into a binary during linking.
 
9613
# This must work even if \$libdir does not exist.
 
9614
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
9615
 
 
9616
# If ld is used when linking, flag to hardcode \$libdir into
 
9617
# a binary during linking. This must work even if \$libdir does
 
9618
# not exist.
 
9619
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
 
9620
 
 
9621
# Whether we need a single -rpath flag with a separated argument.
 
9622
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
 
9623
 
 
9624
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 
9625
# resulting binary.
 
9626
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
 
9627
 
 
9628
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 
9629
# resulting binary.
 
9630
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
 
9631
 
 
9632
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 
9633
# the resulting binary.
 
9634
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
9635
 
 
9636
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
9637
# and all subsequent libraries and executables linked against it.
 
9638
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
 
9639
 
 
9640
# Variables whose values should be saved in libtool wrapper scripts and
 
9641
# restored at relink time.
 
9642
variables_saved_for_relink="$variables_saved_for_relink"
 
9643
 
 
9644
# Whether libtool must link a program against all its dependency libraries.
 
9645
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
 
9646
 
 
9647
# Compile-time system search path for libraries
 
9648
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
9649
 
 
9650
# Run-time system search path for libraries
 
9651
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
9652
 
 
9653
# Fix the shell variable \$srcfile for the compiler.
 
9654
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
 
9655
 
 
9656
# Set to yes if exported symbols are required.
 
9657
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
 
9658
 
 
9659
# The commands to list exported symbols.
 
9660
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
 
9661
 
 
9662
# The commands to extract the exported symbol list from a shared archive.
 
9663
extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
9664
 
 
9665
# Symbols that should not be listed in the preloaded symbols.
 
9666
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
 
9667
 
 
9668
# Symbols that must always be exported.
 
9669
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
 
9670
 
 
9671
ifelse([$1],[],
 
9672
[# ### END LIBTOOL CONFIG],
 
9673
[# ### END LIBTOOL TAG CONFIG: $tagname])
 
9674
 
 
9675
__EOF__
 
9676
 
 
9677
ifelse([$1],[], [
 
9678
  case $host_os in
 
9679
  aix3*)
 
9680
    cat <<\EOF >> "$cfgfile"
 
9681
 
 
9682
# AIX sometimes has problems with the GCC collect2 program.  For some
 
9683
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
9684
# vanish in a puff of smoke.
 
9685
if test "X${COLLECT_NAMES+set}" != Xset; then
 
9686
  COLLECT_NAMES=
 
9687
  export COLLECT_NAMES
 
9688
fi
 
9689
EOF
 
9690
    ;;
 
9691
  esac
 
9692
 
 
9693
  # We use sed instead of cat because bash on DJGPP gets confused if
 
9694
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
9695
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
9696
  # is reportedly fixed, but why not run on old versions too?
 
9697
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
9698
 
 
9699
  mv -f "$cfgfile" "$ofile" || \
 
9700
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
9701
  chmod +x "$ofile"
 
9702
])
 
9703
else
 
9704
  # If there is no Makefile yet, we rely on a make rule to execute
 
9705
  # `config.status --recheck' to rerun these tests and create the
 
9706
  # libtool script then.
 
9707
  test -f Makefile && make "$ltmain"
 
9708
fi
 
9709
])# AC_LIBTOOL_CONFIG
 
9710
 
 
9711
 
 
9712
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
9713
# -------------------------------------------
 
9714
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
9715
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
9716
 
 
9717
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
9718
 
 
9719
if test "$GCC" = yes; then
 
9720
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
9721
 
 
9722
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
9723
    lt_cv_prog_compiler_rtti_exceptions,
 
9724
    [-fno-rtti -fno-exceptions], [],
 
9725
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
9726
fi
 
9727
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
9728
 
 
9729
 
 
9730
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
9731
# ---------------------------------
 
9732
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
9733
[AC_REQUIRE([AC_CANONICAL_HOST])
 
9734
AC_REQUIRE([AC_PROG_NM])
 
9735
AC_REQUIRE([AC_OBJEXT])
 
9736
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
9737
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
9738
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
9739
[
 
9740
# These are sane defaults that work on at least a few old systems.
 
9741
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
9742
 
 
9743
# Character class describing NM global symbol codes.
 
9744
symcode='[[BCDEGRST]]'
 
9745
 
 
9746
# Regexp to match symbols that can be accessed directly from C.
 
9747
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
9748
 
 
9749
# Transform the above into a raw symbol and a C symbol.
 
9750
symxfrm='\1 \2\3 \3'
 
9751
 
 
9752
# Transform an extracted symbol line into a proper C declaration
 
9753
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
9754
 
 
9755
# Transform an extracted symbol line into symbol name and symbol address
 
9756
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'"
 
9757
 
 
9758
# Define system-specific variables.
 
9759
case $host_os in
 
9760
aix*)
 
9761
  symcode='[[BCDT]]'
 
9762
  ;;
 
9763
cygwin* | mingw* | pw32*)
 
9764
  symcode='[[ABCDGISTW]]'
 
9765
  ;;
 
9766
hpux*) # Its linker distinguishes data from code symbols
 
9767
  if test "$host_cpu" = ia64; then
 
9768
    symcode='[[ABCDEGRST]]'
 
9769
  fi
 
9770
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
9771
  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'"
 
9772
  ;;
 
9773
irix* | nonstopux*)
 
9774
  symcode='[[BCDEGRST]]'
 
9775
  ;;
 
9776
osf*)
 
9777
  symcode='[[BCDEGQRST]]'
 
9778
  ;;
 
9779
solaris* | sysv5*)
 
9780
  symcode='[[BDT]]'
 
9781
  ;;
 
9782
sysv4)
 
9783
  symcode='[[DFNSTU]]'
 
9784
  ;;
 
9785
esac
 
9786
 
 
9787
# Handle CRLF in mingw tool chain
 
9788
opt_cr=
 
9789
case $build_os in
 
9790
mingw*)
 
9791
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
9792
  ;;
 
9793
esac
 
9794
 
 
9795
# If we're using GNU nm, then use its standard symbol codes.
 
9796
case `$NM -V 2>&1` in
 
9797
*GNU* | *'with BFD'*)
 
9798
  symcode='[[ABCDGISTW]]' ;;
 
9799
esac
 
9800
 
 
9801
# Try without a prefix undercore, then with it.
 
9802
for ac_symprfx in "" "_"; do
 
9803
 
 
9804
  # Write the raw and C identifiers.
 
9805
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
9806
 
 
9807
  # Check to see that the pipe works correctly.
 
9808
  pipe_works=no
 
9809
 
 
9810
  rm -f conftest*
 
9811
  cat > conftest.$ac_ext <<EOF
 
9812
#ifdef __cplusplus
 
9813
extern "C" {
 
9814
#endif
 
9815
char nm_test_var;
 
9816
void nm_test_func(){}
 
9817
#ifdef __cplusplus
 
9818
}
 
9819
#endif
 
9820
int main(){nm_test_var='a';nm_test_func();return(0);}
 
9821
EOF
 
9822
 
 
9823
  if AC_TRY_EVAL(ac_compile); then
 
9824
    # Now try to grab the symbols.
 
9825
    nlist=conftest.nm
 
9826
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
9827
      # Try sorting and uniquifying the output.
 
9828
      if sort "$nlist" | uniq > "$nlist"T; then
 
9829
        mv -f "$nlist"T "$nlist"
 
9830
      else
 
9831
        rm -f "$nlist"T
 
9832
      fi
 
9833
 
 
9834
      # Make sure that we snagged all the symbols we need.
 
9835
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 
9836
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
 
9837
          cat <<EOF > conftest.$ac_ext
 
9838
#ifdef __cplusplus
 
9839
extern "C" {
 
9840
#endif
 
9841
 
 
9842
EOF
 
9843
          # Now generate the symbol file.
 
9844
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
9845
 
 
9846
          cat <<EOF >> conftest.$ac_ext
 
9847
#if defined (__STDC__) && __STDC__
 
9848
# define lt_ptr_t void *
 
9849
#else
 
9850
# define lt_ptr_t char *
 
9851
# define const
 
9852
#endif
 
9853
 
 
9854
/* The mapping between symbol names and symbols. */
 
9855
const struct {
 
9856
  const char *name;
 
9857
  lt_ptr_t address;
 
9858
}
 
9859
lt_preloaded_symbols[[]] =
 
9860
{
 
9861
EOF
 
9862
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
9863
          cat <<\EOF >> conftest.$ac_ext
 
9864
  {0, (lt_ptr_t) 0}
 
9865
};
 
9866
 
 
9867
#ifdef __cplusplus
 
9868
}
 
9869
#endif
 
9870
EOF
 
9871
          # Now try linking the two files.
 
9872
          mv conftest.$ac_objext conftstm.$ac_objext
 
9873
          lt_save_LIBS="$LIBS"
 
9874
          lt_save_CFLAGS="$CFLAGS"
 
9875
          LIBS="conftstm.$ac_objext"
 
9876
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
9877
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
9878
            pipe_works=yes
 
9879
          fi
 
9880
          LIBS="$lt_save_LIBS"
 
9881
          CFLAGS="$lt_save_CFLAGS"
 
9882
        else
 
9883
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
9884
        fi
 
9885
      else
 
9886
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
9887
      fi
 
9888
    else
 
9889
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
9890
    fi
 
9891
  else
 
9892
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
9893
    cat conftest.$ac_ext >&5
 
9894
  fi
 
9895
  rm -f conftest* conftst*
 
9896
 
 
9897
  # Do not use the global_symbol_pipe unless it works.
 
9898
  if test "$pipe_works" = yes; then
 
9899
    break
 
9900
  else
 
9901
    lt_cv_sys_global_symbol_pipe=
 
9902
  fi
 
9903
done
 
9904
])
 
9905
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
9906
  lt_cv_sys_global_symbol_to_cdecl=
 
9907
fi
 
9908
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
9909
  AC_MSG_RESULT(failed)
 
9910
else
 
9911
  AC_MSG_RESULT(ok)
 
9912
fi
 
9913
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
9914
 
 
9915
 
 
9916
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
9917
# ---------------------------------------
 
9918
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
9919
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
9920
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9921
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
9922
 
 
9923
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
9924
 ifelse([$1],[CXX],[
 
9925
  # C++ specific cases for pic, static, wl, etc.
 
9926
  if test "$GXX" = yes; then
 
9927
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9928
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
9929
 
 
9930
    case $host_os in
 
9931
    aix*)
 
9932
      # All AIX code is PIC.
 
9933
      if test "$host_cpu" = ia64; then
 
9934
        # AIX 5 now supports IA64 processor
 
9935
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9936
      fi
 
9937
      ;;
 
9938
    amigaos*)
 
9939
      # FIXME: we need at least 68020 code to build shared libraries, but
 
9940
      # adding the `-m68020' flag to GCC prevents building anything better,
 
9941
      # like `-m68040'.
 
9942
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
9943
      ;;
 
9944
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
9945
      # PIC is the default for these OSes.
 
9946
      ;;
 
9947
    mingw* | os2* | pw32*)
 
9948
      # This hack is so that the source file can tell whether it is being
 
9949
      # built for inclusion in a dll (and should export symbols for example).
 
9950
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
9951
      ;;
 
9952
    darwin* | rhapsody*)
 
9953
      # PIC is the default on this platform
 
9954
      # Common symbols not allowed in MH_DYLIB files
 
9955
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
9956
      ;;
 
9957
    *djgpp*)
 
9958
      # DJGPP does not support shared libraries at all
 
9959
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9960
      ;;
 
9961
    sysv4*MP*)
 
9962
      if test -d /usr/nec; then
 
9963
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
9964
      fi
 
9965
      ;;
 
9966
    hpux*)
 
9967
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
9968
      # not for PA HP-UX.
 
9969
      case "$host_cpu" in
 
9970
      hppa*64*|ia64*)
 
9971
        ;;
 
9972
      *)
 
9973
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9974
        ;;
 
9975
      esac
 
9976
      ;;
 
9977
    *)
 
9978
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9979
      ;;
 
9980
    esac
 
9981
  else
 
9982
    case $host_os in
 
9983
      aix4* | aix5*)
 
9984
        # All AIX code is PIC.
 
9985
        if test "$host_cpu" = ia64; then
 
9986
          # AIX 5 now supports IA64 processor
 
9987
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9988
        else
 
9989
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
9990
        fi
 
9991
        ;;
 
9992
      chorus*)
 
9993
        case $cc_basename in
 
9994
        cxch68)
 
9995
          # Green Hills C++ Compiler
 
9996
          # _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"
 
9997
          ;;
 
9998
        esac
 
9999
        ;;
 
10000
      dgux*)
 
10001
        case $cc_basename in
 
10002
          ec++)
 
10003
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10004
            ;;
 
10005
          ghcx)
 
10006
            # Green Hills C++ Compiler
 
10007
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10008
            ;;
 
10009
          *)
 
10010
            ;;
 
10011
        esac
 
10012
        ;;
 
10013
      freebsd*)
 
10014
        # FreeBSD uses GNU C++
 
10015
        ;;
 
10016
      hpux9* | hpux10* | hpux11*)
 
10017
        case $cc_basename in
 
10018
          CC)
 
10019
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10020
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
10021
            if test "$host_cpu" != ia64; then
 
10022
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
10023
            fi
 
10024
            ;;
 
10025
          aCC)
 
10026
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10027
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
10028
            case "$host_cpu" in
 
10029
            hppa*64*|ia64*)
 
10030
              # +Z the default
 
10031
              ;;
 
10032
            *)
 
10033
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
10034
              ;;
 
10035
            esac
 
10036
            ;;
 
10037
          *)
 
10038
            ;;
 
10039
        esac
 
10040
        ;;
 
10041
      irix5* | irix6* | nonstopux*)
 
10042
        case $cc_basename in
 
10043
          CC)
 
10044
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10045
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10046
            # CC pic flag -KPIC is the default.
 
10047
            ;;
 
10048
          *)
 
10049
            ;;
 
10050
        esac
 
10051
        ;;
 
10052
      linux*)
 
10053
        case $cc_basename in
 
10054
          KCC)
 
10055
            # KAI C++ Compiler
 
10056
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
10057
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10058
            ;;
 
10059
          icpc)
 
10060
            # Intel C++
 
10061
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10062
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10063
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
10064
            ;; 
 
10065
          cxx)
 
10066
            # Compaq C++
 
10067
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
10068
            # Linux and Compaq Tru64 Unix objects are PIC.
 
10069
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10070
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10071
            ;;
 
10072
          *)
 
10073
            ;;
 
10074
        esac
 
10075
        ;;
 
10076
      lynxos*)
 
10077
        ;;
 
10078
      m88k*)
 
10079
        ;;
 
10080
      mvs*)
 
10081
        case $cc_basename in
 
10082
          cxx)
 
10083
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
10084
            ;;
 
10085
          *)
 
10086
            ;;
 
10087
        esac
 
10088
        ;;
 
10089
      netbsd*)
 
10090
        ;;
 
10091
      osf3* | osf4* | osf5*)
 
10092
        case $cc_basename in
 
10093
          KCC)
 
10094
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
10095
            ;;
 
10096
          RCC)
 
10097
            # Rational C++ 2.4.1
 
10098
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10099
            ;;
 
10100
          cxx)
 
10101
            # Digital/Compaq C++
 
10102
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10103
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
10104
            # Linux and Compaq Tru64 Unix objects are PIC.
 
10105
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10106
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10107
            ;;
 
10108
          *)
 
10109
            ;;
 
10110
        esac
 
10111
        ;;
 
10112
      psos*)
 
10113
        ;;
 
10114
      sco*)
 
10115
        case $cc_basename in
 
10116
          CC)
 
10117
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10118
            ;;
 
10119
          *)
 
10120
            ;;
 
10121
        esac
 
10122
        ;;
 
10123
      solaris*)
 
10124
        case $cc_basename in
 
10125
          CC)
 
10126
            # Sun C++ 4.2, 5.x and Centerline C++
 
10127
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10128
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10129
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
10130
            ;;
 
10131
          gcx)
 
10132
            # Green Hills C++ Compiler
 
10133
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
10134
            ;;
 
10135
          *)
 
10136
            ;;
 
10137
        esac
 
10138
        ;;
 
10139
      sunos4*)
 
10140
        case $cc_basename in
 
10141
          CC)
 
10142
            # Sun C++ 4.x
 
10143
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10144
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10145
            ;;
 
10146
          lcc)
 
10147
            # Lucid
 
10148
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10149
            ;;
 
10150
          *)
 
10151
            ;;
 
10152
        esac
 
10153
        ;;
 
10154
      tandem*)
 
10155
        case $cc_basename in
 
10156
          NCC)
 
10157
            # NonStop-UX NCC 3.20
 
10158
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10159
            ;;
 
10160
          *)
 
10161
            ;;
 
10162
        esac
 
10163
        ;;
 
10164
      unixware*)
 
10165
        ;;
 
10166
      vxworks*)
 
10167
        ;;
 
10168
      *)
 
10169
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
10170
        ;;
 
10171
    esac
 
10172
  fi
 
10173
],
 
10174
[
 
10175
  if test "$GCC" = yes; then
 
10176
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10177
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
10178
 
 
10179
    case $host_os in
 
10180
      aix*)
 
10181
      # All AIX code is PIC.
 
10182
      if test "$host_cpu" = ia64; then
 
10183
        # AIX 5 now supports IA64 processor
 
10184
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10185
      fi
 
10186
      ;;
 
10187
 
 
10188
    amigaos*)
 
10189
      # FIXME: we need at least 68020 code to build shared libraries, but
 
10190
      # adding the `-m68020' flag to GCC prevents building anything better,
 
10191
      # like `-m68040'.
 
10192
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
10193
      ;;
 
10194
 
 
10195
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
10196
      # PIC is the default for these OSes.
 
10197
      ;;
 
10198
 
 
10199
    mingw* | pw32* | os2*)
 
10200
      # This hack is so that the source file can tell whether it is being
 
10201
      # built for inclusion in a dll (and should export symbols for example).
 
10202
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
10203
      ;;
 
10204
 
 
10205
    darwin* | rhapsody*)
 
10206
      # PIC is the default on this platform
 
10207
      # Common symbols not allowed in MH_DYLIB files
 
10208
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
10209
      ;;
 
10210
 
 
10211
    msdosdjgpp*)
 
10212
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
10213
      # on systems that don't support them.
 
10214
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
10215
      enable_shared=no
 
10216
      ;;
 
10217
 
 
10218
    sysv4*MP*)
 
10219
      if test -d /usr/nec; then
 
10220
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
10221
      fi
 
10222
      ;;
 
10223
 
 
10224
    hpux*)
 
10225
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
10226
      # not for PA HP-UX.
 
10227
      case "$host_cpu" in
 
10228
      hppa*64*|ia64*)
 
10229
        # +Z the default
 
10230
        ;;
 
10231
      *)
 
10232
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10233
        ;;
 
10234
      esac
 
10235
      ;;
 
10236
 
 
10237
    *)
 
10238
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10239
      ;;
 
10240
    esac
 
10241
  else
 
10242
    # PORTME Check for flag to pass linker flags through the system compiler.
 
10243
    case $host_os in
 
10244
    aix*)
 
10245
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10246
      if test "$host_cpu" = ia64; then
 
10247
        # AIX 5 now supports IA64 processor
 
10248
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10249
      else
 
10250
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
10251
      fi
 
10252
      ;;
 
10253
 
 
10254
    mingw* | pw32* | os2*)
 
10255
      # This hack is so that the source file can tell whether it is being
 
10256
      # built for inclusion in a dll (and should export symbols for example).
 
10257
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
10258
      ;;
 
10259
 
 
10260
    hpux9* | hpux10* | hpux11*)
 
10261
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10262
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
10263
      # not for PA HP-UX.
 
10264
      case "$host_cpu" in
 
10265
      hppa*64*|ia64*)
 
10266
        # +Z the default
 
10267
        ;;
 
10268
      *)
 
10269
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
10270
        ;;
 
10271
      esac
 
10272
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
10273
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
10274
      ;;
 
10275
 
 
10276
    irix5* | irix6* | nonstopux*)
 
10277
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10278
      # PIC (with -KPIC) is the default.
 
10279
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10280
      ;;
 
10281
 
 
10282
    newsos6)
 
10283
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10284
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10285
      ;;
 
10286
 
 
10287
    linux*)
 
10288
      case $CC in
 
10289
      icc* | ecc*)
 
10290
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10291
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10292
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
10293
        ;;
 
10294
      ccc*)
 
10295
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10296
        # All Alpha code is PIC.
 
10297
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10298
        ;;
 
10299
      esac
 
10300
      ;;
 
10301
 
 
10302
    osf3* | osf4* | osf5*)
 
10303
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10304
      # All OSF/1 code is PIC.
 
10305
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10306
      ;;
 
10307
 
 
10308
    sco3.2v5*)
 
10309
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
 
10310
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
 
10311
      ;;
 
10312
 
 
10313
    solaris*)
 
10314
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10315
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10316
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10317
      ;;
 
10318
 
 
10319
    sunos4*)
 
10320
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
10321
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
10322
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10323
      ;;
 
10324
 
 
10325
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
10326
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10327
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10328
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10329
      ;;
 
10330
 
 
10331
    sysv4*MP*)
 
10332
      if test -d /usr/nec ;then
 
10333
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
10334
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10335
      fi
 
10336
      ;;
 
10337
 
 
10338
    uts4*)
 
10339
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10340
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10341
      ;;
 
10342
 
 
10343
    *)
 
10344
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
10345
      ;;
 
10346
    esac
 
10347
  fi
 
10348
])
 
10349
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
10350
 
 
10351
#
 
10352
# Check to make sure the PIC flag actually works.
 
10353
#
 
10354
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
10355
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
10356
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
10357
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
 
10358
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
10359
     "" | " "*) ;;
 
10360
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
10361
     esac],
 
10362
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10363
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
10364
fi
 
10365
case "$host_os" in
 
10366
  # For platforms which do not support PIC, -DPIC is meaningless:
 
10367
  *djgpp*)
 
10368
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10369
    ;;
 
10370
  *)
 
10371
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
 
10372
    ;;
 
10373
esac
 
10374
])
 
10375
 
 
10376
 
 
10377
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
10378
# ------------------------------------
 
10379
# See if the linker supports building shared libraries.
 
10380
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
10381
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
10382
ifelse([$1],[CXX],[
 
10383
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
10384
  case $host_os in
 
10385
  aix4* | aix5*)
 
10386
    # If we're using GNU nm, then we don't want the "-C" option.
 
10387
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
10388
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
10389
      _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'
 
10390
    else
 
10391
      _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'
 
10392
    fi
 
10393
    ;;
 
10394
  pw32*)
 
10395
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
10396
  ;;
 
10397
  cygwin* | mingw*)
 
10398
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
10399
  ;;
 
10400
  *)
 
10401
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
10402
  ;;
 
10403
  esac
 
10404
],[
 
10405
  runpath_var=
 
10406
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
10407
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
10408
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
10409
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
10410
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
10411
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
10412
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
10413
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
10414
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
10415
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
10416
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
10417
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
10418
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10419
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
10420
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
10421
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
10422
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
10423
  _LT_AC_TAGVAR(module_cmds, $1)=
 
10424
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
 
10425
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
10426
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
10427
  # include_expsyms should be a list of space-separated symbols to be *always*
 
10428
  # included in the symbol list
 
10429
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
10430
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
10431
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
10432
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
10433
  # as well as any symbol that contains `d'.
 
10434
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
10435
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
10436
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
10437
  # the symbol is explicitly referenced.  Since portable code cannot
 
10438
  # rely on this symbol name, it's probably fine to never include it in
 
10439
  # preloaded symbol tables.
 
10440
  extract_expsyms_cmds=
 
10441
 
 
10442
  case $host_os in
 
10443
  cygwin* | mingw* | pw32*)
 
10444
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
10445
    # When not using gcc, we currently assume that we are using
 
10446
    # Microsoft Visual C++.
 
10447
    if test "$GCC" != yes; then
 
10448
      with_gnu_ld=no
 
10449
    fi
 
10450
    ;;
 
10451
  openbsd*)
 
10452
    with_gnu_ld=no
 
10453
    ;;
 
10454
  esac
 
10455
 
 
10456
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
10457
  if test "$with_gnu_ld" = yes; then
 
10458
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
10459
    wlarc='${wl}'
 
10460
 
 
10461
    # See if GNU ld supports shared libraries.
 
10462
    case $host_os in
 
10463
    aix3* | aix4* | aix5*)
 
10464
      # On AIX/PPC, the GNU linker is very broken
 
10465
      if test "$host_cpu" != ia64; then
 
10466
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10467
        cat <<EOF 1>&2
 
10468
 
 
10469
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
10470
*** to be unable to reliably create shared libraries on AIX.
 
10471
*** Therefore, libtool is disabling shared libraries support.  If you
 
10472
*** really care for shared libraries, you may want to modify your PATH
 
10473
*** so that a non-GNU linker is found, and then restart.
 
10474
 
 
10475
EOF
 
10476
      fi
 
10477
      ;;
 
10478
 
 
10479
    amigaos*)
 
10480
      _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)'
 
10481
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10482
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10483
 
 
10484
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
10485
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
10486
      # to version 4, is to share data among multiple programs linked
 
10487
      # with the same dynamic library.  Since this doesn't match the
 
10488
      # behavior of shared libraries on other platforms, we can't use
 
10489
      # them.
 
10490
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10491
      ;;
 
10492
 
 
10493
    beos*)
 
10494
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
10495
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10496
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
10497
        # support --undefined.  This deserves some investigation.  FIXME
 
10498
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
10499
      else
 
10500
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10501
      fi
 
10502
      ;;
 
10503
 
 
10504
    cygwin* | mingw* | pw32*)
 
10505
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
10506
      # as there is no search path for DLLs.
 
10507
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10508
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
 
10509
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
10510
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
10511
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
10512
 
 
10513
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
10514
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
10515
        # If the export-symbols file already is a .def file (1st line
 
10516
        # is EXPORTS), use it as is; otherwise, prepend...
 
10517
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
10518
          cp $export_symbols $output_objdir/$soname.def;
 
10519
        else
 
10520
          echo EXPORTS > $output_objdir/$soname.def;
 
10521
          cat $export_symbols >> $output_objdir/$soname.def;
 
10522
        fi~
 
10523
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
10524
      else
 
10525
        ld_shlibs=no
 
10526
      fi
 
10527
      ;;
 
10528
 
 
10529
    netbsd*)
 
10530
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
10531
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
10532
        wlarc=
 
10533
      else
 
10534
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
10535
        _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'
 
10536
      fi
 
10537
      ;;
 
10538
 
 
10539
    solaris* | sysv5*)
 
10540
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 
10541
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10542
        cat <<EOF 1>&2
 
10543
 
 
10544
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
10545
*** create shared libraries on Solaris systems.  Therefore, libtool
 
10546
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
10547
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
10548
*** your PATH or compiler configuration so that the native linker is
 
10549
*** used, and then restart.
 
10550
 
 
10551
EOF
 
10552
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
10553
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
10554
        _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'
 
10555
      else
 
10556
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10557
      fi
 
10558
      ;;
 
10559
 
 
10560
    sunos4*)
 
10561
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10562
      wlarc=
 
10563
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10564
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10565
      ;;
 
10566
 
 
10567
    *)
 
10568
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
10569
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
10570
        _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'
 
10571
      else
 
10572
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10573
      fi
 
10574
      ;;
 
10575
    esac
 
10576
 
 
10577
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
 
10578
      runpath_var=LD_RUN_PATH
 
10579
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
10580
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
10581
      # ancient GNU ld didn't support --whole-archive et. al.
 
10582
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
10583
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
10584
      else
 
10585
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
10586
      fi
 
10587
    fi
 
10588
  else
 
10589
    # PORTME fill in a description of your system's linker (not GNU ld)
 
10590
    case $host_os in
 
10591
    aix3*)
 
10592
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10593
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
10594
      _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'
 
10595
      # Note: this linker hardcodes the directories in LIBPATH if there
 
10596
      # are no directories specified by -L.
 
10597
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10598
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
10599
        # Neither direct hardcoding nor static linking is supported with a
 
10600
        # broken collect2.
 
10601
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
10602
      fi
 
10603
      ;;
 
10604
 
 
10605
    aix4* | aix5*)
 
10606
      if test "$host_cpu" = ia64; then
 
10607
        # On IA64, the linker does run time linking by default, so we don't
 
10608
        # have to do anything special.
 
10609
        aix_use_runtimelinking=no
 
10610
        exp_sym_flag='-Bexport'
 
10611
        no_entry_flag=""
 
10612
      else
 
10613
        # If we're using GNU nm, then we don't want the "-C" option.
 
10614
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
10615
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
10616
          _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'
 
10617
        else
 
10618
          _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'
 
10619
        fi
 
10620
 
 
10621
        # KDE requires run time linking.  Make it the default.
 
10622
        aix_use_runtimelinking=yes
 
10623
        exp_sym_flag='-bexport'
 
10624
        no_entry_flag='-bnoentry'
 
10625
      fi
 
10626
 
 
10627
      # When large executables or shared objects are built, AIX ld can
 
10628
      # have problems creating the table of contents.  If linking a library
 
10629
      # or program results in "error TOC overflow" add -mminimal-toc to
 
10630
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
10631
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
10632
 
 
10633
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
10634
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10635
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
10636
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10637
 
 
10638
      if test "$GCC" = yes; then
 
10639
        case $host_os in aix4.[012]|aix4.[012].*)
 
10640
        # We only want to do this on AIX 4.2 and lower, the check
 
10641
        # below for broken collect2 doesn't work under 4.3+
 
10642
          collect2name=`${CC} -print-prog-name=collect2`
 
10643
          if test -f "$collect2name" && \
 
10644
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
10645
          then
 
10646
          # We have reworked collect2
 
10647
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10648
          else
 
10649
          # We have old collect2
 
10650
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
10651
          # It fails to find uninstalled libraries when the uninstalled
 
10652
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
10653
          # to unsupported forces relinking
 
10654
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10655
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10656
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
10657
          fi
 
10658
        esac
 
10659
        shared_flag='-shared'
 
10660
      else
 
10661
        # not using gcc
 
10662
        if test "$host_cpu" = ia64; then
 
10663
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
10664
        # chokes on -Wl,-G. The following line is correct:
 
10665
          shared_flag='-G'
 
10666
        else
 
10667
        if test "$aix_use_runtimelinking" = yes; then
 
10668
            shared_flag='-qmkshrobj ${wl}-G'
 
10669
          else
 
10670
            shared_flag='-qmkshrobj'
 
10671
        fi
 
10672
        fi
 
10673
      fi
 
10674
 
 
10675
      # Let the compiler handle the export list.
 
10676
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
10677
      if test "$aix_use_runtimelinking" = yes; then
 
10678
        # Warning - without using the other runtime loading flags (-brtl),
 
10679
        # -berok will link without error, but may produce a broken library.
 
10680
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
10681
       # Determine the default libpath from the value encoded in an empty executable.
 
10682
        _LT_AC_SYS_LIBPATH_AIX
 
10683
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
10684
        _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"
 
10685
        _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"
 
10686
       else
 
10687
        if test "$host_cpu" = ia64; then
 
10688
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
10689
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
10690
          _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"
 
10691
        else
 
10692
         # Determine the default libpath from the value encoded in an empty executable.
 
10693
         _LT_AC_SYS_LIBPATH_AIX
 
10694
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
10695
          # Warning - without using the other run time loading flags,
 
10696
          # -berok will link without error, but may produce a broken library.
 
10697
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
10698
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
10699
          # -bexpall does not export symbols beginning with underscore (_)
 
10700
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
10701
          # Exported symbols can be pulled into shared objects from archives
 
10702
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
10703
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
10704
          # This is similar to how AIX traditionally builds it's shared libraries.
 
10705
          _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'
 
10706
        fi
 
10707
      fi
 
10708
      ;;
 
10709
 
 
10710
    amigaos*)
 
10711
      _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)'
 
10712
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10713
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10714
      # see comment about different semantics on the GNU ld section
 
10715
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10716
      ;;
 
10717
 
 
10718
    bsdi4*)
 
10719
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
10720
      ;;
 
10721
 
 
10722
    cygwin* | mingw* | pw32*)
 
10723
      # When not using gcc, we currently assume that we are using
 
10724
      # Microsoft Visual C++.
 
10725
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
10726
      # no search path for DLLs.
 
10727
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
10728
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
 
10729
      # Tell ltmain to make .lib files, not .a files.
 
10730
      libext=lib
 
10731
      # Tell ltmain to make .dll files, not .so files.
 
10732
      shrext=".dll"
 
10733
      # FIXME: Setting linknames here is a bad hack.
 
10734
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
10735
      # The linker will automatically build a .lib file if we build a DLL.
 
10736
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
10737
      # FIXME: Should let the user specify the lib program.
 
10738
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
10739
      fix_srcfile_path='`cygpath -w "$srcfile"`'
 
10740
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
10741
      ;;
 
10742
 
 
10743
    darwin* | rhapsody*)
 
10744
    if test "$GXX" = yes ; then
 
10745
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
10746
      case "$host_os" in
 
10747
      rhapsody* | darwin1.[[012]])
 
10748
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
10749
        ;;
 
10750
      *) # Darwin 1.3 on
 
10751
        test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
10752
        ;;
 
10753
      esac
 
10754
        lt_int_apple_cc_single_mod=no
 
10755
        output_verbose_link_cmd='echo'
 
10756
        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
 
10757
          lt_int_apple_cc_single_mod=yes
 
10758
        fi
 
10759
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
10760
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
10761
        else
 
10762
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
10763
      fi
 
10764
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
10765
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
10766
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
10767
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
10768
        else
 
10769
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
10770
        fi
 
10771
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
10772
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10773
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
10774
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
10775
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
10776
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10777
    else  
 
10778
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10779
    fi  
 
10780
      ;;
 
10781
 
 
10782
    dgux*)
 
10783
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10784
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10785
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10786
      ;;
 
10787
 
 
10788
    freebsd1*)
 
10789
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10790
      ;;
 
10791
 
 
10792
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
10793
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
10794
    # does not break anything, and helps significantly (at the cost of a little
 
10795
    # extra space).
 
10796
    freebsd2.2*)
 
10797
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
10798
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10799
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10800
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10801
      ;;
 
10802
 
 
10803
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
10804
    freebsd2*)
 
10805
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10806
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10807
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10808
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10809
      ;;
 
10810
 
 
10811
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
10812
    freebsd*)
 
10813
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
10814
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10815
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10816
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10817
      ;;
 
10818
 
 
10819
    hpux9*)
 
10820
      if test "$GCC" = yes; then
 
10821
        _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'
 
10822
      else
 
10823
        _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'
 
10824
      fi
 
10825
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
10826
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10827
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10828
 
 
10829
      # hardcode_minus_L: Not really in the search PATH,
 
10830
      # but as the default location of the library.
 
10831
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10832
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10833
      ;;
 
10834
 
 
10835
    hpux10* | hpux11*)
 
10836
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
10837
        case "$host_cpu" in
 
10838
        hppa*64*|ia64*)
 
10839
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10840
          ;;
 
10841
        *)
 
10842
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
10843
          ;;
 
10844
        esac
 
10845
      else
 
10846
        case "$host_cpu" in
 
10847
        hppa*64*|ia64*)
 
10848
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10849
          ;;
 
10850
        *)
 
10851
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
10852
          ;;
 
10853
        esac
 
10854
      fi
 
10855
      if test "$with_gnu_ld" = no; then
 
10856
        case "$host_cpu" in
 
10857
        hppa*64*)
 
10858
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
10859
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
10860
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10861
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10862
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10863
          ;;
 
10864
        ia64*)
 
10865
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10866
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10867
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10868
 
 
10869
          # hardcode_minus_L: Not really in the search PATH,
 
10870
          # but as the default location of the library.
 
10871
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10872
          ;;
 
10873
        *)
 
10874
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
10875
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10876
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10877
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10878
 
 
10879
          # hardcode_minus_L: Not really in the search PATH,
 
10880
          # but as the default location of the library.
 
10881
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10882
          ;;
 
10883
        esac
 
10884
      fi
 
10885
      ;;
 
10886
 
 
10887
    irix5* | irix6* | nonstopux*)
 
10888
      if test "$GCC" = yes; then
 
10889
        _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'
 
10890
      else
 
10891
        _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'
 
10892
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
10893
      fi
 
10894
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10895
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10896
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10897
      ;;
 
10898
 
 
10899
    netbsd*)
 
10900
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
10901
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
10902
      else
 
10903
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
10904
      fi
 
10905
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10906
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10907
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10908
      ;;
 
10909
 
 
10910
    newsos6)
 
10911
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10912
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10913
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10914
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10915
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10916
      ;;
 
10917
 
 
10918
    openbsd*)
 
10919
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10920
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10921
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
10922
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
10923
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
10924
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10925
      else
 
10926
       case $host_os in
 
10927
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
10928
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10929
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10930
           ;;
 
10931
         *)
 
10932
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
10933
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
10934
           ;;
 
10935
       esac
 
10936
      fi
 
10937
      ;;
 
10938
 
 
10939
    os2*)
 
10940
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10941
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10942
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10943
      _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'
 
10944
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
10945
      ;;
 
10946
 
 
10947
    osf3*)
 
10948
      if test "$GCC" = yes; then
 
10949
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
10950
        _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'
 
10951
      else
 
10952
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
10953
        _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'
 
10954
      fi
 
10955
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10956
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10957
      ;;
 
10958
 
 
10959
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
10960
      if test "$GCC" = yes; then
 
10961
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
10962
        _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'
 
10963
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10964
      else
 
10965
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
10966
        _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'
 
10967
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 
10968
        $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'
 
10969
 
 
10970
        # Both c and cxx compiler support -rpath directly
 
10971
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
10972
      fi
 
10973
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10974
      ;;
 
10975
 
 
10976
    sco3.2v5*)
 
10977
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10978
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10979
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
10980
      runpath_var=LD_RUN_PATH
 
10981
      hardcode_runpath_var=yes
 
10982
      ;;
 
10983
 
 
10984
    solaris*)
 
10985
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
10986
      if test "$GCC" = yes; then
 
10987
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10988
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10989
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
10990
      else
 
10991
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10992
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10993
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
10994
      fi
 
10995
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10996
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10997
      case $host_os in
 
10998
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
10999
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
 
11000
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
11001
      esac
 
11002
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
11003
      ;;
 
11004
 
 
11005
    sunos4*)
 
11006
      if test "x$host_vendor" = xsequent; then
 
11007
        # Use $CC to link under sequent, because it throws in some extra .o
 
11008
        # files that make .init and .fini sections work.
 
11009
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
11010
      else
 
11011
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
11012
      fi
 
11013
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
11014
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11015
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11016
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11017
      ;;
 
11018
 
 
11019
    sysv4)
 
11020
      case $host_vendor in
 
11021
        sni)
 
11022
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
11023
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
11024
        ;;
 
11025
        siemens)
 
11026
          ## LD is ld it makes a PLAMLIB
 
11027
          ## CC just makes a GrossModule.
 
11028
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
11029
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
11030
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
11031
        ;;
 
11032
        motorola)
 
11033
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
11034
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
11035
        ;;
 
11036
      esac
 
11037
      runpath_var='LD_RUN_PATH'
 
11038
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11039
      ;;
 
11040
 
 
11041
    sysv4.3*)
 
11042
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
11043
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11044
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
11045
      ;;
 
11046
 
 
11047
    sysv4*MP*)
 
11048
      if test -d /usr/nec; then
 
11049
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
11050
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11051
        runpath_var=LD_RUN_PATH
 
11052
        hardcode_runpath_var=yes
 
11053
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
11054
      fi
 
11055
      ;;
 
11056
 
 
11057
    sysv4.2uw2*)
 
11058
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
11059
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11060
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
11061
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11062
      hardcode_runpath_var=yes
 
11063
      runpath_var=LD_RUN_PATH
 
11064
      ;;
 
11065
 
 
11066
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
 
11067
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
 
11068
      if test "$GCC" = yes; then
 
11069
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
11070
      else
 
11071
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
11072
      fi
 
11073
      runpath_var='LD_RUN_PATH'
 
11074
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11075
      ;;
 
11076
 
 
11077
    sysv5*)
 
11078
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
11079
      # $CC -shared without GNU ld will not create a library from C++
 
11080
      # object files and a static libstdc++, better avoid it by now
 
11081
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
11082
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
11083
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
11084
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
11085
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11086
      runpath_var='LD_RUN_PATH'
 
11087
      ;;
 
11088
 
 
11089
    uts4*)
 
11090
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
11091
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
11092
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11093
      ;;
 
11094
 
 
11095
    *)
 
11096
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11097
      ;;
 
11098
    esac
 
11099
  fi
 
11100
])
 
11101
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
11102
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
11103
 
 
11104
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
11105
if test "$GCC" = yes; then
 
11106
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
11107
fi
 
11108
 
 
11109
#
 
11110
# Do we need to explicitly link libc?
 
11111
#
 
11112
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
11113
x|xyes)
 
11114
  # Assume -lc should be added
 
11115
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
11116
 
 
11117
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
11118
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
11119
    *'~'*)
 
11120
      # FIXME: we may have to deal with multi-command sequences.
 
11121
      ;;
 
11122
    '$CC '*)
 
11123
      # Test whether the compiler implicitly links with -lc since on some
 
11124
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
11125
      # to ld, don't add -lc before -lgcc.
 
11126
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
11127
      $rm conftest*
 
11128
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
11129
  
 
11130
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
11131
        soname=conftest
 
11132
        lib=conftest
 
11133
        libobjs=conftest.$ac_objext
 
11134
        deplibs=
 
11135
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
11136
        compiler_flags=-v
 
11137
        linker_flags=-v
 
11138
        verstring=
 
11139
        output_objdir=.
 
11140
        libname=conftest
 
11141
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
11142
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
11143
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
11144
        then
 
11145
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
11146
        else
 
11147
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
11148
        fi
 
11149
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
11150
      else
 
11151
        cat conftest.err 1>&5
 
11152
      fi
 
11153
      $rm conftest*
 
11154
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
11155
      ;;
 
11156
    esac
 
11157
  fi
 
11158
  ;;
 
11159
esac
 
11160
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
11161
 
 
11162
 
 
11163
# _LT_AC_FILE_LTDLL_C
 
11164
# -------------------
 
11165
# Be careful that the start marker always follows a newline.
 
11166
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
 
11167
# /* ltdll.c starts here */
 
11168
# #define WIN32_LEAN_AND_MEAN
 
11169
# #include <windows.h>
 
11170
# #undef WIN32_LEAN_AND_MEAN
 
11171
# #include <stdio.h>
 
11172
#
 
11173
# #ifndef __CYGWIN__
 
11174
# #  ifdef __CYGWIN32__
 
11175
# #    define __CYGWIN__ __CYGWIN32__
 
11176
# #  endif
 
11177
# #endif
 
11178
#
 
11179
# #ifdef __cplusplus
 
11180
# extern "C" {
 
11181
# #endif
 
11182
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
 
11183
# #ifdef __cplusplus
 
11184
# }
 
11185
# #endif
 
11186
#
 
11187
# #ifdef __CYGWIN__
 
11188
# #include <cygwin/cygwin_dll.h>
 
11189
# DECLARE_CYGWIN_DLL( DllMain );
 
11190
# #endif
 
11191
# HINSTANCE __hDllInstance_base;
 
11192
#
 
11193
# BOOL APIENTRY
 
11194
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
 
11195
# {
 
11196
#   __hDllInstance_base = hInst;
 
11197
#   return TRUE;
 
11198
# }
 
11199
# /* ltdll.c ends here */
 
11200
])# _LT_AC_FILE_LTDLL_C
 
11201
 
 
11202
 
 
11203
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
11204
# ---------------------------------
 
11205
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
11206
 
 
11207
 
 
11208
# old names
4982
11209
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
4983
11210
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
4984
11211
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
4987
11214
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
4988
11215
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
4989
11216
 
4990
 
dnl This is just to silence aclocal about the macro not being used
4991
 
ifelse([AC_DISABLE_FAST_INSTALL])dnl
 
11217
# This is just to silence aclocal about the macro not being used
 
11218
ifelse([AC_DISABLE_FAST_INSTALL])
4992
11219
 
4993
11220
AC_DEFUN([LT_AC_PROG_GCJ],
4994
11221
[AC_CHECK_TOOL(GCJ, gcj, no)
4996
11223
  AC_SUBST(GCJFLAGS)
4997
11224
])
4998
11225
 
4999
 
# Do all the work for Automake.  This macro actually does too much --
5000
 
# some checks are only needed if your package does certain things.
5001
 
# But this isn't really a big deal.
5002
 
 
5003
 
# serial 1
5004
 
 
5005
 
dnl Usage:
5006
 
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
5007
 
 
5008
 
AC_DEFUN(AM_INIT_AUTOMAKE,
5009
 
[AC_REQUIRE([AC_PROG_INSTALL])
5010
 
PACKAGE=[$1]
5011
 
AC_SUBST(PACKAGE)
5012
 
VERSION=[$2]
5013
 
AC_SUBST(VERSION)
5014
 
dnl test to see if srcdir already configured
5015
 
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
 
11226
AC_DEFUN([LT_AC_PROG_RC],
 
11227
[AC_CHECK_TOOL(RC, windres, no)
 
11228
])
 
11229
 
 
11230
# NOTE: This macro has been submitted for inclusion into   #
 
11231
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
11232
#  a released version of Autoconf we should remove this    #
 
11233
#  macro and use it instead.                               #
 
11234
# LT_AC_PROG_SED
 
11235
# --------------
 
11236
# Check for a fully-functional sed program, that truncates
 
11237
# as few characters as possible.  Prefer GNU sed if found.
 
11238
AC_DEFUN([LT_AC_PROG_SED],
 
11239
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
11240
AC_CACHE_VAL(lt_cv_path_SED,
 
11241
[# Loop through the user's path and test for sed and gsed.
 
11242
# Then use that list of sed's as ones to test for truncation.
 
11243
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
11244
for as_dir in $PATH
 
11245
do
 
11246
  IFS=$as_save_IFS
 
11247
  test -z "$as_dir" && as_dir=.
 
11248
  for lt_ac_prog in sed gsed; do
 
11249
    for ac_exec_ext in '' $ac_executable_extensions; do
 
11250
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
11251
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
11252
      fi
 
11253
    done
 
11254
  done
 
11255
done
 
11256
lt_ac_max=0
 
11257
lt_ac_count=0
 
11258
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
11259
# along with /bin/sed that truncates output.
 
11260
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
11261
  test ! -f $lt_ac_sed && break
 
11262
  cat /dev/null > conftest.in
 
11263
  lt_ac_count=0
 
11264
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
11265
  # Check for GNU sed and select it if it is found.
 
11266
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
11267
    lt_cv_path_SED=$lt_ac_sed
 
11268
    break
 
11269
  fi
 
11270
  while true; do
 
11271
    cat conftest.in conftest.in >conftest.tmp
 
11272
    mv conftest.tmp conftest.in
 
11273
    cp conftest.in conftest.nl
 
11274
    echo >>conftest.nl
 
11275
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
11276
    cmp -s conftest.out conftest.nl || break
 
11277
    # 10000 chars as input seems more than enough
 
11278
    test $lt_ac_count -gt 10 && break
 
11279
    lt_ac_count=`expr $lt_ac_count + 1`
 
11280
    if test $lt_ac_count -gt $lt_ac_max; then
 
11281
      lt_ac_max=$lt_ac_count
 
11282
      lt_cv_path_SED=$lt_ac_sed
 
11283
    fi
 
11284
  done
 
11285
done
 
11286
])
 
11287
SED=$lt_cv_path_SED
 
11288
AC_MSG_RESULT([$SED])
 
11289
])
 
11290
 
 
11291
# AM_CONDITIONAL                                              -*- Autoconf -*-
 
11292
 
 
11293
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
 
11294
 
 
11295
# This program is free software; you can redistribute it and/or modify
 
11296
# it under the terms of the GNU General Public License as published by
 
11297
# the Free Software Foundation; either version 2, or (at your option)
 
11298
# any later version.
 
11299
 
 
11300
# This program is distributed in the hope that it will be useful,
 
11301
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11302
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11303
# GNU General Public License for more details.
 
11304
 
 
11305
# You should have received a copy of the GNU General Public License
 
11306
# along with this program; if not, write to the Free Software
 
11307
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11308
# 02111-1307, USA.
 
11309
 
 
11310
# serial 5
 
11311
 
 
11312
AC_PREREQ(2.52)
 
11313
 
 
11314
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
11315
# -------------------------------------
 
11316
# Define a conditional.
 
11317
AC_DEFUN([AM_CONDITIONAL],
 
11318
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
11319
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
11320
AC_SUBST([$1_TRUE])
 
11321
AC_SUBST([$1_FALSE])
 
11322
if $2; then
 
11323
  $1_TRUE=
 
11324
  $1_FALSE='#'
 
11325
else
 
11326
  $1_TRUE='#'
 
11327
  $1_FALSE=
 
11328
fi
 
11329
AC_CONFIG_COMMANDS_PRE(
 
11330
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
11331
  AC_MSG_ERROR([conditional "$1" was never defined.
 
11332
Usually this means the macro was only invoked conditionally.])
 
11333
fi])])
 
11334
 
 
11335
# Do all the work for Automake.                            -*- Autoconf -*-
 
11336
 
 
11337
# This macro actually does too much some checks are only needed if
 
11338
# your package does certain things.  But this isn't really a big deal.
 
11339
 
 
11340
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
 
11341
# Free Software Foundation, Inc.
 
11342
 
 
11343
# This program is free software; you can redistribute it and/or modify
 
11344
# it under the terms of the GNU General Public License as published by
 
11345
# the Free Software Foundation; either version 2, or (at your option)
 
11346
# any later version.
 
11347
 
 
11348
# This program is distributed in the hope that it will be useful,
 
11349
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11350
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11351
# GNU General Public License for more details.
 
11352
 
 
11353
# You should have received a copy of the GNU General Public License
 
11354
# along with this program; if not, write to the Free Software
 
11355
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11356
# 02111-1307, USA.
 
11357
 
 
11358
# serial 10
 
11359
 
 
11360
AC_PREREQ([2.54])
 
11361
 
 
11362
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
 
11363
# the ones we care about.
 
11364
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
11365
 
 
11366
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
11367
# AM_INIT_AUTOMAKE([OPTIONS])
 
11368
# -----------------------------------------------
 
11369
# The call with PACKAGE and VERSION arguments is the old style
 
11370
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
11371
# and VERSION should now be passed to AC_INIT and removed from
 
11372
# the call to AM_INIT_AUTOMAKE.
 
11373
# We support both call styles for the transition.  After
 
11374
# the next Automake release, Autoconf can make the AC_INIT
 
11375
# arguments mandatory, and then we can depend on a new Autoconf
 
11376
# release and drop the old call support.
 
11377
AC_DEFUN([AM_INIT_AUTOMAKE],
 
11378
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
11379
 AC_REQUIRE([AC_PROG_INSTALL])dnl
 
11380
# test to see if srcdir already configured
 
11381
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
11382
   test -f $srcdir/config.status; then
5016
11383
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
5017
11384
fi
5018
 
ifelse([$3],,
5019
 
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
5020
 
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
5021
 
AC_REQUIRE([AM_SANITY_CHECK])
5022
 
AC_REQUIRE([AC_ARG_PROGRAM])
5023
 
dnl FIXME This is truly gross.
5024
 
missing_dir=`cd $ac_aux_dir && pwd`
5025
 
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
5026
 
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
5027
 
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
5028
 
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
5029
 
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
5030
 
AC_REQUIRE([AC_PROG_MAKE_SET])])
 
11385
 
 
11386
# test whether we have cygpath
 
11387
if test -z "$CYGPATH_W"; then
 
11388
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
11389
    CYGPATH_W='cygpath -w'
 
11390
  else
 
11391
    CYGPATH_W=echo
 
11392
  fi
 
11393
fi
 
11394
AC_SUBST([CYGPATH_W])
 
11395
 
 
11396
# Define the identity of the package.
 
11397
dnl Distinguish between old-style and new-style calls.
 
11398
m4_ifval([$2],
 
11399
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
11400
 AC_SUBST([PACKAGE], [$1])dnl
 
11401
 AC_SUBST([VERSION], [$2])],
 
11402
[_AM_SET_OPTIONS([$1])dnl
 
11403
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
11404
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
11405
 
 
11406
_AM_IF_OPTION([no-define],,
 
11407
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
11408
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
11409
 
 
11410
# Some tools Automake needs.
 
11411
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
11412
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
11413
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
11414
AM_MISSING_PROG(AUTOCONF, autoconf)
 
11415
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
11416
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
11417
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
11418
AM_MISSING_PROG(AMTAR, tar)
 
11419
AM_PROG_INSTALL_SH
 
11420
AM_PROG_INSTALL_STRIP
 
11421
# We need awk for the "check" target.  The system "awk" is bad on
 
11422
# some platforms.
 
11423
AC_REQUIRE([AC_PROG_AWK])dnl
 
11424
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
11425
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
11426
 
 
11427
_AM_IF_OPTION([no-dependencies],,
 
11428
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
11429
                  [_AM_DEPENDENCIES(CC)],
 
11430
                  [define([AC_PROG_CC],
 
11431
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
11432
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
11433
                  [_AM_DEPENDENCIES(CXX)],
 
11434
                  [define([AC_PROG_CXX],
 
11435
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
11436
])
 
11437
])
 
11438
 
 
11439
 
 
11440
# When config.status generates a header, we must update the stamp-h file.
 
11441
# This file resides in the same directory as the config header
 
11442
# that is generated.  The stamp files are numbered to have different names.
 
11443
 
 
11444
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
11445
# loop where config.status creates the headers, so we can generate
 
11446
# our stamp files there.
 
11447
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
11448
[# Compute $1's index in $config_headers.
 
11449
_am_stamp_count=1
 
11450
for _am_header in $config_headers :; do
 
11451
  case $_am_header in
 
11452
    $1 | $1:* )
 
11453
      break ;;
 
11454
    * )
 
11455
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
11456
  esac
 
11457
done
 
11458
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
11459
 
 
11460
# Copyright 2002  Free Software Foundation, Inc.
 
11461
 
 
11462
# This program is free software; you can redistribute it and/or modify
 
11463
# it under the terms of the GNU General Public License as published by
 
11464
# the Free Software Foundation; either version 2, or (at your option)
 
11465
# any later version.
 
11466
 
 
11467
# This program is distributed in the hope that it will be useful,
 
11468
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11469
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11470
# GNU General Public License for more details.
 
11471
 
 
11472
# You should have received a copy of the GNU General Public License
 
11473
# along with this program; if not, write to the Free Software
 
11474
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11475
 
 
11476
# AM_AUTOMAKE_VERSION(VERSION)
 
11477
# ----------------------------
 
11478
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
11479
# generated from the m4 files accompanying Automake X.Y.
 
11480
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
 
11481
 
 
11482
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
11483
# -------------------------------
 
11484
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
11485
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
11486
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
11487
         [AM_AUTOMAKE_VERSION([1.7.9])])
 
11488
 
 
11489
# Helper functions for option handling.                    -*- Autoconf -*-
 
11490
 
 
11491
# Copyright 2001, 2002  Free Software Foundation, Inc.
 
11492
 
 
11493
# This program is free software; you can redistribute it and/or modify
 
11494
# it under the terms of the GNU General Public License as published by
 
11495
# the Free Software Foundation; either version 2, or (at your option)
 
11496
# any later version.
 
11497
 
 
11498
# This program is distributed in the hope that it will be useful,
 
11499
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11500
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11501
# GNU General Public License for more details.
 
11502
 
 
11503
# You should have received a copy of the GNU General Public License
 
11504
# along with this program; if not, write to the Free Software
 
11505
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11506
# 02111-1307, USA.
 
11507
 
 
11508
# serial 2
 
11509
 
 
11510
# _AM_MANGLE_OPTION(NAME)
 
11511
# -----------------------
 
11512
AC_DEFUN([_AM_MANGLE_OPTION],
 
11513
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
11514
 
 
11515
# _AM_SET_OPTION(NAME)
 
11516
# ------------------------------
 
11517
# Set option NAME.  Presently that only means defining a flag for this option.
 
11518
AC_DEFUN([_AM_SET_OPTION],
 
11519
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
11520
 
 
11521
# _AM_SET_OPTIONS(OPTIONS)
 
11522
# ----------------------------------
 
11523
# OPTIONS is a space-separated list of Automake options.
 
11524
AC_DEFUN([_AM_SET_OPTIONS],
 
11525
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
11526
 
 
11527
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
11528
# -------------------------------------------
 
11529
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
11530
AC_DEFUN([_AM_IF_OPTION],
 
11531
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
5031
11532
 
5032
11533
#
5033
11534
# Check to make sure that the build environment is sane.
5034
11535
#
5035
11536
 
5036
 
AC_DEFUN(AM_SANITY_CHECK,
 
11537
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
11538
 
 
11539
# This program is free software; you can redistribute it and/or modify
 
11540
# it under the terms of the GNU General Public License as published by
 
11541
# the Free Software Foundation; either version 2, or (at your option)
 
11542
# any later version.
 
11543
 
 
11544
# This program is distributed in the hope that it will be useful,
 
11545
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11546
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11547
# GNU General Public License for more details.
 
11548
 
 
11549
# You should have received a copy of the GNU General Public License
 
11550
# along with this program; if not, write to the Free Software
 
11551
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11552
# 02111-1307, USA.
 
11553
 
 
11554
# serial 3
 
11555
 
 
11556
# AM_SANITY_CHECK
 
11557
# ---------------
 
11558
AC_DEFUN([AM_SANITY_CHECK],
5037
11559
[AC_MSG_CHECKING([whether build environment is sane])
5038
11560
# Just in case
5039
11561
sleep 1
5040
 
echo timestamp > conftestfile
 
11562
echo timestamp > conftest.file
5041
11563
# Do `set' in a subshell so we don't clobber the current shell's
5042
11564
# arguments.  Must try -L first in case configure is actually a
5043
11565
# symlink; some systems play weird games with the mod time of symlinks
5044
11566
# (eg FreeBSD returns the mod time of the symlink's containing
5045
11567
# directory).
5046
11568
if (
5047
 
   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
5048
 
   if test "[$]*" = "X"; then
 
11569
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
11570
   if test "$[*]" = "X"; then
5049
11571
      # -L didn't work.
5050
 
      set X `ls -t $srcdir/configure conftestfile`
 
11572
      set X `ls -t $srcdir/configure conftest.file`
5051
11573
   fi
5052
 
   if test "[$]*" != "X $srcdir/configure conftestfile" \
5053
 
      && test "[$]*" != "X conftestfile $srcdir/configure"; then
 
11574
   rm -f conftest.file
 
11575
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
11576
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
5054
11577
 
5055
11578
      # If neither matched, then we have a broken ls.  This can happen
5056
11579
      # if, for instance, CONFIG_SHELL is bash and it inherits a
5060
11583
alias in your environment])
5061
11584
   fi
5062
11585
 
5063
 
   test "[$]2" = conftestfile
 
11586
   test "$[2]" = conftest.file
5064
11587
   )
5065
11588
then
5066
11589
   # Ok.
5069
11592
   AC_MSG_ERROR([newly created file is older than distributed files!
5070
11593
Check your system clock])
5071
11594
fi
5072
 
rm -f conftest*
5073
11595
AC_MSG_RESULT(yes)])
5074
11596
 
5075
 
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
5076
 
dnl The program must properly implement --version.
5077
 
AC_DEFUN(AM_MISSING_PROG,
5078
 
[AC_MSG_CHECKING(for working $2)
5079
 
# Run test in a subshell; some versions of sh will print an error if
5080
 
# an executable is not found, even if stderr is redirected.
5081
 
# Redirect stdin to placate older versions of autoconf.  Sigh.
5082
 
if ($2 --version) < /dev/null > /dev/null 2>&1; then
5083
 
   $1=$2
5084
 
   AC_MSG_RESULT(found)
5085
 
else
5086
 
   $1="$3/missing $2"
5087
 
   AC_MSG_RESULT(missing)
5088
 
fi
 
11597
#  -*- Autoconf -*-
 
11598
 
 
11599
 
 
11600
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
11601
 
 
11602
# This program is free software; you can redistribute it and/or modify
 
11603
# it under the terms of the GNU General Public License as published by
 
11604
# the Free Software Foundation; either version 2, or (at your option)
 
11605
# any later version.
 
11606
 
 
11607
# This program is distributed in the hope that it will be useful,
 
11608
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11609
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11610
# GNU General Public License for more details.
 
11611
 
 
11612
# You should have received a copy of the GNU General Public License
 
11613
# along with this program; if not, write to the Free Software
 
11614
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11615
# 02111-1307, USA.
 
11616
 
 
11617
# serial 3
 
11618
 
 
11619
# AM_MISSING_PROG(NAME, PROGRAM)
 
11620
# ------------------------------
 
11621
AC_DEFUN([AM_MISSING_PROG],
 
11622
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
11623
$1=${$1-"${am_missing_run}$2"}
5089
11624
AC_SUBST($1)])
5090
11625
 
5091
 
# Like AC_CONFIG_HEADER, but automatically create stamp file.
5092
 
 
5093
 
AC_DEFUN(AM_CONFIG_HEADER,
5094
 
[AC_PREREQ([2.12])
5095
 
AC_CONFIG_HEADER([$1])
5096
 
dnl When config.status generates a header, we must update the stamp-h file.
5097
 
dnl This file resides in the same directory as the config header
5098
 
dnl that is generated.  We must strip everything past the first ":",
5099
 
dnl and everything past the last "/".
5100
 
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
5101
 
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
5102
 
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
5103
 
<<am_indx=1
5104
 
for am_file in <<$1>>; do
5105
 
  case " <<$>>CONFIG_HEADERS " in
5106
 
  *" <<$>>am_file "*<<)>>
5107
 
    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
5108
 
    ;;
5109
 
  esac
5110
 
  am_indx=`expr "<<$>>am_indx" + 1`
5111
 
done<<>>dnl>>)
5112
 
changequote([,]))])
 
11626
 
 
11627
# AM_MISSING_HAS_RUN
 
11628
# ------------------
 
11629
# Define MISSING if not defined so far and test if it supports --run.
 
11630
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
11631
AC_DEFUN([AM_MISSING_HAS_RUN],
 
11632
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
11633
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
11634
# Use eval to expand $SHELL
 
11635
if eval "$MISSING --run true"; then
 
11636
  am_missing_run="$MISSING --run "
 
11637
else
 
11638
  am_missing_run=
 
11639
  AC_MSG_WARN([`missing' script is too old or missing])
 
11640
fi
 
11641
])
 
11642
 
 
11643
# AM_AUX_DIR_EXPAND
 
11644
 
 
11645
# Copyright 2001 Free Software Foundation, Inc.
 
11646
 
 
11647
# This program is free software; you can redistribute it and/or modify
 
11648
# it under the terms of the GNU General Public License as published by
 
11649
# the Free Software Foundation; either version 2, or (at your option)
 
11650
# any later version.
 
11651
 
 
11652
# This program is distributed in the hope that it will be useful,
 
11653
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11654
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11655
# GNU General Public License for more details.
 
11656
 
 
11657
# You should have received a copy of the GNU General Public License
 
11658
# along with this program; if not, write to the Free Software
 
11659
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11660
# 02111-1307, USA.
 
11661
 
 
11662
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
11663
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
11664
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
11665
#
 
11666
# Of course, Automake must honor this variable whenever it calls a
 
11667
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
11668
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
11669
# depending on how configure is run.  This is pretty annoying, since
 
11670
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
11671
# source directory, any form will work fine, but in subdirectories a
 
11672
# relative path needs to be adjusted first.
 
11673
#
 
11674
# $ac_aux_dir/missing
 
11675
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
11676
# $top_srcdir/$ac_aux_dir/missing
 
11677
#    fails if $ac_aux_dir is absolute,
 
11678
#    fails when called from a subdirectory in a VPATH build with
 
11679
#          a relative $ac_aux_dir
 
11680
#
 
11681
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
11682
# are both prefixed by $srcdir.  In an in-source build this is usually
 
11683
# harmless because $srcdir is `.', but things will broke when you
 
11684
# start a VPATH build or use an absolute $srcdir.
 
11685
#
 
11686
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
11687
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
11688
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
11689
# and then we would define $MISSING as
 
11690
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
11691
# This will work as long as MISSING is not called from configure, because
 
11692
# unfortunately $(top_srcdir) has no meaning in configure.
 
11693
# However there are other variables, like CC, which are often used in
 
11694
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
11695
#
 
11696
# Another solution, used here, is to always expand $ac_aux_dir to an
 
11697
# absolute PATH.  The drawback is that using absolute paths prevent a
 
11698
# configured tree to be moved without reconfiguration.
 
11699
 
 
11700
# Rely on autoconf to set up CDPATH properly.
 
11701
AC_PREREQ([2.50])
 
11702
 
 
11703
AC_DEFUN([AM_AUX_DIR_EXPAND], [
 
11704
# expand $ac_aux_dir to an absolute path
 
11705
am_aux_dir=`cd $ac_aux_dir && pwd`
 
11706
])
 
11707
 
 
11708
# AM_PROG_INSTALL_SH
 
11709
# ------------------
 
11710
# Define $install_sh.
 
11711
 
 
11712
# Copyright 2001 Free Software Foundation, Inc.
 
11713
 
 
11714
# This program is free software; you can redistribute it and/or modify
 
11715
# it under the terms of the GNU General Public License as published by
 
11716
# the Free Software Foundation; either version 2, or (at your option)
 
11717
# any later version.
 
11718
 
 
11719
# This program is distributed in the hope that it will be useful,
 
11720
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11721
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11722
# GNU General Public License for more details.
 
11723
 
 
11724
# You should have received a copy of the GNU General Public License
 
11725
# along with this program; if not, write to the Free Software
 
11726
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11727
# 02111-1307, USA.
 
11728
 
 
11729
AC_DEFUN([AM_PROG_INSTALL_SH],
 
11730
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
11731
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
11732
AC_SUBST(install_sh)])
 
11733
 
 
11734
# AM_PROG_INSTALL_STRIP
 
11735
 
 
11736
# Copyright 2001 Free Software Foundation, Inc.
 
11737
 
 
11738
# This program is free software; you can redistribute it and/or modify
 
11739
# it under the terms of the GNU General Public License as published by
 
11740
# the Free Software Foundation; either version 2, or (at your option)
 
11741
# any later version.
 
11742
 
 
11743
# This program is distributed in the hope that it will be useful,
 
11744
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11745
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11746
# GNU General Public License for more details.
 
11747
 
 
11748
# You should have received a copy of the GNU General Public License
 
11749
# along with this program; if not, write to the Free Software
 
11750
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11751
# 02111-1307, USA.
 
11752
 
 
11753
# One issue with vendor `install' (even GNU) is that you can't
 
11754
# specify the program used to strip binaries.  This is especially
 
11755
# annoying in cross-compiling environments, where the build's strip
 
11756
# is unlikely to handle the host's binaries.
 
11757
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
11758
# always use install-sh in `make install-strip', and initialize
 
11759
# STRIPPROG with the value of the STRIP variable (set by the user).
 
11760
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
11761
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
11762
# Installed binaries are usually stripped using `strip' when the user
 
11763
# run `make install-strip'.  However `strip' might not be the right
 
11764
# tool to use in cross-compilation environments, therefore Automake
 
11765
# will honor the `STRIP' environment variable to overrule this program.
 
11766
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
11767
if test "$cross_compiling" != no; then
 
11768
  AC_CHECK_TOOL([STRIP], [strip], :)
 
11769
fi
 
11770
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
11771
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
11772
 
 
11773
#                                                          -*- Autoconf -*-
 
11774
# Copyright (C) 2003  Free Software Foundation, Inc.
 
11775
 
 
11776
# This program is free software; you can redistribute it and/or modify
 
11777
# it under the terms of the GNU General Public License as published by
 
11778
# the Free Software Foundation; either version 2, or (at your option)
 
11779
# any later version.
 
11780
 
 
11781
# This program is distributed in the hope that it will be useful,
 
11782
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11783
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11784
# GNU General Public License for more details.
 
11785
 
 
11786
# You should have received a copy of the GNU General Public License
 
11787
# along with this program; if not, write to the Free Software
 
11788
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11789
# 02111-1307, USA.
 
11790
 
 
11791
# serial 1
 
11792
 
 
11793
# Check whether the underlying file-system supports filenames
 
11794
# with a leading dot.  For instance MS-DOS doesn't.
 
11795
AC_DEFUN([AM_SET_LEADING_DOT],
 
11796
[rm -rf .tst 2>/dev/null
 
11797
mkdir .tst 2>/dev/null
 
11798
if test -d .tst; then
 
11799
  am__leading_dot=.
 
11800
else
 
11801
  am__leading_dot=_
 
11802
fi
 
11803
rmdir .tst 2>/dev/null
 
11804
AC_SUBST([am__leading_dot])])
 
11805
 
 
11806
# serial 5                                              -*- Autoconf -*-
 
11807
 
 
11808
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 
11809
 
 
11810
# This program is free software; you can redistribute it and/or modify
 
11811
# it under the terms of the GNU General Public License as published by
 
11812
# the Free Software Foundation; either version 2, or (at your option)
 
11813
# any later version.
 
11814
 
 
11815
# This program is distributed in the hope that it will be useful,
 
11816
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11817
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11818
# GNU General Public License for more details.
 
11819
 
 
11820
# You should have received a copy of the GNU General Public License
 
11821
# along with this program; if not, write to the Free Software
 
11822
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11823
# 02111-1307, USA.
 
11824
 
 
11825
 
 
11826
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
11827
# written in clear, in which case automake, when reading aclocal.m4,
 
11828
# will think it sees a *use*, and therefore will trigger all it's
 
11829
# C support machinery.  Also note that it means that autoscan, seeing
 
11830
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
11831
 
 
11832
 
 
11833
 
 
11834
# _AM_DEPENDENCIES(NAME)
 
11835
# ----------------------
 
11836
# See how the compiler implements dependency checking.
 
11837
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
11838
# We try a few techniques and use that to set a single cache variable.
 
11839
#
 
11840
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
11841
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
11842
# dependency, and given that the user is not expected to run this macro,
 
11843
# just rely on AC_PROG_CC.
 
11844
AC_DEFUN([_AM_DEPENDENCIES],
 
11845
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
11846
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
11847
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
11848
AC_REQUIRE([AM_DEP_TRACK])dnl
 
11849
 
 
11850
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
11851
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
11852
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
11853
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
11854
                   [depcc="$$1"   am_compiler_list=])
 
11855
 
 
11856
AC_CACHE_CHECK([dependency style of $depcc],
 
11857
               [am_cv_$1_dependencies_compiler_type],
 
11858
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
11859
  # We make a subdir and do the tests there.  Otherwise we can end up
 
11860
  # making bogus files that we don't know about and never remove.  For
 
11861
  # instance it was reported that on HP-UX the gcc test will end up
 
11862
  # making a dummy file named `D' -- because `-MD' means `put the output
 
11863
  # in D'.
 
11864
  mkdir conftest.dir
 
11865
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
11866
  # using a relative directory.
 
11867
  cp "$am_depcomp" conftest.dir
 
11868
  cd conftest.dir
 
11869
  # We will build objects and dependencies in a subdirectory because
 
11870
  # it helps to detect inapplicable dependency modes.  For instance
 
11871
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
11872
  # side effect of compilation, but ICC will put the dependencies in
 
11873
  # the current directory while Tru64 will put them in the object
 
11874
  # directory.
 
11875
  mkdir sub
 
11876
 
 
11877
  am_cv_$1_dependencies_compiler_type=none
 
11878
  if test "$am_compiler_list" = ""; then
 
11879
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
11880
  fi
 
11881
  for depmode in $am_compiler_list; do
 
11882
    # Setup a source with many dependencies, because some compilers
 
11883
    # like to wrap large dependency lists on column 80 (with \), and
 
11884
    # we should not choose a depcomp mode which is confused by this.
 
11885
    #
 
11886
    # We need to recreate these files for each test, as the compiler may
 
11887
    # overwrite some of them when testing with obscure command lines.
 
11888
    # This happens at least with the AIX C compiler.
 
11889
    : > sub/conftest.c
 
11890
    for i in 1 2 3 4 5 6; do
 
11891
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
11892
      : > sub/conftst$i.h
 
11893
    done
 
11894
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
11895
 
 
11896
    case $depmode in
 
11897
    nosideeffect)
 
11898
      # after this tag, mechanisms are not by side-effect, so they'll
 
11899
      # only be used when explicitly requested
 
11900
      if test "x$enable_dependency_tracking" = xyes; then
 
11901
        continue
 
11902
      else
 
11903
        break
 
11904
      fi
 
11905
      ;;
 
11906
    none) break ;;
 
11907
    esac
 
11908
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
11909
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
11910
    # handle `-M -o', and we need to detect this.
 
11911
    if depmode=$depmode \
 
11912
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
11913
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
11914
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
11915
         >/dev/null 2>conftest.err &&
 
11916
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
11917
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
11918
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
11919
      # icc doesn't choke on unknown options, it will just issue warnings
 
11920
      # (even with -Werror).  So we grep stderr for any message
 
11921
      # that says an option was ignored.
 
11922
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
 
11923
        am_cv_$1_dependencies_compiler_type=$depmode
 
11924
        break
 
11925
      fi
 
11926
    fi
 
11927
  done
 
11928
 
 
11929
  cd ..
 
11930
  rm -rf conftest.dir
 
11931
else
 
11932
  am_cv_$1_dependencies_compiler_type=none
 
11933
fi
 
11934
])
 
11935
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
11936
AM_CONDITIONAL([am__fastdep$1], [
 
11937
  test "x$enable_dependency_tracking" != xno \
 
11938
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
11939
])
 
11940
 
 
11941
 
 
11942
# AM_SET_DEPDIR
 
11943
# -------------
 
11944
# Choose a directory name for dependency files.
 
11945
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
11946
AC_DEFUN([AM_SET_DEPDIR],
 
11947
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
11948
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
11949
])
 
11950
 
 
11951
 
 
11952
# AM_DEP_TRACK
 
11953
# ------------
 
11954
AC_DEFUN([AM_DEP_TRACK],
 
11955
[AC_ARG_ENABLE(dependency-tracking,
 
11956
[  --disable-dependency-tracking Speeds up one-time builds
 
11957
  --enable-dependency-tracking  Do not reject slow dependency extractors])
 
11958
if test "x$enable_dependency_tracking" != xno; then
 
11959
  am_depcomp="$ac_aux_dir/depcomp"
 
11960
  AMDEPBACKSLASH='\'
 
11961
fi
 
11962
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
11963
AC_SUBST([AMDEPBACKSLASH])
 
11964
])
 
11965
 
 
11966
# Generate code to set up dependency tracking.   -*- Autoconf -*-
 
11967
 
 
11968
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
11969
 
 
11970
# This program is free software; you can redistribute it and/or modify
 
11971
# it under the terms of the GNU General Public License as published by
 
11972
# the Free Software Foundation; either version 2, or (at your option)
 
11973
# any later version.
 
11974
 
 
11975
# This program is distributed in the hope that it will be useful,
 
11976
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11977
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11978
# GNU General Public License for more details.
 
11979
 
 
11980
# You should have received a copy of the GNU General Public License
 
11981
# along with this program; if not, write to the Free Software
 
11982
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11983
# 02111-1307, USA.
 
11984
 
 
11985
#serial 2
 
11986
 
 
11987
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
11988
# ------------------------------
 
11989
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
11990
[for mf in $CONFIG_FILES; do
 
11991
  # Strip MF so we end up with the name of the file.
 
11992
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
11993
  # Check whether this is an Automake generated Makefile or not.
 
11994
  # We used to match only the files named `Makefile.in', but
 
11995
  # some people rename them; so instead we look at the file content.
 
11996
  # Grep'ing the first line is not enough: some people post-process
 
11997
  # each Makefile.in and add a new line on top of each file to say so.
 
11998
  # So let's grep whole file.
 
11999
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
12000
    dirpart=`AS_DIRNAME("$mf")`
 
12001
  else
 
12002
    continue
 
12003
  fi
 
12004
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
 
12005
  # Extract the definition of DEP_FILES from the Makefile without
 
12006
  # running `make'.
 
12007
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
 
12008
  test -z "$DEPDIR" && continue
 
12009
  # When using ansi2knr, U may be empty or an underscore; expand it
 
12010
  U=`sed -n -e '/^U = / s///p' < "$mf"`
 
12011
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
 
12012
  # We invoke sed twice because it is the simplest approach to
 
12013
  # changing $(DEPDIR) to its actual value in the expansion.
 
12014
  for file in `sed -n -e '
 
12015
    /^DEP_FILES = .*\\\\$/ {
 
12016
      s/^DEP_FILES = //
 
12017
      :loop
 
12018
        s/\\\\$//
 
12019
        p
 
12020
        n
 
12021
        /\\\\$/ b loop
 
12022
      p
 
12023
    }
 
12024
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
 
12025
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
12026
    # Make sure the directory exists.
 
12027
    test -f "$dirpart/$file" && continue
 
12028
    fdir=`AS_DIRNAME(["$file"])`
 
12029
    AS_MKDIR_P([$dirpart/$fdir])
 
12030
    # echo "creating $dirpart/$file"
 
12031
    echo '# dummy' > "$dirpart/$file"
 
12032
  done
 
12033
done
 
12034
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
12035
 
 
12036
 
 
12037
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
12038
# -----------------------------
 
12039
# This macro should only be invoked once -- use via AC_REQUIRE.
 
12040
#
 
12041
# This code is only required when automatic dependency tracking
 
12042
# is enabled.  FIXME.  This creates each `.P' file that we will
 
12043
# need in order to bootstrap the dependency handling code.
 
12044
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
12045
[AC_CONFIG_COMMANDS([depfiles],
 
12046
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
12047
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
12048
])
 
12049
 
 
12050
# Check to see how 'make' treats includes.      -*- Autoconf -*-
 
12051
 
 
12052
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 
12053
 
 
12054
# This program is free software; you can redistribute it and/or modify
 
12055
# it under the terms of the GNU General Public License as published by
 
12056
# the Free Software Foundation; either version 2, or (at your option)
 
12057
# any later version.
 
12058
 
 
12059
# This program is distributed in the hope that it will be useful,
 
12060
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12061
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12062
# GNU General Public License for more details.
 
12063
 
 
12064
# You should have received a copy of the GNU General Public License
 
12065
# along with this program; if not, write to the Free Software
 
12066
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12067
# 02111-1307, USA.
 
12068
 
 
12069
# serial 2
 
12070
 
 
12071
# AM_MAKE_INCLUDE()
 
12072
# -----------------
 
12073
# Check to see how make treats includes.
 
12074
AC_DEFUN([AM_MAKE_INCLUDE],
 
12075
[am_make=${MAKE-make}
 
12076
cat > confinc << 'END'
 
12077
am__doit:
 
12078
        @echo done
 
12079
.PHONY: am__doit
 
12080
END
 
12081
# If we don't find an include directive, just comment out the code.
 
12082
AC_MSG_CHECKING([for style of include used by $am_make])
 
12083
am__include="#"
 
12084
am__quote=
 
12085
_am_result=none
 
12086
# First try GNU make style include.
 
12087
echo "include confinc" > confmf
 
12088
# We grep out `Entering directory' and `Leaving directory'
 
12089
# messages which can occur if `w' ends up in MAKEFLAGS.
 
12090
# In particular we don't look at `^make:' because GNU make might
 
12091
# be invoked under some other name (usually "gmake"), in which
 
12092
# case it prints its new name instead of `make'.
 
12093
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
12094
   am__include=include
 
12095
   am__quote=
 
12096
   _am_result=GNU
 
12097
fi
 
12098
# Now try BSD make style include.
 
12099
if test "$am__include" = "#"; then
 
12100
   echo '.include "confinc"' > confmf
 
12101
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
12102
      am__include=.include
 
12103
      am__quote="\""
 
12104
      _am_result=BSD
 
12105
   fi
 
12106
fi
 
12107
AC_SUBST([am__include])
 
12108
AC_SUBST([am__quote])
 
12109
AC_MSG_RESULT([$_am_result])
 
12110
rm -f confinc confmf
 
12111
])
 
12112
 
 
12113
 
 
12114
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
12115
 
 
12116
# This program is free software; you can redistribute it and/or modify
 
12117
# it under the terms of the GNU General Public License as published by
 
12118
# the Free Software Foundation; either version 2, or (at your option)
 
12119
# any later version.
 
12120
 
 
12121
# This program is distributed in the hope that it will be useful,
 
12122
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12123
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12124
# GNU General Public License for more details.
 
12125
 
 
12126
# You should have received a copy of the GNU General Public License
 
12127
# along with this program; if not, write to the Free Software
 
12128
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12129
# 02111-1307, USA.
 
12130
 
 
12131
# serial 3
 
12132
 
 
12133
AC_PREREQ(2.50)
 
12134
 
 
12135
# AM_PROG_LEX
 
12136
# -----------
 
12137
# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
 
12138
# "missing" invocation, for better error output.
 
12139
AC_DEFUN([AM_PROG_LEX],
 
12140
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
 
12141
AC_REQUIRE([AC_PROG_LEX])dnl
 
12142
if test "$LEX" = :; then
 
12143
  LEX=${am_missing_run}flex
 
12144
fi])
 
12145
 
 
12146
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
 
12147
 
 
12148
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
12149
 
 
12150
# This program is free software; you can redistribute it and/or modify
 
12151
# it under the terms of the GNU General Public License as published by
 
12152
# the Free Software Foundation; either version 2, or (at your option)
 
12153
# any later version.
 
12154
 
 
12155
# This program is distributed in the hope that it will be useful,
 
12156
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12157
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12158
# GNU General Public License for more details.
 
12159
 
 
12160
# You should have received a copy of the GNU General Public License
 
12161
# along with this program; if not, write to the Free Software
 
12162
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12163
# 02111-1307, USA.
 
12164
 
 
12165
AC_PREREQ([2.52])
 
12166
 
 
12167
# serial 6
 
12168
 
 
12169
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
12170
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
5113
12171