~ubuntu-branches/debian/sid/kdesvn/sid

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2006-10-27 12:52:15 UTC
  • mfrom: (1.2.1 upstream) (5.1.4 edgy)
  • Revision ID: james.westby@ubuntu.com-20061027125215-aifcjirifidnegx5
Tags: 0.11.0-1
* New upstream release.
* debian/patches/01-kompare_diff.patch
  + Removed. Fixed upstream.
* debian/control
  + Add a "Suggests: kdiff3" to kdesvn. kdiff3 can be used as an external
    merge program.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
##   -*- autoconf -*-
2
 
 
3
 
dnl    This file is part of the KDE libraries/packages
4
 
dnl    Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
5
 
dnl              (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
6
 
 
7
 
dnl    This file is free software; you can redistribute it and/or
8
 
dnl    modify it under the terms of the GNU Library General Public
9
 
dnl    License as published by the Free Software Foundation; either
10
 
dnl    version 2 of the License, or (at your option) any later version.
11
 
 
12
 
dnl    This library is distributed in the hope that it will be useful,
13
 
dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
dnl    Library General Public License for more details.
16
 
 
17
 
dnl    You should have received a copy of the GNU Library General Public License
18
 
dnl    along with this library; see the file COPYING.LIB.  If not, write to
19
 
dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 
dnl    Boston, MA 02111-1307, USA.
21
 
 
22
 
dnl IMPORTANT NOTE:
23
 
dnl Please do not modify this file unless you expect your modifications to be
24
 
dnl carried into every other module in the repository. 
25
 
dnl
26
 
dnl Single-module modifications are best placed in configure.in for kdelibs
27
 
dnl and kdebase or configure.in.in if present.
28
 
 
29
 
# KDE_PATH_X_DIRECT
30
 
dnl Internal subroutine of AC_PATH_X.
31
 
dnl Set ac_x_includes and/or ac_x_libraries.
32
 
AC_DEFUN([KDE_PATH_X_DIRECT],
33
 
[
34
 
AC_REQUIRE([KDE_CHECK_LIB64])
35
 
 
36
 
if test "$ac_x_includes" = NO; then
37
 
  # Guess where to find include files, by looking for this one X11 .h file.
38
 
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
39
 
 
40
 
  # First, try using that file with no special directory specified.
41
 
AC_TRY_CPP([#include <$x_direct_test_include>],
42
 
[# We can compile using X headers with no special include directory.
43
 
ac_x_includes=],
44
 
[# Look for the header file in a standard set of common directories.
45
 
# Check X11 before X11Rn because it is often a symlink to the current release.
46
 
  for ac_dir in               \
47
 
    /usr/X11/include          \
48
 
    /usr/X11R6/include        \
49
 
    /usr/X11R5/include        \
50
 
    /usr/X11R4/include        \
51
 
                              \
52
 
    /usr/include/X11          \
53
 
    /usr/include/X11R6        \
54
 
    /usr/include/X11R5        \
55
 
    /usr/include/X11R4        \
56
 
                              \
57
 
    /usr/local/X11/include    \
58
 
    /usr/local/X11R6/include  \
59
 
    /usr/local/X11R5/include  \
60
 
    /usr/local/X11R4/include  \
61
 
                              \
62
 
    /usr/local/include/X11    \
63
 
    /usr/local/include/X11R6  \
64
 
    /usr/local/include/X11R5  \
65
 
    /usr/local/include/X11R4  \
66
 
                              \
67
 
    /usr/X386/include         \
68
 
    /usr/x386/include         \
69
 
    /usr/XFree86/include/X11  \
70
 
                              \
71
 
    /usr/include              \
72
 
    /usr/local/include        \
73
 
    /usr/unsupported/include  \
74
 
    /usr/athena/include       \
75
 
    /usr/local/x11r5/include  \
76
 
    /usr/lpp/Xamples/include  \
77
 
                              \
78
 
    /usr/openwin/include      \
79
 
    /usr/openwin/share/include \
80
 
    ; \
81
 
  do
82
 
    if test -r "$ac_dir/$x_direct_test_include"; then
83
 
      ac_x_includes=$ac_dir
84
 
      break
85
 
    fi
86
 
  done])
87
 
fi # $ac_x_includes = NO
88
 
 
89
 
if test "$ac_x_libraries" = NO; then
90
 
  # Check for the libraries.
91
 
 
92
 
  test -z "$x_direct_test_library" && x_direct_test_library=Xt
93
 
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
94
 
 
95
 
  # See if we find them without any special options.
96
 
  # Don't add to $LIBS permanently.
97
 
  ac_save_LIBS="$LIBS"
98
 
  LIBS="-l$x_direct_test_library $LIBS"
99
 
AC_TRY_LINK(, [${x_direct_test_function}()],
100
 
[LIBS="$ac_save_LIBS"
101
 
# We can link X programs with no special library path.
102
 
ac_x_libraries=],
103
 
[LIBS="$ac_save_LIBS"
104
 
# First see if replacing the include by lib works.
105
 
# Check X11 before X11Rn because it is often a symlink to the current release.
106
 
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
107
 
    /usr/X11/lib${kdelibsuff}           \
108
 
    /usr/X11R6/lib${kdelibsuff}         \
109
 
    /usr/X11R5/lib${kdelibsuff}         \
110
 
    /usr/X11R4/lib${kdelibsuff}         \
111
 
                                        \
112
 
    /usr/lib${kdelibsuff}/X11           \
113
 
    /usr/lib${kdelibsuff}/X11R6         \
114
 
    /usr/lib${kdelibsuff}/X11R5         \
115
 
    /usr/lib${kdelibsuff}/X11R4         \
116
 
                                        \
117
 
    /usr/local/X11/lib${kdelibsuff}     \
118
 
    /usr/local/X11R6/lib${kdelibsuff}   \
119
 
    /usr/local/X11R5/lib${kdelibsuff}   \
120
 
    /usr/local/X11R4/lib${kdelibsuff}   \
121
 
                                        \
122
 
    /usr/local/lib${kdelibsuff}/X11     \
123
 
    /usr/local/lib${kdelibsuff}/X11R6   \
124
 
    /usr/local/lib${kdelibsuff}/X11R5   \
125
 
    /usr/local/lib${kdelibsuff}/X11R4   \
126
 
                                        \
127
 
    /usr/X386/lib${kdelibsuff}          \
128
 
    /usr/x386/lib${kdelibsuff}          \
129
 
    /usr/XFree86/lib${kdelibsuff}/X11   \
130
 
                                        \
131
 
    /usr/lib${kdelibsuff}               \
132
 
    /usr/local/lib${kdelibsuff}         \
133
 
    /usr/unsupported/lib${kdelibsuff}   \
134
 
    /usr/athena/lib${kdelibsuff}        \
135
 
    /usr/local/x11r5/lib${kdelibsuff}   \
136
 
    /usr/lpp/Xamples/lib${kdelibsuff}   \
137
 
    /lib/usr/lib${kdelibsuff}/X11       \
138
 
                                        \
139
 
    /usr/openwin/lib${kdelibsuff}       \
140
 
    /usr/openwin/share/lib${kdelibsuff} \
141
 
    ; \
142
 
do
143
 
dnl Don't even attempt the hair of trying to link an X program!
144
 
  for ac_extension in a so sl; do
145
 
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
146
 
      ac_x_libraries=$ac_dir
147
 
      break 2
148
 
    fi
149
 
  done
150
 
done])
151
 
fi # $ac_x_libraries = NO
152
 
])
153
 
 
154
 
 
155
 
dnl ------------------------------------------------------------------------
156
 
dnl Find a file (or one of more files in a list of dirs)
157
 
dnl ------------------------------------------------------------------------
158
 
dnl
159
 
AC_DEFUN([AC_FIND_FILE],
160
 
[
161
 
$3=NO
162
 
for i in $2;
163
 
do
164
 
  for j in $1;
165
 
  do
166
 
    echo "configure: __oline__: $i/$j" >&AC_FD_CC
167
 
    if test -r "$i/$j"; then
168
 
      echo "taking that" >&AC_FD_CC
169
 
      $3=$i
170
 
      break 2
171
 
    fi
172
 
  done
173
 
done
174
 
])
175
 
 
176
 
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
177
 
dnl     if-not-found, test-parameter)
178
 
AC_DEFUN([KDE_FIND_PATH],
179
 
[
180
 
   AC_MSG_CHECKING([for $1])
181
 
   if test -n "$$2"; then
182
 
        kde_cv_path="$$2";
183
 
   else
184
 
        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
185
 
 
186
 
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
187
 
        [
188
 
        kde_cv_path="NONE"
189
 
        dirs="$3"
190
 
        kde_save_IFS=$IFS
191
 
        IFS=':'
192
 
        for dir in $PATH; do
193
 
          dirs="$dirs $dir"
194
 
        done
195
 
        IFS=$kde_save_IFS
196
 
 
197
 
        for dir in $dirs; do
198
 
          if test -x "$dir/$1"; then
199
 
            if test -n "$5"
200
 
            then
201
 
              evalstr="$dir/$1 $5 2>&1 "
202
 
              if eval $evalstr; then
203
 
                kde_cv_path="$dir/$1"
204
 
                break
205
 
              fi
206
 
            else
207
 
                kde_cv_path="$dir/$1"
208
 
                break
209
 
            fi
210
 
          fi
211
 
        done
212
 
 
213
 
        eval "kde_cv_path_$kde_cache=$kde_cv_path"
214
 
 
215
 
        ])
216
 
 
217
 
      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
218
 
 
219
 
   fi
220
 
 
221
 
   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
222
 
      AC_MSG_RESULT(not found)
223
 
      $4
224
 
   else
225
 
      AC_MSG_RESULT($kde_cv_path)
226
 
      $2=$kde_cv_path
227
 
 
228
 
   fi
229
 
])
230
 
 
231
 
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
232
 
[
233
 
    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
234
 
Please check whether you installed Qt correctly.
235
 
You need to have a running moc binary.
236
 
configure tried to run $ac_cv_path_moc and the test didn't
237
 
succeed. If configure shouldn't have tried this one, set
238
 
the environment variable MOC to the right one before running
239
 
configure.
240
 
])
241
 
])
242
 
 
243
 
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
244
 
[
245
 
    AC_MSG_WARN([No Qt ui compiler (uic) found!
246
 
Please check whether you installed Qt correctly.
247
 
You need to have a running uic binary.
248
 
configure tried to run $ac_cv_path_uic and the test didn't
249
 
succeed. If configure shouldn't have tried this one, set
250
 
the environment variable UIC to the right one before running
251
 
configure.
252
 
])
253
 
])
254
 
 
255
 
 
256
 
AC_DEFUN([KDE_CHECK_UIC_FLAG],
257
 
[
258
 
    AC_MSG_CHECKING([whether uic supports -$1 ])
259
 
    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
260
 
    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
261
 
    [
262
 
        cat >conftest.ui <<EOT
263
 
        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
264
 
EOT
265
 
        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
266
 
        if AC_TRY_EVAL(ac_uic_testrun); then
267
 
            eval "kde_cv_prog_uic_$kde_cache=yes"
268
 
        else
269
 
            eval "kde_cv_prog_uic_$kde_cache=no"
270
 
        fi
271
 
        rm -f conftest*
272
 
    ])
273
 
 
274
 
    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
275
 
        AC_MSG_RESULT([yes])
276
 
        :
277
 
        $3
278
 
    else
279
 
        AC_MSG_RESULT([no])
280
 
        :
281
 
        $4
282
 
    fi
283
 
])
284
 
 
285
 
 
286
 
dnl ------------------------------------------------------------------------
287
 
dnl Find the meta object compiler and the ui compiler in the PATH,
288
 
dnl in $QTDIR/bin, and some more usual places
289
 
dnl ------------------------------------------------------------------------
290
 
dnl
291
 
AC_DEFUN([AC_PATH_QT_MOC_UIC],
292
 
[
293
 
   AC_REQUIRE([KDE_CHECK_PERL])
294
 
   qt_bindirs=""
295
 
   for dir in $kde_qt_dirs; do
296
 
      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
297
 
   done
298
 
   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
299
 
   if test ! "$ac_qt_bindir" = "NO"; then
300
 
      qt_bindirs="$ac_qt_bindir $qt_bindirs"
301
 
   fi
302
 
 
303
 
   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
304
 
   if test -z "$UIC_NOT_NEEDED"; then
305
 
     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
306
 
     if test -z "$UIC_PATH" ; then
307
 
       KDE_UIC_ERROR_MESSAGE
308
 
       exit 1
309
 
     else
310
 
       UIC=$UIC_PATH
311
 
 
312
 
       if test $kde_qtver = 3; then
313
 
         KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
314
 
         KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
315
 
 
316
 
         if test x$ac_uic_supports_libpath = xyes; then
317
 
             UIC="$UIC -L \$(kde_widgetdir)"
318
 
         fi
319
 
         if test x$ac_uic_supports_nounload = xyes; then
320
 
             UIC="$UIC -nounload"
321
 
         fi
322
 
       fi
323
 
     fi
324
 
   else
325
 
     UIC="echo uic not available: "
326
 
   fi
327
 
 
328
 
   AC_SUBST(MOC)
329
 
   AC_SUBST(UIC)
330
 
 
331
 
   UIC_TR="i18n"
332
 
   if test $kde_qtver = 3; then
333
 
     UIC_TR="tr2i18n"
334
 
   fi
335
 
 
336
 
   AC_SUBST(UIC_TR)
337
 
])
338
 
 
339
 
AC_DEFUN([KDE_1_CHECK_PATHS],
340
 
[
341
 
  KDE_1_CHECK_PATH_HEADERS
342
 
 
343
 
  KDE_TEST_RPATH=
344
 
 
345
 
  if test -n "$USE_RPATH"; then
346
 
 
347
 
     if test -n "$kde_libraries"; then
348
 
       KDE_TEST_RPATH="-R $kde_libraries"
349
 
     fi
350
 
 
351
 
     if test -n "$qt_libraries"; then
352
 
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
353
 
     fi
354
 
 
355
 
     if test -n "$x_libraries"; then
356
 
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
357
 
     fi
358
 
 
359
 
     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
360
 
  fi
361
 
 
362
 
AC_MSG_CHECKING([for KDE libraries installed])
363
 
ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
364
 
 
365
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
366
 
  AC_MSG_RESULT(yes)
367
 
else
368
 
  AC_MSG_ERROR([your system fails at linking a small KDE application!
369
 
Check, if your compiler is installed correctly and if you have used the
370
 
same compiler to compile Qt and kdelibs as you did use now.
371
 
For more details about this problem, look at the end of config.log.])
372
 
fi
373
 
 
374
 
if eval `KDEDIR= ./conftest 2>&5`; then
375
 
  kde_result=done
376
 
else
377
 
  kde_result=problems
378
 
fi
379
 
 
380
 
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
381
 
kde_have_all_paths=yes
382
 
 
383
 
KDE_SET_PATHS($kde_result)
384
 
 
385
 
])
386
 
 
387
 
AC_DEFUN([KDE_SET_PATHS],
388
 
[
389
 
  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
390
 
        kde_htmldir=\"$kde_htmldir\" \
391
 
        kde_appsdir=\"$kde_appsdir\" \
392
 
        kde_icondir=\"$kde_icondir\" \
393
 
        kde_sounddir=\"$kde_sounddir\" \
394
 
        kde_datadir=\"$kde_datadir\" \
395
 
        kde_locale=\"$kde_locale\" \
396
 
        kde_cgidir=\"$kde_cgidir\" \
397
 
        kde_confdir=\"$kde_confdir\" \
398
 
        kde_kcfgdir=\"$kde_kcfgdir\" \
399
 
        kde_mimedir=\"$kde_mimedir\" \
400
 
        kde_toolbardir=\"$kde_toolbardir\" \
401
 
        kde_wallpaperdir=\"$kde_wallpaperdir\" \
402
 
        kde_templatesdir=\"$kde_templatesdir\" \
403
 
        kde_bindir=\"$kde_bindir\" \
404
 
        kde_servicesdir=\"$kde_servicesdir\" \
405
 
        kde_servicetypesdir=\"$kde_servicetypesdir\" \
406
 
        kde_moduledir=\"$kde_moduledir\" \
407
 
        kde_styledir=\"$kde_styledir\" \
408
 
        kde_widgetdir=\"$kde_widgetdir\" \
409
 
        xdg_appsdir=\"$xdg_appsdir\" \
410
 
        xdg_menudir=\"$xdg_menudir\" \
411
 
        xdg_directorydir=\"$xdg_directorydir\" \
412
 
        kde_result=$1"
413
 
])
414
 
 
415
 
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
416
 
[
417
 
if test "$1" = "default"; then
418
 
 
419
 
  if test -z "$kde_htmldir"; then
420
 
    kde_htmldir='\${datadir}/doc/HTML'
421
 
  fi
422
 
  if test -z "$kde_appsdir"; then
423
 
    kde_appsdir='\${datadir}/applnk'
424
 
  fi
425
 
  if test -z "$kde_icondir"; then
426
 
    kde_icondir='\${datadir}/icons'
427
 
  fi
428
 
  if test -z "$kde_sounddir"; then
429
 
    kde_sounddir='\${datadir}/sounds'
430
 
  fi
431
 
  if test -z "$kde_datadir"; then
432
 
    kde_datadir='\${datadir}/apps'
433
 
  fi
434
 
  if test -z "$kde_locale"; then
435
 
    kde_locale='\${datadir}/locale'
436
 
  fi
437
 
  if test -z "$kde_cgidir"; then
438
 
    kde_cgidir='\${exec_prefix}/cgi-bin'
439
 
  fi
440
 
  if test -z "$kde_confdir"; then
441
 
    kde_confdir='\${datadir}/config'
442
 
  fi
443
 
  if test -z "$kde_kcfgdir"; then
444
 
    kde_kcfgdir='\${datadir}/config.kcfg'
445
 
  fi
446
 
  if test -z "$kde_mimedir"; then
447
 
    kde_mimedir='\${datadir}/mimelnk'
448
 
  fi
449
 
  if test -z "$kde_toolbardir"; then
450
 
    kde_toolbardir='\${datadir}/toolbar'
451
 
  fi
452
 
  if test -z "$kde_wallpaperdir"; then
453
 
    kde_wallpaperdir='\${datadir}/wallpapers'
454
 
  fi
455
 
  if test -z "$kde_templatesdir"; then
456
 
    kde_templatesdir='\${datadir}/templates'
457
 
  fi
458
 
  if test -z "$kde_bindir"; then
459
 
    kde_bindir='\${exec_prefix}/bin'
460
 
  fi
461
 
  if test -z "$kde_servicesdir"; then
462
 
    kde_servicesdir='\${datadir}/services'
463
 
  fi
464
 
  if test -z "$kde_servicetypesdir"; then
465
 
    kde_servicetypesdir='\${datadir}/servicetypes'
466
 
  fi
467
 
  if test -z "$kde_moduledir"; then
468
 
    if test "$kde_qtver" = "2"; then
469
 
      kde_moduledir='\${libdir}/kde2'
470
 
    else
471
 
      kde_moduledir='\${libdir}/kde3'
472
 
    fi
473
 
  fi
474
 
  if test -z "$kde_styledir"; then
475
 
    kde_styledir='\${libdir}/kde3/plugins/styles'
476
 
  fi
477
 
  if test -z "$kde_widgetdir"; then
478
 
    kde_widgetdir='\${libdir}/kde3/plugins/designer'
479
 
  fi
480
 
  if test -z "$xdg_appsdir"; then
481
 
    xdg_appsdir='\${datadir}/applications/kde'
482
 
  fi
483
 
  if test -z "$xdg_menudir"; then
484
 
    xdg_menudir='\${sysconfdir}/xdg/menus'
485
 
  fi
486
 
  if test -z "$xdg_directorydir"; then
487
 
    xdg_directorydir='\${datadir}/desktop-directories'
488
 
  fi
489
 
 
490
 
  KDE_SET_PATHS(defaults)
491
 
 
492
 
else
493
 
 
494
 
  if test $kde_qtver = 1; then
495
 
     AC_MSG_RESULT([compiling])
496
 
     KDE_1_CHECK_PATHS
497
 
  else
498
 
     AC_MSG_ERROR([path checking not yet supported for KDE 2])
499
 
  fi
500
 
 
501
 
fi
502
 
])
503
 
 
504
 
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
505
 
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
506
 
   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
507
 
   test -z "$kde_datadir" || test -z "$kde_locale"  ||
508
 
   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
509
 
   test -z "$kde_kcfgdir" ||
510
 
   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
511
 
   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
512
 
   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
513
 
   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
514
 
   test -z "$kde_styledir" || test -z "kde_widgetdir" ||
515
 
   test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
516
 
   test "x$kde_have_all_paths" != "xyes"; then
517
 
     kde_have_all_paths=no
518
 
  fi
519
 
])
520
 
 
521
 
AC_DEFUN([KDE_MISSING_PROG_ERROR],
522
 
[
523
 
    AC_MSG_ERROR([The important program $1 was not found!
524
 
Please check whether you installed KDE correctly.
525
 
])
526
 
])
527
 
 
528
 
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
529
 
[
530
 
    AC_MSG_ERROR([The important program $1 was not found!
531
 
Please check whether you installed aRts correctly or use
532
 
--without-arts to compile without aRts support (this will remove functionality).
533
 
])
534
 
])
535
 
 
536
 
AC_DEFUN([KDE_SUBST_PROGRAMS],
537
 
[
538
 
    AC_ARG_WITH(arts,
539
 
        AC_HELP_STRING([--without-arts],[build without aRts [default=yes]]),
540
 
        [build_arts=$withval],
541
 
        [build_arts=yes]
542
 
    )
543
 
    AM_CONDITIONAL(include_ARTS, test "$build_arts" != "no")
544
 
 
545
 
        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"
546
 
        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
547
 
        if test -n "$KDEDIRS"; then
548
 
           kde_save_IFS=$IFS
549
 
           IFS=:
550
 
           for dir in $KDEDIRS; do
551
 
                kde_default_bindirs="$dir/bin $kde_default_bindirs "
552
 
           done
553
 
           IFS=$kde_save_IFS
554
 
        fi
555
 
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
556
 
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
557
 
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
558
 
        if test "$build_arts" != "no"; then
559
 
          KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
560
 
          KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
561
 
        fi
562
 
        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
563
 
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
564
 
 
565
 
        kde32ornewer=1
566
 
        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
567
 
            kde32ornewer=
568
 
        else
569
 
            if test "$kde_qtver" = "3" && test "$kde_qtsubver" -le 1; then
570
 
                kde32ornewer=
571
 
            fi
572
 
        fi
573
 
 
574
 
        if test -n "$kde32ornewer"; then
575
 
            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
576
 
            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
577
 
        fi
578
 
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [XMLLINT=""])
579
 
 
580
 
        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
581
 
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
582
 
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
583
 
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
584
 
            if test "$KDE_XSL_STYLESHEET" = "NO"; then
585
 
                KDE_XSL_STYLESHEET=""
586
 
            else
587
 
                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
588
 
            fi
589
 
        fi
590
 
 
591
 
        DCOP_DEPENDENCIES='$(DCOPIDL)'
592
 
        if test -n "$kde32ornewer"; then
593
 
            KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
594
 
            DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
595
 
            AC_SUBST(KCONFIG_COMPILER)
596
 
            AC_SUBST(KCFG_DEPENDENCIES)
597
 
            AC_SUBST(DCOPIDLNG)
598
 
        fi
599
 
        AC_SUBST(DCOPIDL)
600
 
        AC_SUBST(DCOPIDL2CPP)
601
 
        AC_SUBST(DCOP_DEPENDENCIES)
602
 
        AC_SUBST(MCOPIDL)
603
 
        AC_SUBST(ARTSCCONFIG)
604
 
        AC_SUBST(KDECONFIG)
605
 
        AC_SUBST(MEINPROC)
606
 
        AC_SUBST(KDE_XSL_STYLESHEET)
607
 
        AC_SUBST(XMLLINT)
608
 
 
609
 
        if test -x "$KDECONFIG"; then # it can be "compiled"
610
 
          kde_libs_prefix=`$KDECONFIG --prefix`
611
 
          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
612
 
               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
613
 
                          This means it has been moved since you installed it.
614
 
                          This won't work. Please recompile kdelibs for the new prefix.
615
 
                          ])
616
 
           fi
617
 
           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
618
 
        else
619
 
           kde_libs_prefix='$(prefix)'
620
 
           kde_libs_htmldir='$(kde_htmldir)'
621
 
        fi
622
 
        AC_SUBST(kde_libs_prefix)
623
 
        AC_SUBST(kde_libs_htmldir)
624
 
])dnl
625
 
 
626
 
AC_DEFUN([AC_CREATE_KFSSTND],
627
 
[
628
 
AC_REQUIRE([AC_CHECK_RPATH])
629
 
 
630
 
AC_MSG_CHECKING([for KDE paths])
631
 
kde_result=""
632
 
kde_cached_paths=yes
633
 
AC_CACHE_VAL(kde_cv_all_paths,
634
 
[
635
 
  KDE_SET_DEFAULT_PATHS($1)
636
 
  kde_cached_paths=no
637
 
])
638
 
eval "$kde_cv_all_paths"
639
 
KDE_CHECK_PATHS_FOR_COMPLETENESS
640
 
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
641
 
  # wrong values were cached, may be, we can set better ones
642
 
  kde_result=
643
 
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
644
 
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
645
 
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
646
 
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
647
 
  kde_have_all_paths=
648
 
  kde_styledir=
649
 
  kde_widgetdir=
650
 
  xdg_appsdir = xdg_menudir= xdg_directorydir= 
651
 
  KDE_SET_DEFAULT_PATHS($1)
652
 
  eval "$kde_cv_all_paths"
653
 
  KDE_CHECK_PATHS_FOR_COMPLETENESS
654
 
  kde_result="$kde_result (cache overridden)"
655
 
fi
656
 
if test "$kde_have_all_paths" = "no"; then
657
 
  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
658
 
Since it had compiled and linked before, it must be a strange problem on your system.
659
 
Look at config.log for details. If you are not able to fix this, look at
660
 
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
661
 
(If you're using an egcs version on Linux, you may update binutils!)
662
 
])
663
 
else
664
 
  rm -f conftest*
665
 
  AC_MSG_RESULT($kde_result)
666
 
fi
667
 
 
668
 
bindir=$kde_bindir
669
 
 
670
 
KDE_SUBST_PROGRAMS
671
 
 
672
 
])
673
 
 
674
 
AC_DEFUN([AC_SUBST_KFSSTND],
675
 
[
676
 
AC_SUBST(kde_htmldir)
677
 
AC_SUBST(kde_appsdir)
678
 
AC_SUBST(kde_icondir)
679
 
AC_SUBST(kde_sounddir)
680
 
AC_SUBST(kde_datadir)
681
 
AC_SUBST(kde_locale)
682
 
AC_SUBST(kde_confdir)
683
 
AC_SUBST(kde_kcfgdir)
684
 
AC_SUBST(kde_mimedir)
685
 
AC_SUBST(kde_wallpaperdir)
686
 
AC_SUBST(kde_bindir)
687
 
dnl X Desktop Group standards
688
 
AC_SUBST(xdg_appsdir)
689
 
AC_SUBST(xdg_menudir)
690
 
AC_SUBST(xdg_directorydir)
691
 
dnl for KDE 2
692
 
AC_SUBST(kde_templatesdir)
693
 
AC_SUBST(kde_servicesdir)
694
 
AC_SUBST(kde_servicetypesdir)
695
 
AC_SUBST(kde_moduledir)
696
 
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
697
 
AC_SUBST(kde_styledir)
698
 
AC_SUBST(kde_widgetdir)
699
 
if test "$kde_qtver" = 1; then
700
 
  kde_minidir="$kde_icondir/mini"
701
 
else
702
 
# for KDE 1 - this breaks KDE2 apps using minidir, but
703
 
# that's the plan ;-/
704
 
  kde_minidir="/dev/null"
705
 
fi
706
 
dnl AC_SUBST(kde_minidir)
707
 
dnl AC_SUBST(kde_cgidir)
708
 
dnl AC_SUBST(kde_toolbardir)
709
 
])
710
 
 
711
 
AC_DEFUN([KDE_MISC_TESTS],
712
 
[
713
 
   dnl Checks for libraries.
714
 
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
715
 
   AC_SUBST(LIBUTIL)
716
 
   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
717
 
   AC_SUBST(LIBCOMPAT)
718
 
   kde_have_crypt=
719
 
   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
720
 
      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
721
 
        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
722
 
You should install libcrypt from another source or configure with PAM
723
 
support])
724
 
        kde_have_crypt=no
725
 
      ]))
726
 
   AC_SUBST(LIBCRYPT)
727
 
   if test $kde_have_crypt = yes; then
728
 
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
729
 
   fi
730
 
   AC_CHECK_SOCKLEN_T
731
 
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
732
 
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
733
 
      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
734
 
        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
735
 
   fi
736
 
   AC_CHECK_FUNC(inet_ntoa)
737
 
   if test $ac_cv_func_inet_ntoa = no; then
738
 
     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
739
 
   fi
740
 
   AC_CHECK_FUNC(connect)
741
 
   if test $ac_cv_func_connect = no; then
742
 
      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
743
 
        $X_EXTRA_LIBS)
744
 
   fi
745
 
 
746
 
   AC_CHECK_FUNC(remove)
747
 
   if test $ac_cv_func_remove = no; then
748
 
      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
749
 
   fi
750
 
 
751
 
   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
752
 
   AC_CHECK_FUNC(shmat, ,
753
 
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
754
 
   
755
 
   # more headers that need to be explicitly included on darwin
756
 
   AC_CHECK_HEADERS(sys/types.h stdint.h)
757
 
 
758
 
   # darwin requires a poll emulation library
759
 
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
760
 
 
761
 
   # CoreAudio framework
762
 
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
763
 
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
764
 
     FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
765
 
   ])
766
 
 
767
 
   AC_CHECK_RES_INIT
768
 
   AC_SUBST(LIB_POLL)
769
 
   AC_SUBST(FRAMEWORK_COREAUDIO)
770
 
   LIBSOCKET="$X_EXTRA_LIBS"
771
 
   AC_SUBST(LIBSOCKET)
772
 
   AC_SUBST(X_EXTRA_LIBS)
773
 
   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
774
 
   AC_SUBST(LIBUCB)
775
 
 
776
 
   case $host in  dnl this *is* LynxOS specific
777
 
   *-*-lynxos* )
778
 
        AC_MSG_CHECKING([LynxOS header file wrappers])
779
 
        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
780
 
        AC_MSG_RESULT(disabled)
781
 
        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
782
 
         ;;
783
 
    esac
784
 
 
785
 
   KDE_CHECK_TYPES
786
 
   KDE_CHECK_LIBDL
787
 
   KDE_CHECK_STRLCPY
788
 
 
789
 
# darwin needs this to initialize the environment
790
 
AC_CHECK_HEADERS(crt_externs.h)
791
 
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
792
 
 
793
 
AH_VERBATIM(_DARWIN_ENVIRON,
794
 
[
795
 
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
796
 
# include <sys/time.h>
797
 
# include <crt_externs.h>
798
 
# define environ (*_NSGetEnviron())
799
 
#endif
800
 
])
801
 
 
802
 
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
803
 
[
804
 
/*
805
 
 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
806
 
 * that defines bzero.
807
 
 */
808
 
 
809
 
#if defined(_AIX)
810
 
#include <strings.h>
811
 
#endif
812
 
])
813
 
 
814
 
AC_CHECK_FUNCS([vsnprintf snprintf])
815
 
 
816
 
AH_VERBATIM(_TRU64,[
817
 
/*
818
 
 * On HP-UX, the declaration of vsnprintf() is needed every time !
819
 
 */
820
 
 
821
 
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
822
 
#if __STDC__
823
 
#include <stdarg.h>
824
 
#include <stdlib.h>
825
 
#else
826
 
#include <varargs.h>
827
 
#endif
828
 
#ifdef __cplusplus
829
 
extern "C"
830
 
#endif
831
 
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
832
 
#ifdef __cplusplus
833
 
extern "C"
834
 
#endif
835
 
int snprintf(char *str, size_t n, char const *fmt, ...);
836
 
#endif
837
 
])
838
 
 
839
 
])
840
 
 
841
 
dnl ------------------------------------------------------------------------
842
 
dnl Find the header files and libraries for X-Windows. Extended the
843
 
dnl macro AC_PATH_X
844
 
dnl ------------------------------------------------------------------------
845
 
dnl
846
 
AC_DEFUN([K_PATH_X],
847
 
[
848
 
AC_REQUIRE([KDE_MISC_TESTS])dnl
849
 
AC_REQUIRE([KDE_CHECK_LIB64])
850
 
 
851
 
AC_ARG_ENABLE(
852
 
  embedded,
853
 
  AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
854
 
  kde_use_qt_emb=$enableval,
855
 
  kde_use_qt_emb=no
856
 
)
857
 
 
858
 
AC_ARG_ENABLE(
859
 
  qtopia,
860
 
  AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
861
 
  kde_use_qt_emb_palm=$enableval,
862
 
  kde_use_qt_emb_palm=no
863
 
)
864
 
 
865
 
AC_ARG_ENABLE(
866
 
  mac,
867
 
  AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
868
 
  kde_use_qt_mac=$enableval,
869
 
  kde_use_qt_mac=no
870
 
)
871
 
 
872
 
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
873
 
 
874
 
AC_MSG_CHECKING(for X)
875
 
 
876
 
AC_CACHE_VAL(kde_cv_have_x,
877
 
[# One or both of the vars are not set, and there is no cached value.
878
 
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
879
 
   kde_x_includes=NO
880
 
else
881
 
   kde_x_includes=$x_includes
882
 
fi
883
 
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
884
 
   kde_x_libraries=NO
885
 
else
886
 
   kde_x_libraries=$x_libraries
887
 
fi
888
 
 
889
 
# below we use the standard autoconf calls
890
 
ac_x_libraries=$kde_x_libraries
891
 
ac_x_includes=$kde_x_includes
892
 
 
893
 
KDE_PATH_X_DIRECT
894
 
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
895
 
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
896
 
dnl location. The correct location is /usr/lib32 or an undefined value
897
 
dnl (the linker is smart enough to pick the correct default library).
898
 
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
899
 
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
900
 
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
901
 
dnl x_includes should be left alone.
902
 
case "$host" in
903
 
mips-sgi-irix6*)
904
 
  ;;
905
 
*-*-solaris*)
906
 
  ;;
907
 
*)
908
 
  _AC_PATH_X_XMKMF
909
 
  if test -z "$ac_x_includes"; then
910
 
    ac_x_includes="."
911
 
  fi
912
 
  if test -z "$ac_x_libraries"; then
913
 
    ac_x_libraries="/usr/lib${kdelibsuff}"
914
 
  fi
915
 
esac
916
 
#from now on we use our own again
917
 
 
918
 
# when the user already gave --x-includes, we ignore
919
 
# what the standard autoconf macros told us.
920
 
if test "$kde_x_includes" = NO; then
921
 
  kde_x_includes=$ac_x_includes
922
 
fi
923
 
 
924
 
# for --x-libraries too
925
 
if test "$kde_x_libraries" = NO; then
926
 
  kde_x_libraries=$ac_x_libraries
927
 
fi
928
 
 
929
 
if test "$kde_x_includes" = NO; then
930
 
  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
931
 
fi
932
 
 
933
 
if test "$kde_x_libraries" = NO; then
934
 
  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
935
 
fi
936
 
 
937
 
# Record where we found X for the cache.
938
 
kde_cv_have_x="have_x=yes \
939
 
         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
940
 
])dnl
941
 
 
942
 
eval "$kde_cv_have_x"
943
 
 
944
 
if test "$have_x" != yes; then
945
 
  AC_MSG_RESULT($have_x)
946
 
  no_x=yes
947
 
else
948
 
  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
949
 
fi
950
 
 
951
 
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
952
 
  X_INCLUDES=""
953
 
  x_includes="."; dnl better than nothing :-
954
 
 else
955
 
  x_includes=$kde_x_includes
956
 
  X_INCLUDES="-I$x_includes"
957
 
fi
958
 
 
959
 
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
960
 
  X_LDFLAGS=""
961
 
  x_libraries="/usr/lib"; dnl better than nothing :-
962
 
 else
963
 
  x_libraries=$kde_x_libraries
964
 
  X_LDFLAGS="-L$x_libraries"
965
 
fi
966
 
all_includes="$X_INCLUDES"
967
 
all_libraries="$X_LDFLAGS"
968
 
 
969
 
# Check for libraries that X11R6 Xt/Xaw programs need.
970
 
ac_save_LDFLAGS="$LDFLAGS"
971
 
LDFLAGS="$LDFLAGS $X_LDFLAGS"
972
 
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
973
 
# check for ICE first), but we must link in the order -lSM -lICE or
974
 
# we get undefined symbols.  So assume we have SM if we have ICE.
975
 
# These have to be linked with before -lX11, unlike the other
976
 
# libraries we check for below, so use a different variable.
977
 
#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
978
 
AC_CHECK_LIB(ICE, IceConnectionNumber,
979
 
  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
980
 
LDFLAGS="$ac_save_LDFLAGS"
981
 
 
982
 
LIB_X11='-lX11 $(LIBSOCKET)'
983
 
 
984
 
AC_MSG_CHECKING(for libXext)
985
 
AC_CACHE_VAL(kde_cv_have_libXext,
986
 
[
987
 
kde_ldflags_safe="$LDFLAGS"
988
 
kde_libs_safe="$LIBS"
989
 
 
990
 
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
991
 
LIBS="-lXext -lX11 $LIBSOCKET"
992
 
 
993
 
AC_TRY_LINK([
994
 
#include <stdio.h>
995
 
#ifdef STDC_HEADERS
996
 
# include <stdlib.h>
997
 
#endif
998
 
],
999
 
[
1000
 
printf("hello Xext\n");
1001
 
],
1002
 
kde_cv_have_libXext=yes,
1003
 
kde_cv_have_libXext=no
1004
 
)
1005
 
 
1006
 
LDFLAGS=$kde_ldflags_safe
1007
 
LIBS=$kde_libs_safe
1008
 
])
1009
 
 
1010
 
AC_MSG_RESULT($kde_cv_have_libXext)
1011
 
 
1012
 
if test "$kde_cv_have_libXext" = "no"; then
1013
 
  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1014
 
can't find it itself, we stop here assuming that make wouldn't find
1015
 
them either.])
1016
 
fi
1017
 
 
1018
 
LIB_XEXT="-lXext"
1019
 
QTE_NORTTI=""
1020
 
 
1021
 
elif test "$kde_use_qt_emb" = "yes"; then
1022
 
  dnl We're using QT Embedded
1023
 
  CPPFLAGS=-DQWS
1024
 
  CXXFLAGS="$CXXFLAGS -fno-rtti"
1025
 
  QTE_NORTTI="-fno-rtti -DQWS"
1026
 
  X_PRE_LIBS=""
1027
 
  LIB_X11=""
1028
 
  LIB_XEXT=""
1029
 
  LIB_XRENDER=""
1030
 
  LIBSM=""
1031
 
  X_INCLUDES=""
1032
 
  X_LDFLAGS=""
1033
 
  x_includes=""
1034
 
  x_libraries=""
1035
 
elif test "$kde_use_qt_mac" = "yes"; then
1036
 
  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1037
 
  dnl be included to get the information) --Sam
1038
 
  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1039
 
  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1040
 
  X_PRE_LIBS=""
1041
 
  LIB_X11=""
1042
 
  LIB_XEXT=""
1043
 
  LIB_XRENDER=""
1044
 
  LIBSM=""
1045
 
  X_INCLUDES=""
1046
 
  X_LDFLAGS=""
1047
 
  x_includes=""
1048
 
  x_libraries=""
1049
 
fi
1050
 
AC_SUBST(X_PRE_LIBS)
1051
 
AC_SUBST(LIB_X11)
1052
 
AC_SUBST(LIB_XRENDER)
1053
 
AC_SUBST(LIBSM)
1054
 
AC_SUBST(X_INCLUDES)
1055
 
AC_SUBST(X_LDFLAGS)
1056
 
AC_SUBST(x_includes)
1057
 
AC_SUBST(x_libraries)
1058
 
AC_SUBST(QTE_NORTTI)
1059
 
AC_SUBST(LIB_XEXT)
1060
 
 
1061
 
])
1062
 
 
1063
 
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1064
 
[
1065
 
AC_REQUIRE([KDE_USE_QT])
1066
 
cat > conftest.$ac_ext <<EOF
1067
 
#include "confdefs.h"
1068
 
#include <qglobal.h>
1069
 
#include <qapplication.h>
1070
 
EOF
1071
 
if test "$kde_qtver" = "2"; then
1072
 
cat >> conftest.$ac_ext <<EOF
1073
 
#include <qevent.h>
1074
 
#include <qstring.h>
1075
 
#include <qstyle.h>
1076
 
EOF
1077
 
 
1078
 
if test $kde_qtsubver -gt 0; then
1079
 
cat >> conftest.$ac_ext <<EOF
1080
 
#if QT_VERSION < 210
1081
 
#error 1
1082
 
#endif
1083
 
EOF
1084
 
fi
1085
 
fi
1086
 
 
1087
 
if test "$kde_qtver" = "3"; then
1088
 
cat >> conftest.$ac_ext <<EOF
1089
 
#include <qcursor.h>
1090
 
#include <qstylefactory.h>
1091
 
#include <private/qucomextra_p.h>
1092
 
EOF
1093
 
fi
1094
 
 
1095
 
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1096
 
cat >> conftest.$ac_ext <<EOF
1097
 
#error 1
1098
 
#endif
1099
 
 
1100
 
int main() {
1101
 
EOF
1102
 
if test "$kde_qtver" = "2"; then
1103
 
cat >> conftest.$ac_ext <<EOF
1104
 
    QStringList *t = new QStringList();
1105
 
    Q_UNUSED(t);
1106
 
EOF
1107
 
if test $kde_qtsubver -gt 0; then
1108
 
cat >> conftest.$ac_ext <<EOF
1109
 
    QString s;
1110
 
    s.setLatin1("Elvis is alive", 14);
1111
 
EOF
1112
 
fi
1113
 
fi
1114
 
if test "$kde_qtver" = "3"; then
1115
 
cat >> conftest.$ac_ext <<EOF
1116
 
    (void)QStyleFactory::create(QString::null);
1117
 
    QCursor c(Qt::WhatsThisCursor);
1118
 
EOF
1119
 
fi
1120
 
cat >> conftest.$ac_ext <<EOF
1121
 
    return 0;
1122
 
}
1123
 
EOF
1124
 
])
1125
 
 
1126
 
AC_DEFUN([KDE_USE_QT],
1127
 
[
1128
 
if test -z "$1"; then
1129
 
  # Current default Qt version: 3.2
1130
 
  kde_qtver=3
1131
 
  kde_qtsubver=2
1132
 
else
1133
 
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1134
 
  # following is the check if subversion isnt found in passed argument
1135
 
  if test "$kde_qtsubver" = "$1"; then
1136
 
    kde_qtsubver=1
1137
 
  fi
1138
 
  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1139
 
  if test "$kde_qtver" = "1"; then
1140
 
    kde_qtsubver=42
1141
 
  fi
1142
 
fi
1143
 
 
1144
 
if test -z "$2"; then
1145
 
  if test "$kde_qtver" = "2"; then
1146
 
    if test $kde_qtsubver -gt 0; then
1147
 
      kde_qt_minversion=">= Qt 2.2.2"
1148
 
    else
1149
 
      kde_qt_minversion=">= Qt 2.0.2"
1150
 
    fi
1151
 
  fi
1152
 
  if test "$kde_qtver" = "3"; then
1153
 
    if test $kde_qtsubver -gt 0; then
1154
 
         if test $kde_qtsubver -gt 1; then
1155
 
            kde_qt_minversion=">= Qt 3.2"
1156
 
         else
1157
 
            kde_qt_minversion=">= Qt 3.1 (20021021)"
1158
 
         fi
1159
 
    else
1160
 
      kde_qt_minversion=">= Qt 3.0"
1161
 
    fi
1162
 
  fi
1163
 
  if test "$kde_qtver" = "1"; then
1164
 
    kde_qt_minversion=">= 1.42 and < 2.0"
1165
 
  fi
1166
 
else
1167
 
   kde_qt_minversion="$2"
1168
 
fi
1169
 
 
1170
 
if test -z "$3"; then
1171
 
   if test $kde_qtver = 3; then
1172
 
     if test $kde_qtsubver -gt 0; then
1173
 
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00"
1174
 
       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1175
 
       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1176
 
     else
1177
 
       kde_qt_verstring="QT_VERSION >= 300"
1178
 
     fi
1179
 
   fi
1180
 
   if test $kde_qtver = 2; then
1181
 
     if test $kde_qtsubver -gt 0; then
1182
 
       kde_qt_verstring="QT_VERSION >= 222"
1183
 
     else
1184
 
       kde_qt_verstring="QT_VERSION >= 200"
1185
 
     fi
1186
 
   fi
1187
 
   if test $kde_qtver = 1; then
1188
 
    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1189
 
   fi
1190
 
else
1191
 
   kde_qt_verstring="$3"
1192
 
fi
1193
 
 
1194
 
if test $kde_qtver = 3; then
1195
 
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1196
 
fi
1197
 
if test $kde_qtver = 2; then
1198
 
   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1199
 
fi
1200
 
if test $kde_qtver = 1; then
1201
 
   kde_qt_dirs="$QTDIR /usr/lib/qt"
1202
 
fi
1203
 
])
1204
 
 
1205
 
AC_DEFUN([KDE_CHECK_QT_DIRECT],
1206
 
[
1207
 
AC_REQUIRE([KDE_USE_QT])
1208
 
AC_MSG_CHECKING([if Qt compiles without flags])
1209
 
AC_CACHE_VAL(kde_cv_qt_direct,
1210
 
[
1211
 
AC_LANG_SAVE
1212
 
AC_LANG_CPLUSPLUS
1213
 
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1214
 
ac_LIBRARY_PATH="$LIBRARY_PATH"
1215
 
ac_cxxflags_safe="$CXXFLAGS"
1216
 
ac_ldflags_safe="$LDFLAGS"
1217
 
ac_libs_safe="$LIBS"
1218
 
 
1219
 
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1220
 
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1221
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1222
 
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1223
 
else
1224
 
LIBS="$LIBQT $LIBSOCKET"
1225
 
fi
1226
 
LD_LIBRARY_PATH=
1227
 
export LD_LIBRARY_PATH
1228
 
LIBRARY_PATH=
1229
 
export LIBRARY_PATH
1230
 
 
1231
 
KDE_PRINT_QT_PROGRAM
1232
 
 
1233
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1234
 
  kde_cv_qt_direct="yes"
1235
 
else
1236
 
  kde_cv_qt_direct="no"
1237
 
  echo "configure: failed program was:" >&AC_FD_CC
1238
 
  cat conftest.$ac_ext >&AC_FD_CC
1239
 
fi
1240
 
 
1241
 
rm -f conftest*
1242
 
CXXFLAGS="$ac_cxxflags_safe"
1243
 
LDFLAGS="$ac_ldflags_safe"
1244
 
LIBS="$ac_libs_safe"
1245
 
 
1246
 
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1247
 
export LD_LIBRARY_PATH
1248
 
LIBRARY_PATH="$ac_LIBRARY_PATH"
1249
 
export LIBRARY_PATH
1250
 
AC_LANG_RESTORE
1251
 
])
1252
 
 
1253
 
if test "$kde_cv_qt_direct" = "yes"; then
1254
 
  AC_MSG_RESULT(yes)
1255
 
  $1
1256
 
else
1257
 
  AC_MSG_RESULT(no)
1258
 
  $2
1259
 
fi
1260
 
])
1261
 
 
1262
 
dnl ------------------------------------------------------------------------
1263
 
dnl Try to find the Qt headers and libraries.
1264
 
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1265
 
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1266
 
dnl ------------------------------------------------------------------------
1267
 
dnl
1268
 
AC_DEFUN([AC_PATH_QT_1_3],
1269
 
[
1270
 
AC_REQUIRE([K_PATH_X])
1271
 
AC_REQUIRE([KDE_USE_QT])
1272
 
AC_REQUIRE([KDE_CHECK_LIB64])
1273
 
 
1274
 
dnl ------------------------------------------------------------------------
1275
 
dnl Add configure flag to enable linking to MT version of Qt library.
1276
 
dnl ------------------------------------------------------------------------
1277
 
 
1278
 
AC_ARG_ENABLE(
1279
 
  mt,
1280
 
  AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1281
 
  kde_use_qt_mt=$enableval,
1282
 
  [
1283
 
    if test $kde_qtver = 3; then
1284
 
      kde_use_qt_mt=yes
1285
 
    else
1286
 
      kde_use_qt_mt=no
1287
 
    fi
1288
 
  ]
1289
 
)
1290
 
 
1291
 
USING_QT_MT=""
1292
 
 
1293
 
dnl ------------------------------------------------------------------------
1294
 
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1295
 
dnl ------------------------------------------------------------------------
1296
 
 
1297
 
KDE_MT_LDFLAGS=
1298
 
KDE_MT_LIBS=
1299
 
if test "x$kde_use_qt_mt" = "xyes"; then
1300
 
  KDE_CHECK_THREADING
1301
 
  if test "x$kde_use_threading" = "xyes"; then
1302
 
    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1303
 
    KDE_MT_LDFLAGS="$USE_THREADS"
1304
 
    KDE_MT_LIBS="$LIBPTHREAD"
1305
 
  else
1306
 
    kde_use_qt_mt=no
1307
 
  fi
1308
 
fi
1309
 
AC_SUBST(KDE_MT_LDFLAGS)
1310
 
AC_SUBST(KDE_MT_LIBS)
1311
 
 
1312
 
kde_qt_was_given=yes
1313
 
 
1314
 
dnl ------------------------------------------------------------------------
1315
 
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1316
 
dnl ------------------------------------------------------------------------
1317
 
if test -z "$LIBQT_GLOB"; then
1318
 
  if test "x$kde_use_qt_emb" = "xyes"; then
1319
 
    LIBQT_GLOB="libqte.*"
1320
 
  else
1321
 
    LIBQT_GLOB="libqt.*"
1322
 
  fi
1323
 
fi
1324
 
 
1325
 
if test -z "$LIBQT"; then
1326
 
dnl ------------------------------------------------------------
1327
 
dnl If we got --enable-embedded then adjust the Qt library name.
1328
 
dnl ------------------------------------------------------------
1329
 
  if test "x$kde_use_qt_emb" = "xyes"; then
1330
 
    qtlib="qte"
1331
 
  else
1332
 
    qtlib="qt"
1333
 
  fi
1334
 
 
1335
 
  kde_int_qt="-l$qtlib"
1336
 
else
1337
 
  kde_int_qt="$LIBQT"
1338
 
  kde_lib_qt_set=yes
1339
 
fi
1340
 
 
1341
 
if test -z "$LIBQPE"; then
1342
 
dnl ------------------------------------------------------------
1343
 
dnl If we got --enable-palmtop then add -lqpe to the link line
1344
 
dnl ------------------------------------------------------------
1345
 
  if test "x$kde_use_qt_emb" = "xyes"; then
1346
 
    if test "x$kde_use_qt_emb_palm" = "xyes"; then
1347
 
      LIB_QPE="-lqpe"
1348
 
    else
1349
 
      LIB_QPE=""
1350
 
    fi
1351
 
  else
1352
 
    LIB_QPE=""
1353
 
  fi
1354
 
fi
1355
 
 
1356
 
dnl ------------------------------------------------------------------------
1357
 
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1358
 
dnl ------------------------------------------------------------------------
1359
 
 
1360
 
if test "x$kde_use_qt_mt" = "xyes"; then
1361
 
  if test -z "$LIBQT"; then
1362
 
    LIBQT="-l$qtlib-mt"
1363
 
    kde_int_qt="-l$qtlib-mt"
1364
 
  else
1365
 
    LIBQT="$qtlib-mt"
1366
 
    kde_int_qt="$qtlib-mt"
1367
 
  fi
1368
 
  LIBQT_GLOB="lib$qtlib-mt.*"
1369
 
  USING_QT_MT="using -mt"
1370
 
else
1371
 
  LIBQT="-l$qtlib"
1372
 
fi
1373
 
 
1374
 
if test $kde_qtver != 1; then
1375
 
 
1376
 
  AC_REQUIRE([AC_FIND_PNG])
1377
 
  AC_REQUIRE([AC_FIND_JPEG])
1378
 
  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1379
 
fi
1380
 
 
1381
 
if test $kde_qtver = 3; then
1382
 
  AC_REQUIRE([KDE_CHECK_LIBDL])
1383
 
  LIBQT="$LIBQT $LIBDL"
1384
 
fi
1385
 
 
1386
 
AC_MSG_CHECKING([for Qt])
1387
 
 
1388
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1389
 
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1390
 
fi
1391
 
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1392
 
qt_libraries=""
1393
 
qt_includes=""
1394
 
AC_ARG_WITH(qt-dir,
1395
 
    AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1396
 
    [  ac_qt_includes="$withval"/include
1397
 
       ac_qt_libraries="$withval"/lib${kdelibsuff}
1398
 
       ac_qt_bindir="$withval"/bin
1399
 
    ])
1400
 
 
1401
 
AC_ARG_WITH(qt-includes,
1402
 
    AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1403
 
    [
1404
 
       ac_qt_includes="$withval"
1405
 
    ])
1406
 
 
1407
 
kde_qt_libs_given=no
1408
 
 
1409
 
AC_ARG_WITH(qt-libraries,
1410
 
    AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1411
 
    [  ac_qt_libraries="$withval"
1412
 
       kde_qt_libs_given=yes
1413
 
    ])
1414
 
 
1415
 
AC_CACHE_VAL(ac_cv_have_qt,
1416
 
[#try to guess Qt locations
1417
 
 
1418
 
qt_incdirs=""
1419
 
for dir in $kde_qt_dirs; do
1420
 
   qt_incdirs="$qt_incdirs $dir/include $dir"
1421
 
done
1422
 
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"
1423
 
if test ! "$ac_qt_includes" = "NO"; then
1424
 
   qt_incdirs="$ac_qt_includes $qt_incdirs"
1425
 
fi
1426
 
 
1427
 
if test "$kde_qtver" != "1"; then
1428
 
  kde_qt_header=qstyle.h
1429
 
else
1430
 
  kde_qt_header=qglobal.h
1431
 
fi
1432
 
 
1433
 
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1434
 
ac_qt_includes="$qt_incdir"
1435
 
 
1436
 
qt_libdirs=""
1437
 
for dir in $kde_qt_dirs; do
1438
 
   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1439
 
done
1440
 
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1441
 
if test ! "$ac_qt_libraries" = "NO"; then
1442
 
  qt_libdir=$ac_qt_libraries
1443
 
else
1444
 
  qt_libdirs="$ac_qt_libraries $qt_libdirs"
1445
 
  # if the Qt was given, the chance is too big that libqt.* doesn't exist
1446
 
  qt_libdir=NONE
1447
 
  for dir in $qt_libdirs; do
1448
 
    try="ls -1 $dir/${LIBQT_GLOB}"
1449
 
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1450
 
  done
1451
 
fi
1452
 
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1453
 
  if test -e "$a"; then
1454
 
    LIBQT="$LIBQT ${kde_int_qt}_incremental"
1455
 
    break
1456
 
  fi
1457
 
done
1458
 
 
1459
 
ac_qt_libraries="$qt_libdir"
1460
 
 
1461
 
AC_LANG_SAVE
1462
 
AC_LANG_CPLUSPLUS
1463
 
 
1464
 
ac_cxxflags_safe="$CXXFLAGS"
1465
 
ac_ldflags_safe="$LDFLAGS"
1466
 
ac_libs_safe="$LIBS"
1467
 
 
1468
 
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1469
 
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1470
 
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1471
 
 
1472
 
KDE_PRINT_QT_PROGRAM
1473
 
 
1474
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1475
 
  rm -f conftest*
1476
 
else
1477
 
  echo "configure: failed program was:" >&AC_FD_CC
1478
 
  cat conftest.$ac_ext >&AC_FD_CC
1479
 
  ac_qt_libraries="NO"
1480
 
fi
1481
 
rm -f conftest*
1482
 
CXXFLAGS="$ac_cxxflags_safe"
1483
 
LDFLAGS="$ac_ldflags_safe"
1484
 
LIBS="$ac_libs_safe"
1485
 
 
1486
 
AC_LANG_RESTORE
1487
 
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1488
 
  ac_cv_have_qt="have_qt=no"
1489
 
  ac_qt_notfound=""
1490
 
  missing_qt_mt=""
1491
 
  if test "$ac_qt_includes" = NO; then
1492
 
    if test "$ac_qt_libraries" = NO; then
1493
 
      ac_qt_notfound="(headers and libraries)";
1494
 
    else
1495
 
      ac_qt_notfound="(headers)";
1496
 
    fi
1497
 
  else
1498
 
    if test "x$kde_use_qt_mt" = "xyes"; then
1499
 
       missing_qt_mt="
1500
 
Make sure that you have compiled Qt with thread support!"
1501
 
       ac_qt_notfound="(library $qtlib-mt)";
1502
 
    else
1503
 
       ac_qt_notfound="(library $qtlib)";
1504
 
    fi
1505
 
  fi
1506
 
 
1507
 
  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1508
 
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1509
 
else
1510
 
  have_qt="yes"
1511
 
fi
1512
 
])
1513
 
 
1514
 
eval "$ac_cv_have_qt"
1515
 
 
1516
 
if test "$have_qt" != yes; then
1517
 
  AC_MSG_RESULT([$have_qt]);
1518
 
else
1519
 
  ac_cv_have_qt="have_qt=yes \
1520
 
    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1521
 
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1522
 
 
1523
 
  qt_libraries="$ac_qt_libraries"
1524
 
  qt_includes="$ac_qt_includes"
1525
 
fi
1526
 
 
1527
 
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1528
 
     KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1529
 
fi
1530
 
 
1531
 
AC_SUBST(qt_libraries)
1532
 
AC_SUBST(qt_includes)
1533
 
 
1534
 
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1535
 
 QT_INCLUDES=""
1536
 
else
1537
 
 QT_INCLUDES="-I$qt_includes"
1538
 
 all_includes="$QT_INCLUDES $all_includes"
1539
 
fi
1540
 
 
1541
 
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1542
 
 QT_LDFLAGS=""
1543
 
else
1544
 
 QT_LDFLAGS="-L$qt_libraries"
1545
 
 all_libraries="$all_libraries $QT_LDFLAGS"
1546
 
fi
1547
 
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1548
 
 
1549
 
AC_SUBST(QT_INCLUDES)
1550
 
AC_SUBST(QT_LDFLAGS)
1551
 
AC_PATH_QT_MOC_UIC
1552
 
 
1553
 
KDE_CHECK_QT_JPEG
1554
 
 
1555
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1556
 
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1557
 
else
1558
 
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1559
 
fi
1560
 
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1561
 
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1562
 
  if test -e "$a"; then
1563
 
     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1564
 
     break
1565
 
  fi
1566
 
done
1567
 
 
1568
 
AC_SUBST(LIB_QT)
1569
 
AC_SUBST(LIB_QPE)
1570
 
 
1571
 
AC_SUBST(kde_qtver)
1572
 
])
1573
 
 
1574
 
AC_DEFUN([AC_PATH_QT],
1575
 
[
1576
 
AC_PATH_QT_1_3
1577
 
])
1578
 
 
1579
 
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1580
 
[
1581
 
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1582
 
 
1583
 
if test x$ac_uic_supports_libpath = xyes; then
1584
 
 
1585
 
AC_MSG_CHECKING([if UIC has KDE plugins available])
1586
 
AC_CACHE_VAL(kde_cv_uic_plugins,
1587
 
[
1588
 
cat > actest.ui << EOF
1589
 
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1590
 
<class>NewConnectionDialog</class>
1591
 
<widget class="QDialog">
1592
 
   <widget class="KLineEdit">
1593
 
        <property name="name">
1594
 
           <cstring>testInput</cstring>
1595
 
        </property>
1596
 
   </widget>
1597
 
</widget>
1598
 
</UI>
1599
 
EOF
1600
 
       
1601
 
 
1602
 
 
1603
 
kde_cv_uic_plugins=no
1604
 
kde_line="$UIC_PATH -L $kde_widgetdir"
1605
 
if test x$ac_uic_supports_nounload = xyes; then
1606
 
   kde_line="$kde_line -nounload"
1607
 
fi
1608
 
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1609
 
if AC_TRY_EVAL(kde_line); then
1610
 
        # if you're trying to debug this check and think it's incorrect,
1611
 
        # better check your installation. The check _is_ correct - your
1612
 
        # installation is not.
1613
 
        if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1614
 
                kde_cv_uic_plugins=yes
1615
 
        fi
1616
 
fi
1617
 
rm -f actest.ui actest.cpp
1618
 
])
1619
 
 
1620
 
AC_MSG_RESULT([$kde_cv_uic_plugins])
1621
 
if test "$kde_cv_uic_plugins" != yes; then
1622
 
        AC_MSG_ERROR([you need to install kdelibs first.])
1623
 
fi
1624
 
fi
1625
 
])
1626
 
 
1627
 
AC_DEFUN([KDE_CHECK_FINAL],
1628
 
[
1629
 
  AC_ARG_ENABLE(final,
1630
 
        AC_HELP_STRING([--enable-final],
1631
 
                       [build size optimized apps (experimental - needs lots of memory)]),
1632
 
        kde_use_final=$enableval, kde_use_final=no)
1633
 
 
1634
 
  if test "x$kde_use_final" = "xyes"; then
1635
 
      KDE_USE_FINAL_TRUE=""
1636
 
      KDE_USE_FINAL_FALSE="#"
1637
 
   else
1638
 
      KDE_USE_FINAL_TRUE="#"
1639
 
      KDE_USE_FINAL_FALSE=""
1640
 
  fi
1641
 
  AC_SUBST(KDE_USE_FINAL_TRUE)
1642
 
  AC_SUBST(KDE_USE_FINAL_FALSE)
1643
 
])
1644
 
 
1645
 
AC_DEFUN([KDE_CHECK_CLOSURE],
1646
 
[
1647
 
  AC_ARG_ENABLE(closure,
1648
 
                AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1649
 
        kde_use_closure=$enableval, kde_use_closure=no)
1650
 
 
1651
 
  KDE_NO_UNDEFINED=""
1652
 
  if test "x$kde_use_closure" = "xyes"; then
1653
 
       KDE_USE_CLOSURE_TRUE=""
1654
 
       KDE_USE_CLOSURE_FALSE="#"
1655
 
#       CXXFLAGS="$CXXFLAGS $REPO"
1656
 
  else
1657
 
       KDE_USE_CLOSURE_TRUE="#"
1658
 
       KDE_USE_CLOSURE_FALSE=""
1659
 
       KDE_NO_UNDEFINED=""
1660
 
       case $host in 
1661
 
         *-*-linux-gnu)
1662
 
           KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1663
 
                [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1664
 
                [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1665
 
                [KDE_NO_UNDEFINED=""])],
1666
 
            [KDE_NO_UNDEFINED=""])
1667
 
           ;;
1668
 
       esac
1669
 
  fi
1670
 
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
1671
 
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
1672
 
  AC_SUBST(KDE_NO_UNDEFINED)
1673
 
])
1674
 
 
1675
 
AC_DEFUN([KDE_CHECK_NMCHECK],
1676
 
[
1677
 
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1678
 
        kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1679
 
 
1680
 
  if test "$kde_use_nmcheck" = "yes"; then
1681
 
      KDE_USE_NMCHECK_TRUE=""
1682
 
      KDE_USE_NMCHECK_FALSE="#"
1683
 
   else
1684
 
      KDE_USE_NMCHECK_TRUE="#"
1685
 
      KDE_USE_NMCHECK_FALSE=""
1686
 
  fi
1687
 
  AC_SUBST(KDE_USE_NMCHECK_TRUE)
1688
 
  AC_SUBST(KDE_USE_NMCHECK_FALSE)
1689
 
])
1690
 
 
1691
 
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1692
 
savex=$exec_prefix
1693
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1694
 
tmp=$$2
1695
 
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1696
 
exec_prefix=$savex
1697
 
])
1698
 
 
1699
 
dnl ------------------------------------------------------------------------
1700
 
dnl Now, the same with KDE
1701
 
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1702
 
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1703
 
dnl ------------------------------------------------------------------------
1704
 
dnl
1705
 
AC_DEFUN([AC_BASE_PATH_KDE],
1706
 
[
1707
 
AC_REQUIRE([KDE_CHECK_STL])
1708
 
AC_REQUIRE([AC_PATH_QT])dnl
1709
 
AC_REQUIRE([KDE_CHECK_LIB64])
1710
 
 
1711
 
AC_CHECK_RPATH
1712
 
AC_MSG_CHECKING([for KDE])
1713
 
 
1714
 
if test "${prefix}" != NONE; then
1715
 
  kde_includes=${includedir}
1716
 
  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1717
 
 
1718
 
  kde_libraries=${libdir}
1719
 
  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1720
 
 
1721
 
else
1722
 
  ac_kde_includes=
1723
 
  ac_kde_libraries=
1724
 
  kde_libraries=""
1725
 
  kde_includes=""
1726
 
fi
1727
 
 
1728
 
AC_CACHE_VAL(ac_cv_have_kde,
1729
 
[#try to guess kde locations
1730
 
 
1731
 
if test "$kde_qtver" = 1; then
1732
 
  kde_check_header="ksock.h"
1733
 
  kde_check_lib="libkdecore.la"
1734
 
else
1735
 
  kde_check_header="ksharedptr.h"
1736
 
  kde_check_lib="libkio.la"
1737
 
fi
1738
 
 
1739
 
if test -z "$1"; then
1740
 
 
1741
 
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1742
 
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1743
 
kde_incdirs="$ac_kde_includes $kde_incdirs"
1744
 
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1745
 
ac_kde_includes="$kde_incdir"
1746
 
 
1747
 
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1748
 
  AC_MSG_ERROR([
1749
 
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1750
 
So, check this please and use another prefix!])
1751
 
fi
1752
 
 
1753
 
kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1754
 
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1755
 
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1756
 
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1757
 
ac_kde_libraries="$kde_libdir"
1758
 
 
1759
 
kde_widgetdir=NO
1760
 
dnl this might be somewhere else
1761
 
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1762
 
 
1763
 
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1764
 
AC_MSG_ERROR([
1765
 
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1766
 
So, check this please and use another prefix!])
1767
 
fi
1768
 
 
1769
 
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1770
 
AC_MSG_ERROR([
1771
 
I can't find the designer plugins. These are required and should have been installed
1772
 
by kdelibs])
1773
 
fi
1774
 
 
1775
 
if test -n "$kde_widgetdir"; then
1776
 
    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1777
 
fi
1778
 
 
1779
 
 
1780
 
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1781
 
  ac_cv_have_kde="have_kde=no"
1782
 
else
1783
 
  ac_cv_have_kde="have_kde=yes \
1784
 
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1785
 
fi
1786
 
 
1787
 
else dnl test -z $1
1788
 
 
1789
 
  ac_cv_have_kde="have_kde=no"
1790
 
 
1791
 
fi
1792
 
])dnl
1793
 
 
1794
 
eval "$ac_cv_have_kde"
1795
 
 
1796
 
if test "$have_kde" != "yes"; then
1797
 
 if test "${prefix}" = NONE; then
1798
 
  ac_kde_prefix="$ac_default_prefix"
1799
 
 else
1800
 
  ac_kde_prefix="$prefix"
1801
 
 fi
1802
 
 if test "$exec_prefix" = NONE; then
1803
 
  ac_kde_exec_prefix="$ac_kde_prefix"
1804
 
  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1805
 
 else
1806
 
  ac_kde_exec_prefix="$exec_prefix"
1807
 
  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1808
 
 fi
1809
 
 
1810
 
 kde_libraries="${libdir}"
1811
 
 kde_includes="${includedir}"
1812
 
 
1813
 
else
1814
 
  ac_cv_have_kde="have_kde=yes \
1815
 
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1816
 
  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1817
 
 
1818
 
  kde_libraries="$ac_kde_libraries"
1819
 
  kde_includes="$ac_kde_includes"
1820
 
fi
1821
 
AC_SUBST(kde_libraries)
1822
 
AC_SUBST(kde_includes)
1823
 
 
1824
 
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
1825
 
 KDE_INCLUDES=""
1826
 
else
1827
 
 KDE_INCLUDES="-I$kde_includes"
1828
 
 all_includes="$KDE_INCLUDES $all_includes"
1829
 
fi
1830
 
 
1831
 
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1832
 
 
1833
 
KDE_LDFLAGS="-L$kde_libraries"
1834
 
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
1835
 
 all_libraries="$all_libraries $KDE_LDFLAGS"
1836
 
fi
1837
 
 
1838
 
AC_SUBST(KDE_LDFLAGS)
1839
 
AC_SUBST(KDE_INCLUDES)
1840
 
 
1841
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1842
 
 
1843
 
all_libraries="$all_libraries $USER_LDFLAGS"
1844
 
all_includes="$all_includes $USER_INCLUDES"
1845
 
AC_SUBST(all_includes)
1846
 
AC_SUBST(all_libraries)
1847
 
 
1848
 
if test -z "$1"; then
1849
 
KDE_CHECK_UIC_PLUGINS
1850
 
fi
1851
 
 
1852
 
ac_kde_libraries="$kde_libdir"
1853
 
 
1854
 
AC_SUBST(AUTODIRS)
1855
 
 
1856
 
 
1857
 
])
1858
 
 
1859
 
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1860
 
[
1861
 
AC_MSG_CHECKING(for extra includes)
1862
 
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1863
 
  kde_use_extra_includes="$withval",
1864
 
  kde_use_extra_includes=NONE
1865
 
)
1866
 
kde_extra_includes=
1867
 
if test -n "$kde_use_extra_includes" && \
1868
 
   test "$kde_use_extra_includes" != "NONE"; then
1869
 
 
1870
 
   ac_save_ifs=$IFS
1871
 
   IFS=':'
1872
 
   for dir in $kde_use_extra_includes; do
1873
 
     kde_extra_includes="$kde_extra_includes $dir"
1874
 
     USER_INCLUDES="$USER_INCLUDES -I$dir"
1875
 
   done
1876
 
   IFS=$ac_save_ifs
1877
 
   kde_use_extra_includes="added"
1878
 
else
1879
 
   kde_use_extra_includes="no"
1880
 
fi
1881
 
AC_SUBST(USER_INCLUDES)
1882
 
 
1883
 
AC_MSG_RESULT($kde_use_extra_includes)
1884
 
 
1885
 
kde_extra_libs=
1886
 
AC_MSG_CHECKING(for extra libs)
1887
 
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1888
 
  kde_use_extra_libs=$withval,
1889
 
  kde_use_extra_libs=NONE
1890
 
)
1891
 
if test -n "$kde_use_extra_libs" && \
1892
 
   test "$kde_use_extra_libs" != "NONE"; then
1893
 
 
1894
 
   ac_save_ifs=$IFS
1895
 
   IFS=':'
1896
 
   for dir in $kde_use_extra_libs; do
1897
 
     kde_extra_libs="$kde_extra_libs $dir"
1898
 
     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1899
 
     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1900
 
   done
1901
 
   IFS=$ac_save_ifs
1902
 
   kde_use_extra_libs="added"
1903
 
else
1904
 
   kde_use_extra_libs="no"
1905
 
fi
1906
 
 
1907
 
AC_SUBST(USER_LDFLAGS)
1908
 
 
1909
 
AC_MSG_RESULT($kde_use_extra_libs)
1910
 
 
1911
 
])
1912
 
 
1913
 
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1914
 
[
1915
 
    AC_MSG_CHECKING([for KDE headers installed])
1916
 
    AC_LANG_SAVE
1917
 
    AC_LANG_CPLUSPLUS
1918
 
cat > conftest.$ac_ext <<EOF
1919
 
#ifdef STDC_HEADERS
1920
 
# include <stdlib.h>
1921
 
#endif
1922
 
#include <stdio.h>
1923
 
#include "confdefs.h"
1924
 
#include <kapp.h>
1925
 
 
1926
 
int main() {
1927
 
    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1928
 
    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1929
 
    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1930
 
    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1931
 
    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1932
 
    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1933
 
    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1934
 
    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1935
 
    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1936
 
    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1937
 
    printf("kde_wallpaperdir=\\"%s\\"\n",
1938
 
        KApplication::kde_wallpaperdir().data());
1939
 
    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1940
 
    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1941
 
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1942
 
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1943
 
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1944
 
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
1945
 
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1946
 
    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
1947
 
    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
1948
 
    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
1949
 
    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
1950
 
    return 0;
1951
 
    }
1952
 
EOF
1953
 
 
1954
 
 ac_save_CPPFLAGS=$CPPFLAGS
1955
 
 CPPFLAGS="$all_includes $CPPFLAGS"
1956
 
 if AC_TRY_EVAL(ac_compile); then
1957
 
   AC_MSG_RESULT(yes)
1958
 
 else
1959
 
   AC_MSG_ERROR([your system is not able to compile a small KDE application!
1960
 
Check, if you installed the KDE header files correctly.
1961
 
For more details about this problem, look at the end of config.log.])
1962
 
  fi
1963
 
  CPPFLAGS=$ac_save_CPPFLAGS
1964
 
 
1965
 
  AC_LANG_RESTORE
1966
 
])
1967
 
 
1968
 
AC_DEFUN([KDE_CHECK_KDEQTADDON],
1969
 
[
1970
 
AC_MSG_CHECKING(for kde-qt-addon)
1971
 
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1972
 
[
1973
 
 kde_ldflags_safe="$LDFLAGS"
1974
 
 kde_libs_safe="$LIBS"
1975
 
 kde_cxxflags_safe="$CXXFLAGS"
1976
 
 
1977
 
 LIBS="-lkde-qt-addon $LIBQT $LIBS"
1978
 
 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1979
 
 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1980
 
 
1981
 
 AC_TRY_LINK([
1982
 
   #include <qdom.h>
1983
 
 ],
1984
 
 [
1985
 
   QDomDocument doc;
1986
 
 ],
1987
 
  kde_cv_have_kdeqtaddon=yes,
1988
 
  kde_cv_have_kdeqtaddon=no
1989
 
 )
1990
 
 
1991
 
 LDFLAGS=$kde_ldflags_safe
1992
 
 LIBS=$kde_libs_safe
1993
 
 CXXFLAGS=$kde_cxxflags_safe
1994
 
])
1995
 
 
1996
 
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1997
 
 
1998
 
if test "$kde_cv_have_kdeqtaddon" = "no"; then
1999
 
  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2000
 
It is a separate package (and CVS module) named kde-qt-addon.])
2001
 
fi
2002
 
])
2003
 
 
2004
 
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2005
 
[
2006
 
   AC_REQUIRE([KDE_MISC_TESTS])
2007
 
   AC_REQUIRE([KDE_CHECK_LIBDL])
2008
 
   AC_REQUIRE([K_PATH_X])
2009
 
 
2010
 
if test $kde_qtver = 3; then
2011
 
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2012
 
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2013
 
   AC_SUBST(LIB_KIO, "-lkio")
2014
 
   AC_SUBST(LIB_SMB, "-lsmb")
2015
 
   AC_SUBST(LIB_KAB, "-lkab")
2016
 
   AC_SUBST(LIB_KABC, "-lkabc")
2017
 
   AC_SUBST(LIB_KHTML, "-lkhtml")
2018
 
   AC_SUBST(LIB_KSPELL, "-lkspell")
2019
 
   AC_SUBST(LIB_KPARTS, "-lkparts")
2020
 
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2021
 
   AC_SUBST(LIB_KUTILS, "-lkutils")
2022
 
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
2023
 
# these are for backward compatibility
2024
 
   AC_SUBST(LIB_KSYCOCA, "-lkio")
2025
 
   AC_SUBST(LIB_KFILE, "-lkio")
2026
 
elif test $kde_qtver = 2; then
2027
 
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2028
 
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2029
 
   AC_SUBST(LIB_KIO, "-lkio")
2030
 
   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2031
 
   AC_SUBST(LIB_SMB, "-lsmb")
2032
 
   AC_SUBST(LIB_KFILE, "-lkfile")
2033
 
   AC_SUBST(LIB_KAB, "-lkab")
2034
 
   AC_SUBST(LIB_KHTML, "-lkhtml")
2035
 
   AC_SUBST(LIB_KSPELL, "-lkspell")
2036
 
   AC_SUBST(LIB_KPARTS, "-lkparts")
2037
 
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2038
 
else
2039
 
   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2040
 
   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2041
 
   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2042
 
   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2043
 
   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2044
 
fi
2045
 
])
2046
 
 
2047
 
AC_DEFUN([AC_PATH_KDE],
2048
 
[
2049
 
  AC_BASE_PATH_KDE
2050
 
  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2051
 
  [
2052
 
  if test "$enableval" = "no";
2053
 
    then ac_use_path_checking="default"
2054
 
    else ac_use_path_checking=""
2055
 
  fi
2056
 
  ],
2057
 
  [
2058
 
  if test "$kde_qtver" = 1;
2059
 
    then ac_use_path_checking=""
2060
 
    else ac_use_path_checking="default"
2061
 
  fi
2062
 
  ]
2063
 
  )
2064
 
 
2065
 
  AC_CREATE_KFSSTND($ac_use_path_checking)
2066
 
 
2067
 
  AC_SUBST_KFSSTND
2068
 
  KDE_CREATE_LIBS_ALIASES
2069
 
])
2070
 
 
2071
 
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2072
 
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2073
 
[
2074
 
AC_MSG_CHECKING(for $1)
2075
 
AC_CACHE_VAL(kde_cv_func_$1,
2076
 
[
2077
 
AC_LANG_SAVE
2078
 
AC_LANG_CPLUSPLUS
2079
 
save_CXXFLAGS="$CXXFLAGS"
2080
 
kde_safe_LIBS="$LIBS"
2081
 
LIBS="$LIBS $X_EXTRA_LIBS"
2082
 
if test "$GXX" = "yes"; then
2083
 
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2084
 
fi
2085
 
AC_TRY_COMPILE([
2086
 
$2
2087
 
],
2088
 
[
2089
 
$3
2090
 
],
2091
 
kde_cv_func_$1=yes,
2092
 
kde_cv_func_$1=no)
2093
 
CXXFLAGS="$save_CXXFLAGS"
2094
 
LIBS="$kde_safe_LIBS"
2095
 
AC_LANG_RESTORE
2096
 
])
2097
 
 
2098
 
AC_MSG_RESULT($kde_cv_func_$1)
2099
 
 
2100
 
AC_MSG_CHECKING([if $1 needs custom prototype])
2101
 
AC_CACHE_VAL(kde_cv_proto_$1,
2102
 
[
2103
 
if test "x$kde_cv_func_$1" = xyes; then
2104
 
  kde_cv_proto_$1=no
2105
 
else
2106
 
  case "$1" in
2107
 
        setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2108
 
                kde_cv_proto_$1="yes - in libkdefakes"
2109
 
                ;;
2110
 
        *)
2111
 
                kde_cv_proto_$1=unknown
2112
 
                ;;
2113
 
  esac
2114
 
fi
2115
 
 
2116
 
if test "x$kde_cv_proto_$1" = xunknown; then
2117
 
 
2118
 
AC_LANG_SAVE
2119
 
AC_LANG_CPLUSPLUS
2120
 
  kde_safe_libs=$LIBS
2121
 
  LIBS="$LIBS $X_EXTRA_LIBS"
2122
 
  AC_TRY_LINK([
2123
 
$2
2124
 
 
2125
 
extern "C" $4;
2126
 
],
2127
 
[
2128
 
$3
2129
 
],
2130
 
[ kde_cv_func_$1=yes
2131
 
  kde_cv_proto_$1=yes ],
2132
 
  [kde_cv_proto_$1="$1 unavailable"]
2133
 
)
2134
 
LIBS=$kde_safe_libs
2135
 
AC_LANG_RESTORE
2136
 
fi
2137
 
])
2138
 
AC_MSG_RESULT($kde_cv_proto_$1)
2139
 
 
2140
 
if test "x$kde_cv_func_$1" = xyes; then
2141
 
  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2142
 
  $6
2143
 
fi
2144
 
if test "x$kde_cv_proto_$1" = xno; then
2145
 
  AC_DEFINE(HAVE_$5_PROTO, 1,
2146
 
  [Define if you have the $1 prototype])
2147
 
fi
2148
 
 
2149
 
AH_VERBATIM([_HAVE_$5_PROTO],
2150
 
[
2151
 
#if !defined(HAVE_$5_PROTO)
2152
 
#ifdef __cplusplus
2153
 
extern "C" {
2154
 
#endif
2155
 
$4;
2156
 
#ifdef __cplusplus
2157
 
}
2158
 
#endif
2159
 
#endif
2160
 
])
2161
 
])
2162
 
 
2163
 
AC_DEFUN([AC_CHECK_SETENV],
2164
 
[
2165
 
        KDE_CHECK_FUNC_EXT(setenv, [
2166
 
#include <stdlib.h>
2167
 
], 
2168
 
                [setenv("VAR", "VALUE", 1);],
2169
 
                [int setenv (const char *, const char *, int)],
2170
 
                [SETENV])
2171
 
])
2172
 
 
2173
 
AC_DEFUN([AC_CHECK_UNSETENV],
2174
 
[
2175
 
        KDE_CHECK_FUNC_EXT(unsetenv, [
2176
 
#include <stdlib.h>
2177
 
], 
2178
 
                [unsetenv("VAR");],
2179
 
                [void unsetenv (const char *)],
2180
 
                [UNSETENV])
2181
 
])
2182
 
 
2183
 
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2184
 
[
2185
 
        KDE_CHECK_FUNC_EXT(getdomainname, [
2186
 
#include <stdlib.h>
2187
 
#include <unistd.h>
2188
 
#include <netdb.h>
2189
 
], 
2190
 
                [
2191
 
char buffer[200];
2192
 
getdomainname(buffer, 200);
2193
 
],      
2194
 
                [#include <sys/types.h>
2195
 
                int getdomainname (char *, size_t)],
2196
 
                [GETDOMAINNAME])
2197
 
])
2198
 
 
2199
 
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2200
 
[
2201
 
        KDE_CHECK_FUNC_EXT(gethostname, [
2202
 
#include <stdlib.h>
2203
 
#include <unistd.h>
2204
 
], 
2205
 
                [
2206
 
char buffer[200];
2207
 
gethostname(buffer, 200);
2208
 
],      
2209
 
                [int gethostname (char *, unsigned int)],
2210
 
                [GETHOSTNAME])
2211
 
])
2212
 
 
2213
 
AC_DEFUN([AC_CHECK_USLEEP],
2214
 
[
2215
 
        KDE_CHECK_FUNC_EXT(usleep, [
2216
 
#include <unistd.h>
2217
 
], 
2218
 
                [
2219
 
usleep(200);
2220
 
],      
2221
 
                [int usleep (unsigned int)],
2222
 
                [USLEEP])
2223
 
])
2224
 
 
2225
 
 
2226
 
AC_DEFUN([AC_CHECK_RANDOM],
2227
 
[
2228
 
        KDE_CHECK_FUNC_EXT(random, [
2229
 
#include <stdlib.h>
2230
 
], 
2231
 
                [
2232
 
random();
2233
 
],      
2234
 
                [long int random(void)],
2235
 
                [RANDOM])
2236
 
 
2237
 
        KDE_CHECK_FUNC_EXT(srandom, [
2238
 
#include <stdlib.h>
2239
 
], 
2240
 
                [
2241
 
srandom(27);
2242
 
],      
2243
 
                [void srandom(unsigned int)],
2244
 
                [SRANDOM])
2245
 
 
2246
 
])
2247
 
 
2248
 
AC_DEFUN([AC_CHECK_INITGROUPS],
2249
 
[
2250
 
        KDE_CHECK_FUNC_EXT(initgroups, [
2251
 
#include <sys/types.h>
2252
 
#include <unistd.h>
2253
 
#include <grp.h>
2254
 
],
2255
 
        [
2256
 
char buffer[200];
2257
 
initgroups(buffer, 27);
2258
 
],
2259
 
        [int initgroups(const char *, gid_t)],
2260
 
        [INITGROUPS])
2261
 
])
2262
 
 
2263
 
AC_DEFUN([AC_CHECK_MKSTEMPS],
2264
 
[
2265
 
        KDE_CHECK_FUNC_EXT(mkstemps, [
2266
 
#include <stdlib.h>
2267
 
#include <unistd.h>
2268
 
],
2269
 
        [
2270
 
mkstemps("/tmp/aaaXXXXXX", 6);
2271
 
],
2272
 
        [int mkstemps(char *, int)],
2273
 
        [MKSTEMPS])
2274
 
])
2275
 
 
2276
 
AC_DEFUN([AC_CHECK_MKDTEMP],
2277
 
[
2278
 
        KDE_CHECK_FUNC_EXT(mkdtemp, [
2279
 
#include <stdlib.h>
2280
 
#include <unistd.h>
2281
 
],
2282
 
        [
2283
 
mkdtemp("/tmp/aaaXXXXXX");
2284
 
],
2285
 
        [char *mkdtemp(char *)],
2286
 
        [MKDTEMP])
2287
 
])
2288
 
 
2289
 
 
2290
 
AC_DEFUN([AC_CHECK_RES_INIT],
2291
 
[
2292
 
  AC_MSG_CHECKING([if res_init needs -lresolv])
2293
 
  kde_libs_safe="$LIBS"
2294
 
  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2295
 
  AC_TRY_LINK(
2296
 
    [
2297
 
#include <sys/types.h>
2298
 
#include <netinet/in.h>
2299
 
#include <arpa/nameser.h>
2300
 
#include <resolv.h>
2301
 
    ],
2302
 
    [
2303
 
      res_init(); 
2304
 
    ],
2305
 
    [
2306
 
      LIBRESOLV="-lresolv"
2307
 
      AC_MSG_RESULT(yes)
2308
 
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2309
 
    ],
2310
 
    [ AC_MSG_RESULT(no) ]
2311
 
  )
2312
 
  LIBS=$kde_libs_safe
2313
 
  AC_SUBST(LIBRESOLV)
2314
 
 
2315
 
  AC_MSG_CHECKING([if res_init is available])
2316
 
  AC_TRY_COMPILE(
2317
 
    [
2318
 
#include <sys/types.h>
2319
 
#include <netinet/in.h>
2320
 
#include <arpa/nameser.h>
2321
 
#include <resolv.h>
2322
 
    ],
2323
 
    [
2324
 
      res_init();
2325
 
    ],
2326
 
    [
2327
 
      AC_MSG_RESULT(yes)
2328
 
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2329
 
    ],
2330
 
    [ AC_MSG_RESULT(no) ]
2331
 
  )
2332
 
])
2333
 
 
2334
 
AC_DEFUN([AC_CHECK_STRLCPY],
2335
 
[
2336
 
        KDE_CHECK_FUNC_EXT(strlcpy, [
2337
 
#include <string.h>
2338
 
],
2339
 
[ char buf[20];
2340
 
  strlcpy(buf, "KDE function test", sizeof(buf));
2341
 
],
2342
 
        [unsigned long strlcpy(char*, const char*, unsigned long)],
2343
 
        [STRLCPY])
2344
 
])
2345
 
 
2346
 
AC_DEFUN([AC_CHECK_STRLCAT],
2347
 
[
2348
 
        KDE_CHECK_FUNC_EXT(strlcat, [
2349
 
#include <string.h>
2350
 
],
2351
 
[ char buf[20];
2352
 
  buf[0]='\0';
2353
 
  strlcat(buf, "KDE function test", sizeof(buf));
2354
 
],
2355
 
        [unsigned long strlcat(char*, const char*, unsigned long)],
2356
 
        [STRLCAT])
2357
 
])
2358
 
 
2359
 
AC_DEFUN([AC_FIND_GIF],
2360
 
   [AC_MSG_CHECKING([for giflib])
2361
 
AC_CACHE_VAL(ac_cv_lib_gif,
2362
 
[ac_save_LIBS="$LIBS"
2363
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2364
 
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2365
 
else
2366
 
LIBS="$all_libraries -lgif"
2367
 
fi
2368
 
AC_TRY_LINK(dnl
2369
 
[
2370
 
#ifdef __cplusplus
2371
 
extern "C" {
2372
 
#endif
2373
 
int GifLastError(void);
2374
 
#ifdef __cplusplus
2375
 
}
2376
 
#endif
2377
 
/* We use char because int might match the return type of a gcc2
2378
 
    builtin and then its argument prototype would still apply.  */
2379
 
],
2380
 
            [return GifLastError();],
2381
 
            eval "ac_cv_lib_gif=yes",
2382
 
            eval "ac_cv_lib_gif=no")
2383
 
LIBS="$ac_save_LIBS"
2384
 
])dnl
2385
 
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2386
 
  AC_MSG_RESULT(yes)
2387
 
  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2388
 
else
2389
 
  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2390
 
fi
2391
 
])
2392
 
 
2393
 
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2394
 
[
2395
 
AC_MSG_CHECKING([for libjpeg$2])
2396
 
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2397
 
[
2398
 
ac_save_LIBS="$LIBS"
2399
 
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2400
 
ac_save_CFLAGS="$CFLAGS"
2401
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2402
 
AC_TRY_LINK(
2403
 
[/* Override any gcc2 internal prototype to avoid an error.  */
2404
 
struct jpeg_decompress_struct;
2405
 
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2406
 
typedef int size_t;
2407
 
#ifdef __cplusplus
2408
 
extern "C" {
2409
 
#endif
2410
 
    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2411
 
                                    int version, size_t structsize);
2412
 
#ifdef __cplusplus
2413
 
}
2414
 
#endif
2415
 
/* We use char because int might match the return type of a gcc2
2416
 
    builtin and then its argument prototype would still apply.  */
2417
 
],
2418
 
            [jpeg_CreateDecompress(0L, 0, 0);],
2419
 
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2420
 
            eval "ac_cv_lib_jpeg_$1=no")
2421
 
LIBS="$ac_save_LIBS"
2422
 
CFLAGS="$ac_save_CFLAGS"
2423
 
])
2424
 
 
2425
 
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2426
 
  LIBJPEG="$ac_cv_lib_jpeg_$1"
2427
 
  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2428
 
else
2429
 
  AC_MSG_RESULT(no)
2430
 
  $3
2431
 
fi
2432
 
 
2433
 
])
2434
 
 
2435
 
AC_DEFUN([AC_FIND_JPEG],
2436
 
[
2437
 
dnl first look for libraries
2438
 
KDE_FIND_JPEG_HELPER(6b, 6b,
2439
 
   KDE_FIND_JPEG_HELPER(normal, [],
2440
 
    [
2441
 
       LIBJPEG=
2442
 
    ]
2443
 
   )
2444
 
)
2445
 
 
2446
 
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2447
 
dnl requires system dependent includes loaded before it)
2448
 
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2449
 
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2450
 
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2451
 
 
2452
 
dnl if headers _and_ libraries are missing, this is no error, and we
2453
 
dnl continue with a warning (the user will get no jpeg support in khtml)
2454
 
dnl if only one is missing, it means a configuration error, but we still
2455
 
dnl only warn
2456
 
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2457
 
  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2458
 
else
2459
 
  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2460
 
    AC_MSG_WARN([
2461
 
There is an installation error in jpeg support. You seem to have only one
2462
 
of either the headers _or_ the libraries installed. You may need to either
2463
 
provide correct --with-extra-... options, or the development package of
2464
 
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2465
 
Disabling JPEG support.
2466
 
])
2467
 
  else
2468
 
    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2469
 
  fi
2470
 
  jpeg_incdir=
2471
 
  LIBJPEG=
2472
 
fi
2473
 
 
2474
 
AC_SUBST(LIBJPEG)
2475
 
AH_VERBATIM(_AC_CHECK_JPEG,
2476
 
[/*
2477
 
 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2478
 
 * headers and I'm too lazy to write a configure test as long as only
2479
 
 * unixware is related
2480
 
 */
2481
 
#ifdef _UNIXWARE
2482
 
#define HAVE_BOOLEAN
2483
 
#endif
2484
 
])
2485
 
])
2486
 
 
2487
 
AC_DEFUN([KDE_CHECK_QT_JPEG],
2488
 
[
2489
 
if test -n "$LIBJPEG"; then
2490
 
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2491
 
AC_CACHE_VAL(kde_cv_qt_jpeg,
2492
 
[
2493
 
AC_LANG_SAVE
2494
 
AC_LANG_CPLUSPLUS
2495
 
ac_save_LIBS="$LIBS"
2496
 
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2497
 
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2498
 
ac_save_CXXFLAGS="$CXXFLAGS"
2499
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2500
 
AC_TRY_LINK(
2501
 
[#include <qapplication.h>],
2502
 
            [
2503
 
            int argc;
2504
 
            char** argv;
2505
 
            QApplication app(argc, argv);],
2506
 
            eval "kde_cv_qt_jpeg=no",
2507
 
            eval "kde_cv_qt_jpeg=yes")
2508
 
LIBS="$ac_save_LIBS"
2509
 
CXXFLAGS="$ac_save_CXXFLAGS"
2510
 
AC_LANG_RESTORE
2511
 
fi
2512
 
])
2513
 
 
2514
 
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2515
 
  AC_MSG_RESULT(yes)
2516
 
  LIBJPEG_QT='$(LIBJPEG)'
2517
 
else
2518
 
  AC_MSG_RESULT(no)
2519
 
  LIBJPEG_QT=
2520
 
fi
2521
 
 
2522
 
])
2523
 
 
2524
 
AC_DEFUN([AC_FIND_ZLIB],
2525
 
[
2526
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2527
 
AC_MSG_CHECKING([for libz])
2528
 
AC_CACHE_VAL(ac_cv_lib_z,
2529
 
[
2530
 
kde_save_LIBS="$LIBS"
2531
 
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2532
 
kde_save_CFLAGS="$CFLAGS"
2533
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2534
 
AC_TRY_LINK(dnl
2535
 
[
2536
 
#include<zlib.h>
2537
 
],
2538
 
[
2539
 
  char buf[42];
2540
 
  gzFile f = (gzFile) 0;
2541
 
  /* this would segfault.. but we only link, don't run */
2542
 
  (void) gzgets(f, buf, sizeof(buf));
2543
 
 
2544
 
  return (zlibVersion() == ZLIB_VERSION); 
2545
 
],
2546
 
            eval "ac_cv_lib_z='-lz'",
2547
 
            eval "ac_cv_lib_z=no")
2548
 
LIBS="$kde_save_LIBS"
2549
 
CFLAGS="$kde_save_CFLAGS"
2550
 
])dnl
2551
 
if test ! "$ac_cv_lib_z" = no; then
2552
 
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2553
 
  LIBZ="$ac_cv_lib_z"
2554
 
  AC_MSG_RESULT($ac_cv_lib_z)
2555
 
else
2556
 
  AC_MSG_ERROR(not found. 
2557
 
          Possibly configure picks up an outdated version
2558
 
          installed by XFree86. Remove it from your system.
2559
 
 
2560
 
          Check your installation and look into config.log)
2561
 
  LIBZ=""
2562
 
fi
2563
 
AC_SUBST(LIBZ)
2564
 
])
2565
 
 
2566
 
AC_DEFUN([KDE_TRY_TIFFLIB],
2567
 
[
2568
 
AC_MSG_CHECKING([for libtiff $1])
2569
 
 
2570
 
AC_CACHE_VAL(kde_cv_libtiff_$1,
2571
 
[
2572
 
AC_LANG_SAVE
2573
 
AC_LANG_CPLUSPLUS
2574
 
kde_save_LIBS="$LIBS"
2575
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2576
 
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2577
 
else
2578
 
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2579
 
fi
2580
 
kde_save_CXXFLAGS="$CXXFLAGS"
2581
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2582
 
 
2583
 
AC_TRY_LINK(dnl
2584
 
[
2585
 
#include<tiffio.h>
2586
 
],
2587
 
    [return (TIFFOpen( "", "r") == 0); ],
2588
 
[
2589
 
    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2590
 
], [
2591
 
    kde_cv_libtiff_$1=no
2592
 
])
2593
 
 
2594
 
LIBS="$kde_save_LIBS"
2595
 
CXXFLAGS="$kde_save_CXXFLAGS"
2596
 
AC_LANG_RESTORE
2597
 
])
2598
 
 
2599
 
if test "$kde_cv_libtiff_$1" = "no"; then
2600
 
    AC_MSG_RESULT(no)
2601
 
    LIBTIFF=""
2602
 
    $3
2603
 
else
2604
 
    LIBTIFF="$kde_cv_libtiff_$1"
2605
 
    AC_MSG_RESULT(yes)
2606
 
    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2607
 
    $2
2608
 
fi
2609
 
 
2610
 
])
2611
 
 
2612
 
AC_DEFUN([AC_FIND_TIFF],
2613
 
[
2614
 
AC_REQUIRE([K_PATH_X])
2615
 
AC_REQUIRE([AC_FIND_ZLIB])
2616
 
AC_REQUIRE([AC_FIND_JPEG])
2617
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2618
 
 
2619
 
KDE_TRY_TIFFLIB(tiff, [],
2620
 
   KDE_TRY_TIFFLIB(tiff34))
2621
 
 
2622
 
AC_SUBST(LIBTIFF)
2623
 
])
2624
 
 
2625
 
 
2626
 
AC_DEFUN([AC_FIND_PNG],
2627
 
[
2628
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2629
 
AC_REQUIRE([AC_FIND_ZLIB])
2630
 
AC_MSG_CHECKING([for libpng])
2631
 
AC_CACHE_VAL(ac_cv_lib_png,
2632
 
[
2633
 
kde_save_LIBS="$LIBS"
2634
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2635
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2636
 
else
2637
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2638
 
fi
2639
 
kde_save_CFLAGS="$CFLAGS"
2640
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2641
 
 
2642
 
AC_TRY_LINK(dnl
2643
 
    [
2644
 
    #include<png.h>
2645
 
    ],
2646
 
    [
2647
 
    png_structp png_ptr = png_create_read_struct(  /* image ptr */
2648
 
                PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2649
 
    return( png_ptr != 0 );
2650
 
    ],
2651
 
    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2652
 
    eval "ac_cv_lib_png=no"
2653
 
)
2654
 
LIBS="$kde_save_LIBS"
2655
 
CFLAGS="$kde_save_CFLAGS"
2656
 
])dnl
2657
 
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2658
 
  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2659
 
  LIBPNG="$ac_cv_lib_png"
2660
 
  AC_SUBST(LIBPNG)
2661
 
  AC_MSG_RESULT($ac_cv_lib_png)
2662
 
else
2663
 
  AC_MSG_RESULT(no)
2664
 
  LIBPNG=""
2665
 
  AC_SUBST(LIBPNG)
2666
 
fi
2667
 
])
2668
 
 
2669
 
 
2670
 
AC_DEFUN([AC_FIND_JASPER],
2671
 
[
2672
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2673
 
AC_REQUIRE([AC_FIND_JPEG])
2674
 
AC_MSG_CHECKING([for jasper])
2675
 
AC_CACHE_VAL(ac_cv_jasper,
2676
 
[
2677
 
kde_save_LIBS="$LIBS"
2678
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2679
 
kde_save_CFLAGS="$CFLAGS"
2680
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2681
 
 
2682
 
AC_TRY_LINK(dnl
2683
 
    [
2684
 
    #include<jasper/jasper.h>
2685
 
    ],
2686
 
    [
2687
 
    return( jas_init() );
2688
 
    ],
2689
 
    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2690
 
    eval "ac_cv_jasper=no"
2691
 
)
2692
 
LIBS="$kde_save_LIBS"
2693
 
CFLAGS="$kde_save_CFLAGS"
2694
 
])dnl
2695
 
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2696
 
  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2697
 
  LIB_JASPER="$ac_cv_jasper"
2698
 
  AC_MSG_RESULT($ac_cv_jasper)
2699
 
else
2700
 
  AC_MSG_RESULT(no)
2701
 
  LIB_JASPER=""
2702
 
fi
2703
 
AC_SUBST(LIB_JASPER)
2704
 
])
2705
 
 
2706
 
AC_DEFUN([AC_CHECK_BOOL],
2707
 
[
2708
 
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2709
 
])
2710
 
 
2711
 
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2712
 
[
2713
 
AC_MSG_CHECKING(if you need GNU extensions)
2714
 
AC_CACHE_VAL(ac_cv_gnu_extensions,
2715
 
[
2716
 
cat > conftest.c << EOF
2717
 
#include <features.h>
2718
 
 
2719
 
#ifdef __GNU_LIBRARY__
2720
 
yes
2721
 
#endif
2722
 
EOF
2723
 
 
2724
 
if (eval "$ac_cpp conftest.c") 2>&5 |
2725
 
  egrep "yes" >/dev/null 2>&1; then
2726
 
  rm -rf conftest*
2727
 
  ac_cv_gnu_extensions=yes
2728
 
else
2729
 
  ac_cv_gnu_extensions=no
2730
 
fi
2731
 
])
2732
 
 
2733
 
AC_MSG_RESULT($ac_cv_gnu_extensions)
2734
 
if test "$ac_cv_gnu_extensions" = "yes"; then
2735
 
  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2736
 
fi
2737
 
])
2738
 
 
2739
 
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2740
 
[
2741
 
AC_MSG_CHECKING([whether $CXX supports -$1])
2742
 
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2743
 
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2744
 
[
2745
 
  AC_LANG_SAVE
2746
 
  AC_LANG_CPLUSPLUS
2747
 
  save_CXXFLAGS="$CXXFLAGS"
2748
 
  CXXFLAGS="$CXXFLAGS -$1"
2749
 
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2750
 
  CXXFLAGS="$save_CXXFLAGS"
2751
 
  AC_LANG_RESTORE
2752
 
])
2753
 
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2754
 
 AC_MSG_RESULT(yes)
2755
 
 :
2756
 
 $2
2757
 
else
2758
 
 AC_MSG_RESULT(no)
2759
 
 :
2760
 
 $3
2761
 
fi
2762
 
])
2763
 
 
2764
 
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2765
 
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2766
 
dnl it's all white-space separated
2767
 
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2768
 
[ __val=$$1
2769
 
  __forbid=" $2 "
2770
 
  if test -n "$__val"; then
2771
 
    __new=""
2772
 
    ac_save_IFS=$IFS
2773
 
    IFS="       "
2774
 
    for i in $__val; do
2775
 
      case "$__forbid" in
2776
 
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2777
 
        *) # Careful to not add spaces, where there were none, because otherwise
2778
 
           # libtool gets confused, if we change e.g. CXX
2779
 
           if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2780
 
      esac
2781
 
    done
2782
 
    IFS=$ac_save_IFS
2783
 
    $1=$__new
2784
 
  fi
2785
 
])
2786
 
 
2787
 
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2788
 
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2789
 
[dnl
2790
 
if test "x$kde_use_qt_emb" != "xyes"; then
2791
 
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2792
 
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2793
 
else
2794
 
 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2795
 
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2796
 
fi
2797
 
])
2798
 
 
2799
 
AC_DEFUN([AC_CHECK_COMPILERS],
2800
 
[
2801
 
  AC_ARG_ENABLE(debug,
2802
 
                AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
2803
 
  [
2804
 
    case $enableval in
2805
 
      yes)
2806
 
        kde_use_debug_code="yes"
2807
 
        kde_use_debug_define=no
2808
 
        ;;
2809
 
      full)
2810
 
        kde_use_debug_code="full"
2811
 
        kde_use_debug_define=no
2812
 
        ;;
2813
 
      *)
2814
 
        kde_use_debug_code="no"
2815
 
        kde_use_debug_define=yes
2816
 
        ;;
2817
 
    esac
2818
 
  ], 
2819
 
    [kde_use_debug_code="no"
2820
 
      kde_use_debug_define=no
2821
 
  ])
2822
 
 
2823
 
  dnl Just for configure --help
2824
 
  AC_ARG_ENABLE(dummyoption,
2825
 
                AC_HELP_STRING([--disable-debug],
2826
 
                               [disables debug output and debug symbols [default=no]]),
2827
 
                [],[])
2828
 
 
2829
 
  AC_ARG_ENABLE(strict,
2830
 
                AC_HELP_STRING([--enable-strict],
2831
 
                              [compiles with strict compiler options (may not work!)]),
2832
 
   [
2833
 
    if test $enableval = "no"; then
2834
 
         kde_use_strict_options="no"
2835
 
       else
2836
 
         kde_use_strict_options="yes"
2837
 
    fi
2838
 
   ], [kde_use_strict_options="no"])
2839
 
 
2840
 
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similiar]),
2841
 
   [
2842
 
    if test $enableval = "no"; then
2843
 
         kde_use_warnings="no"
2844
 
       else
2845
 
         kde_use_warnings="yes"
2846
 
    fi
2847
 
   ], [kde_use_warnings="yes"])
2848
 
 
2849
 
  dnl enable warnings for debug build
2850
 
  if test "$kde_use_debug_code" != "no"; then
2851
 
    kde_use_warnings=yes
2852
 
  fi
2853
 
 
2854
 
  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
2855
 
    [kde_use_profiling=$enableval],
2856
 
    [kde_use_profiling="no"]
2857
 
  )
2858
 
 
2859
 
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2860
 
  CFLAGS=" $CFLAGS"
2861
 
 
2862
 
  AC_PROG_CC 
2863
 
 
2864
 
  AC_PROG_CPP
2865
 
 
2866
 
  if test "$GCC" = "yes"; then
2867
 
    if test "$kde_use_debug_code" != "no"; then
2868
 
      if test $kde_use_debug_code = "full"; then
2869
 
        CFLAGS="-g3 -fno-inline $CFLAGS"
2870
 
      else
2871
 
        CFLAGS="-g -O2 $CFLAGS"
2872
 
      fi
2873
 
    else
2874
 
      CFLAGS="-O2 $CFLAGS"
2875
 
    fi
2876
 
  fi
2877
 
 
2878
 
  if test "$kde_use_debug_define" = "yes"; then
2879
 
    CFLAGS="-DNDEBUG $CFLAGS"
2880
 
  fi
2881
 
 
2882
 
 
2883
 
  case "$host" in
2884
 
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2885
 
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2886
 
  esac
2887
 
 
2888
 
  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2889
 
     LDFLAGS=""
2890
 
  fi
2891
 
 
2892
 
  CXXFLAGS=" $CXXFLAGS"
2893
 
 
2894
 
  AC_PROG_CXX
2895
 
 
2896
 
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2897
 
    if test "$kde_use_debug_code" != "no"; then
2898
 
      if test "$CXX" = "KCC"; then
2899
 
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2900
 
      else
2901
 
        if test "$kde_use_debug_code" = "full"; then
2902
 
          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
2903
 
        else
2904
 
          CXXFLAGS="-g -O2 $CXXFLAGS"
2905
 
        fi
2906
 
      fi
2907
 
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2908
 
 
2909
 
      dnl convenience compiler flags
2910
 
      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2911
 
      AC_SUBST(WOVERLOADED_VIRTUAL)
2912
 
    else
2913
 
      if test "$CXX" = "KCC"; then
2914
 
        CXXFLAGS="+K3 $CXXFLAGS"
2915
 
      else
2916
 
        CXXFLAGS="-O2 $CXXFLAGS"
2917
 
      fi  
2918
 
    fi
2919
 
  fi
2920
 
 
2921
 
  if test "$kde_use_debug_define" = "yes"; then
2922
 
    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2923
 
  fi  
2924
 
 
2925
 
  if test "$kde_use_profiling" = "yes"; then
2926
 
    KDE_CHECK_COMPILER_FLAG(pg,
2927
 
    [
2928
 
      CFLAGS="-pg $CFLAGS"
2929
 
      CXXFLAGS="-pg $CXXFLAGS"
2930
 
    ])
2931
 
  fi
2932
 
 
2933
 
  if test "$kde_use_warnings" = "yes"; then
2934
 
      if test "$GCC" = "yes"; then
2935
 
        case $host in
2936
 
          *-*-linux-gnu)        
2937
 
            CFLAGS="-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2938
 
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
2939
 
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
2940
 
          ;;
2941
 
        esac
2942
 
        CXXFLAGS="-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2943
 
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2944
 
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2945
 
        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2946
 
     fi
2947
 
  fi
2948
 
 
2949
 
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
2950
 
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2951
 
  fi
2952
 
    
2953
 
  if test "$GXX" = "yes"; then
2954
 
dnl    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2955
 
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2956
 
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
2957
 
dnl    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=    )
2958
 
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
2959
 
  fi
2960
 
  if test "$CXX" = "KCC"; then
2961
 
    dnl unfortunately we currently cannot disable exception support in KCC
2962
 
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2963
 
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2964
 
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
2965
 
 
2966
 
    AC_ARG_ENABLE(pch,
2967
 
        AC_HELP_STRING([--enable-pch],
2968
 
                       [enables precompiled header support (currently only KCC) [default=no]]),
2969
 
    [
2970
 
      kde_use_pch=$enableval
2971
 
    ],[kde_use_pch=no])
2972
 
 
2973
 
    HAVE_GCC_VISIBILITY=0
2974
 
    AC_SUBST([HAVE_GCC_VISIBILITY])
2975
 
 
2976
 
    if test "$kde_use_pch" = "yes"; then
2977
 
      dnl TODO: support --pch-dir!
2978
 
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2979
 
      dnl the below works (but the dir must exist), but it's
2980
 
      dnl useless for a whole package.
2981
 
      dnl The are precompiled headers for each source file, so when compiling
2982
 
      dnl from scratch, it doesn't make a difference, and they take up
2983
 
      dnl around ~5Mb _per_ sourcefile.
2984
 
      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
2985
 
      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
2986
 
    fi
2987
 
    dnl this flag controls inlining. by default KCC inlines in optimisation mode
2988
 
    dnl all implementations that are defined inside the class {} declaration. 
2989
 
    dnl because of templates-compatibility with broken gcc compilers, this
2990
 
    dnl can cause excessive inlining. This flag limits it to a sane level
2991
 
    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
2992
 
    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
2993
 
    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
2994
 
    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
2995
 
    dnl Some source files are shared between multiple executables
2996
 
    dnl (or libraries) and some of those need template instantiations.
2997
 
    dnl In that case KCC needs to compile those sources with
2998
 
    dnl --one_instantiation_per_object.  To make it easy for us we compile
2999
 
    dnl _all_ objects with that flag (--one_per is a shorthand).
3000
 
    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3001
 
  fi
3002
 
  AC_SUBST(USE_EXCEPTIONS)
3003
 
  CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS"
3004
 
  dnl obsolete macro - provided to keep things going
3005
 
  USE_RTTI=
3006
 
  AC_SUBST(USE_RTTI)
3007
 
 
3008
 
  case "$host" in
3009
 
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3010
 
      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3011
 
      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3012
 
      *-*-solaris*) 
3013
 
        if test "$GXX" = yes; then
3014
 
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
3015
 
          if test ! -f $libstdcpp; then
3016
 
             AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
3017
 
          fi
3018
 
        fi
3019
 
        ;;
3020
 
  esac
3021
 
 
3022
 
  AC_VALIDIFY_CXXFLAGS
3023
 
 
3024
 
  AC_PROG_CXXCPP
3025
 
 
3026
 
  if test "$GCC" = yes; then
3027
 
     NOOPT_CFLAGS=-O0
3028
 
  fi
3029
 
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3030
 
 
3031
 
  AC_SUBST(NOOPT_CXXFLAGS)
3032
 
  AC_SUBST(NOOPT_CFLAGS)
3033
 
 
3034
 
  KDE_CHECK_FINAL
3035
 
  KDE_CHECK_CLOSURE
3036
 
  KDE_CHECK_NMCHECK
3037
 
 
3038
 
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3039
 
])
3040
 
 
3041
 
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3042
 
[
3043
 
   [A]M_DEPENDENCIES(CC)
3044
 
   [A]M_DEPENDENCIES(CXX)
3045
 
])
3046
 
 
3047
 
dnl just a wrapper to clean up configure.in
3048
 
AC_DEFUN([KDE_PROG_LIBTOOL],
3049
 
[
3050
 
AC_REQUIRE([AC_CHECK_COMPILERS])
3051
 
AC_REQUIRE([AC_ENABLE_SHARED])
3052
 
AC_REQUIRE([AC_ENABLE_STATIC])
3053
 
 
3054
 
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3055
 
AC_REQUIRE([KDE_CHECK_LIB64])
3056
 
 
3057
 
AC_OBJEXT
3058
 
AC_EXEEXT
3059
 
 
3060
 
AM_PROG_LIBTOOL
3061
 
AC_LIBTOOL_CXX
3062
 
 
3063
 
LIBTOOL_SHELL="/bin/sh ./libtool"
3064
 
#  LIBTOOL="$LIBTOOL --silent"
3065
 
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3066
 
AC_SUBST(KDE_PLUGIN)
3067
 
 
3068
 
# we patch configure quite some so we better keep that consistent for incremental runs 
3069
 
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3070
 
])
3071
 
 
3072
 
AC_DEFUN([KDE_CHECK_LIB64],
3073
 
[
3074
 
    kdelibsuff=no
3075
 
    AC_ARG_ENABLE(libsuffix,
3076
 
        AC_HELP_STRING([--enable-libsuffix],
3077
 
            [/lib directory suffix (64,32,none[=default])]),
3078
 
            kdelibsuff=$enableval)
3079
 
    # TODO: add an auto case that compiles a little C app to check
3080
 
    # where the glibc is
3081
 
    if test "$kdelibsuff" = "no"; then
3082
 
       kdelibsuff=
3083
 
    fi
3084
 
    if test -z "$kdelibsuff"; then
3085
 
        AC_MSG_RESULT([not using lib directory suffix])
3086
 
        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3087
 
    else
3088
 
        if test "$libdir" = '${exec_prefix}/lib'; then
3089
 
            libdir="$libdir${kdelibsuff}"
3090
 
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
3091
 
        fi
3092
 
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
3093
 
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3094
 
    fi
3095
 
])
3096
 
 
3097
 
AC_DEFUN([KDE_CHECK_TYPES],
3098
 
[  AC_CHECK_SIZEOF(int, 4)dnl
3099
 
   AC_CHECK_SIZEOF(short)dnl
3100
 
  AC_CHECK_SIZEOF(long, 4)dnl
3101
 
  AC_CHECK_SIZEOF(char *, 4)dnl
3102
 
])dnl
3103
 
 
3104
 
AC_DEFUN([KDE_DO_IT_ALL],
3105
 
[
3106
 
AC_CANONICAL_SYSTEM
3107
 
AC_ARG_PROGRAM
3108
 
AM_INIT_AUTOMAKE($1, $2)
3109
 
AM_DISABLE_LIBRARIES
3110
 
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3111
 
AC_CHECK_COMPILERS
3112
 
KDE_PROG_LIBTOOL
3113
 
AM_KDE_WITH_NLS
3114
 
AC_PATH_KDE
3115
 
])
3116
 
 
3117
 
AC_DEFUN([AC_CHECK_RPATH],
3118
 
[
3119
 
AC_MSG_CHECKING(for rpath)
3120
 
AC_ARG_ENABLE(rpath,
3121
 
      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3122
 
      USE_RPATH=$enableval, USE_RPATH=yes)
3123
 
 
3124
 
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3125
 
 
3126
 
  KDE_RPATH="-R \$(kde_libraries)"
3127
 
 
3128
 
  if test -n "$qt_libraries"; then
3129
 
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3130
 
  fi
3131
 
  dnl $x_libraries is set to /usr/lib in case
3132
 
  if test -n "$X_LDFLAGS"; then
3133
 
    X_RPATH="-R \$(x_libraries)"
3134
 
    KDE_RPATH="$KDE_RPATH $X_RPATH"
3135
 
  fi
3136
 
  if test -n "$KDE_EXTRA_RPATH"; then
3137
 
    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3138
 
  fi
3139
 
fi
3140
 
AC_SUBST(KDE_EXTRA_RPATH)
3141
 
AC_SUBST(KDE_RPATH)
3142
 
AC_SUBST(X_RPATH)
3143
 
AC_MSG_RESULT($USE_RPATH)
3144
 
])
3145
 
 
3146
 
dnl Check for the type of the third argument of getsockname
3147
 
AC_DEFUN([AC_CHECK_SOCKLEN_T], [
3148
 
  AC_MSG_CHECKING(for socklen_t)
3149
 
  AC_CACHE_VAL(ac_cv_socklen_t, [
3150
 
    AC_LANG_SAVE
3151
 
    AC_LANG_CPLUSPLUS
3152
 
    AC_TRY_COMPILE([
3153
 
#include <sys/types.h>
3154
 
#include <sys/socket.h>
3155
 
      ],[
3156
 
socklen_t a=0;
3157
 
getsockname(0,(struct sockaddr*)0, &a);
3158
 
      ],
3159
 
      ac_cv_socklen_t=socklen_t,
3160
 
      AC_TRY_COMPILE([
3161
 
#include <sys/types.h>
3162
 
#include <sys/socket.h>
3163
 
        ],[
3164
 
int a=0;
3165
 
getsockname(0,(struct sockaddr*)0, &a);
3166
 
        ],
3167
 
        ac_cv_socklen_t=int,
3168
 
        ac_cv_socklen_t=size_t
3169
 
      )
3170
 
    )
3171
 
    AC_LANG_RESTORE
3172
 
  ])
3173
 
 
3174
 
  AC_MSG_RESULT($ac_cv_socklen_t)
3175
 
  if test "$ac_cv_socklen_t" != "socklen_t"; then
3176
 
    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
3177
 
        [Define the real type of socklen_t])
3178
 
  fi
3179
 
  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
3180
 
 
3181
 
])
3182
 
 
3183
 
dnl This is a merge of some macros out of the gettext aclocal.m4
3184
 
dnl since we don't need anything, I took the things we need
3185
 
dnl the copyright for them is:
3186
 
dnl >
3187
 
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3188
 
dnl This Makefile.in is free software; the Free Software Foundation
3189
 
dnl gives unlimited permission to copy and/or distribute it,
3190
 
dnl with or without modifications, as long as this notice is preserved.
3191
 
 
3192
 
dnl This program is distributed in the hope that it will be useful,
3193
 
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3194
 
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3195
 
dnl PARTICULAR PURPOSE.
3196
 
dnl >
3197
 
dnl for this file it is relicensed under LGPL
3198
 
 
3199
 
AC_DEFUN([AM_KDE_WITH_NLS],
3200
 
  [
3201
 
    dnl If we use NLS figure out what method
3202
 
 
3203
 
    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3204
 
        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3205
 
    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3206
 
 
3207
 
     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3208
 
        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3209
 
        GMSGFMT=":"
3210
 
      fi
3211
 
      MSGFMT=$GMSGFMT
3212
 
      AC_SUBST(GMSGFMT)
3213
 
      AC_SUBST(MSGFMT)
3214
 
 
3215
 
      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3216
 
        [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3217
 
 
3218
 
      dnl Test whether we really found GNU xgettext.
3219
 
      if test "$XGETTEXT" != ":"; then
3220
 
        dnl If it is no GNU xgettext we define it as : so that the
3221
 
        dnl Makefiles still can work.
3222
 
        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3223
 
          : ;
3224
 
        else
3225
 
          AC_MSG_RESULT(
3226
 
            [found xgettext programs is not GNU xgettext; ignore it])
3227
 
          XGETTEXT=":"
3228
 
        fi
3229
 
      fi
3230
 
     AC_SUBST(XGETTEXT)
3231
 
 
3232
 
  ])
3233
 
 
3234
 
# Search path for a program which passes the given test.
3235
 
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3236
 
 
3237
 
# serial 1
3238
 
# Stephan Kulow: I appended a _KDE against name conflicts
3239
 
 
3240
 
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3241
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3242
 
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3243
 
[# Extract the first word of "$2", so it can be a program name with args.
3244
 
set dummy $2; ac_word=[$]2
3245
 
AC_MSG_CHECKING([for $ac_word])
3246
 
AC_CACHE_VAL(ac_cv_path_$1,
3247
 
[case "[$]$1" in
3248
 
  /*)
3249
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3250
 
  ;;
3251
 
  *)
3252
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3253
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
3254
 
    test -z "$ac_dir" && ac_dir=.
3255
 
    if test -f $ac_dir/$ac_word; then
3256
 
      if [$3]; then
3257
 
        ac_cv_path_$1="$ac_dir/$ac_word"
3258
 
        break
3259
 
      fi
3260
 
    fi
3261
 
  done
3262
 
  IFS="$ac_save_ifs"
3263
 
dnl If no 4th arg is given, leave the cache variable unset,
3264
 
dnl so AC_PATH_PROGS will keep looking.
3265
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3266
 
])dnl
3267
 
  ;;
3268
 
esac])dnl
3269
 
$1="$ac_cv_path_$1"
3270
 
if test -n "[$]$1"; then
3271
 
  AC_MSG_RESULT([$]$1)
3272
 
else
3273
 
  AC_MSG_RESULT(no)
3274
 
fi
3275
 
AC_SUBST($1)dnl
3276
 
])
3277
 
 
3278
 
 
3279
 
# Check whether LC_MESSAGES is available in <locale.h>.
3280
 
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3281
 
 
3282
 
# serial 1
3283
 
 
3284
 
AC_DEFUN([AM_LC_MESSAGES],
3285
 
  [if test $ac_cv_header_locale_h = yes; then
3286
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3287
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3288
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3289
 
    if test $am_cv_val_LC_MESSAGES = yes; then
3290
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3291
 
    fi
3292
 
  fi])
3293
 
 
3294
 
dnl From Jim Meyering.
3295
 
dnl FIXME: migrate into libit.
3296
 
 
3297
 
AC_DEFUN([AM_FUNC_OBSTACK],
3298
 
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3299
 
 [AC_TRY_LINK([#include "obstack.h"],
3300
 
              [struct obstack *mem;obstack_free(mem,(char *) 0)],
3301
 
              am_cv_func_obstack=yes,
3302
 
              am_cv_func_obstack=no)])
3303
 
 if test $am_cv_func_obstack = yes; then
3304
 
   AC_DEFINE(HAVE_OBSTACK)
3305
 
 else
3306
 
   LIBOBJS="$LIBOBJS obstack.o"
3307
 
 fi
3308
 
])
3309
 
 
3310
 
dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
3311
 
dnl FIXME: Migrate into libit
3312
 
 
3313
 
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3314
 
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3315
 
 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3316
 
              am_cv_lib_error_at_line=yes,
3317
 
              am_cv_lib_error_at_line=no)])
3318
 
 if test $am_cv_lib_error_at_line = no; then
3319
 
   LIBOBJS="$LIBOBJS error.o"
3320
 
 fi
3321
 
 AC_SUBST(LIBOBJS)dnl
3322
 
])
3323
 
 
3324
 
# Macro to add for using GNU gettext.
3325
 
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3326
 
 
3327
 
# serial 1
3328
 
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3329
 
 
3330
 
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3331
 
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3332
 
   AC_REQUIRE([AC_PROG_RANLIB])dnl
3333
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
3334
 
   AC_REQUIRE([AC_TYPE_OFF_T])dnl
3335
 
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3336
 
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3337
 
   AC_REQUIRE([AC_FUNC_MMAP])dnl
3338
 
   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3339
 
   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3340
 
   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3341
 
__argz_count __argz_stringify __argz_next])
3342
 
 
3343
 
   AC_MSG_CHECKING(for stpcpy)
3344
 
   AC_CACHE_VAL(kde_cv_func_stpcpy,
3345
 
   [
3346
 
   kde_safe_cxxflags=$CXXFLAGS
3347
 
   CXXFLAGS="-Werror"
3348
 
   AC_LANG_SAVE
3349
 
   AC_LANG_CPLUSPLUS
3350
 
   AC_TRY_COMPILE([
3351
 
   #include <string.h>
3352
 
   ],
3353
 
   [
3354
 
   char buffer[200];
3355
 
   stpcpy(buffer, buffer);
3356
 
   ],
3357
 
   kde_cv_func_stpcpy=yes,
3358
 
   kde_cv_func_stpcpy=no)
3359
 
   AC_LANG_RESTORE
3360
 
   CXXFLAGS=$kde_safe_cxxflags
3361
 
   ])
3362
 
   AC_MSG_RESULT($kde_cv_func_stpcpy)
3363
 
   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3364
 
     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3365
 
   fi
3366
 
 
3367
 
   AM_LC_MESSAGES
3368
 
 
3369
 
   if test "x$CATOBJEXT" != "x"; then
3370
 
     if test "x$ALL_LINGUAS" = "x"; then
3371
 
       LINGUAS=
3372
 
     else
3373
 
       AC_MSG_CHECKING(for catalogs to be installed)
3374
 
       NEW_LINGUAS=
3375
 
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
3376
 
         case "$ALL_LINGUAS" in
3377
 
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3378
 
         esac
3379
 
       done
3380
 
       LINGUAS=$NEW_LINGUAS
3381
 
       AC_MSG_RESULT($LINGUAS)
3382
 
     fi
3383
 
 
3384
 
     dnl Construct list of names of catalog files to be constructed.
3385
 
     if test -n "$LINGUAS"; then
3386
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3387
 
     fi
3388
 
   fi
3389
 
 
3390
 
  ])
3391
 
 
3392
 
AC_DEFUN([AC_HAVE_XPM],
3393
 
 [AC_REQUIRE_CPP()dnl
3394
 
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3395
 
 
3396
 
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3397
 
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3398
 
 
3399
 
 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3400
 
        xpm_test=$withval, xpm_test="yes")
3401
 
 if test "x$xpm_test" = xno; then
3402
 
   ac_cv_have_xpm=no
3403
 
 else
3404
 
   AC_MSG_CHECKING(for XPM)
3405
 
   AC_CACHE_VAL(ac_cv_have_xpm,
3406
 
   [
3407
 
    ac_save_ldflags="$LDFLAGS"
3408
 
    ac_save_cflags="$CFLAGS"
3409
 
    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3410
 
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3411
 
    else
3412
 
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3413
 
    fi
3414
 
    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3415
 
    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3416
 
    AC_TRY_LINK([#include <X11/xpm.h>],[],
3417
 
        ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3418
 
    LDFLAGS="$ac_save_ldflags"
3419
 
    CFLAGS="$ac_save_cflags"
3420
 
   ])dnl
3421
 
 
3422
 
  if test "$ac_cv_have_xpm" = no; then
3423
 
    AC_MSG_RESULT(no)
3424
 
    XPM_LDFLAGS=""
3425
 
    XPMINC=""
3426
 
    $2
3427
 
  else
3428
 
    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3429
 
    if test "$XPM_LDFLAGS" = ""; then
3430
 
       XPMLIB='-lXpm $(LIB_X11)'
3431
 
    else
3432
 
       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3433
 
    fi
3434
 
    if test "$XPM_INCLUDE" = ""; then
3435
 
       XPMINC=""
3436
 
    else
3437
 
       XPMINC="-I$XPM_INCLUDE"
3438
 
    fi
3439
 
    AC_MSG_RESULT(yes)
3440
 
    $1
3441
 
  fi
3442
 
 fi
3443
 
 AC_SUBST(XPMINC)
3444
 
 AC_SUBST(XPMLIB)
3445
 
])
3446
 
 
3447
 
AC_DEFUN([AC_HAVE_DPMS],
3448
 
 [AC_REQUIRE_CPP()dnl
3449
 
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3450
 
 
3451
 
 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3452
 
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3453
 
 DPMS_LIB=
3454
 
 
3455
 
 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3456
 
        dpms_test=$withval, dpms_test="yes")
3457
 
 if test "x$dpms_test" = xno; then
3458
 
   ac_cv_have_dpms=no
3459
 
 else
3460
 
   AC_MSG_CHECKING(for DPMS)
3461
 
   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3462
 
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3463
 
   AC_CACHE_VAL(ac_cv_have_dpms,
3464
 
   [
3465
 
    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3466
 
      AC_MSG_RESULT(no)
3467
 
      ac_cv_have_dpms="no"
3468
 
    else
3469
 
      ac_save_ldflags="$LDFLAGS"
3470
 
      ac_save_cflags="$CFLAGS"
3471
 
      ac_save_libs="$LIBS"
3472
 
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3473
 
      CFLAGS="$CFLAGS $X_INCLUDES"
3474
 
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3475
 
      AC_TRY_LINK([
3476
 
          #include <X11/Xproto.h>
3477
 
          #include <X11/X.h>
3478
 
          #include <X11/Xlib.h>
3479
 
          #include <X11/extensions/dpms.h>
3480
 
          int foo_test_dpms()
3481
 
          { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3482
 
          ac_cv_have_dpms="yes", [
3483
 
              LDFLAGS="$ac_save_ldflags"
3484
 
              CFLAGS="$ac_save_cflags"
3485
 
              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3486
 
              LIBS="$LIBS -lXdpms"
3487
 
              CFLAGS="$CFLAGS $X_INCLUDES"
3488
 
              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3489
 
              AC_TRY_LINK([
3490
 
                  #include <X11/Xproto.h>
3491
 
                  #include <X11/X.h>
3492
 
                  #include <X11/Xlib.h>
3493
 
                  #include <X11/extensions/dpms.h>
3494
 
                  int foo_test_dpms()
3495
 
                  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3496
 
                  [
3497
 
                  ac_cv_have_dpms="-lXdpms"
3498
 
                  ],ac_cv_have_dpms="no")
3499
 
              ])
3500
 
      LDFLAGS="$ac_save_ldflags"
3501
 
      CFLAGS="$ac_save_cflags"
3502
 
      LIBS="$ac_save_libs"
3503
 
    fi
3504
 
   ])dnl
3505
 
 
3506
 
  if test "$ac_cv_have_dpms" = no; then
3507
 
    AC_MSG_RESULT(no)
3508
 
    DPMS_LDFLAGS=""
3509
 
    DPMSINC=""
3510
 
    $2
3511
 
  else
3512
 
    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3513
 
    if test "$ac_cv_have_dpms" = "-lXdpms"; then
3514
 
       DPMS_LIB="-lXdpms"
3515
 
    fi
3516
 
    if test "$DPMS_LDFLAGS" = ""; then
3517
 
       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3518
 
    else
3519
 
       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3520
 
    fi
3521
 
    if test "$DPMS_INCLUDE" = ""; then
3522
 
       DPMSINC=""
3523
 
    else
3524
 
       DPMSINC="-I$DPMS_INCLUDE"
3525
 
    fi
3526
 
    AC_MSG_RESULT(yes)
3527
 
    $1
3528
 
  fi
3529
 
 fi
3530
 
 ac_save_cflags="$CFLAGS"
3531
 
 CFLAGS="$CFLAGS $X_INCLUDES"
3532
 
 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3533
 
 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3534
 
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3535
 
 AC_CHECK_DECL(DPMSCapable,
3536
 
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3537
 
   [#include <X11/extensions/dpms.h>])
3538
 
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3539
 
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3540
 
 AC_CHECK_DECL(DPMSInfo,
3541
 
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3542
 
   [#include <X11/extensions/dpms.h>])
3543
 
 CFLAGS="$ac_save_cflags"
3544
 
 AC_SUBST(DPMSINC)
3545
 
 AC_SUBST(DPMSLIB)
3546
 
])
3547
 
 
3548
 
AC_DEFUN([AC_HAVE_GL],
3549
 
 [AC_REQUIRE_CPP()dnl
3550
 
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3551
 
 
3552
 
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3553
 
 test -z "$GL_INCLUDE" && GL_INCLUDE=
3554
 
 
3555
 
 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
3556
 
        gl_test=$withval, gl_test="yes")
3557
 
 if test "x$kde_use_qt_emb" = "xyes"; then
3558
 
   # GL and Qt Embedded is a no-go for now.
3559
 
   ac_cv_have_gl=no
3560
 
 elif test "x$gl_test" = xno; then
3561
 
   ac_cv_have_gl=no
3562
 
 else
3563
 
   AC_MSG_CHECKING(for GL)
3564
 
   AC_CACHE_VAL(ac_cv_have_gl,
3565
 
   [
3566
 
    AC_LANG_SAVE
3567
 
    AC_LANG_CPLUSPLUS
3568
 
    ac_save_ldflags="$LDFLAGS"
3569
 
    ac_save_cxxflags="$CXXFLAGS"
3570
 
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3571
 
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3572
 
    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3573
 
    CXXFLAGS="$CFLAGS $X_INCLUDES"
3574
 
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3575
 
    AC_TRY_LINK([#include <GL/gl.h>
3576
 
#include <GL/glu.h>
3577
 
], [],
3578
 
        ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3579
 
    if test "x$ac_cv_have_gl" = "xno"; then
3580
 
      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
3581
 
      test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3582
 
      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3583
 
      CXXFLAGS="$ac_save_cflags $X_INCLUDES"
3584
 
      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3585
 
      AC_TRY_LINK([#include <GL/gl.h>
3586
 
#include <GL/glu.h>
3587
 
], [],
3588
 
          ac_cv_have_gl="yes", ac_cv_have_gl="no")
3589
 
    fi
3590
 
    AC_LANG_RESTORE
3591
 
    LDFLAGS="$ac_save_ldflags"
3592
 
    CXXFLAGS="$ac_save_cxxflags"
3593
 
   ])dnl
3594
 
 
3595
 
  if test "$ac_cv_have_gl" = "no"; then
3596
 
    AC_MSG_RESULT(no)
3597
 
    GL_LDFLAGS=""
3598
 
    GLINC=""
3599
 
    $2
3600
 
  else
3601
 
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3602
 
    if test "$GL_LDFLAGS" = ""; then
3603
 
       if test "$ac_cv_have_gl" = "mesa"; then
3604
 
          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
3605
 
       else
3606
 
          GLLIB='-lGLU -lGL $(LIB_X11)'
3607
 
       fi
3608
 
    else
3609
 
       if test "$ac_cv_have_gl" = "mesa"; then
3610
 
          GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
3611
 
       else
3612
 
          GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3613
 
       fi
3614
 
    fi
3615
 
    if test "$GL_INCLUDE" = ""; then
3616
 
       GLINC=""
3617
 
    else
3618
 
       GLINC="-I$GL_INCLUDE"
3619
 
    fi
3620
 
    AC_MSG_RESULT($ac_cv_have_gl)
3621
 
    $1
3622
 
  fi
3623
 
 fi
3624
 
 AC_SUBST(GLINC)
3625
 
 AC_SUBST(GLLIB)
3626
 
])
3627
 
 
3628
 
 
3629
 
 dnl shadow password and PAM magic - maintained by ossi@kde.org
3630
 
 
3631
 
AC_DEFUN([KDE_PAM], [
3632
 
  AC_REQUIRE([KDE_CHECK_LIBDL])
3633
 
 
3634
 
  want_pam=
3635
 
  AC_ARG_WITH(pam,
3636
 
    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
3637
 
    [ if test "x$withval" = "xyes"; then
3638
 
        want_pam=yes
3639
 
        pam_service=kde
3640
 
      elif test "x$withval" = "xno"; then
3641
 
        want_pam=no
3642
 
      else
3643
 
        want_pam=yes
3644
 
        pam_service=$withval
3645
 
      fi
3646
 
    ], [ pam_service=kde ])
3647
 
 
3648
 
  use_pam=
3649
 
  PAMLIBS=
3650
 
  if test "x$want_pam" != xno; then
3651
 
    AC_CHECK_LIB(pam, pam_start, [
3652
 
      AC_CHECK_HEADER(security/pam_appl.h,
3653
 
        [ pam_header=security/pam_appl.h ],
3654
 
        [ AC_CHECK_HEADER(pam/pam_appl.h,
3655
 
            [ pam_header=pam/pam_appl.h ],
3656
 
            [
3657
 
    AC_MSG_WARN([PAM detected, but no headers found!
3658
 
Make sure you have the necessary development packages installed.])
3659
 
            ]
3660
 
          )
3661
 
        ]
3662
 
      )
3663
 
    ], , $LIBDL)
3664
 
    if test -z "$pam_header"; then
3665
 
      if test "x$want_pam" = xyes; then
3666
 
        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
3667
 
      fi
3668
 
    else
3669
 
      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3670
 
      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3671
 
      use_pam=yes
3672
 
 
3673
 
      dnl darwin claims to be something special
3674
 
      if test "$pam_header" = "pam/pam_appl.h"; then
3675
 
        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
3676
 
      fi
3677
 
 
3678
 
      dnl test whether struct pam_message is const (Linux) or not (Sun)
3679
 
      AC_MSG_CHECKING(for const pam_message)
3680
 
      AC_EGREP_HEADER([struct pam_message], $pam_header,
3681
 
        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3682
 
                          [AC_MSG_RESULT([const: Linux-type PAM])],
3683
 
                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
3684
 
                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3685
 
                          )],
3686
 
        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3687
 
    fi
3688
 
  fi
3689
 
 
3690
 
  AC_SUBST(PAMLIBS)
3691
 
])
3692
 
 
3693
 
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3694
 
AC_DEFUN([DEF_PAM_SERVICE], [
3695
 
  AC_ARG_WITH($1-pam,
3696
 
    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
3697
 
    [ if test "x$use_pam" = xyes; then
3698
 
        $3_PAM_SERVICE=$withval
3699
 
      else
3700
 
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3701
 
You may want to enforce it by using --with-pam.])
3702
 
      fi
3703
 
    ], 
3704
 
    [ if test "x$use_pam" = xyes; then
3705
 
        $3_PAM_SERVICE="$pam_service"
3706
 
      fi
3707
 
    ])
3708
 
    if test -n "$$3_PAM_SERVICE"; then
3709
 
      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3710
 
      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3711
 
    fi
3712
 
    AC_SUBST($3_PAM_SERVICE)
3713
 
])
3714
 
 
3715
 
AC_DEFUN([KDE_SHADOWPASSWD], [
3716
 
  AC_REQUIRE([KDE_PAM])
3717
 
 
3718
 
  AC_CHECK_LIB(shadow, getspent,
3719
 
    [ LIBSHADOW="-lshadow"
3720
 
      ac_use_shadow=yes
3721
 
    ],
3722
 
    [ dnl for UnixWare
3723
 
      AC_CHECK_LIB(gen, getspent, 
3724
 
        [ LIBGEN="-lgen"
3725
 
          ac_use_shadow=yes
3726
 
        ], 
3727
 
        [ AC_CHECK_FUNC(getspent, 
3728
 
            [ ac_use_shadow=yes ],
3729
 
            [ ac_use_shadow=no ])
3730
 
        ])
3731
 
    ])
3732
 
  AC_SUBST(LIBSHADOW)
3733
 
  AC_SUBST(LIBGEN)
3734
 
  
3735
 
  AC_MSG_CHECKING([for shadow passwords])
3736
 
 
3737
 
  AC_ARG_WITH(shadow,
3738
 
    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
3739
 
    [ if test "x$withval" != "xno"; then
3740
 
        use_shadow=yes
3741
 
      else
3742
 
        use_shadow=no
3743
 
      fi
3744
 
    ], [
3745
 
      use_shadow="$ac_use_shadow"
3746
 
    ])
3747
 
 
3748
 
  if test "x$use_shadow" = xyes; then
3749
 
    AC_MSG_RESULT(yes)
3750
 
    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3751
 
  else
3752
 
    AC_MSG_RESULT(no)
3753
 
    LIBSHADOW=
3754
 
    LIBGEN=
3755
 
  fi
3756
 
 
3757
 
  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3758
 
  dnl this still applies, if we could use it indirectly through pam.
3759
 
  if test "x$use_shadow" = xyes || 
3760
 
     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3761
 
      case $host in
3762
 
      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3763
 
        SETUIDFLAGS="-m 4755 -o root";;
3764
 
      *)
3765
 
        SETUIDFLAGS="-m 4755";;
3766
 
      esac
3767
 
  fi
3768
 
  AC_SUBST(SETUIDFLAGS)
3769
 
 
3770
 
])
3771
 
 
3772
 
AC_DEFUN([KDE_PASSWDLIBS], [
3773
 
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3774
 
  AC_REQUIRE([KDE_PAM])
3775
 
  AC_REQUIRE([KDE_SHADOWPASSWD])
3776
 
 
3777
 
  if test "x$use_pam" = "xyes"; then 
3778
 
    PASSWDLIBS="$PAMLIBS"
3779
 
  else
3780
 
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3781
 
  fi
3782
 
 
3783
 
  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3784
 
  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
3785
 
  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3786
 
  dnl may need to read /etc/master.passwd).
3787
 
  case $host in
3788
 
  *-*-freebsd*)
3789
 
    SETUIDFLAGS="-m 4755 -o root"
3790
 
    ;;
3791
 
  *)
3792
 
    ;;
3793
 
  esac
3794
 
 
3795
 
  AC_SUBST(PASSWDLIBS)
3796
 
])
3797
 
 
3798
 
AC_DEFUN([KDE_CHECK_LIBDL],
3799
 
[
3800
 
AC_CHECK_LIB(dl, dlopen, [
3801
 
LIBDL="-ldl"
3802
 
ac_cv_have_dlfcn=yes
3803
 
])
3804
 
 
3805
 
AC_CHECK_LIB(dld, shl_unload, [
3806
 
LIBDL="-ldld"
3807
 
ac_cv_have_shload=yes
3808
 
])
3809
 
 
3810
 
AC_SUBST(LIBDL)
3811
 
])
3812
 
 
3813
 
AC_DEFUN([KDE_CHECK_DLOPEN],
3814
 
[
3815
 
KDE_CHECK_LIBDL
3816
 
AC_CHECK_HEADERS(dlfcn.h dl.h)
3817
 
if test "$ac_cv_header_dlfcn_h" = "no"; then
3818
 
  ac_cv_have_dlfcn=no
3819
 
fi
3820
 
 
3821
 
if test "$ac_cv_header_dl_h" = "no"; then
3822
 
  ac_cv_have_shload=no
3823
 
fi
3824
 
 
3825
 
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3826
 
dnl (MM)
3827
 
AC_ARG_ENABLE(dlopen,
3828
 
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
3829
 
enable_dlopen=$enableval,
3830
 
enable_dlopen=yes)
3831
 
 
3832
 
# override the user's opinion, if we know it better ;)
3833
 
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3834
 
  enable_dlopen=no
3835
 
fi
3836
 
 
3837
 
if test "$ac_cv_have_dlfcn" = "yes"; then
3838
 
  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3839
 
fi
3840
 
 
3841
 
if test "$ac_cv_have_shload" = "yes"; then
3842
 
  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3843
 
fi
3844
 
 
3845
 
if test "$enable_dlopen" = no ; then
3846
 
  test -n "$1" && eval $1
3847
 
else
3848
 
  test -n "$2" && eval $2
3849
 
fi
3850
 
 
3851
 
])
3852
 
 
3853
 
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
3854
 
[
3855
 
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3856
 
KDE_PROG_LIBTOOL
3857
 
AC_MSG_CHECKING([dynamic loading])
3858
 
eval "`egrep '^build_libtool_libs=' libtool`"
3859
 
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3860
 
  dynamic_loading=yes
3861
 
  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3862
 
else
3863
 
  dynamic_loading=no
3864
 
fi
3865
 
AC_MSG_RESULT($dynamic_loading)
3866
 
if test "$dynamic_loading" = "yes"; then
3867
 
  $1
3868
 
else
3869
 
  $2
3870
 
fi
3871
 
])
3872
 
 
3873
 
AC_DEFUN([KDE_ADD_INCLUDES],
3874
 
[
3875
 
if test -z "$1"; then
3876
 
  test_include="Pix.h"
3877
 
else
3878
 
  test_include="$1"
3879
 
fi
3880
 
 
3881
 
AC_MSG_CHECKING([for libg++ ($test_include)])
3882
 
 
3883
 
AC_CACHE_VAL(kde_cv_libgpp_includes,
3884
 
[
3885
 
kde_cv_libgpp_includes=no
3886
 
 
3887
 
   for ac_dir in               \
3888
 
                               \
3889
 
     /usr/include/g++          \
3890
 
     /usr/include              \
3891
 
     /usr/unsupported/include  \
3892
 
     /opt/include              \
3893
 
     $extra_include            \
3894
 
     ; \
3895
 
   do
3896
 
     if test -r "$ac_dir/$test_include"; then
3897
 
       kde_cv_libgpp_includes=$ac_dir
3898
 
       break
3899
 
     fi
3900
 
   done
3901
 
])
3902
 
 
3903
 
AC_MSG_RESULT($kde_cv_libgpp_includes)
3904
 
if test "$kde_cv_libgpp_includes" != "no"; then
3905
 
  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3906
 
fi
3907
 
])
3908
 
])
3909
 
 
3910
 
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
3911
 
[
3912
 
  LIBPTHREAD=""
3913
 
 
3914
 
  if test -n "$PTHREAD_LIBS"; then
3915
 
    PTHREAD_LIBS_save="$PTHREAD_LIBS"
3916
 
    PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
3917
 
    KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [LIBPTHREAD="$PTHREAD_LIBS_save"] )
3918
 
    PTHREAD_LIBS="$PTHREAD_LIBS_save"
3919
 
  fi
3920
 
 
3921
 
  if test -z "$LIBPTHREAD"; then
3922
 
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3923
 
  fi
3924
 
 
3925
 
  AC_SUBST(LIBPTHREAD)
3926
 
])
3927
 
 
3928
 
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
3929
 
[
3930
 
      USE_THREADS=""
3931
 
      if test -z "$LIBPTHREAD"; then
3932
 
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
3933
 
      fi
3934
 
 
3935
 
    AH_VERBATIM(__svr_define, [
3936
 
#if defined(__SVR4) && !defined(__svr4__)
3937
 
#define __svr4__ 1
3938
 
#endif
3939
 
])
3940
 
    case $host_os in
3941
 
        solaris*)
3942
 
                KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3943
 
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3944
 
                ;;
3945
 
        freebsd*)
3946
 
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
3947
 
                ;;
3948
 
        aix*)
3949
 
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3950
 
                LIBPTHREAD="$LIBPTHREAD -lc_r"
3951
 
                ;;
3952
 
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3953
 
                if test "$CXX" = "KCC"; then
3954
 
                  CXXFLAGS="$CXXFLAGS --thread_safe"
3955
 
                  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
3956
 
                fi
3957
 
                ;;
3958
 
        *)
3959
 
                ;;
3960
 
    esac
3961
 
    AC_SUBST(USE_THREADS)
3962
 
    AC_SUBST(LIBPTHREAD)
3963
 
])
3964
 
 
3965
 
AC_DEFUN([KDE_CHECK_THREADING],
3966
 
[
3967
 
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3968
 
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
3969
 
  dnl default is yes if libpthread is found and no if no libpthread is available
3970
 
  if test -z "$LIBPTHREAD"; then
3971
 
    if test -z "$USE_THREADS"; then
3972
 
      kde_check_threading_default=no
3973
 
    else
3974
 
      kde_check_threading_default=yes
3975
 
    fi
3976
 
  else
3977
 
    kde_check_threading_default=yes
3978
 
  fi
3979
 
  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
3980
 
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
3981
 
  if test "x$kde_use_threading" = "xyes"; then
3982
 
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
3983
 
  fi
3984
 
])
3985
 
 
3986
 
AC_DEFUN([KDE_TRY_LINK_PYTHON],
3987
 
[
3988
 
if test "$kde_python_link_found" = no; then
3989
 
 
3990
 
if test "$1" = normal; then
3991
 
  AC_MSG_CHECKING(if a Python application links)
3992
 
else
3993
 
  AC_MSG_CHECKING(if Python depends on $2)
3994
 
fi
3995
 
 
3996
 
AC_CACHE_VAL(kde_cv_try_link_python_$1,
3997
 
[
3998
 
kde_save_cflags="$CFLAGS"
3999
 
CFLAGS="$CFLAGS $PYTHONINC"
4000
 
kde_save_libs="$LIBS"
4001
 
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4002
 
kde_save_ldflags="$LDFLAGS"
4003
 
LDFLAGS="$LDFLAGS $PYTHONLIB"
4004
 
 
4005
 
AC_TRY_LINK(
4006
 
[
4007
 
#include <Python.h>
4008
 
],[
4009
 
        PySys_SetArgv(1, 0);
4010
 
],
4011
 
        [kde_cv_try_link_python_$1=yes],
4012
 
        [kde_cv_try_link_python_$1=no]
4013
 
)
4014
 
CFLAGS="$kde_save_cflags"
4015
 
LIBS="$kde_save_libs"
4016
 
LDFLAGS="$kde_save_ldflags"
4017
 
])
4018
 
 
4019
 
if test "$kde_cv_try_link_python_$1" = "yes"; then
4020
 
  AC_MSG_RESULT(yes)
4021
 
  kde_python_link_found=yes
4022
 
  if test ! "$1" = normal; then
4023
 
    LIBPYTHON="$LIBPYTHON $2"
4024
 
  fi
4025
 
  $3
4026
 
else
4027
 
  AC_MSG_RESULT(no)
4028
 
  $4
4029
 
fi
4030
 
 
4031
 
fi
4032
 
 
4033
 
])
4034
 
 
4035
 
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4036
 
[
4037
 
AC_MSG_CHECKING([for Python directory])
4038
 
 
4039
 
AC_CACHE_VAL(kde_cv_pythondir,
4040
 
[
4041
 
  if test -z "$PYTHONDIR"; then
4042
 
    kde_cv_pythondir=/usr/local
4043
 
  else
4044
 
    kde_cv_pythondir="$PYTHONDIR"
4045
 
  fi
4046
 
])
4047
 
 
4048
 
AC_ARG_WITH(pythondir,
4049
 
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4050
 
[
4051
 
  ac_python_dir=$withval
4052
 
], ac_python_dir=$kde_cv_pythondir
4053
 
)
4054
 
 
4055
 
AC_MSG_RESULT($ac_python_dir)
4056
 
])
4057
 
 
4058
 
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4059
 
[
4060
 
AC_REQUIRE([KDE_CHECK_LIBDL])
4061
 
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4062
 
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4063
 
 
4064
 
if test -z "$1"; then
4065
 
  version="1.5"
4066
 
else
4067
 
  version="$1"
4068
 
fi
4069
 
 
4070
 
AC_MSG_CHECKING([for Python$version])
4071
 
 
4072
 
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4073
 
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4074
 
if test ! -r $python_incdir/Python.h; then
4075
 
  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4076
 
  python_incdir=$python_incdir/python$version
4077
 
  if test ! -r $python_incdir/Python.h; then
4078
 
    python_incdir=no
4079
 
  fi
4080
 
fi
4081
 
 
4082
 
PYTHONINC=-I$python_incdir
4083
 
 
4084
 
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4085
 
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4086
 
if test ! -r $python_libdir/libpython$version.so; then
4087
 
  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4088
 
  if test ! -r $python_libdir/libpython$version.a; then
4089
 
    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4090
 
    python_libdir=$python_libdir/python$version/config
4091
 
    if test ! -r $python_libdir/libpython$version.a; then
4092
 
      python_libdir=no
4093
 
    fi
4094
 
  fi
4095
 
fi
4096
 
 
4097
 
PYTHONLIB=-L$python_libdir
4098
 
kde_orig_LIBPYTHON=$LIBPYTHON
4099
 
if test -z "$LIBPYTHON"; then
4100
 
  LIBPYTHON=-lpython$version
4101
 
fi
4102
 
 
4103
 
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4104
 
python_moddir=$python_moddir/python$version
4105
 
if test ! -r $python_moddir/copy.py; then
4106
 
  python_moddir=no
4107
 
fi
4108
 
 
4109
 
PYTHONMODDIR=$python_moddir
4110
 
 
4111
 
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4112
 
 
4113
 
if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
4114
 
   LIBPYTHON=$kde_orig_LIBPYTHON
4115
 
   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4116
 
   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4117
 
   $2
4118
 
else 
4119
 
  dnl Note: this test is very weak
4120
 
  kde_python_link_found=no
4121
 
  KDE_TRY_LINK_PYTHON(normal)
4122
 
  KDE_TRY_LINK_PYTHON(m, -lm)
4123
 
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4124
 
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4125
 
  KDE_TRY_LINK_PYTHON(db2, -ldb2)
4126
 
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4127
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4128
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4129
 
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4130
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4131
 
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4132
 
  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4133
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4134
 
        [AC_MSG_WARN([it seems, Python depends on another library.
4135
 
    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4136
 
    and contact the authors to let them know about this problem])
4137
 
        ])
4138
 
 
4139
 
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4140
 
  AC_SUBST(PYTHONINC)
4141
 
  AC_SUBST(PYTHONLIB)
4142
 
  AC_SUBST(LIBPYTHON)
4143
 
  AC_SUBST(PYTHONMODDIR)
4144
 
  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4145
 
fi
4146
 
 
4147
 
])
4148
 
 
4149
 
 
4150
 
AC_DEFUN([KDE_CHECK_PYTHON],
4151
 
[
4152
 
  KDE_CHECK_PYTHON_INTERN("2.3", 
4153
 
   [KDE_CHECK_PYTHON_INTERN("2.2", 
4154
 
     [KDE_CHECK_PYTHON_INTERN("2.1", 
4155
 
       [KDE_CHECK_PYTHON_INTERN("2.0", 
4156
 
         [KDE_CHECK_PYTHON_INTERN($1, $2) ])
4157
 
       ])
4158
 
     ])
4159
 
   ])
4160
 
])
4161
 
 
4162
 
AC_DEFUN([KDE_CHECK_STL],
4163
 
[
4164
 
    AC_LANG_SAVE
4165
 
    AC_LANG_CPLUSPLUS
4166
 
    ac_save_CXXFLAGS="$CXXFLAGS"
4167
 
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4168
 
 
4169
 
    AC_MSG_CHECKING([if C++ programs can be compiled])
4170
 
    AC_CACHE_VAL(kde_cv_stl_works,
4171
 
    [
4172
 
      AC_TRY_COMPILE([
4173
 
#include <string>
4174
 
using namespace std;
4175
 
],[
4176
 
  string astring="Hallo Welt.";
4177
 
  astring.erase(0, 6); // now astring is "Welt"
4178
 
  return 0;
4179
 
], kde_cv_stl_works=yes,
4180
 
   kde_cv_stl_works=no)
4181
 
])
4182
 
 
4183
 
   AC_MSG_RESULT($kde_cv_stl_works)
4184
 
 
4185
 
   if test "$kde_cv_stl_works" = "yes"; then
4186
 
     # back compatible
4187
 
         AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4188
 
   else
4189
 
         AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4190
 
Check config.log for details - if you're using a Linux distribution you might miss
4191
 
a package named similiar to libstd++-dev.])
4192
 
   fi
4193
 
 
4194
 
   CXXFLAGS="$ac_save_CXXFLAGS"
4195
 
   AC_LANG_RESTORE
4196
 
])
4197
 
 
4198
 
AC_DEFUN([AC_FIND_QIMGIO],
4199
 
   [AC_REQUIRE([AC_FIND_JPEG])
4200
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4201
 
AC_MSG_CHECKING([for qimgio])
4202
 
AC_CACHE_VAL(ac_cv_lib_qimgio,
4203
 
[
4204
 
AC_LANG_SAVE
4205
 
AC_LANG_CPLUSPLUS
4206
 
ac_save_LIBS="$LIBS"
4207
 
ac_save_CXXFLAGS="$CXXFLAGS"
4208
 
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4209
 
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4210
 
AC_TRY_RUN(dnl
4211
 
[
4212
 
#include <qimageio.h>
4213
 
#include <qstring.h>
4214
 
int main() {
4215
 
                QString t = "hallo";
4216
 
                t.fill('t');
4217
 
                qInitImageIO();
4218
 
}
4219
 
],
4220
 
            ac_cv_lib_qimgio=yes,
4221
 
            ac_cv_lib_qimgio=no,
4222
 
            ac_cv_lib_qimgio=no)
4223
 
LIBS="$ac_save_LIBS"
4224
 
CXXFLAGS="$ac_save_CXXFLAGS"
4225
 
AC_LANG_RESTORE
4226
 
])dnl
4227
 
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4228
 
  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4229
 
  AC_MSG_RESULT(yes)
4230
 
  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4231
 
  AC_SUBST(LIBQIMGIO)
4232
 
else
4233
 
  AC_MSG_RESULT(not found)
4234
 
fi
4235
 
])
4236
 
 
4237
 
AC_DEFUN([AM_DISABLE_LIBRARIES],
4238
 
[
4239
 
    AC_PROVIDE([AM_ENABLE_STATIC])
4240
 
    AC_PROVIDE([AM_ENABLE_SHARED])
4241
 
    enable_static=no
4242
 
    enable_shared=yes
4243
 
])
4244
 
 
4245
 
 
4246
 
AC_DEFUN([AC_CHECK_UTMP_FILE],
4247
 
[
4248
 
    AC_MSG_CHECKING([for utmp file])
4249
 
 
4250
 
    AC_CACHE_VAL(kde_cv_utmp_file,
4251
 
    [
4252
 
    kde_cv_utmp_file=no
4253
 
 
4254
 
    for ac_file in    \
4255
 
                      \
4256
 
        /var/run/utmp \
4257
 
        /var/adm/utmp \
4258
 
        /etc/utmp     \
4259
 
     ; \
4260
 
    do
4261
 
     if test -r "$ac_file"; then
4262
 
       kde_cv_utmp_file=$ac_file
4263
 
       break
4264
 
     fi
4265
 
    done
4266
 
    ])
4267
 
 
4268
 
    if test "$kde_cv_utmp_file" != "no"; then
4269
 
        AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4270
 
        $1
4271
 
        AC_MSG_RESULT($kde_cv_utmp_file)
4272
 
    else
4273
 
        $2
4274
 
        AC_MSG_RESULT([non found])
4275
 
    fi
4276
 
])
4277
 
 
4278
 
 
4279
 
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4280
 
[
4281
 
 
4282
 
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4283
 
 
4284
 
if test ! -s $srcdir/subdirs; then
4285
 
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
4286
 
  TOPSUBDIRS=""
4287
 
  files=`cd $srcdir && ls -1`
4288
 
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4289
 
  for i in $dirs; do
4290
 
    echo $i >> $srcdir/subdirs
4291
 
  done
4292
 
fi
4293
 
 
4294
 
ac_topsubdirs=
4295
 
if test -s $srcdir/inst-apps; then
4296
 
  ac_topsubdirs="`cat $srcdir/inst-apps`"
4297
 
elif test -s $srcdir/subdirs; then
4298
 
  ac_topsubdirs="`cat $srcdir/subdirs`"
4299
 
fi
4300
 
 
4301
 
for i in $ac_topsubdirs; do
4302
 
  AC_MSG_CHECKING([if $i should be compiled])
4303
 
  if test -d $srcdir/$i; then
4304
 
    install_it="yes"
4305
 
    for j in $DO_NOT_COMPILE; do
4306
 
      if test $i = $j; then
4307
 
        install_it="no"
4308
 
      fi
4309
 
    done
4310
 
  else
4311
 
    install_it="no"
4312
 
  fi
4313
 
  AC_MSG_RESULT($install_it)
4314
 
  vari=`echo $i | sed -e 's,[[-+.]],_,g'`
4315
 
  if test $install_it = "yes"; then
4316
 
    TOPSUBDIRS="$TOPSUBDIRS $i"
4317
 
    eval "$vari""_SUBDIR_included=yes"
4318
 
  else
4319
 
    eval "$vari""_SUBDIR_included=no"
4320
 
  fi
4321
 
done
4322
 
 
4323
 
AC_SUBST(TOPSUBDIRS)
4324
 
])
4325
 
 
4326
 
AC_DEFUN([KDE_CHECK_NAMESPACES],
4327
 
[
4328
 
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4329
 
AC_LANG_SAVE
4330
 
AC_LANG_CPLUSPLUS
4331
 
AC_TRY_COMPILE([
4332
 
],
4333
 
[
4334
 
namespace Foo {
4335
 
  extern int i;
4336
 
  namespace Bar {
4337
 
    extern int i;
4338
 
  }
4339
 
}
4340
 
 
4341
 
int Foo::i = 0;
4342
 
int Foo::Bar::i = 1;
4343
 
],[
4344
 
  AC_MSG_RESULT(yes)
4345
 
  AC_DEFINE(HAVE_NAMESPACES)
4346
 
], [
4347
 
AC_MSG_RESULT(no)
4348
 
])
4349
 
AC_LANG_RESTORE
4350
 
])
4351
 
 
4352
 
dnl ------------------------------------------------------------------------
4353
 
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4354
 
dnl ------------------------------------------------------------------------
4355
 
dnl
4356
 
AC_DEFUN([AC_CHECK_S_ISSOCK],
4357
 
[
4358
 
AC_MSG_CHECKING(for S_ISSOCK)
4359
 
AC_CACHE_VAL(ac_cv_have_s_issock,
4360
 
[
4361
 
AC_TRY_LINK(
4362
 
[
4363
 
#include <sys/stat.h>
4364
 
],
4365
 
[
4366
 
struct stat buff;
4367
 
int b = S_ISSOCK( buff.st_mode );
4368
 
],
4369
 
ac_cv_have_s_issock=yes,
4370
 
ac_cv_have_s_issock=no)
4371
 
])
4372
 
AC_MSG_RESULT($ac_cv_have_s_issock)
4373
 
if test "$ac_cv_have_s_issock" = "yes"; then
4374
 
  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4375
 
fi
4376
 
 
4377
 
AH_VERBATIM(_ISSOCK,
4378
 
[
4379
 
#ifndef HAVE_S_ISSOCK
4380
 
#define HAVE_S_ISSOCK
4381
 
#define S_ISSOCK(mode) (1==0)
4382
 
#endif
4383
 
])
4384
 
 
4385
 
])
4386
 
 
4387
 
dnl ------------------------------------------------------------------------
4388
 
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4389
 
dnl ------------------------------------------------------------------------
4390
 
dnl
4391
 
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4392
 
[
4393
 
AC_MSG_CHECKING(for MAXPATHLEN)
4394
 
AC_CACHE_VAL(ac_cv_maxpathlen,
4395
 
[
4396
 
cat > conftest.$ac_ext <<EOF
4397
 
#ifdef STDC_HEADERS
4398
 
# include <stdlib.h>
4399
 
#endif
4400
 
#include <stdio.h>
4401
 
#include <sys/param.h>
4402
 
#ifndef MAXPATHLEN
4403
 
#define MAXPATHLEN 1024
4404
 
#endif
4405
 
 
4406
 
KDE_HELLO MAXPATHLEN
4407
 
 
4408
 
EOF
4409
 
 
4410
 
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4411
 
 
4412
 
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4413
 
    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4414
 
else
4415
 
    ac_cv_maxpathlen=1024
4416
 
fi
4417
 
 
4418
 
rm conftest.*
4419
 
 
4420
 
])
4421
 
AC_MSG_RESULT($ac_cv_maxpathlen)
4422
 
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4423
 
])
4424
 
 
4425
 
AC_DEFUN([KDE_CHECK_HEADER],
4426
 
[
4427
 
   AC_LANG_SAVE
4428
 
   kde_safe_cppflags=$CPPFLAGS
4429
 
   CPPFLAGS="$CPPFLAGS $all_includes"
4430
 
   AC_LANG_CPLUSPLUS
4431
 
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4432
 
   CPPFLAGS=$kde_safe_cppflags
4433
 
   AC_LANG_RESTORE
4434
 
])
4435
 
 
4436
 
AC_DEFUN([KDE_CHECK_HEADERS],
4437
 
[
4438
 
   AH_CHECK_HEADERS([$1])
4439
 
   AC_LANG_SAVE
4440
 
   kde_safe_cppflags=$CPPFLAGS
4441
 
   CPPFLAGS="$CPPFLAGS $all_includes"
4442
 
   AC_LANG_CPLUSPLUS
4443
 
   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4444
 
   CPPFLAGS=$kde_safe_cppflags
4445
 
   AC_LANG_RESTORE
4446
 
])
4447
 
 
4448
 
AC_DEFUN([KDE_FAST_CONFIGURE],
4449
 
[
4450
 
  dnl makes configure fast (needs perl)
4451
 
  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4452
 
      with_fast_perl=$enableval, with_fast_perl=yes)
4453
 
])
4454
 
 
4455
 
AC_DEFUN([KDE_CONF_FILES],
4456
 
[
4457
 
  val=
4458
 
  if test -f $srcdir/configure.files ; then
4459
 
    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4460
 
  fi
4461
 
  CONF_FILES=
4462
 
  if test -n "$val" ; then
4463
 
    for i in $val ; do
4464
 
      CONF_FILES="$CONF_FILES $i"
4465
 
    done
4466
 
  fi
4467
 
  AC_SUBST(CONF_FILES)
4468
 
])dnl
4469
 
 
4470
 
AC_DEFUN([KDE_SET_PREFIX],
4471
 
[
4472
 
  unset CDPATH
4473
 
  dnl make $KDEDIR the default for the installation
4474
 
  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4475
 
 
4476
 
  if test "x$prefix" = "xNONE"; then
4477
 
    prefix=$ac_default_prefix
4478
 
    ac_configure_args="$ac_configure_args --prefix=$prefix"
4479
 
  fi
4480
 
  # And delete superfluous '/' to make compares easier
4481
 
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4482
 
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4483
 
  KDE_FAST_CONFIGURE
4484
 
  KDE_CONF_FILES
4485
 
])
4486
 
 
4487
 
pushdef([AC_PROG_INSTALL],
4488
 
[
4489
 
  dnl our own version, testing for a -p flag
4490
 
  popdef([AC_PROG_INSTALL])
4491
 
  dnl as AC_PROG_INSTALL works as it works we first have
4492
 
  dnl to save if the user didn't specify INSTALL, as the
4493
 
  dnl autoconf one overwrites INSTALL and we have no chance to find
4494
 
  dnl out afterwards
4495
 
  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4496
 
  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4497
 
  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4498
 
  AC_PROG_INSTALL
4499
 
 
4500
 
  if test -z "$kde_save_INSTALL_given" ; then
4501
 
    # OK, user hasn't given any INSTALL, autoconf found one for us
4502
 
    # now we test, if it supports the -p flag
4503
 
    AC_MSG_CHECKING(for -p flag to install)
4504
 
    rm -f confinst.$$.* > /dev/null 2>&1
4505
 
    echo "Testtest" > confinst.$$.orig
4506
 
    ac_res=no
4507
 
    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4508
 
      if test -f confinst.$$.new ; then
4509
 
        # OK, -p seems to do no harm to install
4510
 
        INSTALL="${INSTALL} -p"
4511
 
        ac_res=yes
4512
 
      fi
4513
 
    fi
4514
 
    rm -f confinst.$$.*
4515
 
    AC_MSG_RESULT($ac_res)
4516
 
  fi
4517
 
  dnl the following tries to resolve some signs and wonders coming up
4518
 
  dnl with different autoconf/automake versions
4519
 
  dnl e.g.:
4520
 
  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4521
 
  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4522
 
  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4523
 
  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4524
 
  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4525
 
  dnl   install-@DIR@PROGRAMS targets to explicitly use that flag
4526
 
  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4527
 
  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
4528
 
  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
4529
 
  dnl  *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4530
 
  dnl   automake (due to broken Makefile.am or whatever) to install programs,
4531
 
  dnl   and so does not see the -s flag in automake > 1.4
4532
 
  dnl to clean up that mess we:
4533
 
  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4534
 
  dnl   which cleans KDE's program with automake > 1.4;
4535
 
  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4536
 
  dnl   with automake<=1.4
4537
 
  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
4538
 
  dnl   properly uses install-@DIR@PROGRAMS, but I don't care
4539
 
  dnl
4540
 
  dnl And to all this comes, that I even can't write in comments variable
4541
 
  dnl  names used by automake, because it is so stupid to think I wanted to
4542
 
  dnl  _use_ them, therefor I have written A_M_... instead of AM_
4543
 
  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4544
 
 
4545
 
  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4546
 
    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4547
 
  fi
4548
 
  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4549
 
    INSTALL_SCRIPT='${INSTALL}'
4550
 
  fi
4551
 
])dnl
4552
 
 
4553
 
AC_DEFUN([KDE_LANG_CPLUSPLUS],
4554
 
[AC_LANG_CPLUSPLUS
4555
 
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4556
 
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4557
 
])
4558
 
 
4559
 
pushdef([AC_LANG_CPLUSPLUS],
4560
 
[popdef([AC_LANG_CPLUSPLUS])
4561
 
KDE_LANG_CPLUSPLUS
4562
 
])
4563
 
 
4564
 
AC_DEFUN([KDE_CHECK_LONG_LONG],
4565
 
[
4566
 
AC_MSG_CHECKING(for long long)
4567
 
AC_CACHE_VAL(kde_cv_c_long_long,
4568
 
[
4569
 
  AC_LANG_SAVE
4570
 
  AC_LANG_CPLUSPLUS
4571
 
  AC_TRY_LINK([], [
4572
 
  long long foo = 0;
4573
 
  foo = foo+1;
4574
 
  ],
4575
 
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4576
 
  AC_LANG_RESTORE
4577
 
])
4578
 
AC_MSG_RESULT($kde_cv_c_long_long)
4579
 
if test "$kde_cv_c_long_long" = yes; then
4580
 
   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4581
 
fi
4582
 
])
4583
 
 
4584
 
AC_DEFUN([KDE_CHECK_LIB],
4585
 
[
4586
 
     kde_save_LDFLAGS="$LDFLAGS"
4587
 
     dnl AC_CHECK_LIB modifies LIBS, so save it here
4588
 
     kde_save_LIBS="$LIBS"
4589
 
     LDFLAGS="$LDFLAGS $all_libraries"
4590
 
     case $host_os in
4591
 
      aix*) LDFLAGS="-brtl $LDFLAGS"
4592
 
        test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4593
 
        ;;
4594
 
     esac
4595
 
     AC_CHECK_LIB($1, $2, $3, $4, $5)
4596
 
     LDFLAGS="$kde_save_LDFLAGS"
4597
 
     LIBS="$kde_save_LIBS"
4598
 
])
4599
 
 
4600
 
AC_DEFUN([KDE_JAVA_PREFIX],
4601
 
[
4602
 
        dir=`dirname "$1"`
4603
 
        base=`basename "$1"`
4604
 
        list=`ls -1 $dir 2> /dev/null`
4605
 
        for entry in $list; do 
4606
 
                if test -d $dir/$entry/bin; then
4607
 
                        case $entry in
4608
 
                           $base)
4609
 
                                javadirs="$javadirs $dir/$entry/bin"
4610
 
                                ;;
4611
 
                        esac
4612
 
                elif test -d $dir/$entry/jre/bin; then
4613
 
                        case $entry in
4614
 
                           $base)
4615
 
                                javadirs="$javadirs $dir/$entry/jre/bin"
4616
 
                                ;;
4617
 
                        esac
4618
 
                fi
4619
 
        done
4620
 
])
4621
 
 
4622
 
dnl KDE_CHEC_JAVA_DIR(onlyjre)
4623
 
AC_DEFUN([KDE_CHECK_JAVA_DIR],
4624
 
[
4625
 
 
4626
 
AC_ARG_WITH(java,
4627
 
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
4628
 
[  ac_java_dir=$withval
4629
 
], ac_java_dir=""
4630
 
)
4631
 
 
4632
 
AC_MSG_CHECKING([for Java])
4633
 
 
4634
 
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4635
 
if test "x$ac_java_dir" = "xno"; then
4636
 
   kde_java_bindir=no
4637
 
   kde_java_includedir=no
4638
 
   kde_java_libjvmdir=no
4639
 
   kde_java_libgcjdir=no
4640
 
   kde_java_libhpidir=no
4641
 
else
4642
 
  if test "x$ac_java_dir" = "x"; then
4643
 
     
4644
 
     
4645
 
      dnl No option set -> collect list of candidate paths
4646
 
      if test -n "$JAVA_HOME"; then
4647
 
        KDE_JAVA_PREFIX($JAVA_HOME)
4648
 
      fi
4649
 
      KDE_JAVA_PREFIX(/usr/j2se)
4650
 
      KDE_JAVA_PREFIX(/usr/lib/j2se)
4651
 
      KDE_JAVA_PREFIX(/usr/j*dk*)
4652
 
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4653
 
      KDE_JAVA_PREFIX(/opt/j*sdk*)
4654
 
      KDE_JAVA_PREFIX(/usr/lib/java*)
4655
 
      KDE_JAVA_PREFIX(/usr/java*)
4656
 
      KDE_JAVA_PREFIX(/usr/java/j*dk*)
4657
 
      KDE_JAVA_PREFIX(/usr/java/j*re*)
4658
 
      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4659
 
      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4660
 
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4661
 
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4662
 
      KDE_JAVA_PREFIX(/opt/java*)
4663
 
 
4664
 
      kde_cv_path="NONE"
4665
 
      kde_save_IFS=$IFS
4666
 
      IFS=':'
4667
 
      for dir in $PATH; do
4668
 
          if test -d "$dir"; then
4669
 
              javadirs="$javadirs $dir"
4670
 
          fi
4671
 
      done
4672
 
      IFS=$kde_save_IFS
4673
 
      jredirs=
4674
 
 
4675
 
      dnl Now javadirs contains a list of paths that exist, all ending with bin/
4676
 
      for dir in $javadirs; do
4677
 
          dnl Check for the java executable
4678
 
          if test -x "$dir/java"; then
4679
 
              dnl And also check for a libjvm.so somewhere under there
4680
 
              dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
4681
 
              if test "$dir" != "/usr/bin"; then
4682
 
                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4683
 
                  if test ! -f $libjvmdir/libjvm.so; then continue; fi
4684
 
                  jredirs="$jredirs $dir"
4685
 
              fi
4686
 
          fi
4687
 
      done
4688
 
 
4689
 
      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
4690
 
      JAVAC=
4691
 
      JAVA=
4692
 
      kde_java_bindir=no
4693
 
      for dir in $jredirs; do
4694
 
          JAVA="$dir/java"
4695
 
          kde_java_bindir=$dir
4696
 
          if test -x "$dir/javac"; then
4697
 
                JAVAC="$dir/javac"
4698
 
                break
4699
 
          fi
4700
 
      done
4701
 
 
4702
 
      if test -n "$JAVAC"; then
4703
 
          dnl this substitution might not work - well, we test for jni.h below
4704
 
          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4705
 
      else
4706
 
          kde_java_includedir=no
4707
 
      fi
4708
 
  else
4709
 
    dnl config option set
4710
 
    kde_java_bindir=$ac_java_dir/bin
4711
 
    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4712
 
        kde_java_includedir=no
4713
 
    else
4714
 
        kde_java_includedir=$ac_java_dir/include
4715
 
    fi
4716
 
  fi
4717
 
fi
4718
 
 
4719
 
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4720
 
if test "x$kde_java_bindir" != "xno"; then
4721
 
 
4722
 
  dnl Look for libjvm.so
4723
 
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4724
 
  dnl Look for libgcj.so
4725
 
  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
4726
 
  dnl Look for libhpi.so and avoid green threads
4727
 
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
4728
 
 
4729
 
  dnl Now check everything's fine under there
4730
 
  dnl the include dir is our flag for having the JDK
4731
 
  if test -d "$kde_java_includedir"; then
4732
 
    if test ! -x "$kde_java_bindir/javac"; then
4733
 
      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
4734
 
    fi
4735
 
    if test ! -x "$kde_java_bindir/javah"; then
4736
 
      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4737
 
    fi
4738
 
    if test ! -x "$kde_java_bindir/jar"; then
4739
 
      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4740
 
    fi
4741
 
    if test ! -r "$kde_java_includedir/jni.h"; then
4742
 
      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
4743
 
    fi
4744
 
 
4745
 
    jni_includes="-I$kde_java_includedir"
4746
 
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4747
 
    dnl and under linux here.. 
4748
 
    
4749
 
    dnl not needed for gcj
4750
 
 
4751
 
    if test "x$kde_java_libgcjdir" = "x"; then 
4752
 
      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
4753
 
      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
4754
 
      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
4755
 
    fi
4756
 
 
4757
 
  else
4758
 
    JAVAC=
4759
 
    jni_includes=
4760
 
  fi
4761
 
 
4762
 
  if test "x$kde_java_libgcjdir" = "x"; then 
4763
 
     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4764
 
        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4765
 
     fi 
4766
 
  else
4767
 
     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
4768
 
        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
4769
 
     fi 
4770
 
  fi
4771
 
 
4772
 
  if test ! -x "$kde_java_bindir/java"; then
4773
 
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4774
 
  fi
4775
 
 
4776
 
  dnl not needed for gcj compile
4777
 
 
4778
 
  if test "x$kde_java_libgcjdir" = "x"; then 
4779
 
      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4780
 
        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4781
 
      fi
4782
 
  fi
4783
 
 
4784
 
  if test -n "$jni_includes"; then
4785
 
    dnl Check for JNI version
4786
 
    AC_LANG_SAVE
4787
 
    AC_LANG_CPLUSPLUS
4788
 
    ac_cxxflags_safe="$CXXFLAGS"
4789
 
    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4790
 
 
4791
 
    AC_TRY_COMPILE([
4792
 
  #include <jni.h>
4793
 
              ],
4794
 
              [
4795
 
  #ifndef JNI_VERSION_1_2
4796
 
  Syntax Error
4797
 
  #endif
4798
 
              ],[ kde_jni_works=yes ],
4799
 
              [ kde_jni_works=no ])
4800
 
 
4801
 
    if test $kde_jni_works = no; then
4802
 
      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
4803
 
                    You need to have Java Development Kit (JDK) version 1.2. 
4804
 
 
4805
 
                    Use --with-java to specify another location.
4806
 
                    Use --without-java to configure without java support.
4807
 
                    Or download a newer JDK and try again. 
4808
 
                    See e.g. http://java.sun.com/products/jdk/1.2 ])
4809
 
    fi
4810
 
 
4811
 
    CXXFLAGS="$ac_cxxflags_safe"    
4812
 
    AC_LANG_RESTORE
4813
 
 
4814
 
    dnl All tests ok, inform and subst the variables
4815
 
 
4816
 
    JAVAC=$kde_java_bindir/javac
4817
 
    JAVAH=$kde_java_bindir/javah
4818
 
    JAR=$kde_java_bindir/jar
4819
 
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4820
 
    if test "x$kde_java_libgcjdir" = "x"; then 
4821
 
      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
4822
 
    else
4823
 
      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
4824
 
    fi
4825
 
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
4826
 
 
4827
 
  else
4828
 
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4829
 
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
4830
 
  fi
4831
 
elif test -d "/Library/Java/Home"; then
4832
 
  kde_java_bindir="/Library/Java/Home/bin"
4833
 
  jni_includes="-I/Library/Java/Home/include"
4834
 
 
4835
 
  JAVAC=$kde_java_bindir/javac
4836
 
  JAVAH=$kde_java_bindir/javah
4837
 
  JAR=$kde_java_bindir/jar
4838
 
  JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
4839
 
 
4840
 
  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4841
 
  AC_MSG_RESULT([Apple Java Framework])
4842
 
else
4843
 
  AC_MSG_RESULT([none found])
4844
 
fi
4845
 
 
4846
 
AC_SUBST(JAVAC)
4847
 
AC_SUBST(JAVAH)
4848
 
AC_SUBST(JAR)
4849
 
AC_SUBST(JVMLIBS)
4850
 
AC_SUBST(jni_includes)
4851
 
 
4852
 
# for backward compat
4853
 
kde_cv_java_includedir=$kde_java_includedir
4854
 
kde_cv_java_bindir=$kde_java_bindir
4855
 
])
4856
 
 
4857
 
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
4858
 
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
4859
 
dnl big packages, m4_foreach is dog-slow.  So use our own version of
4860
 
dnl it.  (matz@kde.org)
4861
 
m4_define([mm_foreach],
4862
 
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
4863
 
m4_define([mm_car], [[$1]])
4864
 
m4_define([mm_car2], [[$@]])
4865
 
m4_define([_mm_foreach],
4866
 
[m4_if(m4_quote($2), [], [],
4867
 
       [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
4868
 
                                                   mm_car2(m4_shift($2)),
4869
 
                                                   [$3])])])
4870
 
m4_define([AC_FOREACH],
4871
 
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
4872
 
 
4873
 
AC_DEFUN([KDE_NEED_FLEX],
4874
 
[
4875
 
kde_libs_safe=$LIBS
4876
 
LIBS="$LIBS $USER_LDFLAGS"
4877
 
AM_PROG_LEX
4878
 
LIBS=$kde_libs_safe
4879
 
if test -z "$LEXLIB"; then
4880
 
    AC_MSG_ERROR([You need to have flex installed.])
4881
 
fi
4882
 
AC_SUBST(LEXLIB)
4883
 
])
4884
 
 
4885
 
AC_DEFUN([AC_PATH_QTOPIA],
4886
 
[
4887
 
  dnl TODO: use AC_CACHE_VAL
4888
 
 
4889
 
  if test -z "$1"; then
4890
 
    qtopia_minver_maj=1
4891
 
    qtopia_minver_min=5
4892
 
    qtopia_minver_pat=0
4893
 
  else
4894
 
    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
4895
 
    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
4896
 
    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
4897
 
  fi
4898
 
 
4899
 
  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
4900
 
  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
4901
 
 
4902
 
  AC_REQUIRE([AC_PATH_QT])
4903
 
 
4904
 
  AC_MSG_CHECKING([for Qtopia])
4905
 
 
4906
 
  LIB_QTOPIA="-lqpe"
4907
 
  AC_SUBST(LIB_QTOPIA)
4908
 
 
4909
 
  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
4910
 
 
4911
 
  ac_qtopia_incdir=NO
4912
 
 
4913
 
  AC_ARG_WITH(qtopia-dir,
4914
 
              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
4915
 
              [  ac_qtopia_incdir="$withval"/include] ) 
4916
 
  
4917
 
  qtopia_incdirs=""
4918
 
  for dir in $kde_qtopia_dirs; do
4919
 
    qtopia_incdirs="$qtopia_incdirs $dir/include"
4920
 
  done
4921
 
 
4922
 
  if test ! "$ac_qtopia_incdir" = "NO"; then
4923
 
    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
4924
 
  fi
4925
 
 
4926
 
  qtopia_incdir=""
4927
 
  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
4928
 
  ac_qtopia_incdir="$qtopia_incdir"
4929
 
 
4930
 
  if test -z "$qtopia_incdir"; then
4931
 
    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
4932
 
  fi
4933
 
 
4934
 
  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
4935
 
  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
4936
 
  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
4937
 
 
4938
 
  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
4939
 
  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
4940
 
  if test "$qtopia_ver" -lt "$qtopia_minver"; then
4941
 
    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
4942
 
is required.])
4943
 
  fi
4944
 
 
4945
 
  AC_LANG_SAVE
4946
 
  AC_LANG_CPLUSPLUS
4947
 
 
4948
 
  ac_cxxflags_safe="$CXXFLAGS"
4949
 
  ac_ldflags_safe="$LDFLAGS"
4950
 
  ac_libs_safe="$LIBS"
4951
 
 
4952
 
  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
4953
 
  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
4954
 
  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
4955
 
 
4956
 
  cat > conftest.$ac_ext <<EOF
4957
 
#include "confdefs.h"
4958
 
#include <qpe/qpeapplication.h>
4959
 
#include <qpe/version.h>
4960
 
 
4961
 
int main( int argc, char **argv )
4962
 
{
4963
 
    QPEApplication app( argc, argv );
4964
 
    return 0;
4965
 
}
4966
 
EOF
4967
 
 
4968
 
  if AC_TRY_EVAL(ac_link) && test -s conftest; then
4969
 
    rm -f conftest*
4970
 
  else
4971
 
    rm -f conftest*
4972
 
    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
4973
 
the end of config.log])
4974
 
  fi
4975
 
 
4976
 
  CXXFLAGS="$ac_cxxflags_safe"
4977
 
  LDFLAGS="$ac_ldflags_safe"
4978
 
  LIBS="$ac_libs_safe"
4979
 
 
4980
 
  AC_LANG_RESTORE
4981
 
 
4982
 
  QTOPIA_INCLUDES="-I$qtopia_incdir"
4983
 
  AC_SUBST(QTOPIA_INCLUDES)
4984
 
 
4985
 
  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
4986
 
])
4987
 
 
4988
 
 
4989
 
AC_DEFUN([KDE_INIT_DOXYGEN],
4990
 
[
4991
 
AC_MSG_CHECKING([for Qt docs])
4992
 
kde_qtdir=
4993
 
if test "${with_qt_dir+set}" = set; then
4994
 
  kde_qtdir="$with_qt_dir"
4995
 
fi
4996
 
 
4997
 
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)
4998
 
AC_MSG_RESULT($QTDOCDIR)
4999
 
 
5000
 
AC_SUBST(QTDOCDIR)
5001
 
 
5002
 
KDE_FIND_PATH(dot, DOT, [], [])
5003
 
if test -n "$DOT"; then
5004
 
  KDE_HAVE_DOT="YES"
5005
 
else
5006
 
  KDE_HAVE_DOT="NO"
5007
 
fi
5008
 
AC_SUBST(KDE_HAVE_DOT)
5009
 
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5010
 
AC_SUBST(DOXYGEN)
5011
 
 
5012
 
DOXYGEN_PROJECT_NAME="$1"
5013
 
DOXYGEN_PROJECT_NUMBER="$2"
5014
 
AC_SUBST(DOXYGEN_PROJECT_NAME)
5015
 
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5016
 
 
5017
 
KDE_HAS_DOXYGEN=no
5018
 
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5019
 
  KDE_HAS_DOXYGEN=yes
5020
 
fi
5021
 
AC_SUBST(KDE_HAS_DOXYGEN)
5022
 
 
5023
 
])
5024
 
 
5025
 
 
5026
 
AC_DEFUN([AC_FIND_BZIP2],
5027
 
[
5028
 
AC_MSG_CHECKING([for bzDecompress in libbz2])
5029
 
AC_CACHE_VAL(ac_cv_lib_bzip2,
5030
 
[
5031
 
AC_LANG_SAVE
5032
 
AC_LANG_CPLUSPLUS
5033
 
kde_save_LIBS="$LIBS"
5034
 
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5035
 
kde_save_CXXFLAGS="$CXXFLAGS"
5036
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5037
 
AC_TRY_LINK(dnl
5038
 
[
5039
 
#define BZ_NO_STDIO
5040
 
#include<bzlib.h>
5041
 
],
5042
 
            [ bz_stream s; (void) bzDecompress(&s); ],
5043
 
            eval "ac_cv_lib_bzip2='-lbz2'",
5044
 
            eval "ac_cv_lib_bzip2=no")
5045
 
LIBS="$kde_save_LIBS"
5046
 
CXXFLAGS="$kde_save_CXXFLAGS"
5047
 
AC_LANG_RESTORE
5048
 
])dnl
5049
 
AC_MSG_RESULT($ac_cv_lib_bzip2)
5050
 
 
5051
 
if test ! "$ac_cv_lib_bzip2" = no; then
5052
 
  BZIP2DIR=bzip2
5053
 
 
5054
 
  LIBBZ2="$ac_cv_lib_bzip2"
5055
 
  AC_SUBST(LIBBZ2)
5056
 
 
5057
 
else
5058
 
 
5059
 
   cxx_shared_flag=
5060
 
   ld_shared_flag=
5061
 
   KDE_CHECK_COMPILER_FLAG(shared, [
5062
 
        ld_shared_flag="-shared"
5063
 
   ])
5064
 
   KDE_CHECK_COMPILER_FLAG(fPIC, [
5065
 
        cxx_shared_flag="-fPIC"
5066
 
   ])
5067
 
 
5068
 
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5069
 
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5070
 
   [
5071
 
   AC_LANG_SAVE
5072
 
   AC_LANG_CPLUSPLUS
5073
 
   kde_save_LIBS="$LIBS"
5074
 
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5075
 
   kde_save_CXXFLAGS="$CXXFLAGS"
5076
 
   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5077
 
 
5078
 
   AC_TRY_LINK(dnl
5079
 
   [
5080
 
   #define BZ_NO_STDIO
5081
 
   #include<bzlib.h>
5082
 
   ],
5083
 
               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5084
 
               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5085
 
               eval "ac_cv_lib_bzip2_prefix=no")
5086
 
   LIBS="$kde_save_LIBS"
5087
 
   CXXFLAGS="$kde_save_CXXFLAGS"
5088
 
   AC_LANG_RESTORE
5089
 
   ])dnl
5090
 
 
5091
 
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5092
 
   
5093
 
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5094
 
     BZIP2DIR=bzip2
5095
 
    
5096
 
     LIBBZ2="$ac_cv_lib_bzip2_prefix"
5097
 
     AC_SUBST(LIBBZ2)
5098
 
 
5099
 
     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5100
 
   dnl else, we just ignore this
5101
 
   fi
5102
 
 
5103
 
fi
5104
 
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5105
 
])
5106
 
 
5107
 
dnl ------------------------------------------------------------------------
5108
 
dnl Try to find the SSL headers and libraries.
5109
 
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5110
 
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5111
 
dnl ------------------------------------------------------------------------
5112
 
dnl
5113
 
AC_DEFUN([KDE_CHECK_SSL],
5114
 
[
5115
 
LIBSSL="-lssl -lcrypto"
5116
 
AC_REQUIRE([KDE_CHECK_LIB64])
5117
 
 
5118
 
ac_ssl_includes=NO ac_ssl_libraries=NO
5119
 
ssl_libraries=""
5120
 
ssl_includes=""
5121
 
AC_ARG_WITH(ssl-dir,
5122
 
    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5123
 
    [  ac_ssl_includes="$withval"/include
5124
 
       ac_ssl_libraries="$withval"/lib$kdelibsuff
5125
 
    ])
5126
 
 
5127
 
want_ssl=yes
5128
 
AC_ARG_WITH(ssl,
5129
 
    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5130
 
    [want_ssl=$withval])
5131
 
 
5132
 
if test $want_ssl = yes; then
5133
 
 
5134
 
AC_MSG_CHECKING(for OpenSSL)
5135
 
 
5136
 
AC_CACHE_VAL(ac_cv_have_ssl,
5137
 
[#try to guess OpenSSL locations
5138
 
  
5139
 
  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5140
 
  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5141
 
  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5142
 
  ac_ssl_includes="$ssl_incdir"
5143
 
 
5144
 
  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"
5145
 
  if test ! "$ac_ssl_libraries" = "NO"; then
5146
 
    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5147
 
  fi
5148
 
 
5149
 
  test=NONE
5150
 
  ssl_libdir=NONE
5151
 
  for dir in $ssl_libdirs; do
5152
 
    try="ls -1 $dir/libssl*"
5153
 
    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5154
 
  done
5155
 
 
5156
 
  ac_ssl_libraries="$ssl_libdir"
5157
 
 
5158
 
  ac_ldflags_safe="$LDFLAGS"
5159
 
  ac_libs_safe="$LIBS"
5160
 
 
5161
 
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5162
 
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5163
 
 
5164
 
  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5165
 
  ac_ssl_rsaref="yes"
5166
 
  ,
5167
 
  ac_ssl_rsaref="no"
5168
 
  )
5169
 
 
5170
 
  LDFLAGS="$ac_ldflags_safe"
5171
 
  LIBS="$ac_libs_safe"
5172
 
 
5173
 
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5174
 
    have_ssl=no
5175
 
  else
5176
 
    have_ssl=yes;
5177
 
  fi
5178
 
 
5179
 
  ])
5180
 
 
5181
 
  eval "$ac_cv_have_ssl"
5182
 
 
5183
 
  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5184
 
 
5185
 
  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5186
 
  AC_MSG_RESULT($ac_ssl_rsaref)
5187
 
 
5188
 
  AC_MSG_CHECKING([for easter eggs])
5189
 
  AC_MSG_RESULT([none found])
5190
 
 
5191
 
else
5192
 
  have_ssl=no
5193
 
fi
5194
 
 
5195
 
if test "$have_ssl" = yes; then
5196
 
  AC_MSG_CHECKING(for OpenSSL version)
5197
 
  dnl Check for SSL version
5198
 
  AC_CACHE_VAL(ac_cv_ssl_version,
5199
 
  [
5200
 
 
5201
 
    cat >conftest.$ac_ext <<EOF
5202
 
#include <openssl/opensslv.h>
5203
 
#include <stdio.h>
5204
 
    int main() {
5205
 
 
5206
 
#ifndef OPENSSL_VERSION_NUMBER
5207
 
      printf("ssl_version=\\"error\\"\n");
5208
 
#else
5209
 
      if (OPENSSL_VERSION_NUMBER < 0x00906000)
5210
 
        printf("ssl_version=\\"old\\"\n");
5211
 
      else
5212
 
        printf("ssl_version=\\"ok\\"\n");
5213
 
#endif
5214
 
     return (0);
5215
 
    }
5216
 
EOF
5217
 
 
5218
 
    ac_save_CPPFLAGS=$CPPFLAGS
5219
 
    if test "$ac_ssl_includes" != "/usr/include"; then
5220
 
        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5221
 
    fi
5222
 
 
5223
 
    if AC_TRY_EVAL(ac_link); then 
5224
 
 
5225
 
      if eval `./conftest 2>&5`; then
5226
 
        if test $ssl_version = error; then
5227
 
          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5228
 
        else
5229
 
          if test $ssl_version = old; then
5230
 
            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5231
 
            have_ssl=no
5232
 
          fi
5233
 
        fi
5234
 
        ac_cv_ssl_version="ssl_version=$ssl_version"
5235
 
      else
5236
 
        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5237
 
        Check config.log, and if you can't figure it out, send a mail to 
5238
 
        David Faure <faure@kde.org>, attaching your config.log])
5239
 
      fi
5240
 
 
5241
 
    else
5242
 
      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5243
 
      Check config.log, and if you can't figure it out, send a mail to 
5244
 
      David Faure <faure@kde.org>, attaching your config.log])
5245
 
    fi 
5246
 
    CPPFLAGS=$ac_save_CPPFLAGS
5247
 
 
5248
 
  ])
5249
 
 
5250
 
  eval "$ac_cv_ssl_version"
5251
 
  AC_MSG_RESULT($ssl_version)
5252
 
fi
5253
 
 
5254
 
if test "$have_ssl" != yes; then
5255
 
  LIBSSL="";
5256
 
else
5257
 
  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5258
 
  ac_cv_have_ssl="have_ssl=yes \
5259
 
    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5260
 
  
5261
 
  
5262
 
  ssl_libraries="$ac_ssl_libraries"
5263
 
  ssl_includes="$ac_ssl_includes"
5264
 
 
5265
 
  if test "$ac_ssl_rsaref" = yes; then
5266
 
    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
5267
 
  fi
5268
 
 
5269
 
  if test $ssl_version = "old"; then
5270
 
    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5271
 
  fi
5272
 
fi
5273
 
 
5274
 
SSL_INCLUDES=
5275
 
 
5276
 
if test "$ssl_includes" = "/usr/include"; then
5277
 
  if test -f /usr/kerberos/include/krb5.h; then
5278
 
        SSL_INCLUDES="-I/usr/kerberos/include"
5279
 
  fi
5280
 
elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5281
 
  SSL_INCLUDES="-I$ssl_includes"
5282
 
fi
5283
 
 
5284
 
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5285
 
 SSL_LDFLAGS=""
5286
 
else
5287
 
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5288
 
fi
5289
 
 
5290
 
AC_SUBST(SSL_INCLUDES)
5291
 
AC_SUBST(SSL_LDFLAGS)
5292
 
AC_SUBST(LIBSSL)
5293
 
])
5294
 
 
5295
 
AC_DEFUN([KDE_CHECK_STRLCPY],
5296
 
[
5297
 
  AC_REQUIRE([AC_CHECK_STRLCAT])
5298
 
  AC_REQUIRE([AC_CHECK_STRLCPY])
5299
 
  AC_CHECK_SIZEOF(size_t)
5300
 
  AC_CHECK_SIZEOF(unsigned long)
5301
 
 
5302
 
  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5303
 
  AC_TRY_COMPILE(,[
5304
 
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5305
 
       choke me
5306
 
    #endif
5307
 
    ],AC_MSG_RESULT([yes]),[
5308
 
      AC_MSG_RESULT(no)
5309
 
      AC_MSG_ERROR([
5310
 
       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
5311
 
       does not apply. Please mail kde-devel@kde.org with a description of your system!
5312
 
      ])
5313
 
  ])
5314
 
])
5315
 
 
5316
 
AC_DEFUN([KDE_CHECK_BINUTILS],
5317
 
[
5318
 
  AC_MSG_CHECKING([if ld supports unversioned version maps])
5319
 
 
5320
 
  kde_save_LDFLAGS="$LDFLAGS"
5321
 
  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5322
 
  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5323
 
  AC_TRY_LINK([int foo;],
5324
 
[
5325
 
#ifdef __INTEL_COMPILER
5326
 
icc apparently does not support libtools version-info and version-script
5327
 
at the same time. Dunno where the bug is, but until somebody figured out,
5328
 
better disable the optional version scripts.
5329
 
#endif
5330
 
 
5331
 
  foo = 42;
5332
 
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5333
 
  LDFLAGS="$kde_save_LDFLAGS"
5334
 
  rm -f conftest.map
5335
 
  AM_CONDITIONAL(include_VERSION_SCRIPT, 
5336
 
    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5337
 
 
5338
 
  AC_MSG_RESULT($kde_supports_versionmaps)
5339
 
])
5340
 
 
5341
 
AC_DEFUN([AM_PROG_OBJC],[
5342
 
AC_CHECK_PROGS(OBJC, gcc, gcc)
5343
 
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5344
 
if test "x${OBJCFLAGS-unset}" = xunset; then
5345
 
   OBJCFLAGS="-g -O2"
5346
 
fi
5347
 
AC_SUBST(OBJCFLAGS)
5348
 
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5349
 
])
5350
 
 
5351
 
AC_DEFUN([KDE_CHECK_PERL],
5352
 
[
5353
 
        KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5354
 
                    AC_MSG_ERROR([No Perl found in your $PATH.
5355
 
We need perl to generate some code.])
5356
 
        ])
5357
 
    AC_SUBST(PERL)
5358
 
])
5359
 
 
5360
 
dnl
5361
 
dnl apr
5362
 
dnl
5363
 
AC_DEFUN([AC_CHECK_APR],
5364
 
[
5365
 
APR_CONFIGS="apr-config apr-1-config /usr/local/apr/bin/apr-config /usr/local/apr/bin/apr-1-config"
5366
 
AC_ARG_WITH(apr-config,
5367
 
[[  --with-apr-config=FILE    Use the given path to apr-config when determining
5368
 
                            APR configuration; defaults to "apr-config"]],
5369
 
[
5370
 
    if test "$withval" != "yes" -a "$withval" != ""; then
5371
 
        APR_CONFIGS=$withval
5372
 
    fi
5373
 
])
5374
 
AC_MSG_CHECKING([for APR])
5375
 
APR_CONFIG=""
5376
 
for VALUE in $APR_CONFIGS ; do
5377
 
        if $VALUE --cflags >/dev/null 2>&1; then
5378
 
                APR_CONFIG=$VALUE
5379
 
                break
5380
 
        fi
5381
 
done
5382
 
test $VALUE && APR_CONFIG=$VALUE
5383
 
if test $APR_CONFIG ; then
5384
 
    AC_MSG_RESULT([found])
5385
 
else
5386
 
    AC_MSG_RESULT([not found])
5387
 
    AC_MSG_ERROR([APR is required. Try --with-apr-config.])
5388
 
fi
5389
 
CPPFLAGS="$CPPFLAGS  `$APR_CONFIG --cppflags` `$APR_CONFIG --includes`"
5390
 
APR_LIBS="`$APR_CONFIG --link-ld --libs`"
5391
 
 
5392
 
APU_CONFIGS="apu-config apu-1-config /usr/local/apr/bin/apu-config /usr/local/apr/bin/apu-1-config"
5393
 
AC_ARG_WITH(apu-config,
5394
 
[[  --with-apu-config=FILE    Use the given path to apu-config when determining
5395
 
                            APR util configuration; defaults to "apu-config"]],
5396
 
[
5397
 
    if test "$withval" != "yes" -a "$withval" != ""; then
5398
 
        APU_CONFIGS=$withval
5399
 
    fi
5400
 
])
5401
 
AC_MSG_CHECKING([for APR util])
5402
 
APU_CONFIG=""
5403
 
for VALUE in $APU_CONFIGS ; do
5404
 
        if $VALUE --includes >/dev/null 2>&1; then
5405
 
                APU_CONFIG=$VALUE
5406
 
                break
5407
 
        fi
5408
 
done
5409
 
if test $APU_CONFIG ; then
5410
 
    AC_MSG_RESULT([found])
5411
 
else
5412
 
    AC_MSG_RESULT([not found])
5413
 
    AC_MSG_ERROR([APR util is required. Try --with-apu-config.])
5414
 
fi
5415
 
CPPFLAGS="$CPPFLAGS `$APU_CONFIG --includes`"
5416
 
APR_LIBS="$APR_LIBS `$APU_CONFIG --link-ld --libs`"
5417
 
 
5418
 
AC_SUBST(APR_LIBS)
5419
 
])
5420
 
 
5421
 
dnl 
5422
 
dnl Neon
5423
 
dnl
5424
 
AC_DEFUN([AC_CHECK_NEON],
5425
 
[
5426
 
SEARCH="neon-config"
5427
 
AC_ARG_WITH(neon-config,
5428
 
[[  --with-neon-config=FILE     Use the given path to neon-config when determining
5429
 
                            Neon configuration; defaults to "neon-config"]],
5430
 
[
5431
 
    if test "$withval" != "yes" -a "$withval" != ""; then
5432
 
        SEARCH=$withval
5433
 
    fi
5434
 
])
5435
 
AC_MSG_CHECKING([Neon])
5436
 
NEON_CONFIG=""
5437
 
for VALUE in $SEARCH ; do
5438
 
        if CHECK=`$VALUE --version 2>&1` ; then
5439
 
                NEON_CONFIG=$VALUE
5440
 
                break
5441
 
        fi
5442
 
done
5443
 
if test $NEON_CONFIG ; then
5444
 
        AC_MSG_RESULT([found])
5445
 
else
5446
 
        AC_MSG_RESULT([not found])
5447
 
        AC_MSG_ERROR([Neon is required. Try --with-neon-config.])
5448
 
fi
5449
 
CPPFLAGS="$CPPFLAGS `$NEON_CONFIG --cflags`"
5450
 
NEON_LIBS="`$NEON_CONFIG --libs`"
5451
 
AC_SUBST(NEON_LIBS)
5452
 
])
5453
 
 
5454
 
dnl
5455
 
dnl Subversion
5456
 
dnl
5457
 
AC_DEFUN([AC_CHECK_SUBVERSION],
5458
 
[
5459
 
AC_REQUIRE([KDE_CHECK_LIB64])
5460
 
AC_MSG_CHECKING([for Subversion headers])
5461
 
SVN_INCLUDES="/usr/include /usr/local/include"
5462
 
AC_ARG_WITH(svn-include,
5463
 
    AC_HELP_STRING([--with-svn-include=DIR],[Use given path to subversion headers.]),
5464
 
    [
5465
 
       if test "$withval" != "yes" -a "$withval" != ""; then
5466
 
         SVN_INCLUDES=$withval
5467
 
       fi
5468
 
    ])
5469
 
 
5470
 
for VALUE in $SVN_INCLUDES ; do
5471
 
    if test -f $VALUE/subversion-1/svn_types.h ; then
5472
 
        SVN_INCLUDE=$VALUE
5473
 
        break
5474
 
    fi
5475
 
done
5476
 
if test $SVN_INCLUDE ; then
5477
 
    AC_MSG_RESULT([found])
5478
 
else
5479
 
    AC_MSG_RESULT([not found])
5480
 
    AC_MSG_ERROR([Subversion headers are required. Try --with-svn-include.])
5481
 
fi
5482
 
CPPFLAGS="$CPPFLAGS -I$SVN_INCLUDE/subversion-1"
5483
 
AC_SUBST(SVN_INCLUDE)
5484
 
 
5485
 
SVN_LIBS="/usr/lib${kdelibsuff} /usr/local/lib${kdelibsuff}"
5486
 
AC_ARG_WITH(svn-lib,
5487
 
[[  --with-svn-lib=DIR  Use the given path to the subversion libraries.]],
5488
 
[
5489
 
    if test "$withval" != "yes" -a "$withval" != ""; then
5490
 
        SVN_LIBS=$withval
5491
 
    fi
5492
 
])
5493
 
AC_MSG_CHECKING([for Subversion libraries])
5494
 
SVN_LIB=""
5495
 
for VALUE in $SVN_LIBS ; do
5496
 
        if ls $VALUE/libsvn_client-1.* >/dev/null 2>&1; then
5497
 
                SVN_LIB=$VALUE
5498
 
                break
5499
 
        fi
5500
 
done
5501
 
if test $SVN_LIB ; then
5502
 
    AC_MSG_RESULT([found])
5503
 
else
5504
 
    AC_MSG_RESULT([not found])
5505
 
    AC_MSG_ERROR([Subversion libraries are required. Try --with-svn-lib.])
5506
 
fi
5507
 
SVN_LIBS="-L$SVN_LIB -lsvn_client-1 -lsvn_wc-1 -lsvn_ra-1 -lsvn_delta-1 -lsvn_subr-1"
5508
 
AC_SUBST(SVN_LIBS)
5509
 
])
5510
 
 
5511
 
AC_DEFUN([AC_EXTRAS_INC],
5512
 
[
5513
 
 all_includes="$all_includes -I\$(top_srcdir) -I\$(top_srcdir)/src"
5514
 
])
5515
 
 
5516
 
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
5517
 
  [
5518
 
    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
5519
 
      [
5520
 
        AC_LANG_SAVE
5521
 
        AC_LANG_CPLUSPLUS
5522
 
 
5523
 
        safe_CXXFLAGS=$CXXFLAGS
5524
 
        safe_LDFLAGS=$LDFLAGS
5525
 
        CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
5526
 
        LDFLAGS="$LDFLAGS -shared -fPIC"
5527
 
 
5528
 
        AC_TRY_LINK(
5529
 
        [
5530
 
          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
5531
 
          #include <string>
5532
 
          int some_function( void ) __attribute__ ((visibility("default")));
5533
 
          int some_function( void )
5534
 
          {
5535
 
            std::string s("blafasel");
5536
 
            return 0;
5537
 
          }
5538
 
        ], [/* elvis is alive */],
5539
 
        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
5540
 
 
5541
 
        CXXFLAGS=$safe_CXXFLAGS
5542
 
        LDFLAGS=$safe_LDFLAGS
5543
 
        AC_LANG_RESTORE
5544
 
      ]
5545
 
    )
5546
 
 
5547
 
    if test x$kde_cv_val_gcc_visibility_bug = xno; then
5548
 
      CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
5549
 
    fi
5550
 
  ]
5551
 
)
5552
 
 
5553
 
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
5554
 
[
5555
 
  AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
5556
 
 
5557
 
  AC_MSG_CHECKING([grepping for visibility push/pop in headers])
5558
 
 
5559
 
  if test "x$GXX" = "xyes"; then
5560
 
    AC_LANG_SAVE
5561
 
    AC_LANG_CPLUSPLUS
5562
 
    AC_EGREP_CPP(
5563
 
       [GCC visibility push],
5564
 
       [ #include <exception>
5565
 
       ],
5566
 
    [
5567
 
      AC_MSG_RESULT(yes)
5568
 
      kde_stdc_visibility_patched=yes ],
5569
 
    [
5570
 
      AC_MSG_RESULT(no)
5571
 
      AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for
5572
 
                   visibility support. Disabling -fvisibility=hidden])
5573
 
 
5574
 
      kde_stdc_visibility_patched=no ])
5575
 
 
5576
 
    AC_LANG_RESTORE
5577
 
 
5578
 
    kde_have_gcc_visibility=no
5579
 
    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden,
5580
 
    [
5581
 
      kde_have_gcc_visibility=yes
5582
 
      dnl the whole toolchain is just a mess, gcc is just too buggy
5583
 
      dnl to handle STL with visibility enabled. Lets reconsider
5584
 
      dnl when gcc 4.2 is out or when things get fixed in the compiler.
5585
 
      dnl Contact mueller@kde.org for details.
5586
 
      AC_ARG_ENABLE(gcc-hidden-visibility,
5587
 
        AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
5588
 
          [kde_have_gcc_visibility=$enableval],
5589
 
          [kde_have_gcc_visibility=no])
5590
 
 
5591
 
      AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
5592
 
        [
5593
 
          AC_LANG_SAVE
5594
 
          AC_LANG_CPLUSPLUS
5595
 
 
5596
 
          safe_CXXFLAGS=$CXXFLAGS
5597
 
          CXXFLAGS="$CXXFLAGS $all_includes"
5598
 
 
5599
 
          AC_TRY_COMPILE(
5600
 
          [
5601
 
#include <qglobal.h>
5602
 
#if Q_EXPORT - 0 != 0
5603
 
/* if this compiles, then Q_EXPORT is undefined */
5604
 
/* if Q_EXPORT is nonempty, this will break compilation */
5605
 
#endif
5606
 
          ], [/* elvis is alive */],
5607
 
          kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
5608
 
 
5609
 
          CXXFLAGS=$safe_CXXFLAGS
5610
 
          AC_LANG_RESTORE
5611
 
        ]
5612
 
      )
5613
 
 
5614
 
      if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xy
5615
 
es"; then
5616
 
        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
5617
 
        KDE_CHECK_VISIBILITY_GCC_BUG
5618
 
        HAVE_GCC_VISIBILITY=1
5619
 
        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
5620
 
      fi
5621
 
    ])
5622
 
  fi
5623
 
])
5624
 
 
5625
 
 
5626
 
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5627
 
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
5628
 
## Free Software Foundation, Inc.
5629
 
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5630
 
##
5631
 
## This program is free software; you can redistribute it and/or modify
5632
 
## it under the terms of the GNU General Public License as published by
5633
 
## the Free Software Foundation; either version 2 of the License, or
5634
 
## (at your option) any later version.
5635
 
##
5636
 
## This program is distributed in the hope that it will be useful, but
5637
 
## WITHOUT ANY WARRANTY; without even the implied warranty of
5638
 
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5639
 
## General Public License for more details.
5640
 
##
5641
 
## You should have received a copy of the GNU General Public License
5642
 
## along with this program; if not, write to the Free Software
5643
 
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5644
 
##
5645
 
## As a special exception to the GNU General Public License, if you
5646
 
## distribute this file as part of a program that contains a
5647
 
## configuration script generated by Autoconf, you may include it under
5648
 
## the same distribution terms that you use for the rest of that program.
5649
 
 
5650
 
# serial 47 AC_PROG_LIBTOOL
5651
 
 
5652
 
 
5653
 
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5654
 
# -----------------------------------------------------------
5655
 
# If this macro is not defined by Autoconf, define it here.
5656
 
m4_ifdef([AC_PROVIDE_IFELSE],
5657
 
         [],
5658
 
         [m4_define([AC_PROVIDE_IFELSE],
5659
 
                 [m4_ifdef([AC_PROVIDE_$1],
5660
 
                           [$2], [$3])])])
5661
 
 
5662
 
 
5663
 
# AC_PROG_LIBTOOL
5664
 
# ---------------
5665
 
AC_DEFUN([AC_PROG_LIBTOOL],
5666
 
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5667
 
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5668
 
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5669
 
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
5670
 
    [AC_LIBTOOL_CXX],
5671
 
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5672
 
  ])])
5673
 
dnl And a similar setup for Fortran 77 support
5674
 
  AC_PROVIDE_IFELSE([AC_PROG_F77],
5675
 
    [AC_LIBTOOL_F77],
5676
 
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5677
 
])])
5678
 
 
5679
 
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5680
 
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5681
 
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5682
 
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5683
 
    [AC_LIBTOOL_GCJ],
5684
 
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5685
 
      [AC_LIBTOOL_GCJ],
5686
 
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5687
 
        [AC_LIBTOOL_GCJ],
5688
 
      [ifdef([AC_PROG_GCJ],
5689
 
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5690
 
       ifdef([A][M_PROG_GCJ],
5691
 
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5692
 
       ifdef([LT_AC_PROG_GCJ],
5693
 
             [define([LT_AC_PROG_GCJ],
5694
 
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5695
 
])])# AC_PROG_LIBTOOL
5696
 
 
5697
 
 
5698
 
# _AC_PROG_LIBTOOL
5699
 
# ----------------
5700
 
AC_DEFUN([_AC_PROG_LIBTOOL],
5701
 
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5702
 
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5703
 
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
5704
 
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5705
 
 
5706
 
# This can be used to rebuild libtool when needed
5707
 
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5708
 
 
5709
 
# Always use our own libtool.
5710
 
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5711
 
AC_SUBST(LIBTOOL)dnl
5712
 
 
5713
 
# Prevent multiple expansion
5714
 
define([AC_PROG_LIBTOOL], [])
5715
 
])# _AC_PROG_LIBTOOL
5716
 
 
5717
 
 
5718
 
# AC_LIBTOOL_SETUP
5719
 
# ----------------
5720
 
AC_DEFUN([AC_LIBTOOL_SETUP],
5721
 
[AC_PREREQ(2.50)dnl
5722
 
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5723
 
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5724
 
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5725
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5726
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5727
 
AC_REQUIRE([AC_PROG_CC])dnl
5728
 
AC_REQUIRE([AC_PROG_LD])dnl
5729
 
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5730
 
AC_REQUIRE([AC_PROG_NM])dnl
5731
 
 
5732
 
AC_REQUIRE([AC_PROG_LN_S])dnl
5733
 
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5734
 
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5735
 
AC_REQUIRE([AC_OBJEXT])dnl
5736
 
AC_REQUIRE([AC_EXEEXT])dnl
5737
 
dnl
5738
 
 
5739
 
AC_LIBTOOL_SYS_MAX_CMD_LEN
5740
 
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5741
 
AC_LIBTOOL_OBJDIR
5742
 
 
5743
 
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5744
 
_LT_AC_PROG_ECHO_BACKSLASH
5745
 
 
5746
 
case $host_os in
5747
 
aix3*)
5748
 
  # AIX sometimes has problems with the GCC collect2 program.  For some
5749
 
  # reason, if we set the COLLECT_NAMES environment variable, the problems
5750
 
  # vanish in a puff of smoke.
5751
 
  if test "X${COLLECT_NAMES+set}" != Xset; then
5752
 
    COLLECT_NAMES=
5753
 
    export COLLECT_NAMES
5754
 
  fi
5755
 
  ;;
5756
 
esac
5757
 
 
5758
 
# Sed substitution that helps us do robust quoting.  It backslashifies
5759
 
# metacharacters that are still active within double-quoted strings.
5760
 
Xsed='sed -e s/^X//'
5761
 
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5762
 
 
5763
 
# Same as above, but do not quote variable references.
5764
 
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5765
 
 
5766
 
# Sed substitution to delay expansion of an escaped shell variable in a
5767
 
# double_quote_subst'ed string.
5768
 
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5769
 
 
5770
 
# Sed substitution to avoid accidental globbing in evaled expressions
5771
 
no_glob_subst='s/\*/\\\*/g'
5772
 
 
5773
 
# Constants:
5774
 
rm="rm -f"
5775
 
 
5776
 
# Global variables:
5777
 
default_ofile=libtool
5778
 
can_build_shared=yes
5779
 
 
5780
 
# All known linkers require a `.a' archive for static linking (except M$VC,
5781
 
# which needs '.lib').
5782
 
libext=a
5783
 
ltmain="$ac_aux_dir/ltmain.sh"
5784
 
ofile="$default_ofile"
5785
 
with_gnu_ld="$lt_cv_prog_gnu_ld"
5786
 
 
5787
 
AC_CHECK_TOOL(AR, ar, false)
5788
 
AC_CHECK_TOOL(RANLIB, ranlib, :)
5789
 
AC_CHECK_TOOL(STRIP, strip, :)
5790
 
 
5791
 
old_CC="$CC"
5792
 
old_CFLAGS="$CFLAGS"
5793
 
 
5794
 
# Set sane defaults for various variables
5795
 
test -z "$AR" && AR=ar
5796
 
test -z "$AR_FLAGS" && AR_FLAGS=cru
5797
 
test -z "$AS" && AS=as
5798
 
test -z "$CC" && CC=cc
5799
 
test -z "$LTCC" && LTCC=$CC
5800
 
test -z "$DLLTOOL" && DLLTOOL=dlltool
5801
 
test -z "$LD" && LD=ld
5802
 
test -z "$LN_S" && LN_S="ln -s"
5803
 
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5804
 
test -z "$NM" && NM=nm
5805
 
test -z "$SED" && SED=sed
5806
 
test -z "$OBJDUMP" && OBJDUMP=objdump
5807
 
test -z "$RANLIB" && RANLIB=:
5808
 
test -z "$STRIP" && STRIP=:
5809
 
test -z "$ac_objext" && ac_objext=o
5810
 
 
5811
 
# Determine commands to create old-style static archives.
5812
 
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5813
 
old_postinstall_cmds='chmod 644 $oldlib'
5814
 
old_postuninstall_cmds=
5815
 
 
5816
 
if test -n "$RANLIB"; then
5817
 
  case $host_os in
5818
 
  openbsd*)
5819
 
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5820
 
    ;;
5821
 
  *)
5822
 
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5823
 
    ;;
5824
 
  esac
5825
 
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5826
 
fi
5827
 
 
5828
 
# Only perform the check for file, if the check method requires it
5829
 
case $deplibs_check_method in
5830
 
file_magic*)
5831
 
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5832
 
    AC_PATH_MAGIC
5833
 
  fi
5834
 
  ;;
5835
 
esac
5836
 
 
5837
 
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5838
 
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5839
 
enable_win32_dll=yes, enable_win32_dll=no)
5840
 
 
5841
 
AC_ARG_ENABLE([libtool-lock],
5842
 
    [AC_HELP_STRING([--disable-libtool-lock],
5843
 
        [avoid locking (might break parallel builds)])])
5844
 
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5845
 
 
5846
 
AC_ARG_WITH([pic],
5847
 
    [AC_HELP_STRING([--with-pic],
5848
 
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5849
 
    [pic_mode="$withval"],
5850
 
    [pic_mode=default])
5851
 
test -z "$pic_mode" && pic_mode=default
5852
 
 
5853
 
# Use C for the default configuration in the libtool script
5854
 
tagname=
5855
 
AC_LIBTOOL_LANG_C_CONFIG
5856
 
_LT_AC_TAGCONFIG
5857
 
])# AC_LIBTOOL_SETUP
5858
 
 
5859
 
 
5860
 
# _LT_AC_SYS_COMPILER
5861
 
# -------------------
5862
 
AC_DEFUN([_LT_AC_SYS_COMPILER],
5863
 
[AC_REQUIRE([AC_PROG_CC])dnl
5864
 
 
5865
 
# If no C compiler was specified, use CC.
5866
 
LTCC=${LTCC-"$CC"}
5867
 
 
5868
 
# Allow CC to be a program name with arguments.
5869
 
compiler=$CC
5870
 
])# _LT_AC_SYS_COMPILER
5871
 
 
5872
 
 
5873
 
# _LT_AC_SYS_LIBPATH_AIX
5874
 
# ----------------------
5875
 
# Links a minimal program and checks the executable
5876
 
# for the system default hardcoded library path. In most cases,
5877
 
# this is /usr/lib:/lib, but when the MPI compilers are used
5878
 
# the location of the communication and MPI libs are included too.
5879
 
# If we don't find anything, use the default library path according
5880
 
# to the aix ld manual.
5881
 
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5882
 
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5883
 
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
5884
 
}'`
5885
 
# Check for a 64-bit object if we didn't find anything.
5886
 
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; }
5887
 
}'`; fi],[])
5888
 
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5889
 
])# _LT_AC_SYS_LIBPATH_AIX
5890
 
 
5891
 
 
5892
 
# _LT_AC_SHELL_INIT(ARG)
5893
 
# ----------------------
5894
 
AC_DEFUN([_LT_AC_SHELL_INIT],
5895
 
[ifdef([AC_DIVERSION_NOTICE],
5896
 
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5897
 
         [AC_DIVERT_PUSH(NOTICE)])
5898
 
$1
5899
 
AC_DIVERT_POP
5900
 
])# _LT_AC_SHELL_INIT
5901
 
 
5902
 
 
5903
 
# _LT_AC_PROG_ECHO_BACKSLASH
5904
 
# --------------------------
5905
 
# Add some code to the start of the generated configure script which
5906
 
# will find an echo command which doesn't interpret backslashes.
5907
 
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5908
 
[_LT_AC_SHELL_INIT([
5909
 
# Check that we are running under the correct shell.
5910
 
SHELL=${CONFIG_SHELL-/bin/sh}
5911
 
 
5912
 
case X$ECHO in
5913
 
X*--fallback-echo)
5914
 
  # Remove one level of quotation (which was required for Make).
5915
 
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5916
 
  ;;
5917
 
esac
5918
 
 
5919
 
echo=${ECHO-echo}
5920
 
if test "X[$]1" = X--no-reexec; then
5921
 
  # Discard the --no-reexec flag, and continue.
5922
 
  shift
5923
 
elif test "X[$]1" = X--fallback-echo; then
5924
 
  # Avoid inline document here, it may be left over
5925
 
  :
5926
 
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
5927
 
  # Yippee, $echo works!
5928
 
  :
5929
 
else
5930
 
  # Restart under the correct shell.
5931
 
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5932
 
fi
5933
 
 
5934
 
if test "X[$]1" = X--fallback-echo; then
5935
 
  # used as fallback echo
5936
 
  shift
5937
 
  cat <<EOF
5938
 
[$]*
5939
 
EOF
5940
 
  exit 0
5941
 
fi
5942
 
 
5943
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
5944
 
# if CDPATH is set.
5945
 
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5946
 
 
5947
 
if test -z "$ECHO"; then
5948
 
if test "X${echo_test_string+set}" != Xset; then
5949
 
# find a string as large as possible, as long as the shell can cope with it
5950
 
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5951
 
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5952
 
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5953
 
       echo_test_string="`eval $cmd`" &&
5954
 
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5955
 
    then
5956
 
      break
5957
 
    fi
5958
 
  done
5959
 
fi
5960
 
 
5961
 
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5962
 
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5963
 
   test "X$echo_testing_string" = "X$echo_test_string"; then
5964
 
  :
5965
 
else
5966
 
  # The Solaris, AIX, and Digital Unix default echo programs unquote
5967
 
  # backslashes.  This makes it impossible to quote backslashes using
5968
 
  #   echo "$something" | sed 's/\\/\\\\/g'
5969
 
  #
5970
 
  # So, first we look for a working echo in the user's PATH.
5971
 
 
5972
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5973
 
  for dir in $PATH /usr/ucb; do
5974
 
    IFS="$lt_save_ifs"
5975
 
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5976
 
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5977
 
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5978
 
       test "X$echo_testing_string" = "X$echo_test_string"; then
5979
 
      echo="$dir/echo"
5980
 
      break
5981
 
    fi
5982
 
  done
5983
 
  IFS="$lt_save_ifs"
5984
 
 
5985
 
  if test "X$echo" = Xecho; then
5986
 
    # We didn't find a better echo, so look for alternatives.
5987
 
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5988
 
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5989
 
       test "X$echo_testing_string" = "X$echo_test_string"; then
5990
 
      # This shell has a builtin print -r that does the trick.
5991
 
      echo='print -r'
5992
 
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5993
 
         test "X$CONFIG_SHELL" != X/bin/ksh; then
5994
 
      # If we have ksh, try running configure again with it.
5995
 
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5996
 
      export ORIGINAL_CONFIG_SHELL
5997
 
      CONFIG_SHELL=/bin/ksh
5998
 
      export CONFIG_SHELL
5999
 
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6000
 
    else
6001
 
      # Try using printf.
6002
 
      echo='printf %s\n'
6003
 
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6004
 
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6005
 
         test "X$echo_testing_string" = "X$echo_test_string"; then
6006
 
        # Cool, printf works
6007
 
        :
6008
 
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6009
 
           test "X$echo_testing_string" = 'X\t' &&
6010
 
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6011
 
           test "X$echo_testing_string" = "X$echo_test_string"; then
6012
 
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6013
 
        export CONFIG_SHELL
6014
 
        SHELL="$CONFIG_SHELL"
6015
 
        export SHELL
6016
 
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
6017
 
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6018
 
           test "X$echo_testing_string" = 'X\t' &&
6019
 
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6020
 
           test "X$echo_testing_string" = "X$echo_test_string"; then
6021
 
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
6022
 
      else
6023
 
        # maybe with a smaller string...
6024
 
        prev=:
6025
 
 
6026
 
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6027
 
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6028
 
          then
6029
 
            break
6030
 
          fi
6031
 
          prev="$cmd"
6032
 
        done
6033
 
 
6034
 
        if test "$prev" != 'sed 50q "[$]0"'; then
6035
 
          echo_test_string=`eval $prev`
6036
 
          export echo_test_string
6037
 
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6038
 
        else
6039
 
          # Oops.  We lost completely, so just stick with echo.
6040
 
          echo=echo
6041
 
        fi
6042
 
      fi
6043
 
    fi
6044
 
  fi
6045
 
fi
6046
 
fi
6047
 
 
6048
 
# Copy echo and quote the copy suitably for passing to libtool from
6049
 
# the Makefile, instead of quoting the original, which is used later.
6050
 
ECHO=$echo
6051
 
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6052
 
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6053
 
fi
6054
 
 
6055
 
AC_SUBST(ECHO)
6056
 
])])# _LT_AC_PROG_ECHO_BACKSLASH
6057
 
 
6058
 
 
6059
 
# _LT_AC_LOCK
6060
 
# -----------
6061
 
AC_DEFUN([_LT_AC_LOCK],
6062
 
[AC_ARG_ENABLE([libtool-lock],
6063
 
    [AC_HELP_STRING([--disable-libtool-lock],
6064
 
        [avoid locking (might break parallel builds)])])
6065
 
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6066
 
 
6067
 
# Some flags need to be propagated to the compiler or linker for good
6068
 
# libtool support.
6069
 
case $host in
6070
 
ia64-*-hpux*)
6071
 
  # Find out which ABI we are using.
6072
 
  echo 'int i;' > conftest.$ac_ext
6073
 
  if AC_TRY_EVAL(ac_compile); then
6074
 
    case `/usr/bin/file conftest.$ac_objext` in
6075
 
    *ELF-32*)
6076
 
      HPUX_IA64_MODE="32"
6077
 
      ;;
6078
 
    *ELF-64*)
6079
 
      HPUX_IA64_MODE="64"
6080
 
      ;;
6081
 
    esac
6082
 
  fi
6083
 
  rm -rf conftest*
6084
 
  ;;
6085
 
*-*-irix6*)
6086
 
  # Find out which ABI we are using.
6087
 
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6088
 
  if AC_TRY_EVAL(ac_compile); then
6089
 
   if test "$lt_cv_prog_gnu_ld" = yes; then
6090
 
    case `/usr/bin/file conftest.$ac_objext` in
6091
 
    *32-bit*)
6092
 
      LD="${LD-ld} -melf32bsmip"
6093
 
      ;;
6094
 
    *N32*)
6095
 
      LD="${LD-ld} -melf32bmipn32"
6096
 
      ;;
6097
 
    *64-bit*)
6098
 
      LD="${LD-ld} -melf64bmip"
6099
 
      ;;
6100
 
    esac
6101
 
   else
6102
 
    case `/usr/bin/file conftest.$ac_objext` in
6103
 
    *32-bit*)
6104
 
      LD="${LD-ld} -32"
6105
 
      ;;
6106
 
    *N32*)
6107
 
      LD="${LD-ld} -n32"
6108
 
      ;;
6109
 
    *64-bit*)
6110
 
      LD="${LD-ld} -64"
6111
 
      ;;
6112
 
    esac
6113
 
   fi
6114
 
  fi
6115
 
  rm -rf conftest*
6116
 
  ;;
6117
 
 
6118
 
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6119
 
  # Find out which ABI we are using.
6120
 
  echo 'int i;' > conftest.$ac_ext
6121
 
  if AC_TRY_EVAL(ac_compile); then
6122
 
    case "`/usr/bin/file conftest.o`" in
6123
 
    *32-bit*)
6124
 
      LINUX_64_MODE="32"
6125
 
      case $host in
6126
 
        x86_64-*linux*)
6127
 
          LD="${LD-ld} -m elf_i386"
6128
 
          ;;
6129
 
        ppc64-*linux*)
6130
 
          LD="${LD-ld} -m elf32ppclinux"
6131
 
          ;;
6132
 
        s390x-*linux*)
6133
 
          LD="${LD-ld} -m elf_s390"
6134
 
          ;;
6135
 
        sparc64-*linux*)
6136
 
          LD="${LD-ld} -m elf32_sparc"
6137
 
          ;;
6138
 
      esac
6139
 
      ;;
6140
 
    *64-bit*)
6141
 
      LINUX_64_MODE="64"
6142
 
      case $host in
6143
 
        x86_64-*linux*)
6144
 
          LD="${LD-ld} -m elf_x86_64"
6145
 
          ;;
6146
 
        ppc*-*linux*|powerpc*-*linux*)
6147
 
          LD="${LD-ld} -m elf64ppc"
6148
 
          ;;
6149
 
        s390*-*linux*)
6150
 
          LD="${LD-ld} -m elf64_s390"
6151
 
          ;;
6152
 
        sparc*-*linux*)
6153
 
          LD="${LD-ld} -m elf64_sparc"
6154
 
          ;;
6155
 
      esac
6156
 
      ;;
6157
 
    esac
6158
 
  fi
6159
 
  rm -rf conftest*
6160
 
  ;;
6161
 
 
6162
 
*-*-sco3.2v5*)
6163
 
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6164
 
  SAVE_CFLAGS="$CFLAGS"
6165
 
  CFLAGS="$CFLAGS -belf"
6166
 
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6167
 
    [AC_LANG_PUSH(C)
6168
 
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6169
 
     AC_LANG_POP])
6170
 
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6171
 
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6172
 
    CFLAGS="$SAVE_CFLAGS"
6173
 
  fi
6174
 
  ;;
6175
 
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6176
 
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6177
 
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6178
 
  AC_CHECK_TOOL(AS, as, false)
6179
 
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
6180
 
  ;;
6181
 
  ])
6182
 
esac
6183
 
 
6184
 
need_locks="$enable_libtool_lock"
6185
 
 
6186
 
])# _LT_AC_LOCK
6187
 
 
6188
 
 
6189
 
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6190
 
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6191
 
# ----------------------------------------------------------------
6192
 
# Check whether the given compiler option works
6193
 
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6194
 
[AC_REQUIRE([LT_AC_PROG_SED])
6195
 
AC_CACHE_CHECK([$1], [$2],
6196
 
  [$2=no
6197
 
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6198
 
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6199
 
   lt_compiler_flag="$3"
6200
 
   # Insert the option either (1) after the last *FLAGS variable, or
6201
 
   # (2) before a word containing "conftest.", or (3) at the end.
6202
 
   # Note that $ac_compile itself does not contain backslashes and begins
6203
 
   # with a dollar sign (not a hyphen), so the echo should work correctly.
6204
 
   # The option is referenced via a variable to avoid confusing sed.
6205
 
   lt_compile=`echo "$ac_compile" | $SED \
6206
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6207
 
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6208
 
   -e 's:$: $lt_compiler_flag:'`
6209
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6210
 
   (eval "$lt_compile" 2>conftest.err)
6211
 
   ac_status=$?
6212
 
   cat conftest.err >&AS_MESSAGE_LOG_FD
6213
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6214
 
   if (exit $ac_status) && test -s "$ac_outfile"; then
6215
 
     # The compiler can only warn and ignore the option if not recognized
6216
 
     # So say no if there are warnings
6217
 
     if test ! -s conftest.err; then
6218
 
       $2=yes
6219
 
     fi
6220
 
   fi
6221
 
   $rm conftest*
6222
 
])
6223
 
 
6224
 
if test x"[$]$2" = xyes; then
6225
 
    ifelse([$5], , :, [$5])
6226
 
else
6227
 
    ifelse([$6], , :, [$6])
6228
 
fi
6229
 
])# AC_LIBTOOL_COMPILER_OPTION
6230
 
 
6231
 
 
6232
 
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6233
 
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
6234
 
# ------------------------------------------------------------
6235
 
# Check whether the given compiler option works
6236
 
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6237
 
[AC_CACHE_CHECK([$1], [$2],
6238
 
  [$2=no
6239
 
   save_LDFLAGS="$LDFLAGS"
6240
 
   LDFLAGS="$LDFLAGS $3"
6241
 
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
6242
 
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6243
 
     # The compiler can only warn and ignore the option if not recognized
6244
 
     # So say no if there are warnings
6245
 
     if test -s conftest.err; then
6246
 
       # Append any errors to the config.log.
6247
 
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
6248
 
     else
6249
 
       $2=yes
6250
 
     fi
6251
 
   fi
6252
 
   $rm conftest*
6253
 
   LDFLAGS="$save_LDFLAGS"
6254
 
])
6255
 
 
6256
 
if test x"[$]$2" = xyes; then
6257
 
    ifelse([$4], , :, [$4])
6258
 
else
6259
 
    ifelse([$5], , :, [$5])
6260
 
fi
6261
 
])# AC_LIBTOOL_LINKER_OPTION
6262
 
 
6263
 
 
6264
 
# AC_LIBTOOL_SYS_MAX_CMD_LEN
6265
 
# --------------------------
6266
 
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6267
 
[# find the maximum length of command line arguments
6268
 
AC_MSG_CHECKING([the maximum length of command line arguments])
6269
 
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6270
 
  i=0
6271
 
  testring="ABCD"
6272
 
 
6273
 
  case $build_os in
6274
 
  msdosdjgpp*)
6275
 
    # On DJGPP, this test can blow up pretty badly due to problems in libc
6276
 
    # (any single argument exceeding 2000 bytes causes a buffer overrun
6277
 
    # during glob expansion).  Even if it were fixed, the result of this
6278
 
    # check would be larger than it should be.
6279
 
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6280
 
    ;;
6281
 
 
6282
 
  gnu*)
6283
 
    # Under GNU Hurd, this test is not required because there is
6284
 
    # no limit to the length of command line arguments.
6285
 
    # Libtool will interpret -1 as no limit whatsoever
6286
 
    lt_cv_sys_max_cmd_len=-1;
6287
 
    ;;
6288
 
 
6289
 
  cygwin* | mingw*)
6290
 
    # On Win9x/ME, this test blows up -- it succeeds, but takes
6291
 
    # about 5 minutes as the teststring grows exponentially.
6292
 
    # Worse, since 9x/ME are not pre-emptively multitasking,
6293
 
    # you end up with a "frozen" computer, even though with patience
6294
 
    # the test eventually succeeds (with a max line length of 256k).
6295
 
    # Instead, let's just punt: use the minimum linelength reported by
6296
 
    # all of the supported platforms: 8192 (on NT/2K/XP).
6297
 
    lt_cv_sys_max_cmd_len=8192;
6298
 
    ;;
6299
 
 
6300
 
 *)
6301
 
    # If test is not a shell built-in, we'll probably end up computing a
6302
 
    # maximum length that is only half of the actual maximum length, but
6303
 
    # we can't tell.
6304
 
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6305
 
               = "XX$testring") >/dev/null 2>&1 &&
6306
 
            new_result=`expr "X$testring" : ".*" 2>&1` &&
6307
 
            lt_cv_sys_max_cmd_len=$new_result &&
6308
 
            test $i != 17 # 1/2 MB should be enough
6309
 
    do
6310
 
      i=`expr $i + 1`
6311
 
      testring=$testring$testring
6312
 
    done
6313
 
    testring=
6314
 
    # Add a significant safety factor because C++ compilers can tack on massive
6315
 
    # amounts of additional arguments before passing them to the linker.
6316
 
    # It appears as though 1/2 is a usable value.
6317
 
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6318
 
    ;;
6319
 
  esac
6320
 
])
6321
 
if test -n $lt_cv_sys_max_cmd_len ; then
6322
 
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6323
 
else
6324
 
  AC_MSG_RESULT(none)
6325
 
fi
6326
 
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6327
 
 
6328
 
 
6329
 
# _LT_AC_CHECK_DLFCN
6330
 
# --------------------
6331
 
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6332
 
[AC_CHECK_HEADERS(dlfcn.h)dnl
6333
 
])# _LT_AC_CHECK_DLFCN
6334
 
 
6335
 
 
6336
 
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6337
 
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6338
 
# ------------------------------------------------------------------
6339
 
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6340
 
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6341
 
if test "$cross_compiling" = yes; then :
6342
 
  [$4]
6343
 
else
6344
 
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6345
 
  lt_status=$lt_dlunknown
6346
 
  cat > conftest.$ac_ext <<EOF
6347
 
[#line __oline__ "configure"
6348
 
#include "confdefs.h"
6349
 
 
6350
 
#if HAVE_DLFCN_H
6351
 
#include <dlfcn.h>
6352
 
#endif
6353
 
 
6354
 
#include <stdio.h>
6355
 
 
6356
 
#ifdef RTLD_GLOBAL
6357
 
#  define LT_DLGLOBAL           RTLD_GLOBAL
6358
 
#else
6359
 
#  ifdef DL_GLOBAL
6360
 
#    define LT_DLGLOBAL         DL_GLOBAL
6361
 
#  else
6362
 
#    define LT_DLGLOBAL         0
6363
 
#  endif
6364
 
#endif
6365
 
 
6366
 
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6367
 
   find out it does not work in some platform. */
6368
 
#ifndef LT_DLLAZY_OR_NOW
6369
 
#  ifdef RTLD_LAZY
6370
 
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6371
 
#  else
6372
 
#    ifdef DL_LAZY
6373
 
#      define LT_DLLAZY_OR_NOW          DL_LAZY
6374
 
#    else
6375
 
#      ifdef RTLD_NOW
6376
 
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
6377
 
#      else
6378
 
#        ifdef DL_NOW
6379
 
#          define LT_DLLAZY_OR_NOW      DL_NOW
6380
 
#        else
6381
 
#          define LT_DLLAZY_OR_NOW      0
6382
 
#        endif
6383
 
#      endif
6384
 
#    endif
6385
 
#  endif
6386
 
#endif
6387
 
 
6388
 
#ifdef __cplusplus
6389
 
extern "C" void exit (int);
6390
 
#endif
6391
 
 
6392
 
void fnord() { int i=42;}
6393
 
int main ()
6394
 
{
6395
 
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6396
 
  int status = $lt_dlunknown;
6397
 
 
6398
 
  if (self)
6399
 
    {
6400
 
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6401
 
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6402
 
      /* dlclose (self); */
6403
 
    }
6404
 
 
6405
 
    exit (status);
6406
 
}]
6407
 
EOF
6408
 
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6409
 
    (./conftest; exit; ) 2>/dev/null
6410
 
    lt_status=$?
6411
 
    case x$lt_status in
6412
 
      x$lt_dlno_uscore) $1 ;;
6413
 
      x$lt_dlneed_uscore) $2 ;;
6414
 
      x$lt_unknown|x*) $3 ;;
6415
 
    esac
6416
 
  else :
6417
 
    # compilation failed
6418
 
    $3
6419
 
  fi
6420
 
fi
6421
 
rm -fr conftest*
6422
 
])# _LT_AC_TRY_DLOPEN_SELF
6423
 
 
6424
 
 
6425
 
# AC_LIBTOOL_DLOPEN_SELF
6426
 
# -------------------
6427
 
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6428
 
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6429
 
if test "x$enable_dlopen" != xyes; then
6430
 
  enable_dlopen=unknown
6431
 
  enable_dlopen_self=unknown
6432
 
  enable_dlopen_self_static=unknown
6433
 
else
6434
 
  lt_cv_dlopen=no
6435
 
  lt_cv_dlopen_libs=
6436
 
 
6437
 
  case $host_os in
6438
 
  beos*)
6439
 
    lt_cv_dlopen="load_add_on"
6440
 
    lt_cv_dlopen_libs=
6441
 
    lt_cv_dlopen_self=yes
6442
 
    ;;
6443
 
 
6444
 
  mingw* | pw32*)
6445
 
    lt_cv_dlopen="LoadLibrary"
6446
 
    lt_cv_dlopen_libs=
6447
 
   ;;
6448
 
 
6449
 
  cygwin*)
6450
 
    lt_cv_dlopen="dlopen"
6451
 
    lt_cv_dlopen_libs=
6452
 
   ;;
6453
 
 
6454
 
  darwin*)
6455
 
  # if libdl is installed we need to link against it
6456
 
    AC_CHECK_LIB([dl], [dlopen],
6457
 
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6458
 
    lt_cv_dlopen="dyld"
6459
 
    lt_cv_dlopen_libs=
6460
 
    lt_cv_dlopen_self=yes
6461
 
    ])
6462
 
   ;;
6463
 
    
6464
 
  *)
6465
 
    AC_CHECK_FUNC([shl_load],
6466
 
          [lt_cv_dlopen="shl_load"],
6467
 
      [AC_CHECK_LIB([dld], [shl_load],
6468
 
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6469
 
        [AC_CHECK_FUNC([dlopen],
6470
 
              [lt_cv_dlopen="dlopen"],
6471
 
          [AC_CHECK_LIB([dl], [dlopen],
6472
 
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6473
 
            [AC_CHECK_LIB([svld], [dlopen],
6474
 
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6475
 
              [AC_CHECK_LIB([dld], [dld_link],
6476
 
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6477
 
              ])
6478
 
            ])
6479
 
          ])
6480
 
        ])
6481
 
      ])
6482
 
    ;;
6483
 
  esac
6484
 
 
6485
 
  if test "x$lt_cv_dlopen" != xno; then
6486
 
    enable_dlopen=yes
6487
 
  else
6488
 
    enable_dlopen=no
6489
 
  fi
6490
 
 
6491
 
  case $lt_cv_dlopen in
6492
 
  dlopen)
6493
 
    save_CPPFLAGS="$CPPFLAGS"
6494
 
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6495
 
 
6496
 
    save_LDFLAGS="$LDFLAGS"
6497
 
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6498
 
 
6499
 
    save_LIBS="$LIBS"
6500
 
    LIBS="$lt_cv_dlopen_libs $LIBS"
6501
 
 
6502
 
    AC_CACHE_CHECK([whether a program can dlopen itself],
6503
 
          lt_cv_dlopen_self, [dnl
6504
 
          _LT_AC_TRY_DLOPEN_SELF(
6505
 
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6506
 
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6507
 
    ])
6508
 
 
6509
 
    if test "x$lt_cv_dlopen_self" = xyes; then
6510
 
      LDFLAGS="$LDFLAGS $link_static_flag"
6511
 
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6512
 
          lt_cv_dlopen_self_static, [dnl
6513
 
          _LT_AC_TRY_DLOPEN_SELF(
6514
 
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6515
 
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
6516
 
      ])
6517
 
    fi
6518
 
 
6519
 
    CPPFLAGS="$save_CPPFLAGS"
6520
 
    LDFLAGS="$save_LDFLAGS"
6521
 
    LIBS="$save_LIBS"
6522
 
    ;;
6523
 
  esac
6524
 
 
6525
 
  case $lt_cv_dlopen_self in
6526
 
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6527
 
  *) enable_dlopen_self=unknown ;;
6528
 
  esac
6529
 
 
6530
 
  case $lt_cv_dlopen_self_static in
6531
 
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6532
 
  *) enable_dlopen_self_static=unknown ;;
6533
 
  esac
6534
 
fi
6535
 
])# AC_LIBTOOL_DLOPEN_SELF
6536
 
 
6537
 
 
6538
 
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6539
 
# ---------------------------------
6540
 
# Check to see if options -c and -o are simultaneously supported by compiler
6541
 
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6542
 
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6543
 
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6544
 
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6545
 
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6546
 
   $rm -r conftest 2>/dev/null
6547
 
   mkdir conftest
6548
 
   cd conftest
6549
 
   mkdir out
6550
 
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6551
 
 
6552
 
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6553
 
   # that will create temporary files in the current directory regardless of
6554
 
   # the output directory.  Thus, making CWD read-only will cause this test
6555
 
   # to fail, enabling locking or at least warning the user not to do parallel
6556
 
   # builds.
6557
 
   chmod -w .
6558
 
 
6559
 
   lt_compiler_flag="-o out/conftest2.$ac_objext"
6560
 
   # Insert the option either (1) after the last *FLAGS variable, or
6561
 
   # (2) before a word containing "conftest.", or (3) at the end.
6562
 
   # Note that $ac_compile itself does not contain backslashes and begins
6563
 
   # with a dollar sign (not a hyphen), so the echo should work correctly.
6564
 
   lt_compile=`echo "$ac_compile" | $SED \
6565
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6566
 
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6567
 
   -e 's:$: $lt_compiler_flag:'`
6568
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6569
 
   (eval "$lt_compile" 2>out/conftest.err)
6570
 
   ac_status=$?
6571
 
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
6572
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6573
 
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
6574
 
   then
6575
 
     # The compiler can only warn and ignore the option if not recognized
6576
 
     # So say no if there are warnings
6577
 
     if test ! -s out/conftest.err; then
6578
 
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6579
 
     fi
6580
 
   fi
6581
 
   chmod u+w .
6582
 
   $rm conftest* out/*
6583
 
   rmdir out
6584
 
   cd ..
6585
 
   rmdir conftest
6586
 
   $rm conftest*
6587
 
])
6588
 
])# AC_LIBTOOL_PROG_CC_C_O
6589
 
 
6590
 
 
6591
 
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6592
 
# -----------------------------------------
6593
 
# Check to see if we can do hard links to lock some files if needed
6594
 
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6595
 
[AC_REQUIRE([_LT_AC_LOCK])dnl
6596
 
 
6597
 
hard_links="nottested"
6598
 
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6599
 
  # do not overwrite the value of need_locks provided by the user
6600
 
  AC_MSG_CHECKING([if we can lock with hard links])
6601
 
  hard_links=yes
6602
 
  $rm conftest*
6603
 
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6604
 
  touch conftest.a
6605
 
  ln conftest.a conftest.b 2>&5 || hard_links=no
6606
 
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6607
 
  AC_MSG_RESULT([$hard_links])
6608
 
  if test "$hard_links" = no; then
6609
 
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6610
 
    need_locks=warn
6611
 
  fi
6612
 
else
6613
 
  need_locks=no
6614
 
fi
6615
 
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6616
 
 
6617
 
 
6618
 
# AC_LIBTOOL_OBJDIR
6619
 
# -----------------
6620
 
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6621
 
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6622
 
[rm -f .libs 2>/dev/null
6623
 
mkdir .libs 2>/dev/null
6624
 
if test -d .libs; then
6625
 
  lt_cv_objdir=.libs
6626
 
else
6627
 
  # MS-DOS does not allow filenames that begin with a dot.
6628
 
  lt_cv_objdir=_libs
6629
 
fi
6630
 
rmdir .libs 2>/dev/null])
6631
 
objdir=$lt_cv_objdir
6632
 
])# AC_LIBTOOL_OBJDIR
6633
 
 
6634
 
 
6635
 
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6636
 
# ----------------------------------------------
6637
 
# Check hardcoding attributes.
6638
 
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6639
 
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6640
 
_LT_AC_TAGVAR(hardcode_action, $1)=
6641
 
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6642
 
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6643
 
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6644
 
 
6645
 
  # We can hardcode non-existant directories.
6646
 
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6647
 
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
6648
 
     # have to relink, otherwise we might link with an installed library
6649
 
     # when we should be linking with a yet-to-be-installed one
6650
 
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6651
 
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6652
 
    # Linking always hardcodes the temporary library directory.
6653
 
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
6654
 
  else
6655
 
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
6656
 
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
6657
 
  fi
6658
 
else
6659
 
  # We cannot hardcode anything, or else we can only hardcode existing
6660
 
  # directories.
6661
 
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6662
 
fi
6663
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6664
 
 
6665
 
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6666
 
  # Fast installation is not supported
6667
 
  enable_fast_install=no
6668
 
elif test "$shlibpath_overrides_runpath" = yes ||
6669
 
     test "$enable_shared" = no; then
6670
 
  # Fast installation is not necessary
6671
 
  enable_fast_install=needless
6672
 
fi
6673
 
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6674
 
 
6675
 
 
6676
 
# AC_LIBTOOL_SYS_LIB_STRIP
6677
 
# ------------------------
6678
 
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6679
 
[striplib=
6680
 
old_striplib=
6681
 
AC_MSG_CHECKING([whether stripping libraries is possible])
6682
 
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6683
 
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6684
 
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6685
 
  AC_MSG_RESULT([yes])
6686
 
else
6687
 
# FIXME - insert some real tests, host_os isn't really good enough
6688
 
  case $host_os in
6689
 
   darwin*)
6690
 
       if test -n "$STRIP" ; then
6691
 
         striplib="$STRIP -x"
6692
 
         AC_MSG_RESULT([yes])
6693
 
       else
6694
 
  AC_MSG_RESULT([no])
6695
 
fi
6696
 
       ;;
6697
 
   *)
6698
 
  AC_MSG_RESULT([no])
6699
 
    ;;
6700
 
  esac  
6701
 
fi
6702
 
])# AC_LIBTOOL_SYS_LIB_STRIP
6703
 
 
6704
 
 
6705
 
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6706
 
# -----------------------------
6707
 
# PORTME Fill in your ld.so characteristics
6708
 
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6709
 
[AC_MSG_CHECKING([dynamic linker characteristics])
6710
 
library_names_spec=
6711
 
libname_spec='lib$name'
6712
 
soname_spec=
6713
 
shrext=".so"
6714
 
postinstall_cmds=
6715
 
postuninstall_cmds=
6716
 
finish_cmds=
6717
 
finish_eval=
6718
 
shlibpath_var=
6719
 
shlibpath_overrides_runpath=unknown
6720
 
version_type=none
6721
 
dynamic_linker="$host_os ld.so"
6722
 
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6723
 
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6724
 
need_lib_prefix=unknown
6725
 
hardcode_into_libs=no
6726
 
 
6727
 
# when you set need_version to no, make sure it does not cause -set_version
6728
 
# flags to be left without arguments
6729
 
need_version=unknown
6730
 
 
6731
 
case $host_os in
6732
 
aix3*)
6733
 
  version_type=linux
6734
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6735
 
  shlibpath_var=LIBPATH
6736
 
 
6737
 
  # AIX 3 has no versioning support, so we append a major version to the name.
6738
 
  soname_spec='${libname}${release}${shared_ext}$major'
6739
 
  ;;
6740
 
 
6741
 
aix4* | aix5*)
6742
 
  version_type=linux
6743
 
  need_lib_prefix=no
6744
 
  need_version=no
6745
 
  hardcode_into_libs=yes
6746
 
  if test "$host_cpu" = ia64; then
6747
 
    # AIX 5 supports IA64
6748
 
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
6749
 
    shlibpath_var=LD_LIBRARY_PATH
6750
 
  else
6751
 
    # With GCC up to 2.95.x, collect2 would create an import file
6752
 
    # for dependence libraries.  The import file would start with
6753
 
    # the line `#! .'.  This would cause the generated library to
6754
 
    # depend on `.', always an invalid library.  This was fixed in
6755
 
    # development snapshots of GCC prior to 3.0.
6756
 
    case $host_os in
6757
 
      aix4 | aix4.[[01]] | aix4.[[01]].*)
6758
 
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6759
 
           echo ' yes '
6760
 
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6761
 
        :
6762
 
      else
6763
 
        can_build_shared=no
6764
 
      fi
6765
 
      ;;
6766
 
    esac
6767
 
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6768
 
    # soname into executable. Probably we can add versioning support to
6769
 
    # collect2, so additional links can be useful in future.
6770
 
    if test "$aix_use_runtimelinking" = yes; then
6771
 
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6772
 
      # instead of lib<name>.a to let people know that these are not
6773
 
      # typical AIX shared libraries.
6774
 
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6775
 
    else
6776
 
      # We preserve .a as extension for shared libraries through AIX4.2
6777
 
      # and later when we are not doing run time linking.
6778
 
      library_names_spec='${libname}${release}.a $libname.a'
6779
 
      soname_spec='${libname}${release}${shared_ext}$major'
6780
 
    fi
6781
 
    shlibpath_var=LIBPATH
6782
 
  fi
6783
 
  ;;
6784
 
 
6785
 
amigaos*)
6786
 
  library_names_spec='$libname.ixlibrary $libname.a'
6787
 
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
6788
 
  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'
6789
 
  ;;
6790
 
 
6791
 
beos*)
6792
 
  library_names_spec='${libname}${shared_ext}'
6793
 
  dynamic_linker="$host_os ld.so"
6794
 
  shlibpath_var=LIBRARY_PATH
6795
 
  ;;
6796
 
 
6797
 
bsdi4*)
6798
 
  version_type=linux
6799
 
  need_version=no
6800
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6801
 
  soname_spec='${libname}${release}${shared_ext}$major'
6802
 
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6803
 
  shlibpath_var=LD_LIBRARY_PATH
6804
 
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6805
 
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6806
 
  # the default ld.so.conf also contains /usr/contrib/lib and
6807
 
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6808
 
  # libtool to hard-code these into programs
6809
 
  ;;
6810
 
 
6811
 
cygwin* | mingw* | pw32*)
6812
 
  version_type=windows
6813
 
  shrext=".dll"
6814
 
  need_version=no
6815
 
  need_lib_prefix=no
6816
 
 
6817
 
  case $GCC,$host_os in
6818
 
  yes,cygwin* | yes,mingw* | yes,pw32*)
6819
 
    library_names_spec='$libname.dll.a'
6820
 
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
6821
 
    postinstall_cmds='base_file=`basename \${file}`~
6822
 
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
6823
 
      dldir=$destdir/`dirname \$dlpath`~
6824
 
      test -d \$dldir || mkdir -p \$dldir~
6825
 
      $install_prog $dir/$dlname \$dldir/$dlname'
6826
 
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6827
 
      dlpath=$dir/\$dldll~
6828
 
       $rm \$dlpath'
6829
 
    shlibpath_overrides_runpath=yes
6830
 
 
6831
 
    case $host_os in
6832
 
    cygwin*)
6833
 
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
6834
 
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6835
 
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
6836
 
      ;;
6837
 
    mingw*)
6838
 
      # MinGW DLLs use traditional 'lib' prefix
6839
 
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6840
 
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6841
 
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
6842
 
        # It is most probably a Windows format PATH printed by
6843
 
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
6844
 
        # path with ; separators, and with drive letters. We can handle the
6845
 
        # drive letters (cygwin fileutils understands them), so leave them,
6846
 
        # especially as we might pass files found there to a mingw objdump,
6847
 
        # which wouldn't understand a cygwinified path. Ahh.
6848
 
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6849
 
      else
6850
 
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
6851
 
      fi
6852
 
      ;;
6853
 
    pw32*)
6854
 
      # pw32 DLLs use 'pw' prefix rather than 'lib'
6855
 
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
6856
 
      ;;
6857
 
    esac
6858
 
    ;;
6859
 
 
6860
 
  *)
6861
 
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6862
 
    ;;
6863
 
  esac
6864
 
  dynamic_linker='Win32 ld.exe'
6865
 
  # FIXME: first we should search . and the directory the executable is in
6866
 
  shlibpath_var=PATH
6867
 
  ;;
6868
 
 
6869
 
darwin* | rhapsody*)
6870
 
  dynamic_linker="$host_os dyld"
6871
 
  version_type=darwin
6872
 
  need_lib_prefix=no
6873
 
  need_version=no
6874
 
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
6875
 
  soname_spec='${libname}${release}${major}$shared_ext'
6876
 
  shlibpath_overrides_runpath=yes
6877
 
  shlibpath_var=DYLD_LIBRARY_PATH
6878
 
  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
6879
 
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
6880
 
  if test "$GCC" = yes; then
6881
 
    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"`
6882
 
  else
6883
 
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
6884
 
  fi
6885
 
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6886
 
  ;;
6887
 
 
6888
 
dgux*)
6889
 
  version_type=linux
6890
 
  need_lib_prefix=no
6891
 
  need_version=no
6892
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
6893
 
  soname_spec='${libname}${release}${shared_ext}$major'
6894
 
  shlibpath_var=LD_LIBRARY_PATH
6895
 
  ;;
6896
 
 
6897
 
freebsd1*)
6898
 
  dynamic_linker=no
6899
 
  ;;
6900
 
 
6901
 
freebsd*-gnu*)
6902
 
  version_type=linux
6903
 
  need_lib_prefix=no
6904
 
  need_version=no
6905
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6906
 
  soname_spec='${libname}${release}${shared_ext}$major'
6907
 
  shlibpath_var=LD_LIBRARY_PATH
6908
 
  shlibpath_overrides_runpath=no
6909
 
  hardcode_into_libs=yes
6910
 
  dynamic_linker='GNU ld.so'
6911
 
  ;;
6912
 
 
6913
 
freebsd*)
6914
 
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6915
 
  version_type=freebsd-$objformat
6916
 
  case $version_type in
6917
 
    freebsd-elf*)
6918
 
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
6919
 
      need_version=no
6920
 
      need_lib_prefix=no
6921
 
      ;;
6922
 
    freebsd-*)
6923
 
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
6924
 
      need_version=yes
6925
 
      ;;
6926
 
  esac
6927
 
  shlibpath_var=LD_LIBRARY_PATH
6928
 
  case $host_os in
6929
 
  freebsd2*)
6930
 
    shlibpath_overrides_runpath=yes
6931
 
    ;;
6932
 
  freebsd3.[01]* | freebsdelf3.[01]*)
6933
 
    shlibpath_overrides_runpath=yes
6934
 
    hardcode_into_libs=yes
6935
 
    ;;
6936
 
  *) # from 3.2 on
6937
 
    shlibpath_overrides_runpath=no
6938
 
    hardcode_into_libs=yes
6939
 
    ;;
6940
 
  esac
6941
 
  ;;
6942
 
 
6943
 
gnu*)
6944
 
  version_type=linux
6945
 
  need_lib_prefix=no
6946
 
  need_version=no
6947
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
6948
 
  soname_spec='${libname}${release}${shared_ext}$major'
6949
 
  shlibpath_var=LD_LIBRARY_PATH
6950
 
  hardcode_into_libs=yes
6951
 
  ;;
6952
 
 
6953
 
hpux9* | hpux10* | hpux11*)
6954
 
  # Give a soname corresponding to the major version so that dld.sl refuses to
6955
 
  # link against other versions.
6956
 
  version_type=sunos
6957
 
  need_lib_prefix=no
6958
 
  need_version=no
6959
 
  case "$host_cpu" in
6960
 
  ia64*)
6961
 
    shrext='.so'
6962
 
    hardcode_into_libs=yes
6963
 
    dynamic_linker="$host_os dld.so"
6964
 
    shlibpath_var=LD_LIBRARY_PATH
6965
 
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6966
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6967
 
    soname_spec='${libname}${release}${shared_ext}$major'
6968
 
    if test "X$HPUX_IA64_MODE" = X32; then
6969
 
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6970
 
    else
6971
 
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6972
 
    fi
6973
 
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6974
 
    ;;
6975
 
   hppa*64*)
6976
 
     shrext='.sl'
6977
 
     hardcode_into_libs=yes
6978
 
     dynamic_linker="$host_os dld.sl"
6979
 
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
6980
 
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
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
 
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
6984
 
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6985
 
     ;;
6986
 
   *)
6987
 
    shrext='.sl'
6988
 
    dynamic_linker="$host_os dld.sl"
6989
 
    shlibpath_var=SHLIB_PATH
6990
 
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6991
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6992
 
    soname_spec='${libname}${release}${shared_ext}$major'
6993
 
    ;;
6994
 
  esac
6995
 
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
6996
 
  postinstall_cmds='chmod 555 $lib'
6997
 
  ;;
6998
 
 
6999
 
irix5* | irix6* | nonstopux*)
7000
 
  case $host_os in
7001
 
    nonstopux*) version_type=nonstopux ;;
7002
 
    *)
7003
 
        if test "$lt_cv_prog_gnu_ld" = yes; then
7004
 
                version_type=linux
7005
 
        else
7006
 
                version_type=irix
7007
 
        fi ;;
7008
 
  esac
7009
 
  need_lib_prefix=no
7010
 
  need_version=no
7011
 
  soname_spec='${libname}${release}${shared_ext}$major'
7012
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7013
 
  case $host_os in
7014
 
  irix5* | nonstopux*)
7015
 
    libsuff= shlibsuff=
7016
 
    ;;
7017
 
  *)
7018
 
    case $LD in # libtool.m4 will add one of these switches to LD
7019
 
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7020
 
      libsuff= shlibsuff= libmagic=32-bit;;
7021
 
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7022
 
      libsuff=32 shlibsuff=N32 libmagic=N32;;
7023
 
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7024
 
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
7025
 
    *) libsuff= shlibsuff= libmagic=never-match;;
7026
 
    esac
7027
 
    ;;
7028
 
  esac
7029
 
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7030
 
  shlibpath_overrides_runpath=no
7031
 
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7032
 
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7033
 
  hardcode_into_libs=yes
7034
 
  ;;
7035
 
 
7036
 
# No shared lib support for Linux oldld, aout, or coff.
7037
 
linux*oldld* | linux*aout* | linux*coff*)
7038
 
  dynamic_linker=no
7039
 
  ;;
7040
 
 
7041
 
# This must be Linux ELF.
7042
 
linux*)
7043
 
  version_type=linux
7044
 
  need_lib_prefix=no
7045
 
  need_version=no
7046
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7047
 
  soname_spec='${libname}${release}${shared_ext}$major'
7048
 
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7049
 
  libsuff=
7050
 
  if test "x$LINUX_64_MODE" = x64; then
7051
 
    # Some platforms are per default 64-bit, so there's no /lib64
7052
 
    if test -d /lib64; then
7053
 
      libsuff=64
7054
 
    fi
7055
 
  fi
7056
 
  shlibpath_var=LD_LIBRARY_PATH
7057
 
  shlibpath_overrides_runpath=no
7058
 
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
7059
 
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
7060
 
  # This implies no fast_install, which is unacceptable.
7061
 
  # Some rework will be needed to allow for fast_install
7062
 
  # before this can be enabled.
7063
 
  hardcode_into_libs=yes
7064
 
 
7065
 
  # We used to test for /lib/ld.so.1 and disable shared libraries on
7066
 
  # powerpc, because MkLinux only supported shared libraries with the
7067
 
  # GNU dynamic linker.  Since this was broken with cross compilers,
7068
 
  # most powerpc-linux boxes support dynamic linking these days and
7069
 
  # people can always --disable-shared, the test was removed, and we
7070
 
  # assume the GNU/Linux dynamic linker is in use.
7071
 
  dynamic_linker='GNU/Linux ld.so'
7072
 
  ;;
7073
 
 
7074
 
netbsd*)
7075
 
  version_type=sunos
7076
 
  need_lib_prefix=no
7077
 
  need_version=no
7078
 
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7079
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7080
 
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7081
 
    dynamic_linker='NetBSD (a.out) ld.so'
7082
 
  else
7083
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
7084
 
    soname_spec='${libname}${release}${shared_ext}$major'
7085
 
    dynamic_linker='NetBSD ld.elf_so'
7086
 
  fi
7087
 
  shlibpath_var=LD_LIBRARY_PATH
7088
 
  shlibpath_overrides_runpath=yes
7089
 
  hardcode_into_libs=yes
7090
 
  ;;
7091
 
 
7092
 
newsos6)
7093
 
  version_type=linux
7094
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7095
 
  shlibpath_var=LD_LIBRARY_PATH
7096
 
  shlibpath_overrides_runpath=yes
7097
 
  ;;
7098
 
 
7099
 
nto-qnx*)
7100
 
  version_type=linux
7101
 
  need_lib_prefix=no
7102
 
  need_version=no
7103
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7104
 
  soname_spec='${libname}${release}${shared_ext}$major'
7105
 
  shlibpath_var=LD_LIBRARY_PATH
7106
 
  shlibpath_overrides_runpath=yes
7107
 
  ;;
7108
 
 
7109
 
openbsd*)
7110
 
  version_type=sunos
7111
 
  need_lib_prefix=no
7112
 
  need_version=no
7113
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7114
 
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7115
 
  shlibpath_var=LD_LIBRARY_PATH
7116
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7117
 
    case $host_os in
7118
 
      openbsd2.[[89]] | openbsd2.[[89]].*)
7119
 
        shlibpath_overrides_runpath=no
7120
 
        ;;
7121
 
      *)
7122
 
        shlibpath_overrides_runpath=yes
7123
 
        ;;
7124
 
      esac
7125
 
  else
7126
 
    shlibpath_overrides_runpath=yes
7127
 
  fi
7128
 
  ;;
7129
 
 
7130
 
os2*)
7131
 
  libname_spec='$name'
7132
 
  shrext=".dll"
7133
 
  need_lib_prefix=no
7134
 
  library_names_spec='$libname${shared_ext} $libname.a'
7135
 
  dynamic_linker='OS/2 ld.exe'
7136
 
  shlibpath_var=LIBPATH
7137
 
  ;;
7138
 
 
7139
 
osf3* | osf4* | osf5*)
7140
 
  version_type=osf
7141
 
  need_lib_prefix=no
7142
 
  need_version=no
7143
 
  soname_spec='${libname}${release}${shared_ext}$major'
7144
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7145
 
  shlibpath_var=LD_LIBRARY_PATH
7146
 
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7147
 
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7148
 
  ;;
7149
 
 
7150
 
sco3.2v5*)
7151
 
  version_type=osf
7152
 
  soname_spec='${libname}${release}${shared_ext}$major'
7153
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7154
 
  shlibpath_var=LD_LIBRARY_PATH
7155
 
  ;;
7156
 
 
7157
 
solaris*)
7158
 
  version_type=linux
7159
 
  need_lib_prefix=no
7160
 
  need_version=no
7161
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7162
 
  soname_spec='${libname}${release}${shared_ext}$major'
7163
 
  shlibpath_var=LD_LIBRARY_PATH
7164
 
  shlibpath_overrides_runpath=yes
7165
 
  hardcode_into_libs=yes
7166
 
  # ldd complains unless libraries are executable
7167
 
  postinstall_cmds='chmod +x $lib'
7168
 
  ;;
7169
 
 
7170
 
sunos4*)
7171
 
  version_type=sunos
7172
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7173
 
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7174
 
  shlibpath_var=LD_LIBRARY_PATH
7175
 
  shlibpath_overrides_runpath=yes
7176
 
  if test "$with_gnu_ld" = yes; then
7177
 
    need_lib_prefix=no
7178
 
  fi
7179
 
  need_version=yes
7180
 
  ;;
7181
 
 
7182
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7183
 
  version_type=linux
7184
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7185
 
  soname_spec='${libname}${release}${shared_ext}$major'
7186
 
  shlibpath_var=LD_LIBRARY_PATH
7187
 
  case $host_vendor in
7188
 
    sni)
7189
 
      shlibpath_overrides_runpath=no
7190
 
      need_lib_prefix=no
7191
 
      export_dynamic_flag_spec='${wl}-Blargedynsym'
7192
 
      runpath_var=LD_RUN_PATH
7193
 
      ;;
7194
 
    siemens)
7195
 
      need_lib_prefix=no
7196
 
      ;;
7197
 
    motorola)
7198
 
      need_lib_prefix=no
7199
 
      need_version=no
7200
 
      shlibpath_overrides_runpath=no
7201
 
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7202
 
      ;;
7203
 
  esac
7204
 
  ;;
7205
 
 
7206
 
sysv4*MP*)
7207
 
  if test -d /usr/nec ;then
7208
 
    version_type=linux
7209
 
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7210
 
    soname_spec='$libname${shared_ext}.$major'
7211
 
    shlibpath_var=LD_LIBRARY_PATH
7212
 
  fi
7213
 
  ;;
7214
 
 
7215
 
uts4*)
7216
 
  version_type=linux
7217
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7218
 
  soname_spec='${libname}${release}${shared_ext}$major'
7219
 
  shlibpath_var=LD_LIBRARY_PATH
7220
 
  ;;
7221
 
 
7222
 
*)
7223
 
  dynamic_linker=no
7224
 
  ;;
7225
 
esac
7226
 
AC_MSG_RESULT([$dynamic_linker])
7227
 
test "$dynamic_linker" = no && can_build_shared=no
7228
 
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7229
 
 
7230
 
 
7231
 
# _LT_AC_TAGCONFIG
7232
 
# ----------------
7233
 
AC_DEFUN([_LT_AC_TAGCONFIG],
7234
 
[AC_ARG_WITH([tags],
7235
 
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7236
 
        [include additional configurations @<:@automatic@:>@])],
7237
 
    [tagnames="$withval"])
7238
 
 
7239
 
if test -f "$ltmain" && test -n "$tagnames"; then
7240
 
  if test ! -f "${ofile}"; then
7241
 
    AC_MSG_WARN([output file `$ofile' does not exist])
7242
 
  fi
7243
 
 
7244
 
  if test -z "$LTCC"; then
7245
 
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7246
 
    if test -z "$LTCC"; then
7247
 
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7248
 
    else
7249
 
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7250
 
    fi
7251
 
  fi
7252
 
 
7253
 
  # Extract list of available tagged configurations in $ofile.
7254
 
  # Note that this assumes the entire list is on one line.
7255
 
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7256
 
 
7257
 
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7258
 
  for tagname in $tagnames; do
7259
 
    IFS="$lt_save_ifs"
7260
 
    # Check whether tagname contains only valid characters
7261
 
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7262
 
    "") ;;
7263
 
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
7264
 
        ;;
7265
 
    esac
7266
 
 
7267
 
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7268
 
    then
7269
 
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
7270
 
    fi
7271
 
 
7272
 
    # Update the list of available tags.
7273
 
    if test -n "$tagname"; then
7274
 
      echo appending configuration tag \"$tagname\" to $ofile
7275
 
 
7276
 
      case $tagname in
7277
 
      CXX)
7278
 
        if test -n "$CXX" && test "X$CXX" != "Xno"; then
7279
 
          AC_LIBTOOL_LANG_CXX_CONFIG
7280
 
        else
7281
 
          tagname=""
7282
 
        fi
7283
 
        ;;
7284
 
 
7285
 
      F77)
7286
 
        if test -n "$F77" && test "X$F77" != "Xno"; then
7287
 
          AC_LIBTOOL_LANG_F77_CONFIG
7288
 
        else
7289
 
          tagname=""
7290
 
        fi
7291
 
        ;;
7292
 
 
7293
 
      GCJ)
7294
 
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7295
 
          AC_LIBTOOL_LANG_GCJ_CONFIG
7296
 
        else
7297
 
          tagname=""
7298
 
        fi
7299
 
        ;;
7300
 
 
7301
 
      RC)
7302
 
        AC_LIBTOOL_LANG_RC_CONFIG
7303
 
        ;;
7304
 
 
7305
 
      *)
7306
 
        AC_MSG_ERROR([Unsupported tag name: $tagname])
7307
 
        ;;
7308
 
      esac
7309
 
 
7310
 
      # Append the new tag name to the list of available tags.
7311
 
      if test -n "$tagname" ; then
7312
 
      available_tags="$available_tags $tagname"
7313
 
    fi
7314
 
    fi
7315
 
  done
7316
 
  IFS="$lt_save_ifs"
7317
 
 
7318
 
  # Now substitute the updated list of available tags.
7319
 
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7320
 
    mv "${ofile}T" "$ofile"
7321
 
    chmod +x "$ofile"
7322
 
  else
7323
 
    rm -f "${ofile}T"
7324
 
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
7325
 
  fi
7326
 
fi
7327
 
])# _LT_AC_TAGCONFIG
7328
 
 
7329
 
 
7330
 
# AC_LIBTOOL_DLOPEN
7331
 
# -----------------
7332
 
# enable checks for dlopen support
7333
 
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7334
 
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7335
 
])# AC_LIBTOOL_DLOPEN
7336
 
 
7337
 
 
7338
 
# AC_LIBTOOL_WIN32_DLL
7339
 
# --------------------
7340
 
# declare package support for building win32 dll's
7341
 
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7342
 
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7343
 
])# AC_LIBTOOL_WIN32_DLL
7344
 
 
7345
 
 
7346
 
# AC_ENABLE_SHARED([DEFAULT])
7347
 
# ---------------------------
7348
 
# implement the --enable-shared flag
7349
 
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7350
 
AC_DEFUN([AC_ENABLE_SHARED],
7351
 
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7352
 
AC_ARG_ENABLE([shared],
7353
 
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7354
 
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7355
 
    [p=${PACKAGE-default}
7356
 
    case $enableval in
7357
 
    yes) enable_shared=yes ;;
7358
 
    no) enable_shared=no ;;
7359
 
    *)
7360
 
      enable_shared=no
7361
 
      # Look at the argument we got.  We use all the common list separators.
7362
 
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7363
 
      for pkg in $enableval; do
7364
 
        IFS="$lt_save_ifs"
7365
 
        if test "X$pkg" = "X$p"; then
7366
 
          enable_shared=yes
7367
 
        fi
7368
 
      done
7369
 
      IFS="$lt_save_ifs"
7370
 
      ;;
7371
 
    esac],
7372
 
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7373
 
])# AC_ENABLE_SHARED
7374
 
 
7375
 
 
7376
 
# AC_DISABLE_SHARED
7377
 
# -----------------
7378
 
#- set the default shared flag to --disable-shared
7379
 
AC_DEFUN([AC_DISABLE_SHARED],
7380
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7381
 
AC_ENABLE_SHARED(no)
7382
 
])# AC_DISABLE_SHARED
7383
 
 
7384
 
 
7385
 
# AC_ENABLE_STATIC([DEFAULT])
7386
 
# ---------------------------
7387
 
# implement the --enable-static flag
7388
 
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7389
 
AC_DEFUN([AC_ENABLE_STATIC],
7390
 
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7391
 
AC_ARG_ENABLE([static],
7392
 
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7393
 
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7394
 
    [p=${PACKAGE-default}
7395
 
    case $enableval in
7396
 
    yes) enable_static=yes ;;
7397
 
    no) enable_static=no ;;
7398
 
    *)
7399
 
     enable_static=no
7400
 
      # Look at the argument we got.  We use all the common list separators.
7401
 
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7402
 
      for pkg in $enableval; do
7403
 
        IFS="$lt_save_ifs"
7404
 
        if test "X$pkg" = "X$p"; then
7405
 
          enable_static=yes
7406
 
        fi
7407
 
      done
7408
 
      IFS="$lt_save_ifs"
7409
 
      ;;
7410
 
    esac],
7411
 
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7412
 
])# AC_ENABLE_STATIC
7413
 
 
7414
 
 
7415
 
# AC_DISABLE_STATIC
7416
 
# -----------------
7417
 
# set the default static flag to --disable-static
7418
 
AC_DEFUN([AC_DISABLE_STATIC],
7419
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7420
 
AC_ENABLE_STATIC(no)
7421
 
])# AC_DISABLE_STATIC
7422
 
 
7423
 
 
7424
 
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7425
 
# ---------------------------------
7426
 
# implement the --enable-fast-install flag
7427
 
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7428
 
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7429
 
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7430
 
AC_ARG_ENABLE([fast-install],
7431
 
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7432
 
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7433
 
    [p=${PACKAGE-default}
7434
 
    case $enableval in
7435
 
    yes) enable_fast_install=yes ;;
7436
 
    no) enable_fast_install=no ;;
7437
 
    *)
7438
 
      enable_fast_install=no
7439
 
      # Look at the argument we got.  We use all the common list separators.
7440
 
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7441
 
      for pkg in $enableval; do
7442
 
        IFS="$lt_save_ifs"
7443
 
        if test "X$pkg" = "X$p"; then
7444
 
          enable_fast_install=yes
7445
 
        fi
7446
 
      done
7447
 
      IFS="$lt_save_ifs"
7448
 
      ;;
7449
 
    esac],
7450
 
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7451
 
])# AC_ENABLE_FAST_INSTALL
7452
 
 
7453
 
 
7454
 
# AC_DISABLE_FAST_INSTALL
7455
 
# -----------------------
7456
 
# set the default to --disable-fast-install
7457
 
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7458
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7459
 
AC_ENABLE_FAST_INSTALL(no)
7460
 
])# AC_DISABLE_FAST_INSTALL
7461
 
 
7462
 
 
7463
 
# AC_LIBTOOL_PICMODE([MODE])
7464
 
# --------------------------
7465
 
# implement the --with-pic flag
7466
 
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7467
 
AC_DEFUN([AC_LIBTOOL_PICMODE],
7468
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7469
 
pic_mode=ifelse($#,1,$1,default)
7470
 
])# AC_LIBTOOL_PICMODE
7471
 
 
7472
 
 
7473
 
# AC_PROG_EGREP
7474
 
# -------------
7475
 
# This is predefined starting with Autoconf 2.54, so this conditional
7476
 
# definition can be removed once we require Autoconf 2.54 or later.
7477
 
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7478
 
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7479
 
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7480
 
    then ac_cv_prog_egrep='grep -E'
7481
 
    else ac_cv_prog_egrep='egrep'
7482
 
    fi])
7483
 
 EGREP=$ac_cv_prog_egrep
7484
 
 AC_SUBST([EGREP])
7485
 
])])
7486
 
 
7487
 
 
7488
 
# AC_PATH_TOOL_PREFIX
7489
 
# -------------------
7490
 
# find a file program which can recognise shared library
7491
 
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7492
 
[AC_REQUIRE([AC_PROG_EGREP])dnl
7493
 
AC_MSG_CHECKING([for $1])
7494
 
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7495
 
[case $MAGIC_CMD in
7496
 
[[\\/*] |  ?:[\\/]*])
7497
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7498
 
  ;;
7499
 
*)
7500
 
  lt_save_MAGIC_CMD="$MAGIC_CMD"
7501
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7502
 
dnl $ac_dummy forces splitting on constant user-supplied paths.
7503
 
dnl POSIX.2 word splitting is done only on the output of word expansions,
7504
 
dnl not every word.  This closes a longstanding sh security hole.
7505
 
  ac_dummy="ifelse([$2], , $PATH, [$2])"
7506
 
  for ac_dir in $ac_dummy; do
7507
 
    IFS="$lt_save_ifs"
7508
 
    test -z "$ac_dir" && ac_dir=.
7509
 
    if test -f $ac_dir/$1; then
7510
 
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7511
 
      if test -n "$file_magic_test_file"; then
7512
 
        case $deplibs_check_method in
7513
 
        "file_magic "*)
7514
 
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7515
 
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7516
 
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7517
 
            $EGREP "$file_magic_regex" > /dev/null; then
7518
 
            :
7519
 
          else
7520
 
            cat <<EOF 1>&2
7521
 
 
7522
 
*** Warning: the command libtool uses to detect shared libraries,
7523
 
*** $file_magic_cmd, produces output that libtool cannot recognize.
7524
 
*** The result is that libtool may fail to recognize shared libraries
7525
 
*** as such.  This will affect the creation of libtool libraries that
7526
 
*** depend on shared libraries, but programs linked with such libtool
7527
 
*** libraries will work regardless of this problem.  Nevertheless, you
7528
 
*** may want to report the problem to your system manager and/or to
7529
 
*** bug-libtool@gnu.org
7530
 
 
7531
 
EOF
7532
 
          fi ;;
7533
 
        esac
7534
 
      fi
7535
 
      break
7536
 
    fi
7537
 
  done
7538
 
  IFS="$lt_save_ifs"
7539
 
  MAGIC_CMD="$lt_save_MAGIC_CMD"
7540
 
  ;;
7541
 
esac])
7542
 
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7543
 
if test -n "$MAGIC_CMD"; then
7544
 
  AC_MSG_RESULT($MAGIC_CMD)
7545
 
else
7546
 
  AC_MSG_RESULT(no)
7547
 
fi
7548
 
])# AC_PATH_TOOL_PREFIX
7549
 
 
7550
 
 
7551
 
# AC_PATH_MAGIC
7552
 
# -------------
7553
 
# find a file program which can recognise a shared library
7554
 
AC_DEFUN([AC_PATH_MAGIC],
7555
 
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7556
 
if test -z "$lt_cv_path_MAGIC_CMD"; then
7557
 
  if test -n "$ac_tool_prefix"; then
7558
 
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7559
 
  else
7560
 
    MAGIC_CMD=:
7561
 
  fi
7562
 
fi
7563
 
])# AC_PATH_MAGIC
7564
 
 
7565
 
 
7566
 
# AC_PROG_LD
7567
 
# ----------
7568
 
# find the pathname to the GNU or non-GNU linker
7569
 
AC_DEFUN([AC_PROG_LD],
7570
 
[AC_ARG_WITH([gnu-ld],
7571
 
    [AC_HELP_STRING([--with-gnu-ld],
7572
 
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
7573
 
    [test "$withval" = no || with_gnu_ld=yes],
7574
 
    [with_gnu_ld=no])
7575
 
AC_REQUIRE([LT_AC_PROG_SED])dnl
7576
 
AC_REQUIRE([AC_PROG_CC])dnl
7577
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7578
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7579
 
ac_prog=ld
7580
 
if test "$GCC" = yes; then
7581
 
  # Check if gcc -print-prog-name=ld gives a path.
7582
 
  AC_MSG_CHECKING([for ld used by $CC])
7583
 
  case $host in
7584
 
  *-*-mingw*)
7585
 
    # gcc leaves a trailing carriage return which upsets mingw
7586
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7587
 
  *)
7588
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7589
 
  esac
7590
 
  case $ac_prog in
7591
 
    # Accept absolute paths.
7592
 
    [[\\/]]* | ?:[[\\/]]*)
7593
 
      re_direlt='/[[^/]][[^/]]*/\.\./'
7594
 
      # Canonicalize the pathname of ld
7595
 
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7596
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7597
 
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7598
 
      done
7599
 
      test -z "$LD" && LD="$ac_prog"
7600
 
      ;;
7601
 
  "")
7602
 
    # If it fails, then pretend we aren't using GCC.
7603
 
    ac_prog=ld
7604
 
    ;;
7605
 
  *)
7606
 
    # If it is relative, then search for the first ld in PATH.
7607
 
    with_gnu_ld=unknown
7608
 
    ;;
7609
 
  esac
7610
 
elif test "$with_gnu_ld" = yes; then
7611
 
  AC_MSG_CHECKING([for GNU ld])
7612
 
else
7613
 
  AC_MSG_CHECKING([for non-GNU ld])
7614
 
fi
7615
 
AC_CACHE_VAL(lt_cv_path_LD,
7616
 
[if test -z "$LD"; then
7617
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7618
 
  for ac_dir in $PATH; do
7619
 
    IFS="$lt_save_ifs"
7620
 
    test -z "$ac_dir" && ac_dir=.
7621
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7622
 
      lt_cv_path_LD="$ac_dir/$ac_prog"
7623
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
7624
 
      # but apparently some GNU ld's only accept -v.
7625
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
7626
 
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7627
 
      *GNU* | *'with BFD'*)
7628
 
        test "$with_gnu_ld" != no && break
7629
 
        ;;
7630
 
      *)
7631
 
        test "$with_gnu_ld" != yes && break
7632
 
        ;;
7633
 
      esac
7634
 
    fi
7635
 
  done
7636
 
  IFS="$lt_save_ifs"
7637
 
else
7638
 
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
7639
 
fi])
7640
 
LD="$lt_cv_path_LD"
7641
 
if test -n "$LD"; then
7642
 
  AC_MSG_RESULT($LD)
7643
 
else
7644
 
  AC_MSG_RESULT(no)
7645
 
fi
7646
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7647
 
AC_PROG_LD_GNU
7648
 
])# AC_PROG_LD
7649
 
 
7650
 
 
7651
 
# AC_PROG_LD_GNU
7652
 
# --------------
7653
 
AC_DEFUN([AC_PROG_LD_GNU],
7654
 
[AC_REQUIRE([AC_PROG_EGREP])dnl
7655
 
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7656
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7657
 
case `$LD -v 2>&1 </dev/null` in
7658
 
*GNU* | *'with BFD'*)
7659
 
  lt_cv_prog_gnu_ld=yes
7660
 
  ;;
7661
 
*)
7662
 
  lt_cv_prog_gnu_ld=no
7663
 
  ;;
7664
 
esac])
7665
 
with_gnu_ld=$lt_cv_prog_gnu_ld
7666
 
])# AC_PROG_LD_GNU
7667
 
 
7668
 
 
7669
 
# AC_PROG_LD_RELOAD_FLAG
7670
 
# ----------------------
7671
 
# find reload flag for linker
7672
 
#   -- PORTME Some linkers may need a different reload flag.
7673
 
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7674
 
[AC_CACHE_CHECK([for $LD option to reload object files],
7675
 
  lt_cv_ld_reload_flag,
7676
 
  [lt_cv_ld_reload_flag='-r'])
7677
 
reload_flag=$lt_cv_ld_reload_flag
7678
 
case $reload_flag in
7679
 
"" | " "*) ;;
7680
 
*) reload_flag=" $reload_flag" ;;
7681
 
esac
7682
 
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7683
 
])# AC_PROG_LD_RELOAD_FLAG
7684
 
 
7685
 
 
7686
 
# AC_DEPLIBS_CHECK_METHOD
7687
 
# -----------------------
7688
 
# how to check for library dependencies
7689
 
#  -- PORTME fill in with the dynamic library characteristics
7690
 
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7691
 
[AC_CACHE_CHECK([how to recognise dependent libraries],
7692
 
lt_cv_deplibs_check_method,
7693
 
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7694
 
lt_cv_file_magic_test_file=
7695
 
lt_cv_deplibs_check_method='unknown'
7696
 
# Need to set the preceding variable on all platforms that support
7697
 
# interlibrary dependencies.
7698
 
# 'none' -- dependencies not supported.
7699
 
# `unknown' -- same as none, but documents that we really don't know.
7700
 
# 'pass_all' -- all dependencies passed with no checks.
7701
 
# 'test_compile' -- check by making test program.
7702
 
# 'file_magic [[regex]]' -- check by looking for files in library path
7703
 
# which responds to the $file_magic_cmd with a given extended regex.
7704
 
# If you have `file' or equivalent on your system and you're not sure
7705
 
# whether `pass_all' will *always* work, you probably want this one.
7706
 
 
7707
 
case $host_os in
7708
 
aix4* | aix5*)
7709
 
  lt_cv_deplibs_check_method=pass_all
7710
 
  ;;
7711
 
 
7712
 
beos*)
7713
 
  lt_cv_deplibs_check_method=pass_all
7714
 
  ;;
7715
 
 
7716
 
bsdi4*)
7717
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7718
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
7719
 
  lt_cv_file_magic_test_file=/shlib/libc.so
7720
 
  ;;
7721
 
 
7722
 
cygwin* | mingw* | pw32*)
7723
 
  # win32_libid is a shell function defined in ltmain.sh
7724
 
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7725
 
  lt_cv_file_magic_cmd='win32_libid'
7726
 
  ;;
7727
 
 
7728
 
darwin* | rhapsody*)
7729
 
  # this will be overwritten by pass_all, but leave it in just in case
7730
 
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7731
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
7732
 
  case "$host_os" in
7733
 
  rhapsody* | darwin1.[[012]])
7734
 
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7735
 
    ;;
7736
 
  *) # Darwin 1.3 on
7737
 
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7738
 
    ;;
7739
 
  esac
7740
 
  lt_cv_deplibs_check_method=pass_all
7741
 
  ;;
7742
 
 
7743
 
freebsd*)
7744
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7745
 
    case $host_cpu in
7746
 
    i*86 )
7747
 
      # Not sure whether the presence of OpenBSD here was a mistake.
7748
 
      # Let's accept both of them until this is cleared up.
7749
 
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7750
 
      lt_cv_file_magic_cmd=/usr/bin/file
7751
 
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7752
 
      ;;
7753
 
    esac
7754
 
  else
7755
 
    lt_cv_deplibs_check_method=pass_all
7756
 
  fi
7757
 
  ;;
7758
 
 
7759
 
gnu*)
7760
 
  lt_cv_deplibs_check_method=pass_all
7761
 
  ;;
7762
 
 
7763
 
hpux10.20* | hpux11*)
7764
 
  lt_cv_file_magic_cmd=/usr/bin/file
7765
 
  case "$host_cpu" in
7766
 
  ia64*)
7767
 
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7768
 
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7769
 
    ;;
7770
 
  hppa*64*)
7771
 
    [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]']
7772
 
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7773
 
    ;;
7774
 
  *)
7775
 
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7776
 
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7777
 
    ;;
7778
 
  esac
7779
 
  ;;
7780
 
 
7781
 
irix5* | irix6* | nonstopux*)
7782
 
  case $host_os in
7783
 
  irix5* | nonstopux*)
7784
 
    # this will be overridden with pass_all, but let us keep it just in case
7785
 
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7786
 
    ;;
7787
 
  *)
7788
 
    case $LD in
7789
 
    *-32|*"-32 ") libmagic=32-bit;;
7790
 
    *-n32|*"-n32 ") libmagic=N32;;
7791
 
    *-64|*"-64 ") libmagic=64-bit;;
7792
 
    *) libmagic=never-match;;
7793
 
    esac
7794
 
    # this will be overridden with pass_all, but let us keep it just in case
7795
 
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7796
 
    ;;
7797
 
  esac
7798
 
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7799
 
  lt_cv_deplibs_check_method=pass_all
7800
 
  ;;
7801
 
 
7802
 
# This must be Linux ELF.
7803
 
linux*)
7804
 
  case $host_cpu in
7805
 
  alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
7806
 
    lt_cv_deplibs_check_method=pass_all ;;
7807
 
  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
7808
 
  arm* )
7809
 
    lt_cv_deplibs_check_method=pass_all ;;
7810
 
  *)
7811
 
    # glibc up to 2.1.1 does not perform some relocations on ARM
7812
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7813
 
  esac
7814
 
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7815
 
  ;;
7816
 
 
7817
 
netbsd*)
7818
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7819
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7820
 
  else
7821
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7822
 
  fi
7823
 
  ;;
7824
 
 
7825
 
newos6*)
7826
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7827
 
  lt_cv_file_magic_cmd=/usr/bin/file
7828
 
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7829
 
  ;;
7830
 
 
7831
 
nto-qnx*)
7832
 
  lt_cv_deplibs_check_method=unknown
7833
 
  ;;
7834
 
 
7835
 
openbsd*)
7836
 
  lt_cv_file_magic_cmd=/usr/bin/file
7837
 
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7838
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7839
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7840
 
  else
7841
 
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7842
 
  fi
7843
 
  ;;
7844
 
 
7845
 
osf3* | osf4* | osf5*)
7846
 
  # this will be overridden with pass_all, but let us keep it just in case
7847
 
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7848
 
  lt_cv_file_magic_test_file=/shlib/libc.so
7849
 
  lt_cv_deplibs_check_method=pass_all
7850
 
  ;;
7851
 
 
7852
 
sco3.2v5*)
7853
 
  lt_cv_deplibs_check_method=pass_all
7854
 
  ;;
7855
 
 
7856
 
solaris*)
7857
 
  lt_cv_deplibs_check_method=pass_all
7858
 
  lt_cv_file_magic_test_file=/lib/libc.so
7859
 
  ;;
7860
 
 
7861
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7862
 
  case $host_vendor in
7863
 
  motorola)
7864
 
    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]]'
7865
 
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7866
 
    ;;
7867
 
  ncr)
7868
 
    lt_cv_deplibs_check_method=pass_all
7869
 
    ;;
7870
 
  sequent)
7871
 
    lt_cv_file_magic_cmd='/bin/file'
7872
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7873
 
    ;;
7874
 
  sni)
7875
 
    lt_cv_file_magic_cmd='/bin/file'
7876
 
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7877
 
    lt_cv_file_magic_test_file=/lib/libc.so
7878
 
    ;;
7879
 
  siemens)
7880
 
    lt_cv_deplibs_check_method=pass_all
7881
 
    ;;
7882
 
  esac
7883
 
  ;;
7884
 
 
7885
 
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7886
 
  lt_cv_deplibs_check_method=pass_all
7887
 
  ;;
7888
 
esac
7889
 
])
7890
 
file_magic_cmd=$lt_cv_file_magic_cmd
7891
 
deplibs_check_method=$lt_cv_deplibs_check_method
7892
 
test -z "$deplibs_check_method" && deplibs_check_method=unknown
7893
 
])# AC_DEPLIBS_CHECK_METHOD
7894
 
 
7895
 
 
7896
 
# AC_PROG_NM
7897
 
# ----------
7898
 
# find the pathname to a BSD-compatible name lister
7899
 
AC_DEFUN([AC_PROG_NM],
7900
 
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7901
 
[if test -n "$NM"; then
7902
 
  # Let the user override the test.
7903
 
  lt_cv_path_NM="$NM"
7904
 
else
7905
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7906
 
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7907
 
    IFS="$lt_save_ifs"
7908
 
    test -z "$ac_dir" && ac_dir=.
7909
 
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7910
 
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7911
 
      # Check to see if the nm accepts a BSD-compat flag.
7912
 
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
7913
 
      #   nm: unknown option "B" ignored
7914
 
      # Tru64's nm complains that /dev/null is an invalid object file
7915
 
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
7916
 
      */dev/null* | *'Invalid file or object type'*)
7917
 
        lt_cv_path_NM="$tmp_nm -B"
7918
 
        break
7919
 
        ;;
7920
 
      *)
7921
 
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7922
 
        */dev/null*)
7923
 
          lt_cv_path_NM="$tmp_nm -p"
7924
 
          break
7925
 
          ;;
7926
 
        *)
7927
 
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7928
 
          continue # so that we can try to find one that supports BSD flags
7929
 
          ;;
7930
 
        esac
7931
 
      esac
7932
 
    fi
7933
 
  done
7934
 
  IFS="$lt_save_ifs"
7935
 
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7936
 
fi])
7937
 
NM="$lt_cv_path_NM"
7938
 
])# AC_PROG_NM
7939
 
 
7940
 
 
7941
 
# AC_CHECK_LIBM
7942
 
# -------------
7943
 
# check for math library
7944
 
AC_DEFUN([AC_CHECK_LIBM],
7945
 
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7946
 
LIBM=
7947
 
case $host in
7948
 
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
7949
 
  # These system don't have libm, or don't need it
7950
 
  ;;
7951
 
*-ncr-sysv4.3*)
7952
 
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7953
 
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
7954
 
  ;;
7955
 
*)
7956
 
  AC_CHECK_LIB(m, cos, LIBM="-lm")
7957
 
  ;;
7958
 
esac
7959
 
])# AC_CHECK_LIBM
7960
 
 
7961
 
 
7962
 
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
7963
 
# -----------------------------------
7964
 
# sets LIBLTDL to the link flags for the libltdl convenience library and
7965
 
# LTDLINCL to the include flags for the libltdl header and adds
7966
 
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
7967
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
7968
 
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
7969
 
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
7970
 
# '${top_srcdir}/' (note the single quotes!).  If your package is not
7971
 
# flat and you're not using automake, define top_builddir and
7972
 
# top_srcdir appropriately in the Makefiles.
7973
 
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
7974
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7975
 
  case $enable_ltdl_convenience in
7976
 
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7977
 
  "") enable_ltdl_convenience=yes
7978
 
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7979
 
  esac
7980
 
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
7981
 
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7982
 
  # For backwards non-gettext consistent compatibility...
7983
 
  INCLTDL="$LTDLINCL"
7984
 
])# AC_LIBLTDL_CONVENIENCE
7985
 
 
7986
 
 
7987
 
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7988
 
# -----------------------------------
7989
 
# sets LIBLTDL to the link flags for the libltdl installable library and
7990
 
# LTDLINCL to the include flags for the libltdl header and adds
7991
 
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
7992
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
7993
 
# DIRECTORY is not provided and an installed libltdl is not found, it is
7994
 
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
7995
 
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7996
 
# quotes!).  If your package is not flat and you're not using automake,
7997
 
# define top_builddir and top_srcdir appropriately in the Makefiles.
7998
 
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7999
 
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
8000
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8001
 
  AC_CHECK_LIB(ltdl, lt_dlinit,
8002
 
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8003
 
  [if test x"$enable_ltdl_install" = xno; then
8004
 
     AC_MSG_WARN([libltdl not installed, but installation disabled])
8005
 
   else
8006
 
     enable_ltdl_install=yes
8007
 
   fi
8008
 
  ])
8009
 
  if test x"$enable_ltdl_install" = x"yes"; then
8010
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
8011
 
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8012
 
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8013
 
  else
8014
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8015
 
    LIBLTDL="-lltdl"
8016
 
    LTDLINCL=
8017
 
  fi
8018
 
  # For backwards non-gettext consistent compatibility...
8019
 
  INCLTDL="$LTDLINCL"
8020
 
])# AC_LIBLTDL_INSTALLABLE
8021
 
 
8022
 
 
8023
 
# AC_LIBTOOL_CXX
8024
 
# --------------
8025
 
# enable support for C++ libraries
8026
 
AC_DEFUN([AC_LIBTOOL_CXX],
8027
 
[AC_REQUIRE([_LT_AC_LANG_CXX])
8028
 
])# AC_LIBTOOL_CXX
8029
 
 
8030
 
 
8031
 
# _LT_AC_LANG_CXX
8032
 
# ---------------
8033
 
AC_DEFUN([_LT_AC_LANG_CXX],
8034
 
[AC_REQUIRE([AC_PROG_CXX])
8035
 
AC_REQUIRE([AC_PROG_CXXCPP])
8036
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8037
 
])# _LT_AC_LANG_CXX
8038
 
 
8039
 
 
8040
 
# AC_LIBTOOL_F77
8041
 
# --------------
8042
 
# enable support for Fortran 77 libraries
8043
 
AC_DEFUN([AC_LIBTOOL_F77],
8044
 
[AC_REQUIRE([_LT_AC_LANG_F77])
8045
 
])# AC_LIBTOOL_F77
8046
 
 
8047
 
 
8048
 
# _LT_AC_LANG_F77
8049
 
# ---------------
8050
 
AC_DEFUN([_LT_AC_LANG_F77],
8051
 
[AC_REQUIRE([AC_PROG_F77])
8052
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8053
 
])# _LT_AC_LANG_F77
8054
 
 
8055
 
 
8056
 
# AC_LIBTOOL_GCJ
8057
 
# --------------
8058
 
# enable support for GCJ libraries
8059
 
AC_DEFUN([AC_LIBTOOL_GCJ],
8060
 
[AC_REQUIRE([_LT_AC_LANG_GCJ])
8061
 
])# AC_LIBTOOL_GCJ
8062
 
 
8063
 
 
8064
 
# _LT_AC_LANG_GCJ
8065
 
# ---------------
8066
 
AC_DEFUN([_LT_AC_LANG_GCJ],
8067
 
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8068
 
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8069
 
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8070
 
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8071
 
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8072
 
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8073
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8074
 
])# _LT_AC_LANG_GCJ
8075
 
 
8076
 
 
8077
 
# AC_LIBTOOL_RC
8078
 
# --------------
8079
 
# enable support for Windows resource files
8080
 
AC_DEFUN([AC_LIBTOOL_RC],
8081
 
[AC_REQUIRE([LT_AC_PROG_RC])
8082
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8083
 
])# AC_LIBTOOL_RC
8084
 
 
8085
 
 
8086
 
# AC_LIBTOOL_LANG_C_CONFIG
8087
 
# ------------------------
8088
 
# Ensure that the configuration vars for the C compiler are
8089
 
# suitably defined.  Those variables are subsequently used by
8090
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8091
 
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8092
 
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
8093
 
[lt_save_CC="$CC"
8094
 
AC_LANG_PUSH(C)
8095
 
 
8096
 
# Source file extension for C test sources.
8097
 
ac_ext=c
8098
 
 
8099
 
# Object file extension for compiled C test sources.
8100
 
objext=o
8101
 
_LT_AC_TAGVAR(objext, $1)=$objext
8102
 
 
8103
 
# Code to be used in simple compile tests
8104
 
lt_simple_compile_test_code="int some_variable = 0;\n"
8105
 
 
8106
 
# Code to be used in simple link tests
8107
 
lt_simple_link_test_code='int main(){return(0);}\n'
8108
 
 
8109
 
_LT_AC_SYS_COMPILER
8110
 
 
8111
 
#
8112
 
# Check for any special shared library compilation flags.
8113
 
#
8114
 
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
8115
 
if test "$GCC" = no; then
8116
 
  case $host_os in
8117
 
  sco3.2v5*)
8118
 
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
8119
 
    ;;
8120
 
  esac
8121
 
fi
8122
 
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
8123
 
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
8124
 
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
8125
 
  else
8126
 
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
8127
 
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
8128
 
  fi
8129
 
fi
8130
 
 
8131
 
 
8132
 
#
8133
 
# Check to make sure the static flag actually works.
8134
 
#
8135
 
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
8136
 
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
8137
 
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
8138
 
  [],
8139
 
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
8140
 
 
8141
 
 
8142
 
## CAVEAT EMPTOR:
8143
 
## There is no encapsulation within the following macros, do not change
8144
 
## the running order or otherwise move them around unless you know exactly
8145
 
## what you are doing...
8146
 
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8147
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8148
 
AC_LIBTOOL_PROG_CC_C_O($1)
8149
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8150
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8151
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8152
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8153
 
AC_LIBTOOL_SYS_LIB_STRIP
8154
 
AC_LIBTOOL_DLOPEN_SELF($1)
8155
 
 
8156
 
# Report which librarie types wil actually be built
8157
 
AC_MSG_CHECKING([if libtool supports shared libraries])
8158
 
AC_MSG_RESULT([$can_build_shared])
8159
 
 
8160
 
AC_MSG_CHECKING([whether to build shared libraries])
8161
 
test "$can_build_shared" = "no" && enable_shared=no
8162
 
 
8163
 
# On AIX, shared libraries and static libraries use the same namespace, and
8164
 
# are all built from PIC.
8165
 
case "$host_os" in
8166
 
aix3*)
8167
 
  test "$enable_shared" = yes && enable_static=no
8168
 
  if test -n "$RANLIB"; then
8169
 
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
8170
 
    postinstall_cmds='$RANLIB $lib'
8171
 
  fi
8172
 
  ;;
8173
 
 
8174
 
aix4*)
8175
 
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8176
 
    test "$enable_shared" = yes && enable_static=no
8177
 
  fi
8178
 
  ;;
8179
 
  darwin* | rhapsody*)
8180
 
  if test "$GCC" = yes; then
8181
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8182
 
    case "$host_os" in
8183
 
    rhapsody* | darwin1.[[012]])
8184
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
8185
 
      ;;
8186
 
    *) # Darwin 1.3 on
8187
 
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
8188
 
      ;;
8189
 
    esac
8190
 
    output_verbose_link_cmd='echo'
8191
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
8192
 
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8193
 
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8194
 
    _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}'
8195
 
    _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}'
8196
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
8197
 
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8198
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8199
 
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8200
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8201
 
  else
8202
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8203
 
  fi  
8204
 
    ;;  
8205
 
esac
8206
 
AC_MSG_RESULT([$enable_shared])
8207
 
 
8208
 
AC_MSG_CHECKING([whether to build static libraries])
8209
 
# Make sure either enable_shared or enable_static is yes.
8210
 
test "$enable_shared" = yes || enable_static=yes
8211
 
AC_MSG_RESULT([$enable_static])
8212
 
 
8213
 
AC_LIBTOOL_CONFIG($1)
8214
 
 
8215
 
AC_LANG_POP
8216
 
CC="$lt_save_CC"
8217
 
])# AC_LIBTOOL_LANG_C_CONFIG
8218
 
 
8219
 
 
8220
 
# AC_LIBTOOL_LANG_CXX_CONFIG
8221
 
# --------------------------
8222
 
# Ensure that the configuration vars for the C compiler are
8223
 
# suitably defined.  Those variables are subsequently used by
8224
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8225
 
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8226
 
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
8227
 
[AC_LANG_PUSH(C++)
8228
 
AC_REQUIRE([AC_PROG_CXX])
8229
 
AC_REQUIRE([AC_PROG_CXXCPP])
8230
 
 
8231
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8232
 
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8233
 
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8234
 
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8235
 
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8236
 
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8237
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8238
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8239
 
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8240
 
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8241
 
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8242
 
_LT_AC_TAGVAR(module_cmds, $1)=
8243
 
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8244
 
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8245
 
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8246
 
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8247
 
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8248
 
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8249
 
 
8250
 
# Dependencies to place before and after the object being linked:
8251
 
_LT_AC_TAGVAR(predep_objects, $1)=
8252
 
_LT_AC_TAGVAR(postdep_objects, $1)=
8253
 
_LT_AC_TAGVAR(predeps, $1)=
8254
 
_LT_AC_TAGVAR(postdeps, $1)=
8255
 
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8256
 
 
8257
 
# Source file extension for C++ test sources.
8258
 
ac_ext=cc
8259
 
 
8260
 
# Object file extension for compiled C++ test sources.
8261
 
objext=o
8262
 
_LT_AC_TAGVAR(objext, $1)=$objext
8263
 
 
8264
 
# Code to be used in simple compile tests
8265
 
lt_simple_compile_test_code="int some_variable = 0;\n"
8266
 
 
8267
 
# Code to be used in simple link tests
8268
 
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
8269
 
 
8270
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8271
 
_LT_AC_SYS_COMPILER
8272
 
 
8273
 
# Allow CC to be a program name with arguments.
8274
 
lt_save_CC=$CC
8275
 
lt_save_LD=$LD
8276
 
lt_save_GCC=$GCC
8277
 
GCC=$GXX
8278
 
lt_save_with_gnu_ld=$with_gnu_ld
8279
 
lt_save_path_LD=$lt_cv_path_LD
8280
 
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8281
 
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8282
 
else
8283
 
  unset lt_cv_prog_gnu_ld
8284
 
fi
8285
 
if test -n "${lt_cv_path_LDCXX+set}"; then
8286
 
  lt_cv_path_LD=$lt_cv_path_LDCXX
8287
 
else
8288
 
  unset lt_cv_path_LD
8289
 
fi
8290
 
test -z "${LDCXX+set}" || LD=$LDCXX
8291
 
CC=${CXX-"c++"}
8292
 
compiler=$CC
8293
 
_LT_AC_TAGVAR(compiler, $1)=$CC
8294
 
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8295
 
 
8296
 
# We don't want -fno-exception wen compiling C++ code, so set the
8297
 
# no_builtin_flag separately
8298
 
if test "$GXX" = yes; then
8299
 
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8300
 
else
8301
 
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8302
 
fi
8303
 
 
8304
 
if test "$GXX" = yes; then
8305
 
  # Set up default GNU C++ configuration
8306
 
 
8307
 
  AC_PROG_LD
8308
 
 
8309
 
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
8310
 
  # archiving commands below assume that GNU ld is being used.
8311
 
  if test "$with_gnu_ld" = yes; then
8312
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8313
 
    _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'
8314
 
 
8315
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8316
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8317
 
 
8318
 
    # If archive_cmds runs LD, not CC, wlarc should be empty
8319
 
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8320
 
    #     investigate it a little bit more. (MM)
8321
 
    wlarc='${wl}'
8322
 
 
8323
 
    # ancient GNU ld didn't support --whole-archive et. al.
8324
 
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8325
 
        grep 'no-whole-archive' > /dev/null; then
8326
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8327
 
    else
8328
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8329
 
    fi
8330
 
  else
8331
 
    with_gnu_ld=no
8332
 
    wlarc=
8333
 
 
8334
 
    # A generic and very simple default shared library creation
8335
 
    # command for GNU C++ for the case where it uses the native
8336
 
    # linker, instead of GNU ld.  If possible, this setting should
8337
 
    # overridden to take advantage of the native linker features on
8338
 
    # the platform it is being used on.
8339
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8340
 
  fi
8341
 
 
8342
 
  # Commands to make compiler produce verbose output that lists
8343
 
  # what "hidden" libraries, object files and flags are used when
8344
 
  # linking a shared library.
8345
 
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8346
 
 
8347
 
else
8348
 
  GXX=no
8349
 
  with_gnu_ld=no
8350
 
  wlarc=
8351
 
fi
8352
 
 
8353
 
# PORTME: fill in a description of your system's C++ link characteristics
8354
 
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8355
 
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8356
 
case $host_os in
8357
 
  aix3*)
8358
 
    # FIXME: insert proper C++ library support
8359
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8360
 
    ;;
8361
 
  aix4* | aix5*)
8362
 
    if test "$host_cpu" = ia64; then
8363
 
      # On IA64, the linker does run time linking by default, so we don't
8364
 
      # have to do anything special.
8365
 
      aix_use_runtimelinking=no
8366
 
      exp_sym_flag='-Bexport'
8367
 
      no_entry_flag=""
8368
 
    else
8369
 
      # KDE requires run time linking.  Make it the default.
8370
 
      aix_use_runtimelinking=yes
8371
 
      exp_sym_flag='-bexport'
8372
 
      no_entry_flag='-bnoentry'
8373
 
    fi
8374
 
 
8375
 
    # When large executables or shared objects are built, AIX ld can
8376
 
    # have problems creating the table of contents.  If linking a library
8377
 
    # or program results in "error TOC overflow" add -mminimal-toc to
8378
 
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8379
 
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8380
 
 
8381
 
    _LT_AC_TAGVAR(archive_cmds, $1)=''
8382
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8383
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8384
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8385
 
 
8386
 
    if test "$GXX" = yes; then
8387
 
      case $host_os in aix4.[012]|aix4.[012].*)
8388
 
      # We only want to do this on AIX 4.2 and lower, the check
8389
 
      # below for broken collect2 doesn't work under 4.3+
8390
 
        collect2name=`${CC} -print-prog-name=collect2`
8391
 
        if test -f "$collect2name" && \
8392
 
           strings "$collect2name" | grep resolve_lib_name >/dev/null
8393
 
        then
8394
 
          # We have reworked collect2
8395
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8396
 
        else
8397
 
          # We have old collect2
8398
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8399
 
          # It fails to find uninstalled libraries when the uninstalled
8400
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
8401
 
          # to unsupported forces relinking
8402
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8403
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8404
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8405
 
        fi
8406
 
      esac
8407
 
      shared_flag='-shared'
8408
 
    else
8409
 
      # not using gcc
8410
 
      if test "$host_cpu" = ia64; then
8411
 
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8412
 
        # chokes on -Wl,-G. The following line is correct:
8413
 
        shared_flag='-G'
8414
 
      else
8415
 
        if test "$aix_use_runtimelinking" = yes; then
8416
 
          shared_flag='-qmkshrobj ${wl}-G'
8417
 
        else
8418
 
          shared_flag='-qmkshrobj'
8419
 
        fi
8420
 
      fi
8421
 
    fi
8422
 
 
8423
 
    # Let the compiler handle the export list.
8424
 
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
8425
 
    if test "$aix_use_runtimelinking" = yes; then
8426
 
      # Warning - without using the other runtime loading flags (-brtl),
8427
 
      # -berok will link without error, but may produce a broken library.
8428
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8429
 
      # Determine the default libpath from the value encoded in an empty executable.
8430
 
      _LT_AC_SYS_LIBPATH_AIX
8431
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8432
 
 
8433
 
      _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"
8434
 
      _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"
8435
 
     else
8436
 
      if test "$host_cpu" = ia64; then
8437
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8438
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8439
 
        _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"
8440
 
      else
8441
 
        # Determine the default libpath from the value encoded in an empty executable.
8442
 
        _LT_AC_SYS_LIBPATH_AIX
8443
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8444
 
        # Warning - without using the other run time loading flags,
8445
 
        # -berok will link without error, but may produce a broken library.
8446
 
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8447
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8448
 
        # -bexpall does not export symbols beginning with underscore (_)
8449
 
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8450
 
        # Exported symbols can be pulled into shared objects from archives
8451
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8452
 
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8453
 
        # This is similar to how AIX traditionally builds it's shared libraries.
8454
 
        _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'
8455
 
      fi
8456
 
    fi
8457
 
    ;;
8458
 
  chorus*)
8459
 
    case $cc_basename in
8460
 
      *)
8461
 
        # FIXME: insert proper C++ library support
8462
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8463
 
        ;;
8464
 
    esac
8465
 
    ;;
8466
 
 
8467
 
  cygwin* | mingw* | pw32*)
8468
 
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8469
 
    # as there is no search path for DLLs.
8470
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8471
 
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8472
 
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
8473
 
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8474
 
 
8475
 
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8476
 
      _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'
8477
 
      # If the export-symbols file already is a .def file (1st line
8478
 
      # is EXPORTS), use it as is; otherwise, prepend...
8479
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8480
 
        cp $export_symbols $output_objdir/$soname.def;
8481
 
      else
8482
 
        echo EXPORTS > $output_objdir/$soname.def;
8483
 
        cat $export_symbols >> $output_objdir/$soname.def;
8484
 
      fi~
8485
 
      $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'
8486
 
    else
8487
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8488
 
    fi
8489
 
  ;;
8490
 
 
8491
 
  darwin* | rhapsody*)
8492
 
  if test "$GXX" = yes; then
8493
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8494
 
    case "$host_os" in
8495
 
    rhapsody* | darwin1.[[012]])
8496
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
8497
 
      ;;
8498
 
    *) # Darwin 1.3 on
8499
 
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
8500
 
      ;;
8501
 
    esac
8502
 
    lt_int_apple_cc_single_mod=no
8503
 
    output_verbose_link_cmd='echo'
8504
 
    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8505
 
      lt_int_apple_cc_single_mod=yes
8506
 
    fi
8507
 
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8508
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8509
 
    else
8510
 
      _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'
8511
 
    fi
8512
 
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8513
 
 
8514
 
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8515
 
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8516
 
      _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}'
8517
 
    else
8518
 
      _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}'
8519
 
    fi
8520
 
    _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}'
8521
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
8522
 
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8523
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8524
 
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8525
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8526
 
  else
8527
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8528
 
  fi
8529
 
    ;;
8530
 
 
8531
 
  dgux*)
8532
 
    case $cc_basename in
8533
 
      ec++)
8534
 
        # FIXME: insert proper C++ library support
8535
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8536
 
        ;;
8537
 
      ghcx)
8538
 
        # Green Hills C++ Compiler
8539
 
        # FIXME: insert proper C++ library support
8540
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8541
 
        ;;
8542
 
      *)
8543
 
        # FIXME: insert proper C++ library support
8544
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8545
 
        ;;
8546
 
    esac
8547
 
    ;;
8548
 
  freebsd[12]*)
8549
 
    # C++ shared libraries reported to be fairly broken before switch to ELF
8550
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8551
 
    ;;
8552
 
  freebsd-elf*)
8553
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8554
 
    ;;
8555
 
  freebsd*)
8556
 
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8557
 
    # conventions
8558
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8559
 
    ;;
8560
 
  gnu*)
8561
 
    ;;
8562
 
  hpux9*)
8563
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8564
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8565
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8566
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8567
 
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8568
 
                                # but as the default
8569
 
                                # location of the library.
8570
 
 
8571
 
    case $cc_basename in
8572
 
    CC)
8573
 
      # FIXME: insert proper C++ library support
8574
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8575
 
      ;;
8576
 
    aCC)
8577
 
      _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'
8578
 
      # Commands to make compiler produce verbose output that lists
8579
 
      # what "hidden" libraries, object files and flags are used when
8580
 
      # linking a shared library.
8581
 
      #
8582
 
      # There doesn't appear to be a way to prevent this compiler from
8583
 
      # explicitly linking system object files so we need to strip them
8584
 
      # from the output so that they don't get included in the library
8585
 
      # dependencies.
8586
 
      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'
8587
 
      ;;
8588
 
    *)
8589
 
      if test "$GXX" = yes; then
8590
 
        _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'
8591
 
      else
8592
 
        # FIXME: insert proper C++ library support
8593
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8594
 
      fi
8595
 
      ;;
8596
 
    esac
8597
 
    ;;
8598
 
  hpux10*|hpux11*)
8599
 
    if test $with_gnu_ld = no; then
8600
 
      case "$host_cpu" in
8601
 
      hppa*64*)
8602
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8603
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8604
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8605
 
        ;;
8606
 
      ia64*)
8607
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8608
 
        ;;
8609
 
      *)
8610
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8611
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8612
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8613
 
        ;;
8614
 
      esac
8615
 
    fi
8616
 
    case "$host_cpu" in
8617
 
    hppa*64*)
8618
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
8619
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8620
 
      ;;
8621
 
    ia64*)
8622
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
8623
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8624
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8625
 
                                              # but as the default
8626
 
                                              # location of the library.
8627
 
      ;;
8628
 
    *)
8629
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8630
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8631
 
                                              # but as the default
8632
 
                                              # location of the library.
8633
 
      ;;
8634
 
    esac
8635
 
 
8636
 
    case $cc_basename in
8637
 
      CC)
8638
 
        # FIXME: insert proper C++ library support
8639
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8640
 
        ;;
8641
 
      aCC)
8642
 
        case "$host_cpu" in
8643
 
        hppa*64*|ia64*)
8644
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8645
 
          ;;
8646
 
        *)
8647
 
          _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'
8648
 
          ;;
8649
 
        esac
8650
 
        # Commands to make compiler produce verbose output that lists
8651
 
        # what "hidden" libraries, object files and flags are used when
8652
 
        # linking a shared library.
8653
 
        #
8654
 
        # There doesn't appear to be a way to prevent this compiler from
8655
 
        # explicitly linking system object files so we need to strip them
8656
 
        # from the output so that they don't get included in the library
8657
 
        # dependencies.
8658
 
        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'
8659
 
        ;;
8660
 
      *)
8661
 
        if test "$GXX" = yes; then
8662
 
          if test $with_gnu_ld = no; then
8663
 
            case "$host_cpu" in
8664
 
            ia64*|hppa*64*)
8665
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8666
 
              ;;
8667
 
            *)
8668
 
              _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'
8669
 
              ;;
8670
 
            esac
8671
 
          fi
8672
 
        else
8673
 
          # FIXME: insert proper C++ library support
8674
 
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
8675
 
        fi
8676
 
        ;;
8677
 
    esac
8678
 
    ;;
8679
 
  irix5* | irix6*)
8680
 
    case $cc_basename in
8681
 
      CC)
8682
 
        # SGI C++
8683
 
        _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'
8684
 
 
8685
 
        # Archives containing C++ object files must be created using
8686
 
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8687
 
        # necessary to make sure instantiated templates are included
8688
 
        # in the archive.
8689
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8690
 
        ;;
8691
 
      *)
8692
 
        if test "$GXX" = yes; then
8693
 
          if test "$with_gnu_ld" = no; then
8694
 
            _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'
8695
 
          else
8696
 
            _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'
8697
 
          fi
8698
 
        fi
8699
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8700
 
        ;;
8701
 
    esac
8702
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8703
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8704
 
    ;;
8705
 
  linux*)
8706
 
    case $cc_basename in
8707
 
      KCC)
8708
 
        # Kuck and Associates, Inc. (KAI) C++ Compiler
8709
 
 
8710
 
        # KCC will only create a shared library if the output file
8711
 
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
8712
 
        # to its proper name (with version) after linking.
8713
 
        _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'
8714
 
        _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'
8715
 
        # Commands to make compiler produce verbose output that lists
8716
 
        # what "hidden" libraries, object files and flags are used when
8717
 
        # linking a shared library.
8718
 
        #
8719
 
        # There doesn't appear to be a way to prevent this compiler from
8720
 
        # explicitly linking system object files so we need to strip them
8721
 
        # from the output so that they don't get included in the library
8722
 
        # dependencies.
8723
 
        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'
8724
 
 
8725
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8726
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8727
 
 
8728
 
        # Archives containing C++ object files must be created using
8729
 
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8730
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8731
 
        ;;
8732
 
      icpc)
8733
 
        # Intel C++
8734
 
        with_gnu_ld=yes
8735
 
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8736
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8737
 
        _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'
8738
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8739
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8740
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8741
 
        ;;
8742
 
      cxx)
8743
 
        # Compaq C++
8744
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8745
 
        _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'
8746
 
 
8747
 
        runpath_var=LD_RUN_PATH
8748
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8749
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8750
 
 
8751
 
        # Commands to make compiler produce verbose output that lists
8752
 
        # what "hidden" libraries, object files and flags are used when
8753
 
        # linking a shared library.
8754
 
        #
8755
 
        # There doesn't appear to be a way to prevent this compiler from
8756
 
        # explicitly linking system object files so we need to strip them
8757
 
        # from the output so that they don't get included in the library
8758
 
        # dependencies.
8759
 
        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'
8760
 
        ;;
8761
 
    esac
8762
 
    ;;
8763
 
  lynxos*)
8764
 
    # FIXME: insert proper C++ library support
8765
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8766
 
    ;;
8767
 
  m88k*)
8768
 
    # FIXME: insert proper C++ library support
8769
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8770
 
    ;;
8771
 
  mvs*)
8772
 
    case $cc_basename in
8773
 
      cxx)
8774
 
        # FIXME: insert proper C++ library support
8775
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8776
 
        ;;
8777
 
      *)
8778
 
        # FIXME: insert proper C++ library support
8779
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8780
 
        ;;
8781
 
    esac
8782
 
    ;;
8783
 
  netbsd*)
8784
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8785
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8786
 
      wlarc=
8787
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8788
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8789
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8790
 
    fi
8791
 
    # Workaround some broken pre-1.5 toolchains
8792
 
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8793
 
    ;;
8794
 
  osf3*)
8795
 
    case $cc_basename in
8796
 
      KCC)
8797
 
        # Kuck and Associates, Inc. (KAI) C++ Compiler
8798
 
 
8799
 
        # KCC will only create a shared library if the output file
8800
 
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
8801
 
        # to its proper name (with version) after linking.
8802
 
        _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'
8803
 
 
8804
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8805
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8806
 
 
8807
 
        # Archives containing C++ object files must be created using
8808
 
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8809
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8810
 
 
8811
 
        ;;
8812
 
      RCC)
8813
 
        # Rational C++ 2.4.1
8814
 
        # FIXME: insert proper C++ library support
8815
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8816
 
        ;;
8817
 
      cxx)
8818
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8819
 
        _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'
8820
 
 
8821
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8822
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8823
 
 
8824
 
        # Commands to make compiler produce verbose output that lists
8825
 
        # what "hidden" libraries, object files and flags are used when
8826
 
        # linking a shared library.
8827
 
        #
8828
 
        # There doesn't appear to be a way to prevent this compiler from
8829
 
        # explicitly linking system object files so we need to strip them
8830
 
        # from the output so that they don't get included in the library
8831
 
        # dependencies.
8832
 
        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'
8833
 
        ;;
8834
 
      *)
8835
 
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8836
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8837
 
          _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'
8838
 
 
8839
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8840
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8841
 
 
8842
 
          # Commands to make compiler produce verbose output that lists
8843
 
          # what "hidden" libraries, object files and flags are used when
8844
 
          # linking a shared library.
8845
 
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8846
 
 
8847
 
        else
8848
 
          # FIXME: insert proper C++ library support
8849
 
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
8850
 
        fi
8851
 
        ;;
8852
 
    esac
8853
 
    ;;
8854
 
  osf4* | osf5*)
8855
 
    case $cc_basename in
8856
 
      KCC)
8857
 
        # Kuck and Associates, Inc. (KAI) C++ Compiler
8858
 
 
8859
 
        # KCC will only create a shared library if the output file
8860
 
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
8861
 
        # to its proper name (with version) after linking.
8862
 
        _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'
8863
 
 
8864
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8865
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8866
 
 
8867
 
        # Archives containing C++ object files must be created using
8868
 
        # the KAI C++ compiler.
8869
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8870
 
        ;;
8871
 
      RCC)
8872
 
        # Rational C++ 2.4.1
8873
 
        # FIXME: insert proper C++ library support
8874
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8875
 
        ;;
8876
 
      cxx)
8877
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8878
 
        _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'
8879
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8880
 
          echo "-hidden">> $lib.exp~
8881
 
          $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~
8882
 
          $rm $lib.exp'
8883
 
 
8884
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8885
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8886
 
 
8887
 
        # Commands to make compiler produce verbose output that lists
8888
 
        # what "hidden" libraries, object files and flags are used when
8889
 
        # linking a shared library.
8890
 
        #
8891
 
        # There doesn't appear to be a way to prevent this compiler from
8892
 
        # explicitly linking system object files so we need to strip them
8893
 
        # from the output so that they don't get included in the library
8894
 
        # dependencies.
8895
 
        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'
8896
 
        ;;
8897
 
      *)
8898
 
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8899
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8900
 
         _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'
8901
 
 
8902
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8903
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8904
 
 
8905
 
          # Commands to make compiler produce verbose output that lists
8906
 
          # what "hidden" libraries, object files and flags are used when
8907
 
          # linking a shared library.
8908
 
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8909
 
 
8910
 
        else
8911
 
          # FIXME: insert proper C++ library support
8912
 
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
8913
 
        fi
8914
 
        ;;
8915
 
    esac
8916
 
    ;;
8917
 
  psos*)
8918
 
    # FIXME: insert proper C++ library support
8919
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8920
 
    ;;
8921
 
  sco*)
8922
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8923
 
    case $cc_basename in
8924
 
      CC)
8925
 
        # FIXME: insert proper C++ library support
8926
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8927
 
        ;;
8928
 
      *)
8929
 
        # FIXME: insert proper C++ library support
8930
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8931
 
        ;;
8932
 
    esac
8933
 
    ;;
8934
 
  sunos4*)
8935
 
    case $cc_basename in
8936
 
      CC)
8937
 
        # Sun C++ 4.x
8938
 
        # FIXME: insert proper C++ library support
8939
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8940
 
        ;;
8941
 
      lcc)
8942
 
        # Lucid
8943
 
        # FIXME: insert proper C++ library support
8944
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8945
 
        ;;
8946
 
      *)
8947
 
        # FIXME: insert proper C++ library support
8948
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8949
 
        ;;
8950
 
    esac
8951
 
    ;;
8952
 
  solaris*)
8953
 
    case $cc_basename in
8954
 
      CC)
8955
 
        # Sun C++ 4.2, 5.x and Centerline C++
8956
 
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8957
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8958
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8959
 
        $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'
8960
 
 
8961
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8962
 
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8963
 
        case $host_os in
8964
 
          solaris2.[0-5] | solaris2.[0-5].*) ;;
8965
 
          *)
8966
 
            # The C++ compiler is used as linker so we must use $wl
8967
 
            # flag to pass the commands to the underlying system
8968
 
            # linker.
8969
 
            # Supported since Solaris 2.6 (maybe 2.5.1?)
8970
 
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8971
 
            ;;
8972
 
        esac
8973
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8974
 
 
8975
 
        # Commands to make compiler produce verbose output that lists
8976
 
        # what "hidden" libraries, object files and flags are used when
8977
 
        # linking a shared library.
8978
 
        #
8979
 
        # There doesn't appear to be a way to prevent this compiler from
8980
 
        # explicitly linking system object files so we need to strip them
8981
 
        # from the output so that they don't get included in the library
8982
 
        # dependencies.
8983
 
        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'
8984
 
 
8985
 
        # Archives containing C++ object files must be created using
8986
 
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8987
 
        # necessary to make sure instantiated templates are included
8988
 
        # in the archive.
8989
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8990
 
        ;;
8991
 
      gcx)
8992
 
        # Green Hills C++ Compiler
8993
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8994
 
 
8995
 
        # The C++ compiler must be used to create the archive.
8996
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8997
 
        ;;
8998
 
      *)
8999
 
        # GNU C++ compiler with Solaris linker
9000
 
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9001
 
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9002
 
          if $CC --version | grep -v '^2\.7' > /dev/null; then
9003
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9004
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9005
 
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9006
 
 
9007
 
            # Commands to make compiler produce verbose output that lists
9008
 
            # what "hidden" libraries, object files and flags are used when
9009
 
            # linking a shared library.
9010
 
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9011
 
          else
9012
 
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
9013
 
            # platform.
9014
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9015
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9016
 
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9017
 
 
9018
 
            # Commands to make compiler produce verbose output that lists
9019
 
            # what "hidden" libraries, object files and flags are used when
9020
 
            # linking a shared library.
9021
 
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9022
 
          fi
9023
 
 
9024
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9025
 
        fi
9026
 
        ;;
9027
 
    esac
9028
 
    ;;
9029
 
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
9030
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9031
 
    ;;
9032
 
  tandem*)
9033
 
    case $cc_basename in
9034
 
      NCC)
9035
 
        # NonStop-UX NCC 3.20
9036
 
        # FIXME: insert proper C++ library support
9037
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9038
 
        ;;
9039
 
      *)
9040
 
        # FIXME: insert proper C++ library support
9041
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9042
 
        ;;
9043
 
    esac
9044
 
    ;;
9045
 
  vxworks*)
9046
 
    # FIXME: insert proper C++ library support
9047
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9048
 
    ;;
9049
 
  *)
9050
 
    # FIXME: insert proper C++ library support
9051
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9052
 
    ;;
9053
 
esac
9054
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9055
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9056
 
 
9057
 
_LT_AC_TAGVAR(GCC, $1)="$GXX"
9058
 
_LT_AC_TAGVAR(LD, $1)="$LD"
9059
 
 
9060
 
## CAVEAT EMPTOR:
9061
 
## There is no encapsulation within the following macros, do not change
9062
 
## the running order or otherwise move them around unless you know exactly
9063
 
## what you are doing...
9064
 
AC_LIBTOOL_POSTDEP_PREDEP($1)
9065
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9066
 
AC_LIBTOOL_PROG_CC_C_O($1)
9067
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9068
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9069
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9070
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9071
 
AC_LIBTOOL_SYS_LIB_STRIP
9072
 
AC_LIBTOOL_DLOPEN_SELF($1)
9073
 
 
9074
 
AC_LIBTOOL_CONFIG($1)
9075
 
 
9076
 
AC_LANG_POP
9077
 
CC=$lt_save_CC
9078
 
LDCXX=$LD
9079
 
LD=$lt_save_LD
9080
 
GCC=$lt_save_GCC
9081
 
with_gnu_ldcxx=$with_gnu_ld
9082
 
with_gnu_ld=$lt_save_with_gnu_ld
9083
 
lt_cv_path_LDCXX=$lt_cv_path_LD
9084
 
lt_cv_path_LD=$lt_save_path_LD
9085
 
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9086
 
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9087
 
])# AC_LIBTOOL_LANG_CXX_CONFIG
9088
 
 
9089
 
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
9090
 
# ------------------------
9091
 
# Figure out "hidden" library dependencies from verbose
9092
 
# compiler output when linking a shared library.
9093
 
# Parse the compiler output and extract the necessary
9094
 
# objects, libraries and library flags.
9095
 
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
9096
 
dnl we can't use the lt_simple_compile_test_code here,
9097
 
dnl because it contains code intended for an executable,
9098
 
dnl not a library.  It's possible we should let each
9099
 
dnl tag define a new lt_????_link_test_code variable,
9100
 
dnl but it's only used here...
9101
 
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9102
 
int a;
9103
 
void foo (void) { a = 0; }
9104
 
EOF
9105
 
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9106
 
class Foo
9107
 
{
9108
 
public:
9109
 
  Foo (void) { a = 0; }
9110
 
private:
9111
 
  int a;
9112
 
};
9113
 
EOF
9114
 
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9115
 
      subroutine foo
9116
 
      implicit none
9117
 
      integer*4 a
9118
 
      a=0
9119
 
      return
9120
 
      end
9121
 
EOF
9122
 
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9123
 
public class foo {
9124
 
  private int a;
9125
 
  public void bar (void) {
9126
 
    a = 0;
9127
 
  }
9128
 
};
9129
 
EOF
9130
 
])
9131
 
dnl Parse the compiler output and extract the necessary
9132
 
dnl objects, libraries and library flags.
9133
 
if AC_TRY_EVAL(ac_compile); then
9134
 
  # Parse the compiler output and extract the necessary
9135
 
  # objects, libraries and library flags.
9136
 
 
9137
 
  # Sentinel used to keep track of whether or not we are before
9138
 
  # the conftest object file.
9139
 
  pre_test_object_deps_done=no
9140
 
 
9141
 
  # The `*' in the case matches for architectures that use `case' in
9142
 
  # $output_verbose_cmd can trigger glob expansion during the loop
9143
 
  # eval without this substitution.
9144
 
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
9145
 
 
9146
 
  for p in `eval $output_verbose_link_cmd`; do
9147
 
    case $p in
9148
 
 
9149
 
    -L* | -R* | -l*)
9150
 
       # Some compilers place space between "-{L,R}" and the path.
9151
 
       # Remove the space.
9152
 
       if test $p = "-L" \
9153
 
          || test $p = "-R"; then
9154
 
         prev=$p
9155
 
         continue
9156
 
       else
9157
 
         prev=
9158
 
       fi
9159
 
 
9160
 
       if test "$pre_test_object_deps_done" = no; then
9161
 
         case $p in
9162
 
         -L* | -R*)
9163
 
           # Internal compiler library paths should come after those
9164
 
           # provided the user.  The postdeps already come after the
9165
 
           # user supplied libs so there is no need to process them.
9166
 
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9167
 
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9168
 
           else
9169
 
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9170
 
           fi
9171
 
           ;;
9172
 
         # The "-l" case would never come before the object being
9173
 
         # linked, so don't bother handling this case.
9174
 
         esac
9175
 
       else
9176
 
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9177
 
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9178
 
         else
9179
 
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9180
 
         fi
9181
 
       fi
9182
 
       ;;
9183
 
 
9184
 
    *.$objext|*.$libext)
9185
 
       # This assumes that the test object file only shows up
9186
 
       # once in the compiler output.
9187
 
       if test "$p" = "conftest.$objext"; then
9188
 
         pre_test_object_deps_done=yes
9189
 
         continue
9190
 
       fi
9191
 
 
9192
 
       if test "$pre_test_object_deps_done" = no; then
9193
 
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9194
 
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
9195
 
         else
9196
 
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9197
 
         fi
9198
 
       else
9199
 
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9200
 
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
9201
 
         else
9202
 
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9203
 
         fi
9204
 
       fi
9205
 
       ;;
9206
 
 
9207
 
    *) ;; # Ignore the rest.
9208
 
 
9209
 
    esac
9210
 
  done
9211
 
 
9212
 
  # Clean up.
9213
 
  rm -f a.out a.exe
9214
 
else
9215
 
  echo "libtool.m4: error: problem compiling $1 test program"
9216
 
fi
9217
 
 
9218
 
$rm -f confest.$objext
9219
 
 
9220
 
case " $_LT_AC_TAGVAR(postdeps, $1) " in
9221
 
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9222
 
esac
9223
 
])# AC_LIBTOOL_POSTDEP_PREDEP
9224
 
 
9225
 
# AC_LIBTOOL_LANG_F77_CONFIG
9226
 
# ------------------------
9227
 
# Ensure that the configuration vars for the C compiler are
9228
 
# suitably defined.  Those variables are subsequently used by
9229
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9230
 
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9231
 
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
9232
 
[AC_REQUIRE([AC_PROG_F77])
9233
 
AC_LANG_PUSH(Fortran 77)
9234
 
 
9235
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9236
 
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9237
 
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9238
 
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9239
 
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9240
 
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9241
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9242
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9243
 
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9244
 
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9245
 
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
9246
 
_LT_AC_TAGVAR(module_cmds, $1)=
9247
 
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
9248
 
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9249
 
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9250
 
_LT_AC_TAGVAR(no_undefined_flag, $1)=
9251
 
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9252
 
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9253
 
 
9254
 
# Source file extension for f77 test sources.
9255
 
ac_ext=f
9256
 
 
9257
 
# Object file extension for compiled f77 test sources.
9258
 
objext=o
9259
 
_LT_AC_TAGVAR(objext, $1)=$objext
9260
 
 
9261
 
# Code to be used in simple compile tests
9262
 
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
9263
 
 
9264
 
# Code to be used in simple link tests
9265
 
lt_simple_link_test_code="      program t\n      end\n"
9266
 
 
9267
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9268
 
_LT_AC_SYS_COMPILER
9269
 
 
9270
 
# Allow CC to be a program name with arguments.
9271
 
lt_save_CC="$CC"
9272
 
CC=${F77-"f77"}
9273
 
compiler=$CC
9274
 
_LT_AC_TAGVAR(compiler, $1)=$CC
9275
 
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
9276
 
 
9277
 
AC_MSG_CHECKING([if libtool supports shared libraries])
9278
 
AC_MSG_RESULT([$can_build_shared])
9279
 
 
9280
 
AC_MSG_CHECKING([whether to build shared libraries])
9281
 
test "$can_build_shared" = "no" && enable_shared=no
9282
 
 
9283
 
# On AIX, shared libraries and static libraries use the same namespace, and
9284
 
# are all built from PIC.
9285
 
case "$host_os" in
9286
 
aix3*)
9287
 
  test "$enable_shared" = yes && enable_static=no
9288
 
  if test -n "$RANLIB"; then
9289
 
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
9290
 
    postinstall_cmds='$RANLIB $lib'
9291
 
  fi
9292
 
  ;;
9293
 
aix4*)
9294
 
  test "$enable_shared" = yes && enable_static=no
9295
 
  ;;
9296
 
esac
9297
 
AC_MSG_RESULT([$enable_shared])
9298
 
 
9299
 
AC_MSG_CHECKING([whether to build static libraries])
9300
 
# Make sure either enable_shared or enable_static is yes.
9301
 
test "$enable_shared" = yes || enable_static=yes
9302
 
AC_MSG_RESULT([$enable_static])
9303
 
 
9304
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9305
 
 
9306
 
_LT_AC_TAGVAR(GCC, $1)="$G77"
9307
 
_LT_AC_TAGVAR(LD, $1)="$LD"
9308
 
 
9309
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9310
 
AC_LIBTOOL_PROG_CC_C_O($1)
9311
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9312
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9313
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9314
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9315
 
AC_LIBTOOL_SYS_LIB_STRIP
9316
 
 
9317
 
 
9318
 
AC_LIBTOOL_CONFIG($1)
9319
 
 
9320
 
AC_LANG_POP
9321
 
CC="$lt_save_CC"
9322
 
])# AC_LIBTOOL_LANG_F77_CONFIG
9323
 
 
9324
 
 
9325
 
# AC_LIBTOOL_LANG_GCJ_CONFIG
9326
 
# --------------------------
9327
 
# Ensure that the configuration vars for the C compiler are
9328
 
# suitably defined.  Those variables are subsequently used by
9329
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9330
 
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9331
 
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9332
 
[AC_LANG_SAVE
9333
 
 
9334
 
# Source file extension for Java test sources.
9335
 
ac_ext=java
9336
 
 
9337
 
# Object file extension for compiled Java test sources.
9338
 
objext=o
9339
 
_LT_AC_TAGVAR(objext, $1)=$objext
9340
 
 
9341
 
# Code to be used in simple compile tests
9342
 
lt_simple_compile_test_code="class foo {}\n"
9343
 
 
9344
 
# Code to be used in simple link tests
9345
 
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9346
 
 
9347
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9348
 
_LT_AC_SYS_COMPILER
9349
 
 
9350
 
# Allow CC to be a program name with arguments.
9351
 
lt_save_CC="$CC"
9352
 
CC=${GCJ-"gcj"}
9353
 
compiler=$CC
9354
 
_LT_AC_TAGVAR(compiler, $1)=$CC
9355
 
 
9356
 
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9357
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9358
 
 
9359
 
## CAVEAT EMPTOR:
9360
 
## There is no encapsulation within the following macros, do not change
9361
 
## the running order or otherwise move them around unless you know exactly
9362
 
## what you are doing...
9363
 
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9364
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9365
 
AC_LIBTOOL_PROG_CC_C_O($1)
9366
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9367
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9368
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9369
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9370
 
AC_LIBTOOL_SYS_LIB_STRIP
9371
 
AC_LIBTOOL_DLOPEN_SELF($1)
9372
 
 
9373
 
AC_LIBTOOL_CONFIG($1)
9374
 
 
9375
 
AC_LANG_RESTORE
9376
 
CC="$lt_save_CC"
9377
 
])# AC_LIBTOOL_LANG_GCJ_CONFIG
9378
 
 
9379
 
 
9380
 
# AC_LIBTOOL_LANG_RC_CONFIG
9381
 
# --------------------------
9382
 
# Ensure that the configuration vars for the Windows resource compiler are
9383
 
# suitably defined.  Those variables are subsequently used by
9384
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9385
 
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9386
 
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
9387
 
[AC_LANG_SAVE
9388
 
 
9389
 
# Source file extension for RC test sources.
9390
 
ac_ext=rc
9391
 
 
9392
 
# Object file extension for compiled RC test sources.
9393
 
objext=o
9394
 
_LT_AC_TAGVAR(objext, $1)=$objext
9395
 
 
9396
 
# Code to be used in simple compile tests
9397
 
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9398
 
 
9399
 
# Code to be used in simple link tests
9400
 
lt_simple_link_test_code="$lt_simple_compile_test_code"
9401
 
 
9402
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9403
 
_LT_AC_SYS_COMPILER
9404
 
 
9405
 
# Allow CC to be a program name with arguments.
9406
 
lt_save_CC="$CC"
9407
 
CC=${RC-"windres"}
9408
 
compiler=$CC
9409
 
_LT_AC_TAGVAR(compiler, $1)=$CC
9410
 
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9411
 
 
9412
 
AC_LIBTOOL_CONFIG($1)
9413
 
 
9414
 
AC_LANG_RESTORE
9415
 
CC="$lt_save_CC"
9416
 
])# AC_LIBTOOL_LANG_RC_CONFIG
9417
 
 
9418
 
 
9419
 
# AC_LIBTOOL_CONFIG([TAGNAME])
9420
 
# ----------------------------
9421
 
# If TAGNAME is not passed, then create an initial libtool script
9422
 
# with a default configuration from the untagged config vars.  Otherwise
9423
 
# add code to config.status for appending the configuration named by
9424
 
# TAGNAME from the matching tagged config vars.
9425
 
AC_DEFUN([AC_LIBTOOL_CONFIG],
9426
 
[# The else clause should only fire when bootstrapping the
9427
 
# libtool distribution, otherwise you forgot to ship ltmain.sh
9428
 
# with your package, and you will get complaints that there are
9429
 
# no rules to generate ltmain.sh.
9430
 
if test -f "$ltmain"; then
9431
 
  # See if we are running on zsh, and set the options which allow our commands through
9432
 
  # without removal of \ escapes.
9433
 
  if test -n "${ZSH_VERSION+set}" ; then
9434
 
    setopt NO_GLOB_SUBST
9435
 
  fi  
9436
 
  # Now quote all the things that may contain metacharacters while being
9437
 
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
9438
 
  # variables and quote the copies for generation of the libtool script.
9439
 
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9440
 
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9441
 
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9442
 
    deplibs_check_method reload_flag reload_cmds need_locks \
9443
 
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9444
 
    lt_cv_sys_global_symbol_to_c_name_address \
9445
 
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9446
 
    old_postinstall_cmds old_postuninstall_cmds \
9447
 
    _LT_AC_TAGVAR(compiler, $1) \
9448
 
    _LT_AC_TAGVAR(CC, $1) \
9449
 
    _LT_AC_TAGVAR(LD, $1) \
9450
 
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9451
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9452
 
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9453
 
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9454
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9455
 
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9456
 
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9457
 
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9458
 
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
9459
 
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9460
 
    _LT_AC_TAGVAR(predep_objects, $1) \
9461
 
    _LT_AC_TAGVAR(postdep_objects, $1) \
9462
 
    _LT_AC_TAGVAR(predeps, $1) \
9463
 
    _LT_AC_TAGVAR(postdeps, $1) \
9464
 
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9465
 
    _LT_AC_TAGVAR(archive_cmds, $1) \
9466
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9467
 
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
9468
 
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
9469
 
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9470
 
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
9471
 
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
9472
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
9473
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9474
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9475
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9476
 
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
9477
 
    _LT_AC_TAGVAR(module_cmds, $1) \
9478
 
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
9479
 
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9480
 
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
9481
 
    _LT_AC_TAGVAR(include_expsyms, $1); do
9482
 
 
9483
 
    case $var in
9484
 
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
9485
 
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9486
 
    _LT_AC_TAGVAR(archive_cmds, $1) | \
9487
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9488
 
    _LT_AC_TAGVAR(module_cmds, $1) | \
9489
 
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
9490
 
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9491
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9492
 
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
9493
 
    postinstall_cmds | postuninstall_cmds | \
9494
 
    old_postinstall_cmds | old_postuninstall_cmds | \
9495
 
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9496
 
      # Double-quote double-evaled strings.
9497
 
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9498
 
      ;;
9499
 
    *)
9500
 
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9501
 
      ;;
9502
 
    esac
9503
 
  done
9504
 
 
9505
 
  case $lt_echo in
9506
 
  *'\[$]0 --fallback-echo"')
9507
 
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9508
 
    ;;
9509
 
  esac
9510
 
 
9511
 
ifelse([$1], [],
9512
 
  [cfgfile="${ofile}T"
9513
 
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9514
 
  $rm -f "$cfgfile"
9515
 
  AC_MSG_NOTICE([creating $ofile])],
9516
 
  [cfgfile="$ofile"])
9517
 
 
9518
 
  cat <<__EOF__ >> "$cfgfile"
9519
 
ifelse([$1], [],
9520
 
[#! $SHELL
9521
 
 
9522
 
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9523
 
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9524
 
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
9525
 
#
9526
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9527
 
# Free Software Foundation, Inc.
9528
 
#
9529
 
# This file is part of GNU Libtool:
9530
 
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9531
 
#
9532
 
# This program is free software; you can redistribute it and/or modify
9533
 
# it under the terms of the GNU General Public License as published by
9534
 
# the Free Software Foundation; either version 2 of the License, or
9535
 
# (at your option) any later version.
9536
 
#
9537
 
# This program is distributed in the hope that it will be useful, but
9538
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
9539
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9540
 
# General Public License for more details.
9541
 
#
9542
 
# You should have received a copy of the GNU General Public License
9543
 
# along with this program; if not, write to the Free Software
9544
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9545
 
#
9546
 
# As a special exception to the GNU General Public License, if you
9547
 
# distribute this file as part of a program that contains a
9548
 
# configuration script generated by Autoconf, you may include it under
9549
 
# the same distribution terms that you use for the rest of that program.
9550
 
 
9551
 
# A sed program that does not truncate output.
9552
 
SED=$lt_SED
9553
 
 
9554
 
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
9555
 
Xsed="$SED -e s/^X//"
9556
 
 
9557
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
9558
 
# if CDPATH is set.
9559
 
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9560
 
 
9561
 
# The names of the tagged configurations supported by this script.
9562
 
available_tags=
9563
 
 
9564
 
# ### BEGIN LIBTOOL CONFIG],
9565
 
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9566
 
 
9567
 
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9568
 
 
9569
 
# Shell to use when invoking shell scripts.
9570
 
SHELL=$lt_SHELL
9571
 
 
9572
 
# Whether or not to build shared libraries.
9573
 
build_libtool_libs=$enable_shared
9574
 
 
9575
 
# Whether or not to build static libraries.
9576
 
build_old_libs=$enable_static
9577
 
 
9578
 
# Whether or not to add -lc for building shared libraries.
9579
 
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9580
 
 
9581
 
# Whether or not to disallow shared libs when runtime libs are static
9582
 
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9583
 
 
9584
 
# Whether or not to optimize for fast installation.
9585
 
fast_install=$enable_fast_install
9586
 
 
9587
 
# The host system.
9588
 
host_alias=$host_alias
9589
 
host=$host
9590
 
 
9591
 
# An echo program that does not interpret backslashes.
9592
 
echo=$lt_echo
9593
 
 
9594
 
# The archiver.
9595
 
AR=$lt_AR
9596
 
AR_FLAGS=$lt_AR_FLAGS
9597
 
 
9598
 
# A C compiler.
9599
 
LTCC=$lt_LTCC
9600
 
 
9601
 
# A language-specific compiler.
9602
 
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
9603
 
 
9604
 
# Is the compiler the GNU C compiler?
9605
 
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
9606
 
 
9607
 
# An ERE matcher.
9608
 
EGREP=$lt_EGREP
9609
 
 
9610
 
# The linker used to build libraries.
9611
 
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
9612
 
 
9613
 
# Whether we need hard or soft links.
9614
 
LN_S=$lt_LN_S
9615
 
 
9616
 
# A BSD-compatible nm program.
9617
 
NM=$lt_NM
9618
 
 
9619
 
# A symbol stripping program
9620
 
STRIP=$STRIP
9621
 
 
9622
 
# Used to examine libraries when file_magic_cmd begins "file"
9623
 
MAGIC_CMD=$MAGIC_CMD
9624
 
 
9625
 
# Used on cygwin: DLL creation program.
9626
 
DLLTOOL="$DLLTOOL"
9627
 
 
9628
 
# Used on cygwin: object dumper.
9629
 
OBJDUMP="$OBJDUMP"
9630
 
 
9631
 
# Used on cygwin: assembler.
9632
 
AS="$AS"
9633
 
 
9634
 
# The name of the directory that contains temporary libtool files.
9635
 
objdir=$objdir
9636
 
 
9637
 
# How to create reloadable object files.
9638
 
reload_flag=$lt_reload_flag
9639
 
reload_cmds=$lt_reload_cmds
9640
 
 
9641
 
# How to pass a linker flag through the compiler.
9642
 
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9643
 
 
9644
 
# Object file suffix (normally "o").
9645
 
objext="$ac_objext"
9646
 
 
9647
 
# Old archive suffix (normally "a").
9648
 
libext="$libext"
9649
 
 
9650
 
# Shared library suffix (normally ".so").
9651
 
shrext='$shrext'
9652
 
 
9653
 
# Executable file suffix (normally "").
9654
 
exeext="$exeext"
9655
 
 
9656
 
# Additional compiler flags for building library objects.
9657
 
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9658
 
pic_mode=$pic_mode
9659
 
 
9660
 
# What is the maximum length of a command?
9661
 
max_cmd_len=$lt_cv_sys_max_cmd_len
9662
 
 
9663
 
# Does compiler simultaneously support -c and -o options?
9664
 
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
9665
 
 
9666
 
# Must we lock files when doing compilation ?
9667
 
need_locks=$lt_need_locks
9668
 
 
9669
 
# Do we need the lib prefix for modules?
9670
 
need_lib_prefix=$need_lib_prefix
9671
 
 
9672
 
# Do we need a version for libraries?
9673
 
need_version=$need_version
9674
 
 
9675
 
# Whether dlopen is supported.
9676
 
dlopen_support=$enable_dlopen
9677
 
 
9678
 
# Whether dlopen of programs is supported.
9679
 
dlopen_self=$enable_dlopen_self
9680
 
 
9681
 
# Whether dlopen of statically linked programs is supported.
9682
 
dlopen_self_static=$enable_dlopen_self_static
9683
 
 
9684
 
# Compiler flag to prevent dynamic linking.
9685
 
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9686
 
 
9687
 
# Compiler flag to turn off builtin functions.
9688
 
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9689
 
 
9690
 
# Compiler flag to allow reflexive dlopens.
9691
 
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9692
 
 
9693
 
# Compiler flag to generate shared objects directly from archives.
9694
 
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9695
 
 
9696
 
# Compiler flag to generate thread-safe objects.
9697
 
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9698
 
 
9699
 
# Library versioning type.
9700
 
version_type=$version_type
9701
 
 
9702
 
# Format of library name prefix.
9703
 
libname_spec=$lt_libname_spec
9704
 
 
9705
 
# List of archive names.  First name is the real one, the rest are links.
9706
 
# The last name is the one that the linker finds with -lNAME.
9707
 
library_names_spec=$lt_library_names_spec
9708
 
 
9709
 
# The coded name of the library, if different from the real name.
9710
 
soname_spec=$lt_soname_spec
9711
 
 
9712
 
# Commands used to build and install an old-style archive.
9713
 
RANLIB=$lt_RANLIB
9714
 
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9715
 
old_postinstall_cmds=$lt_old_postinstall_cmds
9716
 
old_postuninstall_cmds=$lt_old_postuninstall_cmds
9717
 
 
9718
 
# Create an old-style archive from a shared archive.
9719
 
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9720
 
 
9721
 
# Create a temporary old-style archive to link instead of a shared archive.
9722
 
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9723
 
 
9724
 
# Commands used to build and install a shared archive.
9725
 
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9726
 
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9727
 
postinstall_cmds=$lt_postinstall_cmds
9728
 
postuninstall_cmds=$lt_postuninstall_cmds
9729
 
 
9730
 
# Commands used to build a loadable module (assumed same as above if empty)
9731
 
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
9732
 
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
9733
 
 
9734
 
# Commands to strip libraries.
9735
 
old_striplib=$lt_old_striplib
9736
 
striplib=$lt_striplib
9737
 
 
9738
 
# Dependencies to place before the objects being linked to create a
9739
 
# shared library.
9740
 
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9741
 
 
9742
 
# Dependencies to place after the objects being linked to create a
9743
 
# shared library.
9744
 
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9745
 
 
9746
 
# Dependencies to place before the objects being linked to create a
9747
 
# shared library.
9748
 
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9749
 
 
9750
 
# Dependencies to place after the objects being linked to create a
9751
 
# shared library.
9752
 
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9753
 
 
9754
 
# The library search path used internally by the compiler when linking
9755
 
# a shared library.
9756
 
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9757
 
 
9758
 
# Method to check whether dependent libraries are shared objects.
9759
 
deplibs_check_method=$lt_deplibs_check_method
9760
 
 
9761
 
# Command to use when deplibs_check_method == file_magic.
9762
 
file_magic_cmd=$lt_file_magic_cmd
9763
 
 
9764
 
# Flag that allows shared libraries with undefined symbols to be built.
9765
 
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9766
 
 
9767
 
# Flag that forces no undefined symbols.
9768
 
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9769
 
 
9770
 
# Commands used to finish a libtool library installation in a directory.
9771
 
finish_cmds=$lt_finish_cmds
9772
 
 
9773
 
# Same as above, but a single script fragment to be evaled but not shown.
9774
 
finish_eval=$lt_finish_eval
9775
 
 
9776
 
# Take the output of nm and produce a listing of raw symbols and C names.
9777
 
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9778
 
 
9779
 
# Transform the output of nm in a proper C declaration
9780
 
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9781
 
 
9782
 
# Transform the output of nm in a C name address pair
9783
 
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9784
 
 
9785
 
# This is the shared library runtime path variable.
9786
 
runpath_var=$runpath_var
9787
 
 
9788
 
# This is the shared library path variable.
9789
 
shlibpath_var=$shlibpath_var
9790
 
 
9791
 
# Is shlibpath searched before the hard-coded library search path?
9792
 
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9793
 
 
9794
 
# How to hardcode a shared library path into an executable.
9795
 
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9796
 
 
9797
 
# Whether we should hardcode library paths into libraries.
9798
 
hardcode_into_libs=$hardcode_into_libs
9799
 
 
9800
 
# Flag to hardcode \$libdir into a binary during linking.
9801
 
# This must work even if \$libdir does not exist.
9802
 
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9803
 
 
9804
 
# If ld is used when linking, flag to hardcode \$libdir into
9805
 
# a binary during linking. This must work even if \$libdir does
9806
 
# not exist.
9807
 
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
9808
 
 
9809
 
# Whether we need a single -rpath flag with a separated argument.
9810
 
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9811
 
 
9812
 
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
9813
 
# resulting binary.
9814
 
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9815
 
 
9816
 
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9817
 
# resulting binary.
9818
 
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9819
 
 
9820
 
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9821
 
# the resulting binary.
9822
 
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9823
 
 
9824
 
# Set to yes if building a shared library automatically hardcodes DIR into the library
9825
 
# and all subsequent libraries and executables linked against it.
9826
 
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
9827
 
 
9828
 
# Variables whose values should be saved in libtool wrapper scripts and
9829
 
# restored at relink time.
9830
 
variables_saved_for_relink="$variables_saved_for_relink"
9831
 
 
9832
 
# Whether libtool must link a program against all its dependency libraries.
9833
 
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9834
 
 
9835
 
# Compile-time system search path for libraries
9836
 
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9837
 
 
9838
 
# Run-time system search path for libraries
9839
 
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9840
 
 
9841
 
# Fix the shell variable \$srcfile for the compiler.
9842
 
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9843
 
 
9844
 
# Set to yes if exported symbols are required.
9845
 
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9846
 
 
9847
 
# The commands to list exported symbols.
9848
 
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9849
 
 
9850
 
# The commands to extract the exported symbol list from a shared archive.
9851
 
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9852
 
 
9853
 
# Symbols that should not be listed in the preloaded symbols.
9854
 
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9855
 
 
9856
 
# Symbols that must always be exported.
9857
 
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9858
 
 
9859
 
ifelse([$1],[],
9860
 
[# ### END LIBTOOL CONFIG],
9861
 
[# ### END LIBTOOL TAG CONFIG: $tagname])
9862
 
 
9863
 
__EOF__
9864
 
 
9865
 
ifelse([$1],[], [
9866
 
  case $host_os in
9867
 
  aix3*)
9868
 
    cat <<\EOF >> "$cfgfile"
9869
 
 
9870
 
# AIX sometimes has problems with the GCC collect2 program.  For some
9871
 
# reason, if we set the COLLECT_NAMES environment variable, the problems
9872
 
# vanish in a puff of smoke.
9873
 
if test "X${COLLECT_NAMES+set}" != Xset; then
9874
 
  COLLECT_NAMES=
9875
 
  export COLLECT_NAMES
9876
 
fi
9877
 
EOF
9878
 
    ;;
9879
 
  esac
9880
 
 
9881
 
  # We use sed instead of cat because bash on DJGPP gets confused if
9882
 
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
9883
 
  # text mode, it properly converts lines to CR/LF.  This bash problem
9884
 
  # is reportedly fixed, but why not run on old versions too?
9885
 
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9886
 
 
9887
 
  mv -f "$cfgfile" "$ofile" || \
9888
 
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9889
 
  chmod +x "$ofile"
9890
 
])
9891
 
else
9892
 
  # If there is no Makefile yet, we rely on a make rule to execute
9893
 
  # `config.status --recheck' to rerun these tests and create the
9894
 
  # libtool script then.
9895
 
  test -f Makefile && make "$ltmain"
9896
 
fi
9897
 
])# AC_LIBTOOL_CONFIG
9898
 
 
9899
 
 
9900
 
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9901
 
# -------------------------------------------
9902
 
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9903
 
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9904
 
 
9905
 
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9906
 
 
9907
 
if test "$GCC" = yes; then
9908
 
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9909
 
 
9910
 
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9911
 
    lt_cv_prog_compiler_rtti_exceptions,
9912
 
    [-fno-rtti -fno-exceptions], [],
9913
 
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9914
 
fi
9915
 
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9916
 
 
9917
 
 
9918
 
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9919
 
# ---------------------------------
9920
 
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9921
 
[AC_REQUIRE([AC_CANONICAL_HOST])
9922
 
AC_REQUIRE([AC_PROG_NM])
9923
 
AC_REQUIRE([AC_OBJEXT])
9924
 
# Check for command to grab the raw symbol name followed by C symbol from nm.
9925
 
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9926
 
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9927
 
[
9928
 
# These are sane defaults that work on at least a few old systems.
9929
 
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9930
 
 
9931
 
# Character class describing NM global symbol codes.
9932
 
symcode='[[BCDEGRST]]'
9933
 
 
9934
 
# Regexp to match symbols that can be accessed directly from C.
9935
 
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9936
 
 
9937
 
# Transform the above into a raw symbol and a C symbol.
9938
 
symxfrm='\1 \2\3 \3'
9939
 
 
9940
 
# Transform an extracted symbol line into a proper C declaration
9941
 
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9942
 
 
9943
 
# Transform an extracted symbol line into symbol name and symbol address
9944
 
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'"
9945
 
 
9946
 
# Define system-specific variables.
9947
 
case $host_os in
9948
 
aix*)
9949
 
  symcode='[[BCDT]]'
9950
 
  ;;
9951
 
cygwin* | mingw* | pw32*)
9952
 
  symcode='[[ABCDGISTW]]'
9953
 
  ;;
9954
 
hpux*) # Its linker distinguishes data from code symbols
9955
 
  if test "$host_cpu" = ia64; then
9956
 
    symcode='[[ABCDEGRST]]'
9957
 
  fi
9958
 
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9959
 
  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'"
9960
 
  ;;
9961
 
irix* | nonstopux*)
9962
 
  symcode='[[BCDEGRST]]'
9963
 
  ;;
9964
 
osf*)
9965
 
  symcode='[[BCDEGQRST]]'
9966
 
  ;;
9967
 
solaris* | sysv5*)
9968
 
  symcode='[[BDT]]'
9969
 
  ;;
9970
 
sysv4)
9971
 
  symcode='[[DFNSTU]]'
9972
 
  ;;
9973
 
esac
9974
 
 
9975
 
# Handle CRLF in mingw tool chain
9976
 
opt_cr=
9977
 
case $build_os in
9978
 
mingw*)
9979
 
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9980
 
  ;;
9981
 
esac
9982
 
 
9983
 
# If we're using GNU nm, then use its standard symbol codes.
9984
 
case `$NM -V 2>&1` in
9985
 
*GNU* | *'with BFD'*)
9986
 
  symcode='[[ABCDGISTW]]' ;;
9987
 
esac
9988
 
 
9989
 
# Try without a prefix undercore, then with it.
9990
 
for ac_symprfx in "" "_"; do
9991
 
 
9992
 
  # Write the raw and C identifiers.
9993
 
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
9994
 
 
9995
 
  # Check to see that the pipe works correctly.
9996
 
  pipe_works=no
9997
 
 
9998
 
  rm -f conftest*
9999
 
  cat > conftest.$ac_ext <<EOF
10000
 
#ifdef __cplusplus
10001
 
extern "C" {
10002
 
#endif
10003
 
char nm_test_var;
10004
 
void nm_test_func(){}
10005
 
#ifdef __cplusplus
10006
 
}
10007
 
#endif
10008
 
int main(){nm_test_var='a';nm_test_func();return(0);}
10009
 
EOF
10010
 
 
10011
 
  if AC_TRY_EVAL(ac_compile); then
10012
 
    # Now try to grab the symbols.
10013
 
    nlist=conftest.nm
10014
 
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10015
 
      # Try sorting and uniquifying the output.
10016
 
      if sort "$nlist" | uniq > "$nlist"T; then
10017
 
        mv -f "$nlist"T "$nlist"
10018
 
      else
10019
 
        rm -f "$nlist"T
10020
 
      fi
10021
 
 
10022
 
      # Make sure that we snagged all the symbols we need.
10023
 
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
10024
 
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
10025
 
          cat <<EOF > conftest.$ac_ext
10026
 
#ifdef __cplusplus
10027
 
extern "C" {
10028
 
#endif
10029
 
 
10030
 
EOF
10031
 
          # Now generate the symbol file.
10032
 
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10033
 
 
10034
 
          cat <<EOF >> conftest.$ac_ext
10035
 
#if defined (__STDC__) && __STDC__
10036
 
# define lt_ptr_t void *
10037
 
#else
10038
 
# define lt_ptr_t char *
10039
 
# define const
10040
 
#endif
10041
 
 
10042
 
/* The mapping between symbol names and symbols. */
10043
 
const struct {
10044
 
  const char *name;
10045
 
  lt_ptr_t address;
10046
 
}
10047
 
lt_preloaded_symbols[[]] =
10048
 
{
10049
 
EOF
10050
 
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10051
 
          cat <<\EOF >> conftest.$ac_ext
10052
 
  {0, (lt_ptr_t) 0}
10053
 
};
10054
 
 
10055
 
#ifdef __cplusplus
10056
 
}
10057
 
#endif
10058
 
EOF
10059
 
          # Now try linking the two files.
10060
 
          mv conftest.$ac_objext conftstm.$ac_objext
10061
 
          lt_save_LIBS="$LIBS"
10062
 
          lt_save_CFLAGS="$CFLAGS"
10063
 
          LIBS="conftstm.$ac_objext"
10064
 
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10065
 
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10066
 
            pipe_works=yes
10067
 
          fi
10068
 
          LIBS="$lt_save_LIBS"
10069
 
          CFLAGS="$lt_save_CFLAGS"
10070
 
        else
10071
 
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10072
 
        fi
10073
 
      else
10074
 
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10075
 
      fi
10076
 
    else
10077
 
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10078
 
    fi
10079
 
  else
10080
 
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10081
 
    cat conftest.$ac_ext >&5
10082
 
  fi
10083
 
  rm -f conftest* conftst*
10084
 
 
10085
 
  # Do not use the global_symbol_pipe unless it works.
10086
 
  if test "$pipe_works" = yes; then
10087
 
    break
10088
 
  else
10089
 
    lt_cv_sys_global_symbol_pipe=
10090
 
  fi
10091
 
done
10092
 
])
10093
 
if test -z "$lt_cv_sys_global_symbol_pipe"; then
10094
 
  lt_cv_sys_global_symbol_to_cdecl=
10095
 
fi
10096
 
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10097
 
  AC_MSG_RESULT(failed)
10098
 
else
10099
 
  AC_MSG_RESULT(ok)
10100
 
fi
10101
 
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10102
 
 
10103
 
 
10104
 
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
10105
 
# ---------------------------------------
10106
 
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
10107
 
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10108
 
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10109
 
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10110
 
 
10111
 
AC_MSG_CHECKING([for $compiler option to produce PIC])
10112
 
 ifelse([$1],[CXX],[
10113
 
  # C++ specific cases for pic, static, wl, etc.
10114
 
  if test "$GXX" = yes; then
10115
 
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10116
 
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10117
 
 
10118
 
    case $host_os in
10119
 
    aix*)
10120
 
      # All AIX code is PIC.
10121
 
      if test "$host_cpu" = ia64; then
10122
 
        # AIX 5 now supports IA64 processor
10123
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10124
 
      fi
10125
 
      ;;
10126
 
    amigaos*)
10127
 
      # FIXME: we need at least 68020 code to build shared libraries, but
10128
 
      # adding the `-m68020' flag to GCC prevents building anything better,
10129
 
      # like `-m68040'.
10130
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10131
 
      ;;
10132
 
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10133
 
      # PIC is the default for these OSes.
10134
 
      ;;
10135
 
    mingw* | os2* | pw32*)
10136
 
      # This hack is so that the source file can tell whether it is being
10137
 
      # built for inclusion in a dll (and should export symbols for example).
10138
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10139
 
      ;;
10140
 
    darwin* | rhapsody*)
10141
 
      # PIC is the default on this platform
10142
 
      # Common symbols not allowed in MH_DYLIB files
10143
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10144
 
      ;;
10145
 
    *djgpp*)
10146
 
      # DJGPP does not support shared libraries at all
10147
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10148
 
      ;;
10149
 
    sysv4*MP*)
10150
 
      if test -d /usr/nec; then
10151
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10152
 
      fi
10153
 
      ;;
10154
 
    hpux*)
10155
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10156
 
      # not for PA HP-UX.
10157
 
      case "$host_cpu" in
10158
 
      hppa*64*|ia64*)
10159
 
        ;;
10160
 
      *)
10161
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10162
 
        ;;
10163
 
      esac
10164
 
      ;;
10165
 
    *)
10166
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10167
 
      ;;
10168
 
    esac
10169
 
  else
10170
 
    case $host_os in
10171
 
      aix4* | aix5*)
10172
 
        # All AIX code is PIC.
10173
 
        if test "$host_cpu" = ia64; then
10174
 
          # AIX 5 now supports IA64 processor
10175
 
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10176
 
        else
10177
 
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10178
 
        fi
10179
 
        ;;
10180
 
      chorus*)
10181
 
        case $cc_basename in
10182
 
        cxch68)
10183
 
          # Green Hills C++ Compiler
10184
 
          # _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"
10185
 
          ;;
10186
 
        esac
10187
 
        ;;
10188
 
      dgux*)
10189
 
        case $cc_basename in
10190
 
          ec++)
10191
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10192
 
            ;;
10193
 
          ghcx)
10194
 
            # Green Hills C++ Compiler
10195
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10196
 
            ;;
10197
 
          *)
10198
 
            ;;
10199
 
        esac
10200
 
        ;;
10201
 
      freebsd*)
10202
 
        # FreeBSD uses GNU C++
10203
 
        ;;
10204
 
      hpux9* | hpux10* | hpux11*)
10205
 
        case $cc_basename in
10206
 
          CC)
10207
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10208
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10209
 
            if test "$host_cpu" != ia64; then
10210
 
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10211
 
            fi
10212
 
            ;;
10213
 
          aCC)
10214
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10215
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10216
 
            case "$host_cpu" in
10217
 
            hppa*64*|ia64*)
10218
 
              # +Z the default
10219
 
              ;;
10220
 
            *)
10221
 
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10222
 
              ;;
10223
 
            esac
10224
 
            ;;
10225
 
          *)
10226
 
            ;;
10227
 
        esac
10228
 
        ;;
10229
 
      irix5* | irix6* | nonstopux*)
10230
 
        case $cc_basename in
10231
 
          CC)
10232
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10233
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10234
 
            # CC pic flag -KPIC is the default.
10235
 
            ;;
10236
 
          *)
10237
 
            ;;
10238
 
        esac
10239
 
        ;;
10240
 
      linux*)
10241
 
        case $cc_basename in
10242
 
          KCC)
10243
 
            # KAI C++ Compiler
10244
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10245
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10246
 
            ;;
10247
 
          icpc)
10248
 
            # Intel C++
10249
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10250
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10251
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10252
 
            ;; 
10253
 
          cxx)
10254
 
            # Compaq C++
10255
 
            # Make sure the PIC flag is empty.  It appears that all Alpha
10256
 
            # Linux and Compaq Tru64 Unix objects are PIC.
10257
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10258
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10259
 
            ;;
10260
 
          *)
10261
 
            ;;
10262
 
        esac
10263
 
        ;;
10264
 
      lynxos*)
10265
 
        ;;
10266
 
      m88k*)
10267
 
        ;;
10268
 
      mvs*)
10269
 
        case $cc_basename in
10270
 
          cxx)
10271
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10272
 
            ;;
10273
 
          *)
10274
 
            ;;
10275
 
        esac
10276
 
        ;;
10277
 
      netbsd*)
10278
 
        ;;
10279
 
      osf3* | osf4* | osf5*)
10280
 
        case $cc_basename in
10281
 
          KCC)
10282
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10283
 
            ;;
10284
 
          RCC)
10285
 
            # Rational C++ 2.4.1
10286
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10287
 
            ;;
10288
 
          cxx)
10289
 
            # Digital/Compaq C++
10290
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10291
 
            # Make sure the PIC flag is empty.  It appears that all Alpha
10292
 
            # Linux and Compaq Tru64 Unix objects are PIC.
10293
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10294
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10295
 
            ;;
10296
 
          *)
10297
 
            ;;
10298
 
        esac
10299
 
        ;;
10300
 
      psos*)
10301
 
        ;;
10302
 
      sco*)
10303
 
        case $cc_basename in
10304
 
          CC)
10305
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10306
 
            ;;
10307
 
          *)
10308
 
            ;;
10309
 
        esac
10310
 
        ;;
10311
 
      solaris*)
10312
 
        case $cc_basename in
10313
 
          CC)
10314
 
            # Sun C++ 4.2, 5.x and Centerline C++
10315
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10316
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10317
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10318
 
            ;;
10319
 
          gcx)
10320
 
            # Green Hills C++ Compiler
10321
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10322
 
            ;;
10323
 
          *)
10324
 
            ;;
10325
 
        esac
10326
 
        ;;
10327
 
      sunos4*)
10328
 
        case $cc_basename in
10329
 
          CC)
10330
 
            # Sun C++ 4.x
10331
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10332
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10333
 
            ;;
10334
 
          lcc)
10335
 
            # Lucid
10336
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10337
 
            ;;
10338
 
          *)
10339
 
            ;;
10340
 
        esac
10341
 
        ;;
10342
 
      tandem*)
10343
 
        case $cc_basename in
10344
 
          NCC)
10345
 
            # NonStop-UX NCC 3.20
10346
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10347
 
            ;;
10348
 
          *)
10349
 
            ;;
10350
 
        esac
10351
 
        ;;
10352
 
      unixware*)
10353
 
        ;;
10354
 
      vxworks*)
10355
 
        ;;
10356
 
      *)
10357
 
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10358
 
        ;;
10359
 
    esac
10360
 
  fi
10361
 
],
10362
 
[
10363
 
  if test "$GCC" = yes; then
10364
 
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10365
 
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10366
 
 
10367
 
    case $host_os in
10368
 
      aix*)
10369
 
      # All AIX code is PIC.
10370
 
      if test "$host_cpu" = ia64; then
10371
 
        # AIX 5 now supports IA64 processor
10372
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10373
 
      fi
10374
 
      ;;
10375
 
 
10376
 
    amigaos*)
10377
 
      # FIXME: we need at least 68020 code to build shared libraries, but
10378
 
      # adding the `-m68020' flag to GCC prevents building anything better,
10379
 
      # like `-m68040'.
10380
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10381
 
      ;;
10382
 
 
10383
 
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10384
 
      # PIC is the default for these OSes.
10385
 
      ;;
10386
 
 
10387
 
    mingw* | pw32* | os2*)
10388
 
      # This hack is so that the source file can tell whether it is being
10389
 
      # built for inclusion in a dll (and should export symbols for example).
10390
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10391
 
      ;;
10392
 
 
10393
 
    darwin* | rhapsody*)
10394
 
      # PIC is the default on this platform
10395
 
      # Common symbols not allowed in MH_DYLIB files
10396
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10397
 
      ;;
10398
 
 
10399
 
    msdosdjgpp*)
10400
 
      # Just because we use GCC doesn't mean we suddenly get shared libraries
10401
 
      # on systems that don't support them.
10402
 
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10403
 
      enable_shared=no
10404
 
      ;;
10405
 
 
10406
 
    sysv4*MP*)
10407
 
      if test -d /usr/nec; then
10408
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10409
 
      fi
10410
 
      ;;
10411
 
 
10412
 
    hpux*)
10413
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10414
 
      # not for PA HP-UX.
10415
 
      case "$host_cpu" in
10416
 
      hppa*64*|ia64*)
10417
 
        # +Z the default
10418
 
        ;;
10419
 
      *)
10420
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10421
 
        ;;
10422
 
      esac
10423
 
      ;;
10424
 
 
10425
 
    *)
10426
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10427
 
      ;;
10428
 
    esac
10429
 
  else
10430
 
    # PORTME Check for flag to pass linker flags through the system compiler.
10431
 
    case $host_os in
10432
 
    aix*)
10433
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10434
 
      if test "$host_cpu" = ia64; then
10435
 
        # AIX 5 now supports IA64 processor
10436
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10437
 
      else
10438
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10439
 
      fi
10440
 
      ;;
10441
 
 
10442
 
    mingw* | pw32* | os2*)
10443
 
      # This hack is so that the source file can tell whether it is being
10444
 
      # built for inclusion in a dll (and should export symbols for example).
10445
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10446
 
      ;;
10447
 
 
10448
 
    hpux9* | hpux10* | hpux11*)
10449
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10450
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10451
 
      # not for PA HP-UX.
10452
 
      case "$host_cpu" in
10453
 
      hppa*64*|ia64*)
10454
 
        # +Z the default
10455
 
        ;;
10456
 
      *)
10457
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10458
 
        ;;
10459
 
      esac
10460
 
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
10461
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10462
 
      ;;
10463
 
 
10464
 
    irix5* | irix6* | nonstopux*)
10465
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10466
 
      # PIC (with -KPIC) is the default.
10467
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10468
 
      ;;
10469
 
 
10470
 
    newsos6)
10471
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10472
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10473
 
      ;;
10474
 
 
10475
 
    linux*)
10476
 
      case $CC in
10477
 
      icc* | ecc*)
10478
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10479
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10480
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10481
 
        ;;
10482
 
      ccc*)
10483
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10484
 
        # All Alpha code is PIC.
10485
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10486
 
        ;;
10487
 
      esac
10488
 
      ;;
10489
 
 
10490
 
    osf3* | osf4* | osf5*)
10491
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10492
 
      # All OSF/1 code is PIC.
10493
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10494
 
      ;;
10495
 
 
10496
 
    sco3.2v5*)
10497
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10498
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10499
 
      ;;
10500
 
 
10501
 
    solaris*)
10502
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10503
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10504
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10505
 
      ;;
10506
 
 
10507
 
    sunos4*)
10508
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10509
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10510
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10511
 
      ;;
10512
 
 
10513
 
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10514
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10515
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10516
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10517
 
      ;;
10518
 
 
10519
 
    sysv4*MP*)
10520
 
      if test -d /usr/nec ;then
10521
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10522
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10523
 
      fi
10524
 
      ;;
10525
 
 
10526
 
    uts4*)
10527
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10528
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10529
 
      ;;
10530
 
 
10531
 
    *)
10532
 
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10533
 
      ;;
10534
 
    esac
10535
 
  fi
10536
 
])
10537
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10538
 
 
10539
 
#
10540
 
# Check to make sure the PIC flag actually works.
10541
 
#
10542
 
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10543
 
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10544
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10545
 
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10546
 
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10547
 
     "" | " "*) ;;
10548
 
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10549
 
     esac],
10550
 
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10551
 
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10552
 
fi
10553
 
case "$host_os" in
10554
 
  # For platforms which do not support PIC, -DPIC is meaningless:
10555
 
  *djgpp*)
10556
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10557
 
    ;;
10558
 
  *)
10559
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10560
 
    ;;
10561
 
esac
10562
 
])
10563
 
 
10564
 
 
10565
 
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
10566
 
# ------------------------------------
10567
 
# See if the linker supports building shared libraries.
10568
 
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
10569
 
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10570
 
ifelse([$1],[CXX],[
10571
 
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10572
 
  case $host_os in
10573
 
  aix4* | aix5*)
10574
 
    # If we're using GNU nm, then we don't want the "-C" option.
10575
 
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
10576
 
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10577
 
      _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'
10578
 
    else
10579
 
      _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'
10580
 
    fi
10581
 
    ;;
10582
 
  pw32*)
10583
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10584
 
  ;;
10585
 
  cygwin* | mingw*)
10586
 
    _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'
10587
 
  ;;
10588
 
  *)
10589
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10590
 
  ;;
10591
 
  esac
10592
 
],[
10593
 
  runpath_var=
10594
 
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
10595
 
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10596
 
  _LT_AC_TAGVAR(archive_cmds, $1)=
10597
 
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10598
 
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10599
 
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10600
 
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10601
 
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10602
 
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
10603
 
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10604
 
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
10605
 
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10606
 
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
10607
 
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10608
 
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10609
 
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
10610
 
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
10611
 
  _LT_AC_TAGVAR(module_cmds, $1)=
10612
 
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
10613
 
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
10614
 
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10615
 
  # include_expsyms should be a list of space-separated symbols to be *always*
10616
 
  # included in the symbol list
10617
 
  _LT_AC_TAGVAR(include_expsyms, $1)=
10618
 
  # exclude_expsyms can be an extended regexp of symbols to exclude
10619
 
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
10620
 
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10621
 
  # as well as any symbol that contains `d'.
10622
 
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
10623
 
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10624
 
  # platforms (ab)use it in PIC code, but their linkers get confused if
10625
 
  # the symbol is explicitly referenced.  Since portable code cannot
10626
 
  # rely on this symbol name, it's probably fine to never include it in
10627
 
  # preloaded symbol tables.
10628
 
  extract_expsyms_cmds=
10629
 
 
10630
 
  case $host_os in
10631
 
  cygwin* | mingw* | pw32*)
10632
 
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
10633
 
    # When not using gcc, we currently assume that we are using
10634
 
    # Microsoft Visual C++.
10635
 
    if test "$GCC" != yes; then
10636
 
      with_gnu_ld=no
10637
 
    fi
10638
 
    ;;
10639
 
  openbsd*)
10640
 
    with_gnu_ld=no
10641
 
    ;;
10642
 
  esac
10643
 
 
10644
 
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
10645
 
  if test "$with_gnu_ld" = yes; then
10646
 
    # If archive_cmds runs LD, not CC, wlarc should be empty
10647
 
    wlarc='${wl}'
10648
 
 
10649
 
    # See if GNU ld supports shared libraries.
10650
 
    case $host_os in
10651
 
    aix3* | aix4* | aix5*)
10652
 
      # On AIX/PPC, the GNU linker is very broken
10653
 
      if test "$host_cpu" != ia64; then
10654
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10655
 
        cat <<EOF 1>&2
10656
 
 
10657
 
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
10658
 
*** to be unable to reliably create shared libraries on AIX.
10659
 
*** Therefore, libtool is disabling shared libraries support.  If you
10660
 
*** really care for shared libraries, you may want to modify your PATH
10661
 
*** so that a non-GNU linker is found, and then restart.
10662
 
 
10663
 
EOF
10664
 
      fi
10665
 
      ;;
10666
 
 
10667
 
    amigaos*)
10668
 
      _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)'
10669
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10670
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10671
 
 
10672
 
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
10673
 
      # that the semantics of dynamic libraries on AmigaOS, at least up
10674
 
      # to version 4, is to share data among multiple programs linked
10675
 
      # with the same dynamic library.  Since this doesn't match the
10676
 
      # behavior of shared libraries on other platforms, we can't use
10677
 
      # them.
10678
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10679
 
      ;;
10680
 
 
10681
 
    beos*)
10682
 
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10683
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10684
 
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10685
 
        # support --undefined.  This deserves some investigation.  FIXME
10686
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10687
 
      else
10688
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10689
 
      fi
10690
 
      ;;
10691
 
 
10692
 
    cygwin* | mingw* | pw32*)
10693
 
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10694
 
      # as there is no search path for DLLs.
10695
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10696
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10697
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
10698
 
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10699
 
      _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'
10700
 
 
10701
 
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10702
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10703
 
        # If the export-symbols file already is a .def file (1st line
10704
 
        # is EXPORTS), use it as is; otherwise, prepend...
10705
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10706
 
          cp $export_symbols $output_objdir/$soname.def;
10707
 
        else
10708
 
          echo EXPORTS > $output_objdir/$soname.def;
10709
 
          cat $export_symbols >> $output_objdir/$soname.def;
10710
 
        fi~
10711
 
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
10712
 
      else
10713
 
        ld_shlibs=no
10714
 
      fi
10715
 
      ;;
10716
 
 
10717
 
    netbsd*)
10718
 
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10719
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10720
 
        wlarc=
10721
 
      else
10722
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10723
 
        _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'
10724
 
      fi
10725
 
      ;;
10726
 
 
10727
 
    solaris* | sysv5*)
10728
 
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
10729
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10730
 
        cat <<EOF 1>&2
10731
 
 
10732
 
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10733
 
*** create shared libraries on Solaris systems.  Therefore, libtool
10734
 
*** is disabling shared libraries support.  We urge you to upgrade GNU
10735
 
*** binutils to release 2.9.1 or newer.  Another option is to modify
10736
 
*** your PATH or compiler configuration so that the native linker is
10737
 
*** used, and then restart.
10738
 
 
10739
 
EOF
10740
 
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10741
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10742
 
        _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'
10743
 
      else
10744
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10745
 
      fi
10746
 
      ;;
10747
 
 
10748
 
    sunos4*)
10749
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10750
 
      wlarc=
10751
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10752
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10753
 
      ;;
10754
 
 
10755
 
    *)
10756
 
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10757
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10758
 
        _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'
10759
 
      else
10760
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10761
 
      fi
10762
 
      ;;
10763
 
    esac
10764
 
 
10765
 
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10766
 
      runpath_var=LD_RUN_PATH
10767
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10768
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10769
 
      # ancient GNU ld didn't support --whole-archive et. al.
10770
 
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
10771
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10772
 
      else
10773
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10774
 
      fi
10775
 
    fi
10776
 
  else
10777
 
    # PORTME fill in a description of your system's linker (not GNU ld)
10778
 
    case $host_os in
10779
 
    aix3*)
10780
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10781
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10782
 
      _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'
10783
 
      # Note: this linker hardcodes the directories in LIBPATH if there
10784
 
      # are no directories specified by -L.
10785
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10786
 
      if test "$GCC" = yes && test -z "$link_static_flag"; then
10787
 
        # Neither direct hardcoding nor static linking is supported with a
10788
 
        # broken collect2.
10789
 
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10790
 
      fi
10791
 
      ;;
10792
 
 
10793
 
    aix4* | aix5*)
10794
 
      if test "$host_cpu" = ia64; then
10795
 
        # On IA64, the linker does run time linking by default, so we don't
10796
 
        # have to do anything special.
10797
 
        aix_use_runtimelinking=no
10798
 
        exp_sym_flag='-Bexport'
10799
 
        no_entry_flag=""
10800
 
      else
10801
 
        # If we're using GNU nm, then we don't want the "-C" option.
10802
 
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
10803
 
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10804
 
          _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'
10805
 
        else
10806
 
          _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'
10807
 
        fi
10808
 
 
10809
 
        # KDE requires run time linking.  Make it the default.
10810
 
        aix_use_runtimelinking=yes
10811
 
        exp_sym_flag='-bexport'
10812
 
        no_entry_flag='-bnoentry'
10813
 
      fi
10814
 
 
10815
 
      # When large executables or shared objects are built, AIX ld can
10816
 
      # have problems creating the table of contents.  If linking a library
10817
 
      # or program results in "error TOC overflow" add -mminimal-toc to
10818
 
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
10819
 
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10820
 
 
10821
 
      _LT_AC_TAGVAR(archive_cmds, $1)=''
10822
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10823
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10824
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10825
 
 
10826
 
      if test "$GCC" = yes; then
10827
 
        case $host_os in aix4.[012]|aix4.[012].*)
10828
 
        # We only want to do this on AIX 4.2 and lower, the check
10829
 
        # below for broken collect2 doesn't work under 4.3+
10830
 
          collect2name=`${CC} -print-prog-name=collect2`
10831
 
          if test -f "$collect2name" && \
10832
 
           strings "$collect2name" | grep resolve_lib_name >/dev/null
10833
 
          then
10834
 
          # We have reworked collect2
10835
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10836
 
          else
10837
 
          # We have old collect2
10838
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10839
 
          # It fails to find uninstalled libraries when the uninstalled
10840
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
10841
 
          # to unsupported forces relinking
10842
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10843
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10844
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10845
 
          fi
10846
 
        esac
10847
 
        shared_flag='-shared'
10848
 
      else
10849
 
        # not using gcc
10850
 
        if test "$host_cpu" = ia64; then
10851
 
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10852
 
        # chokes on -Wl,-G. The following line is correct:
10853
 
          shared_flag='-G'
10854
 
        else
10855
 
        if test "$aix_use_runtimelinking" = yes; then
10856
 
            shared_flag='-qmkshrobj ${wl}-G'
10857
 
          else
10858
 
            shared_flag='-qmkshrobj'
10859
 
        fi
10860
 
        fi
10861
 
      fi
10862
 
 
10863
 
      # Let the compiler handle the export list.
10864
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
10865
 
      if test "$aix_use_runtimelinking" = yes; then
10866
 
        # Warning - without using the other runtime loading flags (-brtl),
10867
 
        # -berok will link without error, but may produce a broken library.
10868
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10869
 
       # Determine the default libpath from the value encoded in an empty executable.
10870
 
        _LT_AC_SYS_LIBPATH_AIX
10871
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10872
 
        _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"
10873
 
        _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"
10874
 
       else
10875
 
        if test "$host_cpu" = ia64; then
10876
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10877
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10878
 
          _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"
10879
 
        else
10880
 
         # Determine the default libpath from the value encoded in an empty executable.
10881
 
         _LT_AC_SYS_LIBPATH_AIX
10882
 
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10883
 
          # Warning - without using the other run time loading flags,
10884
 
          # -berok will link without error, but may produce a broken library.
10885
 
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10886
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10887
 
          # -bexpall does not export symbols beginning with underscore (_)
10888
 
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10889
 
          # Exported symbols can be pulled into shared objects from archives
10890
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10891
 
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10892
 
          # This is similar to how AIX traditionally builds it's shared libraries.
10893
 
          _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'
10894
 
        fi
10895
 
      fi
10896
 
      ;;
10897
 
 
10898
 
    amigaos*)
10899
 
      _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)'
10900
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10901
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10902
 
      # see comment about different semantics on the GNU ld section
10903
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10904
 
      ;;
10905
 
 
10906
 
    bsdi4*)
10907
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10908
 
      ;;
10909
 
 
10910
 
    cygwin* | mingw* | pw32*)
10911
 
      # When not using gcc, we currently assume that we are using
10912
 
      # Microsoft Visual C++.
10913
 
      # hardcode_libdir_flag_spec is actually meaningless, as there is
10914
 
      # no search path for DLLs.
10915
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10916
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10917
 
      # Tell ltmain to make .lib files, not .a files.
10918
 
      libext=lib
10919
 
      # Tell ltmain to make .dll files, not .so files.
10920
 
      shrext=".dll"
10921
 
      # FIXME: Setting linknames here is a bad hack.
10922
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
10923
 
      # The linker will automatically build a .lib file if we build a DLL.
10924
 
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10925
 
      # FIXME: Should let the user specify the lib program.
10926
 
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10927
 
      fix_srcfile_path='`cygpath -w "$srcfile"`'
10928
 
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10929
 
      ;;
10930
 
 
10931
 
    darwin* | rhapsody*)
10932
 
    if test "$GXX" = yes ; then
10933
 
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10934
 
      case "$host_os" in
10935
 
      rhapsody* | darwin1.[[012]])
10936
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
10937
 
        ;;
10938
 
      *) # Darwin 1.3 on
10939
 
        test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
10940
 
        ;;
10941
 
      esac
10942
 
        lt_int_apple_cc_single_mod=no
10943
 
        output_verbose_link_cmd='echo'
10944
 
        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
10945
 
          lt_int_apple_cc_single_mod=yes
10946
 
        fi
10947
 
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10948
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
10949
 
        else
10950
 
        _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'
10951
 
      fi
10952
 
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
10953
 
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
10954
 
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10955
 
          _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}'
10956
 
        else
10957
 
          _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}'
10958
 
        fi
10959
 
          _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}'
10960
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
10961
 
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
10962
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10963
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10964
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10965
 
    else  
10966
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10967
 
    fi  
10968
 
      ;;
10969
 
 
10970
 
    dgux*)
10971
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10972
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10973
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10974
 
      ;;
10975
 
 
10976
 
    freebsd1*)
10977
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10978
 
      ;;
10979
 
 
10980
 
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10981
 
    # support.  Future versions do this automatically, but an explicit c++rt0.o
10982
 
    # does not break anything, and helps significantly (at the cost of a little
10983
 
    # extra space).
10984
 
    freebsd2.2*)
10985
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10986
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10987
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10988
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10989
 
      ;;
10990
 
 
10991
 
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10992
 
    freebsd2*)
10993
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10994
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10995
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10996
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10997
 
      ;;
10998
 
 
10999
 
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11000
 
    freebsd*)
11001
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
11002
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11003
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11004
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11005
 
      ;;
11006
 
 
11007
 
    hpux9*)
11008
 
      if test "$GCC" = yes; then
11009
 
        _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'
11010
 
      else
11011
 
        _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'
11012
 
      fi
11013
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11014
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11015
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11016
 
 
11017
 
      # hardcode_minus_L: Not really in the search PATH,
11018
 
      # but as the default location of the library.
11019
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11020
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11021
 
      ;;
11022
 
 
11023
 
    hpux10* | hpux11*)
11024
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11025
 
        case "$host_cpu" in
11026
 
        hppa*64*|ia64*)
11027
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11028
 
          ;;
11029
 
        *)
11030
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11031
 
          ;;
11032
 
        esac
11033
 
      else
11034
 
        case "$host_cpu" in
11035
 
        hppa*64*|ia64*)
11036
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
11037
 
          ;;
11038
 
        *)
11039
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11040
 
          ;;
11041
 
        esac
11042
 
      fi
11043
 
      if test "$with_gnu_ld" = no; then
11044
 
        case "$host_cpu" in
11045
 
        hppa*64*)
11046
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11047
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11048
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11049
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
11050
 
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11051
 
          ;;
11052
 
        ia64*)
11053
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11054
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
11055
 
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11056
 
 
11057
 
          # hardcode_minus_L: Not really in the search PATH,
11058
 
          # but as the default location of the library.
11059
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11060
 
          ;;
11061
 
        *)
11062
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11063
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11064
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11065
 
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11066
 
 
11067
 
          # hardcode_minus_L: Not really in the search PATH,
11068
 
          # but as the default location of the library.
11069
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11070
 
          ;;
11071
 
        esac
11072
 
      fi
11073
 
      ;;
11074
 
 
11075
 
    irix5* | irix6* | nonstopux*)
11076
 
      if test "$GCC" = yes; then
11077
 
        _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'
11078
 
      else
11079
 
        _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'
11080
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11081
 
      fi
11082
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11083
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11084
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11085
 
      ;;
11086
 
 
11087
 
    netbsd*)
11088
 
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11089
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
11090
 
      else
11091
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
11092
 
      fi
11093
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11094
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11095
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11096
 
      ;;
11097
 
 
11098
 
    newsos6)
11099
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11100
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11101
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11102
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11103
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11104
 
      ;;
11105
 
 
11106
 
    openbsd*)
11107
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11108
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11109
 
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11110
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11111
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11112
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11113
 
      else
11114
 
       case $host_os in
11115
 
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11116
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11117
 
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11118
 
           ;;
11119
 
         *)
11120
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11121
 
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11122
 
           ;;
11123
 
       esac
11124
 
      fi
11125
 
      ;;
11126
 
 
11127
 
    os2*)
11128
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11129
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11130
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11131
 
      _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'
11132
 
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11133
 
      ;;
11134
 
 
11135
 
    osf3*)
11136
 
      if test "$GCC" = yes; then
11137
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11138
 
        _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'
11139
 
      else
11140
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11141
 
        _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'
11142
 
      fi
11143
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11144
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11145
 
      ;;
11146
 
 
11147
 
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
11148
 
      if test "$GCC" = yes; then
11149
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11150
 
        _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'
11151
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11152
 
      else
11153
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11154
 
        _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'
11155
 
        _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~
11156
 
        $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'
11157
 
 
11158
 
        # Both c and cxx compiler support -rpath directly
11159
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
11160
 
      fi
11161
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11162
 
      ;;
11163
 
 
11164
 
    sco3.2v5*)
11165
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11166
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11167
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
11168
 
      runpath_var=LD_RUN_PATH
11169
 
      hardcode_runpath_var=yes
11170
 
      ;;
11171
 
 
11172
 
    solaris*)
11173
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11174
 
      if test "$GCC" = yes; then
11175
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11176
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11177
 
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
11178
 
      else
11179
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11180
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11181
 
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11182
 
      fi
11183
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11184
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11185
 
      case $host_os in
11186
 
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11187
 
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
11188
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
11189
 
      esac
11190
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11191
 
      ;;
11192
 
 
11193
 
    sunos4*)
11194
 
      if test "x$host_vendor" = xsequent; then
11195
 
        # Use $CC to link under sequent, because it throws in some extra .o
11196
 
        # files that make .init and .fini sections work.
11197
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
11198
 
      else
11199
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11200
 
      fi
11201
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11202
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11203
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11204
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11205
 
      ;;
11206
 
 
11207
 
    sysv4)
11208
 
      case $host_vendor in
11209
 
        sni)
11210
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11211
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
11212
 
        ;;
11213
 
        siemens)
11214
 
          ## LD is ld it makes a PLAMLIB
11215
 
          ## CC just makes a GrossModule.
11216
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11217
 
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
11218
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
11219
 
        ;;
11220
 
        motorola)
11221
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11222
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
11223
 
        ;;
11224
 
      esac
11225
 
      runpath_var='LD_RUN_PATH'
11226
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11227
 
      ;;
11228
 
 
11229
 
    sysv4.3*)
11230
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11231
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11232
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
11233
 
      ;;
11234
 
 
11235
 
    sysv4*MP*)
11236
 
      if test -d /usr/nec; then
11237
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11238
 
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11239
 
        runpath_var=LD_RUN_PATH
11240
 
        hardcode_runpath_var=yes
11241
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
11242
 
      fi
11243
 
      ;;
11244
 
 
11245
 
    sysv4.2uw2*)
11246
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11247
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11248
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11249
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11250
 
      hardcode_runpath_var=yes
11251
 
      runpath_var=LD_RUN_PATH
11252
 
      ;;
11253
 
 
11254
 
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
11255
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
11256
 
      if test "$GCC" = yes; then
11257
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11258
 
      else
11259
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11260
 
      fi
11261
 
      runpath_var='LD_RUN_PATH'
11262
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11263
 
      ;;
11264
 
 
11265
 
    sysv5*)
11266
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11267
 
      # $CC -shared without GNU ld will not create a library from C++
11268
 
      # object files and a static libstdc++, better avoid it by now
11269
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11270
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11271
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11272
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11273
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11274
 
      runpath_var='LD_RUN_PATH'
11275
 
      ;;
11276
 
 
11277
 
    uts4*)
11278
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11279
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11280
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11281
 
      ;;
11282
 
 
11283
 
    *)
11284
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11285
 
      ;;
11286
 
    esac
11287
 
  fi
11288
 
])
11289
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
11290
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
11291
 
 
11292
 
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11293
 
if test "$GCC" = yes; then
11294
 
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11295
 
fi
11296
 
 
11297
 
#
11298
 
# Do we need to explicitly link libc?
11299
 
#
11300
 
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11301
 
x|xyes)
11302
 
  # Assume -lc should be added
11303
 
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11304
 
 
11305
 
  if test "$enable_shared" = yes && test "$GCC" = yes; then
11306
 
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
11307
 
    *'~'*)
11308
 
      # FIXME: we may have to deal with multi-command sequences.
11309
 
      ;;
11310
 
    '$CC '*)
11311
 
      # Test whether the compiler implicitly links with -lc since on some
11312
 
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
11313
 
      # to ld, don't add -lc before -lgcc.
11314
 
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11315
 
      $rm conftest*
11316
 
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11317
 
  
11318
 
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11319
 
        soname=conftest
11320
 
        lib=conftest
11321
 
        libobjs=conftest.$ac_objext
11322
 
        deplibs=
11323
 
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11324
 
        compiler_flags=-v
11325
 
        linker_flags=-v
11326
 
        verstring=
11327
 
        output_objdir=.
11328
 
        libname=conftest
11329
 
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11330
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
11331
 
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11332
 
        then
11333
 
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11334
 
        else
11335
 
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11336
 
        fi
11337
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11338
 
      else
11339
 
        cat conftest.err 1>&5
11340
 
      fi
11341
 
      $rm conftest*
11342
 
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11343
 
      ;;
11344
 
    esac
11345
 
  fi
11346
 
  ;;
11347
 
esac
11348
 
])# AC_LIBTOOL_PROG_LD_SHLIBS
11349
 
 
11350
 
 
11351
 
# _LT_AC_FILE_LTDLL_C
11352
 
# -------------------
11353
 
# Be careful that the start marker always follows a newline.
11354
 
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11355
 
# /* ltdll.c starts here */
11356
 
# #define WIN32_LEAN_AND_MEAN
11357
 
# #include <windows.h>
11358
 
# #undef WIN32_LEAN_AND_MEAN
11359
 
# #include <stdio.h>
11360
 
#
11361
 
# #ifndef __CYGWIN__
11362
 
# #  ifdef __CYGWIN32__
11363
 
# #    define __CYGWIN__ __CYGWIN32__
11364
 
# #  endif
11365
 
# #endif
11366
 
#
11367
 
# #ifdef __cplusplus
11368
 
# extern "C" {
11369
 
# #endif
11370
 
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11371
 
# #ifdef __cplusplus
11372
 
# }
11373
 
# #endif
11374
 
#
11375
 
# #ifdef __CYGWIN__
11376
 
# #include <cygwin/cygwin_dll.h>
11377
 
# DECLARE_CYGWIN_DLL( DllMain );
11378
 
# #endif
11379
 
# HINSTANCE __hDllInstance_base;
11380
 
#
11381
 
# BOOL APIENTRY
11382
 
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11383
 
# {
11384
 
#   __hDllInstance_base = hInst;
11385
 
#   return TRUE;
11386
 
# }
11387
 
# /* ltdll.c ends here */
11388
 
])# _LT_AC_FILE_LTDLL_C
11389
 
 
11390
 
 
11391
 
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
11392
 
# ---------------------------------
11393
 
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11394
 
 
11395
 
 
11396
 
# old names
11397
 
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
11398
 
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
11399
 
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
11400
 
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11401
 
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11402
 
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
11403
 
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
11404
 
 
11405
 
# This is just to silence aclocal about the macro not being used
11406
 
ifelse([AC_DISABLE_FAST_INSTALL])
11407
 
 
11408
 
AC_DEFUN([LT_AC_PROG_GCJ],
11409
 
[AC_CHECK_TOOL(GCJ, gcj, no)
11410
 
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11411
 
  AC_SUBST(GCJFLAGS)
11412
 
])
11413
 
 
11414
 
AC_DEFUN([LT_AC_PROG_RC],
11415
 
[AC_CHECK_TOOL(RC, windres, no)
11416
 
])
11417
 
 
11418
 
############################################################
11419
 
# NOTE: This macro has been submitted for inclusion into   #
11420
 
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
11421
 
#  a released version of Autoconf we should remove this    #
11422
 
#  macro and use it instead.                               #
11423
 
############################################################
11424
 
# LT_AC_PROG_SED
11425
 
# --------------
11426
 
# Check for a fully-functional sed program, that truncates
11427
 
# as few characters as possible.  Prefer GNU sed if found.
11428
 
AC_DEFUN([LT_AC_PROG_SED],
11429
 
[AC_MSG_CHECKING([for a sed that does not truncate output])
11430
 
AC_CACHE_VAL(lt_cv_path_SED,
11431
 
[# Loop through the user's path and test for sed and gsed.
11432
 
# Then use that list of sed's as ones to test for truncation.
11433
 
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11434
 
for as_dir in $PATH
11435
 
do
11436
 
  IFS=$as_save_IFS
11437
 
  test -z "$as_dir" && as_dir=.
11438
 
  for lt_ac_prog in sed gsed; do
11439
 
    for ac_exec_ext in '' $ac_executable_extensions; do
11440
 
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11441
 
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11442
 
      fi
11443
 
    done
11444
 
  done
11445
 
done
11446
 
lt_ac_max=0
11447
 
lt_ac_count=0
11448
 
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11449
 
# along with /bin/sed that truncates output.
11450
 
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11451
 
  test ! -f $lt_ac_sed && break
11452
 
  cat /dev/null > conftest.in
11453
 
  lt_ac_count=0
11454
 
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11455
 
  # Check for GNU sed and select it if it is found.
11456
 
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11457
 
    lt_cv_path_SED=$lt_ac_sed
11458
 
    break
11459
 
  fi
11460
 
  while true; do
11461
 
    cat conftest.in conftest.in >conftest.tmp
11462
 
    mv conftest.tmp conftest.in
11463
 
    cp conftest.in conftest.nl
11464
 
    echo >>conftest.nl
11465
 
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11466
 
    cmp -s conftest.out conftest.nl || break
11467
 
    # 10000 chars as input seems more than enough
11468
 
    test $lt_ac_count -gt 10 && break
11469
 
    lt_ac_count=`expr $lt_ac_count + 1`
11470
 
    if test $lt_ac_count -gt $lt_ac_max; then
11471
 
      lt_ac_max=$lt_ac_count
11472
 
      lt_cv_path_SED=$lt_ac_sed
11473
 
    fi
11474
 
  done
11475
 
done
11476
 
])
11477
 
SED=$lt_cv_path_SED
11478
 
AC_MSG_RESULT([$SED])
11479
 
])