~ubuntu-branches/ubuntu/karmic/ksociograma/karmic

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Juan Manuel Garcia Molina
  • Date: 2004-09-05 18:09:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040905180937-ynzomyspxrp80vtk
Tags: upstream-2.0.1
ImportĀ upstreamĀ versionĀ 2.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
 
2
 
 
3
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
4
# Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
 
13
 
 
14
 
 
15
dnl    This file is part of the KDE libraries/packages
 
16
dnl    Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
 
17
dnl              (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
 
18
 
 
19
dnl    This file is free software; you can redistribute it and/or
 
20
dnl    modify it under the terms of the GNU Library General Public
 
21
dnl    License as published by the Free Software Foundation; either
 
22
dnl    version 2 of the License, or (at your option) any later version.
 
23
 
 
24
dnl    This library is distributed in the hope that it will be useful,
 
25
dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
26
dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
27
dnl    Library General Public License for more details.
 
28
 
 
29
dnl    You should have received a copy of the GNU Library General Public License
 
30
dnl    along with this library; see the file COPYING.LIB.  If not, write to
 
31
dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
32
dnl    Boston, MA 02111-1307, USA.
 
33
 
 
34
dnl IMPORTANT NOTE:
 
35
dnl Please do not modify this file unless you expect your modifications to be
 
36
dnl carried into every other module in the repository. 
 
37
dnl
 
38
dnl Single-module modifications are best placed in configure.in for kdelibs
 
39
dnl and kdebase or configure.in.in if present.
 
40
 
 
41
# KDE_PATH_X_DIRECT
 
42
dnl Internal subroutine of AC_PATH_X.
 
43
dnl Set ac_x_includes and/or ac_x_libraries.
 
44
AC_DEFUN([KDE_PATH_X_DIRECT],
 
45
[
 
46
AC_REQUIRE([KDE_CHECK_LIB64])
 
47
 
 
48
if test "$ac_x_includes" = NO; then
 
49
  # Guess where to find include files, by looking for this one X11 .h file.
 
50
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
 
51
 
 
52
  # First, try using that file with no special directory specified.
 
53
AC_TRY_CPP([#include <$x_direct_test_include>],
 
54
[# We can compile using X headers with no special include directory.
 
55
ac_x_includes=],
 
56
[# Look for the header file in a standard set of common directories.
 
57
# Check X11 before X11Rn because it is often a symlink to the current release.
 
58
  for ac_dir in               \
 
59
    /usr/X11/include          \
 
60
    /usr/X11R6/include        \
 
61
    /usr/X11R5/include        \
 
62
    /usr/X11R4/include        \
 
63
                              \
 
64
    /usr/include/X11          \
 
65
    /usr/include/X11R6        \
 
66
    /usr/include/X11R5        \
 
67
    /usr/include/X11R4        \
 
68
                              \
 
69
    /usr/local/X11/include    \
 
70
    /usr/local/X11R6/include  \
 
71
    /usr/local/X11R5/include  \
 
72
    /usr/local/X11R4/include  \
 
73
                              \
 
74
    /usr/local/include/X11    \
 
75
    /usr/local/include/X11R6  \
 
76
    /usr/local/include/X11R5  \
 
77
    /usr/local/include/X11R4  \
 
78
                              \
 
79
    /usr/X386/include         \
 
80
    /usr/x386/include         \
 
81
    /usr/XFree86/include/X11  \
 
82
                              \
 
83
    /usr/include              \
 
84
    /usr/local/include        \
 
85
    /usr/unsupported/include  \
 
86
    /usr/athena/include       \
 
87
    /usr/local/x11r5/include  \
 
88
    /usr/lpp/Xamples/include  \
 
89
                              \
 
90
    /usr/openwin/include      \
 
91
    /usr/openwin/share/include \
 
92
    ; \
 
93
  do
 
94
    if test -r "$ac_dir/$x_direct_test_include"; then
 
95
      ac_x_includes=$ac_dir
 
96
      break
 
97
    fi
 
98
  done])
 
99
fi # $ac_x_includes = NO
 
100
 
 
101
if test "$ac_x_libraries" = NO; then
 
102
  # Check for the libraries.
 
103
 
 
104
  test -z "$x_direct_test_library" && x_direct_test_library=Xt
 
105
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
 
106
 
 
107
  # See if we find them without any special options.
 
108
  # Don't add to $LIBS permanently.
 
109
  ac_save_LIBS="$LIBS"
 
110
  LIBS="-l$x_direct_test_library $LIBS"
 
111
AC_TRY_LINK(, [${x_direct_test_function}()],
 
112
[LIBS="$ac_save_LIBS"
 
113
# We can link X programs with no special library path.
 
114
ac_x_libraries=],
 
115
[LIBS="$ac_save_LIBS"
 
116
# First see if replacing the include by lib works.
 
117
# Check X11 before X11Rn because it is often a symlink to the current release.
 
118
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
 
119
    /usr/X11/lib${kdelibsuff}           \
 
120
    /usr/X11R6/lib${kdelibsuff}         \
 
121
    /usr/X11R5/lib${kdelibsuff}         \
 
122
    /usr/X11R4/lib${kdelibsuff}         \
 
123
                                        \
 
124
    /usr/lib${kdelibsuff}/X11           \
 
125
    /usr/lib${kdelibsuff}/X11R6         \
 
126
    /usr/lib${kdelibsuff}/X11R5         \
 
127
    /usr/lib${kdelibsuff}/X11R4         \
 
128
                                        \
 
129
    /usr/local/X11/lib${kdelibsuff}     \
 
130
    /usr/local/X11R6/lib${kdelibsuff}   \
 
131
    /usr/local/X11R5/lib${kdelibsuff}   \
 
132
    /usr/local/X11R4/lib${kdelibsuff}   \
 
133
                                        \
 
134
    /usr/local/lib${kdelibsuff}/X11     \
 
135
    /usr/local/lib${kdelibsuff}/X11R6   \
 
136
    /usr/local/lib${kdelibsuff}/X11R5   \
 
137
    /usr/local/lib${kdelibsuff}/X11R4   \
 
138
                                        \
 
139
    /usr/X386/lib${kdelibsuff}          \
 
140
    /usr/x386/lib${kdelibsuff}          \
 
141
    /usr/XFree86/lib${kdelibsuff}/X11   \
 
142
                                        \
 
143
    /usr/lib${kdelibsuff}               \
 
144
    /usr/local/lib${kdelibsuff}         \
 
145
    /usr/unsupported/lib${kdelibsuff}   \
 
146
    /usr/athena/lib${kdelibsuff}        \
 
147
    /usr/local/x11r5/lib${kdelibsuff}   \
 
148
    /usr/lpp/Xamples/lib${kdelibsuff}   \
 
149
    /lib/usr/lib${kdelibsuff}/X11       \
 
150
                                        \
 
151
    /usr/openwin/lib${kdelibsuff}       \
 
152
    /usr/openwin/share/lib${kdelibsuff} \
 
153
    ; \
 
154
do
 
155
dnl Don't even attempt the hair of trying to link an X program!
 
156
  for ac_extension in a so sl; do
 
157
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
 
158
      ac_x_libraries=$ac_dir
 
159
      break 2
 
160
    fi
 
161
  done
 
162
done])
 
163
fi # $ac_x_libraries = NO
 
164
])
 
165
 
 
166
 
 
167
dnl ------------------------------------------------------------------------
 
168
dnl Find a file (or one of more files in a list of dirs)
 
169
dnl ------------------------------------------------------------------------
 
170
dnl
 
171
AC_DEFUN([AC_FIND_FILE],
 
172
[
 
173
$3=NO
 
174
for i in $2;
 
175
do
 
176
  for j in $1;
 
177
  do
 
178
    echo "configure: __oline__: $i/$j" >&AC_FD_CC
 
179
    if test -r "$i/$j"; then
 
180
      echo "taking that" >&AC_FD_CC
 
181
      $3=$i
 
182
      break 2
 
183
    fi
 
184
  done
 
185
done
 
186
])
 
187
 
 
188
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
 
189
dnl     if-not-found, test-parameter)
 
190
AC_DEFUN([KDE_FIND_PATH],
 
191
[
 
192
   AC_MSG_CHECKING([for $1])
 
193
   if test -n "$$2"; then
 
194
        kde_cv_path="$$2";
 
195
   else
 
196
        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
 
197
 
 
198
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
 
199
        [
 
200
        kde_cv_path="NONE"
 
201
        dirs="$3"
 
202
        kde_save_IFS=$IFS
 
203
        IFS=':'
 
204
        for dir in $PATH; do
 
205
          dirs="$dirs $dir"
 
206
        done
 
207
        IFS=$kde_save_IFS
 
208
 
 
209
        for dir in $dirs; do
 
210
          if test -x "$dir/$1"; then
 
211
            if test -n "$5"
 
212
            then
 
213
              evalstr="$dir/$1 $5 2>&1 "
 
214
              if eval $evalstr; then
 
215
                kde_cv_path="$dir/$1"
 
216
                break
 
217
              fi
 
218
            else
 
219
                kde_cv_path="$dir/$1"
 
220
                break
 
221
            fi
 
222
          fi
 
223
        done
 
224
 
 
225
        eval "kde_cv_path_$kde_cache=$kde_cv_path"
 
226
 
 
227
        ])
 
228
 
 
229
      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
 
230
 
 
231
   fi
 
232
 
 
233
   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
 
234
      AC_MSG_RESULT(not found)
 
235
      $4
 
236
   else
 
237
      AC_MSG_RESULT($kde_cv_path)
 
238
      $2=$kde_cv_path
 
239
 
 
240
   fi
 
241
])
 
242
 
 
243
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
 
244
[
 
245
    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
 
246
Please check whether you installed Qt correctly.
 
247
You need to have a running moc binary.
 
248
configure tried to run $ac_cv_path_moc and the test didn't
 
249
succeed. If configure shouldn't have tried this one, set
 
250
the environment variable MOC to the right one before running
 
251
configure.
 
252
])
 
253
])
 
254
 
 
255
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
 
256
[
 
257
    AC_MSG_WARN([No Qt ui compiler (uic) found!
 
258
Please check whether you installed Qt correctly.
 
259
You need to have a running uic binary.
 
260
configure tried to run $ac_cv_path_uic and the test didn't
 
261
succeed. If configure shouldn't have tried this one, set
 
262
the environment variable UIC to the right one before running
 
263
configure.
 
264
])
 
265
])
 
266
 
 
267
 
 
268
AC_DEFUN([KDE_CHECK_UIC_FLAG],
 
269
[
 
270
    AC_MSG_CHECKING([whether uic supports -$1 ])
 
271
    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
 
272
    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
 
273
    [
 
274
        cat >conftest.ui <<EOT
 
275
        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
 
276
EOT
 
277
        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
 
278
        if AC_TRY_EVAL(ac_uic_testrun); then
 
279
            eval "kde_cv_prog_uic_$kde_cache=yes"
 
280
        else
 
281
            eval "kde_cv_prog_uic_$kde_cache=no"
 
282
        fi
 
283
        rm -f conftest*
 
284
    ])
 
285
 
 
286
    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
 
287
        AC_MSG_RESULT([yes])
 
288
        :
 
289
        $3
 
290
    else
 
291
        AC_MSG_RESULT([no])
 
292
        :
 
293
        $4
 
294
    fi
 
295
])
 
296
 
 
297
 
 
298
dnl ------------------------------------------------------------------------
 
299
dnl Find the meta object compiler and the ui compiler in the PATH,
 
300
dnl in $QTDIR/bin, and some more usual places
 
301
dnl ------------------------------------------------------------------------
 
302
dnl
 
303
AC_DEFUN([AC_PATH_QT_MOC_UIC],
 
304
[
 
305
   AC_REQUIRE([KDE_CHECK_PERL])
 
306
   qt_bindirs=""
 
307
   for dir in $kde_qt_dirs; do
 
308
      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
 
309
   done
 
310
   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
 
311
   if test ! "$ac_qt_bindir" = "NO"; then
 
312
      qt_bindirs="$ac_qt_bindir $qt_bindirs"
 
313
   fi
 
314
 
 
315
   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
 
316
   if test -z "$UIC_NOT_NEEDED"; then
 
317
     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
 
318
     if test -z "$UIC_PATH" ; then
 
319
       KDE_UIC_ERROR_MESSAGE
 
320
       exit 1
 
321
     else
 
322
       UIC=$UIC_PATH
 
323
 
 
324
       if test $kde_qtver = 3; then
 
325
         KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
 
326
         KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
 
327
 
 
328
         if test x$ac_uic_supports_libpath = xyes; then
 
329
             UIC="$UIC -L \$(kde_widgetdir)"
 
330
         fi
 
331
         if test x$ac_uic_supports_nounload = xyes; then
 
332
             UIC="$UIC -nounload"
 
333
         fi
 
334
       fi
 
335
     fi
 
336
   else
 
337
     UIC="echo uic not available: "
 
338
   fi
 
339
 
 
340
   AC_SUBST(MOC)
 
341
   AC_SUBST(UIC)
 
342
 
 
343
   UIC_TR="i18n"
 
344
   if test $kde_qtver = 3; then
 
345
     UIC_TR="tr2i18n"
 
346
   fi
 
347
 
 
348
   AC_SUBST(UIC_TR)
 
349
])
 
350
 
 
351
AC_DEFUN([KDE_1_CHECK_PATHS],
 
352
[
 
353
  KDE_1_CHECK_PATH_HEADERS
 
354
 
 
355
  KDE_TEST_RPATH=
 
356
 
 
357
  if test -n "$USE_RPATH"; then
 
358
 
 
359
     if test -n "$kde_libraries"; then
 
360
       KDE_TEST_RPATH="-R $kde_libraries"
 
361
     fi
 
362
 
 
363
     if test -n "$qt_libraries"; then
 
364
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
 
365
     fi
 
366
 
 
367
     if test -n "$x_libraries"; then
 
368
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
 
369
     fi
 
370
 
 
371
     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
 
372
  fi
 
373
 
 
374
AC_MSG_CHECKING([for KDE libraries installed])
 
375
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'
 
376
 
 
377
if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
378
  AC_MSG_RESULT(yes)
 
379
else
 
380
  AC_MSG_ERROR([your system fails at linking a small KDE application!
 
381
Check, if your compiler is installed correctly and if you have used the
 
382
same compiler to compile Qt and kdelibs as you did use now.
 
383
For more details about this problem, look at the end of config.log.])
 
384
fi
 
385
 
 
386
if eval `KDEDIR= ./conftest 2>&5`; then
 
387
  kde_result=done
 
388
else
 
389
  kde_result=problems
 
390
fi
 
391
 
 
392
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
 
393
kde_have_all_paths=yes
 
394
 
 
395
KDE_SET_PATHS($kde_result)
 
396
 
 
397
])
 
398
 
 
399
AC_DEFUN([KDE_SET_PATHS],
 
400
[
 
401
  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
 
402
        kde_htmldir=\"$kde_htmldir\" \
 
403
        kde_appsdir=\"$kde_appsdir\" \
 
404
        kde_icondir=\"$kde_icondir\" \
 
405
        kde_sounddir=\"$kde_sounddir\" \
 
406
        kde_datadir=\"$kde_datadir\" \
 
407
        kde_locale=\"$kde_locale\" \
 
408
        kde_cgidir=\"$kde_cgidir\" \
 
409
        kde_confdir=\"$kde_confdir\" \
 
410
        kde_kcfgdir=\"$kde_kcfgdir\" \
 
411
        kde_mimedir=\"$kde_mimedir\" \
 
412
        kde_toolbardir=\"$kde_toolbardir\" \
 
413
        kde_wallpaperdir=\"$kde_wallpaperdir\" \
 
414
        kde_templatesdir=\"$kde_templatesdir\" \
 
415
        kde_bindir=\"$kde_bindir\" \
 
416
        kde_servicesdir=\"$kde_servicesdir\" \
 
417
        kde_servicetypesdir=\"$kde_servicetypesdir\" \
 
418
        kde_moduledir=\"$kde_moduledir\" \
 
419
        kde_styledir=\"$kde_styledir\" \
 
420
        kde_widgetdir=\"$kde_widgetdir\" \
 
421
        xdg_appsdir=\"$xdg_appsdir\" \
 
422
        xdg_menudir=\"$xdg_menudir\" \
 
423
        xdg_directorydir=\"$xdg_directorydir\" \
 
424
        kde_result=$1"
 
425
])
 
426
 
 
427
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
 
428
[
 
429
if test "$1" = "default"; then
 
430
 
 
431
  if test -z "$kde_htmldir"; then
 
432
    kde_htmldir='\${datadir}/doc/HTML'
 
433
  fi
 
434
  if test -z "$kde_appsdir"; then
 
435
    kde_appsdir='\${datadir}/applnk'
 
436
  fi
 
437
  if test -z "$kde_icondir"; then
 
438
    kde_icondir='\${datadir}/icons'
 
439
  fi
 
440
  if test -z "$kde_sounddir"; then
 
441
    kde_sounddir='\${datadir}/sounds'
 
442
  fi
 
443
  if test -z "$kde_datadir"; then
 
444
    kde_datadir='\${datadir}/apps'
 
445
  fi
 
446
  if test -z "$kde_locale"; then
 
447
    kde_locale='\${datadir}/locale'
 
448
  fi
 
449
  if test -z "$kde_cgidir"; then
 
450
    kde_cgidir='\${exec_prefix}/cgi-bin'
 
451
  fi
 
452
  if test -z "$kde_confdir"; then
 
453
    kde_confdir='\${datadir}/config'
 
454
  fi
 
455
  if test -z "$kde_kcfgdir"; then
 
456
    kde_kcfgdir='\${datadir}/config.kcfg'
 
457
  fi
 
458
  if test -z "$kde_mimedir"; then
 
459
    kde_mimedir='\${datadir}/mimelnk'
 
460
  fi
 
461
  if test -z "$kde_toolbardir"; then
 
462
    kde_toolbardir='\${datadir}/toolbar'
 
463
  fi
 
464
  if test -z "$kde_wallpaperdir"; then
 
465
    kde_wallpaperdir='\${datadir}/wallpapers'
 
466
  fi
 
467
  if test -z "$kde_templatesdir"; then
 
468
    kde_templatesdir='\${datadir}/templates'
 
469
  fi
 
470
  if test -z "$kde_bindir"; then
 
471
    kde_bindir='\${exec_prefix}/bin'
 
472
  fi
 
473
  if test -z "$kde_servicesdir"; then
 
474
    kde_servicesdir='\${datadir}/services'
 
475
  fi
 
476
  if test -z "$kde_servicetypesdir"; then
 
477
    kde_servicetypesdir='\${datadir}/servicetypes'
 
478
  fi
 
479
  if test -z "$kde_moduledir"; then
 
480
    if test "$kde_qtver" = "2"; then
 
481
      kde_moduledir='\${libdir}/kde2'
 
482
    else
 
483
      kde_moduledir='\${libdir}/kde3'
 
484
    fi
 
485
  fi
 
486
  if test -z "$kde_styledir"; then
 
487
    kde_styledir='\${libdir}/kde3/plugins/styles'
 
488
  fi
 
489
  if test -z "$kde_widgetdir"; then
 
490
    kde_widgetdir='\${libdir}/kde3/plugins/designer'
 
491
  fi
 
492
  if test -z "$xdg_appsdir"; then
 
493
    xdg_appsdir='\${datadir}/applications/kde'
 
494
  fi
 
495
  if test -z "$xdg_menudir"; then
 
496
    xdg_menudir='\${sysconfdir}/xdg/menus'
 
497
  fi
 
498
  if test -z "$xdg_directorydir"; then
 
499
    xdg_directorydir='\${datadir}/desktop-directories'
 
500
  fi
 
501
 
 
502
  KDE_SET_PATHS(defaults)
 
503
 
 
504
else
 
505
 
 
506
  if test $kde_qtver = 1; then
 
507
     AC_MSG_RESULT([compiling])
 
508
     KDE_1_CHECK_PATHS
 
509
  else
 
510
     AC_MSG_ERROR([path checking not yet supported for KDE 2])
 
511
  fi
 
512
 
 
513
fi
 
514
])
 
515
 
 
516
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
 
517
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
 
518
   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
 
519
   test -z "$kde_datadir" || test -z "$kde_locale"  ||
 
520
   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
 
521
   test -z "$kde_kcfgdir" ||
 
522
   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
 
523
   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
 
524
   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
 
525
   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
 
526
   test -z "$kde_styledir" || test -z "kde_widgetdir" ||
 
527
   test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
 
528
   test "x$kde_have_all_paths" != "xyes"; then
 
529
     kde_have_all_paths=no
 
530
  fi
 
531
])
 
532
 
 
533
AC_DEFUN([KDE_MISSING_PROG_ERROR],
 
534
[
 
535
    AC_MSG_ERROR([The important program $1 was not found!
 
536
Please check whether you installed KDE correctly.
 
537
])
 
538
])
 
539
 
 
540
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
 
541
[
 
542
    AC_MSG_ERROR([The important program $1 was not found!
 
543
Please check whether you installed aRts correctly or use
 
544
--without-arts to compile without aRts support (this will remove functionality).
 
545
])
 
546
])
 
547
 
 
548
AC_DEFUN([KDE_SUBST_PROGRAMS],
 
549
[
 
550
    AC_ARG_WITH(arts,
 
551
        AC_HELP_STRING([--without-arts],[build without aRts [default=yes]]),
 
552
        [build_arts=$withval],
 
553
        [build_arts=yes]
 
554
    )
 
555
    AM_CONDITIONAL(include_ARTS, test "$build_arts" != "no")
 
556
 
 
557
        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"
 
558
        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
 
559
        if test -n "$KDEDIRS"; then
 
560
           kde_save_IFS=$IFS
 
561
           IFS=:
 
562
           for dir in $KDEDIRS; do
 
563
                kde_default_bindirs="$dir/bin $kde_default_bindirs "
 
564
           done
 
565
           IFS=$kde_save_IFS
 
566
        fi
 
567
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
 
568
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
 
569
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
 
570
        if test "$build_arts" != "no"; then
 
571
          KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
 
572
          KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
 
573
        fi
 
574
        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
 
575
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
 
576
 
 
577
        kde32ornewer=1
 
578
        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
 
579
            kde32ornewer=
 
580
        else
 
581
            if test "$kde_qtver" = "3" && test "$kde_qtsubver" -le 1; then
 
582
                kde32ornewer=
 
583
            fi
 
584
        fi
 
585
 
 
586
        if test -n "$kde32ornewer"; then
 
587
            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
 
588
            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
 
589
        fi
 
590
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [XMLLINT=""])
 
591
 
 
592
        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
 
593
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
 
594
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
 
595
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
 
596
            if test "$KDE_XSL_STYLESHEET" = "NO"; then
 
597
                KDE_XSL_STYLESHEET=""
 
598
            else
 
599
                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
 
600
            fi
 
601
        fi
 
602
 
 
603
        DCOP_DEPENDENCIES='$(DCOPIDL)'
 
604
        if test -n "$kde32ornewer"; then
 
605
            KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
 
606
            DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
 
607
            AC_SUBST(KCONFIG_COMPILER)
 
608
            AC_SUBST(KCFG_DEPENDENCIES)
 
609
            AC_SUBST(DCOPIDLNG)
 
610
        fi
 
611
        AC_SUBST(DCOPIDL)
 
612
        AC_SUBST(DCOPIDL2CPP)
 
613
        AC_SUBST(DCOP_DEPENDENCIES)
 
614
        AC_SUBST(MCOPIDL)
 
615
        AC_SUBST(ARTSCCONFIG)
 
616
        AC_SUBST(KDECONFIG)
 
617
        AC_SUBST(MEINPROC)
 
618
        AC_SUBST(KDE_XSL_STYLESHEET)
 
619
        AC_SUBST(XMLLINT)
 
620
 
 
621
        if test -x "$KDECONFIG"; then # it can be "compiled"
 
622
          kde_libs_prefix=`$KDECONFIG --prefix`
 
623
          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
 
624
               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
 
625
                          This means it has been moved since you installed it.
 
626
                          This won't work. Please recompile kdelibs for the new prefix.
 
627
                          ])
 
628
           fi
 
629
           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
 
630
        else
 
631
           kde_libs_prefix='$(prefix)'
 
632
           kde_libs_htmldir='$(kde_htmldir)'
 
633
        fi
 
634
        AC_SUBST(kde_libs_prefix)
 
635
        AC_SUBST(kde_libs_htmldir)
 
636
])dnl
 
637
 
 
638
AC_DEFUN([AC_CREATE_KFSSTND],
 
639
[
 
640
AC_REQUIRE([AC_CHECK_RPATH])
 
641
 
 
642
AC_MSG_CHECKING([for KDE paths])
 
643
kde_result=""
 
644
kde_cached_paths=yes
 
645
AC_CACHE_VAL(kde_cv_all_paths,
 
646
[
 
647
  KDE_SET_DEFAULT_PATHS($1)
 
648
  kde_cached_paths=no
 
649
])
 
650
eval "$kde_cv_all_paths"
 
651
KDE_CHECK_PATHS_FOR_COMPLETENESS
 
652
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
 
653
  # wrong values were cached, may be, we can set better ones
 
654
  kde_result=
 
655
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
 
656
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
 
657
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
 
658
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
 
659
  kde_have_all_paths=
 
660
  kde_styledir=
 
661
  kde_widgetdir=
 
662
  xdg_appsdir = xdg_menudir= xdg_directorydir= 
 
663
  KDE_SET_DEFAULT_PATHS($1)
 
664
  eval "$kde_cv_all_paths"
 
665
  KDE_CHECK_PATHS_FOR_COMPLETENESS
 
666
  kde_result="$kde_result (cache overridden)"
 
667
fi
 
668
if test "$kde_have_all_paths" = "no"; then
 
669
  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
 
670
Since it had compiled and linked before, it must be a strange problem on your system.
 
671
Look at config.log for details. If you are not able to fix this, look at
 
672
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
 
673
(If you're using an egcs version on Linux, you may update binutils!)
 
674
])
 
675
else
 
676
  rm -f conftest*
 
677
  AC_MSG_RESULT($kde_result)
 
678
fi
 
679
 
 
680
bindir=$kde_bindir
 
681
 
 
682
KDE_SUBST_PROGRAMS
 
683
 
 
684
])
 
685
 
 
686
AC_DEFUN([AC_SUBST_KFSSTND],
 
687
[
 
688
AC_SUBST(kde_htmldir)
 
689
AC_SUBST(kde_appsdir)
 
690
AC_SUBST(kde_icondir)
 
691
AC_SUBST(kde_sounddir)
 
692
AC_SUBST(kde_datadir)
 
693
AC_SUBST(kde_locale)
 
694
AC_SUBST(kde_confdir)
 
695
AC_SUBST(kde_kcfgdir)
 
696
AC_SUBST(kde_mimedir)
 
697
AC_SUBST(kde_wallpaperdir)
 
698
AC_SUBST(kde_bindir)
 
699
dnl X Desktop Group standards
 
700
AC_SUBST(xdg_appsdir)
 
701
AC_SUBST(xdg_menudir)
 
702
AC_SUBST(xdg_directorydir)
 
703
dnl for KDE 2
 
704
AC_SUBST(kde_templatesdir)
 
705
AC_SUBST(kde_servicesdir)
 
706
AC_SUBST(kde_servicetypesdir)
 
707
AC_SUBST(kde_moduledir)
 
708
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
 
709
AC_SUBST(kde_styledir)
 
710
AC_SUBST(kde_widgetdir)
 
711
if test "$kde_qtver" = 1; then
 
712
  kde_minidir="$kde_icondir/mini"
 
713
else
 
714
# for KDE 1 - this breaks KDE2 apps using minidir, but
 
715
# that's the plan ;-/
 
716
  kde_minidir="/dev/null"
 
717
fi
 
718
dnl AC_SUBST(kde_minidir)
 
719
dnl AC_SUBST(kde_cgidir)
 
720
dnl AC_SUBST(kde_toolbardir)
 
721
])
 
722
 
 
723
AC_DEFUN([KDE_MISC_TESTS],
 
724
[
 
725
   dnl Checks for libraries.
 
726
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
 
727
   AC_SUBST(LIBUTIL)
 
728
   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
 
729
   AC_SUBST(LIBCOMPAT)
 
730
   kde_have_crypt=
 
731
   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
 
732
      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
 
733
        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
 
734
You should install libcrypt from another source or configure with PAM
 
735
support])
 
736
        kde_have_crypt=no
 
737
      ]))
 
738
   AC_SUBST(LIBCRYPT)
 
739
   if test $kde_have_crypt = yes; then
 
740
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
 
741
   fi
 
742
   AC_CHECK_SOCKLEN_T
 
743
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
 
744
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
 
745
      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
 
746
        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
 
747
   fi
 
748
   AC_CHECK_FUNC(inet_ntoa)
 
749
   if test $ac_cv_func_inet_ntoa = no; then
 
750
     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
 
751
   fi
 
752
   AC_CHECK_FUNC(connect)
 
753
   if test $ac_cv_func_connect = no; then
 
754
      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
 
755
        $X_EXTRA_LIBS)
 
756
   fi
 
757
 
 
758
   AC_CHECK_FUNC(remove)
 
759
   if test $ac_cv_func_remove = no; then
 
760
      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
 
761
   fi
 
762
 
 
763
   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
 
764
   AC_CHECK_FUNC(shmat, ,
 
765
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
 
766
   
 
767
   # more headers that need to be explicitly included on darwin
 
768
   AC_CHECK_HEADERS(sys/types.h stdint.h)
 
769
 
 
770
   # darwin requires a poll emulation library
 
771
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
 
772
 
 
773
   # CoreAudio framework
 
774
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
 
775
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
 
776
     FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
 
777
   ])
 
778
 
 
779
   AC_CHECK_RES_INIT
 
780
   AC_SUBST(LIB_POLL)
 
781
   AC_SUBST(FRAMEWORK_COREAUDIO)
 
782
   LIBSOCKET="$X_EXTRA_LIBS"
 
783
   AC_SUBST(LIBSOCKET)
 
784
   AC_SUBST(X_EXTRA_LIBS)
 
785
   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
 
786
   AC_SUBST(LIBUCB)
 
787
 
 
788
   case $host in  dnl this *is* LynxOS specific
 
789
   *-*-lynxos* )
 
790
        AC_MSG_CHECKING([LynxOS header file wrappers])
 
791
        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
 
792
        AC_MSG_RESULT(disabled)
 
793
        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
 
794
         ;;
 
795
    esac
 
796
 
 
797
   KDE_CHECK_TYPES
 
798
   KDE_CHECK_LIBDL
 
799
   KDE_CHECK_STRLCPY
 
800
 
 
801
# darwin needs this to initialize the environment
 
802
AC_CHECK_HEADERS(crt_externs.h)
 
803
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
 
804
 
 
805
AH_VERBATIM(_DARWIN_ENVIRON,
 
806
[
 
807
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
 
808
# include <sys/time.h>
 
809
# include <crt_externs.h>
 
810
# define environ (*_NSGetEnviron())
 
811
#endif
 
812
])
 
813
 
 
814
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
 
815
[
 
816
/*
 
817
 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
 
818
 * that defines bzero.
 
819
 */
 
820
 
 
821
#if defined(_AIX)
 
822
#include <strings.h>
 
823
#endif
 
824
])
 
825
 
 
826
AC_CHECK_FUNCS([vsnprintf snprintf])
 
827
 
 
828
AH_VERBATIM(_TRU64,[
 
829
/*
 
830
 * On HP-UX, the declaration of vsnprintf() is needed every time !
 
831
 */
 
832
 
 
833
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
 
834
#if __STDC__
 
835
#include <stdarg.h>
 
836
#include <stdlib.h>
 
837
#else
 
838
#include <varargs.h>
 
839
#endif
 
840
#ifdef __cplusplus
 
841
extern "C"
 
842
#endif
 
843
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
 
844
#ifdef __cplusplus
 
845
extern "C"
 
846
#endif
 
847
int snprintf(char *str, size_t n, char const *fmt, ...);
 
848
#endif
 
849
])
 
850
 
 
851
])
 
852
 
 
853
dnl ------------------------------------------------------------------------
 
854
dnl Find the header files and libraries for X-Windows. Extended the
 
855
dnl macro AC_PATH_X
 
856
dnl ------------------------------------------------------------------------
 
857
dnl
 
858
AC_DEFUN([K_PATH_X],
 
859
[
 
860
AC_REQUIRE([KDE_MISC_TESTS])dnl
 
861
AC_REQUIRE([KDE_CHECK_LIB64])
 
862
 
 
863
AC_ARG_ENABLE(
 
864
  embedded,
 
865
  AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
 
866
  kde_use_qt_emb=$enableval,
 
867
  kde_use_qt_emb=no
 
868
)
 
869
 
 
870
AC_ARG_ENABLE(
 
871
  qtopia,
 
872
  AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
 
873
  kde_use_qt_emb_palm=$enableval,
 
874
  kde_use_qt_emb_palm=no
 
875
)
 
876
 
 
877
AC_ARG_ENABLE(
 
878
  mac,
 
879
  AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
 
880
  kde_use_qt_mac=$enableval,
 
881
  kde_use_qt_mac=no
 
882
)
 
883
 
 
884
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
 
885
 
 
886
AC_MSG_CHECKING(for X)
 
887
 
 
888
AC_CACHE_VAL(kde_cv_have_x,
 
889
[# One or both of the vars are not set, and there is no cached value.
 
890
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
 
891
   kde_x_includes=NO
 
892
else
 
893
   kde_x_includes=$x_includes
 
894
fi
 
895
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
 
896
   kde_x_libraries=NO
 
897
else
 
898
   kde_x_libraries=$x_libraries
 
899
fi
 
900
 
 
901
# below we use the standard autoconf calls
 
902
ac_x_libraries=$kde_x_libraries
 
903
ac_x_includes=$kde_x_includes
 
904
 
 
905
KDE_PATH_X_DIRECT
 
906
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
 
907
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
 
908
dnl location. The correct location is /usr/lib32 or an undefined value
 
909
dnl (the linker is smart enough to pick the correct default library).
 
910
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
 
911
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
 
912
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
 
913
dnl x_includes should be left alone.
 
914
case "$host" in
 
915
mips-sgi-irix6*)
 
916
  ;;
 
917
*-*-solaris*)
 
918
  ;;
 
919
*)
 
920
  _AC_PATH_X_XMKMF
 
921
  if test -z "$ac_x_includes"; then
 
922
    ac_x_includes="."
 
923
  fi
 
924
  if test -z "$ac_x_libraries"; then
 
925
    ac_x_libraries="/usr/lib${kdelibsuff}"
 
926
  fi
 
927
esac
 
928
#from now on we use our own again
 
929
 
 
930
# when the user already gave --x-includes, we ignore
 
931
# what the standard autoconf macros told us.
 
932
if test "$kde_x_includes" = NO; then
 
933
  kde_x_includes=$ac_x_includes
 
934
fi
 
935
 
 
936
# for --x-libraries too
 
937
if test "$kde_x_libraries" = NO; then
 
938
  kde_x_libraries=$ac_x_libraries
 
939
fi
 
940
 
 
941
if test "$kde_x_includes" = NO; then
 
942
  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
 
943
fi
 
944
 
 
945
if test "$kde_x_libraries" = NO; then
 
946
  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
 
947
fi
 
948
 
 
949
# Record where we found X for the cache.
 
950
kde_cv_have_x="have_x=yes \
 
951
         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
 
952
])dnl
 
953
 
 
954
eval "$kde_cv_have_x"
 
955
 
 
956
if test "$have_x" != yes; then
 
957
  AC_MSG_RESULT($have_x)
 
958
  no_x=yes
 
959
else
 
960
  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
 
961
fi
 
962
 
 
963
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
 
964
  X_INCLUDES=""
 
965
  x_includes="."; dnl better than nothing :-
 
966
 else
 
967
  x_includes=$kde_x_includes
 
968
  X_INCLUDES="-I$x_includes"
 
969
fi
 
970
 
 
971
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
 
972
  X_LDFLAGS=""
 
973
  x_libraries="/usr/lib"; dnl better than nothing :-
 
974
 else
 
975
  x_libraries=$kde_x_libraries
 
976
  X_LDFLAGS="-L$x_libraries"
 
977
fi
 
978
all_includes="$X_INCLUDES"
 
979
all_libraries="$X_LDFLAGS"
 
980
 
 
981
# Check for libraries that X11R6 Xt/Xaw programs need.
 
982
ac_save_LDFLAGS="$LDFLAGS"
 
983
LDFLAGS="$LDFLAGS $X_LDFLAGS"
 
984
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
 
985
# check for ICE first), but we must link in the order -lSM -lICE or
 
986
# we get undefined symbols.  So assume we have SM if we have ICE.
 
987
# These have to be linked with before -lX11, unlike the other
 
988
# libraries we check for below, so use a different variable.
 
989
#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
 
990
AC_CHECK_LIB(ICE, IceConnectionNumber,
 
991
  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
 
992
LDFLAGS="$ac_save_LDFLAGS"
 
993
 
 
994
LIB_X11='-lX11 $(LIBSOCKET)'
 
995
 
 
996
AC_MSG_CHECKING(for libXext)
 
997
AC_CACHE_VAL(kde_cv_have_libXext,
 
998
[
 
999
kde_ldflags_safe="$LDFLAGS"
 
1000
kde_libs_safe="$LIBS"
 
1001
 
 
1002
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
 
1003
LIBS="-lXext -lX11 $LIBSOCKET"
 
1004
 
 
1005
AC_TRY_LINK([
 
1006
#include <stdio.h>
 
1007
#ifdef STDC_HEADERS
 
1008
# include <stdlib.h>
 
1009
#endif
 
1010
],
 
1011
[
 
1012
printf("hello Xext\n");
 
1013
],
 
1014
kde_cv_have_libXext=yes,
 
1015
kde_cv_have_libXext=no
 
1016
)
 
1017
 
 
1018
LDFLAGS=$kde_ldflags_safe
 
1019
LIBS=$kde_libs_safe
 
1020
])
 
1021
 
 
1022
AC_MSG_RESULT($kde_cv_have_libXext)
 
1023
 
 
1024
if test "$kde_cv_have_libXext" = "no"; then
 
1025
  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
 
1026
can't find it itself, we stop here assuming that make wouldn't find
 
1027
them either.])
 
1028
fi
 
1029
 
 
1030
LIB_XEXT="-lXext"
 
1031
QTE_NORTTI=""
 
1032
 
 
1033
elif test "$kde_use_qt_emb" = "yes"; then
 
1034
  dnl We're using QT Embedded
 
1035
  CPPFLAGS=-DQWS
 
1036
  CXXFLAGS="$CXXFLAGS -fno-rtti"
 
1037
  QTE_NORTTI="-fno-rtti -DQWS"
 
1038
  X_PRE_LIBS=""
 
1039
  LIB_X11=""
 
1040
  LIB_XEXT=""
 
1041
  LIB_XRENDER=""
 
1042
  LIBSM=""
 
1043
  X_INCLUDES=""
 
1044
  X_LDFLAGS=""
 
1045
  x_includes=""
 
1046
  x_libraries=""
 
1047
elif test "$kde_use_qt_mac" = "yes"; then
 
1048
  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
 
1049
  dnl be included to get the information) --Sam
 
1050
  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
 
1051
  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
 
1052
  X_PRE_LIBS=""
 
1053
  LIB_X11=""
 
1054
  LIB_XEXT=""
 
1055
  LIB_XRENDER=""
 
1056
  LIBSM=""
 
1057
  X_INCLUDES=""
 
1058
  X_LDFLAGS=""
 
1059
  x_includes=""
 
1060
  x_libraries=""
 
1061
fi
 
1062
AC_SUBST(X_PRE_LIBS)
 
1063
AC_SUBST(LIB_X11)
 
1064
AC_SUBST(LIB_XRENDER)
 
1065
AC_SUBST(LIBSM)
 
1066
AC_SUBST(X_INCLUDES)
 
1067
AC_SUBST(X_LDFLAGS)
 
1068
AC_SUBST(x_includes)
 
1069
AC_SUBST(x_libraries)
 
1070
AC_SUBST(QTE_NORTTI)
 
1071
AC_SUBST(LIB_XEXT)
 
1072
 
 
1073
])
 
1074
 
 
1075
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
 
1076
[
 
1077
AC_REQUIRE([KDE_USE_QT])
 
1078
cat > conftest.$ac_ext <<EOF
 
1079
#include "confdefs.h"
 
1080
#include <qglobal.h>
 
1081
#include <qapplication.h>
 
1082
EOF
 
1083
if test "$kde_qtver" = "2"; then
 
1084
cat >> conftest.$ac_ext <<EOF
 
1085
#include <qevent.h>
 
1086
#include <qstring.h>
 
1087
#include <qstyle.h>
 
1088
EOF
 
1089
 
 
1090
if test $kde_qtsubver -gt 0; then
 
1091
cat >> conftest.$ac_ext <<EOF
 
1092
#if QT_VERSION < 210
 
1093
#error 1
 
1094
#endif
 
1095
EOF
 
1096
fi
 
1097
fi
 
1098
 
 
1099
if test "$kde_qtver" = "3"; then
 
1100
cat >> conftest.$ac_ext <<EOF
 
1101
#include <qcursor.h>
 
1102
#include <qstylefactory.h>
 
1103
#include <private/qucomextra_p.h>
 
1104
EOF
 
1105
fi
 
1106
 
 
1107
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
 
1108
cat >> conftest.$ac_ext <<EOF
 
1109
#error 1
 
1110
#endif
 
1111
 
 
1112
int main() {
 
1113
EOF
 
1114
if test "$kde_qtver" = "2"; then
 
1115
cat >> conftest.$ac_ext <<EOF
 
1116
    QStringList *t = new QStringList();
 
1117
    Q_UNUSED(t);
 
1118
EOF
 
1119
if test $kde_qtsubver -gt 0; then
 
1120
cat >> conftest.$ac_ext <<EOF
 
1121
    QString s;
 
1122
    s.setLatin1("Elvis is alive", 14);
 
1123
EOF
 
1124
fi
 
1125
fi
 
1126
if test "$kde_qtver" = "3"; then
 
1127
cat >> conftest.$ac_ext <<EOF
 
1128
    (void)QStyleFactory::create(QString::null);
 
1129
    QCursor c(Qt::WhatsThisCursor);
 
1130
EOF
 
1131
fi
 
1132
cat >> conftest.$ac_ext <<EOF
 
1133
    return 0;
 
1134
}
 
1135
EOF
 
1136
])
 
1137
 
 
1138
AC_DEFUN([KDE_USE_QT],
 
1139
[
 
1140
if test -z "$1"; then
 
1141
  # Current default Qt version: 3.2
 
1142
  kde_qtver=3
 
1143
  kde_qtsubver=2
 
1144
else
 
1145
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
 
1146
  # following is the check if subversion isnt found in passed argument
 
1147
  if test "$kde_qtsubver" = "$1"; then
 
1148
    kde_qtsubver=1
 
1149
  fi
 
1150
  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
 
1151
  if test "$kde_qtver" = "1"; then
 
1152
    kde_qtsubver=42
 
1153
  fi
 
1154
fi
 
1155
 
 
1156
if test -z "$2"; then
 
1157
  if test "$kde_qtver" = "2"; then
 
1158
    if test $kde_qtsubver -gt 0; then
 
1159
      kde_qt_minversion=">= Qt 2.2.2"
 
1160
    else
 
1161
      kde_qt_minversion=">= Qt 2.0.2"
 
1162
    fi
 
1163
  fi
 
1164
  if test "$kde_qtver" = "3"; then
 
1165
    if test $kde_qtsubver -gt 0; then
 
1166
         if test $kde_qtsubver -gt 1; then
 
1167
            kde_qt_minversion=">= Qt 3.2"
 
1168
         else
 
1169
            kde_qt_minversion=">= Qt 3.1 (20021021)"
 
1170
         fi
 
1171
    else
 
1172
      kde_qt_minversion=">= Qt 3.0"
 
1173
    fi
 
1174
  fi
 
1175
  if test "$kde_qtver" = "1"; then
 
1176
    kde_qt_minversion=">= 1.42 and < 2.0"
 
1177
  fi
 
1178
else
 
1179
   kde_qt_minversion="$2"
 
1180
fi
 
1181
 
 
1182
if test -z "$3"; then
 
1183
   if test $kde_qtver = 3; then
 
1184
     if test $kde_qtsubver -gt 0; then
 
1185
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00"
 
1186
       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
 
1187
       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
 
1188
     else
 
1189
       kde_qt_verstring="QT_VERSION >= 300"
 
1190
     fi
 
1191
   fi
 
1192
   if test $kde_qtver = 2; then
 
1193
     if test $kde_qtsubver -gt 0; then
 
1194
       kde_qt_verstring="QT_VERSION >= 222"
 
1195
     else
 
1196
       kde_qt_verstring="QT_VERSION >= 200"
 
1197
     fi
 
1198
   fi
 
1199
   if test $kde_qtver = 1; then
 
1200
    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
 
1201
   fi
 
1202
else
 
1203
   kde_qt_verstring="$3"
 
1204
fi
 
1205
 
 
1206
if test $kde_qtver = 3; then
 
1207
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
 
1208
fi
 
1209
if test $kde_qtver = 2; then
 
1210
   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
 
1211
fi
 
1212
if test $kde_qtver = 1; then
 
1213
   kde_qt_dirs="$QTDIR /usr/lib/qt"
 
1214
fi
 
1215
])
 
1216
 
 
1217
AC_DEFUN([KDE_CHECK_QT_DIRECT],
 
1218
[
 
1219
AC_REQUIRE([KDE_USE_QT])
 
1220
AC_MSG_CHECKING([if Qt compiles without flags])
 
1221
AC_CACHE_VAL(kde_cv_qt_direct,
 
1222
[
 
1223
AC_LANG_SAVE
 
1224
AC_LANG_CPLUSPLUS
 
1225
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
 
1226
ac_LIBRARY_PATH="$LIBRARY_PATH"
 
1227
ac_cxxflags_safe="$CXXFLAGS"
 
1228
ac_ldflags_safe="$LDFLAGS"
 
1229
ac_libs_safe="$LIBS"
 
1230
 
 
1231
CXXFLAGS="$CXXFLAGS -I$qt_includes"
 
1232
LDFLAGS="$LDFLAGS $X_LDFLAGS"
 
1233
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
1234
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
 
1235
else
 
1236
LIBS="$LIBQT $LIBSOCKET"
 
1237
fi
 
1238
LD_LIBRARY_PATH=
 
1239
export LD_LIBRARY_PATH
 
1240
LIBRARY_PATH=
 
1241
export LIBRARY_PATH
 
1242
 
 
1243
KDE_PRINT_QT_PROGRAM
 
1244
 
 
1245
if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
1246
  kde_cv_qt_direct="yes"
 
1247
else
 
1248
  kde_cv_qt_direct="no"
 
1249
  echo "configure: failed program was:" >&AC_FD_CC
 
1250
  cat conftest.$ac_ext >&AC_FD_CC
 
1251
fi
 
1252
 
 
1253
rm -f conftest*
 
1254
CXXFLAGS="$ac_cxxflags_safe"
 
1255
LDFLAGS="$ac_ldflags_safe"
 
1256
LIBS="$ac_libs_safe"
 
1257
 
 
1258
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
 
1259
export LD_LIBRARY_PATH
 
1260
LIBRARY_PATH="$ac_LIBRARY_PATH"
 
1261
export LIBRARY_PATH
 
1262
AC_LANG_RESTORE
 
1263
])
 
1264
 
 
1265
if test "$kde_cv_qt_direct" = "yes"; then
 
1266
  AC_MSG_RESULT(yes)
 
1267
  $1
 
1268
else
 
1269
  AC_MSG_RESULT(no)
 
1270
  $2
 
1271
fi
 
1272
])
 
1273
 
 
1274
dnl ------------------------------------------------------------------------
 
1275
dnl Try to find the Qt headers and libraries.
 
1276
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
 
1277
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
 
1278
dnl ------------------------------------------------------------------------
 
1279
dnl
 
1280
AC_DEFUN([AC_PATH_QT_1_3],
 
1281
[
 
1282
AC_REQUIRE([K_PATH_X])
 
1283
AC_REQUIRE([KDE_USE_QT])
 
1284
AC_REQUIRE([KDE_CHECK_LIB64])
 
1285
 
 
1286
dnl ------------------------------------------------------------------------
 
1287
dnl Add configure flag to enable linking to MT version of Qt library.
 
1288
dnl ------------------------------------------------------------------------
 
1289
 
 
1290
AC_ARG_ENABLE(
 
1291
  mt,
 
1292
  AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
 
1293
  kde_use_qt_mt=$enableval,
 
1294
  [
 
1295
    if test $kde_qtver = 3; then
 
1296
      kde_use_qt_mt=yes
 
1297
    else
 
1298
      kde_use_qt_mt=no
 
1299
    fi
 
1300
  ]
 
1301
)
 
1302
 
 
1303
USING_QT_MT=""
 
1304
 
 
1305
dnl ------------------------------------------------------------------------
 
1306
dnl If we not get --disable-qt-mt then adjust some vars for the host.
 
1307
dnl ------------------------------------------------------------------------
 
1308
 
 
1309
KDE_MT_LDFLAGS=
 
1310
KDE_MT_LIBS=
 
1311
if test "x$kde_use_qt_mt" = "xyes"; then
 
1312
  KDE_CHECK_THREADING
 
1313
  if test "x$kde_use_threading" = "xyes"; then
 
1314
    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
 
1315
    KDE_MT_LDFLAGS="$USE_THREADS"
 
1316
    KDE_MT_LIBS="$LIBPTHREAD"
 
1317
  else
 
1318
    kde_use_qt_mt=no
 
1319
  fi
 
1320
fi
 
1321
AC_SUBST(KDE_MT_LDFLAGS)
 
1322
AC_SUBST(KDE_MT_LIBS)
 
1323
 
 
1324
kde_qt_was_given=yes
 
1325
 
 
1326
dnl ------------------------------------------------------------------------
 
1327
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
 
1328
dnl ------------------------------------------------------------------------
 
1329
if test -z "$LIBQT_GLOB"; then
 
1330
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1331
    LIBQT_GLOB="libqte.*"
 
1332
  else
 
1333
    LIBQT_GLOB="libqt.*"
 
1334
  fi
 
1335
fi
 
1336
 
 
1337
if test -z "$LIBQT"; then
 
1338
dnl ------------------------------------------------------------
 
1339
dnl If we got --enable-embedded then adjust the Qt library name.
 
1340
dnl ------------------------------------------------------------
 
1341
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1342
    qtlib="qte"
 
1343
  else
 
1344
    qtlib="qt"
 
1345
  fi
 
1346
 
 
1347
  kde_int_qt="-l$qtlib"
 
1348
else
 
1349
  kde_int_qt="$LIBQT"
 
1350
  kde_lib_qt_set=yes
 
1351
fi
 
1352
 
 
1353
if test -z "$LIBQPE"; then
 
1354
dnl ------------------------------------------------------------
 
1355
dnl If we got --enable-palmtop then add -lqpe to the link line
 
1356
dnl ------------------------------------------------------------
 
1357
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1358
    if test "x$kde_use_qt_emb_palm" = "xyes"; then
 
1359
      LIB_QPE="-lqpe"
 
1360
    else
 
1361
      LIB_QPE=""
 
1362
    fi
 
1363
  else
 
1364
    LIB_QPE=""
 
1365
  fi
 
1366
fi
 
1367
 
 
1368
dnl ------------------------------------------------------------------------
 
1369
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
 
1370
dnl ------------------------------------------------------------------------
 
1371
 
 
1372
if test "x$kde_use_qt_mt" = "xyes"; then
 
1373
  if test -z "$LIBQT"; then
 
1374
    LIBQT="-l$qtlib-mt"
 
1375
    kde_int_qt="-l$qtlib-mt"
 
1376
  else
 
1377
    LIBQT="$qtlib-mt"
 
1378
    kde_int_qt="$qtlib-mt"
 
1379
  fi
 
1380
  LIBQT_GLOB="lib$qtlib-mt.*"
 
1381
  USING_QT_MT="using -mt"
 
1382
else
 
1383
  LIBQT="-l$qtlib"
 
1384
fi
 
1385
 
 
1386
if test $kde_qtver != 1; then
 
1387
 
 
1388
  AC_REQUIRE([AC_FIND_PNG])
 
1389
  AC_REQUIRE([AC_FIND_JPEG])
 
1390
  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
 
1391
fi
 
1392
 
 
1393
if test $kde_qtver = 3; then
 
1394
  AC_REQUIRE([KDE_CHECK_LIBDL])
 
1395
  LIBQT="$LIBQT $LIBDL"
 
1396
fi
 
1397
 
 
1398
AC_MSG_CHECKING([for Qt])
 
1399
 
 
1400
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
1401
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
 
1402
fi
 
1403
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
 
1404
qt_libraries=""
 
1405
qt_includes=""
 
1406
AC_ARG_WITH(qt-dir,
 
1407
    AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
 
1408
    [  ac_qt_includes="$withval"/include
 
1409
       ac_qt_libraries="$withval"/lib${kdelibsuff}
 
1410
       ac_qt_bindir="$withval"/bin
 
1411
    ])
 
1412
 
 
1413
AC_ARG_WITH(qt-includes,
 
1414
    AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
 
1415
    [
 
1416
       ac_qt_includes="$withval"
 
1417
    ])
 
1418
 
 
1419
kde_qt_libs_given=no
 
1420
 
 
1421
AC_ARG_WITH(qt-libraries,
 
1422
    AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
 
1423
    [  ac_qt_libraries="$withval"
 
1424
       kde_qt_libs_given=yes
 
1425
    ])
 
1426
 
 
1427
AC_CACHE_VAL(ac_cv_have_qt,
 
1428
[#try to guess Qt locations
 
1429
 
 
1430
qt_incdirs=""
 
1431
for dir in $kde_qt_dirs; do
 
1432
   qt_incdirs="$qt_incdirs $dir/include $dir"
 
1433
done
 
1434
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"
 
1435
if test ! "$ac_qt_includes" = "NO"; then
 
1436
   qt_incdirs="$ac_qt_includes $qt_incdirs"
 
1437
fi
 
1438
 
 
1439
if test "$kde_qtver" != "1"; then
 
1440
  kde_qt_header=qstyle.h
 
1441
else
 
1442
  kde_qt_header=qglobal.h
 
1443
fi
 
1444
 
 
1445
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
 
1446
ac_qt_includes="$qt_incdir"
 
1447
 
 
1448
qt_libdirs=""
 
1449
for dir in $kde_qt_dirs; do
 
1450
   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
 
1451
done
 
1452
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
 
1453
if test ! "$ac_qt_libraries" = "NO"; then
 
1454
  qt_libdir=$ac_qt_libraries
 
1455
else
 
1456
  qt_libdirs="$ac_qt_libraries $qt_libdirs"
 
1457
  # if the Qt was given, the chance is too big that libqt.* doesn't exist
 
1458
  qt_libdir=NONE
 
1459
  for dir in $qt_libdirs; do
 
1460
    try="ls -1 $dir/${LIBQT_GLOB}"
 
1461
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
 
1462
  done
 
1463
fi
 
1464
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
 
1465
  if test -e "$a"; then
 
1466
    LIBQT="$LIBQT ${kde_int_qt}_incremental"
 
1467
    break
 
1468
  fi
 
1469
done
 
1470
 
 
1471
ac_qt_libraries="$qt_libdir"
 
1472
 
 
1473
AC_LANG_SAVE
 
1474
AC_LANG_CPLUSPLUS
 
1475
 
 
1476
ac_cxxflags_safe="$CXXFLAGS"
 
1477
ac_ldflags_safe="$LDFLAGS"
 
1478
ac_libs_safe="$LIBS"
 
1479
 
 
1480
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
 
1481
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
 
1482
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
 
1483
 
 
1484
KDE_PRINT_QT_PROGRAM
 
1485
 
 
1486
if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
1487
  rm -f conftest*
 
1488
else
 
1489
  echo "configure: failed program was:" >&AC_FD_CC
 
1490
  cat conftest.$ac_ext >&AC_FD_CC
 
1491
  ac_qt_libraries="NO"
 
1492
fi
 
1493
rm -f conftest*
 
1494
CXXFLAGS="$ac_cxxflags_safe"
 
1495
LDFLAGS="$ac_ldflags_safe"
 
1496
LIBS="$ac_libs_safe"
 
1497
 
 
1498
AC_LANG_RESTORE
 
1499
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
 
1500
  ac_cv_have_qt="have_qt=no"
 
1501
  ac_qt_notfound=""
 
1502
  missing_qt_mt=""
 
1503
  if test "$ac_qt_includes" = NO; then
 
1504
    if test "$ac_qt_libraries" = NO; then
 
1505
      ac_qt_notfound="(headers and libraries)";
 
1506
    else
 
1507
      ac_qt_notfound="(headers)";
 
1508
    fi
 
1509
  else
 
1510
    if test "x$kde_use_qt_mt" = "xyes"; then
 
1511
       missing_qt_mt="
 
1512
Make sure that you have compiled Qt with thread support!"
 
1513
       ac_qt_notfound="(library $qtlib-mt)";
 
1514
    else
 
1515
       ac_qt_notfound="(library $qtlib)";
 
1516
    fi
 
1517
  fi
 
1518
 
 
1519
  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
 
1520
For more details about this problem, look at the end of config.log.$missing_qt_mt])
 
1521
else
 
1522
  have_qt="yes"
 
1523
fi
 
1524
])
 
1525
 
 
1526
eval "$ac_cv_have_qt"
 
1527
 
 
1528
if test "$have_qt" != yes; then
 
1529
  AC_MSG_RESULT([$have_qt]);
 
1530
else
 
1531
  ac_cv_have_qt="have_qt=yes \
 
1532
    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
 
1533
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
 
1534
 
 
1535
  qt_libraries="$ac_qt_libraries"
 
1536
  qt_includes="$ac_qt_includes"
 
1537
fi
 
1538
 
 
1539
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
 
1540
     KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
 
1541
fi
 
1542
 
 
1543
AC_SUBST(qt_libraries)
 
1544
AC_SUBST(qt_includes)
 
1545
 
 
1546
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
 
1547
 QT_INCLUDES=""
 
1548
else
 
1549
 QT_INCLUDES="-I$qt_includes"
 
1550
 all_includes="$QT_INCLUDES $all_includes"
 
1551
fi
 
1552
 
 
1553
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
 
1554
 QT_LDFLAGS=""
 
1555
else
 
1556
 QT_LDFLAGS="-L$qt_libraries"
 
1557
 all_libraries="$all_libraries $QT_LDFLAGS"
 
1558
fi
 
1559
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
 
1560
 
 
1561
AC_SUBST(QT_INCLUDES)
 
1562
AC_SUBST(QT_LDFLAGS)
 
1563
AC_PATH_QT_MOC_UIC
 
1564
 
 
1565
KDE_CHECK_QT_JPEG
 
1566
 
 
1567
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
1568
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
 
1569
else
 
1570
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
 
1571
fi
 
1572
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
 
1573
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
 
1574
  if test -e "$a"; then
 
1575
     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
 
1576
     break
 
1577
  fi
 
1578
done
 
1579
 
 
1580
AC_SUBST(LIB_QT)
 
1581
AC_SUBST(LIB_QPE)
 
1582
 
 
1583
AC_SUBST(kde_qtver)
 
1584
])
 
1585
 
 
1586
AC_DEFUN([AC_PATH_QT],
 
1587
[
 
1588
AC_PATH_QT_1_3
 
1589
])
 
1590
 
 
1591
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
 
1592
[
 
1593
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
 
1594
 
 
1595
if test x$ac_uic_supports_libpath = xyes; then
 
1596
 
 
1597
AC_MSG_CHECKING([if UIC has KDE plugins available])
 
1598
AC_CACHE_VAL(kde_cv_uic_plugins,
 
1599
[
 
1600
cat > actest.ui << EOF
 
1601
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
 
1602
<class>NewConnectionDialog</class>
 
1603
<widget class="QDialog">
 
1604
   <widget class="KLineEdit">
 
1605
        <property name="name">
 
1606
           <cstring>testInput</cstring>
 
1607
        </property>
 
1608
   </widget>
 
1609
</widget>
 
1610
</UI>
 
1611
EOF
 
1612
       
 
1613
 
 
1614
 
 
1615
kde_cv_uic_plugins=no
 
1616
kde_line="$UIC_PATH -L $kde_widgetdir"
 
1617
if test x$ac_uic_supports_nounload = xyes; then
 
1618
   kde_line="$kde_line -nounload"
 
1619
fi
 
1620
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
 
1621
if AC_TRY_EVAL(kde_line); then
 
1622
        # if you're trying to debug this check and think it's incorrect,
 
1623
        # better check your installation. The check _is_ correct - your
 
1624
        # installation is not.
 
1625
        if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
 
1626
                kde_cv_uic_plugins=yes
 
1627
        fi
 
1628
fi
 
1629
rm -f actest.ui actest.cpp
 
1630
])
 
1631
 
 
1632
AC_MSG_RESULT([$kde_cv_uic_plugins])
 
1633
if test "$kde_cv_uic_plugins" != yes; then
 
1634
        AC_MSG_ERROR([you need to install kdelibs first.])
 
1635
fi
 
1636
fi
 
1637
])
 
1638
 
 
1639
AC_DEFUN([KDE_CHECK_FINAL],
 
1640
[
 
1641
  AC_ARG_ENABLE(final,
 
1642
        AC_HELP_STRING([--enable-final],
 
1643
                       [build size optimized apps (experimental - needs lots of memory)]),
 
1644
        kde_use_final=$enableval, kde_use_final=no)
 
1645
 
 
1646
  if test "x$kde_use_final" = "xyes"; then
 
1647
      KDE_USE_FINAL_TRUE=""
 
1648
      KDE_USE_FINAL_FALSE="#"
 
1649
   else
 
1650
      KDE_USE_FINAL_TRUE="#"
 
1651
      KDE_USE_FINAL_FALSE=""
 
1652
  fi
 
1653
  AC_SUBST(KDE_USE_FINAL_TRUE)
 
1654
  AC_SUBST(KDE_USE_FINAL_FALSE)
 
1655
])
 
1656
 
 
1657
AC_DEFUN([KDE_CHECK_CLOSURE],
 
1658
[
 
1659
  AC_ARG_ENABLE(closure,
 
1660
                AC_HELP_STRING([--enable-closure],[delay template instantiation]),
 
1661
        kde_use_closure=$enableval, kde_use_closure=no)
 
1662
 
 
1663
  KDE_NO_UNDEFINED=""
 
1664
  if test "x$kde_use_closure" = "xyes"; then
 
1665
       KDE_USE_CLOSURE_TRUE=""
 
1666
       KDE_USE_CLOSURE_FALSE="#"
 
1667
#       CXXFLAGS="$CXXFLAGS $REPO"
 
1668
  else
 
1669
       KDE_USE_CLOSURE_TRUE="#"
 
1670
       KDE_USE_CLOSURE_FALSE=""
 
1671
       KDE_NO_UNDEFINED=""
 
1672
       case $host in 
 
1673
         *-*-linux-gnu)
 
1674
           KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
 
1675
                [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
 
1676
                [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
 
1677
                [KDE_NO_UNDEFINED=""])],
 
1678
            [KDE_NO_UNDEFINED=""])
 
1679
           ;;
 
1680
       esac
 
1681
  fi
 
1682
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
 
1683
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
 
1684
  AC_SUBST(KDE_NO_UNDEFINED)
 
1685
])
 
1686
 
 
1687
AC_DEFUN([KDE_CHECK_NMCHECK],
 
1688
[
 
1689
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
 
1690
        kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
 
1691
 
 
1692
  if test "$kde_use_nmcheck" = "yes"; then
 
1693
      KDE_USE_NMCHECK_TRUE=""
 
1694
      KDE_USE_NMCHECK_FALSE="#"
 
1695
   else
 
1696
      KDE_USE_NMCHECK_TRUE="#"
 
1697
      KDE_USE_NMCHECK_FALSE=""
 
1698
  fi
 
1699
  AC_SUBST(KDE_USE_NMCHECK_TRUE)
 
1700
  AC_SUBST(KDE_USE_NMCHECK_FALSE)
 
1701
])
 
1702
 
 
1703
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
 
1704
savex=$exec_prefix
 
1705
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
1706
tmp=$$2
 
1707
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
 
1708
exec_prefix=$savex
 
1709
])
 
1710
 
 
1711
dnl ------------------------------------------------------------------------
 
1712
dnl Now, the same with KDE
 
1713
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
 
1714
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
 
1715
dnl ------------------------------------------------------------------------
 
1716
dnl
 
1717
AC_DEFUN([AC_BASE_PATH_KDE],
 
1718
[
 
1719
AC_REQUIRE([KDE_CHECK_STL])
 
1720
AC_REQUIRE([AC_PATH_QT])dnl
 
1721
AC_REQUIRE([KDE_CHECK_LIB64])
 
1722
 
 
1723
AC_CHECK_RPATH
 
1724
AC_MSG_CHECKING([for KDE])
 
1725
 
 
1726
if test "${prefix}" != NONE; then
 
1727
  kde_includes=${includedir}
 
1728
  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
 
1729
 
 
1730
  kde_libraries=${libdir}
 
1731
  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
 
1732
 
 
1733
else
 
1734
  ac_kde_includes=
 
1735
  ac_kde_libraries=
 
1736
  kde_libraries=""
 
1737
  kde_includes=""
 
1738
fi
 
1739
 
 
1740
AC_CACHE_VAL(ac_cv_have_kde,
 
1741
[#try to guess kde locations
 
1742
 
 
1743
if test "$kde_qtver" = 1; then
 
1744
  kde_check_header="ksock.h"
 
1745
  kde_check_lib="libkdecore.la"
 
1746
else
 
1747
  kde_check_header="ksharedptr.h"
 
1748
  kde_check_lib="libkio.la"
 
1749
fi
 
1750
 
 
1751
if test -z "$1"; then
 
1752
 
 
1753
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"
 
1754
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
 
1755
kde_incdirs="$ac_kde_includes $kde_incdirs"
 
1756
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
 
1757
ac_kde_includes="$kde_incdir"
 
1758
 
 
1759
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
 
1760
  AC_MSG_ERROR([
 
1761
in the prefix, you've chosen, are no KDE headers installed. This will fail.
 
1762
So, check this please and use another prefix!])
 
1763
fi
 
1764
 
 
1765
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}"
 
1766
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
 
1767
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
 
1768
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
 
1769
ac_kde_libraries="$kde_libdir"
 
1770
 
 
1771
kde_widgetdir=NO
 
1772
dnl this might be somewhere else
 
1773
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
 
1774
 
 
1775
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
 
1776
AC_MSG_ERROR([
 
1777
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
 
1778
So, check this please and use another prefix!])
 
1779
fi
 
1780
 
 
1781
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
 
1782
AC_MSG_ERROR([
 
1783
I can't find the designer plugins. These are required and should have been installed
 
1784
by kdelibs])
 
1785
fi
 
1786
 
 
1787
if test -n "$kde_widgetdir"; then
 
1788
    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
 
1789
fi
 
1790
 
 
1791
 
 
1792
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
 
1793
  ac_cv_have_kde="have_kde=no"
 
1794
else
 
1795
  ac_cv_have_kde="have_kde=yes \
 
1796
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
 
1797
fi
 
1798
 
 
1799
else dnl test -z $1
 
1800
 
 
1801
  ac_cv_have_kde="have_kde=no"
 
1802
 
 
1803
fi
 
1804
])dnl
 
1805
 
 
1806
eval "$ac_cv_have_kde"
 
1807
 
 
1808
if test "$have_kde" != "yes"; then
 
1809
 if test "${prefix}" = NONE; then
 
1810
  ac_kde_prefix="$ac_default_prefix"
 
1811
 else
 
1812
  ac_kde_prefix="$prefix"
 
1813
 fi
 
1814
 if test "$exec_prefix" = NONE; then
 
1815
  ac_kde_exec_prefix="$ac_kde_prefix"
 
1816
  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
 
1817
 else
 
1818
  ac_kde_exec_prefix="$exec_prefix"
 
1819
  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
 
1820
 fi
 
1821
 
 
1822
 kde_libraries="${libdir}"
 
1823
 kde_includes="${includedir}"
 
1824
 
 
1825
else
 
1826
  ac_cv_have_kde="have_kde=yes \
 
1827
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
 
1828
  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
 
1829
 
 
1830
  kde_libraries="$ac_kde_libraries"
 
1831
  kde_includes="$ac_kde_includes"
 
1832
fi
 
1833
AC_SUBST(kde_libraries)
 
1834
AC_SUBST(kde_includes)
 
1835
 
 
1836
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
 
1837
 KDE_INCLUDES=""
 
1838
else
 
1839
 KDE_INCLUDES="-I$kde_includes"
 
1840
 all_includes="$KDE_INCLUDES $all_includes"
 
1841
fi
 
1842
 
 
1843
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
 
1844
 
 
1845
KDE_LDFLAGS="-L$kde_libraries"
 
1846
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
 
1847
 all_libraries="$all_libraries $KDE_LDFLAGS"
 
1848
fi
 
1849
 
 
1850
AC_SUBST(KDE_LDFLAGS)
 
1851
AC_SUBST(KDE_INCLUDES)
 
1852
 
 
1853
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
1854
 
 
1855
all_libraries="$all_libraries $USER_LDFLAGS"
 
1856
all_includes="$all_includes $USER_INCLUDES"
 
1857
AC_SUBST(all_includes)
 
1858
AC_SUBST(all_libraries)
 
1859
 
 
1860
if test -z "$1"; then
 
1861
KDE_CHECK_UIC_PLUGINS
 
1862
fi
 
1863
 
 
1864
ac_kde_libraries="$kde_libdir"
 
1865
 
 
1866
AC_SUBST(AUTODIRS)
 
1867
 
 
1868
 
 
1869
])
 
1870
 
 
1871
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
 
1872
[
 
1873
AC_MSG_CHECKING(for extra includes)
 
1874
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
 
1875
  kde_use_extra_includes="$withval",
 
1876
  kde_use_extra_includes=NONE
 
1877
)
 
1878
kde_extra_includes=
 
1879
if test -n "$kde_use_extra_includes" && \
 
1880
   test "$kde_use_extra_includes" != "NONE"; then
 
1881
 
 
1882
   ac_save_ifs=$IFS
 
1883
   IFS=':'
 
1884
   for dir in $kde_use_extra_includes; do
 
1885
     kde_extra_includes="$kde_extra_includes $dir"
 
1886
     USER_INCLUDES="$USER_INCLUDES -I$dir"
 
1887
   done
 
1888
   IFS=$ac_save_ifs
 
1889
   kde_use_extra_includes="added"
 
1890
else
 
1891
   kde_use_extra_includes="no"
 
1892
fi
 
1893
AC_SUBST(USER_INCLUDES)
 
1894
 
 
1895
AC_MSG_RESULT($kde_use_extra_includes)
 
1896
 
 
1897
kde_extra_libs=
 
1898
AC_MSG_CHECKING(for extra libs)
 
1899
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
 
1900
  kde_use_extra_libs=$withval,
 
1901
  kde_use_extra_libs=NONE
 
1902
)
 
1903
if test -n "$kde_use_extra_libs" && \
 
1904
   test "$kde_use_extra_libs" != "NONE"; then
 
1905
 
 
1906
   ac_save_ifs=$IFS
 
1907
   IFS=':'
 
1908
   for dir in $kde_use_extra_libs; do
 
1909
     kde_extra_libs="$kde_extra_libs $dir"
 
1910
     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
 
1911
     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
 
1912
   done
 
1913
   IFS=$ac_save_ifs
 
1914
   kde_use_extra_libs="added"
 
1915
else
 
1916
   kde_use_extra_libs="no"
 
1917
fi
 
1918
 
 
1919
AC_SUBST(USER_LDFLAGS)
 
1920
 
 
1921
AC_MSG_RESULT($kde_use_extra_libs)
 
1922
 
 
1923
])
 
1924
 
 
1925
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
 
1926
[
 
1927
    AC_MSG_CHECKING([for KDE headers installed])
 
1928
    AC_LANG_SAVE
 
1929
    AC_LANG_CPLUSPLUS
 
1930
cat > conftest.$ac_ext <<EOF
 
1931
#ifdef STDC_HEADERS
 
1932
# include <stdlib.h>
 
1933
#endif
 
1934
#include <stdio.h>
 
1935
#include "confdefs.h"
 
1936
#include <kapp.h>
 
1937
 
 
1938
int main() {
 
1939
    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
 
1940
    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
 
1941
    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
 
1942
    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
 
1943
    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
 
1944
    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
 
1945
    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
 
1946
    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
 
1947
    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
 
1948
    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
 
1949
    printf("kde_wallpaperdir=\\"%s\\"\n",
 
1950
        KApplication::kde_wallpaperdir().data());
 
1951
    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
 
1952
    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
 
1953
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
 
1954
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
 
1955
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
 
1956
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
 
1957
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
 
1958
    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
 
1959
    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
 
1960
    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
 
1961
    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
 
1962
    return 0;
 
1963
    }
 
1964
EOF
 
1965
 
 
1966
 ac_save_CPPFLAGS=$CPPFLAGS
 
1967
 CPPFLAGS="$all_includes $CPPFLAGS"
 
1968
 if AC_TRY_EVAL(ac_compile); then
 
1969
   AC_MSG_RESULT(yes)
 
1970
 else
 
1971
   AC_MSG_ERROR([your system is not able to compile a small KDE application!
 
1972
Check, if you installed the KDE header files correctly.
 
1973
For more details about this problem, look at the end of config.log.])
 
1974
  fi
 
1975
  CPPFLAGS=$ac_save_CPPFLAGS
 
1976
 
 
1977
  AC_LANG_RESTORE
 
1978
])
 
1979
 
 
1980
AC_DEFUN([KDE_CHECK_KDEQTADDON],
 
1981
[
 
1982
AC_MSG_CHECKING(for kde-qt-addon)
 
1983
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
 
1984
[
 
1985
 kde_ldflags_safe="$LDFLAGS"
 
1986
 kde_libs_safe="$LIBS"
 
1987
 kde_cxxflags_safe="$CXXFLAGS"
 
1988
 
 
1989
 LIBS="-lkde-qt-addon $LIBQT $LIBS"
 
1990
 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
 
1991
 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
 
1992
 
 
1993
 AC_TRY_LINK([
 
1994
   #include <qdom.h>
 
1995
 ],
 
1996
 [
 
1997
   QDomDocument doc;
 
1998
 ],
 
1999
  kde_cv_have_kdeqtaddon=yes,
 
2000
  kde_cv_have_kdeqtaddon=no
 
2001
 )
 
2002
 
 
2003
 LDFLAGS=$kde_ldflags_safe
 
2004
 LIBS=$kde_libs_safe
 
2005
 CXXFLAGS=$kde_cxxflags_safe
 
2006
])
 
2007
 
 
2008
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
 
2009
 
 
2010
if test "$kde_cv_have_kdeqtaddon" = "no"; then
 
2011
  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
 
2012
It is a separate package (and CVS module) named kde-qt-addon.])
 
2013
fi
 
2014
])
 
2015
 
 
2016
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
 
2017
[
 
2018
   AC_REQUIRE([KDE_MISC_TESTS])
 
2019
   AC_REQUIRE([KDE_CHECK_LIBDL])
 
2020
   AC_REQUIRE([K_PATH_X])
 
2021
 
 
2022
if test $kde_qtver = 3; then
 
2023
   AC_SUBST(LIB_KDECORE, "-lkdecore")
 
2024
   AC_SUBST(LIB_KDEUI, "-lkdeui")
 
2025
   AC_SUBST(LIB_KIO, "-lkio")
 
2026
   AC_SUBST(LIB_SMB, "-lsmb")
 
2027
   AC_SUBST(LIB_KAB, "-lkab")
 
2028
   AC_SUBST(LIB_KABC, "-lkabc")
 
2029
   AC_SUBST(LIB_KHTML, "-lkhtml")
 
2030
   AC_SUBST(LIB_KSPELL, "-lkspell")
 
2031
   AC_SUBST(LIB_KPARTS, "-lkparts")
 
2032
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
 
2033
   AC_SUBST(LIB_KUTILS, "-lkutils")
 
2034
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
 
2035
# these are for backward compatibility
 
2036
   AC_SUBST(LIB_KSYCOCA, "-lkio")
 
2037
   AC_SUBST(LIB_KFILE, "-lkio")
 
2038
elif test $kde_qtver = 2; then
 
2039
   AC_SUBST(LIB_KDECORE, "-lkdecore")
 
2040
   AC_SUBST(LIB_KDEUI, "-lkdeui")
 
2041
   AC_SUBST(LIB_KIO, "-lkio")
 
2042
   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
 
2043
   AC_SUBST(LIB_SMB, "-lsmb")
 
2044
   AC_SUBST(LIB_KFILE, "-lkfile")
 
2045
   AC_SUBST(LIB_KAB, "-lkab")
 
2046
   AC_SUBST(LIB_KHTML, "-lkhtml")
 
2047
   AC_SUBST(LIB_KSPELL, "-lkspell")
 
2048
   AC_SUBST(LIB_KPARTS, "-lkparts")
 
2049
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
 
2050
else
 
2051
   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
 
2052
   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
 
2053
   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
 
2054
   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
 
2055
   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
 
2056
fi
 
2057
])
 
2058
 
 
2059
AC_DEFUN([AC_PATH_KDE],
 
2060
[
 
2061
  AC_BASE_PATH_KDE
 
2062
  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
 
2063
  [
 
2064
  if test "$enableval" = "no";
 
2065
    then ac_use_path_checking="default"
 
2066
    else ac_use_path_checking=""
 
2067
  fi
 
2068
  ],
 
2069
  [
 
2070
  if test "$kde_qtver" = 1;
 
2071
    then ac_use_path_checking=""
 
2072
    else ac_use_path_checking="default"
 
2073
  fi
 
2074
  ]
 
2075
  )
 
2076
 
 
2077
  AC_CREATE_KFSSTND($ac_use_path_checking)
 
2078
 
 
2079
  AC_SUBST_KFSSTND
 
2080
  KDE_CREATE_LIBS_ALIASES
 
2081
])
 
2082
 
 
2083
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
 
2084
AC_DEFUN([KDE_CHECK_FUNC_EXT],
 
2085
[
 
2086
AC_MSG_CHECKING(for $1)
 
2087
AC_CACHE_VAL(kde_cv_func_$1,
 
2088
[
 
2089
AC_LANG_SAVE
 
2090
AC_LANG_CPLUSPLUS
 
2091
save_CXXFLAGS="$CXXFLAGS"
 
2092
kde_safe_LIBS="$LIBS"
 
2093
LIBS="$LIBS $X_EXTRA_LIBS"
 
2094
if test "$GXX" = "yes"; then
 
2095
CXXFLAGS="$CXXFLAGS -pedantic-errors"
 
2096
fi
 
2097
AC_TRY_COMPILE([
 
2098
$2
 
2099
],
 
2100
[
 
2101
$3
 
2102
],
 
2103
kde_cv_func_$1=yes,
 
2104
kde_cv_func_$1=no)
 
2105
CXXFLAGS="$save_CXXFLAGS"
 
2106
LIBS="$kde_safe_LIBS"
 
2107
AC_LANG_RESTORE
 
2108
])
 
2109
 
 
2110
AC_MSG_RESULT($kde_cv_func_$1)
 
2111
 
 
2112
AC_MSG_CHECKING([if $1 needs custom prototype])
 
2113
AC_CACHE_VAL(kde_cv_proto_$1,
 
2114
[
 
2115
if test "x$kde_cv_func_$1" = xyes; then
 
2116
  kde_cv_proto_$1=no
 
2117
else
 
2118
  case "$1" in
 
2119
        setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
 
2120
                kde_cv_proto_$1="yes - in libkdefakes"
 
2121
                ;;
 
2122
        *)
 
2123
                kde_cv_proto_$1=unknown
 
2124
                ;;
 
2125
  esac
 
2126
fi
 
2127
 
 
2128
if test "x$kde_cv_proto_$1" = xunknown; then
 
2129
 
 
2130
AC_LANG_SAVE
 
2131
AC_LANG_CPLUSPLUS
 
2132
  kde_safe_libs=$LIBS
 
2133
  LIBS="$LIBS $X_EXTRA_LIBS"
 
2134
  AC_TRY_LINK([
 
2135
$2
 
2136
 
 
2137
extern "C" $4;
 
2138
],
 
2139
[
 
2140
$3
 
2141
],
 
2142
[ kde_cv_func_$1=yes
 
2143
  kde_cv_proto_$1=yes ],
 
2144
  [kde_cv_proto_$1="$1 unavailable"]
 
2145
)
 
2146
LIBS=$kde_safe_libs
 
2147
AC_LANG_RESTORE
 
2148
fi
 
2149
])
 
2150
AC_MSG_RESULT($kde_cv_proto_$1)
 
2151
 
 
2152
if test "x$kde_cv_func_$1" = xyes; then
 
2153
  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
 
2154
  $6
 
2155
fi
 
2156
if test "x$kde_cv_proto_$1" = xno; then
 
2157
  AC_DEFINE(HAVE_$5_PROTO, 1,
 
2158
  [Define if you have the $1 prototype])
 
2159
fi
 
2160
 
 
2161
AH_VERBATIM([_HAVE_$5_PROTO],
 
2162
[
 
2163
#if !defined(HAVE_$5_PROTO)
 
2164
#ifdef __cplusplus
 
2165
extern "C" {
 
2166
#endif
 
2167
$4;
 
2168
#ifdef __cplusplus
 
2169
}
 
2170
#endif
 
2171
#endif
 
2172
])
 
2173
])
 
2174
 
 
2175
AC_DEFUN([AC_CHECK_SETENV],
 
2176
[
 
2177
        KDE_CHECK_FUNC_EXT(setenv, [
 
2178
#include <stdlib.h>
 
2179
], 
 
2180
                [setenv("VAR", "VALUE", 1);],
 
2181
                [int setenv (const char *, const char *, int)],
 
2182
                [SETENV])
 
2183
])
 
2184
 
 
2185
AC_DEFUN([AC_CHECK_UNSETENV],
 
2186
[
 
2187
        KDE_CHECK_FUNC_EXT(unsetenv, [
 
2188
#include <stdlib.h>
 
2189
], 
 
2190
                [unsetenv("VAR");],
 
2191
                [void unsetenv (const char *)],
 
2192
                [UNSETENV])
 
2193
])
 
2194
 
 
2195
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
 
2196
[
 
2197
        KDE_CHECK_FUNC_EXT(getdomainname, [
 
2198
#include <stdlib.h>
 
2199
#include <unistd.h>
 
2200
#include <netdb.h>
 
2201
], 
 
2202
                [
 
2203
char buffer[200];
 
2204
getdomainname(buffer, 200);
 
2205
],      
 
2206
                [#include <sys/types.h>
 
2207
                int getdomainname (char *, size_t)],
 
2208
                [GETDOMAINNAME])
 
2209
])
 
2210
 
 
2211
AC_DEFUN([AC_CHECK_GETHOSTNAME],
 
2212
[
 
2213
        KDE_CHECK_FUNC_EXT(gethostname, [
 
2214
#include <stdlib.h>
 
2215
#include <unistd.h>
 
2216
], 
 
2217
                [
 
2218
char buffer[200];
 
2219
gethostname(buffer, 200);
 
2220
],      
 
2221
                [int gethostname (char *, unsigned int)],
 
2222
                [GETHOSTNAME])
 
2223
])
 
2224
 
 
2225
AC_DEFUN([AC_CHECK_USLEEP],
 
2226
[
 
2227
        KDE_CHECK_FUNC_EXT(usleep, [
 
2228
#include <unistd.h>
 
2229
], 
 
2230
                [
 
2231
usleep(200);
 
2232
],      
 
2233
                [int usleep (unsigned int)],
 
2234
                [USLEEP])
 
2235
])
 
2236
 
 
2237
 
 
2238
AC_DEFUN([AC_CHECK_RANDOM],
 
2239
[
 
2240
        KDE_CHECK_FUNC_EXT(random, [
 
2241
#include <stdlib.h>
 
2242
], 
 
2243
                [
 
2244
random();
 
2245
],      
 
2246
                [long int random(void)],
 
2247
                [RANDOM])
 
2248
 
 
2249
        KDE_CHECK_FUNC_EXT(srandom, [
 
2250
#include <stdlib.h>
 
2251
], 
 
2252
                [
 
2253
srandom(27);
 
2254
],      
 
2255
                [void srandom(unsigned int)],
 
2256
                [SRANDOM])
 
2257
 
 
2258
])
 
2259
 
 
2260
AC_DEFUN([AC_CHECK_INITGROUPS],
 
2261
[
 
2262
        KDE_CHECK_FUNC_EXT(initgroups, [
 
2263
#include <sys/types.h>
 
2264
#include <unistd.h>
 
2265
#include <grp.h>
 
2266
],
 
2267
        [
 
2268
char buffer[200];
 
2269
initgroups(buffer, 27);
 
2270
],
 
2271
        [int initgroups(const char *, gid_t)],
 
2272
        [INITGROUPS])
 
2273
])
 
2274
 
 
2275
AC_DEFUN([AC_CHECK_MKSTEMPS],
 
2276
[
 
2277
        KDE_CHECK_FUNC_EXT(mkstemps, [
 
2278
#include <stdlib.h>
 
2279
#include <unistd.h>
 
2280
],
 
2281
        [
 
2282
mkstemps("/tmp/aaaXXXXXX", 6);
 
2283
],
 
2284
        [int mkstemps(char *, int)],
 
2285
        [MKSTEMPS])
 
2286
])
 
2287
 
 
2288
AC_DEFUN([AC_CHECK_MKDTEMP],
 
2289
[
 
2290
        KDE_CHECK_FUNC_EXT(mkdtemp, [
 
2291
#include <stdlib.h>
 
2292
#include <unistd.h>
 
2293
],
 
2294
        [
 
2295
mkdtemp("/tmp/aaaXXXXXX");
 
2296
],
 
2297
        [char *mkdtemp(char *)],
 
2298
        [MKDTEMP])
 
2299
])
 
2300
 
 
2301
 
 
2302
AC_DEFUN([AC_CHECK_RES_INIT],
 
2303
[
 
2304
  AC_MSG_CHECKING([if res_init needs -lresolv])
 
2305
  kde_libs_safe="$LIBS"
 
2306
  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
 
2307
  AC_TRY_LINK(
 
2308
    [
 
2309
#include <sys/types.h>
 
2310
#include <netinet/in.h>
 
2311
#include <arpa/nameser.h>
 
2312
#include <resolv.h>
 
2313
    ],
 
2314
    [
 
2315
      res_init(); 
 
2316
    ],
 
2317
    [
 
2318
      LIBRESOLV="-lresolv"
 
2319
      AC_MSG_RESULT(yes)
 
2320
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
 
2321
    ],
 
2322
    [ AC_MSG_RESULT(no) ]
 
2323
  )
 
2324
  LIBS=$kde_libs_safe
 
2325
  AC_SUBST(LIBRESOLV)
 
2326
 
 
2327
  AC_MSG_CHECKING([if res_init is available])
 
2328
  AC_TRY_COMPILE(
 
2329
    [
 
2330
#include <sys/types.h>
 
2331
#include <netinet/in.h>
 
2332
#include <arpa/nameser.h>
 
2333
#include <resolv.h>
 
2334
    ],
 
2335
    [
 
2336
      res_init();
 
2337
    ],
 
2338
    [
 
2339
      AC_MSG_RESULT(yes)
 
2340
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
 
2341
    ],
 
2342
    [ AC_MSG_RESULT(no) ]
 
2343
  )
 
2344
])
 
2345
 
 
2346
AC_DEFUN([AC_CHECK_STRLCPY],
 
2347
[
 
2348
        KDE_CHECK_FUNC_EXT(strlcpy, [
 
2349
#include <string.h>
 
2350
],
 
2351
[ char buf[20];
 
2352
  strlcpy(buf, "KDE function test", sizeof(buf));
 
2353
],
 
2354
        [unsigned long strlcpy(char*, const char*, unsigned long)],
 
2355
        [STRLCPY])
 
2356
])
 
2357
 
 
2358
AC_DEFUN([AC_CHECK_STRLCAT],
 
2359
[
 
2360
        KDE_CHECK_FUNC_EXT(strlcat, [
 
2361
#include <string.h>
 
2362
],
 
2363
[ char buf[20];
 
2364
  buf[0]='\0';
 
2365
  strlcat(buf, "KDE function test", sizeof(buf));
 
2366
],
 
2367
        [unsigned long strlcat(char*, const char*, unsigned long)],
 
2368
        [STRLCAT])
 
2369
])
 
2370
 
 
2371
AC_DEFUN([AC_FIND_GIF],
 
2372
   [AC_MSG_CHECKING([for giflib])
 
2373
AC_CACHE_VAL(ac_cv_lib_gif,
 
2374
[ac_save_LIBS="$LIBS"
 
2375
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
2376
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
 
2377
else
 
2378
LIBS="$all_libraries -lgif"
 
2379
fi
 
2380
AC_TRY_LINK(dnl
 
2381
[
 
2382
#ifdef __cplusplus
 
2383
extern "C" {
 
2384
#endif
 
2385
int GifLastError(void);
 
2386
#ifdef __cplusplus
 
2387
}
 
2388
#endif
 
2389
/* We use char because int might match the return type of a gcc2
 
2390
    builtin and then its argument prototype would still apply.  */
 
2391
],
 
2392
            [return GifLastError();],
 
2393
            eval "ac_cv_lib_gif=yes",
 
2394
            eval "ac_cv_lib_gif=no")
 
2395
LIBS="$ac_save_LIBS"
 
2396
])dnl
 
2397
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
 
2398
  AC_MSG_RESULT(yes)
 
2399
  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
 
2400
else
 
2401
  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
 
2402
fi
 
2403
])
 
2404
 
 
2405
AC_DEFUN([KDE_FIND_JPEG_HELPER],
 
2406
[
 
2407
AC_MSG_CHECKING([for libjpeg$2])
 
2408
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
 
2409
[
 
2410
ac_save_LIBS="$LIBS"
 
2411
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
 
2412
ac_save_CFLAGS="$CFLAGS"
 
2413
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2414
AC_TRY_LINK(
 
2415
[/* Override any gcc2 internal prototype to avoid an error.  */
 
2416
struct jpeg_decompress_struct;
 
2417
typedef struct jpeg_decompress_struct * j_decompress_ptr;
 
2418
typedef int size_t;
 
2419
#ifdef __cplusplus
 
2420
extern "C" {
 
2421
#endif
 
2422
    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
 
2423
                                    int version, size_t structsize);
 
2424
#ifdef __cplusplus
 
2425
}
 
2426
#endif
 
2427
/* We use char because int might match the return type of a gcc2
 
2428
    builtin and then its argument prototype would still apply.  */
 
2429
],
 
2430
            [jpeg_CreateDecompress(0L, 0, 0);],
 
2431
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
 
2432
            eval "ac_cv_lib_jpeg_$1=no")
 
2433
LIBS="$ac_save_LIBS"
 
2434
CFLAGS="$ac_save_CFLAGS"
 
2435
])
 
2436
 
 
2437
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
 
2438
  LIBJPEG="$ac_cv_lib_jpeg_$1"
 
2439
  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
 
2440
else
 
2441
  AC_MSG_RESULT(no)
 
2442
  $3
 
2443
fi
 
2444
 
 
2445
])
 
2446
 
 
2447
AC_DEFUN([AC_FIND_JPEG],
 
2448
[
 
2449
dnl first look for libraries
 
2450
KDE_FIND_JPEG_HELPER(6b, 6b,
 
2451
   KDE_FIND_JPEG_HELPER(normal, [],
 
2452
    [
 
2453
       LIBJPEG=
 
2454
    ]
 
2455
   )
 
2456
)
 
2457
 
 
2458
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
 
2459
dnl requires system dependent includes loaded before it)
 
2460
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
 
2461
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
 
2462
test "x$jpeg_incdir" = xNO && jpeg_incdir=
 
2463
 
 
2464
dnl if headers _and_ libraries are missing, this is no error, and we
 
2465
dnl continue with a warning (the user will get no jpeg support in khtml)
 
2466
dnl if only one is missing, it means a configuration error, but we still
 
2467
dnl only warn
 
2468
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
 
2469
  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
 
2470
else
 
2471
  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
 
2472
    AC_MSG_WARN([
 
2473
There is an installation error in jpeg support. You seem to have only one
 
2474
of either the headers _or_ the libraries installed. You may need to either
 
2475
provide correct --with-extra-... options, or the development package of
 
2476
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
 
2477
Disabling JPEG support.
 
2478
])
 
2479
  else
 
2480
    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
 
2481
  fi
 
2482
  jpeg_incdir=
 
2483
  LIBJPEG=
 
2484
fi
 
2485
 
 
2486
AC_SUBST(LIBJPEG)
 
2487
AH_VERBATIM(_AC_CHECK_JPEG,
 
2488
[/*
 
2489
 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
 
2490
 * headers and I'm too lazy to write a configure test as long as only
 
2491
 * unixware is related
 
2492
 */
 
2493
#ifdef _UNIXWARE
 
2494
#define HAVE_BOOLEAN
 
2495
#endif
 
2496
])
 
2497
])
 
2498
 
 
2499
AC_DEFUN([KDE_CHECK_QT_JPEG],
 
2500
[
 
2501
if test -n "$LIBJPEG"; then
 
2502
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
 
2503
AC_CACHE_VAL(kde_cv_qt_jpeg,
 
2504
[
 
2505
AC_LANG_SAVE
 
2506
AC_LANG_CPLUSPLUS
 
2507
ac_save_LIBS="$LIBS"
 
2508
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
 
2509
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
 
2510
ac_save_CXXFLAGS="$CXXFLAGS"
 
2511
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
2512
AC_TRY_LINK(
 
2513
[#include <qapplication.h>],
 
2514
            [
 
2515
            int argc;
 
2516
            char** argv;
 
2517
            QApplication app(argc, argv);],
 
2518
            eval "kde_cv_qt_jpeg=no",
 
2519
            eval "kde_cv_qt_jpeg=yes")
 
2520
LIBS="$ac_save_LIBS"
 
2521
CXXFLAGS="$ac_save_CXXFLAGS"
 
2522
AC_LANG_RESTORE
 
2523
fi
 
2524
])
 
2525
 
 
2526
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
 
2527
  AC_MSG_RESULT(yes)
 
2528
  LIBJPEG_QT='$(LIBJPEG)'
 
2529
else
 
2530
  AC_MSG_RESULT(no)
 
2531
  LIBJPEG_QT=
 
2532
fi
 
2533
 
 
2534
])
 
2535
 
 
2536
AC_DEFUN([AC_FIND_ZLIB],
 
2537
[
 
2538
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2539
AC_MSG_CHECKING([for libz])
 
2540
AC_CACHE_VAL(ac_cv_lib_z,
 
2541
[
 
2542
kde_save_LIBS="$LIBS"
 
2543
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
 
2544
kde_save_CFLAGS="$CFLAGS"
 
2545
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2546
AC_TRY_LINK(dnl
 
2547
[
 
2548
#include<zlib.h>
 
2549
],
 
2550
[
 
2551
  char buf[42];
 
2552
  gzFile f = (gzFile) 0;
 
2553
  /* this would segfault.. but we only link, don't run */
 
2554
  (void) gzgets(f, buf, sizeof(buf));
 
2555
 
 
2556
  return (zlibVersion() == ZLIB_VERSION); 
 
2557
],
 
2558
            eval "ac_cv_lib_z='-lz'",
 
2559
            eval "ac_cv_lib_z=no")
 
2560
LIBS="$kde_save_LIBS"
 
2561
CFLAGS="$kde_save_CFLAGS"
 
2562
])dnl
 
2563
if test ! "$ac_cv_lib_z" = no; then
 
2564
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
 
2565
  LIBZ="$ac_cv_lib_z"
 
2566
  AC_MSG_RESULT($ac_cv_lib_z)
 
2567
else
 
2568
  AC_MSG_ERROR(not found. 
 
2569
          Possibly configure picks up an outdated version
 
2570
          installed by XFree86. Remove it from your system.
 
2571
 
 
2572
          Check your installation and look into config.log)
 
2573
  LIBZ=""
 
2574
fi
 
2575
AC_SUBST(LIBZ)
 
2576
])
 
2577
 
 
2578
AC_DEFUN([KDE_TRY_TIFFLIB],
 
2579
[
 
2580
AC_MSG_CHECKING([for libtiff $1])
 
2581
 
 
2582
AC_CACHE_VAL(kde_cv_libtiff_$1,
 
2583
[
 
2584
AC_LANG_SAVE
 
2585
AC_LANG_CPLUSPLUS
 
2586
kde_save_LIBS="$LIBS"
 
2587
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
2588
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
 
2589
else
 
2590
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
 
2591
fi
 
2592
kde_save_CXXFLAGS="$CXXFLAGS"
 
2593
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
2594
 
 
2595
AC_TRY_LINK(dnl
 
2596
[
 
2597
#include<tiffio.h>
 
2598
],
 
2599
    [return (TIFFOpen( "", "r") == 0); ],
 
2600
[
 
2601
    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
 
2602
], [
 
2603
    kde_cv_libtiff_$1=no
 
2604
])
 
2605
 
 
2606
LIBS="$kde_save_LIBS"
 
2607
CXXFLAGS="$kde_save_CXXFLAGS"
 
2608
AC_LANG_RESTORE
 
2609
])
 
2610
 
 
2611
if test "$kde_cv_libtiff_$1" = "no"; then
 
2612
    AC_MSG_RESULT(no)
 
2613
    LIBTIFF=""
 
2614
    $3
 
2615
else
 
2616
    LIBTIFF="$kde_cv_libtiff_$1"
 
2617
    AC_MSG_RESULT(yes)
 
2618
    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
 
2619
    $2
 
2620
fi
 
2621
 
 
2622
])
 
2623
 
 
2624
AC_DEFUN([AC_FIND_TIFF],
 
2625
[
 
2626
AC_REQUIRE([K_PATH_X])
 
2627
AC_REQUIRE([AC_FIND_ZLIB])
 
2628
AC_REQUIRE([AC_FIND_JPEG])
 
2629
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2630
 
 
2631
KDE_TRY_TIFFLIB(tiff, [],
 
2632
   KDE_TRY_TIFFLIB(tiff34))
 
2633
 
 
2634
AC_SUBST(LIBTIFF)
 
2635
])
 
2636
 
 
2637
 
 
2638
AC_DEFUN([AC_FIND_PNG],
 
2639
[
 
2640
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2641
AC_REQUIRE([AC_FIND_ZLIB])
 
2642
AC_MSG_CHECKING([for libpng])
 
2643
AC_CACHE_VAL(ac_cv_lib_png,
 
2644
[
 
2645
kde_save_LIBS="$LIBS"
 
2646
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
2647
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
 
2648
else
 
2649
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
 
2650
fi
 
2651
kde_save_CFLAGS="$CFLAGS"
 
2652
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2653
 
 
2654
AC_TRY_LINK(dnl
 
2655
    [
 
2656
    #include<png.h>
 
2657
    ],
 
2658
    [
 
2659
    png_structp png_ptr = png_create_read_struct(  /* image ptr */
 
2660
                PNG_LIBPNG_VER_STRING, 0, 0, 0 );
 
2661
    return( png_ptr != 0 );
 
2662
    ],
 
2663
    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
 
2664
    eval "ac_cv_lib_png=no"
 
2665
)
 
2666
LIBS="$kde_save_LIBS"
 
2667
CFLAGS="$kde_save_CFLAGS"
 
2668
])dnl
 
2669
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
 
2670
  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
 
2671
  LIBPNG="$ac_cv_lib_png"
 
2672
  AC_SUBST(LIBPNG)
 
2673
  AC_MSG_RESULT($ac_cv_lib_png)
 
2674
else
 
2675
  AC_MSG_RESULT(no)
 
2676
  LIBPNG=""
 
2677
  AC_SUBST(LIBPNG)
 
2678
fi
 
2679
])
 
2680
 
 
2681
 
 
2682
AC_DEFUN([AC_FIND_JASPER],
 
2683
[
 
2684
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2685
AC_REQUIRE([AC_FIND_JPEG])
 
2686
AC_MSG_CHECKING([for jasper])
 
2687
AC_CACHE_VAL(ac_cv_jasper,
 
2688
[
 
2689
kde_save_LIBS="$LIBS"
 
2690
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
 
2691
kde_save_CFLAGS="$CFLAGS"
 
2692
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2693
 
 
2694
AC_TRY_LINK(dnl
 
2695
    [
 
2696
    #include<jasper/jasper.h>
 
2697
    ],
 
2698
    [
 
2699
    return( jas_init() );
 
2700
    ],
 
2701
    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
 
2702
    eval "ac_cv_jasper=no"
 
2703
)
 
2704
LIBS="$kde_save_LIBS"
 
2705
CFLAGS="$kde_save_CFLAGS"
 
2706
])dnl
 
2707
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
 
2708
  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
 
2709
  LIB_JASPER="$ac_cv_jasper"
 
2710
  AC_MSG_RESULT($ac_cv_jasper)
 
2711
else
 
2712
  AC_MSG_RESULT(no)
 
2713
  LIB_JASPER=""
 
2714
fi
 
2715
AC_SUBST(LIB_JASPER)
 
2716
])
 
2717
 
 
2718
AC_DEFUN([AC_CHECK_BOOL],
 
2719
[
 
2720
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
 
2721
])
 
2722
 
 
2723
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
 
2724
[
 
2725
AC_MSG_CHECKING(if you need GNU extensions)
 
2726
AC_CACHE_VAL(ac_cv_gnu_extensions,
 
2727
[
 
2728
cat > conftest.c << EOF
 
2729
#include <features.h>
 
2730
 
 
2731
#ifdef __GNU_LIBRARY__
 
2732
yes
 
2733
#endif
 
2734
EOF
 
2735
 
 
2736
if (eval "$ac_cpp conftest.c") 2>&5 |
 
2737
  egrep "yes" >/dev/null 2>&1; then
 
2738
  rm -rf conftest*
 
2739
  ac_cv_gnu_extensions=yes
 
2740
else
 
2741
  ac_cv_gnu_extensions=no
 
2742
fi
 
2743
])
 
2744
 
 
2745
AC_MSG_RESULT($ac_cv_gnu_extensions)
 
2746
if test "$ac_cv_gnu_extensions" = "yes"; then
 
2747
  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
 
2748
fi
 
2749
])
 
2750
 
 
2751
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
 
2752
[
 
2753
AC_MSG_CHECKING([whether $CXX supports -$1])
 
2754
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
 
2755
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
 
2756
[
 
2757
  AC_LANG_SAVE
 
2758
  AC_LANG_CPLUSPLUS
 
2759
  save_CXXFLAGS="$CXXFLAGS"
 
2760
  CXXFLAGS="$CXXFLAGS -$1"
 
2761
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
 
2762
  CXXFLAGS="$save_CXXFLAGS"
 
2763
  AC_LANG_RESTORE
 
2764
])
 
2765
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
 
2766
 AC_MSG_RESULT(yes)
 
2767
 :
 
2768
 $2
 
2769
else
 
2770
 AC_MSG_RESULT(no)
 
2771
 :
 
2772
 $3
 
2773
fi
 
2774
])
 
2775
 
 
2776
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
 
2777
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
 
2778
dnl it's all white-space separated
 
2779
AC_DEFUN([AC_REMOVE_FORBIDDEN],
 
2780
[ __val=$$1
 
2781
  __forbid=" $2 "
 
2782
  if test -n "$__val"; then
 
2783
    __new=""
 
2784
    ac_save_IFS=$IFS
 
2785
    IFS="       "
 
2786
    for i in $__val; do
 
2787
      case "$__forbid" in
 
2788
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
 
2789
        *) # Careful to not add spaces, where there were none, because otherwise
 
2790
           # libtool gets confused, if we change e.g. CXX
 
2791
           if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
 
2792
      esac
 
2793
    done
 
2794
    IFS=$ac_save_IFS
 
2795
    $1=$__new
 
2796
  fi
 
2797
])
 
2798
 
 
2799
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
 
2800
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
 
2801
[dnl
 
2802
if test "x$kde_use_qt_emb" != "xyes"; then
 
2803
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
 
2804
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
 
2805
else
 
2806
 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
 
2807
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
 
2808
fi
 
2809
])
 
2810
 
 
2811
AC_DEFUN([AC_CHECK_COMPILERS],
 
2812
[
 
2813
  AC_ARG_ENABLE(debug,
 
2814
                AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
 
2815
  [
 
2816
    case $enableval in
 
2817
      yes)
 
2818
        kde_use_debug_code="yes"
 
2819
        kde_use_debug_define=no
 
2820
        ;;
 
2821
      full)
 
2822
        kde_use_debug_code="full"
 
2823
        kde_use_debug_define=no
 
2824
        ;;
 
2825
      *)
 
2826
        kde_use_debug_code="no"
 
2827
        kde_use_debug_define=yes
 
2828
        ;;
 
2829
    esac
 
2830
  ], 
 
2831
    [kde_use_debug_code="no"
 
2832
      kde_use_debug_define=no
 
2833
  ])
 
2834
 
 
2835
  dnl Just for configure --help
 
2836
  AC_ARG_ENABLE(dummyoption,
 
2837
                AC_HELP_STRING([--disable-debug],
 
2838
                               [disables debug output and debug symbols [default=no]]),
 
2839
                [],[])
 
2840
 
 
2841
  AC_ARG_ENABLE(strict,
 
2842
                AC_HELP_STRING([--enable-strict],
 
2843
                              [compiles with strict compiler options (may not work!)]),
 
2844
   [
 
2845
    if test $enableval = "no"; then
 
2846
         kde_use_strict_options="no"
 
2847
       else
 
2848
         kde_use_strict_options="yes"
 
2849
    fi
 
2850
   ], [kde_use_strict_options="no"])
 
2851
 
 
2852
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similiar]),
 
2853
   [
 
2854
    if test $enableval = "no"; then
 
2855
         kde_use_warnings="no"
 
2856
       else
 
2857
         kde_use_warnings="yes"
 
2858
    fi
 
2859
   ], [kde_use_warnings="yes"])
 
2860
 
 
2861
  dnl enable warnings for debug build
 
2862
  if test "$kde_use_debug_code" != "no"; then
 
2863
    kde_use_warnings=yes
 
2864
  fi
 
2865
 
 
2866
  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
 
2867
    [kde_use_profiling=$enableval],
 
2868
    [kde_use_profiling="no"]
 
2869
  )
 
2870
 
 
2871
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
 
2872
  CFLAGS=" $CFLAGS"
 
2873
 
 
2874
  AC_PROG_CC 
 
2875
 
 
2876
  AC_PROG_CPP
 
2877
 
 
2878
  if test "$GCC" = "yes"; then
 
2879
    if test "$kde_use_debug_code" != "no"; then
 
2880
      if test $kde_use_debug_code = "full"; then
 
2881
        CFLAGS="-g3 -fno-inline $CFLAGS"
 
2882
      else
 
2883
        CFLAGS="-g -O2 $CFLAGS"
 
2884
      fi
 
2885
    else
 
2886
      CFLAGS="-O2 $CFLAGS"
 
2887
    fi
 
2888
  fi
 
2889
 
 
2890
  if test "$kde_use_debug_define" = "yes"; then
 
2891
    CFLAGS="-DNDEBUG $CFLAGS"
 
2892
  fi
 
2893
 
 
2894
 
 
2895
  case "$host" in
 
2896
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
 
2897
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
 
2898
  esac
 
2899
 
 
2900
  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
 
2901
     LDFLAGS=""
 
2902
  fi
 
2903
 
 
2904
  CXXFLAGS=" $CXXFLAGS"
 
2905
 
 
2906
  AC_PROG_CXX
 
2907
 
 
2908
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
 
2909
    if test "$kde_use_debug_code" != "no"; then
 
2910
      if test "$CXX" = "KCC"; then
 
2911
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
 
2912
      else
 
2913
        if test "$kde_use_debug_code" = "full"; then
 
2914
          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
 
2915
        else
 
2916
          CXXFLAGS="-g -O2 $CXXFLAGS"
 
2917
        fi
 
2918
      fi
 
2919
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
 
2920
 
 
2921
      dnl convenience compiler flags
 
2922
      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
 
2923
      AC_SUBST(WOVERLOADED_VIRTUAL)
 
2924
    else
 
2925
      if test "$CXX" = "KCC"; then
 
2926
        CXXFLAGS="+K3 $CXXFLAGS"
 
2927
      else
 
2928
        CXXFLAGS="-O2 $CXXFLAGS"
 
2929
      fi  
 
2930
    fi
 
2931
  fi
 
2932
 
 
2933
  if test "$kde_use_debug_define" = "yes"; then
 
2934
    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
 
2935
  fi  
 
2936
 
 
2937
  if test "$kde_use_profiling" = "yes"; then
 
2938
    KDE_CHECK_COMPILER_FLAG(pg,
 
2939
    [
 
2940
      CFLAGS="-pg $CFLAGS"
 
2941
      CXXFLAGS="-pg $CXXFLAGS"
 
2942
    ])
 
2943
  fi
 
2944
 
 
2945
  if test "$kde_use_warnings" = "yes"; then
 
2946
      if test "$GCC" = "yes"; then
 
2947
        case $host in
 
2948
          *-*-linux-gnu)        
 
2949
            CFLAGS="-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
 
2950
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
 
2951
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
 
2952
          ;;
 
2953
        esac
 
2954
        CXXFLAGS="-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
 
2955
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
 
2956
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
 
2957
        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
 
2958
     fi
 
2959
  fi
 
2960
 
 
2961
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
 
2962
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
 
2963
  fi
 
2964
    
 
2965
  if test "$GXX" = "yes"; then
 
2966
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
 
2967
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
 
2968
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
 
2969
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
 
2970
  fi
 
2971
  if test "$CXX" = "KCC"; then
 
2972
    dnl unfortunately we currently cannot disable exception support in KCC
 
2973
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
 
2974
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
 
2975
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
 
2976
 
 
2977
    AC_ARG_ENABLE(pch,
 
2978
        AC_HELP_STRING([--enable-pch],
 
2979
                       [enables precompiled header support (currently only KCC) [default=no]]),
 
2980
    [
 
2981
      kde_use_pch=$enableval
 
2982
    ],[kde_use_pch=no])
 
2983
 
 
2984
    if test "$kde_use_pch" = "yes"; then
 
2985
      dnl TODO: support --pch-dir!
 
2986
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
 
2987
      dnl the below works (but the dir must exist), but it's
 
2988
      dnl useless for a whole package.
 
2989
      dnl The are precompiled headers for each source file, so when compiling
 
2990
      dnl from scratch, it doesn't make a difference, and they take up
 
2991
      dnl around ~5Mb _per_ sourcefile.
 
2992
      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
 
2993
      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
 
2994
    fi
 
2995
    dnl this flag controls inlining. by default KCC inlines in optimisation mode
 
2996
    dnl all implementations that are defined inside the class {} declaration. 
 
2997
    dnl because of templates-compatibility with broken gcc compilers, this
 
2998
    dnl can cause excessive inlining. This flag limits it to a sane level
 
2999
    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
 
3000
    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
 
3001
    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
 
3002
    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
 
3003
    dnl Some source files are shared between multiple executables
 
3004
    dnl (or libraries) and some of those need template instantiations.
 
3005
    dnl In that case KCC needs to compile those sources with
 
3006
    dnl --one_instantiation_per_object.  To make it easy for us we compile
 
3007
    dnl _all_ objects with that flag (--one_per is a shorthand).
 
3008
    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
 
3009
  fi
 
3010
  AC_SUBST(USE_EXCEPTIONS)
 
3011
  dnl obsolete macro - provided to keep things going
 
3012
  USE_RTTI=
 
3013
  AC_SUBST(USE_RTTI)
 
3014
 
 
3015
  case "$host" in
 
3016
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
 
3017
      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
 
3018
      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
 
3019
      *-*-solaris*) 
 
3020
        if test "$GXX" = yes; then
 
3021
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
 
3022
          if test ! -f $libstdcpp; then
 
3023
             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])
 
3024
          fi
 
3025
        fi
 
3026
        ;;
 
3027
  esac
 
3028
 
 
3029
  AC_VALIDIFY_CXXFLAGS
 
3030
 
 
3031
  AC_PROG_CXXCPP
 
3032
 
 
3033
  if test "$GCC" = yes; then
 
3034
     NOOPT_CFLAGS=-O0
 
3035
  fi
 
3036
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
 
3037
 
 
3038
  AC_SUBST(NOOPT_CXXFLAGS)
 
3039
  AC_SUBST(NOOPT_CFLAGS)
 
3040
 
 
3041
  KDE_CHECK_FINAL
 
3042
  KDE_CHECK_CLOSURE
 
3043
  KDE_CHECK_NMCHECK
 
3044
 
 
3045
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
 
3046
])
 
3047
 
 
3048
AC_DEFUN([KDE_ADD_DEPENDENCIES],
 
3049
[
 
3050
   [A]M_DEPENDENCIES(CC)
 
3051
   [A]M_DEPENDENCIES(CXX)
 
3052
])
 
3053
 
 
3054
dnl just a wrapper to clean up configure.in
 
3055
AC_DEFUN([KDE_PROG_LIBTOOL],
 
3056
[
 
3057
AC_REQUIRE([AC_CHECK_COMPILERS])
 
3058
AC_REQUIRE([AC_ENABLE_SHARED])
 
3059
AC_REQUIRE([AC_ENABLE_STATIC])
 
3060
 
 
3061
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
 
3062
AC_REQUIRE([KDE_CHECK_LIB64])
 
3063
 
 
3064
AC_OBJEXT
 
3065
AC_EXEEXT
 
3066
 
 
3067
AM_PROG_LIBTOOL
 
3068
AC_LIBTOOL_CXX
 
3069
 
 
3070
LIBTOOL_SHELL="/bin/sh ./libtool"
 
3071
#  LIBTOOL="$LIBTOOL --silent"
 
3072
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
 
3073
AC_SUBST(KDE_PLUGIN)
 
3074
 
 
3075
# we patch configure quite some so we better keep that consistent for incremental runs 
 
3076
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
 
3077
])
 
3078
 
 
3079
AC_DEFUN([KDE_CHECK_LIB64],
 
3080
[
 
3081
    kdelibsuff=no
 
3082
    AC_ARG_ENABLE(libsuffix,
 
3083
        AC_HELP_STRING([--enable-libsuffix],
 
3084
            [/lib directory suffix (64,32,none[=default])]),
 
3085
            kdelibsuff=$enableval)
 
3086
    # TODO: add an auto case that compiles a little C app to check
 
3087
    # where the glibc is
 
3088
    if test "$kdelibsuff" = "no"; then
 
3089
       kdelibsuff=
 
3090
    fi
 
3091
    if test -z "$kdelibsuff"; then
 
3092
        AC_MSG_RESULT([not using lib directory suffix])
 
3093
        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
 
3094
    else
 
3095
        if test "$libdir" = '${exec_prefix}/lib'; then
 
3096
            libdir="$libdir${kdelibsuff}"
 
3097
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
 
3098
        fi
 
3099
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
 
3100
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
 
3101
    fi
 
3102
])
 
3103
 
 
3104
AC_DEFUN([KDE_CHECK_TYPES],
 
3105
[  AC_CHECK_SIZEOF(int, 4)dnl
 
3106
   AC_CHECK_SIZEOF(short)dnl
 
3107
  AC_CHECK_SIZEOF(long, 4)dnl
 
3108
  AC_CHECK_SIZEOF(char *, 4)dnl
 
3109
])dnl
 
3110
 
 
3111
AC_DEFUN([KDE_DO_IT_ALL],
 
3112
[
 
3113
AC_CANONICAL_SYSTEM
 
3114
AC_ARG_PROGRAM
 
3115
AM_INIT_AUTOMAKE($1, $2)
 
3116
AM_DISABLE_LIBRARIES
 
3117
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
 
3118
AC_CHECK_COMPILERS
 
3119
KDE_PROG_LIBTOOL
 
3120
AM_KDE_WITH_NLS
 
3121
AC_PATH_KDE
 
3122
])
 
3123
 
 
3124
AC_DEFUN([AC_CHECK_RPATH],
 
3125
[
 
3126
AC_MSG_CHECKING(for rpath)
 
3127
AC_ARG_ENABLE(rpath,
 
3128
      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
 
3129
      USE_RPATH=$enableval, USE_RPATH=yes)
 
3130
 
 
3131
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
 
3132
 
 
3133
  KDE_RPATH="-R \$(kde_libraries)"
 
3134
 
 
3135
  if test -n "$qt_libraries"; then
 
3136
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
 
3137
  fi
 
3138
  dnl $x_libraries is set to /usr/lib in case
 
3139
  if test -n "$X_LDFLAGS"; then
 
3140
    X_RPATH="-R \$(x_libraries)"
 
3141
    KDE_RPATH="$KDE_RPATH $X_RPATH"
 
3142
  fi
 
3143
  if test -n "$KDE_EXTRA_RPATH"; then
 
3144
    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
 
3145
  fi
 
3146
fi
 
3147
AC_SUBST(KDE_EXTRA_RPATH)
 
3148
AC_SUBST(KDE_RPATH)
 
3149
AC_SUBST(X_RPATH)
 
3150
AC_MSG_RESULT($USE_RPATH)
 
3151
])
 
3152
 
 
3153
dnl Check for the type of the third argument of getsockname
 
3154
AC_DEFUN([AC_CHECK_SOCKLEN_T], [
 
3155
  AC_MSG_CHECKING(for socklen_t)
 
3156
  AC_CACHE_VAL(ac_cv_socklen_t, [
 
3157
    AC_LANG_SAVE
 
3158
    AC_LANG_CPLUSPLUS
 
3159
    AC_TRY_COMPILE([
 
3160
#include <sys/types.h>
 
3161
#include <sys/socket.h>
 
3162
      ],[
 
3163
socklen_t a=0;
 
3164
getsockname(0,(struct sockaddr*)0, &a);
 
3165
      ],
 
3166
      ac_cv_socklen_t=socklen_t,
 
3167
      AC_TRY_COMPILE([
 
3168
#include <sys/types.h>
 
3169
#include <sys/socket.h>
 
3170
        ],[
 
3171
int a=0;
 
3172
getsockname(0,(struct sockaddr*)0, &a);
 
3173
        ],
 
3174
        ac_cv_socklen_t=int,
 
3175
        ac_cv_socklen_t=size_t
 
3176
      )
 
3177
    )
 
3178
    AC_LANG_RESTORE
 
3179
  ])
 
3180
 
 
3181
  AC_MSG_RESULT($ac_cv_socklen_t)
 
3182
  if test "$ac_cv_socklen_t" != "socklen_t"; then
 
3183
    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
 
3184
        [Define the real type of socklen_t])
 
3185
  fi
 
3186
  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
 
3187
 
 
3188
])
 
3189
 
 
3190
dnl This is a merge of some macros out of the gettext aclocal.m4
 
3191
dnl since we don't need anything, I took the things we need
 
3192
dnl the copyright for them is:
 
3193
dnl >
 
3194
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
3195
dnl This Makefile.in is free software; the Free Software Foundation
 
3196
dnl gives unlimited permission to copy and/or distribute it,
 
3197
dnl with or without modifications, as long as this notice is preserved.
 
3198
 
 
3199
dnl This program is distributed in the hope that it will be useful,
 
3200
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
3201
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
3202
dnl PARTICULAR PURPOSE.
 
3203
dnl >
 
3204
dnl for this file it is relicensed under LGPL
 
3205
 
 
3206
AC_DEFUN([AM_KDE_WITH_NLS],
 
3207
  [
 
3208
    dnl If we use NLS figure out what method
 
3209
 
 
3210
    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
 
3211
        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
 
3212
    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
3213
 
 
3214
     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
 
3215
        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
 
3216
        GMSGFMT=":"
 
3217
      fi
 
3218
      MSGFMT=$GMSGFMT
 
3219
      AC_SUBST(GMSGFMT)
 
3220
      AC_SUBST(MSGFMT)
 
3221
 
 
3222
      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
 
3223
        [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
3224
 
 
3225
      dnl Test whether we really found GNU xgettext.
 
3226
      if test "$XGETTEXT" != ":"; then
 
3227
        dnl If it is no GNU xgettext we define it as : so that the
 
3228
        dnl Makefiles still can work.
 
3229
        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
3230
          : ;
 
3231
        else
 
3232
          AC_MSG_RESULT(
 
3233
            [found xgettext programs is not GNU xgettext; ignore it])
 
3234
          XGETTEXT=":"
 
3235
        fi
 
3236
      fi
 
3237
     AC_SUBST(XGETTEXT)
 
3238
 
 
3239
  ])
 
3240
 
 
3241
# Search path for a program which passes the given test.
 
3242
# Ulrich Drepper <drepper@cygnus.com>, 1996.
 
3243
 
 
3244
# serial 1
 
3245
# Stephan Kulow: I appended a _KDE against name conflicts
 
3246
 
 
3247
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
 
3248
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
3249
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
 
3250
[# Extract the first word of "$2", so it can be a program name with args.
 
3251
set dummy $2; ac_word=[$]2
 
3252
AC_MSG_CHECKING([for $ac_word])
 
3253
AC_CACHE_VAL(ac_cv_path_$1,
 
3254
[case "[$]$1" in
 
3255
  /*)
 
3256
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
3257
  ;;
 
3258
  *)
 
3259
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
3260
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
3261
    test -z "$ac_dir" && ac_dir=.
 
3262
    if test -f $ac_dir/$ac_word; then
 
3263
      if [$3]; then
 
3264
        ac_cv_path_$1="$ac_dir/$ac_word"
 
3265
        break
 
3266
      fi
 
3267
    fi
 
3268
  done
 
3269
  IFS="$ac_save_ifs"
 
3270
dnl If no 4th arg is given, leave the cache variable unset,
 
3271
dnl so AC_PATH_PROGS will keep looking.
 
3272
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
3273
])dnl
 
3274
  ;;
 
3275
esac])dnl
 
3276
$1="$ac_cv_path_$1"
 
3277
if test -n "[$]$1"; then
 
3278
  AC_MSG_RESULT([$]$1)
 
3279
else
 
3280
  AC_MSG_RESULT(no)
 
3281
fi
 
3282
AC_SUBST($1)dnl
 
3283
])
 
3284
 
 
3285
 
 
3286
# Check whether LC_MESSAGES is available in <locale.h>.
 
3287
# Ulrich Drepper <drepper@cygnus.com>, 1995.
 
3288
 
 
3289
# serial 1
 
3290
 
 
3291
AC_DEFUN([AM_LC_MESSAGES],
 
3292
  [if test $ac_cv_header_locale_h = yes; then
 
3293
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
3294
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
3295
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
3296
    if test $am_cv_val_LC_MESSAGES = yes; then
 
3297
      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
 
3298
    fi
 
3299
  fi])
 
3300
 
 
3301
dnl From Jim Meyering.
 
3302
dnl FIXME: migrate into libit.
 
3303
 
 
3304
AC_DEFUN([AM_FUNC_OBSTACK],
 
3305
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
 
3306
 [AC_TRY_LINK([#include "obstack.h"],
 
3307
              [struct obstack *mem;obstack_free(mem,(char *) 0)],
 
3308
              am_cv_func_obstack=yes,
 
3309
              am_cv_func_obstack=no)])
 
3310
 if test $am_cv_func_obstack = yes; then
 
3311
   AC_DEFINE(HAVE_OBSTACK)
 
3312
 else
 
3313
   LIBOBJS="$LIBOBJS obstack.o"
 
3314
 fi
 
3315
])
 
3316
 
 
3317
dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
 
3318
dnl FIXME: Migrate into libit
 
3319
 
 
3320
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
 
3321
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
 
3322
 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
 
3323
              am_cv_lib_error_at_line=yes,
 
3324
              am_cv_lib_error_at_line=no)])
 
3325
 if test $am_cv_lib_error_at_line = no; then
 
3326
   LIBOBJS="$LIBOBJS error.o"
 
3327
 fi
 
3328
 AC_SUBST(LIBOBJS)dnl
 
3329
])
 
3330
 
 
3331
# Macro to add for using GNU gettext.
 
3332
# Ulrich Drepper <drepper@cygnus.com>, 1995.
 
3333
 
 
3334
# serial 1
 
3335
# Stephan Kulow: I put a KDE in it to avoid name conflicts
 
3336
 
 
3337
AC_DEFUN([AM_KDE_GNU_GETTEXT],
 
3338
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
3339
   AC_REQUIRE([AC_PROG_RANLIB])dnl
 
3340
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
3341
   AC_REQUIRE([AC_TYPE_OFF_T])dnl
 
3342
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 
3343
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 
3344
   AC_REQUIRE([AC_FUNC_MMAP])dnl
 
3345
   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
 
3346
   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
 
3347
   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
 
3348
__argz_count __argz_stringify __argz_next])
 
3349
 
 
3350
   AC_MSG_CHECKING(for stpcpy)
 
3351
   AC_CACHE_VAL(kde_cv_func_stpcpy,
 
3352
   [
 
3353
   kde_safe_cxxflags=$CXXFLAGS
 
3354
   CXXFLAGS="-Werror"
 
3355
   AC_LANG_SAVE
 
3356
   AC_LANG_CPLUSPLUS
 
3357
   AC_TRY_COMPILE([
 
3358
   #include <string.h>
 
3359
   ],
 
3360
   [
 
3361
   char buffer[200];
 
3362
   stpcpy(buffer, buffer);
 
3363
   ],
 
3364
   kde_cv_func_stpcpy=yes,
 
3365
   kde_cv_func_stpcpy=no)
 
3366
   AC_LANG_RESTORE
 
3367
   CXXFLAGS=$kde_safe_cxxflags
 
3368
   ])
 
3369
   AC_MSG_RESULT($kde_cv_func_stpcpy)
 
3370
   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
 
3371
     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
 
3372
   fi
 
3373
 
 
3374
   AM_LC_MESSAGES
 
3375
 
 
3376
   if test "x$CATOBJEXT" != "x"; then
 
3377
     if test "x$ALL_LINGUAS" = "x"; then
 
3378
       LINGUAS=
 
3379
     else
 
3380
       AC_MSG_CHECKING(for catalogs to be installed)
 
3381
       NEW_LINGUAS=
 
3382
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
 
3383
         case "$ALL_LINGUAS" in
 
3384
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
 
3385
         esac
 
3386
       done
 
3387
       LINGUAS=$NEW_LINGUAS
 
3388
       AC_MSG_RESULT($LINGUAS)
 
3389
     fi
 
3390
 
 
3391
     dnl Construct list of names of catalog files to be constructed.
 
3392
     if test -n "$LINGUAS"; then
 
3393
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
3394
     fi
 
3395
   fi
 
3396
 
 
3397
  ])
 
3398
 
 
3399
AC_DEFUN([AC_HAVE_XPM],
 
3400
 [AC_REQUIRE_CPP()dnl
 
3401
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
3402
 
 
3403
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
 
3404
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
 
3405
 
 
3406
 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
 
3407
        xpm_test=$withval, xpm_test="yes")
 
3408
 if test "x$xpm_test" = xno; then
 
3409
   ac_cv_have_xpm=no
 
3410
 else
 
3411
   AC_MSG_CHECKING(for XPM)
 
3412
   AC_CACHE_VAL(ac_cv_have_xpm,
 
3413
   [
 
3414
    ac_save_ldflags="$LDFLAGS"
 
3415
    ac_save_cflags="$CFLAGS"
 
3416
    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
3417
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
 
3418
    else
 
3419
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
 
3420
    fi
 
3421
    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
 
3422
    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
 
3423
    AC_TRY_LINK([#include <X11/xpm.h>],[],
 
3424
        ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
 
3425
    LDFLAGS="$ac_save_ldflags"
 
3426
    CFLAGS="$ac_save_cflags"
 
3427
   ])dnl
 
3428
 
 
3429
  if test "$ac_cv_have_xpm" = no; then
 
3430
    AC_MSG_RESULT(no)
 
3431
    XPM_LDFLAGS=""
 
3432
    XPMINC=""
 
3433
    $2
 
3434
  else
 
3435
    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
 
3436
    if test "$XPM_LDFLAGS" = ""; then
 
3437
       XPMLIB='-lXpm $(LIB_X11)'
 
3438
    else
 
3439
       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
 
3440
    fi
 
3441
    if test "$XPM_INCLUDE" = ""; then
 
3442
       XPMINC=""
 
3443
    else
 
3444
       XPMINC="-I$XPM_INCLUDE"
 
3445
    fi
 
3446
    AC_MSG_RESULT(yes)
 
3447
    $1
 
3448
  fi
 
3449
 fi
 
3450
 AC_SUBST(XPMINC)
 
3451
 AC_SUBST(XPMLIB)
 
3452
])
 
3453
 
 
3454
AC_DEFUN([AC_HAVE_DPMS],
 
3455
 [AC_REQUIRE_CPP()dnl
 
3456
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
3457
 
 
3458
 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
 
3459
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
 
3460
 DPMS_LIB=
 
3461
 
 
3462
 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
 
3463
        dpms_test=$withval, dpms_test="yes")
 
3464
 if test "x$dpms_test" = xno; then
 
3465
   ac_cv_have_dpms=no
 
3466
 else
 
3467
   AC_MSG_CHECKING(for DPMS)
 
3468
   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
 
3469
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
 
3470
   AC_CACHE_VAL(ac_cv_have_dpms,
 
3471
   [
 
3472
    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
 
3473
      AC_MSG_RESULT(no)
 
3474
      ac_cv_have_dpms="no"
 
3475
    else
 
3476
      ac_save_ldflags="$LDFLAGS"
 
3477
      ac_save_cflags="$CFLAGS"
 
3478
      ac_save_libs="$LIBS"
 
3479
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
 
3480
      CFLAGS="$CFLAGS $X_INCLUDES"
 
3481
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3482
      AC_TRY_LINK([
 
3483
          #include <X11/Xproto.h>
 
3484
          #include <X11/X.h>
 
3485
          #include <X11/Xlib.h>
 
3486
          #include <X11/extensions/dpms.h>
 
3487
          int foo_test_dpms()
 
3488
          { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
 
3489
          ac_cv_have_dpms="yes", [
 
3490
              LDFLAGS="$ac_save_ldflags"
 
3491
              CFLAGS="$ac_save_cflags"
 
3492
              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
 
3493
              LIBS="$LIBS -lXdpms"
 
3494
              CFLAGS="$CFLAGS $X_INCLUDES"
 
3495
              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3496
              AC_TRY_LINK([
 
3497
                  #include <X11/Xproto.h>
 
3498
                  #include <X11/X.h>
 
3499
                  #include <X11/Xlib.h>
 
3500
                  #include <X11/extensions/dpms.h>
 
3501
                  int foo_test_dpms()
 
3502
                  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
 
3503
                  [
 
3504
                  ac_cv_have_dpms="-lXdpms"
 
3505
                  ],ac_cv_have_dpms="no")
 
3506
              ])
 
3507
      LDFLAGS="$ac_save_ldflags"
 
3508
      CFLAGS="$ac_save_cflags"
 
3509
      LIBS="$ac_save_libs"
 
3510
    fi
 
3511
   ])dnl
 
3512
 
 
3513
  if test "$ac_cv_have_dpms" = no; then
 
3514
    AC_MSG_RESULT(no)
 
3515
    DPMS_LDFLAGS=""
 
3516
    DPMSINC=""
 
3517
    $2
 
3518
  else
 
3519
    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
 
3520
    if test "$ac_cv_have_dpms" = "-lXdpms"; then
 
3521
       DPMS_LIB="-lXdpms"
 
3522
    fi
 
3523
    if test "$DPMS_LDFLAGS" = ""; then
 
3524
       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
 
3525
    else
 
3526
       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
 
3527
    fi
 
3528
    if test "$DPMS_INCLUDE" = ""; then
 
3529
       DPMSINC=""
 
3530
    else
 
3531
       DPMSINC="-I$DPMS_INCLUDE"
 
3532
    fi
 
3533
    AC_MSG_RESULT(yes)
 
3534
    $1
 
3535
  fi
 
3536
 fi
 
3537
 ac_save_cflags="$CFLAGS"
 
3538
 CFLAGS="$CFLAGS $X_INCLUDES"
 
3539
 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3540
 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
 
3541
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
 
3542
 AC_CHECK_DECL(DPMSCapable,
 
3543
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
 
3544
   [#include <X11/extensions/dpms.h>])
 
3545
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
 
3546
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
 
3547
 AC_CHECK_DECL(DPMSInfo,
 
3548
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
 
3549
   [#include <X11/extensions/dpms.h>])
 
3550
 CFLAGS="$ac_save_cflags"
 
3551
 AC_SUBST(DPMSINC)
 
3552
 AC_SUBST(DPMSLIB)
 
3553
])
 
3554
 
 
3555
AC_DEFUN([AC_HAVE_GL],
 
3556
 [AC_REQUIRE_CPP()dnl
 
3557
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
3558
 
 
3559
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
 
3560
 test -z "$GL_INCLUDE" && GL_INCLUDE=
 
3561
 
 
3562
 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
 
3563
        gl_test=$withval, gl_test="yes")
 
3564
 if test "x$kde_use_qt_emb" = "xyes"; then
 
3565
   # GL and Qt Embedded is a no-go for now.
 
3566
   ac_cv_have_gl=no
 
3567
 elif test "x$gl_test" = xno; then
 
3568
   ac_cv_have_gl=no
 
3569
 else
 
3570
   AC_MSG_CHECKING(for GL)
 
3571
   AC_CACHE_VAL(ac_cv_have_gl,
 
3572
   [
 
3573
    AC_LANG_SAVE
 
3574
    AC_LANG_CPLUSPLUS
 
3575
    ac_save_ldflags="$LDFLAGS"
 
3576
    ac_save_cxxflags="$CXXFLAGS"
 
3577
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
 
3578
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
 
3579
    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
 
3580
    CXXFLAGS="$CFLAGS $X_INCLUDES"
 
3581
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
 
3582
    AC_TRY_LINK([#include <GL/gl.h>
 
3583
#include <GL/glu.h>
 
3584
], [],
 
3585
        ac_cv_have_gl="mesa", ac_cv_have_gl="no")
 
3586
    if test "x$ac_cv_have_gl" = "xno"; then
 
3587
      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
 
3588
      test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
 
3589
      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
 
3590
      CXXFLAGS="$ac_save_cflags $X_INCLUDES"
 
3591
      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
 
3592
      AC_TRY_LINK([#include <GL/gl.h>
 
3593
#include <GL/glu.h>
 
3594
], [],
 
3595
          ac_cv_have_gl="yes", ac_cv_have_gl="no")
 
3596
    fi
 
3597
    AC_LANG_RESTORE
 
3598
    LDFLAGS="$ac_save_ldflags"
 
3599
    CXXFLAGS="$ac_save_cxxflags"
 
3600
   ])dnl
 
3601
 
 
3602
  if test "$ac_cv_have_gl" = "no"; then
 
3603
    AC_MSG_RESULT(no)
 
3604
    GL_LDFLAGS=""
 
3605
    GLINC=""
 
3606
    $2
 
3607
  else
 
3608
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
 
3609
    if test "$GL_LDFLAGS" = ""; then
 
3610
       if test "$ac_cv_have_gl" = "mesa"; then
 
3611
          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
 
3612
       else
 
3613
          GLLIB='-lGLU -lGL $(LIB_X11)'
 
3614
       fi
 
3615
    else
 
3616
       if test "$ac_cv_have_gl" = "mesa"; then
 
3617
          GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
 
3618
       else
 
3619
          GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
 
3620
       fi
 
3621
    fi
 
3622
    if test "$GL_INCLUDE" = ""; then
 
3623
       GLINC=""
 
3624
    else
 
3625
       GLINC="-I$GL_INCLUDE"
 
3626
    fi
 
3627
    AC_MSG_RESULT($ac_cv_have_gl)
 
3628
    $1
 
3629
  fi
 
3630
 fi
 
3631
 AC_SUBST(GLINC)
 
3632
 AC_SUBST(GLLIB)
 
3633
])
 
3634
 
 
3635
 
 
3636
 dnl shadow password and PAM magic - maintained by ossi@kde.org
 
3637
 
 
3638
AC_DEFUN([KDE_PAM], [
 
3639
  AC_REQUIRE([KDE_CHECK_LIBDL])
 
3640
 
 
3641
  want_pam=
 
3642
  AC_ARG_WITH(pam,
 
3643
    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
 
3644
    [ if test "x$withval" = "xyes"; then
 
3645
        want_pam=yes
 
3646
        pam_service=kde
 
3647
      elif test "x$withval" = "xno"; then
 
3648
        want_pam=no
 
3649
      else
 
3650
        want_pam=yes
 
3651
        pam_service=$withval
 
3652
      fi
 
3653
    ], [ pam_service=kde ])
 
3654
 
 
3655
  use_pam=
 
3656
  PAMLIBS=
 
3657
  if test "x$want_pam" != xno; then
 
3658
    AC_CHECK_LIB(pam, pam_start, [
 
3659
      AC_CHECK_HEADER(security/pam_appl.h,
 
3660
        [ pam_header=security/pam_appl.h ],
 
3661
        [ AC_CHECK_HEADER(pam/pam_appl.h,
 
3662
            [ pam_header=pam/pam_appl.h ],
 
3663
            [
 
3664
    AC_MSG_WARN([PAM detected, but no headers found!
 
3665
Make sure you have the necessary development packages installed.])
 
3666
            ]
 
3667
          )
 
3668
        ]
 
3669
      )
 
3670
    ], , $LIBDL)
 
3671
    if test -z "$pam_header"; then
 
3672
      if test "x$want_pam" = xyes; then
 
3673
        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
 
3674
      fi
 
3675
    else
 
3676
      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
 
3677
      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
 
3678
      use_pam=yes
 
3679
 
 
3680
      dnl darwin claims to be something special
 
3681
      if test "$pam_header" = "pam/pam_appl.h"; then
 
3682
        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
 
3683
      fi
 
3684
 
 
3685
      dnl test whether struct pam_message is const (Linux) or not (Sun)
 
3686
      AC_MSG_CHECKING(for const pam_message)
 
3687
      AC_EGREP_HEADER([struct pam_message], $pam_header,
 
3688
        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
 
3689
                          [AC_MSG_RESULT([const: Linux-type PAM])],
 
3690
                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
 
3691
                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
 
3692
                          )],
 
3693
        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
 
3694
    fi
 
3695
  fi
 
3696
 
 
3697
  AC_SUBST(PAMLIBS)
 
3698
])
 
3699
 
 
3700
dnl DEF_PAM_SERVICE(arg name, full name, define name)
 
3701
AC_DEFUN([DEF_PAM_SERVICE], [
 
3702
  AC_ARG_WITH($1-pam,
 
3703
    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
 
3704
    [ if test "x$use_pam" = xyes; then
 
3705
        $3_PAM_SERVICE=$withval
 
3706
      else
 
3707
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
 
3708
You may want to enforce it by using --with-pam.])
 
3709
      fi
 
3710
    ], 
 
3711
    [ if test "x$use_pam" = xyes; then
 
3712
        $3_PAM_SERVICE="$pam_service"
 
3713
      fi
 
3714
    ])
 
3715
    if test -n "$$3_PAM_SERVICE"; then
 
3716
      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
 
3717
      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
 
3718
    fi
 
3719
    AC_SUBST($3_PAM_SERVICE)
 
3720
])
 
3721
 
 
3722
AC_DEFUN([KDE_SHADOWPASSWD], [
 
3723
  AC_REQUIRE([KDE_PAM])
 
3724
 
 
3725
  AC_CHECK_LIB(shadow, getspent,
 
3726
    [ LIBSHADOW="-lshadow"
 
3727
      ac_use_shadow=yes
 
3728
    ],
 
3729
    [ dnl for UnixWare
 
3730
      AC_CHECK_LIB(gen, getspent, 
 
3731
        [ LIBGEN="-lgen"
 
3732
          ac_use_shadow=yes
 
3733
        ], 
 
3734
        [ AC_CHECK_FUNC(getspent, 
 
3735
            [ ac_use_shadow=yes ],
 
3736
            [ ac_use_shadow=no ])
 
3737
        ])
 
3738
    ])
 
3739
  AC_SUBST(LIBSHADOW)
 
3740
  AC_SUBST(LIBGEN)
 
3741
  
 
3742
  AC_MSG_CHECKING([for shadow passwords])
 
3743
 
 
3744
  AC_ARG_WITH(shadow,
 
3745
    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
 
3746
    [ if test "x$withval" != "xno"; then
 
3747
        use_shadow=yes
 
3748
      else
 
3749
        use_shadow=no
 
3750
      fi
 
3751
    ], [
 
3752
      use_shadow="$ac_use_shadow"
 
3753
    ])
 
3754
 
 
3755
  if test "x$use_shadow" = xyes; then
 
3756
    AC_MSG_RESULT(yes)
 
3757
    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
 
3758
  else
 
3759
    AC_MSG_RESULT(no)
 
3760
    LIBSHADOW=
 
3761
    LIBGEN=
 
3762
  fi
 
3763
 
 
3764
  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
 
3765
  dnl this still applies, if we could use it indirectly through pam.
 
3766
  if test "x$use_shadow" = xyes || 
 
3767
     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
 
3768
      case $host in
 
3769
      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
 
3770
        SETUIDFLAGS="-m 4755 -o root";;
 
3771
      *)
 
3772
        SETUIDFLAGS="-m 4755";;
 
3773
      esac
 
3774
  fi
 
3775
  AC_SUBST(SETUIDFLAGS)
 
3776
 
 
3777
])
 
3778
 
 
3779
AC_DEFUN([KDE_PASSWDLIBS], [
 
3780
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
 
3781
  AC_REQUIRE([KDE_PAM])
 
3782
  AC_REQUIRE([KDE_SHADOWPASSWD])
 
3783
 
 
3784
  if test "x$use_pam" = "xyes"; then 
 
3785
    PASSWDLIBS="$PAMLIBS"
 
3786
  else
 
3787
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
 
3788
  fi
 
3789
 
 
3790
  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
 
3791
  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
 
3792
  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
 
3793
  dnl may need to read /etc/master.passwd).
 
3794
  case $host in
 
3795
  *-*-freebsd*)
 
3796
    SETUIDFLAGS="-m 4755 -o root"
 
3797
    ;;
 
3798
  *)
 
3799
    ;;
 
3800
  esac
 
3801
 
 
3802
  AC_SUBST(PASSWDLIBS)
 
3803
])
 
3804
 
 
3805
AC_DEFUN([KDE_CHECK_LIBDL],
 
3806
[
 
3807
AC_CHECK_LIB(dl, dlopen, [
 
3808
LIBDL="-ldl"
 
3809
ac_cv_have_dlfcn=yes
 
3810
])
 
3811
 
 
3812
AC_CHECK_LIB(dld, shl_unload, [
 
3813
LIBDL="-ldld"
 
3814
ac_cv_have_shload=yes
 
3815
])
 
3816
 
 
3817
AC_SUBST(LIBDL)
 
3818
])
 
3819
 
 
3820
AC_DEFUN([KDE_CHECK_DLOPEN],
 
3821
[
 
3822
KDE_CHECK_LIBDL
 
3823
AC_CHECK_HEADERS(dlfcn.h dl.h)
 
3824
if test "$ac_cv_header_dlfcn_h" = "no"; then
 
3825
  ac_cv_have_dlfcn=no
 
3826
fi
 
3827
 
 
3828
if test "$ac_cv_header_dl_h" = "no"; then
 
3829
  ac_cv_have_shload=no
 
3830
fi
 
3831
 
 
3832
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
 
3833
dnl (MM)
 
3834
AC_ARG_ENABLE(dlopen,
 
3835
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
 
3836
enable_dlopen=$enableval,
 
3837
enable_dlopen=yes)
 
3838
 
 
3839
# override the user's opinion, if we know it better ;)
 
3840
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
 
3841
  enable_dlopen=no
 
3842
fi
 
3843
 
 
3844
if test "$ac_cv_have_dlfcn" = "yes"; then
 
3845
  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
 
3846
fi
 
3847
 
 
3848
if test "$ac_cv_have_shload" = "yes"; then
 
3849
  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
 
3850
fi
 
3851
 
 
3852
if test "$enable_dlopen" = no ; then
 
3853
  test -n "$1" && eval $1
 
3854
else
 
3855
  test -n "$2" && eval $2
 
3856
fi
 
3857
 
 
3858
])
 
3859
 
 
3860
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
 
3861
[
 
3862
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
 
3863
KDE_PROG_LIBTOOL
 
3864
AC_MSG_CHECKING([dynamic loading])
 
3865
eval "`egrep '^build_libtool_libs=' libtool`"
 
3866
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
 
3867
  dynamic_loading=yes
 
3868
  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
 
3869
else
 
3870
  dynamic_loading=no
 
3871
fi
 
3872
AC_MSG_RESULT($dynamic_loading)
 
3873
if test "$dynamic_loading" = "yes"; then
 
3874
  $1
 
3875
else
 
3876
  $2
 
3877
fi
 
3878
])
 
3879
 
 
3880
AC_DEFUN([KDE_ADD_INCLUDES],
 
3881
[
 
3882
if test -z "$1"; then
 
3883
  test_include="Pix.h"
 
3884
else
 
3885
  test_include="$1"
 
3886
fi
 
3887
 
 
3888
AC_MSG_CHECKING([for libg++ ($test_include)])
 
3889
 
 
3890
AC_CACHE_VAL(kde_cv_libgpp_includes,
 
3891
[
 
3892
kde_cv_libgpp_includes=no
 
3893
 
 
3894
   for ac_dir in               \
 
3895
                               \
 
3896
     /usr/include/g++          \
 
3897
     /usr/include              \
 
3898
     /usr/unsupported/include  \
 
3899
     /opt/include              \
 
3900
     $extra_include            \
 
3901
     ; \
 
3902
   do
 
3903
     if test -r "$ac_dir/$test_include"; then
 
3904
       kde_cv_libgpp_includes=$ac_dir
 
3905
       break
 
3906
     fi
 
3907
   done
 
3908
])
 
3909
 
 
3910
AC_MSG_RESULT($kde_cv_libgpp_includes)
 
3911
if test "$kde_cv_libgpp_includes" != "no"; then
 
3912
  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
 
3913
fi
 
3914
])
 
3915
])
 
3916
 
 
3917
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
 
3918
[
 
3919
  LIBPTHREAD=""
 
3920
 
 
3921
  if test -n "$PTHREAD_LIBS"; then
 
3922
    PTHREAD_LIBS_save="$PTHREAD_LIBS"
 
3923
    PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
 
3924
    KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [LIBPTHREAD="$PTHREAD_LIBS_save"] )
 
3925
    PTHREAD_LIBS="$PTHREAD_LIBS_save"
 
3926
  fi
 
3927
 
 
3928
  if test -z "$LIBPTHREAD"; then
 
3929
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
 
3930
  fi
 
3931
 
 
3932
  AC_SUBST(LIBPTHREAD)
 
3933
])
 
3934
 
 
3935
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
 
3936
[
 
3937
      USE_THREADS=""
 
3938
      if test -z "$LIBPTHREAD"; then
 
3939
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
 
3940
      fi
 
3941
 
 
3942
    AH_VERBATIM(__svr_define, [
 
3943
#if defined(__SVR4) && !defined(__svr4__)
 
3944
#define __svr4__ 1
 
3945
#endif
 
3946
])
 
3947
    case $host_os in
 
3948
        solaris*)
 
3949
                KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
 
3950
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
 
3951
                ;;
 
3952
        freebsd*)
 
3953
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
 
3954
                ;;
 
3955
        aix*)
 
3956
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
 
3957
                LIBPTHREAD="$LIBPTHREAD -lc_r"
 
3958
                ;;
 
3959
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
 
3960
                if test "$CXX" = "KCC"; then
 
3961
                  CXXFLAGS="$CXXFLAGS --thread_safe"
 
3962
                  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
 
3963
                fi
 
3964
                ;;
 
3965
        *)
 
3966
                ;;
 
3967
    esac
 
3968
    AC_SUBST(USE_THREADS)
 
3969
    AC_SUBST(LIBPTHREAD)
 
3970
])
 
3971
 
 
3972
AC_DEFUN([KDE_CHECK_THREADING],
 
3973
[
 
3974
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
 
3975
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
 
3976
  dnl default is yes if libpthread is found and no if no libpthread is available
 
3977
  if test -z "$LIBPTHREAD"; then
 
3978
    if test -z "$USE_THREADS"; then
 
3979
      kde_check_threading_default=no
 
3980
    else
 
3981
      kde_check_threading_default=yes
 
3982
    fi
 
3983
  else
 
3984
    kde_check_threading_default=yes
 
3985
  fi
 
3986
  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
 
3987
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
 
3988
  if test "x$kde_use_threading" = "xyes"; then
 
3989
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
 
3990
  fi
 
3991
])
 
3992
 
 
3993
AC_DEFUN([KDE_TRY_LINK_PYTHON],
 
3994
[
 
3995
if test "$kde_python_link_found" = no; then
 
3996
 
 
3997
if test "$1" = normal; then
 
3998
  AC_MSG_CHECKING(if a Python application links)
 
3999
else
 
4000
  AC_MSG_CHECKING(if Python depends on $2)
 
4001
fi
 
4002
 
 
4003
AC_CACHE_VAL(kde_cv_try_link_python_$1,
 
4004
[
 
4005
kde_save_cflags="$CFLAGS"
 
4006
CFLAGS="$CFLAGS $PYTHONINC"
 
4007
kde_save_libs="$LIBS"
 
4008
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
 
4009
kde_save_ldflags="$LDFLAGS"
 
4010
LDFLAGS="$LDFLAGS $PYTHONLIB"
 
4011
 
 
4012
AC_TRY_LINK(
 
4013
[
 
4014
#include <Python.h>
 
4015
],[
 
4016
        PySys_SetArgv(1, 0);
 
4017
],
 
4018
        [kde_cv_try_link_python_$1=yes],
 
4019
        [kde_cv_try_link_python_$1=no]
 
4020
)
 
4021
CFLAGS="$kde_save_cflags"
 
4022
LIBS="$kde_save_libs"
 
4023
LDFLAGS="$kde_save_ldflags"
 
4024
])
 
4025
 
 
4026
if test "$kde_cv_try_link_python_$1" = "yes"; then
 
4027
  AC_MSG_RESULT(yes)
 
4028
  kde_python_link_found=yes
 
4029
  if test ! "$1" = normal; then
 
4030
    LIBPYTHON="$LIBPYTHON $2"
 
4031
  fi
 
4032
  $3
 
4033
else
 
4034
  AC_MSG_RESULT(no)
 
4035
  $4
 
4036
fi
 
4037
 
 
4038
fi
 
4039
 
 
4040
])
 
4041
 
 
4042
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
 
4043
[
 
4044
AC_MSG_CHECKING([for Python directory])
 
4045
 
 
4046
AC_CACHE_VAL(kde_cv_pythondir,
 
4047
[
 
4048
  if test -z "$PYTHONDIR"; then
 
4049
    kde_cv_pythondir=/usr/local
 
4050
  else
 
4051
    kde_cv_pythondir="$PYTHONDIR"
 
4052
  fi
 
4053
])
 
4054
 
 
4055
AC_ARG_WITH(pythondir,
 
4056
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
 
4057
[
 
4058
  ac_python_dir=$withval
 
4059
], ac_python_dir=$kde_cv_pythondir
 
4060
)
 
4061
 
 
4062
AC_MSG_RESULT($ac_python_dir)
 
4063
])
 
4064
 
 
4065
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
 
4066
[
 
4067
AC_REQUIRE([KDE_CHECK_LIBDL])
 
4068
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
 
4069
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
 
4070
 
 
4071
if test -z "$1"; then
 
4072
  version="1.5"
 
4073
else
 
4074
  version="$1"
 
4075
fi
 
4076
 
 
4077
AC_MSG_CHECKING([for Python$version])
 
4078
 
 
4079
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
 
4080
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
 
4081
if test ! -r $python_incdir/Python.h; then
 
4082
  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
 
4083
  python_incdir=$python_incdir/python$version
 
4084
  if test ! -r $python_incdir/Python.h; then
 
4085
    python_incdir=no
 
4086
  fi
 
4087
fi
 
4088
 
 
4089
PYTHONINC=-I$python_incdir
 
4090
 
 
4091
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
 
4092
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
 
4093
if test ! -r $python_libdir/libpython$version.so; then
 
4094
  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
 
4095
  if test ! -r $python_libdir/libpython$version.a; then
 
4096
    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
 
4097
    python_libdir=$python_libdir/python$version/config
 
4098
    if test ! -r $python_libdir/libpython$version.a; then
 
4099
      python_libdir=no
 
4100
    fi
 
4101
  fi
 
4102
fi
 
4103
 
 
4104
PYTHONLIB=-L$python_libdir
 
4105
kde_orig_LIBPYTHON=$LIBPYTHON
 
4106
if test -z "$LIBPYTHON"; then
 
4107
  LIBPYTHON=-lpython$version
 
4108
fi
 
4109
 
 
4110
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
 
4111
python_moddir=$python_moddir/python$version
 
4112
if test ! -r $python_moddir/copy.py; then
 
4113
  python_moddir=no
 
4114
fi
 
4115
 
 
4116
PYTHONMODDIR=$python_moddir
 
4117
 
 
4118
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
 
4119
 
 
4120
if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
 
4121
   LIBPYTHON=$kde_orig_LIBPYTHON
 
4122
   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
 
4123
   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
 
4124
   $2
 
4125
else 
 
4126
  dnl Note: this test is very weak
 
4127
  kde_python_link_found=no
 
4128
  KDE_TRY_LINK_PYTHON(normal)
 
4129
  KDE_TRY_LINK_PYTHON(m, -lm)
 
4130
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
 
4131
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
 
4132
  KDE_TRY_LINK_PYTHON(db2, -ldb2)
 
4133
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
 
4134
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
 
4135
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
 
4136
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
 
4137
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
 
4138
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
 
4139
  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
 
4140
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
 
4141
        [AC_MSG_WARN([it seems, Python depends on another library.
 
4142
    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
 
4143
    and contact the authors to let them know about this problem])
 
4144
        ])
 
4145
 
 
4146
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
 
4147
  AC_SUBST(PYTHONINC)
 
4148
  AC_SUBST(PYTHONLIB)
 
4149
  AC_SUBST(LIBPYTHON)
 
4150
  AC_SUBST(PYTHONMODDIR)
 
4151
  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
 
4152
fi
 
4153
 
 
4154
])
 
4155
 
 
4156
 
 
4157
AC_DEFUN([KDE_CHECK_PYTHON],
 
4158
[
 
4159
  KDE_CHECK_PYTHON_INTERN("2.3", 
 
4160
   [KDE_CHECK_PYTHON_INTERN("2.2", 
 
4161
     [KDE_CHECK_PYTHON_INTERN("2.1", 
 
4162
       [KDE_CHECK_PYTHON_INTERN("2.0", 
 
4163
         [KDE_CHECK_PYTHON_INTERN($1, $2) ])
 
4164
       ])
 
4165
     ])
 
4166
   ])
 
4167
])
 
4168
 
 
4169
AC_DEFUN([KDE_CHECK_STL],
 
4170
[
 
4171
    AC_LANG_SAVE
 
4172
    AC_LANG_CPLUSPLUS
 
4173
    ac_save_CXXFLAGS="$CXXFLAGS"
 
4174
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
 
4175
 
 
4176
    AC_MSG_CHECKING([if C++ programs can be compiled])
 
4177
    AC_CACHE_VAL(kde_cv_stl_works,
 
4178
    [
 
4179
      AC_TRY_COMPILE([
 
4180
#include <string>
 
4181
using namespace std;
 
4182
],[
 
4183
  string astring="Hallo Welt.";
 
4184
  astring.erase(0, 6); // now astring is "Welt"
 
4185
  return 0;
 
4186
], kde_cv_stl_works=yes,
 
4187
   kde_cv_stl_works=no)
 
4188
])
 
4189
 
 
4190
   AC_MSG_RESULT($kde_cv_stl_works)
 
4191
 
 
4192
   if test "$kde_cv_stl_works" = "yes"; then
 
4193
     # back compatible
 
4194
         AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
 
4195
   else
 
4196
         AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
 
4197
Check config.log for details - if you're using a Linux distribution you might miss
 
4198
a package named similiar to libstd++-dev.])
 
4199
   fi
 
4200
 
 
4201
   CXXFLAGS="$ac_save_CXXFLAGS"
 
4202
   AC_LANG_RESTORE
 
4203
])
 
4204
 
 
4205
AC_DEFUN([AC_FIND_QIMGIO],
 
4206
   [AC_REQUIRE([AC_FIND_JPEG])
 
4207
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
4208
AC_MSG_CHECKING([for qimgio])
 
4209
AC_CACHE_VAL(ac_cv_lib_qimgio,
 
4210
[
 
4211
AC_LANG_SAVE
 
4212
AC_LANG_CPLUSPLUS
 
4213
ac_save_LIBS="$LIBS"
 
4214
ac_save_CXXFLAGS="$CXXFLAGS"
 
4215
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
 
4216
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
 
4217
AC_TRY_RUN(dnl
 
4218
[
 
4219
#include <qimageio.h>
 
4220
#include <qstring.h>
 
4221
int main() {
 
4222
                QString t = "hallo";
 
4223
                t.fill('t');
 
4224
                qInitImageIO();
 
4225
}
 
4226
],
 
4227
            ac_cv_lib_qimgio=yes,
 
4228
            ac_cv_lib_qimgio=no,
 
4229
            ac_cv_lib_qimgio=no)
 
4230
LIBS="$ac_save_LIBS"
 
4231
CXXFLAGS="$ac_save_CXXFLAGS"
 
4232
AC_LANG_RESTORE
 
4233
])dnl
 
4234
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
 
4235
  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
 
4236
  AC_MSG_RESULT(yes)
 
4237
  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
 
4238
  AC_SUBST(LIBQIMGIO)
 
4239
else
 
4240
  AC_MSG_RESULT(not found)
 
4241
fi
 
4242
])
 
4243
 
 
4244
AC_DEFUN([AM_DISABLE_LIBRARIES],
 
4245
[
 
4246
    AC_PROVIDE([AM_ENABLE_STATIC])
 
4247
    AC_PROVIDE([AM_ENABLE_SHARED])
 
4248
    enable_static=no
 
4249
    enable_shared=yes
 
4250
])
 
4251
 
 
4252
 
 
4253
AC_DEFUN([AC_CHECK_UTMP_FILE],
 
4254
[
 
4255
    AC_MSG_CHECKING([for utmp file])
 
4256
 
 
4257
    AC_CACHE_VAL(kde_cv_utmp_file,
 
4258
    [
 
4259
    kde_cv_utmp_file=no
 
4260
 
 
4261
    for ac_file in    \
 
4262
                      \
 
4263
        /var/run/utmp \
 
4264
        /var/adm/utmp \
 
4265
        /etc/utmp     \
 
4266
     ; \
 
4267
    do
 
4268
     if test -r "$ac_file"; then
 
4269
       kde_cv_utmp_file=$ac_file
 
4270
       break
 
4271
     fi
 
4272
    done
 
4273
    ])
 
4274
 
 
4275
    if test "$kde_cv_utmp_file" != "no"; then
 
4276
        AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
 
4277
        $1
 
4278
        AC_MSG_RESULT($kde_cv_utmp_file)
 
4279
    else
 
4280
        $2
 
4281
        AC_MSG_RESULT([non found])
 
4282
    fi
 
4283
])
 
4284
 
 
4285
 
 
4286
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
 
4287
[
 
4288
 
 
4289
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
 
4290
 
 
4291
if test ! -s $srcdir/subdirs; then
 
4292
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
 
4293
  TOPSUBDIRS=""
 
4294
  files=`cd $srcdir && ls -1`
 
4295
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
 
4296
  for i in $dirs; do
 
4297
    echo $i >> $srcdir/subdirs
 
4298
  done
 
4299
fi
 
4300
 
 
4301
ac_topsubdirs=
 
4302
if test -s $srcdir/inst-apps; then
 
4303
  ac_topsubdirs="`cat $srcdir/inst-apps`"
 
4304
elif test -s $srcdir/subdirs; then
 
4305
  ac_topsubdirs="`cat $srcdir/subdirs`"
 
4306
fi
 
4307
 
 
4308
for i in $ac_topsubdirs; do
 
4309
  AC_MSG_CHECKING([if $i should be compiled])
 
4310
  if test -d $srcdir/$i; then
 
4311
    install_it="yes"
 
4312
    for j in $DO_NOT_COMPILE; do
 
4313
      if test $i = $j; then
 
4314
        install_it="no"
 
4315
      fi
 
4316
    done
 
4317
  else
 
4318
    install_it="no"
 
4319
  fi
 
4320
  AC_MSG_RESULT($install_it)
 
4321
  vari=`echo $i | sed -e 's,[[-+.]],_,g'`
 
4322
  if test $install_it = "yes"; then
 
4323
    TOPSUBDIRS="$TOPSUBDIRS $i"
 
4324
    eval "$vari""_SUBDIR_included=yes"
 
4325
  else
 
4326
    eval "$vari""_SUBDIR_included=no"
 
4327
  fi
 
4328
done
 
4329
 
 
4330
AC_SUBST(TOPSUBDIRS)
 
4331
])
 
4332
 
 
4333
AC_DEFUN([KDE_CHECK_NAMESPACES],
 
4334
[
 
4335
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
 
4336
AC_LANG_SAVE
 
4337
AC_LANG_CPLUSPLUS
 
4338
AC_TRY_COMPILE([
 
4339
],
 
4340
[
 
4341
namespace Foo {
 
4342
  extern int i;
 
4343
  namespace Bar {
 
4344
    extern int i;
 
4345
  }
 
4346
}
 
4347
 
 
4348
int Foo::i = 0;
 
4349
int Foo::Bar::i = 1;
 
4350
],[
 
4351
  AC_MSG_RESULT(yes)
 
4352
  AC_DEFINE(HAVE_NAMESPACES)
 
4353
], [
 
4354
AC_MSG_RESULT(no)
 
4355
])
 
4356
AC_LANG_RESTORE
 
4357
])
 
4358
 
 
4359
dnl ------------------------------------------------------------------------
 
4360
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
 
4361
dnl ------------------------------------------------------------------------
 
4362
dnl
 
4363
AC_DEFUN([AC_CHECK_S_ISSOCK],
 
4364
[
 
4365
AC_MSG_CHECKING(for S_ISSOCK)
 
4366
AC_CACHE_VAL(ac_cv_have_s_issock,
 
4367
[
 
4368
AC_TRY_LINK(
 
4369
[
 
4370
#include <sys/stat.h>
 
4371
],
 
4372
[
 
4373
struct stat buff;
 
4374
int b = S_ISSOCK( buff.st_mode );
 
4375
],
 
4376
ac_cv_have_s_issock=yes,
 
4377
ac_cv_have_s_issock=no)
 
4378
])
 
4379
AC_MSG_RESULT($ac_cv_have_s_issock)
 
4380
if test "$ac_cv_have_s_issock" = "yes"; then
 
4381
  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
 
4382
fi
 
4383
 
 
4384
AH_VERBATIM(_ISSOCK,
 
4385
[
 
4386
#ifndef HAVE_S_ISSOCK
 
4387
#define HAVE_S_ISSOCK
 
4388
#define S_ISSOCK(mode) (1==0)
 
4389
#endif
 
4390
])
 
4391
 
 
4392
])
 
4393
 
 
4394
dnl ------------------------------------------------------------------------
 
4395
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
 
4396
dnl ------------------------------------------------------------------------
 
4397
dnl
 
4398
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
 
4399
[
 
4400
AC_MSG_CHECKING(for MAXPATHLEN)
 
4401
AC_CACHE_VAL(ac_cv_maxpathlen,
 
4402
[
 
4403
cat > conftest.$ac_ext <<EOF
 
4404
#ifdef STDC_HEADERS
 
4405
# include <stdlib.h>
 
4406
#endif
 
4407
#include <stdio.h>
 
4408
#include <sys/param.h>
 
4409
#ifndef MAXPATHLEN
 
4410
#define MAXPATHLEN 1024
 
4411
#endif
 
4412
 
 
4413
KDE_HELLO MAXPATHLEN
 
4414
 
 
4415
EOF
 
4416
 
 
4417
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
 
4418
 
 
4419
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
 
4420
    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
 
4421
else
 
4422
    ac_cv_maxpathlen=1024
 
4423
fi
 
4424
 
 
4425
rm conftest.*
 
4426
 
 
4427
])
 
4428
AC_MSG_RESULT($ac_cv_maxpathlen)
 
4429
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
 
4430
])
 
4431
 
 
4432
AC_DEFUN([KDE_CHECK_HEADER],
 
4433
[
 
4434
   AC_LANG_SAVE
 
4435
   kde_safe_cppflags=$CPPFLAGS
 
4436
   CPPFLAGS="$CPPFLAGS $all_includes"
 
4437
   AC_LANG_CPLUSPLUS
 
4438
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
 
4439
   CPPFLAGS=$kde_safe_cppflags
 
4440
   AC_LANG_RESTORE
 
4441
])
 
4442
 
 
4443
AC_DEFUN([KDE_CHECK_HEADERS],
 
4444
[
 
4445
   AH_CHECK_HEADERS([$1])
 
4446
   AC_LANG_SAVE
 
4447
   kde_safe_cppflags=$CPPFLAGS
 
4448
   CPPFLAGS="$CPPFLAGS $all_includes"
 
4449
   AC_LANG_CPLUSPLUS
 
4450
   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
 
4451
   CPPFLAGS=$kde_safe_cppflags
 
4452
   AC_LANG_RESTORE
 
4453
])
 
4454
 
 
4455
AC_DEFUN([KDE_FAST_CONFIGURE],
 
4456
[
 
4457
  dnl makes configure fast (needs perl)
 
4458
  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
 
4459
      with_fast_perl=$enableval, with_fast_perl=yes)
 
4460
])
 
4461
 
 
4462
AC_DEFUN([KDE_CONF_FILES],
 
4463
[
 
4464
  val=
 
4465
  if test -f $srcdir/configure.files ; then
 
4466
    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
 
4467
  fi
 
4468
  CONF_FILES=
 
4469
  if test -n "$val" ; then
 
4470
    for i in $val ; do
 
4471
      CONF_FILES="$CONF_FILES $i"
 
4472
    done
 
4473
  fi
 
4474
  AC_SUBST(CONF_FILES)
 
4475
])dnl
 
4476
 
 
4477
AC_DEFUN([KDE_SET_PREFIX],
 
4478
[
 
4479
  unset CDPATH
 
4480
  dnl make $KDEDIR the default for the installation
 
4481
  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
 
4482
 
 
4483
  if test "x$prefix" = "xNONE"; then
 
4484
    prefix=$ac_default_prefix
 
4485
    ac_configure_args="$ac_configure_args --prefix=$prefix"
 
4486
  fi
 
4487
  # And delete superfluous '/' to make compares easier
 
4488
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4489
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4490
  KDE_FAST_CONFIGURE
 
4491
  KDE_CONF_FILES
 
4492
])
 
4493
 
 
4494
pushdef([AC_PROG_INSTALL],
 
4495
[
 
4496
  dnl our own version, testing for a -p flag
 
4497
  popdef([AC_PROG_INSTALL])
 
4498
  dnl as AC_PROG_INSTALL works as it works we first have
 
4499
  dnl to save if the user didn't specify INSTALL, as the
 
4500
  dnl autoconf one overwrites INSTALL and we have no chance to find
 
4501
  dnl out afterwards
 
4502
  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
 
4503
  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
 
4504
  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
 
4505
  AC_PROG_INSTALL
 
4506
 
 
4507
  if test -z "$kde_save_INSTALL_given" ; then
 
4508
    # OK, user hasn't given any INSTALL, autoconf found one for us
 
4509
    # now we test, if it supports the -p flag
 
4510
    AC_MSG_CHECKING(for -p flag to install)
 
4511
    rm -f confinst.$$.* > /dev/null 2>&1
 
4512
    echo "Testtest" > confinst.$$.orig
 
4513
    ac_res=no
 
4514
    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
 
4515
      if test -f confinst.$$.new ; then
 
4516
        # OK, -p seems to do no harm to install
 
4517
        INSTALL="${INSTALL} -p"
 
4518
        ac_res=yes
 
4519
      fi
 
4520
    fi
 
4521
    rm -f confinst.$$.*
 
4522
    AC_MSG_RESULT($ac_res)
 
4523
  fi
 
4524
  dnl the following tries to resolve some signs and wonders coming up
 
4525
  dnl with different autoconf/automake versions
 
4526
  dnl e.g.:
 
4527
  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
 
4528
  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
 
4529
  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
 
4530
  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
 
4531
  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
 
4532
  dnl   install-@DIR@PROGRAMS targets to explicitly use that flag
 
4533
  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
 
4534
  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
 
4535
  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
 
4536
  dnl  *sometimes KDE does not use the install-@DIR@PROGRAM targets from
 
4537
  dnl   automake (due to broken Makefile.am or whatever) to install programs,
 
4538
  dnl   and so does not see the -s flag in automake > 1.4
 
4539
  dnl to clean up that mess we:
 
4540
  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
 
4541
  dnl   which cleans KDE's program with automake > 1.4;
 
4542
  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
 
4543
  dnl   with automake<=1.4
 
4544
  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
 
4545
  dnl   properly uses install-@DIR@PROGRAMS, but I don't care
 
4546
  dnl
 
4547
  dnl And to all this comes, that I even can't write in comments variable
 
4548
  dnl  names used by automake, because it is so stupid to think I wanted to
 
4549
  dnl  _use_ them, therefor I have written A_M_... instead of AM_
 
4550
  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
 
4551
 
 
4552
  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
 
4553
    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
 
4554
  fi
 
4555
  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
 
4556
    INSTALL_SCRIPT='${INSTALL}'
 
4557
  fi
 
4558
])dnl
 
4559
 
 
4560
AC_DEFUN([KDE_LANG_CPLUSPLUS],
 
4561
[AC_LANG_CPLUSPLUS
 
4562
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
 
4563
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
 
4564
])
 
4565
 
 
4566
pushdef([AC_LANG_CPLUSPLUS],
 
4567
[popdef([AC_LANG_CPLUSPLUS])
 
4568
KDE_LANG_CPLUSPLUS
 
4569
])
 
4570
 
 
4571
AC_DEFUN([KDE_CHECK_LONG_LONG],
 
4572
[
 
4573
AC_MSG_CHECKING(for long long)
 
4574
AC_CACHE_VAL(kde_cv_c_long_long,
 
4575
[
 
4576
  AC_LANG_SAVE
 
4577
  AC_LANG_CPLUSPLUS
 
4578
  AC_TRY_LINK([], [
 
4579
  long long foo = 0;
 
4580
  foo = foo+1;
 
4581
  ],
 
4582
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
 
4583
  AC_LANG_RESTORE
 
4584
])
 
4585
AC_MSG_RESULT($kde_cv_c_long_long)
 
4586
if test "$kde_cv_c_long_long" = yes; then
 
4587
   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
 
4588
fi
 
4589
])
 
4590
 
 
4591
AC_DEFUN([KDE_CHECK_LIB],
 
4592
[
 
4593
     kde_save_LDFLAGS="$LDFLAGS"
 
4594
     dnl AC_CHECK_LIB modifies LIBS, so save it here
 
4595
     kde_save_LIBS="$LIBS"
 
4596
     LDFLAGS="$LDFLAGS $all_libraries"
 
4597
     case $host_os in
 
4598
      aix*) LDFLAGS="-brtl $LDFLAGS"
 
4599
        test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
 
4600
        ;;
 
4601
     esac
 
4602
     AC_CHECK_LIB($1, $2, $3, $4, $5)
 
4603
     LDFLAGS="$kde_save_LDFLAGS"
 
4604
     LIBS="$kde_save_LIBS"
 
4605
])
 
4606
 
 
4607
AC_DEFUN([KDE_JAVA_PREFIX],
 
4608
[
 
4609
        dir=`dirname "$1"`
 
4610
        base=`basename "$1"`
 
4611
        list=`ls -1 $dir 2> /dev/null`
 
4612
        for entry in $list; do 
 
4613
                if test -d $dir/$entry/bin; then
 
4614
                        case $entry in
 
4615
                           $base)
 
4616
                                javadirs="$javadirs $dir/$entry/bin"
 
4617
                                ;;
 
4618
                        esac
 
4619
                elif test -d $dir/$entry/jre/bin; then
 
4620
                        case $entry in
 
4621
                           $base)
 
4622
                                javadirs="$javadirs $dir/$entry/jre/bin"
 
4623
                                ;;
 
4624
                        esac
 
4625
                fi
 
4626
        done
 
4627
])
 
4628
 
 
4629
dnl KDE_CHEC_JAVA_DIR(onlyjre)
 
4630
AC_DEFUN([KDE_CHECK_JAVA_DIR],
 
4631
[
 
4632
 
 
4633
AC_ARG_WITH(java,
 
4634
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
 
4635
[  ac_java_dir=$withval
 
4636
], ac_java_dir=""
 
4637
)
 
4638
 
 
4639
AC_MSG_CHECKING([for Java])
 
4640
 
 
4641
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
 
4642
if test "x$ac_java_dir" = "xno"; then
 
4643
   kde_java_bindir=no
 
4644
   kde_java_includedir=no
 
4645
   kde_java_libjvmdir=no
 
4646
   kde_java_libgcjdir=no
 
4647
   kde_java_libhpidir=no
 
4648
else
 
4649
  if test "x$ac_java_dir" = "x"; then
 
4650
     
 
4651
     
 
4652
      dnl No option set -> collect list of candidate paths
 
4653
      if test -n "$JAVA_HOME"; then
 
4654
        KDE_JAVA_PREFIX($JAVA_HOME)
 
4655
      fi
 
4656
      KDE_JAVA_PREFIX(/usr/j2se)
 
4657
      KDE_JAVA_PREFIX(/usr/lib/j2se)
 
4658
      KDE_JAVA_PREFIX(/usr/j*dk*)
 
4659
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
 
4660
      KDE_JAVA_PREFIX(/opt/j*sdk*)
 
4661
      KDE_JAVA_PREFIX(/usr/lib/java*)
 
4662
      KDE_JAVA_PREFIX(/usr/java*)
 
4663
      KDE_JAVA_PREFIX(/usr/java/j*dk*)
 
4664
      KDE_JAVA_PREFIX(/usr/java/j*re*)
 
4665
      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
 
4666
      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
 
4667
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
 
4668
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
 
4669
      KDE_JAVA_PREFIX(/opt/java*)
 
4670
 
 
4671
      kde_cv_path="NONE"
 
4672
      kde_save_IFS=$IFS
 
4673
      IFS=':'
 
4674
      for dir in $PATH; do
 
4675
          if test -d "$dir"; then
 
4676
              javadirs="$javadirs $dir"
 
4677
          fi
 
4678
      done
 
4679
      IFS=$kde_save_IFS
 
4680
      jredirs=
 
4681
 
 
4682
      dnl Now javadirs contains a list of paths that exist, all ending with bin/
 
4683
      for dir in $javadirs; do
 
4684
          dnl Check for the java executable
 
4685
          if test -x "$dir/java"; then
 
4686
              dnl And also check for a libjvm.so somewhere under there
 
4687
              dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
 
4688
              if test "$dir" != "/usr/bin"; then
 
4689
                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
4690
                  if test ! -f $libjvmdir/libjvm.so; then continue; fi
 
4691
                  jredirs="$jredirs $dir"
 
4692
              fi
 
4693
          fi
 
4694
      done
 
4695
 
 
4696
      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
 
4697
      JAVAC=
 
4698
      JAVA=
 
4699
      kde_java_bindir=no
 
4700
      for dir in $jredirs; do
 
4701
          JAVA="$dir/java"
 
4702
          kde_java_bindir=$dir
 
4703
          if test -x "$dir/javac"; then
 
4704
                JAVAC="$dir/javac"
 
4705
                break
 
4706
          fi
 
4707
      done
 
4708
 
 
4709
      if test -n "$JAVAC"; then
 
4710
          dnl this substitution might not work - well, we test for jni.h below
 
4711
          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
 
4712
      else
 
4713
          kde_java_includedir=no
 
4714
      fi
 
4715
  else
 
4716
    dnl config option set
 
4717
    kde_java_bindir=$ac_java_dir/bin
 
4718
    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
 
4719
        kde_java_includedir=no
 
4720
    else
 
4721
        kde_java_includedir=$ac_java_dir/include
 
4722
    fi
 
4723
  fi
 
4724
fi
 
4725
 
 
4726
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
 
4727
if test "x$kde_java_bindir" != "xno"; then
 
4728
 
 
4729
  dnl Look for libjvm.so
 
4730
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
4731
  dnl Look for libgcj.so
 
4732
  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
 
4733
  dnl Look for libhpi.so and avoid green threads
 
4734
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
 
4735
 
 
4736
  dnl Now check everything's fine under there
 
4737
  dnl the include dir is our flag for having the JDK
 
4738
  if test -d "$kde_java_includedir"; then
 
4739
    if test ! -x "$kde_java_bindir/javac"; then
 
4740
      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
 
4741
    fi
 
4742
    if test ! -x "$kde_java_bindir/javah"; then
 
4743
      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4744
    fi
 
4745
    if test ! -x "$kde_java_bindir/jar"; then
 
4746
      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4747
    fi
 
4748
    if test ! -r "$kde_java_includedir/jni.h"; then
 
4749
      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
 
4750
    fi
 
4751
 
 
4752
    jni_includes="-I$kde_java_includedir"
 
4753
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
 
4754
    dnl and under linux here.. 
 
4755
    
 
4756
    dnl not needed for gcj
 
4757
 
 
4758
    if test "x$kde_java_libgcjdir" = "x"; then 
 
4759
      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
 
4760
      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
 
4761
      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
 
4762
    fi
 
4763
 
 
4764
  else
 
4765
    JAVAC=
 
4766
    jni_includes=
 
4767
  fi
 
4768
 
 
4769
  if test "x$kde_java_libgcjdir" = "x"; then 
 
4770
     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
 
4771
        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
 
4772
     fi 
 
4773
  else
 
4774
     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
 
4775
        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
 
4776
     fi 
 
4777
  fi
 
4778
 
 
4779
  if test ! -x "$kde_java_bindir/java"; then
 
4780
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4781
  fi
 
4782
 
 
4783
  dnl not needed for gcj compile
 
4784
 
 
4785
  if test "x$kde_java_libgcjdir" = "x"; then 
 
4786
      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
 
4787
        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
 
4788
      fi
 
4789
  fi
 
4790
 
 
4791
  if test -n "$jni_includes"; then
 
4792
    dnl Check for JNI version
 
4793
    AC_LANG_SAVE
 
4794
    AC_LANG_CPLUSPLUS
 
4795
    ac_cxxflags_safe="$CXXFLAGS"
 
4796
    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
 
4797
 
 
4798
    AC_TRY_COMPILE([
 
4799
  #include <jni.h>
 
4800
              ],
 
4801
              [
 
4802
  #ifndef JNI_VERSION_1_2
 
4803
  Syntax Error
 
4804
  #endif
 
4805
              ],[ kde_jni_works=yes ],
 
4806
              [ kde_jni_works=no ])
 
4807
 
 
4808
    if test $kde_jni_works = no; then
 
4809
      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
 
4810
                    You need to have Java Development Kit (JDK) version 1.2. 
 
4811
 
 
4812
                    Use --with-java to specify another location.
 
4813
                    Use --without-java to configure without java support.
 
4814
                    Or download a newer JDK and try again. 
 
4815
                    See e.g. http://java.sun.com/products/jdk/1.2 ])
 
4816
    fi
 
4817
 
 
4818
    CXXFLAGS="$ac_cxxflags_safe"    
 
4819
    AC_LANG_RESTORE
 
4820
 
 
4821
    dnl All tests ok, inform and subst the variables
 
4822
 
 
4823
    JAVAC=$kde_java_bindir/javac
 
4824
    JAVAH=$kde_java_bindir/javah
 
4825
    JAR=$kde_java_bindir/jar
 
4826
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
4827
    if test "x$kde_java_libgcjdir" = "x"; then 
 
4828
      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
 
4829
    else
 
4830
      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
 
4831
    fi
 
4832
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
 
4833
 
 
4834
  else
 
4835
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
4836
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
 
4837
  fi
 
4838
elif test -d "/Library/Java/Home"; then
 
4839
  kde_java_bindir="/Library/Java/Home/bin"
 
4840
  jni_includes="-I/Library/Java/Home/include"
 
4841
 
 
4842
  JAVAC=$kde_java_bindir/javac
 
4843
  JAVAH=$kde_java_bindir/javah
 
4844
  JAR=$kde_java_bindir/jar
 
4845
  JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
 
4846
 
 
4847
  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
4848
  AC_MSG_RESULT([Apple Java Framework])
 
4849
else
 
4850
  AC_MSG_RESULT([none found])
 
4851
fi
 
4852
 
 
4853
AC_SUBST(JAVAC)
 
4854
AC_SUBST(JAVAH)
 
4855
AC_SUBST(JAR)
 
4856
AC_SUBST(JVMLIBS)
 
4857
AC_SUBST(jni_includes)
 
4858
 
 
4859
# for backward compat
 
4860
kde_cv_java_includedir=$kde_java_includedir
 
4861
kde_cv_java_bindir=$kde_java_bindir
 
4862
])
 
4863
 
 
4864
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
 
4865
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
 
4866
dnl big packages, m4_foreach is dog-slow.  So use our own version of
 
4867
dnl it.  (matz@kde.org)
 
4868
m4_define([mm_foreach],
 
4869
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
 
4870
m4_define([mm_car], [[$1]])
 
4871
m4_define([mm_car2], [[$@]])
 
4872
m4_define([_mm_foreach],
 
4873
[m4_if(m4_quote($2), [], [],
 
4874
       [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
 
4875
                                                   mm_car2(m4_shift($2)),
 
4876
                                                   [$3])])])
 
4877
m4_define([AC_FOREACH],
 
4878
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
 
4879
 
 
4880
AC_DEFUN([KDE_NEED_FLEX],
 
4881
[
 
4882
kde_libs_safe=$LIBS
 
4883
LIBS="$LIBS $USER_LDFLAGS"
 
4884
AM_PROG_LEX
 
4885
LIBS=$kde_libs_safe
 
4886
if test -z "$LEXLIB"; then
 
4887
    AC_MSG_ERROR([You need to have flex installed.])
 
4888
fi
 
4889
AC_SUBST(LEXLIB)
 
4890
])
 
4891
 
 
4892
AC_DEFUN([AC_PATH_QTOPIA],
 
4893
[
 
4894
  dnl TODO: use AC_CACHE_VAL
 
4895
 
 
4896
  if test -z "$1"; then
 
4897
    qtopia_minver_maj=1
 
4898
    qtopia_minver_min=5
 
4899
    qtopia_minver_pat=0
 
4900
  else
 
4901
    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
 
4902
    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
 
4903
    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
 
4904
  fi
 
4905
 
 
4906
  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
 
4907
  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
 
4908
 
 
4909
  AC_REQUIRE([AC_PATH_QT])
 
4910
 
 
4911
  AC_MSG_CHECKING([for Qtopia])
 
4912
 
 
4913
  LIB_QTOPIA="-lqpe"
 
4914
  AC_SUBST(LIB_QTOPIA)
 
4915
 
 
4916
  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
 
4917
 
 
4918
  ac_qtopia_incdir=NO
 
4919
 
 
4920
  AC_ARG_WITH(qtopia-dir,
 
4921
              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
 
4922
              [  ac_qtopia_incdir="$withval"/include] ) 
 
4923
  
 
4924
  qtopia_incdirs=""
 
4925
  for dir in $kde_qtopia_dirs; do
 
4926
    qtopia_incdirs="$qtopia_incdirs $dir/include"
 
4927
  done
 
4928
 
 
4929
  if test ! "$ac_qtopia_incdir" = "NO"; then
 
4930
    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
 
4931
  fi
 
4932
 
 
4933
  qtopia_incdir=""
 
4934
  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
 
4935
  ac_qtopia_incdir="$qtopia_incdir"
 
4936
 
 
4937
  if test -z "$qtopia_incdir"; then
 
4938
    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
 
4939
  fi
 
4940
 
 
4941
  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
 
4942
  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
 
4943
  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
 
4944
 
 
4945
  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
 
4946
  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
 
4947
  if test "$qtopia_ver" -lt "$qtopia_minver"; then
 
4948
    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
 
4949
is required.])
 
4950
  fi
 
4951
 
 
4952
  AC_LANG_SAVE
 
4953
  AC_LANG_CPLUSPLUS
 
4954
 
 
4955
  ac_cxxflags_safe="$CXXFLAGS"
 
4956
  ac_ldflags_safe="$LDFLAGS"
 
4957
  ac_libs_safe="$LIBS"
 
4958
 
 
4959
  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
 
4960
  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
 
4961
  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
 
4962
 
 
4963
  cat > conftest.$ac_ext <<EOF
 
4964
#include "confdefs.h"
 
4965
#include <qpe/qpeapplication.h>
 
4966
#include <qpe/version.h>
 
4967
 
 
4968
int main( int argc, char **argv )
 
4969
{
 
4970
    QPEApplication app( argc, argv );
 
4971
    return 0;
 
4972
}
 
4973
EOF
 
4974
 
 
4975
  if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
4976
    rm -f conftest*
 
4977
  else
 
4978
    rm -f conftest*
 
4979
    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
 
4980
the end of config.log])
 
4981
  fi
 
4982
 
 
4983
  CXXFLAGS="$ac_cxxflags_safe"
 
4984
  LDFLAGS="$ac_ldflags_safe"
 
4985
  LIBS="$ac_libs_safe"
 
4986
 
 
4987
  AC_LANG_RESTORE
 
4988
 
 
4989
  QTOPIA_INCLUDES="-I$qtopia_incdir"
 
4990
  AC_SUBST(QTOPIA_INCLUDES)
 
4991
 
 
4992
  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
 
4993
])
 
4994
 
 
4995
 
 
4996
AC_DEFUN([KDE_INIT_DOXYGEN],
 
4997
[
 
4998
AC_MSG_CHECKING([for Qt docs])
 
4999
kde_qtdir=
 
5000
if test "${with_qt_dir+set}" = set; then
 
5001
  kde_qtdir="$with_qt_dir"
 
5002
fi
 
5003
 
 
5004
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)
 
5005
AC_MSG_RESULT($QTDOCDIR)
 
5006
 
 
5007
AC_SUBST(QTDOCDIR)
 
5008
 
 
5009
KDE_FIND_PATH(dot, DOT, [], [])
 
5010
if test -n "$DOT"; then
 
5011
  KDE_HAVE_DOT="YES"
 
5012
else
 
5013
  KDE_HAVE_DOT="NO"
 
5014
fi
 
5015
AC_SUBST(KDE_HAVE_DOT)
 
5016
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
 
5017
AC_SUBST(DOXYGEN)
 
5018
 
 
5019
DOXYGEN_PROJECT_NAME="$1"
 
5020
DOXYGEN_PROJECT_NUMBER="$2"
 
5021
AC_SUBST(DOXYGEN_PROJECT_NAME)
 
5022
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
 
5023
 
 
5024
KDE_HAS_DOXYGEN=no
 
5025
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
 
5026
  KDE_HAS_DOXYGEN=yes
 
5027
fi
 
5028
AC_SUBST(KDE_HAS_DOXYGEN)
 
5029
 
 
5030
])
 
5031
 
 
5032
 
 
5033
AC_DEFUN([AC_FIND_BZIP2],
 
5034
[
 
5035
AC_MSG_CHECKING([for bzDecompress in libbz2])
 
5036
AC_CACHE_VAL(ac_cv_lib_bzip2,
 
5037
[
 
5038
AC_LANG_SAVE
 
5039
AC_LANG_CPLUSPLUS
 
5040
kde_save_LIBS="$LIBS"
 
5041
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
 
5042
kde_save_CXXFLAGS="$CXXFLAGS"
 
5043
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
5044
AC_TRY_LINK(dnl
 
5045
[
 
5046
#define BZ_NO_STDIO
 
5047
#include<bzlib.h>
 
5048
],
 
5049
            [ bz_stream s; (void) bzDecompress(&s); ],
 
5050
            eval "ac_cv_lib_bzip2='-lbz2'",
 
5051
            eval "ac_cv_lib_bzip2=no")
 
5052
LIBS="$kde_save_LIBS"
 
5053
CXXFLAGS="$kde_save_CXXFLAGS"
 
5054
AC_LANG_RESTORE
 
5055
])dnl
 
5056
AC_MSG_RESULT($ac_cv_lib_bzip2)
 
5057
 
 
5058
if test ! "$ac_cv_lib_bzip2" = no; then
 
5059
  BZIP2DIR=bzip2
 
5060
 
 
5061
  LIBBZ2="$ac_cv_lib_bzip2"
 
5062
  AC_SUBST(LIBBZ2)
 
5063
 
 
5064
else
 
5065
 
 
5066
   cxx_shared_flag=
 
5067
   ld_shared_flag=
 
5068
   KDE_CHECK_COMPILER_FLAG(shared, [
 
5069
        ld_shared_flag="-shared"
 
5070
   ])
 
5071
   KDE_CHECK_COMPILER_FLAG(fPIC, [
 
5072
        cxx_shared_flag="-fPIC"
 
5073
   ])
 
5074
 
 
5075
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
 
5076
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
 
5077
   [
 
5078
   AC_LANG_SAVE
 
5079
   AC_LANG_CPLUSPLUS
 
5080
   kde_save_LIBS="$LIBS"
 
5081
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
 
5082
   kde_save_CXXFLAGS="$CXXFLAGS"
 
5083
   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
 
5084
 
 
5085
   AC_TRY_LINK(dnl
 
5086
   [
 
5087
   #define BZ_NO_STDIO
 
5088
   #include<bzlib.h>
 
5089
   ],
 
5090
               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
 
5091
               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
 
5092
               eval "ac_cv_lib_bzip2_prefix=no")
 
5093
   LIBS="$kde_save_LIBS"
 
5094
   CXXFLAGS="$kde_save_CXXFLAGS"
 
5095
   AC_LANG_RESTORE
 
5096
   ])dnl
 
5097
 
 
5098
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
 
5099
   
 
5100
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
 
5101
     BZIP2DIR=bzip2
 
5102
    
 
5103
     LIBBZ2="$ac_cv_lib_bzip2_prefix"
 
5104
     AC_SUBST(LIBBZ2)
 
5105
 
 
5106
     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
 
5107
   dnl else, we just ignore this
 
5108
   fi
 
5109
 
 
5110
fi
 
5111
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
 
5112
])
 
5113
 
 
5114
dnl ------------------------------------------------------------------------
 
5115
dnl Try to find the SSL headers and libraries.
 
5116
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
 
5117
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
 
5118
dnl ------------------------------------------------------------------------
 
5119
dnl
 
5120
AC_DEFUN([KDE_CHECK_SSL],
 
5121
[
 
5122
LIBSSL="-lssl -lcrypto"
 
5123
AC_REQUIRE([KDE_CHECK_LIB64])
 
5124
 
 
5125
ac_ssl_includes=NO ac_ssl_libraries=NO
 
5126
ssl_libraries=""
 
5127
ssl_includes=""
 
5128
AC_ARG_WITH(ssl-dir,
 
5129
    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
 
5130
    [  ac_ssl_includes="$withval"/include
 
5131
       ac_ssl_libraries="$withval"/lib$kdelibsuff
 
5132
    ])
 
5133
 
 
5134
want_ssl=yes
 
5135
AC_ARG_WITH(ssl,
 
5136
    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
 
5137
    [want_ssl=$withval])
 
5138
 
 
5139
if test $want_ssl = yes; then
 
5140
 
 
5141
AC_MSG_CHECKING(for OpenSSL)
 
5142
 
 
5143
AC_CACHE_VAL(ac_cv_have_ssl,
 
5144
[#try to guess OpenSSL locations
 
5145
  
 
5146
  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
 
5147
  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
 
5148
  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
 
5149
  ac_ssl_includes="$ssl_incdir"
 
5150
 
 
5151
  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"
 
5152
  if test ! "$ac_ssl_libraries" = "NO"; then
 
5153
    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
 
5154
  fi
 
5155
 
 
5156
  test=NONE
 
5157
  ssl_libdir=NONE
 
5158
  for dir in $ssl_libdirs; do
 
5159
    try="ls -1 $dir/libssl*"
 
5160
    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
 
5161
  done
 
5162
 
 
5163
  ac_ssl_libraries="$ssl_libdir"
 
5164
 
 
5165
  ac_ldflags_safe="$LDFLAGS"
 
5166
  ac_libs_safe="$LIBS"
 
5167
 
 
5168
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
 
5169
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
 
5170
 
 
5171
  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
 
5172
  ac_ssl_rsaref="yes"
 
5173
  ,
 
5174
  ac_ssl_rsaref="no"
 
5175
  )
 
5176
 
 
5177
  LDFLAGS="$ac_ldflags_safe"
 
5178
  LIBS="$ac_libs_safe"
 
5179
 
 
5180
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
 
5181
    have_ssl=no
 
5182
  else
 
5183
    have_ssl=yes;
 
5184
  fi
 
5185
 
 
5186
  ])
 
5187
 
 
5188
  eval "$ac_cv_have_ssl"
 
5189
 
 
5190
  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
 
5191
 
 
5192
  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
 
5193
  AC_MSG_RESULT($ac_ssl_rsaref)
 
5194
 
 
5195
  AC_MSG_CHECKING([for easter eggs])
 
5196
  AC_MSG_RESULT([none found])
 
5197
 
 
5198
else
 
5199
  have_ssl=no
 
5200
fi
 
5201
 
 
5202
if test "$have_ssl" = yes; then
 
5203
  AC_MSG_CHECKING(for OpenSSL version)
 
5204
  dnl Check for SSL version
 
5205
  AC_CACHE_VAL(ac_cv_ssl_version,
 
5206
  [
 
5207
 
 
5208
    cat >conftest.$ac_ext <<EOF
 
5209
#include <openssl/opensslv.h>
 
5210
#include <stdio.h>
 
5211
    int main() {
 
5212
 
 
5213
#ifndef OPENSSL_VERSION_NUMBER
 
5214
      printf("ssl_version=\\"error\\"\n");
 
5215
#else
 
5216
      if (OPENSSL_VERSION_NUMBER < 0x00906000)
 
5217
        printf("ssl_version=\\"old\\"\n");
 
5218
      else
 
5219
        printf("ssl_version=\\"ok\\"\n");
 
5220
#endif
 
5221
     return (0);
 
5222
    }
 
5223
EOF
 
5224
 
 
5225
    ac_save_CPPFLAGS=$CPPFLAGS
 
5226
    if test "$ac_ssl_includes" != "/usr/include"; then
 
5227
        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
 
5228
    fi
 
5229
 
 
5230
    if AC_TRY_EVAL(ac_link); then 
 
5231
 
 
5232
      if eval `./conftest 2>&5`; then
 
5233
        if test $ssl_version = error; then
 
5234
          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
 
5235
        else
 
5236
          if test $ssl_version = old; then
 
5237
            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
 
5238
            have_ssl=no
 
5239
          fi
 
5240
        fi
 
5241
        ac_cv_ssl_version="ssl_version=$ssl_version"
 
5242
      else
 
5243
        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
 
5244
        Check config.log, and if you can't figure it out, send a mail to 
 
5245
        David Faure <faure@kde.org>, attaching your config.log])
 
5246
      fi
 
5247
 
 
5248
    else
 
5249
      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
 
5250
      Check config.log, and if you can't figure it out, send a mail to 
 
5251
      David Faure <faure@kde.org>, attaching your config.log])
 
5252
    fi 
 
5253
    CPPFLAGS=$ac_save_CPPFLAGS
 
5254
 
 
5255
  ])
 
5256
 
 
5257
  eval "$ac_cv_ssl_version"
 
5258
  AC_MSG_RESULT($ssl_version)
 
5259
fi
 
5260
 
 
5261
if test "$have_ssl" != yes; then
 
5262
  LIBSSL="";
 
5263
else
 
5264
  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
 
5265
  ac_cv_have_ssl="have_ssl=yes \
 
5266
    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
 
5267
  
 
5268
  
 
5269
  ssl_libraries="$ac_ssl_libraries"
 
5270
  ssl_includes="$ac_ssl_includes"
 
5271
 
 
5272
  if test "$ac_ssl_rsaref" = yes; then
 
5273
    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
 
5274
  fi
 
5275
 
 
5276
  if test $ssl_version = "old"; then
 
5277
    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
 
5278
  fi
 
5279
fi
 
5280
 
 
5281
SSL_INCLUDES=
 
5282
 
 
5283
if test "$ssl_includes" = "/usr/include"; then
 
5284
  if test -f /usr/kerberos/include/krb5.h; then
 
5285
        SSL_INCLUDES="-I/usr/kerberos/include"
 
5286
  fi
 
5287
elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
 
5288
  SSL_INCLUDES="-I$ssl_includes"
 
5289
fi
 
5290
 
 
5291
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
 
5292
 SSL_LDFLAGS=""
 
5293
else
 
5294
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
 
5295
fi
 
5296
 
 
5297
AC_SUBST(SSL_INCLUDES)
 
5298
AC_SUBST(SSL_LDFLAGS)
 
5299
AC_SUBST(LIBSSL)
 
5300
])
 
5301
 
 
5302
AC_DEFUN([KDE_CHECK_STRLCPY],
 
5303
[
 
5304
  AC_REQUIRE([AC_CHECK_STRLCAT])
 
5305
  AC_REQUIRE([AC_CHECK_STRLCPY])
 
5306
  AC_CHECK_SIZEOF(size_t)
 
5307
  AC_CHECK_SIZEOF(unsigned long)
 
5308
 
 
5309
  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
 
5310
  AC_TRY_COMPILE(,[
 
5311
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
 
5312
       choke me
 
5313
    #endif
 
5314
    ],AC_MSG_RESULT([yes]),[
 
5315
      AC_MSG_RESULT(no)
 
5316
      AC_MSG_ERROR([
 
5317
       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
 
5318
       does not apply. Please mail kde-devel@kde.org with a description of your system!
 
5319
      ])
 
5320
  ])
 
5321
])
 
5322
 
 
5323
AC_DEFUN([KDE_CHECK_BINUTILS],
 
5324
[
 
5325
  AC_MSG_CHECKING([if ld supports unversioned version maps])
 
5326
 
 
5327
  kde_save_LDFLAGS="$LDFLAGS"
 
5328
  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
 
5329
  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
 
5330
  AC_TRY_LINK([int foo;],
 
5331
[
 
5332
#ifdef __INTEL_COMPILER
 
5333
icc apparently does not support libtools version-info and version-script
 
5334
at the same time. Dunno where the bug is, but until somebody figured out,
 
5335
better disable the optional version scripts.
 
5336
#endif
 
5337
 
 
5338
  foo = 42;
 
5339
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
 
5340
  LDFLAGS="$kde_save_LDFLAGS"
 
5341
  rm -f conftest.map
 
5342
  AM_CONDITIONAL(include_VERSION_SCRIPT, 
 
5343
    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
 
5344
 
 
5345
  AC_MSG_RESULT($kde_supports_versionmaps)
 
5346
])
 
5347
 
 
5348
AC_DEFUN([AM_PROG_OBJC],[
 
5349
AC_CHECK_PROGS(OBJC, gcc, gcc)
 
5350
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
 
5351
if test "x${OBJCFLAGS-unset}" = xunset; then
 
5352
   OBJCFLAGS="-g -O2"
 
5353
fi
 
5354
AC_SUBST(OBJCFLAGS)
 
5355
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
 
5356
])
 
5357
 
 
5358
AC_DEFUN([KDE_CHECK_PERL],
 
5359
[
 
5360
        KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
 
5361
                    AC_MSG_ERROR([No Perl found in your $PATH.
 
5362
We need perl to generate some code.])
 
5363
        ])
 
5364
    AC_SUBST(PERL)
 
5365
])
 
5366
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
5367
 
 
5368
# serial 47 AC_PROG_LIBTOOL
 
5369
 
 
5370
 
 
5371
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
5372
# -----------------------------------------------------------
 
5373
# If this macro is not defined by Autoconf, define it here.
 
5374
m4_ifdef([AC_PROVIDE_IFELSE],
 
5375
         [],
 
5376
         [m4_define([AC_PROVIDE_IFELSE],
 
5377
                 [m4_ifdef([AC_PROVIDE_$1],
 
5378
                           [$2], [$3])])])
 
5379
 
 
5380
 
 
5381
# AC_PROG_LIBTOOL
 
5382
# ---------------
 
5383
AC_DEFUN([AC_PROG_LIBTOOL],
 
5384
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
 
5385
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
 
5386
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
 
5387
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
5388
    [AC_LIBTOOL_CXX],
 
5389
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
 
5390
  ])])
 
5391
dnl And a similar setup for Fortran 77 support
 
5392
  AC_PROVIDE_IFELSE([AC_PROG_F77],
 
5393
    [AC_LIBTOOL_F77],
 
5394
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
 
5395
])])
 
5396
 
 
5397
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
 
5398
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
 
5399
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
 
5400
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
5401
    [AC_LIBTOOL_GCJ],
 
5402
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
5403
      [AC_LIBTOOL_GCJ],
 
5404
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
5405
        [AC_LIBTOOL_GCJ],
 
5406
      [ifdef([AC_PROG_GCJ],
 
5407
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
5408
       ifdef([A][M_PROG_GCJ],
 
5409
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
5410
       ifdef([LT_AC_PROG_GCJ],
 
5411
             [define([LT_AC_PROG_GCJ],
 
5412
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
5413
])])# AC_PROG_LIBTOOL
 
5414
 
 
5415
 
 
5416
# _AC_PROG_LIBTOOL
 
5417
# ----------------
 
5418
AC_DEFUN([_AC_PROG_LIBTOOL],
 
5419
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
5420
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
5421
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
 
5422
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
 
5423
 
 
5424
# This can be used to rebuild libtool when needed
 
5425
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
5426
 
 
5427
# Always use our own libtool.
 
5428
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
 
5429
AC_SUBST(LIBTOOL)dnl
 
5430
 
 
5431
# Prevent multiple expansion
 
5432
define([AC_PROG_LIBTOOL], [])
 
5433
])# _AC_PROG_LIBTOOL
 
5434
 
 
5435
 
 
5436
# AC_LIBTOOL_SETUP
 
5437
# ----------------
 
5438
AC_DEFUN([AC_LIBTOOL_SETUP],
 
5439
[AC_PREREQ(2.50)dnl
 
5440
AC_REQUIRE([AC_ENABLE_SHARED])dnl
 
5441
AC_REQUIRE([AC_ENABLE_STATIC])dnl
 
5442
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
 
5443
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
5444
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
5445
AC_REQUIRE([AC_PROG_CC])dnl
 
5446
AC_REQUIRE([AC_PROG_LD])dnl
 
5447
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
 
5448
AC_REQUIRE([AC_PROG_NM])dnl
 
5449
 
 
5450
AC_REQUIRE([AC_PROG_LN_S])dnl
 
5451
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
5452
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
 
5453
AC_REQUIRE([AC_OBJEXT])dnl
 
5454
AC_REQUIRE([AC_EXEEXT])dnl
 
5455
dnl
 
5456
 
 
5457
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
5458
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
5459
AC_LIBTOOL_OBJDIR
 
5460
 
 
5461
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
5462
_LT_AC_PROG_ECHO_BACKSLASH
 
5463
 
 
5464
case $host_os in
 
5465
aix3*)
 
5466
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
5467
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
5468
  # vanish in a puff of smoke.
 
5469
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
5470
    COLLECT_NAMES=
 
5471
    export COLLECT_NAMES
 
5472
  fi
 
5473
  ;;
 
5474
esac
 
5475
 
 
5476
# Sed substitution that helps us do robust quoting.  It backslashifies
 
5477
# metacharacters that are still active within double-quoted strings.
 
5478
Xsed='sed -e s/^X//'
 
5479
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
5480
 
 
5481
# Same as above, but do not quote variable references.
 
5482
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
5483
 
 
5484
# Sed substitution to delay expansion of an escaped shell variable in a
 
5485
# double_quote_subst'ed string.
 
5486
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
5487
 
 
5488
# Sed substitution to avoid accidental globbing in evaled expressions
 
5489
no_glob_subst='s/\*/\\\*/g'
 
5490
 
 
5491
# Constants:
 
5492
rm="rm -f"
 
5493
 
 
5494
# Global variables:
 
5495
default_ofile=libtool
 
5496
can_build_shared=yes
 
5497
 
 
5498
# All known linkers require a `.a' archive for static linking (except M$VC,
 
5499
# which needs '.lib').
 
5500
libext=a
 
5501
ltmain="$ac_aux_dir/ltmain.sh"
 
5502
ofile="$default_ofile"
 
5503
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
5504
 
 
5505
AC_CHECK_TOOL(AR, ar, false)
 
5506
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
5507
AC_CHECK_TOOL(STRIP, strip, :)
 
5508
 
 
5509
old_CC="$CC"
 
5510
old_CFLAGS="$CFLAGS"
 
5511
 
 
5512
# Set sane defaults for various variables
 
5513
test -z "$AR" && AR=ar
 
5514
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
5515
test -z "$AS" && AS=as
 
5516
test -z "$CC" && CC=cc
 
5517
test -z "$LTCC" && LTCC=$CC
 
5518
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
5519
test -z "$LD" && LD=ld
 
5520
test -z "$LN_S" && LN_S="ln -s"
 
5521
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
5522
test -z "$NM" && NM=nm
 
5523
test -z "$SED" && SED=sed
 
5524
test -z "$OBJDUMP" && OBJDUMP=objdump
 
5525
test -z "$RANLIB" && RANLIB=:
 
5526
test -z "$STRIP" && STRIP=:
 
5527
test -z "$ac_objext" && ac_objext=o
 
5528
 
 
5529
# Determine commands to create old-style static archives.
 
5530
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
5531
old_postinstall_cmds='chmod 644 $oldlib'
 
5532
old_postuninstall_cmds=
 
5533
 
 
5534
if test -n "$RANLIB"; then
 
5535
  case $host_os in
 
5536
  openbsd*)
 
5537
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
5538
    ;;
 
5539
  *)
 
5540
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
5541
    ;;
 
5542
  esac
 
5543
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
5544
fi
 
5545
 
 
5546
# Only perform the check for file, if the check method requires it
 
5547
case $deplibs_check_method in
 
5548
file_magic*)
 
5549
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
5550
    AC_PATH_MAGIC
 
5551
  fi
 
5552
  ;;
 
5553
esac
 
5554
 
 
5555
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
5556
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
5557
enable_win32_dll=yes, enable_win32_dll=no)
 
5558
 
 
5559
AC_ARG_ENABLE([libtool-lock],
 
5560
    [AC_HELP_STRING([--disable-libtool-lock],
 
5561
        [avoid locking (might break parallel builds)])])
 
5562
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
5563
 
 
5564
AC_ARG_WITH([pic],
 
5565
    [AC_HELP_STRING([--with-pic],
 
5566
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
5567
    [pic_mode="$withval"],
 
5568
    [pic_mode=default])
 
5569
test -z "$pic_mode" && pic_mode=default
 
5570
 
 
5571
# Use C for the default configuration in the libtool script
 
5572
tagname=
 
5573
AC_LIBTOOL_LANG_C_CONFIG
 
5574
_LT_AC_TAGCONFIG
 
5575
])# AC_LIBTOOL_SETUP
 
5576
 
 
5577
 
 
5578
# _LT_AC_SYS_COMPILER
 
5579
# -------------------
 
5580
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
5581
[AC_REQUIRE([AC_PROG_CC])dnl
 
5582
 
 
5583
# If no C compiler was specified, use CC.
 
5584
LTCC=${LTCC-"$CC"}
 
5585
 
 
5586
# Allow CC to be a program name with arguments.
 
5587
compiler=$CC
 
5588
])# _LT_AC_SYS_COMPILER
 
5589
 
 
5590
 
 
5591
# _LT_AC_SYS_LIBPATH_AIX
 
5592
# ----------------------
 
5593
# Links a minimal program and checks the executable
 
5594
# for the system default hardcoded library path. In most cases,
 
5595
# this is /usr/lib:/lib, but when the MPI compilers are used
 
5596
# the location of the communication and MPI libs are included too.
 
5597
# If we don't find anything, use the default library path according
 
5598
# to the aix ld manual.
 
5599
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
5600
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
5601
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
5602
}'`
 
5603
# Check for a 64-bit object if we didn't find anything.
 
5604
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; }
 
5605
}'`; fi],[])
 
5606
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
5607
])# _LT_AC_SYS_LIBPATH_AIX
 
5608
 
 
5609
 
 
5610
# _LT_AC_SHELL_INIT(ARG)
 
5611
# ----------------------
 
5612
AC_DEFUN([_LT_AC_SHELL_INIT],
 
5613
[ifdef([AC_DIVERSION_NOTICE],
 
5614
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
5615
         [AC_DIVERT_PUSH(NOTICE)])
 
5616
$1
 
5617
AC_DIVERT_POP
 
5618
])# _LT_AC_SHELL_INIT
 
5619
 
 
5620
 
 
5621
# _LT_AC_PROG_ECHO_BACKSLASH
 
5622
# --------------------------
 
5623
# Add some code to the start of the generated configure script which
 
5624
# will find an echo command which doesn't interpret backslashes.
 
5625
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
 
5626
[_LT_AC_SHELL_INIT([
 
5627
# Check that we are running under the correct shell.
 
5628
SHELL=${CONFIG_SHELL-/bin/sh}
 
5629
 
 
5630
case X$ECHO in
 
5631
X*--fallback-echo)
 
5632
  # Remove one level of quotation (which was required for Make).
 
5633
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
5634
  ;;
 
5635
esac
 
5636
 
 
5637
echo=${ECHO-echo}
 
5638
if test "X[$]1" = X--no-reexec; then
 
5639
  # Discard the --no-reexec flag, and continue.
 
5640
  shift
 
5641
elif test "X[$]1" = X--fallback-echo; then
 
5642
  # Avoid inline document here, it may be left over
 
5643
  :
 
5644
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
 
5645
  # Yippee, $echo works!
 
5646
  :
 
5647
else
 
5648
  # Restart under the correct shell.
 
5649
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
5650
fi
 
5651
 
 
5652
if test "X[$]1" = X--fallback-echo; then
 
5653
  # used as fallback echo
 
5654
  shift
 
5655
  cat <<EOF
 
5656
[$]*
 
5657
EOF
 
5658
  exit 0
 
5659
fi
 
5660
 
 
5661
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
5662
# if CDPATH is set.
 
5663
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
5664
 
 
5665
if test -z "$ECHO"; then
 
5666
if test "X${echo_test_string+set}" != Xset; then
 
5667
# find a string as large as possible, as long as the shell can cope with it
 
5668
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
5669
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
5670
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
 
5671
       echo_test_string="`eval $cmd`" &&
 
5672
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
 
5673
    then
 
5674
      break
 
5675
    fi
 
5676
  done
 
5677
fi
 
5678
 
 
5679
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
5680
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
5681
   test "X$echo_testing_string" = "X$echo_test_string"; then
 
5682
  :
 
5683
else
 
5684
  # The Solaris, AIX, and Digital Unix default echo programs unquote
 
5685
  # backslashes.  This makes it impossible to quote backslashes using
 
5686
  #   echo "$something" | sed 's/\\/\\\\/g'
 
5687
  #
 
5688
  # So, first we look for a working echo in the user's PATH.
 
5689
 
 
5690
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
5691
  for dir in $PATH /usr/ucb; do
 
5692
    IFS="$lt_save_ifs"
 
5693
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
5694
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
5695
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
5696
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
5697
      echo="$dir/echo"
 
5698
      break
 
5699
    fi
 
5700
  done
 
5701
  IFS="$lt_save_ifs"
 
5702
 
 
5703
  if test "X$echo" = Xecho; then
 
5704
    # We didn't find a better echo, so look for alternatives.
 
5705
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
 
5706
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
 
5707
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
5708
      # This shell has a builtin print -r that does the trick.
 
5709
      echo='print -r'
 
5710
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
 
5711
         test "X$CONFIG_SHELL" != X/bin/ksh; then
 
5712
      # If we have ksh, try running configure again with it.
 
5713
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
5714
      export ORIGINAL_CONFIG_SHELL
 
5715
      CONFIG_SHELL=/bin/ksh
 
5716
      export CONFIG_SHELL
 
5717
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
5718
    else
 
5719
      # Try using printf.
 
5720
      echo='printf %s\n'
 
5721
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
5722
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
5723
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
5724
        # Cool, printf works
 
5725
        :
 
5726
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
5727
           test "X$echo_testing_string" = 'X\t' &&
 
5728
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
5729
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
5730
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
5731
        export CONFIG_SHELL
 
5732
        SHELL="$CONFIG_SHELL"
 
5733
        export SHELL
 
5734
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
5735
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
5736
           test "X$echo_testing_string" = 'X\t' &&
 
5737
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
5738
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
5739
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
5740
      else
 
5741
        # maybe with a smaller string...
 
5742
        prev=:
 
5743
 
 
5744
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
5745
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
 
5746
          then
 
5747
            break
 
5748
          fi
 
5749
          prev="$cmd"
 
5750
        done
 
5751
 
 
5752
        if test "$prev" != 'sed 50q "[$]0"'; then
 
5753
          echo_test_string=`eval $prev`
 
5754
          export echo_test_string
 
5755
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
5756
        else
 
5757
          # Oops.  We lost completely, so just stick with echo.
 
5758
          echo=echo
 
5759
        fi
 
5760
      fi
 
5761
    fi
 
5762
  fi
 
5763
fi
 
5764
fi
 
5765
 
 
5766
# Copy echo and quote the copy suitably for passing to libtool from
 
5767
# the Makefile, instead of quoting the original, which is used later.
 
5768
ECHO=$echo
 
5769
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
5770
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
5771
fi
 
5772
 
 
5773
AC_SUBST(ECHO)
 
5774
])])# _LT_AC_PROG_ECHO_BACKSLASH
 
5775
 
 
5776
 
 
5777
# _LT_AC_LOCK
 
5778
# -----------
 
5779
AC_DEFUN([_LT_AC_LOCK],
 
5780
[AC_ARG_ENABLE([libtool-lock],
 
5781
    [AC_HELP_STRING([--disable-libtool-lock],
 
5782
        [avoid locking (might break parallel builds)])])
 
5783
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
5784
 
 
5785
# Some flags need to be propagated to the compiler or linker for good
 
5786
# libtool support.
 
5787
case $host in
 
5788
ia64-*-hpux*)
 
5789
  # Find out which ABI we are using.
 
5790
  echo 'int i;' > conftest.$ac_ext
 
5791
  if AC_TRY_EVAL(ac_compile); then
 
5792
    case `/usr/bin/file conftest.$ac_objext` in
 
5793
    *ELF-32*)
 
5794
      HPUX_IA64_MODE="32"
 
5795
      ;;
 
5796
    *ELF-64*)
 
5797
      HPUX_IA64_MODE="64"
 
5798
      ;;
 
5799
    esac
 
5800
  fi
 
5801
  rm -rf conftest*
 
5802
  ;;
 
5803
*-*-irix6*)
 
5804
  # Find out which ABI we are using.
 
5805
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
5806
  if AC_TRY_EVAL(ac_compile); then
 
5807
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
5808
    case `/usr/bin/file conftest.$ac_objext` in
 
5809
    *32-bit*)
 
5810
      LD="${LD-ld} -melf32bsmip"
 
5811
      ;;
 
5812
    *N32*)
 
5813
      LD="${LD-ld} -melf32bmipn32"
 
5814
      ;;
 
5815
    *64-bit*)
 
5816
      LD="${LD-ld} -melf64bmip"
 
5817
      ;;
 
5818
    esac
 
5819
   else
 
5820
    case `/usr/bin/file conftest.$ac_objext` in
 
5821
    *32-bit*)
 
5822
      LD="${LD-ld} -32"
 
5823
      ;;
 
5824
    *N32*)
 
5825
      LD="${LD-ld} -n32"
 
5826
      ;;
 
5827
    *64-bit*)
 
5828
      LD="${LD-ld} -64"
 
5829
      ;;
 
5830
    esac
 
5831
   fi
 
5832
  fi
 
5833
  rm -rf conftest*
 
5834
  ;;
 
5835
 
 
5836
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
5837
  # Find out which ABI we are using.
 
5838
  echo 'int i;' > conftest.$ac_ext
 
5839
  if AC_TRY_EVAL(ac_compile); then
 
5840
    case "`/usr/bin/file conftest.o`" in
 
5841
    *32-bit*)
 
5842
      LINUX_64_MODE="32"
 
5843
      case $host in
 
5844
        x86_64-*linux*)
 
5845
          LD="${LD-ld} -m elf_i386"
 
5846
          ;;
 
5847
        ppc64-*linux*)
 
5848
          LD="${LD-ld} -m elf32ppclinux"
 
5849
          ;;
 
5850
        s390x-*linux*)
 
5851
          LD="${LD-ld} -m elf_s390"
 
5852
          ;;
 
5853
        sparc64-*linux*)
 
5854
          LD="${LD-ld} -m elf32_sparc"
 
5855
          ;;
 
5856
      esac
 
5857
      ;;
 
5858
    *64-bit*)
 
5859
      LINUX_64_MODE="64"
 
5860
      case $host in
 
5861
        x86_64-*linux*)
 
5862
          LD="${LD-ld} -m elf_x86_64"
 
5863
          ;;
 
5864
        ppc*-*linux*|powerpc*-*linux*)
 
5865
          LD="${LD-ld} -m elf64ppc"
 
5866
          ;;
 
5867
        s390*-*linux*)
 
5868
          LD="${LD-ld} -m elf64_s390"
 
5869
          ;;
 
5870
        sparc*-*linux*)
 
5871
          LD="${LD-ld} -m elf64_sparc"
 
5872
          ;;
 
5873
      esac
 
5874
      ;;
 
5875
    esac
 
5876
  fi
 
5877
  rm -rf conftest*
 
5878
  ;;
 
5879
 
 
5880
*-*-sco3.2v5*)
 
5881
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
5882
  SAVE_CFLAGS="$CFLAGS"
 
5883
  CFLAGS="$CFLAGS -belf"
 
5884
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
5885
    [AC_LANG_PUSH(C)
 
5886
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
5887
     AC_LANG_POP])
 
5888
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
5889
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
5890
    CFLAGS="$SAVE_CFLAGS"
 
5891
  fi
 
5892
  ;;
 
5893
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
5894
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
 
5895
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
5896
  AC_CHECK_TOOL(AS, as, false)
 
5897
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
5898
  ;;
 
5899
  ])
 
5900
esac
 
5901
 
 
5902
need_locks="$enable_libtool_lock"
 
5903
 
 
5904
])# _LT_AC_LOCK
 
5905
 
 
5906
 
 
5907
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
5908
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
5909
# ----------------------------------------------------------------
 
5910
# Check whether the given compiler option works
 
5911
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
5912
[AC_REQUIRE([LT_AC_PROG_SED])
 
5913
AC_CACHE_CHECK([$1], [$2],
 
5914
  [$2=no
 
5915
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
5916
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
5917
   lt_compiler_flag="$3"
 
5918
   # Insert the option either (1) after the last *FLAGS variable, or
 
5919
   # (2) before a word containing "conftest.", or (3) at the end.
 
5920
   # Note that $ac_compile itself does not contain backslashes and begins
 
5921
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
5922
   # The option is referenced via a variable to avoid confusing sed.
 
5923
   lt_compile=`echo "$ac_compile" | $SED \
 
5924
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
5925
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
5926
   -e 's:$: $lt_compiler_flag:'`
 
5927
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
5928
   (eval "$lt_compile" 2>conftest.err)
 
5929
   ac_status=$?
 
5930
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
5931
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
5932
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
5933
     # The compiler can only warn and ignore the option if not recognized
 
5934
     # So say no if there are warnings
 
5935
     if test ! -s conftest.err; then
 
5936
       $2=yes
 
5937
     fi
 
5938
   fi
 
5939
   $rm conftest*
 
5940
])
 
5941
 
 
5942
if test x"[$]$2" = xyes; then
 
5943
    ifelse([$5], , :, [$5])
 
5944
else
 
5945
    ifelse([$6], , :, [$6])
 
5946
fi
 
5947
])# AC_LIBTOOL_COMPILER_OPTION
 
5948
 
 
5949
 
 
5950
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
5951
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
5952
# ------------------------------------------------------------
 
5953
# Check whether the given compiler option works
 
5954
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
5955
[AC_CACHE_CHECK([$1], [$2],
 
5956
  [$2=no
 
5957
   save_LDFLAGS="$LDFLAGS"
 
5958
   LDFLAGS="$LDFLAGS $3"
 
5959
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
 
5960
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
5961
     # The compiler can only warn and ignore the option if not recognized
 
5962
     # So say no if there are warnings
 
5963
     if test -s conftest.err; then
 
5964
       # Append any errors to the config.log.
 
5965
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
5966
     else
 
5967
       $2=yes
 
5968
     fi
 
5969
   fi
 
5970
   $rm conftest*
 
5971
   LDFLAGS="$save_LDFLAGS"
 
5972
])
 
5973
 
 
5974
if test x"[$]$2" = xyes; then
 
5975
    ifelse([$4], , :, [$4])
 
5976
else
 
5977
    ifelse([$5], , :, [$5])
 
5978
fi
 
5979
])# AC_LIBTOOL_LINKER_OPTION
 
5980
 
 
5981
 
 
5982
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
5983
# --------------------------
 
5984
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
5985
[# find the maximum length of command line arguments
 
5986
AC_MSG_CHECKING([the maximum length of command line arguments])
 
5987
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
5988
  i=0
 
5989
  testring="ABCD"
 
5990
 
 
5991
  case $build_os in
 
5992
  msdosdjgpp*)
 
5993
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
5994
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
5995
    # during glob expansion).  Even if it were fixed, the result of this
 
5996
    # check would be larger than it should be.
 
5997
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
5998
    ;;
 
5999
 
 
6000
  gnu*)
 
6001
    # Under GNU Hurd, this test is not required because there is
 
6002
    # no limit to the length of command line arguments.
 
6003
    # Libtool will interpret -1 as no limit whatsoever
 
6004
    lt_cv_sys_max_cmd_len=-1;
 
6005
    ;;
 
6006
 
 
6007
  cygwin* | mingw*)
 
6008
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
6009
    # about 5 minutes as the teststring grows exponentially.
 
6010
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
6011
    # you end up with a "frozen" computer, even though with patience
 
6012
    # the test eventually succeeds (with a max line length of 256k).
 
6013
    # Instead, let's just punt: use the minimum linelength reported by
 
6014
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
6015
    lt_cv_sys_max_cmd_len=8192;
 
6016
    ;;
 
6017
 
 
6018
 *)
 
6019
    # If test is not a shell built-in, we'll probably end up computing a
 
6020
    # maximum length that is only half of the actual maximum length, but
 
6021
    # we can't tell.
 
6022
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
 
6023
               = "XX$testring") >/dev/null 2>&1 &&
 
6024
            new_result=`expr "X$testring" : ".*" 2>&1` &&
 
6025
            lt_cv_sys_max_cmd_len=$new_result &&
 
6026
            test $i != 17 # 1/2 MB should be enough
 
6027
    do
 
6028
      i=`expr $i + 1`
 
6029
      testring=$testring$testring
 
6030
    done
 
6031
    testring=
 
6032
    # Add a significant safety factor because C++ compilers can tack on massive
 
6033
    # amounts of additional arguments before passing them to the linker.
 
6034
    # It appears as though 1/2 is a usable value.
 
6035
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
6036
    ;;
 
6037
  esac
 
6038
])
 
6039
if test -n $lt_cv_sys_max_cmd_len ; then
 
6040
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
6041
else
 
6042
  AC_MSG_RESULT(none)
 
6043
fi
 
6044
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
6045
 
 
6046
 
 
6047
# _LT_AC_CHECK_DLFCN
 
6048
# --------------------
 
6049
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
6050
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
6051
])# _LT_AC_CHECK_DLFCN
 
6052
 
 
6053
 
 
6054
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
6055
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
6056
# ------------------------------------------------------------------
 
6057
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 
6058
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6059
if test "$cross_compiling" = yes; then :
 
6060
  [$4]
 
6061
else
 
6062
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
6063
  lt_status=$lt_dlunknown
 
6064
  cat > conftest.$ac_ext <<EOF
 
6065
[#line __oline__ "configure"
 
6066
#include "confdefs.h"
 
6067
 
 
6068
#if HAVE_DLFCN_H
 
6069
#include <dlfcn.h>
 
6070
#endif
 
6071
 
 
6072
#include <stdio.h>
 
6073
 
 
6074
#ifdef RTLD_GLOBAL
 
6075
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
6076
#else
 
6077
#  ifdef DL_GLOBAL
 
6078
#    define LT_DLGLOBAL         DL_GLOBAL
 
6079
#  else
 
6080
#    define LT_DLGLOBAL         0
 
6081
#  endif
 
6082
#endif
 
6083
 
 
6084
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
6085
   find out it does not work in some platform. */
 
6086
#ifndef LT_DLLAZY_OR_NOW
 
6087
#  ifdef RTLD_LAZY
 
6088
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
6089
#  else
 
6090
#    ifdef DL_LAZY
 
6091
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
6092
#    else
 
6093
#      ifdef RTLD_NOW
 
6094
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
6095
#      else
 
6096
#        ifdef DL_NOW
 
6097
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
6098
#        else
 
6099
#          define LT_DLLAZY_OR_NOW      0
 
6100
#        endif
 
6101
#      endif
 
6102
#    endif
 
6103
#  endif
 
6104
#endif
 
6105
 
 
6106
#ifdef __cplusplus
 
6107
extern "C" void exit (int);
 
6108
#endif
 
6109
 
 
6110
void fnord() { int i=42;}
 
6111
int main ()
 
6112
{
 
6113
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
6114
  int status = $lt_dlunknown;
 
6115
 
 
6116
  if (self)
 
6117
    {
 
6118
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
6119
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
6120
      /* dlclose (self); */
 
6121
    }
 
6122
 
 
6123
    exit (status);
 
6124
}]
 
6125
EOF
 
6126
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
6127
    (./conftest; exit; ) 2>/dev/null
 
6128
    lt_status=$?
 
6129
    case x$lt_status in
 
6130
      x$lt_dlno_uscore) $1 ;;
 
6131
      x$lt_dlneed_uscore) $2 ;;
 
6132
      x$lt_unknown|x*) $3 ;;
 
6133
    esac
 
6134
  else :
 
6135
    # compilation failed
 
6136
    $3
 
6137
  fi
 
6138
fi
 
6139
rm -fr conftest*
 
6140
])# _LT_AC_TRY_DLOPEN_SELF
 
6141
 
 
6142
 
 
6143
# AC_LIBTOOL_DLOPEN_SELF
 
6144
# -------------------
 
6145
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 
6146
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6147
if test "x$enable_dlopen" != xyes; then
 
6148
  enable_dlopen=unknown
 
6149
  enable_dlopen_self=unknown
 
6150
  enable_dlopen_self_static=unknown
 
6151
else
 
6152
  lt_cv_dlopen=no
 
6153
  lt_cv_dlopen_libs=
 
6154
 
 
6155
  case $host_os in
 
6156
  beos*)
 
6157
    lt_cv_dlopen="load_add_on"
 
6158
    lt_cv_dlopen_libs=
 
6159
    lt_cv_dlopen_self=yes
 
6160
    ;;
 
6161
 
 
6162
  mingw* | pw32*)
 
6163
    lt_cv_dlopen="LoadLibrary"
 
6164
    lt_cv_dlopen_libs=
 
6165
   ;;
 
6166
 
 
6167
  cygwin*)
 
6168
    lt_cv_dlopen="dlopen"
 
6169
    lt_cv_dlopen_libs=
 
6170
   ;;
 
6171
 
 
6172
  darwin*)
 
6173
  # if libdl is installed we need to link against it
 
6174
    AC_CHECK_LIB([dl], [dlopen],
 
6175
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
6176
    lt_cv_dlopen="dyld"
 
6177
    lt_cv_dlopen_libs=
 
6178
    lt_cv_dlopen_self=yes
 
6179
    ])
 
6180
   ;;
 
6181
    
 
6182
  *)
 
6183
    AC_CHECK_FUNC([shl_load],
 
6184
          [lt_cv_dlopen="shl_load"],
 
6185
      [AC_CHECK_LIB([dld], [shl_load],
 
6186
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
6187
        [AC_CHECK_FUNC([dlopen],
 
6188
              [lt_cv_dlopen="dlopen"],
 
6189
          [AC_CHECK_LIB([dl], [dlopen],
 
6190
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
6191
            [AC_CHECK_LIB([svld], [dlopen],
 
6192
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
6193
              [AC_CHECK_LIB([dld], [dld_link],
 
6194
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
6195
              ])
 
6196
            ])
 
6197
          ])
 
6198
        ])
 
6199
      ])
 
6200
    ;;
 
6201
  esac
 
6202
 
 
6203
  if test "x$lt_cv_dlopen" != xno; then
 
6204
    enable_dlopen=yes
 
6205
  else
 
6206
    enable_dlopen=no
 
6207
  fi
 
6208
 
 
6209
  case $lt_cv_dlopen in
 
6210
  dlopen)
 
6211
    save_CPPFLAGS="$CPPFLAGS"
 
6212
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
6213
 
 
6214
    save_LDFLAGS="$LDFLAGS"
 
6215
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
6216
 
 
6217
    save_LIBS="$LIBS"
 
6218
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
6219
 
 
6220
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
6221
          lt_cv_dlopen_self, [dnl
 
6222
          _LT_AC_TRY_DLOPEN_SELF(
 
6223
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
6224
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
6225
    ])
 
6226
 
 
6227
    if test "x$lt_cv_dlopen_self" = xyes; then
 
6228
      LDFLAGS="$LDFLAGS $link_static_flag"
 
6229
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
6230
          lt_cv_dlopen_self_static, [dnl
 
6231
          _LT_AC_TRY_DLOPEN_SELF(
 
6232
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
6233
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
6234
      ])
 
6235
    fi
 
6236
 
 
6237
    CPPFLAGS="$save_CPPFLAGS"
 
6238
    LDFLAGS="$save_LDFLAGS"
 
6239
    LIBS="$save_LIBS"
 
6240
    ;;
 
6241
  esac
 
6242
 
 
6243
  case $lt_cv_dlopen_self in
 
6244
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
6245
  *) enable_dlopen_self=unknown ;;
 
6246
  esac
 
6247
 
 
6248
  case $lt_cv_dlopen_self_static in
 
6249
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
6250
  *) enable_dlopen_self_static=unknown ;;
 
6251
  esac
 
6252
fi
 
6253
])# AC_LIBTOOL_DLOPEN_SELF
 
6254
 
 
6255
 
 
6256
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
6257
# ---------------------------------
 
6258
# Check to see if options -c and -o are simultaneously supported by compiler
 
6259
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
6260
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
6261
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
6262
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
6263
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
6264
   $rm -r conftest 2>/dev/null
 
6265
   mkdir conftest
 
6266
   cd conftest
 
6267
   mkdir out
 
6268
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6269
 
 
6270
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
 
6271
   # that will create temporary files in the current directory regardless of
 
6272
   # the output directory.  Thus, making CWD read-only will cause this test
 
6273
   # to fail, enabling locking or at least warning the user not to do parallel
 
6274
   # builds.
 
6275
   chmod -w .
 
6276
 
 
6277
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
6278
   # Insert the option either (1) after the last *FLAGS variable, or
 
6279
   # (2) before a word containing "conftest.", or (3) at the end.
 
6280
   # Note that $ac_compile itself does not contain backslashes and begins
 
6281
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
6282
   lt_compile=`echo "$ac_compile" | $SED \
 
6283
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
6284
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
6285
   -e 's:$: $lt_compiler_flag:'`
 
6286
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
6287
   (eval "$lt_compile" 2>out/conftest.err)
 
6288
   ac_status=$?
 
6289
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
6290
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
6291
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
6292
   then
 
6293
     # The compiler can only warn and ignore the option if not recognized
 
6294
     # So say no if there are warnings
 
6295
     if test ! -s out/conftest.err; then
 
6296
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
6297
     fi
 
6298
   fi
 
6299
   chmod u+w .
 
6300
   $rm conftest* out/*
 
6301
   rmdir out
 
6302
   cd ..
 
6303
   rmdir conftest
 
6304
   $rm conftest*
 
6305
])
 
6306
])# AC_LIBTOOL_PROG_CC_C_O
 
6307
 
 
6308
 
 
6309
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
6310
# -----------------------------------------
 
6311
# Check to see if we can do hard links to lock some files if needed
 
6312
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
6313
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
6314
 
 
6315
hard_links="nottested"
 
6316
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
6317
  # do not overwrite the value of need_locks provided by the user
 
6318
  AC_MSG_CHECKING([if we can lock with hard links])
 
6319
  hard_links=yes
 
6320
  $rm conftest*
 
6321
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
6322
  touch conftest.a
 
6323
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
6324
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
6325
  AC_MSG_RESULT([$hard_links])
 
6326
  if test "$hard_links" = no; then
 
6327
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
6328
    need_locks=warn
 
6329
  fi
 
6330
else
 
6331
  need_locks=no
 
6332
fi
 
6333
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
6334
 
 
6335
 
 
6336
# AC_LIBTOOL_OBJDIR
 
6337
# -----------------
 
6338
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
6339
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
6340
[rm -f .libs 2>/dev/null
 
6341
mkdir .libs 2>/dev/null
 
6342
if test -d .libs; then
 
6343
  lt_cv_objdir=.libs
 
6344
else
 
6345
  # MS-DOS does not allow filenames that begin with a dot.
 
6346
  lt_cv_objdir=_libs
 
6347
fi
 
6348
rmdir .libs 2>/dev/null])
 
6349
objdir=$lt_cv_objdir
 
6350
])# AC_LIBTOOL_OBJDIR
 
6351
 
 
6352
 
 
6353
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
6354
# ----------------------------------------------
 
6355
# Check hardcoding attributes.
 
6356
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
6357
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
6358
_LT_AC_TAGVAR(hardcode_action, $1)=
 
6359
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
6360
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
 
6361
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
 
6362
 
 
6363
  # We can hardcode non-existant directories.
 
6364
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
 
6365
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
6366
     # have to relink, otherwise we might link with an installed library
 
6367
     # when we should be linking with a yet-to-be-installed one
 
6368
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
6369
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
 
6370
    # Linking always hardcodes the temporary library directory.
 
6371
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
 
6372
  else
 
6373
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
6374
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
 
6375
  fi
 
6376
else
 
6377
  # We cannot hardcode anything, or else we can only hardcode existing
 
6378
  # directories.
 
6379
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
6380
fi
 
6381
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
6382
 
 
6383
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
6384
  # Fast installation is not supported
 
6385
  enable_fast_install=no
 
6386
elif test "$shlibpath_overrides_runpath" = yes ||
 
6387
     test "$enable_shared" = no; then
 
6388
  # Fast installation is not necessary
 
6389
  enable_fast_install=needless
 
6390
fi
 
6391
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
6392
 
 
6393
 
 
6394
# AC_LIBTOOL_SYS_LIB_STRIP
 
6395
# ------------------------
 
6396
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
6397
[striplib=
 
6398
old_striplib=
 
6399
AC_MSG_CHECKING([whether stripping libraries is possible])
 
6400
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 
6401
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
6402
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
6403
  AC_MSG_RESULT([yes])
 
6404
else
 
6405
# FIXME - insert some real tests, host_os isn't really good enough
 
6406
  case $host_os in
 
6407
   darwin*)
 
6408
       if test -n "$STRIP" ; then
 
6409
         striplib="$STRIP -x"
 
6410
         AC_MSG_RESULT([yes])
 
6411
       else
 
6412
  AC_MSG_RESULT([no])
 
6413
fi
 
6414
       ;;
 
6415
   *)
 
6416
  AC_MSG_RESULT([no])
 
6417
    ;;
 
6418
  esac  
 
6419
fi
 
6420
])# AC_LIBTOOL_SYS_LIB_STRIP
 
6421
 
 
6422
 
 
6423
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
6424
# -----------------------------
 
6425
# PORTME Fill in your ld.so characteristics
 
6426
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
6427
[AC_MSG_CHECKING([dynamic linker characteristics])
 
6428
library_names_spec=
 
6429
libname_spec='lib$name'
 
6430
soname_spec=
 
6431
shrext=".so"
 
6432
postinstall_cmds=
 
6433
postuninstall_cmds=
 
6434
finish_cmds=
 
6435
finish_eval=
 
6436
shlibpath_var=
 
6437
shlibpath_overrides_runpath=unknown
 
6438
version_type=none
 
6439
dynamic_linker="$host_os ld.so"
 
6440
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
6441
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
6442
need_lib_prefix=unknown
 
6443
hardcode_into_libs=no
 
6444
 
 
6445
# when you set need_version to no, make sure it does not cause -set_version
 
6446
# flags to be left without arguments
 
6447
need_version=unknown
 
6448
 
 
6449
case $host_os in
 
6450
aix3*)
 
6451
  version_type=linux
 
6452
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
6453
  shlibpath_var=LIBPATH
 
6454
 
 
6455
  # AIX 3 has no versioning support, so we append a major version to the name.
 
6456
  soname_spec='${libname}${release}${shared_ext}$major'
 
6457
  ;;
 
6458
 
 
6459
aix4* | aix5*)
 
6460
  version_type=linux
 
6461
  need_lib_prefix=no
 
6462
  need_version=no
 
6463
  hardcode_into_libs=yes
 
6464
  if test "$host_cpu" = ia64; then
 
6465
    # AIX 5 supports IA64
 
6466
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
6467
    shlibpath_var=LD_LIBRARY_PATH
 
6468
  else
 
6469
    # With GCC up to 2.95.x, collect2 would create an import file
 
6470
    # for dependence libraries.  The import file would start with
 
6471
    # the line `#! .'.  This would cause the generated library to
 
6472
    # depend on `.', always an invalid library.  This was fixed in
 
6473
    # development snapshots of GCC prior to 3.0.
 
6474
    case $host_os in
 
6475
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
6476
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
6477
           echo ' yes '
 
6478
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
6479
        :
 
6480
      else
 
6481
        can_build_shared=no
 
6482
      fi
 
6483
      ;;
 
6484
    esac
 
6485
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
6486
    # soname into executable. Probably we can add versioning support to
 
6487
    # collect2, so additional links can be useful in future.
 
6488
    if test "$aix_use_runtimelinking" = yes; then
 
6489
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
6490
      # instead of lib<name>.a to let people know that these are not
 
6491
      # typical AIX shared libraries.
 
6492
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6493
    else
 
6494
      # We preserve .a as extension for shared libraries through AIX4.2
 
6495
      # and later when we are not doing run time linking.
 
6496
      library_names_spec='${libname}${release}.a $libname.a'
 
6497
      soname_spec='${libname}${release}${shared_ext}$major'
 
6498
    fi
 
6499
    shlibpath_var=LIBPATH
 
6500
  fi
 
6501
  ;;
 
6502
 
 
6503
amigaos*)
 
6504
  library_names_spec='$libname.ixlibrary $libname.a'
 
6505
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
6506
  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'
 
6507
  ;;
 
6508
 
 
6509
beos*)
 
6510
  library_names_spec='${libname}${shared_ext}'
 
6511
  dynamic_linker="$host_os ld.so"
 
6512
  shlibpath_var=LIBRARY_PATH
 
6513
  ;;
 
6514
 
 
6515
bsdi4*)
 
6516
  version_type=linux
 
6517
  need_version=no
 
6518
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6519
  soname_spec='${libname}${release}${shared_ext}$major'
 
6520
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
6521
  shlibpath_var=LD_LIBRARY_PATH
 
6522
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
6523
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
6524
  # the default ld.so.conf also contains /usr/contrib/lib and
 
6525
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
6526
  # libtool to hard-code these into programs
 
6527
  ;;
 
6528
 
 
6529
cygwin* | mingw* | pw32*)
 
6530
  version_type=windows
 
6531
  shrext=".dll"
 
6532
  need_version=no
 
6533
  need_lib_prefix=no
 
6534
 
 
6535
  case $GCC,$host_os in
 
6536
  yes,cygwin* | yes,mingw* | yes,pw32*)
 
6537
    library_names_spec='$libname.dll.a'
 
6538
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
6539
    postinstall_cmds='base_file=`basename \${file}`~
 
6540
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
 
6541
      dldir=$destdir/`dirname \$dlpath`~
 
6542
      test -d \$dldir || mkdir -p \$dldir~
 
6543
      $install_prog $dir/$dlname \$dldir/$dlname'
 
6544
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
6545
      dlpath=$dir/\$dldll~
 
6546
       $rm \$dlpath'
 
6547
    shlibpath_overrides_runpath=yes
 
6548
 
 
6549
    case $host_os in
 
6550
    cygwin*)
 
6551
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
6552
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
6553
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
6554
      ;;
 
6555
    mingw*)
 
6556
      # MinGW DLLs use traditional 'lib' prefix
 
6557
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
6558
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
6559
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
 
6560
        # It is most probably a Windows format PATH printed by
 
6561
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
6562
        # path with ; separators, and with drive letters. We can handle the
 
6563
        # drive letters (cygwin fileutils understands them), so leave them,
 
6564
        # especially as we might pass files found there to a mingw objdump,
 
6565
        # which wouldn't understand a cygwinified path. Ahh.
 
6566
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
6567
      else
 
6568
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
6569
      fi
 
6570
      ;;
 
6571
    pw32*)
 
6572
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
6573
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
6574
      ;;
 
6575
    esac
 
6576
    ;;
 
6577
 
 
6578
  *)
 
6579
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
6580
    ;;
 
6581
  esac
 
6582
  dynamic_linker='Win32 ld.exe'
 
6583
  # FIXME: first we should search . and the directory the executable is in
 
6584
  shlibpath_var=PATH
 
6585
  ;;
 
6586
 
 
6587
darwin* | rhapsody*)
 
6588
  dynamic_linker="$host_os dyld"
 
6589
  version_type=darwin
 
6590
  need_lib_prefix=no
 
6591
  need_version=no
 
6592
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
6593
  soname_spec='${libname}${release}${major}$shared_ext'
 
6594
  shlibpath_overrides_runpath=yes
 
6595
  shlibpath_var=DYLD_LIBRARY_PATH
 
6596
  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
 
6597
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 
6598
  if test "$GCC" = yes; then
 
6599
    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"`
 
6600
  else
 
6601
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 
6602
  fi
 
6603
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
6604
  ;;
 
6605
 
 
6606
dgux*)
 
6607
  version_type=linux
 
6608
  need_lib_prefix=no
 
6609
  need_version=no
 
6610
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
6611
  soname_spec='${libname}${release}${shared_ext}$major'
 
6612
  shlibpath_var=LD_LIBRARY_PATH
 
6613
  ;;
 
6614
 
 
6615
freebsd1*)
 
6616
  dynamic_linker=no
 
6617
  ;;
 
6618
 
 
6619
freebsd*-gnu*)
 
6620
  version_type=linux
 
6621
  need_lib_prefix=no
 
6622
  need_version=no
 
6623
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
6624
  soname_spec='${libname}${release}${shared_ext}$major'
 
6625
  shlibpath_var=LD_LIBRARY_PATH
 
6626
  shlibpath_overrides_runpath=no
 
6627
  hardcode_into_libs=yes
 
6628
  dynamic_linker='GNU ld.so'
 
6629
  ;;
 
6630
 
 
6631
freebsd*)
 
6632
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
6633
  version_type=freebsd-$objformat
 
6634
  case $version_type in
 
6635
    freebsd-elf*)
 
6636
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
6637
      need_version=no
 
6638
      need_lib_prefix=no
 
6639
      ;;
 
6640
    freebsd-*)
 
6641
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
6642
      need_version=yes
 
6643
      ;;
 
6644
  esac
 
6645
  shlibpath_var=LD_LIBRARY_PATH
 
6646
  case $host_os in
 
6647
  freebsd2*)
 
6648
    shlibpath_overrides_runpath=yes
 
6649
    ;;
 
6650
  freebsd3.[01]* | freebsdelf3.[01]*)
 
6651
    shlibpath_overrides_runpath=yes
 
6652
    hardcode_into_libs=yes
 
6653
    ;;
 
6654
  *) # from 3.2 on
 
6655
    shlibpath_overrides_runpath=no
 
6656
    hardcode_into_libs=yes
 
6657
    ;;
 
6658
  esac
 
6659
  ;;
 
6660
 
 
6661
gnu*)
 
6662
  version_type=linux
 
6663
  need_lib_prefix=no
 
6664
  need_version=no
 
6665
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
6666
  soname_spec='${libname}${release}${shared_ext}$major'
 
6667
  shlibpath_var=LD_LIBRARY_PATH
 
6668
  hardcode_into_libs=yes
 
6669
  ;;
 
6670
 
 
6671
hpux9* | hpux10* | hpux11*)
 
6672
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
6673
  # link against other versions.
 
6674
  version_type=sunos
 
6675
  need_lib_prefix=no
 
6676
  need_version=no
 
6677
  case "$host_cpu" in
 
6678
  ia64*)
 
6679
    shrext='.so'
 
6680
    hardcode_into_libs=yes
 
6681
    dynamic_linker="$host_os dld.so"
 
6682
    shlibpath_var=LD_LIBRARY_PATH
 
6683
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
6684
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6685
    soname_spec='${libname}${release}${shared_ext}$major'
 
6686
    if test "X$HPUX_IA64_MODE" = X32; then
 
6687
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
6688
    else
 
6689
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
6690
    fi
 
6691
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
6692
    ;;
 
6693
   hppa*64*)
 
6694
     shrext='.sl'
 
6695
     hardcode_into_libs=yes
 
6696
     dynamic_linker="$host_os dld.sl"
 
6697
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
6698
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
6699
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6700
     soname_spec='${libname}${release}${shared_ext}$major'
 
6701
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
6702
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
6703
     ;;
 
6704
   *)
 
6705
    shrext='.sl'
 
6706
    dynamic_linker="$host_os dld.sl"
 
6707
    shlibpath_var=SHLIB_PATH
 
6708
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
6709
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6710
    soname_spec='${libname}${release}${shared_ext}$major'
 
6711
    ;;
 
6712
  esac
 
6713
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
6714
  postinstall_cmds='chmod 555 $lib'
 
6715
  ;;
 
6716
 
 
6717
irix5* | irix6* | nonstopux*)
 
6718
  case $host_os in
 
6719
    nonstopux*) version_type=nonstopux ;;
 
6720
    *)
 
6721
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
6722
                version_type=linux
 
6723
        else
 
6724
                version_type=irix
 
6725
        fi ;;
 
6726
  esac
 
6727
  need_lib_prefix=no
 
6728
  need_version=no
 
6729
  soname_spec='${libname}${release}${shared_ext}$major'
 
6730
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
6731
  case $host_os in
 
6732
  irix5* | nonstopux*)
 
6733
    libsuff= shlibsuff=
 
6734
    ;;
 
6735
  *)
 
6736
    case $LD in # libtool.m4 will add one of these switches to LD
 
6737
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
6738
      libsuff= shlibsuff= libmagic=32-bit;;
 
6739
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
6740
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
6741
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
6742
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
6743
    *) libsuff= shlibsuff= libmagic=never-match;;
 
6744
    esac
 
6745
    ;;
 
6746
  esac
 
6747
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
6748
  shlibpath_overrides_runpath=no
 
6749
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
6750
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
6751
  hardcode_into_libs=yes
 
6752
  ;;
 
6753
 
 
6754
# No shared lib support for Linux oldld, aout, or coff.
 
6755
linux*oldld* | linux*aout* | linux*coff*)
 
6756
  dynamic_linker=no
 
6757
  ;;
 
6758
 
 
6759
# This must be Linux ELF.
 
6760
linux*)
 
6761
  version_type=linux
 
6762
  need_lib_prefix=no
 
6763
  need_version=no
 
6764
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6765
  soname_spec='${libname}${release}${shared_ext}$major'
 
6766
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
6767
  libsuff=
 
6768
  if test "x$LINUX_64_MODE" = x64; then
 
6769
    # Some platforms are per default 64-bit, so there's no /lib64
 
6770
    if test -d /lib64; then
 
6771
      libsuff=64
 
6772
    fi
 
6773
  fi
 
6774
  shlibpath_var=LD_LIBRARY_PATH
 
6775
  shlibpath_overrides_runpath=no
 
6776
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
 
6777
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
 
6778
  # This implies no fast_install, which is unacceptable.
 
6779
  # Some rework will be needed to allow for fast_install
 
6780
  # before this can be enabled.
 
6781
  hardcode_into_libs=yes
 
6782
 
 
6783
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
6784
  # powerpc, because MkLinux only supported shared libraries with the
 
6785
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
6786
  # most powerpc-linux boxes support dynamic linking these days and
 
6787
  # people can always --disable-shared, the test was removed, and we
 
6788
  # assume the GNU/Linux dynamic linker is in use.
 
6789
  dynamic_linker='GNU/Linux ld.so'
 
6790
  ;;
 
6791
 
 
6792
netbsd*)
 
6793
  version_type=sunos
 
6794
  need_lib_prefix=no
 
6795
  need_version=no
 
6796
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
6797
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
6798
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
6799
    dynamic_linker='NetBSD (a.out) ld.so'
 
6800
  else
 
6801
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
 
6802
    soname_spec='${libname}${release}${shared_ext}$major'
 
6803
    dynamic_linker='NetBSD ld.elf_so'
 
6804
  fi
 
6805
  shlibpath_var=LD_LIBRARY_PATH
 
6806
  shlibpath_overrides_runpath=yes
 
6807
  hardcode_into_libs=yes
 
6808
  ;;
 
6809
 
 
6810
newsos6)
 
6811
  version_type=linux
 
6812
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6813
  shlibpath_var=LD_LIBRARY_PATH
 
6814
  shlibpath_overrides_runpath=yes
 
6815
  ;;
 
6816
 
 
6817
nto-qnx*)
 
6818
  version_type=linux
 
6819
  need_lib_prefix=no
 
6820
  need_version=no
 
6821
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6822
  soname_spec='${libname}${release}${shared_ext}$major'
 
6823
  shlibpath_var=LD_LIBRARY_PATH
 
6824
  shlibpath_overrides_runpath=yes
 
6825
  ;;
 
6826
 
 
6827
openbsd*)
 
6828
  version_type=sunos
 
6829
  need_lib_prefix=no
 
6830
  need_version=no
 
6831
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
6832
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
6833
  shlibpath_var=LD_LIBRARY_PATH
 
6834
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6835
    case $host_os in
 
6836
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
6837
        shlibpath_overrides_runpath=no
 
6838
        ;;
 
6839
      *)
 
6840
        shlibpath_overrides_runpath=yes
 
6841
        ;;
 
6842
      esac
 
6843
  else
 
6844
    shlibpath_overrides_runpath=yes
 
6845
  fi
 
6846
  ;;
 
6847
 
 
6848
os2*)
 
6849
  libname_spec='$name'
 
6850
  shrext=".dll"
 
6851
  need_lib_prefix=no
 
6852
  library_names_spec='$libname${shared_ext} $libname.a'
 
6853
  dynamic_linker='OS/2 ld.exe'
 
6854
  shlibpath_var=LIBPATH
 
6855
  ;;
 
6856
 
 
6857
osf3* | osf4* | osf5*)
 
6858
  version_type=osf
 
6859
  need_lib_prefix=no
 
6860
  need_version=no
 
6861
  soname_spec='${libname}${release}${shared_ext}$major'
 
6862
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6863
  shlibpath_var=LD_LIBRARY_PATH
 
6864
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
6865
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
6866
  ;;
 
6867
 
 
6868
sco3.2v5*)
 
6869
  version_type=osf
 
6870
  soname_spec='${libname}${release}${shared_ext}$major'
 
6871
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6872
  shlibpath_var=LD_LIBRARY_PATH
 
6873
  ;;
 
6874
 
 
6875
solaris*)
 
6876
  version_type=linux
 
6877
  need_lib_prefix=no
 
6878
  need_version=no
 
6879
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6880
  soname_spec='${libname}${release}${shared_ext}$major'
 
6881
  shlibpath_var=LD_LIBRARY_PATH
 
6882
  shlibpath_overrides_runpath=yes
 
6883
  hardcode_into_libs=yes
 
6884
  # ldd complains unless libraries are executable
 
6885
  postinstall_cmds='chmod +x $lib'
 
6886
  ;;
 
6887
 
 
6888
sunos4*)
 
6889
  version_type=sunos
 
6890
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
6891
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
6892
  shlibpath_var=LD_LIBRARY_PATH
 
6893
  shlibpath_overrides_runpath=yes
 
6894
  if test "$with_gnu_ld" = yes; then
 
6895
    need_lib_prefix=no
 
6896
  fi
 
6897
  need_version=yes
 
6898
  ;;
 
6899
 
 
6900
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
6901
  version_type=linux
 
6902
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6903
  soname_spec='${libname}${release}${shared_ext}$major'
 
6904
  shlibpath_var=LD_LIBRARY_PATH
 
6905
  case $host_vendor in
 
6906
    sni)
 
6907
      shlibpath_overrides_runpath=no
 
6908
      need_lib_prefix=no
 
6909
      export_dynamic_flag_spec='${wl}-Blargedynsym'
 
6910
      runpath_var=LD_RUN_PATH
 
6911
      ;;
 
6912
    siemens)
 
6913
      need_lib_prefix=no
 
6914
      ;;
 
6915
    motorola)
 
6916
      need_lib_prefix=no
 
6917
      need_version=no
 
6918
      shlibpath_overrides_runpath=no
 
6919
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
6920
      ;;
 
6921
  esac
 
6922
  ;;
 
6923
 
 
6924
sysv4*MP*)
 
6925
  if test -d /usr/nec ;then
 
6926
    version_type=linux
 
6927
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
6928
    soname_spec='$libname${shared_ext}.$major'
 
6929
    shlibpath_var=LD_LIBRARY_PATH
 
6930
  fi
 
6931
  ;;
 
6932
 
 
6933
uts4*)
 
6934
  version_type=linux
 
6935
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
6936
  soname_spec='${libname}${release}${shared_ext}$major'
 
6937
  shlibpath_var=LD_LIBRARY_PATH
 
6938
  ;;
 
6939
 
 
6940
*)
 
6941
  dynamic_linker=no
 
6942
  ;;
 
6943
esac
 
6944
AC_MSG_RESULT([$dynamic_linker])
 
6945
test "$dynamic_linker" = no && can_build_shared=no
 
6946
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
6947
 
 
6948
 
 
6949
# _LT_AC_TAGCONFIG
 
6950
# ----------------
 
6951
AC_DEFUN([_LT_AC_TAGCONFIG],
 
6952
[AC_ARG_WITH([tags],
 
6953
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
 
6954
        [include additional configurations @<:@automatic@:>@])],
 
6955
    [tagnames="$withval"])
 
6956
 
 
6957
if test -f "$ltmain" && test -n "$tagnames"; then
 
6958
  if test ! -f "${ofile}"; then
 
6959
    AC_MSG_WARN([output file `$ofile' does not exist])
 
6960
  fi
 
6961
 
 
6962
  if test -z "$LTCC"; then
 
6963
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
6964
    if test -z "$LTCC"; then
 
6965
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
 
6966
    else
 
6967
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
6968
    fi
 
6969
  fi
 
6970
 
 
6971
  # Extract list of available tagged configurations in $ofile.
 
6972
  # Note that this assumes the entire list is on one line.
 
6973
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
6974
 
 
6975
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
6976
  for tagname in $tagnames; do
 
6977
    IFS="$lt_save_ifs"
 
6978
    # Check whether tagname contains only valid characters
 
6979
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
6980
    "") ;;
 
6981
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
6982
        ;;
 
6983
    esac
 
6984
 
 
6985
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
6986
    then
 
6987
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
6988
    fi
 
6989
 
 
6990
    # Update the list of available tags.
 
6991
    if test -n "$tagname"; then
 
6992
      echo appending configuration tag \"$tagname\" to $ofile
 
6993
 
 
6994
      case $tagname in
 
6995
      CXX)
 
6996
        if test -n "$CXX" && test "X$CXX" != "Xno"; then
 
6997
          AC_LIBTOOL_LANG_CXX_CONFIG
 
6998
        else
 
6999
          tagname=""
 
7000
        fi
 
7001
        ;;
 
7002
 
 
7003
      F77)
 
7004
        if test -n "$F77" && test "X$F77" != "Xno"; then
 
7005
          AC_LIBTOOL_LANG_F77_CONFIG
 
7006
        else
 
7007
          tagname=""
 
7008
        fi
 
7009
        ;;
 
7010
 
 
7011
      GCJ)
 
7012
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
7013
          AC_LIBTOOL_LANG_GCJ_CONFIG
 
7014
        else
 
7015
          tagname=""
 
7016
        fi
 
7017
        ;;
 
7018
 
 
7019
      RC)
 
7020
        AC_LIBTOOL_LANG_RC_CONFIG
 
7021
        ;;
 
7022
 
 
7023
      *)
 
7024
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
7025
        ;;
 
7026
      esac
 
7027
 
 
7028
      # Append the new tag name to the list of available tags.
 
7029
      if test -n "$tagname" ; then
 
7030
      available_tags="$available_tags $tagname"
 
7031
    fi
 
7032
    fi
 
7033
  done
 
7034
  IFS="$lt_save_ifs"
 
7035
 
 
7036
  # Now substitute the updated list of available tags.
 
7037
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
7038
    mv "${ofile}T" "$ofile"
 
7039
    chmod +x "$ofile"
 
7040
  else
 
7041
    rm -f "${ofile}T"
 
7042
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
7043
  fi
 
7044
fi
 
7045
])# _LT_AC_TAGCONFIG
 
7046
 
 
7047
 
 
7048
# AC_LIBTOOL_DLOPEN
 
7049
# -----------------
 
7050
# enable checks for dlopen support
 
7051
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
7052
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
7053
])# AC_LIBTOOL_DLOPEN
 
7054
 
 
7055
 
 
7056
# AC_LIBTOOL_WIN32_DLL
 
7057
# --------------------
 
7058
# declare package support for building win32 dll's
 
7059
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
7060
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
7061
])# AC_LIBTOOL_WIN32_DLL
 
7062
 
 
7063
 
 
7064
# AC_ENABLE_SHARED([DEFAULT])
 
7065
# ---------------------------
 
7066
# implement the --enable-shared flag
 
7067
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
7068
AC_DEFUN([AC_ENABLE_SHARED],
 
7069
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
7070
AC_ARG_ENABLE([shared],
 
7071
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
7072
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
7073
    [p=${PACKAGE-default}
 
7074
    case $enableval in
 
7075
    yes) enable_shared=yes ;;
 
7076
    no) enable_shared=no ;;
 
7077
    *)
 
7078
      enable_shared=no
 
7079
      # Look at the argument we got.  We use all the common list separators.
 
7080
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7081
      for pkg in $enableval; do
 
7082
        IFS="$lt_save_ifs"
 
7083
        if test "X$pkg" = "X$p"; then
 
7084
          enable_shared=yes
 
7085
        fi
 
7086
      done
 
7087
      IFS="$lt_save_ifs"
 
7088
      ;;
 
7089
    esac],
 
7090
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
7091
])# AC_ENABLE_SHARED
 
7092
 
 
7093
 
 
7094
# AC_DISABLE_SHARED
 
7095
# -----------------
 
7096
#- set the default shared flag to --disable-shared
 
7097
AC_DEFUN([AC_DISABLE_SHARED],
 
7098
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7099
AC_ENABLE_SHARED(no)
 
7100
])# AC_DISABLE_SHARED
 
7101
 
 
7102
 
 
7103
# AC_ENABLE_STATIC([DEFAULT])
 
7104
# ---------------------------
 
7105
# implement the --enable-static flag
 
7106
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
7107
AC_DEFUN([AC_ENABLE_STATIC],
 
7108
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
7109
AC_ARG_ENABLE([static],
 
7110
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
7111
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
7112
    [p=${PACKAGE-default}
 
7113
    case $enableval in
 
7114
    yes) enable_static=yes ;;
 
7115
    no) enable_static=no ;;
 
7116
    *)
 
7117
     enable_static=no
 
7118
      # Look at the argument we got.  We use all the common list separators.
 
7119
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7120
      for pkg in $enableval; do
 
7121
        IFS="$lt_save_ifs"
 
7122
        if test "X$pkg" = "X$p"; then
 
7123
          enable_static=yes
 
7124
        fi
 
7125
      done
 
7126
      IFS="$lt_save_ifs"
 
7127
      ;;
 
7128
    esac],
 
7129
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
7130
])# AC_ENABLE_STATIC
 
7131
 
 
7132
 
 
7133
# AC_DISABLE_STATIC
 
7134
# -----------------
 
7135
# set the default static flag to --disable-static
 
7136
AC_DEFUN([AC_DISABLE_STATIC],
 
7137
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7138
AC_ENABLE_STATIC(no)
 
7139
])# AC_DISABLE_STATIC
 
7140
 
 
7141
 
 
7142
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
7143
# ---------------------------------
 
7144
# implement the --enable-fast-install flag
 
7145
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
7146
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
7147
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
7148
AC_ARG_ENABLE([fast-install],
 
7149
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
7150
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
7151
    [p=${PACKAGE-default}
 
7152
    case $enableval in
 
7153
    yes) enable_fast_install=yes ;;
 
7154
    no) enable_fast_install=no ;;
 
7155
    *)
 
7156
      enable_fast_install=no
 
7157
      # Look at the argument we got.  We use all the common list separators.
 
7158
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7159
      for pkg in $enableval; do
 
7160
        IFS="$lt_save_ifs"
 
7161
        if test "X$pkg" = "X$p"; then
 
7162
          enable_fast_install=yes
 
7163
        fi
 
7164
      done
 
7165
      IFS="$lt_save_ifs"
 
7166
      ;;
 
7167
    esac],
 
7168
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
7169
])# AC_ENABLE_FAST_INSTALL
 
7170
 
 
7171
 
 
7172
# AC_DISABLE_FAST_INSTALL
 
7173
# -----------------------
 
7174
# set the default to --disable-fast-install
 
7175
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
7176
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7177
AC_ENABLE_FAST_INSTALL(no)
 
7178
])# AC_DISABLE_FAST_INSTALL
 
7179
 
 
7180
 
 
7181
# AC_LIBTOOL_PICMODE([MODE])
 
7182
# --------------------------
 
7183
# implement the --with-pic flag
 
7184
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
7185
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
7186
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7187
pic_mode=ifelse($#,1,$1,default)
 
7188
])# AC_LIBTOOL_PICMODE
 
7189
 
 
7190
 
 
7191
# AC_PROG_EGREP
 
7192
# -------------
 
7193
# This is predefined starting with Autoconf 2.54, so this conditional
 
7194
# definition can be removed once we require Autoconf 2.54 or later.
 
7195
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 
7196
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 
7197
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
7198
    then ac_cv_prog_egrep='grep -E'
 
7199
    else ac_cv_prog_egrep='egrep'
 
7200
    fi])
 
7201
 EGREP=$ac_cv_prog_egrep
 
7202
 AC_SUBST([EGREP])
 
7203
])])
 
7204
 
 
7205
 
 
7206
# AC_PATH_TOOL_PREFIX
 
7207
# -------------------
 
7208
# find a file program which can recognise shared library
 
7209
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
7210
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
7211
AC_MSG_CHECKING([for $1])
 
7212
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
7213
[case $MAGIC_CMD in
 
7214
[[\\/*] |  ?:[\\/]*])
 
7215
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
7216
  ;;
 
7217
*)
 
7218
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
7219
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
7220
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
7221
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
7222
dnl not every word.  This closes a longstanding sh security hole.
 
7223
  ac_dummy="ifelse([$2], , $PATH, [$2])"
 
7224
  for ac_dir in $ac_dummy; do
 
7225
    IFS="$lt_save_ifs"
 
7226
    test -z "$ac_dir" && ac_dir=.
 
7227
    if test -f $ac_dir/$1; then
 
7228
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
7229
      if test -n "$file_magic_test_file"; then
 
7230
        case $deplibs_check_method in
 
7231
        "file_magic "*)
 
7232
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
 
7233
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
7234
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
7235
            $EGREP "$file_magic_regex" > /dev/null; then
 
7236
            :
 
7237
          else
 
7238
            cat <<EOF 1>&2
 
7239
 
 
7240
*** Warning: the command libtool uses to detect shared libraries,
 
7241
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
7242
*** The result is that libtool may fail to recognize shared libraries
 
7243
*** as such.  This will affect the creation of libtool libraries that
 
7244
*** depend on shared libraries, but programs linked with such libtool
 
7245
*** libraries will work regardless of this problem.  Nevertheless, you
 
7246
*** may want to report the problem to your system manager and/or to
 
7247
*** bug-libtool@gnu.org
 
7248
 
 
7249
EOF
 
7250
          fi ;;
 
7251
        esac
 
7252
      fi
 
7253
      break
 
7254
    fi
 
7255
  done
 
7256
  IFS="$lt_save_ifs"
 
7257
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
7258
  ;;
 
7259
esac])
 
7260
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
7261
if test -n "$MAGIC_CMD"; then
 
7262
  AC_MSG_RESULT($MAGIC_CMD)
 
7263
else
 
7264
  AC_MSG_RESULT(no)
 
7265
fi
 
7266
])# AC_PATH_TOOL_PREFIX
 
7267
 
 
7268
 
 
7269
# AC_PATH_MAGIC
 
7270
# -------------
 
7271
# find a file program which can recognise a shared library
 
7272
AC_DEFUN([AC_PATH_MAGIC],
 
7273
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
7274
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
7275
  if test -n "$ac_tool_prefix"; then
 
7276
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
7277
  else
 
7278
    MAGIC_CMD=:
 
7279
  fi
 
7280
fi
 
7281
])# AC_PATH_MAGIC
 
7282
 
 
7283
 
 
7284
# AC_PROG_LD
 
7285
# ----------
 
7286
# find the pathname to the GNU or non-GNU linker
 
7287
AC_DEFUN([AC_PROG_LD],
 
7288
[AC_ARG_WITH([gnu-ld],
 
7289
    [AC_HELP_STRING([--with-gnu-ld],
 
7290
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
7291
    [test "$withval" = no || with_gnu_ld=yes],
 
7292
    [with_gnu_ld=no])
 
7293
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
7294
AC_REQUIRE([AC_PROG_CC])dnl
 
7295
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
7296
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
7297
ac_prog=ld
 
7298
if test "$GCC" = yes; then
 
7299
  # Check if gcc -print-prog-name=ld gives a path.
 
7300
  AC_MSG_CHECKING([for ld used by $CC])
 
7301
  case $host in
 
7302
  *-*-mingw*)
 
7303
    # gcc leaves a trailing carriage return which upsets mingw
 
7304
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
7305
  *)
 
7306
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
7307
  esac
 
7308
  case $ac_prog in
 
7309
    # Accept absolute paths.
 
7310
    [[\\/]]* | ?:[[\\/]]*)
 
7311
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
7312
      # Canonicalize the pathname of ld
 
7313
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
 
7314
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
7315
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
 
7316
      done
 
7317
      test -z "$LD" && LD="$ac_prog"
 
7318
      ;;
 
7319
  "")
 
7320
    # If it fails, then pretend we aren't using GCC.
 
7321
    ac_prog=ld
 
7322
    ;;
 
7323
  *)
 
7324
    # If it is relative, then search for the first ld in PATH.
 
7325
    with_gnu_ld=unknown
 
7326
    ;;
 
7327
  esac
 
7328
elif test "$with_gnu_ld" = yes; then
 
7329
  AC_MSG_CHECKING([for GNU ld])
 
7330
else
 
7331
  AC_MSG_CHECKING([for non-GNU ld])
 
7332
fi
 
7333
AC_CACHE_VAL(lt_cv_path_LD,
 
7334
[if test -z "$LD"; then
 
7335
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
7336
  for ac_dir in $PATH; do
 
7337
    IFS="$lt_save_ifs"
 
7338
    test -z "$ac_dir" && ac_dir=.
 
7339
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
7340
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
7341
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
7342
      # but apparently some GNU ld's only accept -v.
 
7343
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
7344
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
7345
      *GNU* | *'with BFD'*)
 
7346
        test "$with_gnu_ld" != no && break
 
7347
        ;;
 
7348
      *)
 
7349
        test "$with_gnu_ld" != yes && break
 
7350
        ;;
 
7351
      esac
 
7352
    fi
 
7353
  done
 
7354
  IFS="$lt_save_ifs"
 
7355
else
 
7356
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
7357
fi])
 
7358
LD="$lt_cv_path_LD"
 
7359
if test -n "$LD"; then
 
7360
  AC_MSG_RESULT($LD)
 
7361
else
 
7362
  AC_MSG_RESULT(no)
 
7363
fi
 
7364
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
7365
AC_PROG_LD_GNU
 
7366
])# AC_PROG_LD
 
7367
 
 
7368
 
 
7369
# AC_PROG_LD_GNU
 
7370
# --------------
 
7371
AC_DEFUN([AC_PROG_LD_GNU],
 
7372
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
7373
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
7374
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
7375
case `$LD -v 2>&1 </dev/null` in
 
7376
*GNU* | *'with BFD'*)
 
7377
  lt_cv_prog_gnu_ld=yes
 
7378
  ;;
 
7379
*)
 
7380
  lt_cv_prog_gnu_ld=no
 
7381
  ;;
 
7382
esac])
 
7383
with_gnu_ld=$lt_cv_prog_gnu_ld
 
7384
])# AC_PROG_LD_GNU
 
7385
 
 
7386
 
 
7387
# AC_PROG_LD_RELOAD_FLAG
 
7388
# ----------------------
 
7389
# find reload flag for linker
 
7390
#   -- PORTME Some linkers may need a different reload flag.
 
7391
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
7392
[AC_CACHE_CHECK([for $LD option to reload object files],
 
7393
  lt_cv_ld_reload_flag,
 
7394
  [lt_cv_ld_reload_flag='-r'])
 
7395
reload_flag=$lt_cv_ld_reload_flag
 
7396
case $reload_flag in
 
7397
"" | " "*) ;;
 
7398
*) reload_flag=" $reload_flag" ;;
 
7399
esac
 
7400
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
7401
])# AC_PROG_LD_RELOAD_FLAG
 
7402
 
 
7403
 
 
7404
# AC_DEPLIBS_CHECK_METHOD
 
7405
# -----------------------
 
7406
# how to check for library dependencies
 
7407
#  -- PORTME fill in with the dynamic library characteristics
 
7408
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
7409
[AC_CACHE_CHECK([how to recognise dependent libraries],
 
7410
lt_cv_deplibs_check_method,
 
7411
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
7412
lt_cv_file_magic_test_file=
 
7413
lt_cv_deplibs_check_method='unknown'
 
7414
# Need to set the preceding variable on all platforms that support
 
7415
# interlibrary dependencies.
 
7416
# 'none' -- dependencies not supported.
 
7417
# `unknown' -- same as none, but documents that we really don't know.
 
7418
# 'pass_all' -- all dependencies passed with no checks.
 
7419
# 'test_compile' -- check by making test program.
 
7420
# 'file_magic [[regex]]' -- check by looking for files in library path
 
7421
# which responds to the $file_magic_cmd with a given extended regex.
 
7422
# If you have `file' or equivalent on your system and you're not sure
 
7423
# whether `pass_all' will *always* work, you probably want this one.
 
7424
 
 
7425
case $host_os in
 
7426
aix4* | aix5*)
 
7427
  lt_cv_deplibs_check_method=pass_all
 
7428
  ;;
 
7429
 
 
7430
beos*)
 
7431
  lt_cv_deplibs_check_method=pass_all
 
7432
  ;;
 
7433
 
 
7434
bsdi4*)
 
7435
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
7436
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
7437
  lt_cv_file_magic_test_file=/shlib/libc.so
 
7438
  ;;
 
7439
 
 
7440
cygwin* | mingw* | pw32*)
 
7441
  # win32_libid is a shell function defined in ltmain.sh
 
7442
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
7443
  lt_cv_file_magic_cmd='win32_libid'
 
7444
  ;;
 
7445
 
 
7446
darwin* | rhapsody*)
 
7447
  # this will be overwritten by pass_all, but leave it in just in case
 
7448
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
 
7449
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
7450
  case "$host_os" in
 
7451
  rhapsody* | darwin1.[[012]])
 
7452
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
 
7453
    ;;
 
7454
  *) # Darwin 1.3 on
 
7455
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
 
7456
    ;;
 
7457
  esac
 
7458
  lt_cv_deplibs_check_method=pass_all
 
7459
  ;;
 
7460
 
 
7461
freebsd*)
 
7462
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
7463
    case $host_cpu in
 
7464
    i*86 )
 
7465
      # Not sure whether the presence of OpenBSD here was a mistake.
 
7466
      # Let's accept both of them until this is cleared up.
 
7467
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
 
7468
      lt_cv_file_magic_cmd=/usr/bin/file
 
7469
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
7470
      ;;
 
7471
    esac
 
7472
  else
 
7473
    lt_cv_deplibs_check_method=pass_all
 
7474
  fi
 
7475
  ;;
 
7476
 
 
7477
gnu*)
 
7478
  lt_cv_deplibs_check_method=pass_all
 
7479
  ;;
 
7480
 
 
7481
hpux10.20* | hpux11*)
 
7482
  lt_cv_file_magic_cmd=/usr/bin/file
 
7483
  case "$host_cpu" in
 
7484
  ia64*)
 
7485
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
7486
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
7487
    ;;
 
7488
  hppa*64*)
 
7489
    [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]']
 
7490
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
7491
    ;;
 
7492
  *)
 
7493
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
7494
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
7495
    ;;
 
7496
  esac
 
7497
  ;;
 
7498
 
 
7499
irix5* | irix6* | nonstopux*)
 
7500
  case $host_os in
 
7501
  irix5* | nonstopux*)
 
7502
    # this will be overridden with pass_all, but let us keep it just in case
 
7503
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
 
7504
    ;;
 
7505
  *)
 
7506
    case $LD in
 
7507
    *-32|*"-32 ") libmagic=32-bit;;
 
7508
    *-n32|*"-n32 ") libmagic=N32;;
 
7509
    *-64|*"-64 ") libmagic=64-bit;;
 
7510
    *) libmagic=never-match;;
 
7511
    esac
 
7512
    # this will be overridden with pass_all, but let us keep it just in case
 
7513
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
 
7514
    ;;
 
7515
  esac
 
7516
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
 
7517
  lt_cv_deplibs_check_method=pass_all
 
7518
  ;;
 
7519
 
 
7520
# This must be Linux ELF.
 
7521
linux*)
 
7522
  case $host_cpu in
 
7523
  alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
 
7524
    lt_cv_deplibs_check_method=pass_all ;;
 
7525
  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
 
7526
  arm* )
 
7527
    lt_cv_deplibs_check_method=pass_all ;;
 
7528
  *)
 
7529
    # glibc up to 2.1.1 does not perform some relocations on ARM
 
7530
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
 
7531
  esac
 
7532
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
 
7533
  ;;
 
7534
 
 
7535
netbsd*)
 
7536
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
7537
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
7538
  else
 
7539
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
7540
  fi
 
7541
  ;;
 
7542
 
 
7543
newos6*)
 
7544
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
7545
  lt_cv_file_magic_cmd=/usr/bin/file
 
7546
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
7547
  ;;
 
7548
 
 
7549
nto-qnx*)
 
7550
  lt_cv_deplibs_check_method=unknown
 
7551
  ;;
 
7552
 
 
7553
openbsd*)
 
7554
  lt_cv_file_magic_cmd=/usr/bin/file
 
7555
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
7556
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
7557
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
 
7558
  else
 
7559
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
 
7560
  fi
 
7561
  ;;
 
7562
 
 
7563
osf3* | osf4* | osf5*)
 
7564
  # this will be overridden with pass_all, but let us keep it just in case
 
7565
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
 
7566
  lt_cv_file_magic_test_file=/shlib/libc.so
 
7567
  lt_cv_deplibs_check_method=pass_all
 
7568
  ;;
 
7569
 
 
7570
sco3.2v5*)
 
7571
  lt_cv_deplibs_check_method=pass_all
 
7572
  ;;
 
7573
 
 
7574
solaris*)
 
7575
  lt_cv_deplibs_check_method=pass_all
 
7576
  lt_cv_file_magic_test_file=/lib/libc.so
 
7577
  ;;
 
7578
 
 
7579
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
7580
  case $host_vendor in
 
7581
  motorola)
 
7582
    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]]'
 
7583
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
7584
    ;;
 
7585
  ncr)
 
7586
    lt_cv_deplibs_check_method=pass_all
 
7587
    ;;
 
7588
  sequent)
 
7589
    lt_cv_file_magic_cmd='/bin/file'
 
7590
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
7591
    ;;
 
7592
  sni)
 
7593
    lt_cv_file_magic_cmd='/bin/file'
 
7594
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
7595
    lt_cv_file_magic_test_file=/lib/libc.so
 
7596
    ;;
 
7597
  siemens)
 
7598
    lt_cv_deplibs_check_method=pass_all
 
7599
    ;;
 
7600
  esac
 
7601
  ;;
 
7602
 
 
7603
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
7604
  lt_cv_deplibs_check_method=pass_all
 
7605
  ;;
 
7606
esac
 
7607
])
 
7608
file_magic_cmd=$lt_cv_file_magic_cmd
 
7609
deplibs_check_method=$lt_cv_deplibs_check_method
 
7610
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
7611
])# AC_DEPLIBS_CHECK_METHOD
 
7612
 
 
7613
 
 
7614
# AC_PROG_NM
 
7615
# ----------
 
7616
# find the pathname to a BSD-compatible name lister
 
7617
AC_DEFUN([AC_PROG_NM],
 
7618
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
 
7619
[if test -n "$NM"; then
 
7620
  # Let the user override the test.
 
7621
  lt_cv_path_NM="$NM"
 
7622
else
 
7623
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
7624
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
7625
    IFS="$lt_save_ifs"
 
7626
    test -z "$ac_dir" && ac_dir=.
 
7627
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
 
7628
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
7629
      # Check to see if the nm accepts a BSD-compat flag.
 
7630
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
7631
      #   nm: unknown option "B" ignored
 
7632
      # Tru64's nm complains that /dev/null is an invalid object file
 
7633
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
7634
      */dev/null* | *'Invalid file or object type'*)
 
7635
        lt_cv_path_NM="$tmp_nm -B"
 
7636
        break
 
7637
        ;;
 
7638
      *)
 
7639
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
7640
        */dev/null*)
 
7641
          lt_cv_path_NM="$tmp_nm -p"
 
7642
          break
 
7643
          ;;
 
7644
        *)
 
7645
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
7646
          continue # so that we can try to find one that supports BSD flags
 
7647
          ;;
 
7648
        esac
 
7649
      esac
 
7650
    fi
 
7651
  done
 
7652
  IFS="$lt_save_ifs"
 
7653
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
7654
fi])
 
7655
NM="$lt_cv_path_NM"
 
7656
])# AC_PROG_NM
 
7657
 
 
7658
 
 
7659
# AC_CHECK_LIBM
 
7660
# -------------
 
7661
# check for math library
 
7662
AC_DEFUN([AC_CHECK_LIBM],
 
7663
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
7664
LIBM=
 
7665
case $host in
 
7666
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
7667
  # These system don't have libm, or don't need it
 
7668
  ;;
 
7669
*-ncr-sysv4.3*)
 
7670
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
7671
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
7672
  ;;
 
7673
*)
 
7674
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
7675
  ;;
 
7676
esac
 
7677
])# AC_CHECK_LIBM
 
7678
 
 
7679
 
 
7680
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
7681
# -----------------------------------
 
7682
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
7683
# LTDLINCL to the include flags for the libltdl header and adds
 
7684
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
 
7685
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
7686
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
 
7687
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
 
7688
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
7689
# flat and you're not using automake, define top_builddir and
 
7690
# top_srcdir appropriately in the Makefiles.
 
7691
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
7692
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7693
  case $enable_ltdl_convenience in
 
7694
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 
7695
  "") enable_ltdl_convenience=yes
 
7696
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 
7697
  esac
 
7698
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 
7699
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
7700
  # For backwards non-gettext consistent compatibility...
 
7701
  INCLTDL="$LTDLINCL"
 
7702
])# AC_LIBLTDL_CONVENIENCE
 
7703
 
 
7704
 
 
7705
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
7706
# -----------------------------------
 
7707
# sets LIBLTDL to the link flags for the libltdl installable library and
 
7708
# LTDLINCL to the include flags for the libltdl header and adds
 
7709
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
 
7710
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
7711
# DIRECTORY is not provided and an installed libltdl is not found, it is
 
7712
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
 
7713
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
 
7714
# quotes!).  If your package is not flat and you're not using automake,
 
7715
# define top_builddir and top_srcdir appropriately in the Makefiles.
 
7716
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 
7717
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
7718
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7719
  AC_CHECK_LIB(ltdl, lt_dlinit,
 
7720
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 
7721
  [if test x"$enable_ltdl_install" = xno; then
 
7722
     AC_MSG_WARN([libltdl not installed, but installation disabled])
 
7723
   else
 
7724
     enable_ltdl_install=yes
 
7725
   fi
 
7726
  ])
 
7727
  if test x"$enable_ltdl_install" = x"yes"; then
 
7728
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
 
7729
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 
7730
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
7731
  else
 
7732
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
7733
    LIBLTDL="-lltdl"
 
7734
    LTDLINCL=
 
7735
  fi
 
7736
  # For backwards non-gettext consistent compatibility...
 
7737
  INCLTDL="$LTDLINCL"
 
7738
])# AC_LIBLTDL_INSTALLABLE
 
7739
 
 
7740
 
 
7741
# AC_LIBTOOL_CXX
 
7742
# --------------
 
7743
# enable support for C++ libraries
 
7744
AC_DEFUN([AC_LIBTOOL_CXX],
 
7745
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
7746
])# AC_LIBTOOL_CXX
 
7747
 
 
7748
 
 
7749
# _LT_AC_LANG_CXX
 
7750
# ---------------
 
7751
AC_DEFUN([_LT_AC_LANG_CXX],
 
7752
[AC_REQUIRE([AC_PROG_CXX])
 
7753
AC_REQUIRE([AC_PROG_CXXCPP])
 
7754
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
 
7755
])# _LT_AC_LANG_CXX
 
7756
 
 
7757
 
 
7758
# AC_LIBTOOL_F77
 
7759
# --------------
 
7760
# enable support for Fortran 77 libraries
 
7761
AC_DEFUN([AC_LIBTOOL_F77],
 
7762
[AC_REQUIRE([_LT_AC_LANG_F77])
 
7763
])# AC_LIBTOOL_F77
 
7764
 
 
7765
 
 
7766
# _LT_AC_LANG_F77
 
7767
# ---------------
 
7768
AC_DEFUN([_LT_AC_LANG_F77],
 
7769
[AC_REQUIRE([AC_PROG_F77])
 
7770
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
 
7771
])# _LT_AC_LANG_F77
 
7772
 
 
7773
 
 
7774
# AC_LIBTOOL_GCJ
 
7775
# --------------
 
7776
# enable support for GCJ libraries
 
7777
AC_DEFUN([AC_LIBTOOL_GCJ],
 
7778
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
7779
])# AC_LIBTOOL_GCJ
 
7780
 
 
7781
 
 
7782
# _LT_AC_LANG_GCJ
 
7783
# ---------------
 
7784
AC_DEFUN([_LT_AC_LANG_GCJ],
 
7785
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
7786
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
 
7787
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
 
7788
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
 
7789
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
7790
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
7791
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
 
7792
])# _LT_AC_LANG_GCJ
 
7793
 
 
7794
 
 
7795
# AC_LIBTOOL_RC
 
7796
# --------------
 
7797
# enable support for Windows resource files
 
7798
AC_DEFUN([AC_LIBTOOL_RC],
 
7799
[AC_REQUIRE([LT_AC_PROG_RC])
 
7800
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
 
7801
])# AC_LIBTOOL_RC
 
7802
 
 
7803
 
 
7804
# AC_LIBTOOL_LANG_C_CONFIG
 
7805
# ------------------------
 
7806
# Ensure that the configuration vars for the C compiler are
 
7807
# suitably defined.  Those variables are subsequently used by
 
7808
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
7809
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
7810
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
7811
[lt_save_CC="$CC"
 
7812
AC_LANG_PUSH(C)
 
7813
 
 
7814
# Source file extension for C test sources.
 
7815
ac_ext=c
 
7816
 
 
7817
# Object file extension for compiled C test sources.
 
7818
objext=o
 
7819
_LT_AC_TAGVAR(objext, $1)=$objext
 
7820
 
 
7821
# Code to be used in simple compile tests
 
7822
lt_simple_compile_test_code="int some_variable = 0;\n"
 
7823
 
 
7824
# Code to be used in simple link tests
 
7825
lt_simple_link_test_code='int main(){return(0);}\n'
 
7826
 
 
7827
_LT_AC_SYS_COMPILER
 
7828
 
 
7829
#
 
7830
# Check for any special shared library compilation flags.
 
7831
#
 
7832
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
 
7833
if test "$GCC" = no; then
 
7834
  case $host_os in
 
7835
  sco3.2v5*)
 
7836
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
 
7837
    ;;
 
7838
  esac
 
7839
fi
 
7840
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
 
7841
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
 
7842
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
 
7843
  else
 
7844
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
 
7845
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
 
7846
  fi
 
7847
fi
 
7848
 
 
7849
 
 
7850
#
 
7851
# Check to make sure the static flag actually works.
 
7852
#
 
7853
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
 
7854
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
7855
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
 
7856
  [],
 
7857
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
7858
 
 
7859
 
 
7860
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
7861
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
7862
AC_LIBTOOL_PROG_CC_C_O($1)
 
7863
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
7864
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
7865
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
7866
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
7867
AC_LIBTOOL_SYS_LIB_STRIP
 
7868
AC_LIBTOOL_DLOPEN_SELF($1)
 
7869
 
 
7870
# Report which librarie types wil actually be built
 
7871
AC_MSG_CHECKING([if libtool supports shared libraries])
 
7872
AC_MSG_RESULT([$can_build_shared])
 
7873
 
 
7874
AC_MSG_CHECKING([whether to build shared libraries])
 
7875
test "$can_build_shared" = "no" && enable_shared=no
 
7876
 
 
7877
# On AIX, shared libraries and static libraries use the same namespace, and
 
7878
# are all built from PIC.
 
7879
case "$host_os" in
 
7880
aix3*)
 
7881
  test "$enable_shared" = yes && enable_static=no
 
7882
  if test -n "$RANLIB"; then
 
7883
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
7884
    postinstall_cmds='$RANLIB $lib'
 
7885
  fi
 
7886
  ;;
 
7887
 
 
7888
aix4*)
 
7889
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
7890
    test "$enable_shared" = yes && enable_static=no
 
7891
  fi
 
7892
  ;;
 
7893
  darwin* | rhapsody*)
 
7894
  if test "$GCC" = yes; then
 
7895
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
7896
    case "$host_os" in
 
7897
    rhapsody* | darwin1.[[012]])
 
7898
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
7899
      ;;
 
7900
    *) # Darwin 1.3 on
 
7901
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
7902
      ;;
 
7903
    esac
 
7904
    output_verbose_link_cmd='echo'
 
7905
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
 
7906
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
7907
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
7908
    _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}'
 
7909
    _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}'
 
7910
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7911
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
7912
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
7913
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
7914
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
7915
  else
 
7916
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7917
  fi  
 
7918
    ;;  
 
7919
esac
 
7920
AC_MSG_RESULT([$enable_shared])
 
7921
 
 
7922
AC_MSG_CHECKING([whether to build static libraries])
 
7923
# Make sure either enable_shared or enable_static is yes.
 
7924
test "$enable_shared" = yes || enable_static=yes
 
7925
AC_MSG_RESULT([$enable_static])
 
7926
 
 
7927
AC_LIBTOOL_CONFIG($1)
 
7928
 
 
7929
AC_LANG_POP
 
7930
CC="$lt_save_CC"
 
7931
])# AC_LIBTOOL_LANG_C_CONFIG
 
7932
 
 
7933
 
 
7934
# AC_LIBTOOL_LANG_CXX_CONFIG
 
7935
# --------------------------
 
7936
# Ensure that the configuration vars for the C compiler are
 
7937
# suitably defined.  Those variables are subsequently used by
 
7938
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
7939
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
7940
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
7941
[AC_LANG_PUSH(C++)
 
7942
AC_REQUIRE([AC_PROG_CXX])
 
7943
AC_REQUIRE([AC_PROG_CXXCPP])
 
7944
 
 
7945
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
7946
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
7947
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
7948
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
7949
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
7950
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7951
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7952
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
7953
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
7954
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
7955
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
7956
_LT_AC_TAGVAR(module_cmds, $1)=
 
7957
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
7958
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
7959
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7960
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
7961
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
7962
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
7963
 
 
7964
# Dependencies to place before and after the object being linked:
 
7965
_LT_AC_TAGVAR(predep_objects, $1)=
 
7966
_LT_AC_TAGVAR(postdep_objects, $1)=
 
7967
_LT_AC_TAGVAR(predeps, $1)=
 
7968
_LT_AC_TAGVAR(postdeps, $1)=
 
7969
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
7970
 
 
7971
# Source file extension for C++ test sources.
 
7972
ac_ext=cc
 
7973
 
 
7974
# Object file extension for compiled C++ test sources.
 
7975
objext=o
 
7976
_LT_AC_TAGVAR(objext, $1)=$objext
 
7977
 
 
7978
# Code to be used in simple compile tests
 
7979
lt_simple_compile_test_code="int some_variable = 0;\n"
 
7980
 
 
7981
# Code to be used in simple link tests
 
7982
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
 
7983
 
 
7984
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7985
_LT_AC_SYS_COMPILER
 
7986
 
 
7987
# Allow CC to be a program name with arguments.
 
7988
lt_save_CC=$CC
 
7989
lt_save_LD=$LD
 
7990
lt_save_GCC=$GCC
 
7991
GCC=$GXX
 
7992
lt_save_with_gnu_ld=$with_gnu_ld
 
7993
lt_save_path_LD=$lt_cv_path_LD
 
7994
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
7995
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
7996
else
 
7997
  unset lt_cv_prog_gnu_ld
 
7998
fi
 
7999
if test -n "${lt_cv_path_LDCXX+set}"; then
 
8000
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
8001
else
 
8002
  unset lt_cv_path_LD
 
8003
fi
 
8004
test -z "${LDCXX+set}" || LD=$LDCXX
 
8005
CC=${CXX-"c++"}
 
8006
compiler=$CC
 
8007
_LT_AC_TAGVAR(compiler, $1)=$CC
 
8008
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
8009
 
 
8010
# We don't want -fno-exception wen compiling C++ code, so set the
 
8011
# no_builtin_flag separately
 
8012
if test "$GXX" = yes; then
 
8013
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
8014
else
 
8015
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
8016
fi
 
8017
 
 
8018
if test "$GXX" = yes; then
 
8019
  # Set up default GNU C++ configuration
 
8020
 
 
8021
  AC_PROG_LD
 
8022
 
 
8023
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
8024
  # archiving commands below assume that GNU ld is being used.
 
8025
  if test "$with_gnu_ld" = yes; then
 
8026
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8027
    _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'
 
8028
 
 
8029
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
8030
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
8031
 
 
8032
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
8033
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
8034
    #     investigate it a little bit more. (MM)
 
8035
    wlarc='${wl}'
 
8036
 
 
8037
    # ancient GNU ld didn't support --whole-archive et. al.
 
8038
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
8039
        grep 'no-whole-archive' > /dev/null; then
 
8040
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
8041
    else
 
8042
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
8043
    fi
 
8044
  else
 
8045
    with_gnu_ld=no
 
8046
    wlarc=
 
8047
 
 
8048
    # A generic and very simple default shared library creation
 
8049
    # command for GNU C++ for the case where it uses the native
 
8050
    # linker, instead of GNU ld.  If possible, this setting should
 
8051
    # overridden to take advantage of the native linker features on
 
8052
    # the platform it is being used on.
 
8053
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
8054
  fi
 
8055
 
 
8056
  # Commands to make compiler produce verbose output that lists
 
8057
  # what "hidden" libraries, object files and flags are used when
 
8058
  # linking a shared library.
 
8059
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
8060
 
 
8061
else
 
8062
  GXX=no
 
8063
  with_gnu_ld=no
 
8064
  wlarc=
 
8065
fi
 
8066
 
 
8067
# PORTME: fill in a description of your system's C++ link characteristics
 
8068
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
8069
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
8070
case $host_os in
 
8071
  aix3*)
 
8072
    # FIXME: insert proper C++ library support
 
8073
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8074
    ;;
 
8075
  aix4* | aix5*)
 
8076
    if test "$host_cpu" = ia64; then
 
8077
      # On IA64, the linker does run time linking by default, so we don't
 
8078
      # have to do anything special.
 
8079
      aix_use_runtimelinking=no
 
8080
      exp_sym_flag='-Bexport'
 
8081
      no_entry_flag=""
 
8082
    else
 
8083
      # KDE requires run time linking.  Make it the default.
 
8084
      aix_use_runtimelinking=yes
 
8085
      exp_sym_flag='-bexport'
 
8086
      no_entry_flag='-bnoentry'
 
8087
    fi
 
8088
 
 
8089
    # When large executables or shared objects are built, AIX ld can
 
8090
    # have problems creating the table of contents.  If linking a library
 
8091
    # or program results in "error TOC overflow" add -mminimal-toc to
 
8092
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
8093
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
8094
 
 
8095
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
8096
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8097
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
8098
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8099
 
 
8100
    if test "$GXX" = yes; then
 
8101
      case $host_os in aix4.[012]|aix4.[012].*)
 
8102
      # We only want to do this on AIX 4.2 and lower, the check
 
8103
      # below for broken collect2 doesn't work under 4.3+
 
8104
        collect2name=`${CC} -print-prog-name=collect2`
 
8105
        if test -f "$collect2name" && \
 
8106
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
8107
        then
 
8108
          # We have reworked collect2
 
8109
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8110
        else
 
8111
          # We have old collect2
 
8112
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
8113
          # It fails to find uninstalled libraries when the uninstalled
 
8114
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
8115
          # to unsupported forces relinking
 
8116
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
8117
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
8118
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
8119
        fi
 
8120
      esac
 
8121
      shared_flag='-shared'
 
8122
    else
 
8123
      # not using gcc
 
8124
      if test "$host_cpu" = ia64; then
 
8125
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
8126
        # chokes on -Wl,-G. The following line is correct:
 
8127
        shared_flag='-G'
 
8128
      else
 
8129
        if test "$aix_use_runtimelinking" = yes; then
 
8130
          shared_flag='-qmkshrobj ${wl}-G'
 
8131
        else
 
8132
          shared_flag='-qmkshrobj'
 
8133
        fi
 
8134
      fi
 
8135
    fi
 
8136
 
 
8137
    # Let the compiler handle the export list.
 
8138
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
8139
    if test "$aix_use_runtimelinking" = yes; then
 
8140
      # Warning - without using the other runtime loading flags (-brtl),
 
8141
      # -berok will link without error, but may produce a broken library.
 
8142
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
8143
      # Determine the default libpath from the value encoded in an empty executable.
 
8144
      _LT_AC_SYS_LIBPATH_AIX
 
8145
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
8146
 
 
8147
      _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"
 
8148
      _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"
 
8149
     else
 
8150
      if test "$host_cpu" = ia64; then
 
8151
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
8152
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
8153
        _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"
 
8154
      else
 
8155
        # Determine the default libpath from the value encoded in an empty executable.
 
8156
        _LT_AC_SYS_LIBPATH_AIX
 
8157
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
8158
        # Warning - without using the other run time loading flags,
 
8159
        # -berok will link without error, but may produce a broken library.
 
8160
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
8161
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
8162
        # -bexpall does not export symbols beginning with underscore (_)
 
8163
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
8164
        # Exported symbols can be pulled into shared objects from archives
 
8165
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
8166
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
8167
        # This is similar to how AIX traditionally builds it's shared libraries.
 
8168
        _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'
 
8169
      fi
 
8170
    fi
 
8171
    ;;
 
8172
  chorus*)
 
8173
    case $cc_basename in
 
8174
      *)
 
8175
        # FIXME: insert proper C++ library support
 
8176
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8177
        ;;
 
8178
    esac
 
8179
    ;;
 
8180
 
 
8181
  cygwin* | mingw* | pw32*)
 
8182
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
8183
    # as there is no search path for DLLs.
 
8184
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
8185
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
8186
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
8187
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
8188
 
 
8189
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
8190
      _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'
 
8191
      # If the export-symbols file already is a .def file (1st line
 
8192
      # is EXPORTS), use it as is; otherwise, prepend...
 
8193
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
8194
        cp $export_symbols $output_objdir/$soname.def;
 
8195
      else
 
8196
        echo EXPORTS > $output_objdir/$soname.def;
 
8197
        cat $export_symbols >> $output_objdir/$soname.def;
 
8198
      fi~
 
8199
      $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'
 
8200
    else
 
8201
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8202
    fi
 
8203
  ;;
 
8204
 
 
8205
  darwin* | rhapsody*)
 
8206
  if test "$GXX" = yes; then
 
8207
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8208
    case "$host_os" in
 
8209
    rhapsody* | darwin1.[[012]])
 
8210
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
8211
      ;;
 
8212
    *) # Darwin 1.3 on
 
8213
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
8214
      ;;
 
8215
    esac
 
8216
    lt_int_apple_cc_single_mod=no
 
8217
    output_verbose_link_cmd='echo'
 
8218
    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
 
8219
      lt_int_apple_cc_single_mod=yes
 
8220
    fi
 
8221
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
8222
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
8223
    else
 
8224
      _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'
 
8225
    fi
 
8226
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
8227
 
 
8228
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
8229
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
8230
      _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}'
 
8231
    else
 
8232
      _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}'
 
8233
    fi
 
8234
    _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}'
 
8235
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8236
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
8237
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
8238
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
8239
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8240
  else
 
8241
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8242
  fi
 
8243
    ;;
 
8244
 
 
8245
  dgux*)
 
8246
    case $cc_basename in
 
8247
      ec++)
 
8248
        # FIXME: insert proper C++ library support
 
8249
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8250
        ;;
 
8251
      ghcx)
 
8252
        # Green Hills C++ Compiler
 
8253
        # FIXME: insert proper C++ library support
 
8254
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8255
        ;;
 
8256
      *)
 
8257
        # FIXME: insert proper C++ library support
 
8258
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8259
        ;;
 
8260
    esac
 
8261
    ;;
 
8262
  freebsd[12]*)
 
8263
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
8264
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8265
    ;;
 
8266
  freebsd-elf*)
 
8267
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8268
    ;;
 
8269
  freebsd*)
 
8270
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
8271
    # conventions
 
8272
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
8273
    ;;
 
8274
  gnu*)
 
8275
    ;;
 
8276
  hpux9*)
 
8277
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
8278
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8279
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
8280
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8281
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
8282
                                # but as the default
 
8283
                                # location of the library.
 
8284
 
 
8285
    case $cc_basename in
 
8286
    CC)
 
8287
      # FIXME: insert proper C++ library support
 
8288
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8289
      ;;
 
8290
    aCC)
 
8291
      _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'
 
8292
      # Commands to make compiler produce verbose output that lists
 
8293
      # what "hidden" libraries, object files and flags are used when
 
8294
      # linking a shared library.
 
8295
      #
 
8296
      # There doesn't appear to be a way to prevent this compiler from
 
8297
      # explicitly linking system object files so we need to strip them
 
8298
      # from the output so that they don't get included in the library
 
8299
      # dependencies.
 
8300
      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'
 
8301
      ;;
 
8302
    *)
 
8303
      if test "$GXX" = yes; then
 
8304
        _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'
 
8305
      else
 
8306
        # FIXME: insert proper C++ library support
 
8307
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8308
      fi
 
8309
      ;;
 
8310
    esac
 
8311
    ;;
 
8312
  hpux10*|hpux11*)
 
8313
    if test $with_gnu_ld = no; then
 
8314
      case "$host_cpu" in
 
8315
      hppa*64*)
 
8316
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
8317
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
8318
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8319
        ;;
 
8320
      ia64*)
 
8321
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
8322
        ;;
 
8323
      *)
 
8324
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
8325
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8326
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
8327
        ;;
 
8328
      esac
 
8329
    fi
 
8330
    case "$host_cpu" in
 
8331
    hppa*64*)
 
8332
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8333
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8334
      ;;
 
8335
    ia64*)
 
8336
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8337
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8338
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
8339
                                              # but as the default
 
8340
                                              # location of the library.
 
8341
      ;;
 
8342
    *)
 
8343
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8344
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
8345
                                              # but as the default
 
8346
                                              # location of the library.
 
8347
      ;;
 
8348
    esac
 
8349
 
 
8350
    case $cc_basename in
 
8351
      CC)
 
8352
        # FIXME: insert proper C++ library support
 
8353
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8354
        ;;
 
8355
      aCC)
 
8356
        case "$host_cpu" in
 
8357
        hppa*64*|ia64*)
 
8358
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
8359
          ;;
 
8360
        *)
 
8361
          _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'
 
8362
          ;;
 
8363
        esac
 
8364
        # Commands to make compiler produce verbose output that lists
 
8365
        # what "hidden" libraries, object files and flags are used when
 
8366
        # linking a shared library.
 
8367
        #
 
8368
        # There doesn't appear to be a way to prevent this compiler from
 
8369
        # explicitly linking system object files so we need to strip them
 
8370
        # from the output so that they don't get included in the library
 
8371
        # dependencies.
 
8372
        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'
 
8373
        ;;
 
8374
      *)
 
8375
        if test "$GXX" = yes; then
 
8376
          if test $with_gnu_ld = no; then
 
8377
            case "$host_cpu" in
 
8378
            ia64*|hppa*64*)
 
8379
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
8380
              ;;
 
8381
            *)
 
8382
              _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'
 
8383
              ;;
 
8384
            esac
 
8385
          fi
 
8386
        else
 
8387
          # FIXME: insert proper C++ library support
 
8388
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8389
        fi
 
8390
        ;;
 
8391
    esac
 
8392
    ;;
 
8393
  irix5* | irix6*)
 
8394
    case $cc_basename in
 
8395
      CC)
 
8396
        # SGI C++
 
8397
        _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'
 
8398
 
 
8399
        # Archives containing C++ object files must be created using
 
8400
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
8401
        # necessary to make sure instantiated templates are included
 
8402
        # in the archive.
 
8403
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
8404
        ;;
 
8405
      *)
 
8406
        if test "$GXX" = yes; then
 
8407
          if test "$with_gnu_ld" = no; then
 
8408
            _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'
 
8409
          else
 
8410
            _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'
 
8411
          fi
 
8412
        fi
 
8413
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8414
        ;;
 
8415
    esac
 
8416
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8417
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8418
    ;;
 
8419
  linux*)
 
8420
    case $cc_basename in
 
8421
      KCC)
 
8422
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8423
 
 
8424
        # KCC will only create a shared library if the output file
 
8425
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8426
        # to its proper name (with version) after linking.
 
8427
        _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'
 
8428
        _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'
 
8429
        # Commands to make compiler produce verbose output that lists
 
8430
        # what "hidden" libraries, object files and flags are used when
 
8431
        # linking a shared library.
 
8432
        #
 
8433
        # There doesn't appear to be a way to prevent this compiler from
 
8434
        # explicitly linking system object files so we need to strip them
 
8435
        # from the output so that they don't get included in the library
 
8436
        # dependencies.
 
8437
        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'
 
8438
 
 
8439
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
8440
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
8441
 
 
8442
        # Archives containing C++ object files must be created using
 
8443
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
8444
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
8445
        ;;
 
8446
      icpc)
 
8447
        # Intel C++
 
8448
        with_gnu_ld=yes
 
8449
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8450
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8451
        _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'
 
8452
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8453
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
8454
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
8455
        ;;
 
8456
      cxx)
 
8457
        # Compaq C++
 
8458
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8459
        _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'
 
8460
 
 
8461
        runpath_var=LD_RUN_PATH
 
8462
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8463
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8464
 
 
8465
        # Commands to make compiler produce verbose output that lists
 
8466
        # what "hidden" libraries, object files and flags are used when
 
8467
        # linking a shared library.
 
8468
        #
 
8469
        # There doesn't appear to be a way to prevent this compiler from
 
8470
        # explicitly linking system object files so we need to strip them
 
8471
        # from the output so that they don't get included in the library
 
8472
        # dependencies.
 
8473
        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'
 
8474
        ;;
 
8475
    esac
 
8476
    ;;
 
8477
  lynxos*)
 
8478
    # FIXME: insert proper C++ library support
 
8479
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8480
    ;;
 
8481
  m88k*)
 
8482
    # FIXME: insert proper C++ library support
 
8483
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8484
    ;;
 
8485
  mvs*)
 
8486
    case $cc_basename in
 
8487
      cxx)
 
8488
        # FIXME: insert proper C++ library support
 
8489
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8490
        ;;
 
8491
      *)
 
8492
        # FIXME: insert proper C++ library support
 
8493
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8494
        ;;
 
8495
    esac
 
8496
    ;;
 
8497
  netbsd*)
 
8498
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
8499
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
8500
      wlarc=
 
8501
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
8502
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8503
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8504
    fi
 
8505
    # Workaround some broken pre-1.5 toolchains
 
8506
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
8507
    ;;
 
8508
  osf3*)
 
8509
    case $cc_basename in
 
8510
      KCC)
 
8511
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8512
 
 
8513
        # KCC will only create a shared library if the output file
 
8514
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8515
        # to its proper name (with version) after linking.
 
8516
        _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'
 
8517
 
 
8518
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8519
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8520
 
 
8521
        # Archives containing C++ object files must be created using
 
8522
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
8523
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
8524
 
 
8525
        ;;
 
8526
      RCC)
 
8527
        # Rational C++ 2.4.1
 
8528
        # FIXME: insert proper C++ library support
 
8529
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8530
        ;;
 
8531
      cxx)
 
8532
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8533
        _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'
 
8534
 
 
8535
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8536
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8537
 
 
8538
        # Commands to make compiler produce verbose output that lists
 
8539
        # what "hidden" libraries, object files and flags are used when
 
8540
        # linking a shared library.
 
8541
        #
 
8542
        # There doesn't appear to be a way to prevent this compiler from
 
8543
        # explicitly linking system object files so we need to strip them
 
8544
        # from the output so that they don't get included in the library
 
8545
        # dependencies.
 
8546
        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'
 
8547
        ;;
 
8548
      *)
 
8549
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8550
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8551
          _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'
 
8552
 
 
8553
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8554
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8555
 
 
8556
          # Commands to make compiler produce verbose output that lists
 
8557
          # what "hidden" libraries, object files and flags are used when
 
8558
          # linking a shared library.
 
8559
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
8560
 
 
8561
        else
 
8562
          # FIXME: insert proper C++ library support
 
8563
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8564
        fi
 
8565
        ;;
 
8566
    esac
 
8567
    ;;
 
8568
  osf4* | osf5*)
 
8569
    case $cc_basename in
 
8570
      KCC)
 
8571
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8572
 
 
8573
        # KCC will only create a shared library if the output file
 
8574
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8575
        # to its proper name (with version) after linking.
 
8576
        _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'
 
8577
 
 
8578
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8579
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8580
 
 
8581
        # Archives containing C++ object files must be created using
 
8582
        # the KAI C++ compiler.
 
8583
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
8584
        ;;
 
8585
      RCC)
 
8586
        # Rational C++ 2.4.1
 
8587
        # FIXME: insert proper C++ library support
 
8588
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8589
        ;;
 
8590
      cxx)
 
8591
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
8592
        _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'
 
8593
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
8594
          echo "-hidden">> $lib.exp~
 
8595
          $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~
 
8596
          $rm $lib.exp'
 
8597
 
 
8598
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8599
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8600
 
 
8601
        # Commands to make compiler produce verbose output that lists
 
8602
        # what "hidden" libraries, object files and flags are used when
 
8603
        # linking a shared library.
 
8604
        #
 
8605
        # There doesn't appear to be a way to prevent this compiler from
 
8606
        # explicitly linking system object files so we need to strip them
 
8607
        # from the output so that they don't get included in the library
 
8608
        # dependencies.
 
8609
        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'
 
8610
        ;;
 
8611
      *)
 
8612
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8613
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8614
         _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'
 
8615
 
 
8616
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8617
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8618
 
 
8619
          # Commands to make compiler produce verbose output that lists
 
8620
          # what "hidden" libraries, object files and flags are used when
 
8621
          # linking a shared library.
 
8622
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
8623
 
 
8624
        else
 
8625
          # FIXME: insert proper C++ library support
 
8626
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8627
        fi
 
8628
        ;;
 
8629
    esac
 
8630
    ;;
 
8631
  psos*)
 
8632
    # FIXME: insert proper C++ library support
 
8633
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8634
    ;;
 
8635
  sco*)
 
8636
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8637
    case $cc_basename in
 
8638
      CC)
 
8639
        # FIXME: insert proper C++ library support
 
8640
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8641
        ;;
 
8642
      *)
 
8643
        # FIXME: insert proper C++ library support
 
8644
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8645
        ;;
 
8646
    esac
 
8647
    ;;
 
8648
  sunos4*)
 
8649
    case $cc_basename in
 
8650
      CC)
 
8651
        # Sun C++ 4.x
 
8652
        # FIXME: insert proper C++ library support
 
8653
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8654
        ;;
 
8655
      lcc)
 
8656
        # Lucid
 
8657
        # FIXME: insert proper C++ library support
 
8658
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8659
        ;;
 
8660
      *)
 
8661
        # FIXME: insert proper C++ library support
 
8662
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8663
        ;;
 
8664
    esac
 
8665
    ;;
 
8666
  solaris*)
 
8667
    case $cc_basename in
 
8668
      CC)
 
8669
        # Sun C++ 4.2, 5.x and Centerline C++
 
8670
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
8671
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8672
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8673
        $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'
 
8674
 
 
8675
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
8676
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8677
        case $host_os in
 
8678
          solaris2.[0-5] | solaris2.[0-5].*) ;;
 
8679
          *)
 
8680
            # The C++ compiler is used as linker so we must use $wl
 
8681
            # flag to pass the commands to the underlying system
 
8682
            # linker.
 
8683
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
8684
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
8685
            ;;
 
8686
        esac
 
8687
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8688
 
 
8689
        # Commands to make compiler produce verbose output that lists
 
8690
        # what "hidden" libraries, object files and flags are used when
 
8691
        # linking a shared library.
 
8692
        #
 
8693
        # There doesn't appear to be a way to prevent this compiler from
 
8694
        # explicitly linking system object files so we need to strip them
 
8695
        # from the output so that they don't get included in the library
 
8696
        # dependencies.
 
8697
        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'
 
8698
 
 
8699
        # Archives containing C++ object files must be created using
 
8700
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
8701
        # necessary to make sure instantiated templates are included
 
8702
        # in the archive.
 
8703
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
8704
        ;;
 
8705
      gcx)
 
8706
        # Green Hills C++ Compiler
 
8707
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8708
 
 
8709
        # The C++ compiler must be used to create the archive.
 
8710
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
8711
        ;;
 
8712
      *)
 
8713
        # GNU C++ compiler with Solaris linker
 
8714
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8715
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
8716
          if $CC --version | grep -v '^2\.7' > /dev/null; then
 
8717
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8718
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8719
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
8720
 
 
8721
            # Commands to make compiler produce verbose output that lists
 
8722
            # what "hidden" libraries, object files and flags are used when
 
8723
            # linking a shared library.
 
8724
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
8725
          else
 
8726
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
8727
            # platform.
 
8728
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8729
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8730
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
8731
 
 
8732
            # Commands to make compiler produce verbose output that lists
 
8733
            # what "hidden" libraries, object files and flags are used when
 
8734
            # linking a shared library.
 
8735
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
8736
          fi
 
8737
 
 
8738
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
8739
        fi
 
8740
        ;;
 
8741
    esac
 
8742
    ;;
 
8743
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
 
8744
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8745
    ;;
 
8746
  tandem*)
 
8747
    case $cc_basename in
 
8748
      NCC)
 
8749
        # NonStop-UX NCC 3.20
 
8750
        # FIXME: insert proper C++ library support
 
8751
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8752
        ;;
 
8753
      *)
 
8754
        # FIXME: insert proper C++ library support
 
8755
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8756
        ;;
 
8757
    esac
 
8758
    ;;
 
8759
  vxworks*)
 
8760
    # FIXME: insert proper C++ library support
 
8761
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8762
    ;;
 
8763
  *)
 
8764
    # FIXME: insert proper C++ library support
 
8765
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8766
    ;;
 
8767
esac
 
8768
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
8769
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
8770
 
 
8771
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
8772
_LT_AC_TAGVAR(LD, $1)="$LD"
 
8773
 
 
8774
AC_LIBTOOL_POSTDEP_PREDEP($1)
 
8775
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
8776
AC_LIBTOOL_PROG_CC_C_O($1)
 
8777
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
8778
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
8779
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
8780
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
8781
AC_LIBTOOL_SYS_LIB_STRIP
 
8782
AC_LIBTOOL_DLOPEN_SELF($1)
 
8783
 
 
8784
AC_LIBTOOL_CONFIG($1)
 
8785
 
 
8786
AC_LANG_POP
 
8787
CC=$lt_save_CC
 
8788
LDCXX=$LD
 
8789
LD=$lt_save_LD
 
8790
GCC=$lt_save_GCC
 
8791
with_gnu_ldcxx=$with_gnu_ld
 
8792
with_gnu_ld=$lt_save_with_gnu_ld
 
8793
lt_cv_path_LDCXX=$lt_cv_path_LD
 
8794
lt_cv_path_LD=$lt_save_path_LD
 
8795
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
8796
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
8797
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
8798
 
 
8799
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
8800
# ------------------------
 
8801
# Figure out "hidden" library dependencies from verbose
 
8802
# compiler output when linking a shared library.
 
8803
# Parse the compiler output and extract the necessary
 
8804
# objects, libraries and library flags.
 
8805
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
8806
dnl we can't use the lt_simple_compile_test_code here,
 
8807
dnl because it contains code intended for an executable,
 
8808
dnl not a library.  It's possible we should let each
 
8809
dnl tag define a new lt_????_link_test_code variable,
 
8810
dnl but it's only used here...
 
8811
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
 
8812
int a;
 
8813
void foo (void) { a = 0; }
 
8814
EOF
 
8815
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
 
8816
class Foo
 
8817
{
 
8818
public:
 
8819
  Foo (void) { a = 0; }
 
8820
private:
 
8821
  int a;
 
8822
};
 
8823
EOF
 
8824
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
 
8825
      subroutine foo
 
8826
      implicit none
 
8827
      integer*4 a
 
8828
      a=0
 
8829
      return
 
8830
      end
 
8831
EOF
 
8832
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
 
8833
public class foo {
 
8834
  private int a;
 
8835
  public void bar (void) {
 
8836
    a = 0;
 
8837
  }
 
8838
};
 
8839
EOF
 
8840
])
 
8841
dnl Parse the compiler output and extract the necessary
 
8842
dnl objects, libraries and library flags.
 
8843
if AC_TRY_EVAL(ac_compile); then
 
8844
  # Parse the compiler output and extract the necessary
 
8845
  # objects, libraries and library flags.
 
8846
 
 
8847
  # Sentinel used to keep track of whether or not we are before
 
8848
  # the conftest object file.
 
8849
  pre_test_object_deps_done=no
 
8850
 
 
8851
  # The `*' in the case matches for architectures that use `case' in
 
8852
  # $output_verbose_cmd can trigger glob expansion during the loop
 
8853
  # eval without this substitution.
 
8854
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
8855
 
 
8856
  for p in `eval $output_verbose_link_cmd`; do
 
8857
    case $p in
 
8858
 
 
8859
    -L* | -R* | -l*)
 
8860
       # Some compilers place space between "-{L,R}" and the path.
 
8861
       # Remove the space.
 
8862
       if test $p = "-L" \
 
8863
          || test $p = "-R"; then
 
8864
         prev=$p
 
8865
         continue
 
8866
       else
 
8867
         prev=
 
8868
       fi
 
8869
 
 
8870
       if test "$pre_test_object_deps_done" = no; then
 
8871
         case $p in
 
8872
         -L* | -R*)
 
8873
           # Internal compiler library paths should come after those
 
8874
           # provided the user.  The postdeps already come after the
 
8875
           # user supplied libs so there is no need to process them.
 
8876
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
8877
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
8878
           else
 
8879
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
8880
           fi
 
8881
           ;;
 
8882
         # The "-l" case would never come before the object being
 
8883
         # linked, so don't bother handling this case.
 
8884
         esac
 
8885
       else
 
8886
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
8887
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
8888
         else
 
8889
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
8890
         fi
 
8891
       fi
 
8892
       ;;
 
8893
 
 
8894
    *.$objext|*.$libext)
 
8895
       # This assumes that the test object file only shows up
 
8896
       # once in the compiler output.
 
8897
       if test "$p" = "conftest.$objext"; then
 
8898
         pre_test_object_deps_done=yes
 
8899
         continue
 
8900
       fi
 
8901
 
 
8902
       if test "$pre_test_object_deps_done" = no; then
 
8903
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
8904
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
8905
         else
 
8906
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
8907
         fi
 
8908
       else
 
8909
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
8910
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
8911
         else
 
8912
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
8913
         fi
 
8914
       fi
 
8915
       ;;
 
8916
 
 
8917
    *) ;; # Ignore the rest.
 
8918
 
 
8919
    esac
 
8920
  done
 
8921
 
 
8922
  # Clean up.
 
8923
  rm -f a.out a.exe
 
8924
else
 
8925
  echo "libtool.m4: error: problem compiling $1 test program"
 
8926
fi
 
8927
 
 
8928
$rm -f confest.$objext
 
8929
 
 
8930
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
8931
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
8932
esac
 
8933
])# AC_LIBTOOL_POSTDEP_PREDEP
 
8934
 
 
8935
# AC_LIBTOOL_LANG_F77_CONFIG
 
8936
# ------------------------
 
8937
# Ensure that the configuration vars for the C compiler are
 
8938
# suitably defined.  Those variables are subsequently used by
 
8939
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
8940
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
 
8941
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
 
8942
[AC_REQUIRE([AC_PROG_F77])
 
8943
AC_LANG_PUSH(Fortran 77)
 
8944
 
 
8945
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8946
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
8947
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
8948
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
8949
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
8950
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8951
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
8952
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
8953
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
8954
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
8955
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
8956
_LT_AC_TAGVAR(module_cmds, $1)=
 
8957
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
8958
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
8959
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8960
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
8961
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
8962
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
8963
 
 
8964
# Source file extension for f77 test sources.
 
8965
ac_ext=f
 
8966
 
 
8967
# Object file extension for compiled f77 test sources.
 
8968
objext=o
 
8969
_LT_AC_TAGVAR(objext, $1)=$objext
 
8970
 
 
8971
# Code to be used in simple compile tests
 
8972
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
8973
 
 
8974
# Code to be used in simple link tests
 
8975
lt_simple_link_test_code="      program t\n      end\n"
 
8976
 
 
8977
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8978
_LT_AC_SYS_COMPILER
 
8979
 
 
8980
# Allow CC to be a program name with arguments.
 
8981
lt_save_CC="$CC"
 
8982
CC=${F77-"f77"}
 
8983
compiler=$CC
 
8984
_LT_AC_TAGVAR(compiler, $1)=$CC
 
8985
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
8986
 
 
8987
AC_MSG_CHECKING([if libtool supports shared libraries])
 
8988
AC_MSG_RESULT([$can_build_shared])
 
8989
 
 
8990
AC_MSG_CHECKING([whether to build shared libraries])
 
8991
test "$can_build_shared" = "no" && enable_shared=no
 
8992
 
 
8993
# On AIX, shared libraries and static libraries use the same namespace, and
 
8994
# are all built from PIC.
 
8995
case "$host_os" in
 
8996
aix3*)
 
8997
  test "$enable_shared" = yes && enable_static=no
 
8998
  if test -n "$RANLIB"; then
 
8999
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
9000
    postinstall_cmds='$RANLIB $lib'
 
9001
  fi
 
9002
  ;;
 
9003
aix4*)
 
9004
  test "$enable_shared" = yes && enable_static=no
 
9005
  ;;
 
9006
esac
 
9007
AC_MSG_RESULT([$enable_shared])
 
9008
 
 
9009
AC_MSG_CHECKING([whether to build static libraries])
 
9010
# Make sure either enable_shared or enable_static is yes.
 
9011
test "$enable_shared" = yes || enable_static=yes
 
9012
AC_MSG_RESULT([$enable_static])
 
9013
 
 
9014
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
9015
 
 
9016
_LT_AC_TAGVAR(GCC, $1)="$G77"
 
9017
_LT_AC_TAGVAR(LD, $1)="$LD"
 
9018
 
 
9019
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
9020
AC_LIBTOOL_PROG_CC_C_O($1)
 
9021
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
9022
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
9023
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
9024
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
9025
AC_LIBTOOL_SYS_LIB_STRIP
 
9026
 
 
9027
 
 
9028
AC_LIBTOOL_CONFIG($1)
 
9029
 
 
9030
AC_LANG_POP
 
9031
CC="$lt_save_CC"
 
9032
])# AC_LIBTOOL_LANG_F77_CONFIG
 
9033
 
 
9034
 
 
9035
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
9036
# --------------------------
 
9037
# Ensure that the configuration vars for the C compiler are
 
9038
# suitably defined.  Those variables are subsequently used by
 
9039
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
9040
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
9041
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
9042
[AC_LANG_SAVE
 
9043
 
 
9044
# Source file extension for Java test sources.
 
9045
ac_ext=java
 
9046
 
 
9047
# Object file extension for compiled Java test sources.
 
9048
objext=o
 
9049
_LT_AC_TAGVAR(objext, $1)=$objext
 
9050
 
 
9051
# Code to be used in simple compile tests
 
9052
lt_simple_compile_test_code="class foo {}\n"
 
9053
 
 
9054
# Code to be used in simple link tests
 
9055
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
 
9056
 
 
9057
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
9058
_LT_AC_SYS_COMPILER
 
9059
 
 
9060
# Allow CC to be a program name with arguments.
 
9061
lt_save_CC="$CC"
 
9062
CC=${GCJ-"gcj"}
 
9063
compiler=$CC
 
9064
_LT_AC_TAGVAR(compiler, $1)=$CC
 
9065
 
 
9066
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
9067
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9068
 
 
9069
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
9070
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
9071
AC_LIBTOOL_PROG_CC_C_O($1)
 
9072
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
9073
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
9074
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
9075
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
9076
AC_LIBTOOL_SYS_LIB_STRIP
 
9077
AC_LIBTOOL_DLOPEN_SELF($1)
 
9078
 
 
9079
AC_LIBTOOL_CONFIG($1)
 
9080
 
 
9081
AC_LANG_RESTORE
 
9082
CC="$lt_save_CC"
 
9083
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
9084
 
 
9085
 
 
9086
# AC_LIBTOOL_LANG_RC_CONFIG
 
9087
# --------------------------
 
9088
# Ensure that the configuration vars for the Windows resource compiler are
 
9089
# suitably defined.  Those variables are subsequently used by
 
9090
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
9091
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
9092
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
9093
[AC_LANG_SAVE
 
9094
 
 
9095
# Source file extension for RC test sources.
 
9096
ac_ext=rc
 
9097
 
 
9098
# Object file extension for compiled RC test sources.
 
9099
objext=o
 
9100
_LT_AC_TAGVAR(objext, $1)=$objext
 
9101
 
 
9102
# Code to be used in simple compile tests
 
9103
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
9104
 
 
9105
# Code to be used in simple link tests
 
9106
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
9107
 
 
9108
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
9109
_LT_AC_SYS_COMPILER
 
9110
 
 
9111
# Allow CC to be a program name with arguments.
 
9112
lt_save_CC="$CC"
 
9113
CC=${RC-"windres"}
 
9114
compiler=$CC
 
9115
_LT_AC_TAGVAR(compiler, $1)=$CC
 
9116
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
9117
 
 
9118
AC_LIBTOOL_CONFIG($1)
 
9119
 
 
9120
AC_LANG_RESTORE
 
9121
CC="$lt_save_CC"
 
9122
])# AC_LIBTOOL_LANG_RC_CONFIG
 
9123
 
 
9124
 
 
9125
# AC_LIBTOOL_CONFIG([TAGNAME])
 
9126
# ----------------------------
 
9127
# If TAGNAME is not passed, then create an initial libtool script
 
9128
# with a default configuration from the untagged config vars.  Otherwise
 
9129
# add code to config.status for appending the configuration named by
 
9130
# TAGNAME from the matching tagged config vars.
 
9131
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
9132
[# The else clause should only fire when bootstrapping the
 
9133
# libtool distribution, otherwise you forgot to ship ltmain.sh
 
9134
# with your package, and you will get complaints that there are
 
9135
# no rules to generate ltmain.sh.
 
9136
if test -f "$ltmain"; then
 
9137
  # See if we are running on zsh, and set the options which allow our commands through
 
9138
  # without removal of \ escapes.
 
9139
  if test -n "${ZSH_VERSION+set}" ; then
 
9140
    setopt NO_GLOB_SUBST
 
9141
  fi  
 
9142
  # Now quote all the things that may contain metacharacters while being
 
9143
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 
9144
  # variables and quote the copies for generation of the libtool script.
 
9145
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
 
9146
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
9147
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
9148
    deplibs_check_method reload_flag reload_cmds need_locks \
 
9149
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
9150
    lt_cv_sys_global_symbol_to_c_name_address \
 
9151
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 
9152
    old_postinstall_cmds old_postuninstall_cmds \
 
9153
    _LT_AC_TAGVAR(compiler, $1) \
 
9154
    _LT_AC_TAGVAR(CC, $1) \
 
9155
    _LT_AC_TAGVAR(LD, $1) \
 
9156
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
9157
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
9158
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
9159
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
9160
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
9161
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
9162
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
9163
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
 
9164
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
9165
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
9166
    _LT_AC_TAGVAR(predep_objects, $1) \
 
9167
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
9168
    _LT_AC_TAGVAR(predeps, $1) \
 
9169
    _LT_AC_TAGVAR(postdeps, $1) \
 
9170
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
9171
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
9172
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
9173
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
9174
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
9175
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
9176
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
9177
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
9178
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
9179
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
9180
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
 
9181
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
9182
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
 
9183
    _LT_AC_TAGVAR(module_cmds, $1) \
 
9184
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
 
9185
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
9186
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
9187
    _LT_AC_TAGVAR(include_expsyms, $1); do
 
9188
 
 
9189
    case $var in
 
9190
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
9191
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
9192
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
9193
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
9194
    _LT_AC_TAGVAR(module_cmds, $1) | \
 
9195
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
 
9196
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
9197
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
9198
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
9199
    postinstall_cmds | postuninstall_cmds | \
 
9200
    old_postinstall_cmds | old_postuninstall_cmds | \
 
9201
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
9202
      # Double-quote double-evaled strings.
 
9203
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 
9204
      ;;
 
9205
    *)
 
9206
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 
9207
      ;;
 
9208
    esac
 
9209
  done
 
9210
 
 
9211
  case $lt_echo in
 
9212
  *'\[$]0 --fallback-echo"')
 
9213
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
9214
    ;;
 
9215
  esac
 
9216
 
 
9217
ifelse([$1], [],
 
9218
  [cfgfile="${ofile}T"
 
9219
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
9220
  $rm -f "$cfgfile"
 
9221
  AC_MSG_NOTICE([creating $ofile])],
 
9222
  [cfgfile="$ofile"])
 
9223
 
 
9224
  cat <<__EOF__ >> "$cfgfile"
 
9225
ifelse([$1], [],
 
9226
[#! $SHELL
 
9227
 
 
9228
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
9229
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 
9230
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
9231
#
 
9232
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
9233
# Free Software Foundation, Inc.
 
9234
#
 
9235
# This file is part of GNU Libtool:
 
9236
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
9237
#
 
9238
# This program is free software; you can redistribute it and/or modify
 
9239
# it under the terms of the GNU General Public License as published by
 
9240
# the Free Software Foundation; either version 2 of the License, or
 
9241
# (at your option) any later version.
 
9242
#
 
9243
# This program is distributed in the hope that it will be useful, but
 
9244
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
9245
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
9246
# General Public License for more details.
 
9247
#
 
9248
# You should have received a copy of the GNU General Public License
 
9249
# along with this program; if not, write to the Free Software
 
9250
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
9251
#
 
9252
# As a special exception to the GNU General Public License, if you
 
9253
# distribute this file as part of a program that contains a
 
9254
# configuration script generated by Autoconf, you may include it under
 
9255
# the same distribution terms that you use for the rest of that program.
 
9256
 
 
9257
# A sed program that does not truncate output.
 
9258
SED=$lt_SED
 
9259
 
 
9260
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
 
9261
Xsed="$SED -e s/^X//"
 
9262
 
 
9263
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
9264
# if CDPATH is set.
 
9265
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
9266
 
 
9267
# The names of the tagged configurations supported by this script.
 
9268
available_tags=
 
9269
 
 
9270
# ### BEGIN LIBTOOL CONFIG],
 
9271
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
 
9272
 
 
9273
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
9274
 
 
9275
# Shell to use when invoking shell scripts.
 
9276
SHELL=$lt_SHELL
 
9277
 
 
9278
# Whether or not to build shared libraries.
 
9279
build_libtool_libs=$enable_shared
 
9280
 
 
9281
# Whether or not to build static libraries.
 
9282
build_old_libs=$enable_static
 
9283
 
 
9284
# Whether or not to add -lc for building shared libraries.
 
9285
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
9286
 
 
9287
# Whether or not to disallow shared libs when runtime libs are static
 
9288
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
 
9289
 
 
9290
# Whether or not to optimize for fast installation.
 
9291
fast_install=$enable_fast_install
 
9292
 
 
9293
# The host system.
 
9294
host_alias=$host_alias
 
9295
host=$host
 
9296
 
 
9297
# An echo program that does not interpret backslashes.
 
9298
echo=$lt_echo
 
9299
 
 
9300
# The archiver.
 
9301
AR=$lt_AR
 
9302
AR_FLAGS=$lt_AR_FLAGS
 
9303
 
 
9304
# A C compiler.
 
9305
LTCC=$lt_LTCC
 
9306
 
 
9307
# A language-specific compiler.
 
9308
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 
9309
 
 
9310
# Is the compiler the GNU C compiler?
 
9311
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
9312
 
 
9313
# An ERE matcher.
 
9314
EGREP=$lt_EGREP
 
9315
 
 
9316
# The linker used to build libraries.
 
9317
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
 
9318
 
 
9319
# Whether we need hard or soft links.
 
9320
LN_S=$lt_LN_S
 
9321
 
 
9322
# A BSD-compatible nm program.
 
9323
NM=$lt_NM
 
9324
 
 
9325
# A symbol stripping program
 
9326
STRIP=$STRIP
 
9327
 
 
9328
# Used to examine libraries when file_magic_cmd begins "file"
 
9329
MAGIC_CMD=$MAGIC_CMD
 
9330
 
 
9331
# Used on cygwin: DLL creation program.
 
9332
DLLTOOL="$DLLTOOL"
 
9333
 
 
9334
# Used on cygwin: object dumper.
 
9335
OBJDUMP="$OBJDUMP"
 
9336
 
 
9337
# Used on cygwin: assembler.
 
9338
AS="$AS"
 
9339
 
 
9340
# The name of the directory that contains temporary libtool files.
 
9341
objdir=$objdir
 
9342
 
 
9343
# How to create reloadable object files.
 
9344
reload_flag=$lt_reload_flag
 
9345
reload_cmds=$lt_reload_cmds
 
9346
 
 
9347
# How to pass a linker flag through the compiler.
 
9348
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
9349
 
 
9350
# Object file suffix (normally "o").
 
9351
objext="$ac_objext"
 
9352
 
 
9353
# Old archive suffix (normally "a").
 
9354
libext="$libext"
 
9355
 
 
9356
# Shared library suffix (normally ".so").
 
9357
shrext='$shrext'
 
9358
 
 
9359
# Executable file suffix (normally "").
 
9360
exeext="$exeext"
 
9361
 
 
9362
# Additional compiler flags for building library objects.
 
9363
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
 
9364
pic_mode=$pic_mode
 
9365
 
 
9366
# What is the maximum length of a command?
 
9367
max_cmd_len=$lt_cv_sys_max_cmd_len
 
9368
 
 
9369
# Does compiler simultaneously support -c and -o options?
 
9370
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
9371
 
 
9372
# Must we lock files when doing compilation ?
 
9373
need_locks=$lt_need_locks
 
9374
 
 
9375
# Do we need the lib prefix for modules?
 
9376
need_lib_prefix=$need_lib_prefix
 
9377
 
 
9378
# Do we need a version for libraries?
 
9379
need_version=$need_version
 
9380
 
 
9381
# Whether dlopen is supported.
 
9382
dlopen_support=$enable_dlopen
 
9383
 
 
9384
# Whether dlopen of programs is supported.
 
9385
dlopen_self=$enable_dlopen_self
 
9386
 
 
9387
# Whether dlopen of statically linked programs is supported.
 
9388
dlopen_self_static=$enable_dlopen_self_static
 
9389
 
 
9390
# Compiler flag to prevent dynamic linking.
 
9391
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
 
9392
 
 
9393
# Compiler flag to turn off builtin functions.
 
9394
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
 
9395
 
 
9396
# Compiler flag to allow reflexive dlopens.
 
9397
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
 
9398
 
 
9399
# Compiler flag to generate shared objects directly from archives.
 
9400
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
 
9401
 
 
9402
# Compiler flag to generate thread-safe objects.
 
9403
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
 
9404
 
 
9405
# Library versioning type.
 
9406
version_type=$version_type
 
9407
 
 
9408
# Format of library name prefix.
 
9409
libname_spec=$lt_libname_spec
 
9410
 
 
9411
# List of archive names.  First name is the real one, the rest are links.
 
9412
# The last name is the one that the linker finds with -lNAME.
 
9413
library_names_spec=$lt_library_names_spec
 
9414
 
 
9415
# The coded name of the library, if different from the real name.
 
9416
soname_spec=$lt_soname_spec
 
9417
 
 
9418
# Commands used to build and install an old-style archive.
 
9419
RANLIB=$lt_RANLIB
 
9420
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
 
9421
old_postinstall_cmds=$lt_old_postinstall_cmds
 
9422
old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
9423
 
 
9424
# Create an old-style archive from a shared archive.
 
9425
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
 
9426
 
 
9427
# Create a temporary old-style archive to link instead of a shared archive.
 
9428
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
 
9429
 
 
9430
# Commands used to build and install a shared archive.
 
9431
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
9432
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
 
9433
postinstall_cmds=$lt_postinstall_cmds
 
9434
postuninstall_cmds=$lt_postuninstall_cmds
 
9435
 
 
9436
# Commands used to build a loadable module (assumed same as above if empty)
 
9437
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
 
9438
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
9439
 
 
9440
# Commands to strip libraries.
 
9441
old_striplib=$lt_old_striplib
 
9442
striplib=$lt_striplib
 
9443
 
 
9444
# Dependencies to place before the objects being linked to create a
 
9445
# shared library.
 
9446
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
9447
 
 
9448
# Dependencies to place after the objects being linked to create a
 
9449
# shared library.
 
9450
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
9451
 
 
9452
# Dependencies to place before the objects being linked to create a
 
9453
# shared library.
 
9454
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
9455
 
 
9456
# Dependencies to place after the objects being linked to create a
 
9457
# shared library.
 
9458
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
9459
 
 
9460
# The library search path used internally by the compiler when linking
 
9461
# a shared library.
 
9462
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
9463
 
 
9464
# Method to check whether dependent libraries are shared objects.
 
9465
deplibs_check_method=$lt_deplibs_check_method
 
9466
 
 
9467
# Command to use when deplibs_check_method == file_magic.
 
9468
file_magic_cmd=$lt_file_magic_cmd
 
9469
 
 
9470
# Flag that allows shared libraries with undefined symbols to be built.
 
9471
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
9472
 
 
9473
# Flag that forces no undefined symbols.
 
9474
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
 
9475
 
 
9476
# Commands used to finish a libtool library installation in a directory.
 
9477
finish_cmds=$lt_finish_cmds
 
9478
 
 
9479
# Same as above, but a single script fragment to be evaled but not shown.
 
9480
finish_eval=$lt_finish_eval
 
9481
 
 
9482
# Take the output of nm and produce a listing of raw symbols and C names.
 
9483
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
9484
 
 
9485
# Transform the output of nm in a proper C declaration
 
9486
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
9487
 
 
9488
# Transform the output of nm in a C name address pair
 
9489
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
9490
 
 
9491
# This is the shared library runtime path variable.
 
9492
runpath_var=$runpath_var
 
9493
 
 
9494
# This is the shared library path variable.
 
9495
shlibpath_var=$shlibpath_var
 
9496
 
 
9497
# Is shlibpath searched before the hard-coded library search path?
 
9498
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
9499
 
 
9500
# How to hardcode a shared library path into an executable.
 
9501
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
 
9502
 
 
9503
# Whether we should hardcode library paths into libraries.
 
9504
hardcode_into_libs=$hardcode_into_libs
 
9505
 
 
9506
# Flag to hardcode \$libdir into a binary during linking.
 
9507
# This must work even if \$libdir does not exist.
 
9508
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
9509
 
 
9510
# If ld is used when linking, flag to hardcode \$libdir into
 
9511
# a binary during linking. This must work even if \$libdir does
 
9512
# not exist.
 
9513
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
 
9514
 
 
9515
# Whether we need a single -rpath flag with a separated argument.
 
9516
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
 
9517
 
 
9518
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 
9519
# resulting binary.
 
9520
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
 
9521
 
 
9522
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 
9523
# resulting binary.
 
9524
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
 
9525
 
 
9526
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 
9527
# the resulting binary.
 
9528
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
9529
 
 
9530
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
9531
# and all subsequent libraries and executables linked against it.
 
9532
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
 
9533
 
 
9534
# Variables whose values should be saved in libtool wrapper scripts and
 
9535
# restored at relink time.
 
9536
variables_saved_for_relink="$variables_saved_for_relink"
 
9537
 
 
9538
# Whether libtool must link a program against all its dependency libraries.
 
9539
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
 
9540
 
 
9541
# Compile-time system search path for libraries
 
9542
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
9543
 
 
9544
# Run-time system search path for libraries
 
9545
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
9546
 
 
9547
# Fix the shell variable \$srcfile for the compiler.
 
9548
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
 
9549
 
 
9550
# Set to yes if exported symbols are required.
 
9551
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
 
9552
 
 
9553
# The commands to list exported symbols.
 
9554
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
 
9555
 
 
9556
# The commands to extract the exported symbol list from a shared archive.
 
9557
extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
9558
 
 
9559
# Symbols that should not be listed in the preloaded symbols.
 
9560
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
 
9561
 
 
9562
# Symbols that must always be exported.
 
9563
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
 
9564
 
 
9565
ifelse([$1],[],
 
9566
[# ### END LIBTOOL CONFIG],
 
9567
[# ### END LIBTOOL TAG CONFIG: $tagname])
 
9568
 
 
9569
__EOF__
 
9570
 
 
9571
ifelse([$1],[], [
 
9572
  case $host_os in
 
9573
  aix3*)
 
9574
    cat <<\EOF >> "$cfgfile"
 
9575
 
 
9576
# AIX sometimes has problems with the GCC collect2 program.  For some
 
9577
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
9578
# vanish in a puff of smoke.
 
9579
if test "X${COLLECT_NAMES+set}" != Xset; then
 
9580
  COLLECT_NAMES=
 
9581
  export COLLECT_NAMES
 
9582
fi
 
9583
EOF
 
9584
    ;;
 
9585
  esac
 
9586
 
 
9587
  # We use sed instead of cat because bash on DJGPP gets confused if
 
9588
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
9589
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
9590
  # is reportedly fixed, but why not run on old versions too?
 
9591
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
9592
 
 
9593
  mv -f "$cfgfile" "$ofile" || \
 
9594
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
9595
  chmod +x "$ofile"
 
9596
])
 
9597
else
 
9598
  # If there is no Makefile yet, we rely on a make rule to execute
 
9599
  # `config.status --recheck' to rerun these tests and create the
 
9600
  # libtool script then.
 
9601
  test -f Makefile && make "$ltmain"
 
9602
fi
 
9603
])# AC_LIBTOOL_CONFIG
 
9604
 
 
9605
 
 
9606
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
9607
# -------------------------------------------
 
9608
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
9609
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
9610
 
 
9611
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
9612
 
 
9613
if test "$GCC" = yes; then
 
9614
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
9615
 
 
9616
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
9617
    lt_cv_prog_compiler_rtti_exceptions,
 
9618
    [-fno-rtti -fno-exceptions], [],
 
9619
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
9620
fi
 
9621
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
9622
 
 
9623
 
 
9624
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
9625
# ---------------------------------
 
9626
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
9627
[AC_REQUIRE([AC_CANONICAL_HOST])
 
9628
AC_REQUIRE([AC_PROG_NM])
 
9629
AC_REQUIRE([AC_OBJEXT])
 
9630
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
9631
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
9632
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
9633
[
 
9634
# These are sane defaults that work on at least a few old systems.
 
9635
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
9636
 
 
9637
# Character class describing NM global symbol codes.
 
9638
symcode='[[BCDEGRST]]'
 
9639
 
 
9640
# Regexp to match symbols that can be accessed directly from C.
 
9641
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
9642
 
 
9643
# Transform the above into a raw symbol and a C symbol.
 
9644
symxfrm='\1 \2\3 \3'
 
9645
 
 
9646
# Transform an extracted symbol line into a proper C declaration
 
9647
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
9648
 
 
9649
# Transform an extracted symbol line into symbol name and symbol address
 
9650
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'"
 
9651
 
 
9652
# Define system-specific variables.
 
9653
case $host_os in
 
9654
aix*)
 
9655
  symcode='[[BCDT]]'
 
9656
  ;;
 
9657
cygwin* | mingw* | pw32*)
 
9658
  symcode='[[ABCDGISTW]]'
 
9659
  ;;
 
9660
hpux*) # Its linker distinguishes data from code symbols
 
9661
  if test "$host_cpu" = ia64; then
 
9662
    symcode='[[ABCDEGRST]]'
 
9663
  fi
 
9664
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
9665
  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'"
 
9666
  ;;
 
9667
irix* | nonstopux*)
 
9668
  symcode='[[BCDEGRST]]'
 
9669
  ;;
 
9670
osf*)
 
9671
  symcode='[[BCDEGQRST]]'
 
9672
  ;;
 
9673
solaris* | sysv5*)
 
9674
  symcode='[[BDT]]'
 
9675
  ;;
 
9676
sysv4)
 
9677
  symcode='[[DFNSTU]]'
 
9678
  ;;
 
9679
esac
 
9680
 
 
9681
# Handle CRLF in mingw tool chain
 
9682
opt_cr=
 
9683
case $build_os in
 
9684
mingw*)
 
9685
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
9686
  ;;
 
9687
esac
 
9688
 
 
9689
# If we're using GNU nm, then use its standard symbol codes.
 
9690
case `$NM -V 2>&1` in
 
9691
*GNU* | *'with BFD'*)
 
9692
  symcode='[[ABCDGISTW]]' ;;
 
9693
esac
 
9694
 
 
9695
# Try without a prefix undercore, then with it.
 
9696
for ac_symprfx in "" "_"; do
 
9697
 
 
9698
  # Write the raw and C identifiers.
 
9699
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
9700
 
 
9701
  # Check to see that the pipe works correctly.
 
9702
  pipe_works=no
 
9703
 
 
9704
  rm -f conftest*
 
9705
  cat > conftest.$ac_ext <<EOF
 
9706
#ifdef __cplusplus
 
9707
extern "C" {
 
9708
#endif
 
9709
char nm_test_var;
 
9710
void nm_test_func(){}
 
9711
#ifdef __cplusplus
 
9712
}
 
9713
#endif
 
9714
int main(){nm_test_var='a';nm_test_func();return(0);}
 
9715
EOF
 
9716
 
 
9717
  if AC_TRY_EVAL(ac_compile); then
 
9718
    # Now try to grab the symbols.
 
9719
    nlist=conftest.nm
 
9720
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
9721
      # Try sorting and uniquifying the output.
 
9722
      if sort "$nlist" | uniq > "$nlist"T; then
 
9723
        mv -f "$nlist"T "$nlist"
 
9724
      else
 
9725
        rm -f "$nlist"T
 
9726
      fi
 
9727
 
 
9728
      # Make sure that we snagged all the symbols we need.
 
9729
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 
9730
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
 
9731
          cat <<EOF > conftest.$ac_ext
 
9732
#ifdef __cplusplus
 
9733
extern "C" {
 
9734
#endif
 
9735
 
 
9736
EOF
 
9737
          # Now generate the symbol file.
 
9738
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
9739
 
 
9740
          cat <<EOF >> conftest.$ac_ext
 
9741
#if defined (__STDC__) && __STDC__
 
9742
# define lt_ptr_t void *
 
9743
#else
 
9744
# define lt_ptr_t char *
 
9745
# define const
 
9746
#endif
 
9747
 
 
9748
/* The mapping between symbol names and symbols. */
 
9749
const struct {
 
9750
  const char *name;
 
9751
  lt_ptr_t address;
 
9752
}
 
9753
lt_preloaded_symbols[[]] =
 
9754
{
 
9755
EOF
 
9756
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
9757
          cat <<\EOF >> conftest.$ac_ext
 
9758
  {0, (lt_ptr_t) 0}
 
9759
};
 
9760
 
 
9761
#ifdef __cplusplus
 
9762
}
 
9763
#endif
 
9764
EOF
 
9765
          # Now try linking the two files.
 
9766
          mv conftest.$ac_objext conftstm.$ac_objext
 
9767
          lt_save_LIBS="$LIBS"
 
9768
          lt_save_CFLAGS="$CFLAGS"
 
9769
          LIBS="conftstm.$ac_objext"
 
9770
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
9771
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
9772
            pipe_works=yes
 
9773
          fi
 
9774
          LIBS="$lt_save_LIBS"
 
9775
          CFLAGS="$lt_save_CFLAGS"
 
9776
        else
 
9777
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
9778
        fi
 
9779
      else
 
9780
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
9781
      fi
 
9782
    else
 
9783
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
9784
    fi
 
9785
  else
 
9786
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
9787
    cat conftest.$ac_ext >&5
 
9788
  fi
 
9789
  rm -f conftest* conftst*
 
9790
 
 
9791
  # Do not use the global_symbol_pipe unless it works.
 
9792
  if test "$pipe_works" = yes; then
 
9793
    break
 
9794
  else
 
9795
    lt_cv_sys_global_symbol_pipe=
 
9796
  fi
 
9797
done
 
9798
])
 
9799
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
9800
  lt_cv_sys_global_symbol_to_cdecl=
 
9801
fi
 
9802
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
9803
  AC_MSG_RESULT(failed)
 
9804
else
 
9805
  AC_MSG_RESULT(ok)
 
9806
fi
 
9807
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
9808
 
 
9809
 
 
9810
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
9811
# ---------------------------------------
 
9812
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
9813
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
9814
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9815
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
9816
 
 
9817
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
9818
 ifelse([$1],[CXX],[
 
9819
  # C++ specific cases for pic, static, wl, etc.
 
9820
  if test "$GXX" = yes; then
 
9821
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9822
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
9823
 
 
9824
    case $host_os in
 
9825
    aix*)
 
9826
      # All AIX code is PIC.
 
9827
      if test "$host_cpu" = ia64; then
 
9828
        # AIX 5 now supports IA64 processor
 
9829
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9830
      fi
 
9831
      ;;
 
9832
    amigaos*)
 
9833
      # FIXME: we need at least 68020 code to build shared libraries, but
 
9834
      # adding the `-m68020' flag to GCC prevents building anything better,
 
9835
      # like `-m68040'.
 
9836
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
9837
      ;;
 
9838
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
9839
      # PIC is the default for these OSes.
 
9840
      ;;
 
9841
    mingw* | os2* | pw32*)
 
9842
      # This hack is so that the source file can tell whether it is being
 
9843
      # built for inclusion in a dll (and should export symbols for example).
 
9844
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
9845
      ;;
 
9846
    darwin* | rhapsody*)
 
9847
      # PIC is the default on this platform
 
9848
      # Common symbols not allowed in MH_DYLIB files
 
9849
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
9850
      ;;
 
9851
    *djgpp*)
 
9852
      # DJGPP does not support shared libraries at all
 
9853
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9854
      ;;
 
9855
    sysv4*MP*)
 
9856
      if test -d /usr/nec; then
 
9857
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
9858
      fi
 
9859
      ;;
 
9860
    hpux*)
 
9861
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
9862
      # not for PA HP-UX.
 
9863
      case "$host_cpu" in
 
9864
      hppa*64*|ia64*)
 
9865
        ;;
 
9866
      *)
 
9867
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9868
        ;;
 
9869
      esac
 
9870
      ;;
 
9871
    *)
 
9872
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9873
      ;;
 
9874
    esac
 
9875
  else
 
9876
    case $host_os in
 
9877
      aix4* | aix5*)
 
9878
        # All AIX code is PIC.
 
9879
        if test "$host_cpu" = ia64; then
 
9880
          # AIX 5 now supports IA64 processor
 
9881
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9882
        else
 
9883
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
9884
        fi
 
9885
        ;;
 
9886
      chorus*)
 
9887
        case $cc_basename in
 
9888
        cxch68)
 
9889
          # Green Hills C++ Compiler
 
9890
          # _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"
 
9891
          ;;
 
9892
        esac
 
9893
        ;;
 
9894
      dgux*)
 
9895
        case $cc_basename in
 
9896
          ec++)
 
9897
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9898
            ;;
 
9899
          ghcx)
 
9900
            # Green Hills C++ Compiler
 
9901
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9902
            ;;
 
9903
          *)
 
9904
            ;;
 
9905
        esac
 
9906
        ;;
 
9907
      freebsd*)
 
9908
        # FreeBSD uses GNU C++
 
9909
        ;;
 
9910
      hpux9* | hpux10* | hpux11*)
 
9911
        case $cc_basename in
 
9912
          CC)
 
9913
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9914
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
9915
            if test "$host_cpu" != ia64; then
 
9916
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
9917
            fi
 
9918
            ;;
 
9919
          aCC)
 
9920
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9921
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
9922
            case "$host_cpu" in
 
9923
            hppa*64*|ia64*)
 
9924
              # +Z the default
 
9925
              ;;
 
9926
            *)
 
9927
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
9928
              ;;
 
9929
            esac
 
9930
            ;;
 
9931
          *)
 
9932
            ;;
 
9933
        esac
 
9934
        ;;
 
9935
      irix5* | irix6* | nonstopux*)
 
9936
        case $cc_basename in
 
9937
          CC)
 
9938
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9939
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9940
            # CC pic flag -KPIC is the default.
 
9941
            ;;
 
9942
          *)
 
9943
            ;;
 
9944
        esac
 
9945
        ;;
 
9946
      linux*)
 
9947
        case $cc_basename in
 
9948
          KCC)
 
9949
            # KAI C++ Compiler
 
9950
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
9951
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9952
            ;;
 
9953
          icpc)
 
9954
            # Intel C++
 
9955
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9956
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9957
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
9958
            ;; 
 
9959
          cxx)
 
9960
            # Compaq C++
 
9961
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
9962
            # Linux and Compaq Tru64 Unix objects are PIC.
 
9963
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9964
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9965
            ;;
 
9966
          *)
 
9967
            ;;
 
9968
        esac
 
9969
        ;;
 
9970
      lynxos*)
 
9971
        ;;
 
9972
      m88k*)
 
9973
        ;;
 
9974
      mvs*)
 
9975
        case $cc_basename in
 
9976
          cxx)
 
9977
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
9978
            ;;
 
9979
          *)
 
9980
            ;;
 
9981
        esac
 
9982
        ;;
 
9983
      netbsd*)
 
9984
        ;;
 
9985
      osf3* | osf4* | osf5*)
 
9986
        case $cc_basename in
 
9987
          KCC)
 
9988
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
9989
            ;;
 
9990
          RCC)
 
9991
            # Rational C++ 2.4.1
 
9992
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9993
            ;;
 
9994
          cxx)
 
9995
            # Digital/Compaq C++
 
9996
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9997
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
9998
            # Linux and Compaq Tru64 Unix objects are PIC.
 
9999
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10000
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10001
            ;;
 
10002
          *)
 
10003
            ;;
 
10004
        esac
 
10005
        ;;
 
10006
      psos*)
 
10007
        ;;
 
10008
      sco*)
 
10009
        case $cc_basename in
 
10010
          CC)
 
10011
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10012
            ;;
 
10013
          *)
 
10014
            ;;
 
10015
        esac
 
10016
        ;;
 
10017
      solaris*)
 
10018
        case $cc_basename in
 
10019
          CC)
 
10020
            # Sun C++ 4.2, 5.x and Centerline C++
 
10021
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10022
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10023
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
10024
            ;;
 
10025
          gcx)
 
10026
            # Green Hills C++ Compiler
 
10027
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
10028
            ;;
 
10029
          *)
 
10030
            ;;
 
10031
        esac
 
10032
        ;;
 
10033
      sunos4*)
 
10034
        case $cc_basename in
 
10035
          CC)
 
10036
            # Sun C++ 4.x
 
10037
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10038
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10039
            ;;
 
10040
          lcc)
 
10041
            # Lucid
 
10042
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10043
            ;;
 
10044
          *)
 
10045
            ;;
 
10046
        esac
 
10047
        ;;
 
10048
      tandem*)
 
10049
        case $cc_basename in
 
10050
          NCC)
 
10051
            # NonStop-UX NCC 3.20
 
10052
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10053
            ;;
 
10054
          *)
 
10055
            ;;
 
10056
        esac
 
10057
        ;;
 
10058
      unixware*)
 
10059
        ;;
 
10060
      vxworks*)
 
10061
        ;;
 
10062
      *)
 
10063
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
10064
        ;;
 
10065
    esac
 
10066
  fi
 
10067
],
 
10068
[
 
10069
  if test "$GCC" = yes; then
 
10070
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10071
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
10072
 
 
10073
    case $host_os in
 
10074
      aix*)
 
10075
      # All AIX code is PIC.
 
10076
      if test "$host_cpu" = ia64; then
 
10077
        # AIX 5 now supports IA64 processor
 
10078
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10079
      fi
 
10080
      ;;
 
10081
 
 
10082
    amigaos*)
 
10083
      # FIXME: we need at least 68020 code to build shared libraries, but
 
10084
      # adding the `-m68020' flag to GCC prevents building anything better,
 
10085
      # like `-m68040'.
 
10086
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
10087
      ;;
 
10088
 
 
10089
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
10090
      # PIC is the default for these OSes.
 
10091
      ;;
 
10092
 
 
10093
    mingw* | pw32* | os2*)
 
10094
      # This hack is so that the source file can tell whether it is being
 
10095
      # built for inclusion in a dll (and should export symbols for example).
 
10096
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
10097
      ;;
 
10098
 
 
10099
    darwin* | rhapsody*)
 
10100
      # PIC is the default on this platform
 
10101
      # Common symbols not allowed in MH_DYLIB files
 
10102
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
10103
      ;;
 
10104
 
 
10105
    msdosdjgpp*)
 
10106
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
10107
      # on systems that don't support them.
 
10108
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
10109
      enable_shared=no
 
10110
      ;;
 
10111
 
 
10112
    sysv4*MP*)
 
10113
      if test -d /usr/nec; then
 
10114
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
10115
      fi
 
10116
      ;;
 
10117
 
 
10118
    hpux*)
 
10119
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
10120
      # not for PA HP-UX.
 
10121
      case "$host_cpu" in
 
10122
      hppa*64*|ia64*)
 
10123
        # +Z the default
 
10124
        ;;
 
10125
      *)
 
10126
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10127
        ;;
 
10128
      esac
 
10129
      ;;
 
10130
 
 
10131
    *)
 
10132
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10133
      ;;
 
10134
    esac
 
10135
  else
 
10136
    # PORTME Check for flag to pass linker flags through the system compiler.
 
10137
    case $host_os in
 
10138
    aix*)
 
10139
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10140
      if test "$host_cpu" = ia64; then
 
10141
        # AIX 5 now supports IA64 processor
 
10142
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10143
      else
 
10144
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
10145
      fi
 
10146
      ;;
 
10147
 
 
10148
    mingw* | pw32* | os2*)
 
10149
      # This hack is so that the source file can tell whether it is being
 
10150
      # built for inclusion in a dll (and should export symbols for example).
 
10151
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
10152
      ;;
 
10153
 
 
10154
    hpux9* | hpux10* | hpux11*)
 
10155
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10156
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
10157
      # not for PA HP-UX.
 
10158
      case "$host_cpu" in
 
10159
      hppa*64*|ia64*)
 
10160
        # +Z the default
 
10161
        ;;
 
10162
      *)
 
10163
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
10164
        ;;
 
10165
      esac
 
10166
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
10167
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
10168
      ;;
 
10169
 
 
10170
    irix5* | irix6* | nonstopux*)
 
10171
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10172
      # PIC (with -KPIC) is the default.
 
10173
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10174
      ;;
 
10175
 
 
10176
    newsos6)
 
10177
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10178
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10179
      ;;
 
10180
 
 
10181
    linux*)
 
10182
      case $CC in
 
10183
      icc* | ecc*)
 
10184
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10185
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10186
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
10187
        ;;
 
10188
      ccc*)
 
10189
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10190
        # All Alpha code is PIC.
 
10191
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10192
        ;;
 
10193
      esac
 
10194
      ;;
 
10195
 
 
10196
    osf3* | osf4* | osf5*)
 
10197
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10198
      # All OSF/1 code is PIC.
 
10199
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10200
      ;;
 
10201
 
 
10202
    sco3.2v5*)
 
10203
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
 
10204
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
 
10205
      ;;
 
10206
 
 
10207
    solaris*)
 
10208
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10209
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10210
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10211
      ;;
 
10212
 
 
10213
    sunos4*)
 
10214
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
10215
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
10216
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10217
      ;;
 
10218
 
 
10219
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
10220
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10221
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10222
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10223
      ;;
 
10224
 
 
10225
    sysv4*MP*)
 
10226
      if test -d /usr/nec ;then
 
10227
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
10228
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10229
      fi
 
10230
      ;;
 
10231
 
 
10232
    uts4*)
 
10233
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10234
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10235
      ;;
 
10236
 
 
10237
    *)
 
10238
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
10239
      ;;
 
10240
    esac
 
10241
  fi
 
10242
])
 
10243
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
10244
 
 
10245
#
 
10246
# Check to make sure the PIC flag actually works.
 
10247
#
 
10248
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
10249
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
10250
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
10251
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
 
10252
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
10253
     "" | " "*) ;;
 
10254
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
10255
     esac],
 
10256
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10257
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
10258
fi
 
10259
case "$host_os" in
 
10260
  # For platforms which do not support PIC, -DPIC is meaningless:
 
10261
  *djgpp*)
 
10262
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10263
    ;;
 
10264
  *)
 
10265
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
 
10266
    ;;
 
10267
esac
 
10268
])
 
10269
 
 
10270
 
 
10271
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
10272
# ------------------------------------
 
10273
# See if the linker supports building shared libraries.
 
10274
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
10275
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
10276
ifelse([$1],[CXX],[
 
10277
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
10278
  case $host_os in
 
10279
  aix4* | aix5*)
 
10280
    # If we're using GNU nm, then we don't want the "-C" option.
 
10281
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
10282
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
10283
      _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'
 
10284
    else
 
10285
      _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'
 
10286
    fi
 
10287
    ;;
 
10288
  pw32*)
 
10289
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
10290
  ;;
 
10291
  cygwin* | mingw*)
 
10292
    _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'
 
10293
  ;;
 
10294
  *)
 
10295
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
10296
  ;;
 
10297
  esac
 
10298
],[
 
10299
  runpath_var=
 
10300
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
10301
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
10302
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
10303
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
10304
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
10305
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
10306
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
10307
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
10308
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
10309
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
10310
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
10311
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
10312
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10313
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
10314
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
10315
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
10316
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
10317
  _LT_AC_TAGVAR(module_cmds, $1)=
 
10318
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
 
10319
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
10320
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
10321
  # include_expsyms should be a list of space-separated symbols to be *always*
 
10322
  # included in the symbol list
 
10323
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
10324
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
10325
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
10326
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
10327
  # as well as any symbol that contains `d'.
 
10328
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
10329
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
10330
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
10331
  # the symbol is explicitly referenced.  Since portable code cannot
 
10332
  # rely on this symbol name, it's probably fine to never include it in
 
10333
  # preloaded symbol tables.
 
10334
  extract_expsyms_cmds=
 
10335
 
 
10336
  case $host_os in
 
10337
  cygwin* | mingw* | pw32*)
 
10338
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
10339
    # When not using gcc, we currently assume that we are using
 
10340
    # Microsoft Visual C++.
 
10341
    if test "$GCC" != yes; then
 
10342
      with_gnu_ld=no
 
10343
    fi
 
10344
    ;;
 
10345
  openbsd*)
 
10346
    with_gnu_ld=no
 
10347
    ;;
 
10348
  esac
 
10349
 
 
10350
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
10351
  if test "$with_gnu_ld" = yes; then
 
10352
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
10353
    wlarc='${wl}'
 
10354
 
 
10355
    # See if GNU ld supports shared libraries.
 
10356
    case $host_os in
 
10357
    aix3* | aix4* | aix5*)
 
10358
      # On AIX/PPC, the GNU linker is very broken
 
10359
      if test "$host_cpu" != ia64; then
 
10360
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10361
        cat <<EOF 1>&2
 
10362
 
 
10363
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
10364
*** to be unable to reliably create shared libraries on AIX.
 
10365
*** Therefore, libtool is disabling shared libraries support.  If you
 
10366
*** really care for shared libraries, you may want to modify your PATH
 
10367
*** so that a non-GNU linker is found, and then restart.
 
10368
 
 
10369
EOF
 
10370
      fi
 
10371
      ;;
 
10372
 
 
10373
    amigaos*)
 
10374
      _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)'
 
10375
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10376
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10377
 
 
10378
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
10379
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
10380
      # to version 4, is to share data among multiple programs linked
 
10381
      # with the same dynamic library.  Since this doesn't match the
 
10382
      # behavior of shared libraries on other platforms, we can't use
 
10383
      # them.
 
10384
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10385
      ;;
 
10386
 
 
10387
    beos*)
 
10388
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
10389
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10390
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
10391
        # support --undefined.  This deserves some investigation.  FIXME
 
10392
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
10393
      else
 
10394
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10395
      fi
 
10396
      ;;
 
10397
 
 
10398
    cygwin* | mingw* | pw32*)
 
10399
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
10400
      # as there is no search path for DLLs.
 
10401
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10402
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10403
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
10404
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
10405
      _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'
 
10406
 
 
10407
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
10408
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
10409
        # If the export-symbols file already is a .def file (1st line
 
10410
        # is EXPORTS), use it as is; otherwise, prepend...
 
10411
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
10412
          cp $export_symbols $output_objdir/$soname.def;
 
10413
        else
 
10414
          echo EXPORTS > $output_objdir/$soname.def;
 
10415
          cat $export_symbols >> $output_objdir/$soname.def;
 
10416
        fi~
 
10417
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
10418
      else
 
10419
        ld_shlibs=no
 
10420
      fi
 
10421
      ;;
 
10422
 
 
10423
    netbsd*)
 
10424
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
10425
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
10426
        wlarc=
 
10427
      else
 
10428
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
10429
        _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'
 
10430
      fi
 
10431
      ;;
 
10432
 
 
10433
    solaris* | sysv5*)
 
10434
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 
10435
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10436
        cat <<EOF 1>&2
 
10437
 
 
10438
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
10439
*** create shared libraries on Solaris systems.  Therefore, libtool
 
10440
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
10441
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
10442
*** your PATH or compiler configuration so that the native linker is
 
10443
*** used, and then restart.
 
10444
 
 
10445
EOF
 
10446
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
10447
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
10448
        _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'
 
10449
      else
 
10450
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10451
      fi
 
10452
      ;;
 
10453
 
 
10454
    sunos4*)
 
10455
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10456
      wlarc=
 
10457
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10458
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10459
      ;;
 
10460
 
 
10461
    *)
 
10462
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
10463
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
10464
        _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'
 
10465
      else
 
10466
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10467
      fi
 
10468
      ;;
 
10469
    esac
 
10470
 
 
10471
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
 
10472
      runpath_var=LD_RUN_PATH
 
10473
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
10474
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
10475
      # ancient GNU ld didn't support --whole-archive et. al.
 
10476
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
10477
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
10478
      else
 
10479
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
10480
      fi
 
10481
    fi
 
10482
  else
 
10483
    # PORTME fill in a description of your system's linker (not GNU ld)
 
10484
    case $host_os in
 
10485
    aix3*)
 
10486
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10487
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
10488
      _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'
 
10489
      # Note: this linker hardcodes the directories in LIBPATH if there
 
10490
      # are no directories specified by -L.
 
10491
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10492
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
10493
        # Neither direct hardcoding nor static linking is supported with a
 
10494
        # broken collect2.
 
10495
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
10496
      fi
 
10497
      ;;
 
10498
 
 
10499
    aix4* | aix5*)
 
10500
      if test "$host_cpu" = ia64; then
 
10501
        # On IA64, the linker does run time linking by default, so we don't
 
10502
        # have to do anything special.
 
10503
        aix_use_runtimelinking=no
 
10504
        exp_sym_flag='-Bexport'
 
10505
        no_entry_flag=""
 
10506
      else
 
10507
        # If we're using GNU nm, then we don't want the "-C" option.
 
10508
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
10509
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
10510
          _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'
 
10511
        else
 
10512
          _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'
 
10513
        fi
 
10514
 
 
10515
        # KDE requires run time linking.  Make it the default.
 
10516
        aix_use_runtimelinking=yes
 
10517
        exp_sym_flag='-bexport'
 
10518
        no_entry_flag='-bnoentry'
 
10519
      fi
 
10520
 
 
10521
      # When large executables or shared objects are built, AIX ld can
 
10522
      # have problems creating the table of contents.  If linking a library
 
10523
      # or program results in "error TOC overflow" add -mminimal-toc to
 
10524
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
10525
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
10526
 
 
10527
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
10528
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10529
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
10530
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10531
 
 
10532
      if test "$GCC" = yes; then
 
10533
        case $host_os in aix4.[012]|aix4.[012].*)
 
10534
        # We only want to do this on AIX 4.2 and lower, the check
 
10535
        # below for broken collect2 doesn't work under 4.3+
 
10536
          collect2name=`${CC} -print-prog-name=collect2`
 
10537
          if test -f "$collect2name" && \
 
10538
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
10539
          then
 
10540
          # We have reworked collect2
 
10541
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10542
          else
 
10543
          # We have old collect2
 
10544
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
10545
          # It fails to find uninstalled libraries when the uninstalled
 
10546
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
10547
          # to unsupported forces relinking
 
10548
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10549
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10550
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
10551
          fi
 
10552
        esac
 
10553
        shared_flag='-shared'
 
10554
      else
 
10555
        # not using gcc
 
10556
        if test "$host_cpu" = ia64; then
 
10557
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
10558
        # chokes on -Wl,-G. The following line is correct:
 
10559
          shared_flag='-G'
 
10560
        else
 
10561
        if test "$aix_use_runtimelinking" = yes; then
 
10562
            shared_flag='-qmkshrobj ${wl}-G'
 
10563
          else
 
10564
            shared_flag='-qmkshrobj'
 
10565
        fi
 
10566
        fi
 
10567
      fi
 
10568
 
 
10569
      # Let the compiler handle the export list.
 
10570
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
10571
      if test "$aix_use_runtimelinking" = yes; then
 
10572
        # Warning - without using the other runtime loading flags (-brtl),
 
10573
        # -berok will link without error, but may produce a broken library.
 
10574
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
10575
       # Determine the default libpath from the value encoded in an empty executable.
 
10576
        _LT_AC_SYS_LIBPATH_AIX
 
10577
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
10578
        _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"
 
10579
        _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"
 
10580
       else
 
10581
        if test "$host_cpu" = ia64; then
 
10582
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
10583
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
10584
          _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"
 
10585
        else
 
10586
         # Determine the default libpath from the value encoded in an empty executable.
 
10587
         _LT_AC_SYS_LIBPATH_AIX
 
10588
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
10589
          # Warning - without using the other run time loading flags,
 
10590
          # -berok will link without error, but may produce a broken library.
 
10591
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
10592
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
10593
          # -bexpall does not export symbols beginning with underscore (_)
 
10594
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
10595
          # Exported symbols can be pulled into shared objects from archives
 
10596
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
10597
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
10598
          # This is similar to how AIX traditionally builds it's shared libraries.
 
10599
          _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'
 
10600
        fi
 
10601
      fi
 
10602
      ;;
 
10603
 
 
10604
    amigaos*)
 
10605
      _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)'
 
10606
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10607
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10608
      # see comment about different semantics on the GNU ld section
 
10609
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10610
      ;;
 
10611
 
 
10612
    bsdi4*)
 
10613
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
10614
      ;;
 
10615
 
 
10616
    cygwin* | mingw* | pw32*)
 
10617
      # When not using gcc, we currently assume that we are using
 
10618
      # Microsoft Visual C++.
 
10619
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
10620
      # no search path for DLLs.
 
10621
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
10622
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10623
      # Tell ltmain to make .lib files, not .a files.
 
10624
      libext=lib
 
10625
      # Tell ltmain to make .dll files, not .so files.
 
10626
      shrext=".dll"
 
10627
      # FIXME: Setting linknames here is a bad hack.
 
10628
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
10629
      # The linker will automatically build a .lib file if we build a DLL.
 
10630
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
10631
      # FIXME: Should let the user specify the lib program.
 
10632
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
10633
      fix_srcfile_path='`cygpath -w "$srcfile"`'
 
10634
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
10635
      ;;
 
10636
 
 
10637
    darwin* | rhapsody*)
 
10638
    if test "$GXX" = yes ; then
 
10639
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
10640
      case "$host_os" in
 
10641
      rhapsody* | darwin1.[[012]])
 
10642
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
10643
        ;;
 
10644
      *) # Darwin 1.3 on
 
10645
        test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
10646
        ;;
 
10647
      esac
 
10648
        lt_int_apple_cc_single_mod=no
 
10649
        output_verbose_link_cmd='echo'
 
10650
        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
 
10651
          lt_int_apple_cc_single_mod=yes
 
10652
        fi
 
10653
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
10654
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
10655
        else
 
10656
        _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'
 
10657
      fi
 
10658
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
10659
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
10660
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
10661
          _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}'
 
10662
        else
 
10663
          _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}'
 
10664
        fi
 
10665
          _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}'
 
10666
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10667
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
10668
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
10669
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
10670
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10671
    else  
 
10672
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10673
    fi  
 
10674
      ;;
 
10675
 
 
10676
    dgux*)
 
10677
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10678
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10679
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10680
      ;;
 
10681
 
 
10682
    freebsd1*)
 
10683
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10684
      ;;
 
10685
 
 
10686
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
10687
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
10688
    # does not break anything, and helps significantly (at the cost of a little
 
10689
    # extra space).
 
10690
    freebsd2.2*)
 
10691
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
10692
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10693
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10694
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10695
      ;;
 
10696
 
 
10697
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
10698
    freebsd2*)
 
10699
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10700
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10701
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10702
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10703
      ;;
 
10704
 
 
10705
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
10706
    freebsd*)
 
10707
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
10708
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10709
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10710
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10711
      ;;
 
10712
 
 
10713
    hpux9*)
 
10714
      if test "$GCC" = yes; then
 
10715
        _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'
 
10716
      else
 
10717
        _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'
 
10718
      fi
 
10719
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
10720
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10721
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10722
 
 
10723
      # hardcode_minus_L: Not really in the search PATH,
 
10724
      # but as the default location of the library.
 
10725
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10726
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10727
      ;;
 
10728
 
 
10729
    hpux10* | hpux11*)
 
10730
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
10731
        case "$host_cpu" in
 
10732
        hppa*64*|ia64*)
 
10733
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10734
          ;;
 
10735
        *)
 
10736
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
10737
          ;;
 
10738
        esac
 
10739
      else
 
10740
        case "$host_cpu" in
 
10741
        hppa*64*|ia64*)
 
10742
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10743
          ;;
 
10744
        *)
 
10745
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
10746
          ;;
 
10747
        esac
 
10748
      fi
 
10749
      if test "$with_gnu_ld" = no; then
 
10750
        case "$host_cpu" in
 
10751
        hppa*64*)
 
10752
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
10753
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
10754
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10755
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10756
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10757
          ;;
 
10758
        ia64*)
 
10759
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10760
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10761
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10762
 
 
10763
          # hardcode_minus_L: Not really in the search PATH,
 
10764
          # but as the default location of the library.
 
10765
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10766
          ;;
 
10767
        *)
 
10768
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
10769
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10770
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10771
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10772
 
 
10773
          # hardcode_minus_L: Not really in the search PATH,
 
10774
          # but as the default location of the library.
 
10775
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10776
          ;;
 
10777
        esac
 
10778
      fi
 
10779
      ;;
 
10780
 
 
10781
    irix5* | irix6* | nonstopux*)
 
10782
      if test "$GCC" = yes; then
 
10783
        _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'
 
10784
      else
 
10785
        _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'
 
10786
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
10787
      fi
 
10788
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10789
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10790
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10791
      ;;
 
10792
 
 
10793
    netbsd*)
 
10794
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
10795
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
10796
      else
 
10797
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
10798
      fi
 
10799
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10800
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10801
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10802
      ;;
 
10803
 
 
10804
    newsos6)
 
10805
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10806
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10807
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10808
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10809
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10810
      ;;
 
10811
 
 
10812
    openbsd*)
 
10813
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10814
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10815
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
10816
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
10817
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
10818
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10819
      else
 
10820
       case $host_os in
 
10821
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
10822
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10823
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10824
           ;;
 
10825
         *)
 
10826
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
10827
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
10828
           ;;
 
10829
       esac
 
10830
      fi
 
10831
      ;;
 
10832
 
 
10833
    os2*)
 
10834
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10835
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10836
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10837
      _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'
 
10838
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
10839
      ;;
 
10840
 
 
10841
    osf3*)
 
10842
      if test "$GCC" = yes; then
 
10843
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
10844
        _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'
 
10845
      else
 
10846
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
10847
        _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'
 
10848
      fi
 
10849
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10850
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10851
      ;;
 
10852
 
 
10853
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
10854
      if test "$GCC" = yes; then
 
10855
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
10856
        _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'
 
10857
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10858
      else
 
10859
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
10860
        _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'
 
10861
        _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~
 
10862
        $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'
 
10863
 
 
10864
        # Both c and cxx compiler support -rpath directly
 
10865
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
10866
      fi
 
10867
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10868
      ;;
 
10869
 
 
10870
    sco3.2v5*)
 
10871
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10872
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10873
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
10874
      runpath_var=LD_RUN_PATH
 
10875
      hardcode_runpath_var=yes
 
10876
      ;;
 
10877
 
 
10878
    solaris*)
 
10879
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
10880
      if test "$GCC" = yes; then
 
10881
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10882
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10883
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
10884
      else
 
10885
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10886
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10887
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
10888
      fi
 
10889
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10890
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10891
      case $host_os in
 
10892
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
10893
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
 
10894
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
10895
      esac
 
10896
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10897
      ;;
 
10898
 
 
10899
    sunos4*)
 
10900
      if test "x$host_vendor" = xsequent; then
 
10901
        # Use $CC to link under sequent, because it throws in some extra .o
 
10902
        # files that make .init and .fini sections work.
 
10903
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
10904
      else
 
10905
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
10906
      fi
 
10907
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10908
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10909
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10910
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10911
      ;;
 
10912
 
 
10913
    sysv4)
 
10914
      case $host_vendor in
 
10915
        sni)
 
10916
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10917
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
10918
        ;;
 
10919
        siemens)
 
10920
          ## LD is ld it makes a PLAMLIB
 
10921
          ## CC just makes a GrossModule.
 
10922
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
10923
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
10924
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10925
        ;;
 
10926
        motorola)
 
10927
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10928
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
10929
        ;;
 
10930
      esac
 
10931
      runpath_var='LD_RUN_PATH'
 
10932
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10933
      ;;
 
10934
 
 
10935
    sysv4.3*)
 
10936
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10937
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10938
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
10939
      ;;
 
10940
 
 
10941
    sysv4*MP*)
 
10942
      if test -d /usr/nec; then
 
10943
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10944
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10945
        runpath_var=LD_RUN_PATH
 
10946
        hardcode_runpath_var=yes
 
10947
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
10948
      fi
 
10949
      ;;
 
10950
 
 
10951
    sysv4.2uw2*)
 
10952
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
10953
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10954
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
10955
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10956
      hardcode_runpath_var=yes
 
10957
      runpath_var=LD_RUN_PATH
 
10958
      ;;
 
10959
 
 
10960
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
 
10961
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
 
10962
      if test "$GCC" = yes; then
 
10963
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10964
      else
 
10965
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10966
      fi
 
10967
      runpath_var='LD_RUN_PATH'
 
10968
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10969
      ;;
 
10970
 
 
10971
    sysv5*)
 
10972
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
10973
      # $CC -shared without GNU ld will not create a library from C++
 
10974
      # object files and a static libstdc++, better avoid it by now
 
10975
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10976
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10977
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
10978
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
10979
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10980
      runpath_var='LD_RUN_PATH'
 
10981
      ;;
 
10982
 
 
10983
    uts4*)
 
10984
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10985
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10986
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10987
      ;;
 
10988
 
 
10989
    *)
 
10990
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10991
      ;;
 
10992
    esac
 
10993
  fi
 
10994
])
 
10995
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
10996
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
10997
 
 
10998
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
10999
if test "$GCC" = yes; then
 
11000
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
11001
fi
 
11002
 
 
11003
#
 
11004
# Do we need to explicitly link libc?
 
11005
#
 
11006
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
11007
x|xyes)
 
11008
  # Assume -lc should be added
 
11009
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
11010
 
 
11011
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
11012
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
11013
    *'~'*)
 
11014
      # FIXME: we may have to deal with multi-command sequences.
 
11015
      ;;
 
11016
    '$CC '*)
 
11017
      # Test whether the compiler implicitly links with -lc since on some
 
11018
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
11019
      # to ld, don't add -lc before -lgcc.
 
11020
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
11021
      $rm conftest*
 
11022
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
11023
  
 
11024
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
11025
        soname=conftest
 
11026
        lib=conftest
 
11027
        libobjs=conftest.$ac_objext
 
11028
        deplibs=
 
11029
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
11030
        compiler_flags=-v
 
11031
        linker_flags=-v
 
11032
        verstring=
 
11033
        output_objdir=.
 
11034
        libname=conftest
 
11035
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
11036
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
11037
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
11038
        then
 
11039
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
11040
        else
 
11041
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
11042
        fi
 
11043
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
11044
      else
 
11045
        cat conftest.err 1>&5
 
11046
      fi
 
11047
      $rm conftest*
 
11048
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
11049
      ;;
 
11050
    esac
 
11051
  fi
 
11052
  ;;
 
11053
esac
 
11054
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
11055
 
 
11056
 
 
11057
# _LT_AC_FILE_LTDLL_C
 
11058
# -------------------
 
11059
# Be careful that the start marker always follows a newline.
 
11060
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
 
11061
# /* ltdll.c starts here */
 
11062
# #define WIN32_LEAN_AND_MEAN
 
11063
# #include <windows.h>
 
11064
# #undef WIN32_LEAN_AND_MEAN
 
11065
# #include <stdio.h>
 
11066
#
 
11067
# #ifndef __CYGWIN__
 
11068
# #  ifdef __CYGWIN32__
 
11069
# #    define __CYGWIN__ __CYGWIN32__
 
11070
# #  endif
 
11071
# #endif
 
11072
#
 
11073
# #ifdef __cplusplus
 
11074
# extern "C" {
 
11075
# #endif
 
11076
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
 
11077
# #ifdef __cplusplus
 
11078
# }
 
11079
# #endif
 
11080
#
 
11081
# #ifdef __CYGWIN__
 
11082
# #include <cygwin/cygwin_dll.h>
 
11083
# DECLARE_CYGWIN_DLL( DllMain );
 
11084
# #endif
 
11085
# HINSTANCE __hDllInstance_base;
 
11086
#
 
11087
# BOOL APIENTRY
 
11088
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
 
11089
# {
 
11090
#   __hDllInstance_base = hInst;
 
11091
#   return TRUE;
 
11092
# }
 
11093
# /* ltdll.c ends here */
 
11094
])# _LT_AC_FILE_LTDLL_C
 
11095
 
 
11096
 
 
11097
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
11098
# ---------------------------------
 
11099
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
11100
 
 
11101
 
 
11102
# old names
 
11103
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
 
11104
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
 
11105
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
 
11106
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
11107
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
11108
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
 
11109
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
 
11110
 
 
11111
# This is just to silence aclocal about the macro not being used
 
11112
ifelse([AC_DISABLE_FAST_INSTALL])
 
11113
 
 
11114
AC_DEFUN([LT_AC_PROG_GCJ],
 
11115
[AC_CHECK_TOOL(GCJ, gcj, no)
 
11116
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
11117
  AC_SUBST(GCJFLAGS)
 
11118
])
 
11119
 
 
11120
AC_DEFUN([LT_AC_PROG_RC],
 
11121
[AC_CHECK_TOOL(RC, windres, no)
 
11122
])
 
11123
 
 
11124
# NOTE: This macro has been submitted for inclusion into   #
 
11125
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
11126
#  a released version of Autoconf we should remove this    #
 
11127
#  macro and use it instead.                               #
 
11128
# LT_AC_PROG_SED
 
11129
# --------------
 
11130
# Check for a fully-functional sed program, that truncates
 
11131
# as few characters as possible.  Prefer GNU sed if found.
 
11132
AC_DEFUN([LT_AC_PROG_SED],
 
11133
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
11134
AC_CACHE_VAL(lt_cv_path_SED,
 
11135
[# Loop through the user's path and test for sed and gsed.
 
11136
# Then use that list of sed's as ones to test for truncation.
 
11137
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
11138
for as_dir in $PATH
 
11139
do
 
11140
  IFS=$as_save_IFS
 
11141
  test -z "$as_dir" && as_dir=.
 
11142
  for lt_ac_prog in sed gsed; do
 
11143
    for ac_exec_ext in '' $ac_executable_extensions; do
 
11144
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
11145
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
11146
      fi
 
11147
    done
 
11148
  done
 
11149
done
 
11150
lt_ac_max=0
 
11151
lt_ac_count=0
 
11152
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
11153
# along with /bin/sed that truncates output.
 
11154
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
11155
  test ! -f $lt_ac_sed && break
 
11156
  cat /dev/null > conftest.in
 
11157
  lt_ac_count=0
 
11158
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
11159
  # Check for GNU sed and select it if it is found.
 
11160
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
11161
    lt_cv_path_SED=$lt_ac_sed
 
11162
    break
 
11163
  fi
 
11164
  while true; do
 
11165
    cat conftest.in conftest.in >conftest.tmp
 
11166
    mv conftest.tmp conftest.in
 
11167
    cp conftest.in conftest.nl
 
11168
    echo >>conftest.nl
 
11169
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
11170
    cmp -s conftest.out conftest.nl || break
 
11171
    # 10000 chars as input seems more than enough
 
11172
    test $lt_ac_count -gt 10 && break
 
11173
    lt_ac_count=`expr $lt_ac_count + 1`
 
11174
    if test $lt_ac_count -gt $lt_ac_max; then
 
11175
      lt_ac_max=$lt_ac_count
 
11176
      lt_cv_path_SED=$lt_ac_sed
 
11177
    fi
 
11178
  done
 
11179
done
 
11180
])
 
11181
SED=$lt_cv_path_SED
 
11182
AC_MSG_RESULT([$SED])
 
11183
])
 
11184
 
 
11185
# AM_CONDITIONAL                                              -*- Autoconf -*-
 
11186
 
 
11187
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
 
11188
 
 
11189
# This program is free software; you can redistribute it and/or modify
 
11190
# it under the terms of the GNU General Public License as published by
 
11191
# the Free Software Foundation; either version 2, or (at your option)
 
11192
# any later version.
 
11193
 
 
11194
# This program is distributed in the hope that it will be useful,
 
11195
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11196
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11197
# GNU General Public License for more details.
 
11198
 
 
11199
# You should have received a copy of the GNU General Public License
 
11200
# along with this program; if not, write to the Free Software
 
11201
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11202
# 02111-1307, USA.
 
11203
 
 
11204
# serial 5
 
11205
 
 
11206
AC_PREREQ(2.52)
 
11207
 
 
11208
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
11209
# -------------------------------------
 
11210
# Define a conditional.
 
11211
AC_DEFUN([AM_CONDITIONAL],
 
11212
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
11213
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
11214
AC_SUBST([$1_TRUE])
 
11215
AC_SUBST([$1_FALSE])
 
11216
if $2; then
 
11217
  $1_TRUE=
 
11218
  $1_FALSE='#'
 
11219
else
 
11220
  $1_TRUE='#'
 
11221
  $1_FALSE=
 
11222
fi
 
11223
AC_CONFIG_COMMANDS_PRE(
 
11224
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
11225
  AC_MSG_ERROR([conditional \"$1\" was never defined.
 
11226
Usually this means the macro was only invoked conditionally.])
 
11227
fi])])
 
11228
 
 
11229
# Do all the work for Automake.                            -*- Autoconf -*-
 
11230
 
 
11231
# This macro actually does too much some checks are only needed if
 
11232
# your package does certain things.  But this isn't really a big deal.
 
11233
 
 
11234
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
11235
# Free Software Foundation, Inc.
 
11236
 
 
11237
# This program is free software; you can redistribute it and/or modify
 
11238
# it under the terms of the GNU General Public License as published by
 
11239
# the Free Software Foundation; either version 2, or (at your option)
 
11240
# any later version.
 
11241
 
 
11242
# This program is distributed in the hope that it will be useful,
 
11243
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11244
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11245
# GNU General Public License for more details.
 
11246
 
 
11247
# You should have received a copy of the GNU General Public License
 
11248
# along with this program; if not, write to the Free Software
 
11249
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11250
# 02111-1307, USA.
 
11251
 
 
11252
# serial 8
 
11253
 
 
11254
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
11255
# written in clear, in which case automake, when reading aclocal.m4,
 
11256
# will think it sees a *use*, and therefore will trigger all it's
 
11257
# C support machinery.  Also note that it means that autoscan, seeing
 
11258
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
11259
 
 
11260
 
 
11261
AC_PREREQ([2.52])
 
11262
 
 
11263
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
 
11264
# the ones we care about.
 
11265
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
11266
 
 
11267
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
11268
# AM_INIT_AUTOMAKE([OPTIONS])
 
11269
# -----------------------------------------------
 
11270
# The call with PACKAGE and VERSION arguments is the old style
 
11271
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
11272
# and VERSION should now be passed to AC_INIT and removed from
 
11273
# the call to AM_INIT_AUTOMAKE.
 
11274
# We support both call styles for the transition.  After
 
11275
# the next Automake release, Autoconf can make the AC_INIT
 
11276
# arguments mandatory, and then we can depend on a new Autoconf
 
11277
# release and drop the old call support.
 
11278
AC_DEFUN([AM_INIT_AUTOMAKE],
 
11279
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
11280
 AC_REQUIRE([AC_PROG_INSTALL])dnl
 
11281
# test to see if srcdir already configured
 
11282
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
11283
   test -f $srcdir/config.status; then
 
11284
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
11285
fi
 
11286
 
 
11287
# Define the identity of the package.
 
11288
dnl Distinguish between old-style and new-style calls.
 
11289
m4_ifval([$2],
 
11290
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
11291
 AC_SUBST([PACKAGE], [$1])dnl
 
11292
 AC_SUBST([VERSION], [$2])],
 
11293
[_AM_SET_OPTIONS([$1])dnl
 
11294
 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
 
11295
 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
 
11296
 
 
11297
_AM_IF_OPTION([no-define],,
 
11298
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
11299
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
11300
 
 
11301
# Some tools Automake needs.
 
11302
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
11303
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
11304
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
11305
AM_MISSING_PROG(AUTOCONF, autoconf)
 
11306
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
11307
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
11308
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
11309
AM_MISSING_PROG(AMTAR, tar)
 
11310
AM_PROG_INSTALL_SH
 
11311
AM_PROG_INSTALL_STRIP
 
11312
# We need awk for the "check" target.  The system "awk" is bad on
 
11313
# some platforms.
 
11314
AC_REQUIRE([AC_PROG_AWK])dnl
 
11315
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
11316
 
 
11317
_AM_IF_OPTION([no-dependencies],,
 
11318
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
 
11319
                  [_AM_DEPENDENCIES(CC)],
 
11320
                  [define([AC_PROG_][CC],
 
11321
                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
 
11322
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
 
11323
                  [_AM_DEPENDENCIES(CXX)],
 
11324
                  [define([AC_PROG_][CXX],
 
11325
                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
11326
])
 
11327
])
 
11328
 
 
11329
# Copyright 2002  Free Software Foundation, Inc.
 
11330
 
 
11331
# This program is free software; you can redistribute it and/or modify
 
11332
# it under the terms of the GNU General Public License as published by
 
11333
# the Free Software Foundation; either version 2, or (at your option)
 
11334
# any later version.
 
11335
 
 
11336
# This program is distributed in the hope that it will be useful,
 
11337
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11338
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11339
# GNU General Public License for more details.
 
11340
 
 
11341
# You should have received a copy of the GNU General Public License
 
11342
# along with this program; if not, write to the Free Software
 
11343
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11344
 
 
11345
# AM_AUTOMAKE_VERSION(VERSION)
 
11346
# ----------------------------
 
11347
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
11348
# generated from the m4 files accompanying Automake X.Y.
 
11349
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
 
11350
 
 
11351
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
11352
# -------------------------------
 
11353
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
11354
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
11355
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
11356
         [AM_AUTOMAKE_VERSION([1.6.3])])
 
11357
 
 
11358
# Helper functions for option handling.                    -*- Autoconf -*-
 
11359
 
 
11360
# Copyright 2001, 2002  Free Software Foundation, Inc.
 
11361
 
 
11362
# This program is free software; you can redistribute it and/or modify
 
11363
# it under the terms of the GNU General Public License as published by
 
11364
# the Free Software Foundation; either version 2, or (at your option)
 
11365
# any later version.
 
11366
 
 
11367
# This program is distributed in the hope that it will be useful,
 
11368
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11369
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11370
# GNU General Public License for more details.
 
11371
 
 
11372
# You should have received a copy of the GNU General Public License
 
11373
# along with this program; if not, write to the Free Software
 
11374
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11375
# 02111-1307, USA.
 
11376
 
 
11377
# serial 2
 
11378
 
 
11379
# _AM_MANGLE_OPTION(NAME)
 
11380
# -----------------------
 
11381
AC_DEFUN([_AM_MANGLE_OPTION],
 
11382
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
11383
 
 
11384
# _AM_SET_OPTION(NAME)
 
11385
# ------------------------------
 
11386
# Set option NAME.  Presently that only means defining a flag for this option.
 
11387
AC_DEFUN([_AM_SET_OPTION],
 
11388
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
11389
 
 
11390
# _AM_SET_OPTIONS(OPTIONS)
 
11391
# ----------------------------------
 
11392
# OPTIONS is a space-separated list of Automake options.
 
11393
AC_DEFUN([_AM_SET_OPTIONS],
 
11394
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
11395
 
 
11396
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
11397
# -------------------------------------------
 
11398
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
11399
AC_DEFUN([_AM_IF_OPTION],
 
11400
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
11401
 
 
11402
#
 
11403
# Check to make sure that the build environment is sane.
 
11404
#
 
11405
 
 
11406
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
11407
 
 
11408
# This program is free software; you can redistribute it and/or modify
 
11409
# it under the terms of the GNU General Public License as published by
 
11410
# the Free Software Foundation; either version 2, or (at your option)
 
11411
# any later version.
 
11412
 
 
11413
# This program is distributed in the hope that it will be useful,
 
11414
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11415
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11416
# GNU General Public License for more details.
 
11417
 
 
11418
# You should have received a copy of the GNU General Public License
 
11419
# along with this program; if not, write to the Free Software
 
11420
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11421
# 02111-1307, USA.
 
11422
 
 
11423
# serial 3
 
11424
 
 
11425
# AM_SANITY_CHECK
 
11426
# ---------------
 
11427
AC_DEFUN([AM_SANITY_CHECK],
 
11428
[AC_MSG_CHECKING([whether build environment is sane])
 
11429
# Just in case
 
11430
sleep 1
 
11431
echo timestamp > conftest.file
 
11432
# Do `set' in a subshell so we don't clobber the current shell's
 
11433
# arguments.  Must try -L first in case configure is actually a
 
11434
# symlink; some systems play weird games with the mod time of symlinks
 
11435
# (eg FreeBSD returns the mod time of the symlink's containing
 
11436
# directory).
 
11437
if (
 
11438
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
11439
   if test "$[*]" = "X"; then
 
11440
      # -L didn't work.
 
11441
      set X `ls -t $srcdir/configure conftest.file`
 
11442
   fi
 
11443
   rm -f conftest.file
 
11444
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
11445
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
11446
 
 
11447
      # If neither matched, then we have a broken ls.  This can happen
 
11448
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
11449
      # broken ls alias from the environment.  This has actually
 
11450
      # happened.  Such a system could not be considered "sane".
 
11451
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
11452
alias in your environment])
 
11453
   fi
 
11454
 
 
11455
   test "$[2]" = conftest.file
 
11456
   )
 
11457
then
 
11458
   # Ok.
 
11459
   :
 
11460
else
 
11461
   AC_MSG_ERROR([newly created file is older than distributed files!
 
11462
Check your system clock])
 
11463
fi
 
11464
AC_MSG_RESULT(yes)])
 
11465
 
 
11466
#  -*- Autoconf -*-
 
11467
 
 
11468
 
 
11469
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
11470
 
 
11471
# This program is free software; you can redistribute it and/or modify
 
11472
# it under the terms of the GNU General Public License as published by
 
11473
# the Free Software Foundation; either version 2, or (at your option)
 
11474
# any later version.
 
11475
 
 
11476
# This program is distributed in the hope that it will be useful,
 
11477
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11478
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11479
# GNU General Public License for more details.
 
11480
 
 
11481
# You should have received a copy of the GNU General Public License
 
11482
# along with this program; if not, write to the Free Software
 
11483
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11484
# 02111-1307, USA.
 
11485
 
 
11486
# serial 3
 
11487
 
 
11488
# AM_MISSING_PROG(NAME, PROGRAM)
 
11489
# ------------------------------
 
11490
AC_DEFUN([AM_MISSING_PROG],
 
11491
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
11492
$1=${$1-"${am_missing_run}$2"}
 
11493
AC_SUBST($1)])
 
11494
 
 
11495
 
 
11496
# AM_MISSING_HAS_RUN
 
11497
# ------------------
 
11498
# Define MISSING if not defined so far and test if it supports --run.
 
11499
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
11500
AC_DEFUN([AM_MISSING_HAS_RUN],
 
11501
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
11502
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
11503
# Use eval to expand $SHELL
 
11504
if eval "$MISSING --run true"; then
 
11505
  am_missing_run="$MISSING --run "
 
11506
else
 
11507
  am_missing_run=
 
11508
  AC_MSG_WARN([`missing' script is too old or missing])
 
11509
fi
 
11510
])
 
11511
 
 
11512
# AM_AUX_DIR_EXPAND
 
11513
 
 
11514
# Copyright 2001 Free Software Foundation, Inc.
 
11515
 
 
11516
# This program is free software; you can redistribute it and/or modify
 
11517
# it under the terms of the GNU General Public License as published by
 
11518
# the Free Software Foundation; either version 2, or (at your option)
 
11519
# any later version.
 
11520
 
 
11521
# This program is distributed in the hope that it will be useful,
 
11522
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11523
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11524
# GNU General Public License for more details.
 
11525
 
 
11526
# You should have received a copy of the GNU General Public License
 
11527
# along with this program; if not, write to the Free Software
 
11528
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11529
# 02111-1307, USA.
 
11530
 
 
11531
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
11532
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
11533
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
11534
#
 
11535
# Of course, Automake must honor this variable whenever it calls a
 
11536
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
11537
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
11538
# depending on how configure is run.  This is pretty annoying, since
 
11539
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
11540
# source directory, any form will work fine, but in subdirectories a
 
11541
# relative path needs to be adjusted first.
 
11542
#
 
11543
# $ac_aux_dir/missing
 
11544
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
11545
# $top_srcdir/$ac_aux_dir/missing
 
11546
#    fails if $ac_aux_dir is absolute,
 
11547
#    fails when called from a subdirectory in a VPATH build with
 
11548
#          a relative $ac_aux_dir
 
11549
#
 
11550
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
11551
# are both prefixed by $srcdir.  In an in-source build this is usually
 
11552
# harmless because $srcdir is `.', but things will broke when you
 
11553
# start a VPATH build or use an absolute $srcdir.
 
11554
#
 
11555
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
11556
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
11557
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
11558
# and then we would define $MISSING as
 
11559
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
11560
# This will work as long as MISSING is not called from configure, because
 
11561
# unfortunately $(top_srcdir) has no meaning in configure.
 
11562
# However there are other variables, like CC, which are often used in
 
11563
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
11564
#
 
11565
# Another solution, used here, is to always expand $ac_aux_dir to an
 
11566
# absolute PATH.  The drawback is that using absolute paths prevent a
 
11567
# configured tree to be moved without reconfiguration.
 
11568
 
 
11569
# Rely on autoconf to set up CDPATH properly.
 
11570
AC_PREREQ([2.50])
 
11571
 
 
11572
AC_DEFUN([AM_AUX_DIR_EXPAND], [
 
11573
# expand $ac_aux_dir to an absolute path
 
11574
am_aux_dir=`cd $ac_aux_dir && pwd`
 
11575
])
 
11576
 
 
11577
# AM_PROG_INSTALL_SH
 
11578
# ------------------
 
11579
# Define $install_sh.
 
11580
 
 
11581
# Copyright 2001 Free Software Foundation, Inc.
 
11582
 
 
11583
# This program is free software; you can redistribute it and/or modify
 
11584
# it under the terms of the GNU General Public License as published by
 
11585
# the Free Software Foundation; either version 2, or (at your option)
 
11586
# any later version.
 
11587
 
 
11588
# This program is distributed in the hope that it will be useful,
 
11589
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11590
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11591
# GNU General Public License for more details.
 
11592
 
 
11593
# You should have received a copy of the GNU General Public License
 
11594
# along with this program; if not, write to the Free Software
 
11595
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11596
# 02111-1307, USA.
 
11597
 
 
11598
AC_DEFUN([AM_PROG_INSTALL_SH],
 
11599
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
11600
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
11601
AC_SUBST(install_sh)])
 
11602
 
 
11603
# AM_PROG_INSTALL_STRIP
 
11604
 
 
11605
# Copyright 2001 Free Software Foundation, Inc.
 
11606
 
 
11607
# This program is free software; you can redistribute it and/or modify
 
11608
# it under the terms of the GNU General Public License as published by
 
11609
# the Free Software Foundation; either version 2, or (at your option)
 
11610
# any later version.
 
11611
 
 
11612
# This program is distributed in the hope that it will be useful,
 
11613
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11614
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11615
# GNU General Public License for more details.
 
11616
 
 
11617
# You should have received a copy of the GNU General Public License
 
11618
# along with this program; if not, write to the Free Software
 
11619
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11620
# 02111-1307, USA.
 
11621
 
 
11622
# One issue with vendor `install' (even GNU) is that you can't
 
11623
# specify the program used to strip binaries.  This is especially
 
11624
# annoying in cross-compiling environments, where the build's strip
 
11625
# is unlikely to handle the host's binaries.
 
11626
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
11627
# always use install-sh in `make install-strip', and initialize
 
11628
# STRIPPROG with the value of the STRIP variable (set by the user).
 
11629
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
11630
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
11631
# Installed binaries are usually stripped using `strip' when the user
 
11632
# run `make install-strip'.  However `strip' might not be the right
 
11633
# tool to use in cross-compilation environments, therefore Automake
 
11634
# will honor the `STRIP' environment variable to overrule this program.
 
11635
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
11636
if test "$cross_compiling" != no; then
 
11637
  AC_CHECK_TOOL([STRIP], [strip], :)
 
11638
fi
 
11639
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
11640
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
11641
 
 
11642
# serial 4                                              -*- Autoconf -*-
 
11643
 
 
11644
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
 
11645
 
 
11646
# This program is free software; you can redistribute it and/or modify
 
11647
# it under the terms of the GNU General Public License as published by
 
11648
# the Free Software Foundation; either version 2, or (at your option)
 
11649
# any later version.
 
11650
 
 
11651
# This program is distributed in the hope that it will be useful,
 
11652
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11653
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11654
# GNU General Public License for more details.
 
11655
 
 
11656
# You should have received a copy of the GNU General Public License
 
11657
# along with this program; if not, write to the Free Software
 
11658
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11659
# 02111-1307, USA.
 
11660
 
 
11661
 
 
11662
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
11663
# written in clear, in which case automake, when reading aclocal.m4,
 
11664
# will think it sees a *use*, and therefore will trigger all it's
 
11665
# C support machinery.  Also note that it means that autoscan, seeing
 
11666
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
11667
 
 
11668
 
 
11669
 
 
11670
# _AM_DEPENDENCIES(NAME)
 
11671
# ----------------------
 
11672
# See how the compiler implements dependency checking.
 
11673
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
11674
# We try a few techniques and use that to set a single cache variable.
 
11675
#
 
11676
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
11677
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
11678
# dependency, and given that the user is not expected to run this macro,
 
11679
# just rely on AC_PROG_CC.
 
11680
AC_DEFUN([_AM_DEPENDENCIES],
 
11681
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
11682
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
11683
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
11684
AC_REQUIRE([AM_DEP_TRACK])dnl
 
11685
 
 
11686
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
11687
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
11688
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
11689
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
11690
                   [depcc="$$1"   am_compiler_list=])
 
11691
 
 
11692
AC_CACHE_CHECK([dependency style of $depcc],
 
11693
               [am_cv_$1_dependencies_compiler_type],
 
11694
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
11695
  # We make a subdir and do the tests there.  Otherwise we can end up
 
11696
  # making bogus files that we don't know about and never remove.  For
 
11697
  # instance it was reported that on HP-UX the gcc test will end up
 
11698
  # making a dummy file named `D' -- because `-MD' means `put the output
 
11699
  # in D'.
 
11700
  mkdir conftest.dir
 
11701
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
11702
  # using a relative directory.
 
11703
  cp "$am_depcomp" conftest.dir
 
11704
  cd conftest.dir
 
11705
 
 
11706
  am_cv_$1_dependencies_compiler_type=none
 
11707
  if test "$am_compiler_list" = ""; then
 
11708
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
11709
  fi
 
11710
  for depmode in $am_compiler_list; do
 
11711
    # We need to recreate these files for each test, as the compiler may
 
11712
    # overwrite some of them when testing with obscure command lines.
 
11713
    # This happens at least with the AIX C compiler.
 
11714
    echo '#include "conftest.h"' > conftest.c
 
11715
    echo 'int i;' > conftest.h
 
11716
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
 
11717
 
 
11718
    case $depmode in
 
11719
    nosideeffect)
 
11720
      # after this tag, mechanisms are not by side-effect, so they'll
 
11721
      # only be used when explicitly requested
 
11722
      if test "x$enable_dependency_tracking" = xyes; then
 
11723
        continue
 
11724
      else
 
11725
        break
 
11726
      fi
 
11727
      ;;
 
11728
    none) break ;;
 
11729
    esac
 
11730
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
11731
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
11732
    # handle `-M -o', and we need to detect this.
 
11733
    if depmode=$depmode \
 
11734
       source=conftest.c object=conftest.o \
 
11735
       depfile=conftest.Po tmpdepfile=conftest.TPo \
 
11736
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
 
11737
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
 
11738
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
11739
      am_cv_$1_dependencies_compiler_type=$depmode
 
11740
      break
 
11741
    fi
 
11742
  done
 
11743
 
 
11744
  cd ..
 
11745
  rm -rf conftest.dir
 
11746
else
 
11747
  am_cv_$1_dependencies_compiler_type=none
 
11748
fi
 
11749
])
 
11750
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
11751
])
 
11752
 
 
11753
 
 
11754
# AM_SET_DEPDIR
 
11755
# -------------
 
11756
# Choose a directory name for dependency files.
 
11757
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
11758
AC_DEFUN([AM_SET_DEPDIR],
 
11759
[rm -f .deps 2>/dev/null
 
11760
mkdir .deps 2>/dev/null
 
11761
if test -d .deps; then
 
11762
  DEPDIR=.deps
 
11763
else
 
11764
  # MS-DOS does not allow filenames that begin with a dot.
 
11765
  DEPDIR=_deps
 
11766
fi
 
11767
rmdir .deps 2>/dev/null
 
11768
AC_SUBST([DEPDIR])
 
11769
])
 
11770
 
 
11771
 
 
11772
# AM_DEP_TRACK
 
11773
# ------------
 
11774
AC_DEFUN([AM_DEP_TRACK],
 
11775
[AC_ARG_ENABLE(dependency-tracking,
 
11776
[  --disable-dependency-tracking Speeds up one-time builds
 
11777
  --enable-dependency-tracking  Do not reject slow dependency extractors])
 
11778
if test "x$enable_dependency_tracking" != xno; then
 
11779
  am_depcomp="$ac_aux_dir/depcomp"
 
11780
  AMDEPBACKSLASH='\'
 
11781
fi
 
11782
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
11783
AC_SUBST([AMDEPBACKSLASH])
 
11784
])
 
11785
 
 
11786
# Generate code to set up dependency tracking.   -*- Autoconf -*-
 
11787
 
 
11788
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
11789
 
 
11790
# This program is free software; you can redistribute it and/or modify
 
11791
# it under the terms of the GNU General Public License as published by
 
11792
# the Free Software Foundation; either version 2, or (at your option)
 
11793
# any later version.
 
11794
 
 
11795
# This program is distributed in the hope that it will be useful,
 
11796
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11797
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11798
# GNU General Public License for more details.
 
11799
 
 
11800
# You should have received a copy of the GNU General Public License
 
11801
# along with this program; if not, write to the Free Software
 
11802
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11803
# 02111-1307, USA.
 
11804
 
 
11805
#serial 2
 
11806
 
 
11807
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
11808
# ------------------------------
 
11809
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
11810
[for mf in $CONFIG_FILES; do
 
11811
  # Strip MF so we end up with the name of the file.
 
11812
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
11813
  # Check whether this is an Automake generated Makefile or not.
 
11814
  # We used to match only the files named `Makefile.in', but
 
11815
  # some people rename them; so instead we look at the file content.
 
11816
  # Grep'ing the first line is not enough: some people post-process
 
11817
  # each Makefile.in and add a new line on top of each file to say so.
 
11818
  # So let's grep whole file.
 
11819
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
11820
    dirpart=`AS_DIRNAME("$mf")`
 
11821
  else
 
11822
    continue
 
11823
  fi
 
11824
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
 
11825
  # Extract the definition of DEP_FILES from the Makefile without
 
11826
  # running `make'.
 
11827
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
 
11828
  test -z "$DEPDIR" && continue
 
11829
  # When using ansi2knr, U may be empty or an underscore; expand it
 
11830
  U=`sed -n -e '/^U = / s///p' < "$mf"`
 
11831
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
 
11832
  # We invoke sed twice because it is the simplest approach to
 
11833
  # changing $(DEPDIR) to its actual value in the expansion.
 
11834
  for file in `sed -n -e '
 
11835
    /^DEP_FILES = .*\\\\$/ {
 
11836
      s/^DEP_FILES = //
 
11837
      :loop
 
11838
        s/\\\\$//
 
11839
        p
 
11840
        n
 
11841
        /\\\\$/ b loop
 
11842
      p
 
11843
    }
 
11844
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
 
11845
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
11846
    # Make sure the directory exists.
 
11847
    test -f "$dirpart/$file" && continue
 
11848
    fdir=`AS_DIRNAME(["$file"])`
 
11849
    AS_MKDIR_P([$dirpart/$fdir])
 
11850
    # echo "creating $dirpart/$file"
 
11851
    echo '# dummy' > "$dirpart/$file"
 
11852
  done
 
11853
done
 
11854
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
11855
 
 
11856
 
 
11857
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
11858
# -----------------------------
 
11859
# This macro should only be invoked once -- use via AC_REQUIRE.
 
11860
#
 
11861
# This code is only required when automatic dependency tracking
 
11862
# is enabled.  FIXME.  This creates each `.P' file that we will
 
11863
# need in order to bootstrap the dependency handling code.
 
11864
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
11865
[AC_CONFIG_COMMANDS([depfiles],
 
11866
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
11867
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
11868
])
 
11869
 
 
11870
# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
 
11871
 
 
11872
# This program is free software; you can redistribute it and/or modify
 
11873
# it under the terms of the GNU General Public License as published by
 
11874
# the Free Software Foundation; either version 2, or (at your option)
 
11875
# any later version.
 
11876
 
 
11877
# This program is distributed in the hope that it will be useful,
 
11878
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11879
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11880
# GNU General Public License for more details.
 
11881
 
 
11882
# You should have received a copy of the GNU General Public License
 
11883
# along with this program; if not, write to the Free Software
 
11884
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11885
# 02111-1307, USA.
 
11886
 
 
11887
# serial 2
 
11888
 
 
11889
# AM_MAKE_INCLUDE()
 
11890
# -----------------
 
11891
# Check to see how make treats includes.
 
11892
AC_DEFUN([AM_MAKE_INCLUDE],
 
11893
[am_make=${MAKE-make}
 
11894
cat > confinc << 'END'
 
11895
doit:
 
11896
        @echo done
 
11897
END
 
11898
# If we don't find an include directive, just comment out the code.
 
11899
AC_MSG_CHECKING([for style of include used by $am_make])
 
11900
am__include="#"
 
11901
am__quote=
 
11902
_am_result=none
 
11903
# First try GNU make style include.
 
11904
echo "include confinc" > confmf
 
11905
# We grep out `Entering directory' and `Leaving directory'
 
11906
# messages which can occur if `w' ends up in MAKEFLAGS.
 
11907
# In particular we don't look at `^make:' because GNU make might
 
11908
# be invoked under some other name (usually "gmake"), in which
 
11909
# case it prints its new name instead of `make'.
 
11910
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
 
11911
   am__include=include
 
11912
   am__quote=
 
11913
   _am_result=GNU
 
11914
fi
 
11915
# Now try BSD make style include.
 
11916
if test "$am__include" = "#"; then
 
11917
   echo '.include "confinc"' > confmf
 
11918
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
11919
      am__include=.include
 
11920
      am__quote="\""
 
11921
      _am_result=BSD
 
11922
   fi
 
11923
fi
 
11924
AC_SUBST(am__include)
 
11925
AC_SUBST(am__quote)
 
11926
AC_MSG_RESULT($_am_result)
 
11927
rm -f confinc confmf
 
11928
])
 
11929
 
 
11930
 
 
11931
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
11932
 
 
11933
# This program is free software; you can redistribute it and/or modify
 
11934
# it under the terms of the GNU General Public License as published by
 
11935
# the Free Software Foundation; either version 2, or (at your option)
 
11936
# any later version.
 
11937
 
 
11938
# This program is distributed in the hope that it will be useful,
 
11939
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11940
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11941
# GNU General Public License for more details.
 
11942
 
 
11943
# You should have received a copy of the GNU General Public License
 
11944
# along with this program; if not, write to the Free Software
 
11945
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11946
# 02111-1307, USA.
 
11947
 
 
11948
# serial 3
 
11949
 
 
11950
AC_PREREQ(2.50)
 
11951
 
 
11952
# AM_PROG_LEX
 
11953
# -----------
 
11954
# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
 
11955
# "missing" invocation, for better error output.
 
11956
AC_DEFUN([AM_PROG_LEX],
 
11957
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
 
11958
AC_REQUIRE([AC_PROG_LEX])dnl
 
11959
if test "$LEX" = :; then
 
11960
  LEX=${am_missing_run}flex
 
11961
fi])
 
11962
 
 
11963
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
 
11964
 
 
11965
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
11966
 
 
11967
# This program is free software; you can redistribute it and/or modify
 
11968
# it under the terms of the GNU General Public License as published by
 
11969
# the Free Software Foundation; either version 2, or (at your option)
 
11970
# any later version.
 
11971
 
 
11972
# This program is distributed in the hope that it will be useful,
 
11973
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11974
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11975
# GNU General Public License for more details.
 
11976
 
 
11977
# You should have received a copy of the GNU General Public License
 
11978
# along with this program; if not, write to the Free Software
 
11979
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11980
# 02111-1307, USA.
 
11981
 
 
11982
AC_PREREQ([2.52])
 
11983
 
 
11984
# serial 6
 
11985
 
 
11986
# When config.status generates a header, we must update the stamp-h file.
 
11987
# This file resides in the same directory as the config header
 
11988
# that is generated.  We must strip everything past the first ":",
 
11989
# and everything past the last "/".
 
11990
 
 
11991
# _AM_DIRNAME(PATH)
 
11992
# -----------------
 
11993
# Like AS_DIRNAME, only do it during macro expansion
 
11994
AC_DEFUN([_AM_DIRNAME],
 
11995
       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
 
11996
              m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
 
11997
                    m4_if(regexp([$1], [^/.*]), -1,
 
11998
                          [.],
 
11999
                          patsubst([$1], [^\(/\).*], [\1])),
 
12000
                    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
 
12001
              patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
 
12002
])# _AM_DIRNAME
 
12003
 
 
12004
 
 
12005
# The stamp files are numbered to have different names.
 
12006
# We could number them on a directory basis, but that's additional
 
12007
# complications, let's have a unique counter.
 
12008
m4_define([_AM_STAMP_Count], [0])
 
12009
 
 
12010
 
 
12011
# _AM_STAMP(HEADER)
 
12012
# -----------------
 
12013
# The name of the stamp file for HEADER.
 
12014
AC_DEFUN([_AM_STAMP],
 
12015
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
 
12016
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
 
12017
                               [:.*])))/stamp-h[]_AM_STAMP_Count])
 
12018
 
 
12019
 
 
12020
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
 
12021
# ------------------------------------------------------------
 
12022
# We used to try to get a real timestamp in stamp-h.  But the fear is that
 
12023
# that will cause unnecessary cvs conflicts.
 
12024
AC_DEFUN([_AM_CONFIG_HEADER],
 
12025
[# Add the stamp file to the list of files AC keeps track of,
 
12026
# along with our hook.
 
12027
AC_CONFIG_HEADERS([$1],
 
12028
                  [# update the timestamp
 
12029
echo 'timestamp for $1' >"_AM_STAMP([$1])"
 
12030
$2],
 
12031
                  [$3])
 
12032
])# _AM_CONFIG_HEADER
 
12033
 
 
12034
 
 
12035
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
 
12036
# --------------------------------------------------------------
 
12037
AC_DEFUN([AM_CONFIG_HEADER],
 
12038
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
 
12039
])# AM_CONFIG_HEADER
 
12040