~ubuntu-branches/ubuntu/feisty/kde-systemsettings/feisty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-03-12 23:25:11 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20070312232511-6ciqt3p25wo9a0wh
Tags: 0.0svn20070312-0ubuntu1
New snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
2
2
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005  Free Software Foundation, Inc.
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
4
# Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
15
 
#
16
 
# This file is free software; the Free Software Foundation
17
 
# gives unlimited permission to copy and/or distribute it,
18
 
# with or without modifications, as long as this notice is preserved.
 
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., 51 Franklin Street, Fifth Floor,
 
32
dnl    Boston, MA 02110-1301, 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([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
 
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(program-name, variable-name, list-of-dirs,
 
189
dnl     if-not-found, test-parameter, prepend-path)
 
190
dnl
 
191
dnl Look for program-name in list-of-dirs+$PATH.
 
192
dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
 
193
dnl If found, $variable-name is set. If not, if-not-found is evaluated.
 
194
dnl test-parameter: if set, the program is executed with this arg,
 
195
dnl                 and only a successful exit code is required.
 
196
AC_DEFUN([KDE_FIND_PATH],
 
197
[
 
198
   AC_MSG_CHECKING([for $1])
 
199
   if test -n "$$2"; then
 
200
        kde_cv_path="$$2";
 
201
   else
 
202
        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
 
203
 
 
204
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
 
205
        [
 
206
        kde_cv_path="NONE"
 
207
        kde_save_IFS=$IFS
 
208
        IFS=':'
 
209
        dirs=""
 
210
        for dir in $PATH; do
 
211
          dirs="$dirs $dir"
 
212
        done
 
213
        if test -z "$6"; then  dnl Append dirs in PATH (default)
 
214
          dirs="$3 $dirs"
 
215
        else  dnl Prepend dirs in PATH (if 6th arg is set)
 
216
          dirs="$dirs $3"
 
217
        fi
 
218
        IFS=$kde_save_IFS
 
219
 
 
220
        for dir in $dirs; do
 
221
          if test -x "$dir/$1"; then
 
222
            if test -n "$5"
 
223
            then
 
224
              evalstr="$dir/$1 $5 2>&1 "
 
225
              if eval $evalstr; then
 
226
                kde_cv_path="$dir/$1"
 
227
                break
 
228
              fi
 
229
            else
 
230
                kde_cv_path="$dir/$1"
 
231
                break
 
232
            fi
 
233
          fi
 
234
        done
 
235
 
 
236
        eval "kde_cv_path_$kde_cache=$kde_cv_path"
 
237
 
 
238
        ])
 
239
 
 
240
      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
 
241
 
 
242
   fi
 
243
 
 
244
   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
 
245
      AC_MSG_RESULT(not found)
 
246
      $4
 
247
   else
 
248
      AC_MSG_RESULT($kde_cv_path)
 
249
      $2=$kde_cv_path
 
250
 
 
251
   fi
 
252
])
 
253
 
 
254
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
 
255
[
 
256
    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
 
257
Please check whether you installed Qt correctly.
 
258
You need to have a running moc binary.
 
259
configure tried to run $ac_cv_path_moc and the test didn't
 
260
succeed. If configure shouldn't have tried this one, set
 
261
the environment variable MOC to the right one before running
 
262
configure.
 
263
])
 
264
])
 
265
 
 
266
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
 
267
[
 
268
    AC_MSG_WARN([No Qt ui compiler (uic) found!
 
269
Please check whether you installed Qt correctly.
 
270
You need to have a running uic binary.
 
271
configure tried to run $ac_cv_path_uic and the test didn't
 
272
succeed. If configure shouldn't have tried this one, set
 
273
the environment variable UIC to the right one before running
 
274
configure.
 
275
])
 
276
])
 
277
 
 
278
 
 
279
AC_DEFUN([KDE_CHECK_UIC_FLAG],
 
280
[
 
281
    AC_MSG_CHECKING([whether uic supports -$1 ])
 
282
    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
 
283
    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
 
284
    [
 
285
        cat >conftest.ui <<EOT
 
286
        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
 
287
EOT
 
288
        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
 
289
        if AC_TRY_EVAL(ac_uic_testrun); then
 
290
            eval "kde_cv_prog_uic_$kde_cache=yes"
 
291
        else
 
292
            eval "kde_cv_prog_uic_$kde_cache=no"
 
293
        fi
 
294
        rm -f conftest*
 
295
    ])
 
296
 
 
297
    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
 
298
        AC_MSG_RESULT([yes])
 
299
        :
 
300
        $3
 
301
    else
 
302
        AC_MSG_RESULT([no])
 
303
        :
 
304
        $4
 
305
    fi
 
306
])
 
307
 
 
308
 
 
309
dnl ------------------------------------------------------------------------
 
310
dnl Find the meta object compiler and the ui compiler in the PATH,
 
311
dnl in $QTDIR/bin, and some more usual places
 
312
dnl ------------------------------------------------------------------------
 
313
dnl
 
314
AC_DEFUN([AC_PATH_QT_MOC_UIC],
 
315
[
 
316
   AC_REQUIRE([KDE_CHECK_PERL])
 
317
   qt_bindirs=""
 
318
   for dir in $kde_qt_dirs; do
 
319
      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
 
320
   done
 
321
   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
 
322
   if test ! "$ac_qt_bindir" = "NO"; then
 
323
      qt_bindirs="$ac_qt_bindir $qt_bindirs"
 
324
   fi
 
325
 
 
326
   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
 
327
   if test -z "$UIC_NOT_NEEDED"; then
 
328
     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
 
329
     if test -z "$UIC_PATH" ; then
 
330
       KDE_UIC_ERROR_MESSAGE
 
331
       exit 1
 
332
     else
 
333
       UIC=$UIC_PATH
 
334
 
 
335
       if test $kde_qtver = 3; then
 
336
         KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
 
337
         KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
 
338
 
 
339
         if test x$ac_uic_supports_libpath = xyes; then
 
340
             UIC="$UIC -L \$(kde_widgetdir)"
 
341
         fi
 
342
         if test x$ac_uic_supports_nounload = xyes; then
 
343
             UIC="$UIC -nounload"
 
344
         fi
 
345
       fi
 
346
     fi
 
347
   else
 
348
     UIC="echo uic not available: "
 
349
   fi
 
350
 
 
351
   AC_SUBST(MOC)
 
352
   AC_SUBST(UIC)
 
353
 
 
354
   UIC_TR="i18n"
 
355
   if test $kde_qtver = 3; then
 
356
     UIC_TR="tr2i18n"
 
357
   fi
 
358
 
 
359
   AC_SUBST(UIC_TR)
 
360
])
 
361
 
 
362
AC_DEFUN([KDE_1_CHECK_PATHS],
 
363
[
 
364
  KDE_1_CHECK_PATH_HEADERS
 
365
 
 
366
  KDE_TEST_RPATH=
 
367
 
 
368
  if test -n "$USE_RPATH"; then
 
369
 
 
370
     if test -n "$kde_libraries"; then
 
371
       KDE_TEST_RPATH="-R $kde_libraries"
 
372
     fi
 
373
 
 
374
     if test -n "$qt_libraries"; then
 
375
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
 
376
     fi
 
377
 
 
378
     if test -n "$x_libraries"; then
 
379
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
 
380
     fi
 
381
 
 
382
     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
 
383
  fi
 
384
 
 
385
AC_MSG_CHECKING([for KDE libraries installed])
 
386
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'
 
387
 
 
388
if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
389
  AC_MSG_RESULT(yes)
 
390
else
 
391
  AC_MSG_ERROR([your system fails at linking a small KDE application!
 
392
Check, if your compiler is installed correctly and if you have used the
 
393
same compiler to compile Qt and kdelibs as you did use now.
 
394
For more details about this problem, look at the end of config.log.])
 
395
fi
 
396
 
 
397
if eval `KDEDIR= ./conftest 2>&5`; then
 
398
  kde_result=done
 
399
else
 
400
  kde_result=problems
 
401
fi
 
402
 
 
403
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
 
404
kde_have_all_paths=yes
 
405
 
 
406
KDE_SET_PATHS($kde_result)
 
407
 
 
408
])
 
409
 
 
410
AC_DEFUN([KDE_SET_PATHS],
 
411
[
 
412
  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
 
413
        kde_htmldir=\"$kde_htmldir\" \
 
414
        kde_appsdir=\"$kde_appsdir\" \
 
415
        kde_icondir=\"$kde_icondir\" \
 
416
        kde_sounddir=\"$kde_sounddir\" \
 
417
        kde_datadir=\"$kde_datadir\" \
 
418
        kde_locale=\"$kde_locale\" \
 
419
        kde_cgidir=\"$kde_cgidir\" \
 
420
        kde_confdir=\"$kde_confdir\" \
 
421
        kde_kcfgdir=\"$kde_kcfgdir\" \
 
422
        kde_mimedir=\"$kde_mimedir\" \
 
423
        kde_toolbardir=\"$kde_toolbardir\" \
 
424
        kde_wallpaperdir=\"$kde_wallpaperdir\" \
 
425
        kde_templatesdir=\"$kde_templatesdir\" \
 
426
        kde_bindir=\"$kde_bindir\" \
 
427
        kde_servicesdir=\"$kde_servicesdir\" \
 
428
        kde_servicetypesdir=\"$kde_servicetypesdir\" \
 
429
        kde_moduledir=\"$kde_moduledir\" \
 
430
        kde_styledir=\"$kde_styledir\" \
 
431
        kde_widgetdir=\"$kde_widgetdir\" \
 
432
        xdg_appsdir=\"$xdg_appsdir\" \
 
433
        xdg_menudir=\"$xdg_menudir\" \
 
434
        xdg_directorydir=\"$xdg_directorydir\" \
 
435
        kde_result=$1"
 
436
])
 
437
 
 
438
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
 
439
[
 
440
if test "$1" = "default"; then
 
441
 
 
442
  if test -z "$kde_htmldir"; then
 
443
    kde_htmldir='\${datadir}/doc/HTML'
 
444
  fi
 
445
  if test -z "$kde_appsdir"; then
 
446
    kde_appsdir='\${datadir}/applnk'
 
447
  fi
 
448
  if test -z "$kde_icondir"; then
 
449
    kde_icondir='\${datadir}/icons'
 
450
  fi
 
451
  if test -z "$kde_sounddir"; then
 
452
    kde_sounddir='\${datadir}/sounds'
 
453
  fi
 
454
  if test -z "$kde_datadir"; then
 
455
    kde_datadir='\${datadir}/apps'
 
456
  fi
 
457
  if test -z "$kde_locale"; then
 
458
    kde_locale='\${datadir}/locale'
 
459
  fi
 
460
  if test -z "$kde_cgidir"; then
 
461
    kde_cgidir='\${exec_prefix}/cgi-bin'
 
462
  fi
 
463
  if test -z "$kde_confdir"; then
 
464
    kde_confdir='\${datadir}/config'
 
465
  fi
 
466
  if test -z "$kde_kcfgdir"; then
 
467
    kde_kcfgdir='\${datadir}/config.kcfg'
 
468
  fi
 
469
  if test -z "$kde_mimedir"; then
 
470
    kde_mimedir='\${datadir}/mimelnk'
 
471
  fi
 
472
  if test -z "$kde_toolbardir"; then
 
473
    kde_toolbardir='\${datadir}/toolbar'
 
474
  fi
 
475
  if test -z "$kde_wallpaperdir"; then
 
476
    kde_wallpaperdir='\${datadir}/wallpapers'
 
477
  fi
 
478
  if test -z "$kde_templatesdir"; then
 
479
    kde_templatesdir='\${datadir}/templates'
 
480
  fi
 
481
  if test -z "$kde_bindir"; then
 
482
    kde_bindir='\${exec_prefix}/bin'
 
483
  fi
 
484
  if test -z "$kde_servicesdir"; then
 
485
    kde_servicesdir='\${datadir}/services'
 
486
  fi
 
487
  if test -z "$kde_servicetypesdir"; then
 
488
    kde_servicetypesdir='\${datadir}/servicetypes'
 
489
  fi
 
490
  if test -z "$kde_moduledir"; then
 
491
    if test "$kde_qtver" = "2"; then
 
492
      kde_moduledir='\${libdir}/kde2'
 
493
    else
 
494
      kde_moduledir='\${libdir}/kde3'
 
495
    fi
 
496
  fi
 
497
  if test -z "$kde_styledir"; then
 
498
    kde_styledir='\${libdir}/kde3/plugins/styles'
 
499
  fi
 
500
  if test -z "$kde_widgetdir"; then
 
501
    kde_widgetdir='\${libdir}/kde3/plugins/designer'
 
502
  fi
 
503
  if test -z "$xdg_appsdir"; then
 
504
    xdg_appsdir='\${datadir}/applications/kde'
 
505
  fi
 
506
  if test -z "$xdg_menudir"; then
 
507
    xdg_menudir='\${sysconfdir}/xdg/menus'
 
508
  fi
 
509
  if test -z "$xdg_directorydir"; then
 
510
    xdg_directorydir='\${datadir}/desktop-directories'
 
511
  fi
 
512
 
 
513
  KDE_SET_PATHS(defaults)
 
514
 
 
515
else
 
516
 
 
517
  if test $kde_qtver = 1; then
 
518
     AC_MSG_RESULT([compiling])
 
519
     KDE_1_CHECK_PATHS
 
520
  else
 
521
     AC_MSG_ERROR([path checking not yet supported for KDE 2])
 
522
  fi
 
523
 
 
524
fi
 
525
])
 
526
 
 
527
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
 
528
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
 
529
   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
 
530
   test -z "$kde_datadir" || test -z "$kde_locale"  ||
 
531
   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
 
532
   test -z "$kde_kcfgdir" ||
 
533
   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
 
534
   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
 
535
   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
 
536
   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
 
537
   test -z "$kde_styledir" || test -z "kde_widgetdir" ||
 
538
   test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
 
539
   test "x$kde_have_all_paths" != "xyes"; then
 
540
     kde_have_all_paths=no
 
541
  fi
 
542
])
 
543
 
 
544
AC_DEFUN([KDE_MISSING_PROG_ERROR],
 
545
[
 
546
    AC_MSG_ERROR([The important program $1 was not found!
 
547
Please check whether you installed KDE correctly.
 
548
])
 
549
])
 
550
 
 
551
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
 
552
[
 
553
    AC_MSG_ERROR([The important program $1 was not found!
 
554
Please check whether you installed aRts correctly or use
 
555
--without-arts to compile without aRts support (this will remove functionality).
 
556
])
 
557
])
 
558
 
 
559
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
 
560
[
 
561
    kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
 
562
    test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
 
563
    if test -n "$KDEDIRS"; then
 
564
       kde_save_IFS=$IFS
 
565
       IFS=:
 
566
       for dir in $KDEDIRS; do
 
567
            kde_default_bindirs="$dir/bin $kde_default_bindirs "
 
568
       done
 
569
       IFS=$kde_save_IFS
 
570
    fi
 
571
])
 
572
 
 
573
AC_DEFUN([KDE_SUBST_PROGRAMS],
 
574
[
 
575
    AC_ARG_WITH(arts,
 
576
        AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
 
577
        [build_arts=$withval],
 
578
        [build_arts=yes]
 
579
    )
 
580
    AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
 
581
    if test "$build_arts" = "no"; then
 
582
        AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
 
583
    fi
 
584
 
 
585
        KDE_SET_DEFAULT_BINDIRS
 
586
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
 
587
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
 
588
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
 
589
        if test "$build_arts" '!=' "no"; then
 
590
          KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
 
591
          KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
 
592
        fi
 
593
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
 
594
 
 
595
        kde32ornewer=1
 
596
        kde33ornewer=1
 
597
        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
 
598
            kde32ornewer=
 
599
            kde33ornewer=
 
600
        else
 
601
            if test "$kde_qtver" = "3"; then
 
602
              if test "$kde_qtsubver" -le 1; then
 
603
                kde32ornewer=
 
604
              fi
 
605
              if test "$kde_qtsubver" -le 2; then
 
606
                kde33ornewer=
 
607
              fi
 
608
              if test "$KDECONFIG" != "compiled"; then
 
609
                if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
 
610
                  kde33ornewer=
 
611
                fi
 
612
              fi
 
613
            fi
 
614
        fi
 
615
 
 
616
        if test -n "$kde32ornewer"; then
 
617
            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
 
618
            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
 
619
        fi
 
620
        if test -n "$kde33ornewer"; then
 
621
            KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
 
622
            AC_SUBST(MAKEKDEWIDGETS)
 
623
        fi
 
624
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
 
625
 
 
626
        if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
 
627
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
 
628
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
 
629
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
 
630
            if test "$KDE_XSL_STYLESHEET" = "NO"; then
 
631
                KDE_XSL_STYLESHEET=""
 
632
            else
 
633
                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
 
634
            fi
 
635
        fi
 
636
 
 
637
        DCOP_DEPENDENCIES='$(DCOPIDL)'
 
638
        if test -n "$kde32ornewer"; then
 
639
            KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
 
640
            DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
 
641
            AC_SUBST(KCONFIG_COMPILER)
 
642
            AC_SUBST(KCFG_DEPENDENCIES)
 
643
            AC_SUBST(DCOPIDLNG)
 
644
        fi
 
645
        AC_SUBST(DCOPIDL)
 
646
        AC_SUBST(DCOPIDL2CPP)
 
647
        AC_SUBST(DCOP_DEPENDENCIES)
 
648
        AC_SUBST(MCOPIDL)
 
649
        AC_SUBST(ARTSCCONFIG)
 
650
        AC_SUBST(MEINPROC)
 
651
        AC_SUBST(KDE_XSL_STYLESHEET)
 
652
        AC_SUBST(XMLLINT)
 
653
])dnl
 
654
 
 
655
AC_DEFUN([AC_CREATE_KFSSTND],
 
656
[
 
657
AC_REQUIRE([AC_CHECK_RPATH])
 
658
 
 
659
AC_MSG_CHECKING([for KDE paths])
 
660
kde_result=""
 
661
kde_cached_paths=yes
 
662
AC_CACHE_VAL(kde_cv_all_paths,
 
663
[
 
664
  KDE_SET_DEFAULT_PATHS($1)
 
665
  kde_cached_paths=no
 
666
])
 
667
eval "$kde_cv_all_paths"
 
668
KDE_CHECK_PATHS_FOR_COMPLETENESS
 
669
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
 
670
  # wrong values were cached, may be, we can set better ones
 
671
  kde_result=
 
672
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
 
673
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
 
674
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
 
675
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
 
676
  kde_have_all_paths=
 
677
  kde_styledir=
 
678
  kde_widgetdir=
 
679
  xdg_appsdir = xdg_menudir= xdg_directorydir= 
 
680
  KDE_SET_DEFAULT_PATHS($1)
 
681
  eval "$kde_cv_all_paths"
 
682
  KDE_CHECK_PATHS_FOR_COMPLETENESS
 
683
  kde_result="$kde_result (cache overridden)"
 
684
fi
 
685
if test "$kde_have_all_paths" = "no"; then
 
686
  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
 
687
Since it had compiled and linked before, it must be a strange problem on your system.
 
688
Look at config.log for details. If you are not able to fix this, look at
 
689
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
 
690
(If you're using an egcs version on Linux, you may update binutils!)
 
691
])
 
692
else
 
693
  rm -f conftest*
 
694
  AC_MSG_RESULT($kde_result)
 
695
fi
 
696
 
 
697
bindir=$kde_bindir
 
698
 
 
699
KDE_SUBST_PROGRAMS
 
700
 
 
701
])
 
702
 
 
703
AC_DEFUN([AC_SUBST_KFSSTND],
 
704
[
 
705
AC_SUBST(kde_htmldir)
 
706
AC_SUBST(kde_appsdir)
 
707
AC_SUBST(kde_icondir)
 
708
AC_SUBST(kde_sounddir)
 
709
AC_SUBST(kde_datadir)
 
710
AC_SUBST(kde_locale)
 
711
AC_SUBST(kde_confdir)
 
712
AC_SUBST(kde_kcfgdir)
 
713
AC_SUBST(kde_mimedir)
 
714
AC_SUBST(kde_wallpaperdir)
 
715
AC_SUBST(kde_bindir)
 
716
dnl X Desktop Group standards
 
717
AC_SUBST(xdg_appsdir)
 
718
AC_SUBST(xdg_menudir)
 
719
AC_SUBST(xdg_directorydir)
 
720
dnl for KDE 2
 
721
AC_SUBST(kde_templatesdir)
 
722
AC_SUBST(kde_servicesdir)
 
723
AC_SUBST(kde_servicetypesdir)
 
724
AC_SUBST(kde_moduledir)
 
725
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
 
726
AC_SUBST(kde_styledir)
 
727
AC_SUBST(kde_widgetdir)
 
728
if test "$kde_qtver" = 1; then
 
729
  kde_minidir="$kde_icondir/mini"
 
730
else
 
731
# for KDE 1 - this breaks KDE2 apps using minidir, but
 
732
# that's the plan ;-/
 
733
  kde_minidir="/dev/null"
 
734
fi
 
735
dnl AC_SUBST(kde_minidir)
 
736
dnl AC_SUBST(kde_cgidir)
 
737
dnl AC_SUBST(kde_toolbardir)
 
738
])
 
739
 
 
740
AC_DEFUN([KDE_MISC_TESTS],
 
741
[
 
742
   dnl Checks for libraries.
 
743
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
 
744
   AC_SUBST(LIBUTIL)
 
745
   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
 
746
   AC_SUBST(LIBCOMPAT)
 
747
   kde_have_crypt=
 
748
   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
 
749
      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
 
750
        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
 
751
You should install libcrypt from another source or configure with PAM
 
752
support])
 
753
        kde_have_crypt=no
 
754
      ]))
 
755
   AC_SUBST(LIBCRYPT)
 
756
   if test $kde_have_crypt = yes; then
 
757
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
 
758
   fi
 
759
   AC_CHECK_SOCKLEN_T
 
760
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
 
761
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
 
762
      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
 
763
        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
 
764
   fi
 
765
   AC_CHECK_FUNC(inet_ntoa)
 
766
   if test $ac_cv_func_inet_ntoa = no; then
 
767
     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
 
768
   fi
 
769
   AC_CHECK_FUNC(connect)
 
770
   if test $ac_cv_func_connect = no; then
 
771
      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
 
772
        $X_EXTRA_LIBS)
 
773
   fi
 
774
 
 
775
   AC_CHECK_FUNC(remove)
 
776
   if test $ac_cv_func_remove = no; then
 
777
      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
 
778
   fi
 
779
 
 
780
   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
 
781
   AC_CHECK_FUNC(shmat, ,
 
782
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
 
783
   
 
784
   # more headers that need to be explicitly included on darwin
 
785
   AC_CHECK_HEADERS(sys/types.h stdint.h)
 
786
 
 
787
   # sys/bitypes.h is needed for uint32_t and friends on Tru64
 
788
   AC_CHECK_HEADERS(sys/bitypes.h)
 
789
 
 
790
   # darwin requires a poll emulation library
 
791
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
 
792
 
 
793
   # for some image handling on Mac OS X
 
794
   AC_CHECK_HEADERS(Carbon/Carbon.h)
 
795
 
 
796
   # CoreAudio framework
 
797
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
 
798
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
 
799
     FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio"
 
800
   ])
 
801
 
 
802
   AC_CHECK_RES_INIT
 
803
   AC_SUBST(LIB_POLL)
 
804
   AC_SUBST(FRAMEWORK_COREAUDIO)
 
805
   LIBSOCKET="$X_EXTRA_LIBS"
 
806
   AC_SUBST(LIBSOCKET)
 
807
   AC_SUBST(X_EXTRA_LIBS)
 
808
   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
 
809
   AC_SUBST(LIBUCB)
 
810
 
 
811
   case $host in  dnl this *is* LynxOS specific
 
812
   *-*-lynxos* )
 
813
        AC_MSG_CHECKING([LynxOS header file wrappers])
 
814
        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
 
815
        AC_MSG_RESULT(disabled)
 
816
        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
 
817
         ;;
 
818
    esac
 
819
 
 
820
   KDE_CHECK_TYPES
 
821
   KDE_CHECK_LIBDL
 
822
   KDE_CHECK_STRLCPY
 
823
   KDE_CHECK_PIE_SUPPORT
 
824
 
 
825
# darwin needs this to initialize the environment
 
826
AC_CHECK_HEADERS(crt_externs.h)
 
827
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
 
828
 
 
829
AH_VERBATIM(_DARWIN_ENVIRON,
 
830
[
 
831
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
 
832
# include <sys/time.h>
 
833
# include <crt_externs.h>
 
834
# define environ (*_NSGetEnviron())
 
835
#endif
 
836
])
 
837
 
 
838
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
 
839
[
 
840
/*
 
841
 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
 
842
 * that defines bzero.
 
843
 */
 
844
 
 
845
#if defined(_AIX)
 
846
#include <strings.h>
 
847
#endif
 
848
])
 
849
 
 
850
AC_CHECK_FUNCS([vsnprintf snprintf])
 
851
 
 
852
AH_VERBATIM(_TRU64,[
 
853
/*
 
854
 * On HP-UX, the declaration of vsnprintf() is needed every time !
 
855
 */
 
856
 
 
857
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
 
858
#if __STDC__
 
859
#include <stdarg.h>
 
860
#include <stdlib.h>
 
861
#else
 
862
#include <varargs.h>
 
863
#endif
 
864
#ifdef __cplusplus
 
865
extern "C"
 
866
#endif
 
867
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
 
868
#ifdef __cplusplus
 
869
extern "C"
 
870
#endif
 
871
int snprintf(char *str, size_t n, char const *fmt, ...);
 
872
#endif
 
873
])
 
874
 
 
875
])
 
876
 
 
877
dnl ------------------------------------------------------------------------
 
878
dnl Find the header files and libraries for X-Windows. Extended the
 
879
dnl macro AC_PATH_X
 
880
dnl ------------------------------------------------------------------------
 
881
dnl
 
882
AC_DEFUN([K_PATH_X],
 
883
[
 
884
AC_REQUIRE([KDE_MISC_TESTS])dnl
 
885
AC_REQUIRE([KDE_CHECK_LIB64])
 
886
 
 
887
AC_ARG_ENABLE(
 
888
  embedded,
 
889
  AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
 
890
  kde_use_qt_emb=$enableval,
 
891
  kde_use_qt_emb=no
 
892
)
 
893
 
 
894
AC_ARG_ENABLE(
 
895
  qtopia,
 
896
  AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
 
897
  kde_use_qt_emb_palm=$enableval,
 
898
  kde_use_qt_emb_palm=no
 
899
)
 
900
 
 
901
AC_ARG_ENABLE(
 
902
  mac,
 
903
  AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
 
904
  kde_use_qt_mac=$enableval,
 
905
  kde_use_qt_mac=no
 
906
)
 
907
 
 
908
# used to disable x11-specific stuff on special platforms
 
909
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
 
910
 
 
911
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
 
912
 
 
913
AC_MSG_CHECKING(for X)
 
914
 
 
915
AC_CACHE_VAL(kde_cv_have_x,
 
916
[# One or both of the vars are not set, and there is no cached value.
 
917
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
 
918
   kde_x_includes=NO
 
919
else
 
920
   kde_x_includes=$x_includes
 
921
fi
 
922
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
 
923
   kde_x_libraries=NO
 
924
else
 
925
   kde_x_libraries=$x_libraries
 
926
fi
 
927
 
 
928
# below we use the standard autoconf calls
 
929
ac_x_libraries=$kde_x_libraries
 
930
ac_x_includes=$kde_x_includes
 
931
 
 
932
KDE_PATH_X_DIRECT
 
933
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
 
934
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
 
935
dnl location. The correct location is /usr/lib32 or an undefined value
 
936
dnl (the linker is smart enough to pick the correct default library).
 
937
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
 
938
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
 
939
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
 
940
dnl x_includes should be left alone.
 
941
case "$host" in
 
942
mips-sgi-irix6*)
 
943
  ;;
 
944
*-*-solaris*)
 
945
  ;;
 
946
*)
 
947
  _AC_PATH_X_XMKMF
 
948
  if test -z "$ac_x_includes"; then
 
949
    ac_x_includes="."
 
950
  fi
 
951
  if test -z "$ac_x_libraries"; then
 
952
    ac_x_libraries="/usr/lib${kdelibsuff}"
 
953
  fi
 
954
esac
 
955
#from now on we use our own again
 
956
 
 
957
# when the user already gave --x-includes, we ignore
 
958
# what the standard autoconf macros told us.
 
959
if test "$kde_x_includes" = NO; then
 
960
  kde_x_includes=$ac_x_includes
 
961
fi
 
962
 
 
963
# for --x-libraries too
 
964
if test "$kde_x_libraries" = NO; then
 
965
  kde_x_libraries=$ac_x_libraries
 
966
fi
 
967
 
 
968
if test "$kde_x_includes" = NO; then
 
969
  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
 
970
fi
 
971
 
 
972
if test "$kde_x_libraries" = NO; then
 
973
  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
 
974
fi
 
975
 
 
976
# Record where we found X for the cache.
 
977
kde_cv_have_x="have_x=yes \
 
978
         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
 
979
])dnl
 
980
 
 
981
eval "$kde_cv_have_x"
 
982
 
 
983
if test "$have_x" != yes; then
 
984
  AC_MSG_RESULT($have_x)
 
985
  no_x=yes
 
986
else
 
987
  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
 
988
fi
 
989
 
 
990
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
 
991
  X_INCLUDES=""
 
992
  x_includes="."; dnl better than nothing :-
 
993
 else
 
994
  x_includes=$kde_x_includes
 
995
  X_INCLUDES="-I$x_includes"
 
996
fi
 
997
 
 
998
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
 
999
  X_LDFLAGS=""
 
1000
  x_libraries="/usr/lib"; dnl better than nothing :-
 
1001
 else
 
1002
  x_libraries=$kde_x_libraries
 
1003
  X_LDFLAGS="-L$x_libraries"
 
1004
fi
 
1005
all_includes="$X_INCLUDES"
 
1006
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
 
1007
 
 
1008
# Check for libraries that X11R6 Xt/Xaw programs need.
 
1009
ac_save_LDFLAGS="$LDFLAGS"
 
1010
LDFLAGS="$LDFLAGS $X_LDFLAGS"
 
1011
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
 
1012
# check for ICE first), but we must link in the order -lSM -lICE or
 
1013
# we get undefined symbols.  So assume we have SM if we have ICE.
 
1014
# These have to be linked with before -lX11, unlike the other
 
1015
# libraries we check for below, so use a different variable.
 
1016
#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
 
1017
AC_CHECK_LIB(ICE, IceConnectionNumber,
 
1018
  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
 
1019
LDFLAGS="$ac_save_LDFLAGS"
 
1020
 
 
1021
LIB_X11='-lX11 $(LIBSOCKET)'
 
1022
 
 
1023
AC_MSG_CHECKING(for libXext)
 
1024
AC_CACHE_VAL(kde_cv_have_libXext,
 
1025
[
 
1026
kde_ldflags_safe="$LDFLAGS"
 
1027
kde_libs_safe="$LIBS"
 
1028
 
 
1029
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
 
1030
LIBS="-lXext -lX11 $LIBSOCKET"
 
1031
 
 
1032
AC_TRY_LINK([
 
1033
#include <stdio.h>
 
1034
#ifdef STDC_HEADERS
 
1035
# include <stdlib.h>
 
1036
#endif
 
1037
],
 
1038
[
 
1039
printf("hello Xext\n");
 
1040
],
 
1041
kde_cv_have_libXext=yes,
 
1042
kde_cv_have_libXext=no
 
1043
)
 
1044
 
 
1045
LDFLAGS=$kde_ldflags_safe
 
1046
LIBS=$kde_libs_safe
 
1047
])
 
1048
 
 
1049
AC_MSG_RESULT($kde_cv_have_libXext)
 
1050
 
 
1051
if test "$kde_cv_have_libXext" = "no"; then
 
1052
  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
 
1053
can't find it itself, we stop here assuming that make wouldn't find
 
1054
them either.])
 
1055
fi
 
1056
 
 
1057
LIB_XEXT="-lXext"
 
1058
QTE_NORTTI=""
 
1059
 
 
1060
elif test "$kde_use_qt_emb" = "yes"; then
 
1061
  dnl We're using QT Embedded
 
1062
  CPPFLAGS=-DQWS
 
1063
  CXXFLAGS="$CXXFLAGS -fno-rtti"
 
1064
  QTE_NORTTI="-fno-rtti -DQWS"
 
1065
  X_PRE_LIBS=""
 
1066
  LIB_X11=""
 
1067
  LIB_XEXT=""
 
1068
  LIB_XRENDER=""
 
1069
  LIBSM=""
 
1070
  X_INCLUDES=""
 
1071
  X_LDFLAGS=""
 
1072
  x_includes=""
 
1073
  x_libraries=""
 
1074
elif test "$kde_use_qt_mac" = "yes"; then
 
1075
  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
 
1076
  dnl be included to get the information) --Sam
 
1077
  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
 
1078
  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
 
1079
  X_PRE_LIBS=""
 
1080
  LIB_X11=""
 
1081
  LIB_XEXT=""
 
1082
  LIB_XRENDER=""
 
1083
  LIBSM=""
 
1084
  X_INCLUDES=""
 
1085
  X_LDFLAGS=""
 
1086
  x_includes=""
 
1087
  x_libraries=""
 
1088
fi
 
1089
AC_SUBST(X_PRE_LIBS)
 
1090
AC_SUBST(LIB_X11)
 
1091
AC_SUBST(LIB_XRENDER)
 
1092
AC_SUBST(LIBSM)
 
1093
AC_SUBST(X_INCLUDES)
 
1094
AC_SUBST(X_LDFLAGS)
 
1095
AC_SUBST(x_includes)
 
1096
AC_SUBST(x_libraries)
 
1097
AC_SUBST(QTE_NORTTI)
 
1098
AC_SUBST(LIB_XEXT)
 
1099
 
 
1100
])
 
1101
 
 
1102
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
 
1103
[
 
1104
AC_REQUIRE([KDE_USE_QT])
 
1105
cat > conftest.$ac_ext <<EOF
 
1106
#include "confdefs.h"
 
1107
#include <qglobal.h>
 
1108
#include <qapplication.h>
 
1109
EOF
 
1110
if test "$kde_qtver" = "2"; then
 
1111
cat >> conftest.$ac_ext <<EOF
 
1112
#include <qevent.h>
 
1113
#include <qstring.h>
 
1114
#include <qstyle.h>
 
1115
EOF
 
1116
 
 
1117
if test $kde_qtsubver -gt 0; then
 
1118
cat >> conftest.$ac_ext <<EOF
 
1119
#if QT_VERSION < 210
 
1120
#error 1
 
1121
#endif
 
1122
EOF
 
1123
fi
 
1124
fi
 
1125
 
 
1126
if test "$kde_qtver" = "3"; then
 
1127
cat >> conftest.$ac_ext <<EOF
 
1128
#include <qcursor.h>
 
1129
#include <qstylefactory.h>
 
1130
#include <private/qucomextra_p.h>
 
1131
EOF
 
1132
fi
 
1133
 
 
1134
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
 
1135
cat >> conftest.$ac_ext <<EOF
 
1136
#error 1
 
1137
#endif
 
1138
 
 
1139
int main() {
 
1140
EOF
 
1141
if test "$kde_qtver" = "2"; then
 
1142
cat >> conftest.$ac_ext <<EOF
 
1143
    QStringList *t = new QStringList();
 
1144
    Q_UNUSED(t);
 
1145
EOF
 
1146
if test $kde_qtsubver -gt 0; then
 
1147
cat >> conftest.$ac_ext <<EOF
 
1148
    QString s;
 
1149
    s.setLatin1("Elvis is alive", 14);
 
1150
EOF
 
1151
fi
 
1152
fi
 
1153
if test "$kde_qtver" = "3"; then
 
1154
cat >> conftest.$ac_ext <<EOF
 
1155
    (void)QStyleFactory::create(QString::null);
 
1156
    QCursor c(Qt::WhatsThisCursor);
 
1157
EOF
 
1158
fi
 
1159
cat >> conftest.$ac_ext <<EOF
 
1160
    return 0;
 
1161
}
 
1162
EOF
 
1163
])
 
1164
 
 
1165
AC_DEFUN([KDE_USE_QT],
 
1166
[
 
1167
if test -z "$1"; then
 
1168
  # Current default Qt version: 3.3
 
1169
  kde_qtver=3
 
1170
  kde_qtsubver=3
 
1171
else
 
1172
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
 
1173
  # following is the check if subversion isnt found in passed argument
 
1174
  if test "$kde_qtsubver" = "$1"; then
 
1175
    kde_qtsubver=1
 
1176
  fi
 
1177
  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
 
1178
  if test "$kde_qtver" = "1"; then
 
1179
    kde_qtsubver=42
 
1180
  fi
 
1181
fi
 
1182
 
 
1183
if test -z "$2"; then
 
1184
  if test "$kde_qtver" = "2"; then
 
1185
    if test $kde_qtsubver -gt 0; then
 
1186
      kde_qt_minversion=">= Qt 2.2.2"
 
1187
    else
 
1188
      kde_qt_minversion=">= Qt 2.0.2"
 
1189
    fi
 
1190
  fi
 
1191
  if test "$kde_qtver" = "3"; then
 
1192
    if test $kde_qtsubver -gt 0; then
 
1193
         if test $kde_qtsubver -gt 1; then
 
1194
            if test $kde_qtsubver -gt 2; then
 
1195
                kde_qt_minversion=">= Qt 3.3 and < 4.0"
 
1196
            else
 
1197
                kde_qt_minversion=">= Qt 3.2 and < 4.0"
 
1198
            fi
 
1199
         else
 
1200
            kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
 
1201
         fi
 
1202
    else
 
1203
      kde_qt_minversion=">= Qt 3.0 and < 4.0"
 
1204
    fi
 
1205
  fi
 
1206
  if test "$kde_qtver" = "1"; then
 
1207
    kde_qt_minversion=">= 1.42 and < 2.0"
 
1208
  fi
 
1209
else
 
1210
   kde_qt_minversion="$2"
 
1211
fi
 
1212
 
 
1213
if test -z "$3"; then
 
1214
   if test $kde_qtver = 3; then
 
1215
     if test $kde_qtsubver -gt 0; then
 
1216
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
 
1217
       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
 
1218
       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
 
1219
     else
 
1220
       kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
 
1221
     fi
 
1222
   fi
 
1223
   if test $kde_qtver = 2; then
 
1224
     if test $kde_qtsubver -gt 0; then
 
1225
       kde_qt_verstring="QT_VERSION >= 222"
 
1226
     else
 
1227
       kde_qt_verstring="QT_VERSION >= 200"
 
1228
     fi
 
1229
   fi
 
1230
   if test $kde_qtver = 1; then
 
1231
    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
 
1232
   fi
 
1233
else
 
1234
   kde_qt_verstring="$3"
 
1235
fi
 
1236
 
 
1237
if test $kde_qtver = 4; then
 
1238
  kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
 
1239
fi
 
1240
if test $kde_qtver = 3; then
 
1241
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
 
1242
fi
 
1243
if test $kde_qtver = 2; then
 
1244
   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
 
1245
fi
 
1246
if test $kde_qtver = 1; then
 
1247
   kde_qt_dirs="$QTDIR /usr/lib/qt"
 
1248
fi
 
1249
])
 
1250
 
 
1251
AC_DEFUN([KDE_CHECK_QT_DIRECT],
 
1252
[
 
1253
AC_REQUIRE([KDE_USE_QT])
 
1254
AC_MSG_CHECKING([if Qt compiles without flags])
 
1255
AC_CACHE_VAL(kde_cv_qt_direct,
 
1256
[
 
1257
AC_LANG_SAVE
 
1258
AC_LANG_CPLUSPLUS
 
1259
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
 
1260
ac_LIBRARY_PATH="$LIBRARY_PATH"
 
1261
ac_cxxflags_safe="$CXXFLAGS"
 
1262
ac_ldflags_safe="$LDFLAGS"
 
1263
ac_libs_safe="$LIBS"
 
1264
 
 
1265
CXXFLAGS="$CXXFLAGS -I$qt_includes"
 
1266
LDFLAGS="$LDFLAGS $X_LDFLAGS"
 
1267
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
1268
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
 
1269
else
 
1270
LIBS="$LIBQT $LIBSOCKET"
 
1271
fi
 
1272
LD_LIBRARY_PATH=
 
1273
export LD_LIBRARY_PATH
 
1274
LIBRARY_PATH=
 
1275
export LIBRARY_PATH
 
1276
 
 
1277
KDE_PRINT_QT_PROGRAM
 
1278
 
 
1279
if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
1280
  kde_cv_qt_direct="yes"
 
1281
else
 
1282
  kde_cv_qt_direct="no"
 
1283
  echo "configure: failed program was:" >&AC_FD_CC
 
1284
  cat conftest.$ac_ext >&AC_FD_CC
 
1285
fi
 
1286
 
 
1287
rm -f conftest*
 
1288
CXXFLAGS="$ac_cxxflags_safe"
 
1289
LDFLAGS="$ac_ldflags_safe"
 
1290
LIBS="$ac_libs_safe"
 
1291
 
 
1292
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
 
1293
export LD_LIBRARY_PATH
 
1294
LIBRARY_PATH="$ac_LIBRARY_PATH"
 
1295
export LIBRARY_PATH
 
1296
AC_LANG_RESTORE
 
1297
])
 
1298
 
 
1299
if test "$kde_cv_qt_direct" = "yes"; then
 
1300
  AC_MSG_RESULT(yes)
 
1301
  $1
 
1302
else
 
1303
  AC_MSG_RESULT(no)
 
1304
  $2
 
1305
fi
 
1306
])
 
1307
 
 
1308
dnl ------------------------------------------------------------------------
 
1309
dnl Try to find the Qt headers and libraries.
 
1310
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
 
1311
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
 
1312
dnl ------------------------------------------------------------------------
 
1313
dnl
 
1314
AC_DEFUN([AC_PATH_QT_1_3],
 
1315
[
 
1316
AC_REQUIRE([K_PATH_X])
 
1317
AC_REQUIRE([KDE_USE_QT])
 
1318
AC_REQUIRE([KDE_CHECK_LIB64])
 
1319
 
 
1320
dnl ------------------------------------------------------------------------
 
1321
dnl Add configure flag to enable linking to MT version of Qt library.
 
1322
dnl ------------------------------------------------------------------------
 
1323
 
 
1324
AC_ARG_ENABLE(
 
1325
  mt,
 
1326
  AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
 
1327
  kde_use_qt_mt=$enableval,
 
1328
  [
 
1329
    if test $kde_qtver = 3; then
 
1330
      kde_use_qt_mt=yes
 
1331
    else
 
1332
      kde_use_qt_mt=no
 
1333
    fi
 
1334
  ]
 
1335
)
 
1336
 
 
1337
USING_QT_MT=""
 
1338
 
 
1339
dnl ------------------------------------------------------------------------
 
1340
dnl If we not get --disable-qt-mt then adjust some vars for the host.
 
1341
dnl ------------------------------------------------------------------------
 
1342
 
 
1343
KDE_MT_LDFLAGS=
 
1344
KDE_MT_LIBS=
 
1345
if test "x$kde_use_qt_mt" = "xyes"; then
 
1346
  KDE_CHECK_THREADING
 
1347
  if test "x$kde_use_threading" = "xyes"; then
 
1348
    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
 
1349
    KDE_MT_LDFLAGS="$USE_THREADS"
 
1350
    KDE_MT_LIBS="$LIBPTHREAD"
 
1351
  else
 
1352
    kde_use_qt_mt=no
 
1353
  fi
 
1354
fi
 
1355
AC_SUBST(KDE_MT_LDFLAGS)
 
1356
AC_SUBST(KDE_MT_LIBS)
 
1357
 
 
1358
kde_qt_was_given=yes
 
1359
 
 
1360
dnl ------------------------------------------------------------------------
 
1361
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
 
1362
dnl ------------------------------------------------------------------------
 
1363
if test -z "$LIBQT_GLOB"; then
 
1364
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1365
    LIBQT_GLOB="libqte.*"
 
1366
  else
 
1367
    LIBQT_GLOB="libqt.*"
 
1368
  fi
 
1369
fi
 
1370
 
 
1371
dnl ------------------------------------------------------------
 
1372
dnl If we got --enable-embedded then adjust the Qt library name.
 
1373
dnl ------------------------------------------------------------
 
1374
if test "x$kde_use_qt_emb" = "xyes"; then
 
1375
  qtlib="qte"
 
1376
else
 
1377
  qtlib="qt"
 
1378
fi
 
1379
 
 
1380
kde_int_qt="-l$qtlib"
 
1381
 
 
1382
if test -z "$LIBQPE"; then
 
1383
dnl ------------------------------------------------------------
 
1384
dnl If we got --enable-palmtop then add -lqpe to the link line
 
1385
dnl ------------------------------------------------------------
 
1386
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1387
    if test "x$kde_use_qt_emb_palm" = "xyes"; then
 
1388
      LIB_QPE="-lqpe"
 
1389
    else
 
1390
      LIB_QPE=""
 
1391
    fi
 
1392
  else
 
1393
    LIB_QPE=""
 
1394
  fi
 
1395
fi
 
1396
 
 
1397
dnl ------------------------------------------------------------------------
 
1398
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
 
1399
dnl ------------------------------------------------------------------------
 
1400
 
 
1401
if test "x$kde_use_qt_mt" = "xyes"; then
 
1402
  LIBQT="-l$qtlib-mt"
 
1403
  kde_int_qt="-l$qtlib-mt"
 
1404
  LIBQT_GLOB="lib$qtlib-mt.*"
 
1405
  USING_QT_MT="using -mt"
 
1406
else
 
1407
  LIBQT="-l$qtlib"
 
1408
fi
 
1409
 
 
1410
if test $kde_qtver != 1; then
 
1411
 
 
1412
  AC_REQUIRE([AC_FIND_PNG])
 
1413
  AC_REQUIRE([AC_FIND_JPEG])
 
1414
  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
 
1415
fi
 
1416
 
 
1417
if test $kde_qtver = 3; then
 
1418
  AC_REQUIRE([KDE_CHECK_LIBDL])
 
1419
  LIBQT="$LIBQT $LIBDL"
 
1420
fi
 
1421
 
 
1422
AC_MSG_CHECKING([for Qt])
 
1423
 
 
1424
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
1425
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
 
1426
fi
 
1427
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
 
1428
qt_libraries=""
 
1429
qt_includes=""
 
1430
AC_ARG_WITH(qt-dir,
 
1431
    AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
 
1432
    [  ac_qt_includes="$withval"/include
 
1433
       ac_qt_libraries="$withval"/lib${kdelibsuff}
 
1434
       ac_qt_bindir="$withval"/bin
 
1435
    ])
 
1436
 
 
1437
AC_ARG_WITH(qt-includes,
 
1438
    AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
 
1439
    [
 
1440
       ac_qt_includes="$withval"
 
1441
    ])
 
1442
 
 
1443
kde_qt_libs_given=no
 
1444
 
 
1445
AC_ARG_WITH(qt-libraries,
 
1446
    AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
 
1447
    [  ac_qt_libraries="$withval"
 
1448
       kde_qt_libs_given=yes
 
1449
    ])
 
1450
 
 
1451
AC_CACHE_VAL(ac_cv_have_qt,
 
1452
[#try to guess Qt locations
 
1453
 
 
1454
qt_incdirs=""
 
1455
for dir in $kde_qt_dirs; do
 
1456
   qt_incdirs="$qt_incdirs $dir/include $dir"
 
1457
done
 
1458
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"
 
1459
if test ! "$ac_qt_includes" = "NO"; then
 
1460
   qt_incdirs="$ac_qt_includes $qt_incdirs"
 
1461
fi
 
1462
 
 
1463
if test "$kde_qtver" != "1"; then
 
1464
  kde_qt_header=qstyle.h
 
1465
else
 
1466
  kde_qt_header=qglobal.h
 
1467
fi
 
1468
 
 
1469
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
 
1470
ac_qt_includes="$qt_incdir"
 
1471
 
 
1472
qt_libdirs=""
 
1473
for dir in $kde_qt_dirs; do
 
1474
   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
 
1475
done
 
1476
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
 
1477
if test ! "$ac_qt_libraries" = "NO"; then
 
1478
  qt_libdir=$ac_qt_libraries
 
1479
else
 
1480
  qt_libdirs="$ac_qt_libraries $qt_libdirs"
 
1481
  # if the Qt was given, the chance is too big that libqt.* doesn't exist
 
1482
  qt_libdir=NONE
 
1483
  for dir in $qt_libdirs; do
 
1484
    try="ls -1 $dir/${LIBQT_GLOB}"
 
1485
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
 
1486
  done
 
1487
fi
 
1488
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
 
1489
  if test -e "$a"; then
 
1490
    LIBQT="$LIBQT ${kde_int_qt}_incremental"
 
1491
    break
 
1492
  fi
 
1493
done
 
1494
 
 
1495
ac_qt_libraries="$qt_libdir"
 
1496
 
 
1497
AC_LANG_SAVE
 
1498
AC_LANG_CPLUSPLUS
 
1499
 
 
1500
ac_cxxflags_safe="$CXXFLAGS"
 
1501
ac_ldflags_safe="$LDFLAGS"
 
1502
ac_libs_safe="$LIBS"
 
1503
 
 
1504
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
 
1505
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
 
1506
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
 
1507
 
 
1508
KDE_PRINT_QT_PROGRAM
 
1509
 
 
1510
if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
1511
  rm -f conftest*
 
1512
else
 
1513
  echo "configure: failed program was:" >&AC_FD_CC
 
1514
  cat conftest.$ac_ext >&AC_FD_CC
 
1515
  ac_qt_libraries="NO"
 
1516
fi
 
1517
rm -f conftest*
 
1518
CXXFLAGS="$ac_cxxflags_safe"
 
1519
LDFLAGS="$ac_ldflags_safe"
 
1520
LIBS="$ac_libs_safe"
 
1521
 
 
1522
AC_LANG_RESTORE
 
1523
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
 
1524
  ac_cv_have_qt="have_qt=no"
 
1525
  ac_qt_notfound=""
 
1526
  missing_qt_mt=""
 
1527
  if test "$ac_qt_includes" = NO; then
 
1528
    if test "$ac_qt_libraries" = NO; then
 
1529
      ac_qt_notfound="(headers and libraries)";
 
1530
    else
 
1531
      ac_qt_notfound="(headers)";
 
1532
    fi
 
1533
  else
 
1534
    if test "x$kde_use_qt_mt" = "xyes"; then
 
1535
       missing_qt_mt="
 
1536
Make sure that you have compiled Qt with thread support!"
 
1537
       ac_qt_notfound="(library $qtlib-mt)";
 
1538
    else
 
1539
       ac_qt_notfound="(library $qtlib)";
 
1540
    fi
 
1541
  fi
 
1542
 
 
1543
  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
 
1544
For more details about this problem, look at the end of config.log.$missing_qt_mt])
 
1545
else
 
1546
  have_qt="yes"
 
1547
fi
 
1548
])
 
1549
 
 
1550
eval "$ac_cv_have_qt"
 
1551
 
 
1552
if test "$have_qt" != yes; then
 
1553
  AC_MSG_RESULT([$have_qt]);
 
1554
else
 
1555
  ac_cv_have_qt="have_qt=yes \
 
1556
    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
 
1557
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
 
1558
 
 
1559
  qt_libraries="$ac_qt_libraries"
 
1560
  qt_includes="$ac_qt_includes"
 
1561
fi
 
1562
 
 
1563
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
 
1564
     KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
 
1565
fi
 
1566
 
 
1567
AC_SUBST(qt_libraries)
 
1568
AC_SUBST(qt_includes)
 
1569
 
 
1570
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
 
1571
 QT_INCLUDES=""
 
1572
else
 
1573
 QT_INCLUDES="-I$qt_includes"
 
1574
 all_includes="$QT_INCLUDES $all_includes"
 
1575
fi
 
1576
 
 
1577
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
 
1578
 QT_LDFLAGS=""
 
1579
else
 
1580
 QT_LDFLAGS="-L$qt_libraries"
 
1581
 all_libraries="$QT_LDFLAGS $all_libraries"
 
1582
fi
 
1583
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
 
1584
 
 
1585
AC_SUBST(QT_INCLUDES)
 
1586
AC_SUBST(QT_LDFLAGS)
 
1587
AC_PATH_QT_MOC_UIC
 
1588
 
 
1589
KDE_CHECK_QT_JPEG
 
1590
 
 
1591
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
1592
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
 
1593
else
 
1594
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
 
1595
fi
 
1596
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
 
1597
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
 
1598
  if test -e "$a"; then
 
1599
     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
 
1600
     break
 
1601
  fi
 
1602
done
 
1603
 
 
1604
AC_SUBST(LIB_QT)
 
1605
AC_SUBST(LIB_QPE)
 
1606
 
 
1607
AC_SUBST(kde_qtver)
 
1608
])
 
1609
 
 
1610
AC_DEFUN([AC_PATH_QT],
 
1611
[
 
1612
AC_PATH_QT_1_3
 
1613
])
 
1614
 
 
1615
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
 
1616
[
 
1617
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
 
1618
 
 
1619
if test x$ac_uic_supports_libpath = xyes; then
 
1620
 
 
1621
AC_MSG_CHECKING([if UIC has KDE plugins available])
 
1622
AC_CACHE_VAL(kde_cv_uic_plugins,
 
1623
[
 
1624
cat > actest.ui << EOF
 
1625
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
 
1626
<class>NewConnectionDialog</class>
 
1627
<widget class="QDialog">
 
1628
   <widget class="KLineEdit">
 
1629
        <property name="name">
 
1630
           <cstring>testInput</cstring>
 
1631
        </property>
 
1632
   </widget>
 
1633
</widget>
 
1634
</UI>
 
1635
EOF
 
1636
       
 
1637
 
 
1638
 
 
1639
kde_cv_uic_plugins=no
 
1640
kde_line="$UIC_PATH -L $kde_widgetdir"
 
1641
if test x$ac_uic_supports_nounload = xyes; then
 
1642
   kde_line="$kde_line -nounload"
 
1643
fi
 
1644
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
 
1645
if AC_TRY_EVAL(kde_line); then
 
1646
        # if you're trying to debug this check and think it's incorrect,
 
1647
        # better check your installation. The check _is_ correct - your
 
1648
        # installation is not.
 
1649
        if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
 
1650
                kde_cv_uic_plugins=yes
 
1651
        fi
 
1652
fi
 
1653
rm -f actest.ui actest.cpp
 
1654
])
 
1655
 
 
1656
AC_MSG_RESULT([$kde_cv_uic_plugins])
 
1657
if test "$kde_cv_uic_plugins" != yes; then
 
1658
        AC_MSG_ERROR([
 
1659
you need to install kdelibs first.
 
1660
 
 
1661
If you did install kdelibs, then the Qt version that is picked up by
 
1662
this configure is not the same version you used to compile kdelibs. 
 
1663
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the 
 
1664
_same Qt version_, compiled with the _same compiler_ and the same Qt
 
1665
configuration settings.
 
1666
])
 
1667
fi
 
1668
fi
 
1669
])
 
1670
 
 
1671
AC_DEFUN([KDE_CHECK_FINAL],
 
1672
[
 
1673
  AC_ARG_ENABLE(final,
 
1674
        AC_HELP_STRING([--enable-final],
 
1675
                       [build size optimized apps (experimental - needs lots of memory)]),
 
1676
        kde_use_final=$enableval, kde_use_final=no)
 
1677
 
 
1678
  if test "x$kde_use_final" = "xyes"; then
 
1679
      KDE_USE_FINAL_TRUE=""
 
1680
      KDE_USE_FINAL_FALSE="#"
 
1681
   else
 
1682
      KDE_USE_FINAL_TRUE="#"
 
1683
      KDE_USE_FINAL_FALSE=""
 
1684
  fi
 
1685
  AC_SUBST(KDE_USE_FINAL_TRUE)
 
1686
  AC_SUBST(KDE_USE_FINAL_FALSE)
 
1687
])
 
1688
 
 
1689
AC_DEFUN([KDE_CHECK_CLOSURE],
 
1690
[
 
1691
  AC_ARG_ENABLE(closure,
 
1692
                AC_HELP_STRING([--enable-closure],[delay template instantiation]),
 
1693
        kde_use_closure=$enableval, kde_use_closure=no)
 
1694
 
 
1695
  KDE_NO_UNDEFINED=""
 
1696
  if test "x$kde_use_closure" = "xyes"; then
 
1697
       KDE_USE_CLOSURE_TRUE=""
 
1698
       KDE_USE_CLOSURE_FALSE="#"
 
1699
#       CXXFLAGS="$CXXFLAGS $REPO"
 
1700
  else
 
1701
       KDE_USE_CLOSURE_TRUE="#"
 
1702
       KDE_USE_CLOSURE_FALSE=""
 
1703
       KDE_NO_UNDEFINED=""
 
1704
       case $host in 
 
1705
         *-*-linux-gnu)
 
1706
           KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
 
1707
                [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
 
1708
                [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
 
1709
                [KDE_NO_UNDEFINED=""])],
 
1710
            [KDE_NO_UNDEFINED=""])
 
1711
           ;;
 
1712
       esac
 
1713
  fi
 
1714
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
 
1715
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
 
1716
  AC_SUBST(KDE_NO_UNDEFINED)
 
1717
])
 
1718
 
 
1719
dnl Check if the linker supports --enable-new-dtags and --as-needed
 
1720
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
 
1721
[
 
1722
  AC_ARG_ENABLE(new_ldflags,
 
1723
                AC_HELP_STRING([--enable-new-ldflags],
 
1724
                [enable the new linker flags]),
 
1725
        kde_use_new_ldflags=$enableval, 
 
1726
        kde_use_new_ldflags=no)
 
1727
 
 
1728
  LDFLAGS_AS_NEEDED=""
 
1729
  LDFLAGS_NEW_DTAGS=""
 
1730
  if test "x$kde_use_new_ldflags" = "xyes"; then
 
1731
       LDFLAGS_NEW_DTAGS=""
 
1732
       KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
 
1733
                [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
 
1734
 
 
1735
       KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
 
1736
                [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
 
1737
  fi
 
1738
  AC_SUBST(LDFLAGS_AS_NEEDED)
 
1739
  AC_SUBST(LDFLAGS_NEW_DTAGS)
 
1740
])
 
1741
 
 
1742
AC_DEFUN([KDE_CHECK_NMCHECK],
 
1743
[
 
1744
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
 
1745
        kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
 
1746
 
 
1747
  if test "$kde_use_nmcheck" = "yes"; then
 
1748
      KDE_USE_NMCHECK_TRUE=""
 
1749
      KDE_USE_NMCHECK_FALSE="#"
 
1750
   else
 
1751
      KDE_USE_NMCHECK_TRUE="#"
 
1752
      KDE_USE_NMCHECK_FALSE=""
 
1753
  fi
 
1754
  AC_SUBST(KDE_USE_NMCHECK_TRUE)
 
1755
  AC_SUBST(KDE_USE_NMCHECK_FALSE)
 
1756
])
 
1757
 
 
1758
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
 
1759
savex=$exec_prefix
 
1760
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
1761
tmp=$$2
 
1762
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
 
1763
exec_prefix=$savex
 
1764
])
 
1765
 
 
1766
dnl ------------------------------------------------------------------------
 
1767
dnl Now, the same with KDE
 
1768
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
 
1769
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
 
1770
dnl ------------------------------------------------------------------------
 
1771
dnl
 
1772
AC_DEFUN([AC_BASE_PATH_KDE],
 
1773
[
 
1774
AC_REQUIRE([KDE_CHECK_STL])
 
1775
AC_REQUIRE([AC_PATH_QT])dnl
 
1776
AC_REQUIRE([KDE_CHECK_LIB64])
 
1777
 
 
1778
AC_CHECK_RPATH
 
1779
AC_MSG_CHECKING([for KDE])
 
1780
 
 
1781
if test "${prefix}" != NONE; then
 
1782
  kde_includes=${includedir}
 
1783
  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
 
1784
 
 
1785
  kde_libraries=${libdir}
 
1786
  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
 
1787
 
 
1788
else
 
1789
  ac_kde_includes=
 
1790
  ac_kde_libraries=
 
1791
  kde_libraries=""
 
1792
  kde_includes=""
 
1793
fi
 
1794
 
 
1795
AC_CACHE_VAL(ac_cv_have_kde,
 
1796
[#try to guess kde locations
 
1797
 
 
1798
if test "$kde_qtver" = 1; then
 
1799
  kde_check_header="ksock.h"
 
1800
  kde_check_lib="libkdecore.la"
 
1801
else
 
1802
  kde_check_header="ksharedptr.h"
 
1803
  kde_check_lib="libkio.la"
 
1804
fi
 
1805
 
 
1806
if test -z "$1"; then
 
1807
 
 
1808
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
 
1809
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
 
1810
kde_incdirs="$ac_kde_includes $kde_incdirs"
 
1811
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
 
1812
ac_kde_includes="$kde_incdir"
 
1813
 
 
1814
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
 
1815
  AC_MSG_ERROR([
 
1816
in the prefix, you've chosen, are no KDE headers installed. This will fail.
 
1817
So, check this please and use another prefix!])
 
1818
fi
 
1819
 
 
1820
kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
 
1821
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
 
1822
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
 
1823
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
 
1824
ac_kde_libraries="$kde_libdir"
 
1825
 
 
1826
kde_widgetdir=NO
 
1827
dnl this might be somewhere else
 
1828
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
 
1829
 
 
1830
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
 
1831
AC_MSG_ERROR([
 
1832
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
 
1833
So, check this please and use another prefix!])
 
1834
fi
 
1835
 
 
1836
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
 
1837
AC_MSG_ERROR([
 
1838
I can't find the designer plugins. These are required and should have been installed
 
1839
by kdelibs])
 
1840
fi
 
1841
 
 
1842
if test -n "$kde_widgetdir"; then
 
1843
    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
 
1844
fi
 
1845
 
 
1846
 
 
1847
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
 
1848
  ac_cv_have_kde="have_kde=no"
 
1849
else
 
1850
  ac_cv_have_kde="have_kde=yes \
 
1851
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
 
1852
fi
 
1853
 
 
1854
else dnl test -z $1, e.g. from kdelibs
 
1855
 
 
1856
  ac_cv_have_kde="have_kde=no"
 
1857
 
 
1858
fi
 
1859
])dnl
 
1860
 
 
1861
eval "$ac_cv_have_kde"
 
1862
 
 
1863
if test "$have_kde" != "yes"; then
 
1864
 if test "${prefix}" = NONE; then
 
1865
  ac_kde_prefix="$ac_default_prefix"
 
1866
 else
 
1867
  ac_kde_prefix="$prefix"
 
1868
 fi
 
1869
 if test "$exec_prefix" = NONE; then
 
1870
  ac_kde_exec_prefix="$ac_kde_prefix"
 
1871
  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
 
1872
 else
 
1873
  ac_kde_exec_prefix="$exec_prefix"
 
1874
  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
 
1875
 fi
 
1876
 
 
1877
 kde_libraries="${libdir}"
 
1878
 kde_includes="${includedir}"
 
1879
 
 
1880
else
 
1881
  ac_cv_have_kde="have_kde=yes \
 
1882
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
 
1883
  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
 
1884
 
 
1885
  kde_libraries="$ac_kde_libraries"
 
1886
  kde_includes="$ac_kde_includes"
 
1887
fi
 
1888
AC_SUBST(kde_libraries)
 
1889
AC_SUBST(kde_includes)
 
1890
 
 
1891
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
 
1892
 KDE_INCLUDES=""
 
1893
else
 
1894
 KDE_INCLUDES="-I$kde_includes"
 
1895
 all_includes="$KDE_INCLUDES $all_includes"
 
1896
fi
 
1897
 
 
1898
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
 
1899
 
 
1900
KDE_LDFLAGS="-L$kde_libraries"
 
1901
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
 
1902
 all_libraries="$KDE_LDFLAGS $all_libraries"
 
1903
fi
 
1904
 
 
1905
AC_SUBST(KDE_LDFLAGS)
 
1906
AC_SUBST(KDE_INCLUDES)
 
1907
 
 
1908
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
1909
 
 
1910
all_libraries="$all_libraries $USER_LDFLAGS"
 
1911
all_includes="$all_includes $USER_INCLUDES"
 
1912
AC_SUBST(all_includes)
 
1913
AC_SUBST(all_libraries)
 
1914
 
 
1915
if test -z "$1"; then
 
1916
KDE_CHECK_UIC_PLUGINS
 
1917
fi
 
1918
 
 
1919
ac_kde_libraries="$kde_libdir"
 
1920
 
 
1921
AC_SUBST(AUTODIRS)
 
1922
 
 
1923
 
 
1924
])
 
1925
 
 
1926
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
 
1927
[
 
1928
AC_MSG_CHECKING(for extra includes)
 
1929
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
 
1930
  kde_use_extra_includes="$withval",
 
1931
  kde_use_extra_includes=NONE
 
1932
)
 
1933
kde_extra_includes=
 
1934
if test -n "$kde_use_extra_includes" && \
 
1935
   test "$kde_use_extra_includes" != "NONE"; then
 
1936
 
 
1937
   ac_save_ifs=$IFS
 
1938
   IFS=':'
 
1939
   for dir in $kde_use_extra_includes; do
 
1940
     kde_extra_includes="$kde_extra_includes $dir"
 
1941
     USER_INCLUDES="$USER_INCLUDES -I$dir"
 
1942
   done
 
1943
   IFS=$ac_save_ifs
 
1944
   kde_use_extra_includes="added"
 
1945
else
 
1946
   kde_use_extra_includes="no"
 
1947
fi
 
1948
AC_SUBST(USER_INCLUDES)
 
1949
 
 
1950
AC_MSG_RESULT($kde_use_extra_includes)
 
1951
 
 
1952
kde_extra_libs=
 
1953
AC_MSG_CHECKING(for extra libs)
 
1954
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
 
1955
  kde_use_extra_libs=$withval,
 
1956
  kde_use_extra_libs=NONE
 
1957
)
 
1958
if test -n "$kde_use_extra_libs" && \
 
1959
   test "$kde_use_extra_libs" != "NONE"; then
 
1960
 
 
1961
   ac_save_ifs=$IFS
 
1962
   IFS=':'
 
1963
   for dir in $kde_use_extra_libs; do
 
1964
     kde_extra_libs="$kde_extra_libs $dir"
 
1965
     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
 
1966
     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
 
1967
   done
 
1968
   IFS=$ac_save_ifs
 
1969
   kde_use_extra_libs="added"
 
1970
else
 
1971
   kde_use_extra_libs="no"
 
1972
fi
 
1973
 
 
1974
AC_SUBST(USER_LDFLAGS)
 
1975
 
 
1976
AC_MSG_RESULT($kde_use_extra_libs)
 
1977
 
 
1978
])
 
1979
 
 
1980
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
 
1981
[
 
1982
    AC_MSG_CHECKING([for KDE headers installed])
 
1983
    AC_LANG_SAVE
 
1984
    AC_LANG_CPLUSPLUS
 
1985
cat > conftest.$ac_ext <<EOF
 
1986
#ifdef STDC_HEADERS
 
1987
# include <stdlib.h>
 
1988
#endif
 
1989
#include <stdio.h>
 
1990
#include "confdefs.h"
 
1991
#include <kapp.h>
 
1992
 
 
1993
int main() {
 
1994
    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
 
1995
    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
 
1996
    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
 
1997
    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
 
1998
    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
 
1999
    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
 
2000
    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
 
2001
    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
 
2002
    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
 
2003
    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
 
2004
    printf("kde_wallpaperdir=\\"%s\\"\n",
 
2005
        KApplication::kde_wallpaperdir().data());
 
2006
    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
 
2007
    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
 
2008
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
 
2009
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
 
2010
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
 
2011
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
 
2012
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
 
2013
    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
 
2014
    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
 
2015
    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
 
2016
    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
 
2017
    return 0;
 
2018
    }
 
2019
EOF
 
2020
 
 
2021
 ac_save_CPPFLAGS=$CPPFLAGS
 
2022
 CPPFLAGS="$all_includes $CPPFLAGS"
 
2023
 if AC_TRY_EVAL(ac_compile); then
 
2024
   AC_MSG_RESULT(yes)
 
2025
 else
 
2026
   AC_MSG_ERROR([your system is not able to compile a small KDE application!
 
2027
Check, if you installed the KDE header files correctly.
 
2028
For more details about this problem, look at the end of config.log.])
 
2029
  fi
 
2030
  CPPFLAGS=$ac_save_CPPFLAGS
 
2031
 
 
2032
  AC_LANG_RESTORE
 
2033
])
 
2034
 
 
2035
AC_DEFUN([KDE_CHECK_KDEQTADDON],
 
2036
[
 
2037
AC_MSG_CHECKING(for kde-qt-addon)
 
2038
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
 
2039
[
 
2040
 kde_ldflags_safe="$LDFLAGS"
 
2041
 kde_libs_safe="$LIBS"
 
2042
 kde_cxxflags_safe="$CXXFLAGS"
 
2043
 
 
2044
 LIBS="-lkde-qt-addon $LIBQT $LIBS"
 
2045
 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
 
2046
 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
 
2047
 
 
2048
 AC_TRY_LINK([
 
2049
   #include <qdom.h>
 
2050
 ],
 
2051
 [
 
2052
   QDomDocument doc;
 
2053
 ],
 
2054
  kde_cv_have_kdeqtaddon=yes,
 
2055
  kde_cv_have_kdeqtaddon=no
 
2056
 )
 
2057
 
 
2058
 LDFLAGS=$kde_ldflags_safe
 
2059
 LIBS=$kde_libs_safe
 
2060
 CXXFLAGS=$kde_cxxflags_safe
 
2061
])
 
2062
 
 
2063
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
 
2064
 
 
2065
if test "$kde_cv_have_kdeqtaddon" = "no"; then
 
2066
  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
 
2067
It is a separate package (and CVS module) named kde-qt-addon.])
 
2068
fi
 
2069
])
 
2070
 
 
2071
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
 
2072
[
 
2073
   AC_REQUIRE([KDE_MISC_TESTS])
 
2074
   AC_REQUIRE([KDE_CHECK_LIBDL])
 
2075
   AC_REQUIRE([K_PATH_X])
 
2076
 
 
2077
if test $kde_qtver = 3; then
 
2078
   case $host in 
 
2079
               *cygwin*) lib_kded="-lkdeinit_kded" ;;
 
2080
               *) lib_kded="" ;;
 
2081
       esac
 
2082
   AC_SUBST(LIB_KDED, $lib_kded)
 
2083
   AC_SUBST(LIB_KDECORE, "-lkdecore")
 
2084
   AC_SUBST(LIB_KDEUI, "-lkdeui")
 
2085
   AC_SUBST(LIB_KIO, "-lkio")
 
2086
   AC_SUBST(LIB_KJS, "-lkjs")
 
2087
   AC_SUBST(LIB_SMB, "-lsmb")
 
2088
   AC_SUBST(LIB_KAB, "-lkab")
 
2089
   AC_SUBST(LIB_KABC, "-lkabc")
 
2090
   AC_SUBST(LIB_KHTML, "-lkhtml")
 
2091
   AC_SUBST(LIB_KSPELL, "-lkspell")
 
2092
   AC_SUBST(LIB_KPARTS, "-lkparts")
 
2093
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
 
2094
   AC_SUBST(LIB_KUTILS, "-lkutils")
 
2095
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
 
2096
   AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
 
2097
   AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
 
2098
   AC_SUBST(LIB_KDNSSD, "-lkdnssd")
 
2099
   AC_SUBST(LIB_KUNITTEST, "-lkunittest")
 
2100
# these are for backward compatibility
 
2101
   AC_SUBST(LIB_KSYCOCA, "-lkio")
 
2102
   AC_SUBST(LIB_KFILE, "-lkio")
 
2103
elif test $kde_qtver = 2; then
 
2104
   AC_SUBST(LIB_KDECORE, "-lkdecore")
 
2105
   AC_SUBST(LIB_KDEUI, "-lkdeui")
 
2106
   AC_SUBST(LIB_KIO, "-lkio")
 
2107
   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
 
2108
   AC_SUBST(LIB_SMB, "-lsmb")
 
2109
   AC_SUBST(LIB_KFILE, "-lkfile")
 
2110
   AC_SUBST(LIB_KAB, "-lkab")
 
2111
   AC_SUBST(LIB_KHTML, "-lkhtml")
 
2112
   AC_SUBST(LIB_KSPELL, "-lkspell")
 
2113
   AC_SUBST(LIB_KPARTS, "-lkparts")
 
2114
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
 
2115
else
 
2116
   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
 
2117
   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
 
2118
   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
 
2119
   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
 
2120
   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
 
2121
fi
 
2122
])
 
2123
 
 
2124
AC_DEFUN([AC_PATH_KDE],
 
2125
[
 
2126
  AC_BASE_PATH_KDE
 
2127
  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
 
2128
  [
 
2129
  if test "$enableval" = "no";
 
2130
    then ac_use_path_checking="default"
 
2131
    else ac_use_path_checking=""
 
2132
  fi
 
2133
  ],
 
2134
  [
 
2135
  if test "$kde_qtver" = 1;
 
2136
    then ac_use_path_checking=""
 
2137
    else ac_use_path_checking="default"
 
2138
  fi
 
2139
  ]
 
2140
  )
 
2141
 
 
2142
  AC_CREATE_KFSSTND($ac_use_path_checking)
 
2143
 
 
2144
  AC_SUBST_KFSSTND
 
2145
  KDE_CREATE_LIBS_ALIASES
 
2146
])
 
2147
 
 
2148
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
 
2149
AC_DEFUN([KDE_CHECK_FUNC_EXT],
 
2150
[
 
2151
AC_MSG_CHECKING(for $1)
 
2152
AC_CACHE_VAL(kde_cv_func_$1,
 
2153
[
 
2154
AC_LANG_SAVE
 
2155
AC_LANG_CPLUSPLUS
 
2156
save_CXXFLAGS="$CXXFLAGS"
 
2157
kde_safe_LIBS="$LIBS"
 
2158
LIBS="$LIBS $X_EXTRA_LIBS"
 
2159
if test "$GXX" = "yes"; then
 
2160
CXXFLAGS="$CXXFLAGS -pedantic-errors"
 
2161
fi
 
2162
AC_TRY_COMPILE([
 
2163
$2
 
2164
],
 
2165
[
 
2166
$3
 
2167
],
 
2168
kde_cv_func_$1=yes,
 
2169
kde_cv_func_$1=no)
 
2170
CXXFLAGS="$save_CXXFLAGS"
 
2171
LIBS="$kde_safe_LIBS"
 
2172
AC_LANG_RESTORE
 
2173
])
 
2174
 
 
2175
AC_MSG_RESULT($kde_cv_func_$1)
 
2176
 
 
2177
AC_MSG_CHECKING([if $1 needs custom prototype])
 
2178
AC_CACHE_VAL(kde_cv_proto_$1,
 
2179
[
 
2180
if test "x$kde_cv_func_$1" = xyes; then
 
2181
  kde_cv_proto_$1=no
 
2182
else
 
2183
  case "$1" in
 
2184
        setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
 
2185
                kde_cv_proto_$1="yes - in libkdefakes"
 
2186
                ;;
 
2187
        *)
 
2188
                kde_cv_proto_$1=unknown
 
2189
                ;;
 
2190
  esac
 
2191
fi
 
2192
 
 
2193
if test "x$kde_cv_proto_$1" = xunknown; then
 
2194
 
 
2195
AC_LANG_SAVE
 
2196
AC_LANG_CPLUSPLUS
 
2197
  kde_safe_libs=$LIBS
 
2198
  LIBS="$LIBS $X_EXTRA_LIBS"
 
2199
  AC_TRY_LINK([
 
2200
$2
 
2201
 
 
2202
extern "C" $4;
 
2203
],
 
2204
[
 
2205
$3
 
2206
],
 
2207
[ kde_cv_func_$1=yes
 
2208
  kde_cv_proto_$1=yes ],
 
2209
  [kde_cv_proto_$1="$1 unavailable"]
 
2210
)
 
2211
LIBS=$kde_safe_libs
 
2212
AC_LANG_RESTORE
 
2213
fi
 
2214
])
 
2215
AC_MSG_RESULT($kde_cv_proto_$1)
 
2216
 
 
2217
if test "x$kde_cv_func_$1" = xyes; then
 
2218
  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
 
2219
  $6
 
2220
fi
 
2221
if test "x$kde_cv_proto_$1" = xno; then
 
2222
  AC_DEFINE(HAVE_$5_PROTO, 1,
 
2223
  [Define if you have the $1 prototype])
 
2224
fi
 
2225
 
 
2226
AH_VERBATIM([_HAVE_$5_PROTO],
 
2227
[
 
2228
#if !defined(HAVE_$5_PROTO)
 
2229
#ifdef __cplusplus
 
2230
extern "C" {
 
2231
#endif
 
2232
$4;
 
2233
#ifdef __cplusplus
 
2234
}
 
2235
#endif
 
2236
#endif
 
2237
])
 
2238
])
 
2239
 
 
2240
AC_DEFUN([AC_CHECK_SETENV],
 
2241
[
 
2242
        KDE_CHECK_FUNC_EXT(setenv, [
 
2243
#include <stdlib.h>
 
2244
], 
 
2245
                [setenv("VAR", "VALUE", 1);],
 
2246
                [int setenv (const char *, const char *, int)],
 
2247
                [SETENV])
 
2248
])
 
2249
 
 
2250
AC_DEFUN([AC_CHECK_UNSETENV],
 
2251
[
 
2252
        KDE_CHECK_FUNC_EXT(unsetenv, [
 
2253
#include <stdlib.h>
 
2254
], 
 
2255
                [unsetenv("VAR");],
 
2256
                [void unsetenv (const char *)],
 
2257
                [UNSETENV])
 
2258
])
 
2259
 
 
2260
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
 
2261
[
 
2262
        KDE_CHECK_FUNC_EXT(getdomainname, [
 
2263
#include <stdlib.h>
 
2264
#include <unistd.h>
 
2265
#include <netdb.h>
 
2266
], 
 
2267
                [
 
2268
char buffer[200];
 
2269
getdomainname(buffer, 200);
 
2270
],      
 
2271
                [#include <sys/types.h>
 
2272
                int getdomainname (char *, size_t)],
 
2273
                [GETDOMAINNAME])
 
2274
])
 
2275
 
 
2276
AC_DEFUN([AC_CHECK_GETHOSTNAME],
 
2277
[
 
2278
        KDE_CHECK_FUNC_EXT(gethostname, [
 
2279
#include <stdlib.h>
 
2280
#include <unistd.h>
 
2281
], 
 
2282
                [
 
2283
char buffer[200];
 
2284
gethostname(buffer, 200);
 
2285
],      
 
2286
                [int gethostname (char *, unsigned int)],
 
2287
                [GETHOSTNAME])
 
2288
])
 
2289
 
 
2290
AC_DEFUN([AC_CHECK_USLEEP],
 
2291
[
 
2292
        KDE_CHECK_FUNC_EXT(usleep, [
 
2293
#include <unistd.h>
 
2294
], 
 
2295
                [
 
2296
usleep(200);
 
2297
],      
 
2298
                [int usleep (unsigned int)],
 
2299
                [USLEEP])
 
2300
])
 
2301
 
 
2302
 
 
2303
AC_DEFUN([AC_CHECK_RANDOM],
 
2304
[
 
2305
        KDE_CHECK_FUNC_EXT(random, [
 
2306
#include <stdlib.h>
 
2307
], 
 
2308
                [
 
2309
random();
 
2310
],      
 
2311
                [long int random(void)],
 
2312
                [RANDOM])
 
2313
 
 
2314
        KDE_CHECK_FUNC_EXT(srandom, [
 
2315
#include <stdlib.h>
 
2316
], 
 
2317
                [
 
2318
srandom(27);
 
2319
],      
 
2320
                [void srandom(unsigned int)],
 
2321
                [SRANDOM])
 
2322
 
 
2323
])
 
2324
 
 
2325
AC_DEFUN([AC_CHECK_INITGROUPS],
 
2326
[
 
2327
        KDE_CHECK_FUNC_EXT(initgroups, [
 
2328
#include <sys/types.h>
 
2329
#include <unistd.h>
 
2330
#include <grp.h>
 
2331
],
 
2332
        [
 
2333
char buffer[200];
 
2334
initgroups(buffer, 27);
 
2335
],
 
2336
        [int initgroups(const char *, gid_t)],
 
2337
        [INITGROUPS])
 
2338
])
 
2339
 
 
2340
AC_DEFUN([AC_CHECK_MKSTEMPS],
 
2341
[
 
2342
        KDE_CHECK_FUNC_EXT(mkstemps, [
 
2343
#include <stdlib.h>
 
2344
#include <unistd.h>
 
2345
],
 
2346
        [
 
2347
mkstemps("/tmp/aaaXXXXXX", 6);
 
2348
],
 
2349
        [int mkstemps(char *, int)],
 
2350
        [MKSTEMPS])
 
2351
])
 
2352
 
 
2353
AC_DEFUN([AC_CHECK_MKSTEMP],
 
2354
[
 
2355
        KDE_CHECK_FUNC_EXT(mkstemp, [
 
2356
#include <stdlib.h>
 
2357
#include <unistd.h>
 
2358
],
 
2359
        [
 
2360
mkstemp("/tmp/aaaXXXXXX");
 
2361
],
 
2362
        [int mkstemp(char *)],
 
2363
        [MKSTEMP])
 
2364
])
 
2365
 
 
2366
AC_DEFUN([AC_CHECK_MKDTEMP],
 
2367
[
 
2368
        KDE_CHECK_FUNC_EXT(mkdtemp, [
 
2369
#include <stdlib.h>
 
2370
#include <unistd.h>
 
2371
],
 
2372
        [
 
2373
mkdtemp("/tmp/aaaXXXXXX");
 
2374
],
 
2375
        [char *mkdtemp(char *)],
 
2376
        [MKDTEMP])
 
2377
])
 
2378
 
 
2379
 
 
2380
AC_DEFUN([AC_CHECK_RES_INIT],
 
2381
[
 
2382
  AC_MSG_CHECKING([if res_init needs -lresolv])
 
2383
  kde_libs_safe="$LIBS"
 
2384
  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
 
2385
  AC_TRY_LINK(
 
2386
    [
 
2387
#include <sys/types.h>
 
2388
#include <netinet/in.h>
 
2389
#include <arpa/nameser.h>
 
2390
#include <resolv.h>
 
2391
    ],
 
2392
    [
 
2393
      res_init(); 
 
2394
    ],
 
2395
    [
 
2396
      LIBRESOLV="-lresolv"
 
2397
      AC_MSG_RESULT(yes)
 
2398
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
 
2399
    ],
 
2400
    [ AC_MSG_RESULT(no) ]
 
2401
  )
 
2402
  LIBS=$kde_libs_safe
 
2403
  AC_SUBST(LIBRESOLV)
 
2404
 
 
2405
  KDE_CHECK_FUNC_EXT(res_init,
 
2406
    [
 
2407
#include <sys/types.h>
 
2408
#include <netinet/in.h>
 
2409
#include <arpa/nameser.h>
 
2410
#include <resolv.h>
 
2411
    ],
 
2412
    [res_init()],
 
2413
    [int res_init(void)],
 
2414
    [RES_INIT])
 
2415
])
 
2416
 
 
2417
AC_DEFUN([AC_CHECK_STRLCPY],
 
2418
[
 
2419
        KDE_CHECK_FUNC_EXT(strlcpy, [
 
2420
#include <string.h>
 
2421
],
 
2422
[ char buf[20];
 
2423
  strlcpy(buf, "KDE function test", sizeof(buf));
 
2424
],
 
2425
        [unsigned long strlcpy(char*, const char*, unsigned long)],
 
2426
        [STRLCPY])
 
2427
])
 
2428
 
 
2429
AC_DEFUN([AC_CHECK_STRLCAT],
 
2430
[
 
2431
        KDE_CHECK_FUNC_EXT(strlcat, [
 
2432
#include <string.h>
 
2433
],
 
2434
[ char buf[20];
 
2435
  buf[0]='\0';
 
2436
  strlcat(buf, "KDE function test", sizeof(buf));
 
2437
],
 
2438
        [unsigned long strlcat(char*, const char*, unsigned long)],
 
2439
        [STRLCAT])
 
2440
])
 
2441
 
 
2442
AC_DEFUN([AC_CHECK_RES_QUERY],
 
2443
[
 
2444
        KDE_CHECK_FUNC_EXT(res_query, [
 
2445
#include <sys/types.h>
 
2446
#include <netinet/in.h>
 
2447
#include <arpa/nameser.h>
 
2448
#include <resolv.h>
 
2449
#include <netdb.h>
 
2450
],
 
2451
[
 
2452
res_query(NULL, 0, 0, NULL, 0);
 
2453
],
 
2454
        [int res_query(const char *, int, int, unsigned char *, int)],
 
2455
        [RES_QUERY])
 
2456
])
 
2457
 
 
2458
AC_DEFUN([AC_CHECK_DN_SKIPNAME],
 
2459
[
 
2460
        KDE_CHECK_FUNC_EXT(dn_skipname, [
 
2461
#include <sys/types.h>
 
2462
#include <netinet/in.h>
 
2463
#include <arpa/nameser.h>
 
2464
#include <resolv.h>
 
2465
],
 
2466
[
 
2467
dn_skipname (NULL, NULL);
 
2468
],
 
2469
        [int dn_skipname (unsigned char *, unsigned char *)],
 
2470
        [DN_SKIPNAME])
 
2471
])
 
2472
 
 
2473
 
 
2474
AC_DEFUN([AC_FIND_GIF],
 
2475
   [AC_MSG_CHECKING([for giflib])
 
2476
AC_CACHE_VAL(ac_cv_lib_gif,
 
2477
[ac_save_LIBS="$LIBS"
 
2478
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
2479
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
 
2480
else
 
2481
LIBS="$all_libraries -lgif"
 
2482
fi
 
2483
AC_TRY_LINK(dnl
 
2484
[
 
2485
#ifdef __cplusplus
 
2486
extern "C" {
 
2487
#endif
 
2488
int GifLastError(void);
 
2489
#ifdef __cplusplus
 
2490
}
 
2491
#endif
 
2492
/* We use char because int might match the return type of a gcc2
 
2493
    builtin and then its argument prototype would still apply.  */
 
2494
],
 
2495
            [return GifLastError();],
 
2496
            eval "ac_cv_lib_gif=yes",
 
2497
            eval "ac_cv_lib_gif=no")
 
2498
LIBS="$ac_save_LIBS"
 
2499
])dnl
 
2500
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
 
2501
  AC_MSG_RESULT(yes)
 
2502
  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
 
2503
else
 
2504
  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
 
2505
fi
 
2506
])
 
2507
 
 
2508
AC_DEFUN([KDE_FIND_JPEG_HELPER],
 
2509
[
 
2510
AC_MSG_CHECKING([for libjpeg$2])
 
2511
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
 
2512
[
 
2513
ac_save_LIBS="$LIBS"
 
2514
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
 
2515
ac_save_CFLAGS="$CFLAGS"
 
2516
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2517
AC_TRY_LINK(
 
2518
[
 
2519
#ifdef __cplusplus
 
2520
extern "C" {
 
2521
#endif
 
2522
void jpeg_CreateDecompress();
 
2523
#ifdef __cplusplus
 
2524
}
 
2525
#endif
 
2526
],
 
2527
[jpeg_CreateDecompress();],
 
2528
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
 
2529
            eval "ac_cv_lib_jpeg_$1=no")
 
2530
LIBS="$ac_save_LIBS"
 
2531
CFLAGS="$ac_save_CFLAGS"
 
2532
])
 
2533
 
 
2534
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
 
2535
  LIBJPEG="$ac_cv_lib_jpeg_$1"
 
2536
  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
 
2537
else
 
2538
  AC_MSG_RESULT(no)
 
2539
  $3
 
2540
fi
 
2541
 
 
2542
])
 
2543
 
 
2544
AC_DEFUN([AC_FIND_JPEG],
 
2545
[
 
2546
dnl first look for libraries
 
2547
KDE_FIND_JPEG_HELPER(6b, 6b,
 
2548
   KDE_FIND_JPEG_HELPER(normal, [],
 
2549
    [
 
2550
       LIBJPEG=
 
2551
    ]
 
2552
   )
 
2553
)
 
2554
 
 
2555
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
 
2556
dnl requires system dependent includes loaded before it)
 
2557
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
 
2558
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
 
2559
test "x$jpeg_incdir" = xNO && jpeg_incdir=
 
2560
 
 
2561
dnl if headers _and_ libraries are missing, this is no error, and we
 
2562
dnl continue with a warning (the user will get no jpeg support in khtml)
 
2563
dnl if only one is missing, it means a configuration error, but we still
 
2564
dnl only warn
 
2565
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
 
2566
  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
 
2567
else
 
2568
  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
 
2569
    AC_MSG_WARN([
 
2570
There is an installation error in jpeg support. You seem to have only one
 
2571
of either the headers _or_ the libraries installed. You may need to either
 
2572
provide correct --with-extra-... options, or the development package of
 
2573
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
 
2574
Disabling JPEG support.
 
2575
])
 
2576
  else
 
2577
    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
 
2578
  fi
 
2579
  jpeg_incdir=
 
2580
  LIBJPEG=
 
2581
fi
 
2582
 
 
2583
AC_SUBST(LIBJPEG)
 
2584
AH_VERBATIM(_AC_CHECK_JPEG,
 
2585
[/*
 
2586
 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
 
2587
 * headers and I'm too lazy to write a configure test as long as only
 
2588
 * unixware is related
 
2589
 */
 
2590
#ifdef _UNIXWARE
 
2591
#define HAVE_BOOLEAN
 
2592
#endif
 
2593
])
 
2594
])
 
2595
 
 
2596
AC_DEFUN([KDE_CHECK_QT_JPEG],
 
2597
[
 
2598
if test -n "$LIBJPEG"; then
 
2599
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
 
2600
AC_CACHE_VAL(kde_cv_qt_jpeg,
 
2601
[
 
2602
AC_LANG_SAVE
 
2603
AC_LANG_CPLUSPLUS
 
2604
ac_save_LIBS="$LIBS"
 
2605
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
 
2606
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
 
2607
ac_save_CXXFLAGS="$CXXFLAGS"
 
2608
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
2609
AC_TRY_LINK(
 
2610
[#include <qapplication.h>],
 
2611
            [
 
2612
            int argc;
 
2613
            char** argv;
 
2614
            QApplication app(argc, argv);],
 
2615
            eval "kde_cv_qt_jpeg=no",
 
2616
            eval "kde_cv_qt_jpeg=yes")
 
2617
LIBS="$ac_save_LIBS"
 
2618
CXXFLAGS="$ac_save_CXXFLAGS"
 
2619
AC_LANG_RESTORE
 
2620
fi
 
2621
])
 
2622
 
 
2623
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
 
2624
  AC_MSG_RESULT(yes)
 
2625
  LIBJPEG_QT='$(LIBJPEG)'
 
2626
else
 
2627
  AC_MSG_RESULT(no)
 
2628
  LIBJPEG_QT=
 
2629
fi
 
2630
 
 
2631
])
 
2632
 
 
2633
AC_DEFUN([AC_FIND_ZLIB],
 
2634
[
 
2635
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2636
AC_MSG_CHECKING([for libz])
 
2637
AC_CACHE_VAL(ac_cv_lib_z,
 
2638
[
 
2639
kde_save_LIBS="$LIBS"
 
2640
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
 
2641
kde_save_CFLAGS="$CFLAGS"
 
2642
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2643
AC_TRY_LINK(dnl
 
2644
[
 
2645
#include<zlib.h>
 
2646
],
 
2647
[
 
2648
  char buf[42];
 
2649
  gzFile f = (gzFile) 0;
 
2650
  /* this would segfault.. but we only link, don't run */
 
2651
  (void) gzgets(f, buf, sizeof(buf));
 
2652
 
 
2653
  return (zlibVersion() == ZLIB_VERSION); 
 
2654
],
 
2655
            eval "ac_cv_lib_z='-lz'",
 
2656
            eval "ac_cv_lib_z=no")
 
2657
LIBS="$kde_save_LIBS"
 
2658
CFLAGS="$kde_save_CFLAGS"
 
2659
])dnl
 
2660
if test ! "$ac_cv_lib_z" = no; then
 
2661
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
 
2662
  LIBZ="$ac_cv_lib_z"
 
2663
  AC_MSG_RESULT($ac_cv_lib_z)
 
2664
else
 
2665
  AC_MSG_ERROR(not found. 
 
2666
          Possibly configure picks up an outdated version
 
2667
          installed by XFree86. Remove it from your system.
 
2668
 
 
2669
          Check your installation and look into config.log)
 
2670
  LIBZ=""
 
2671
fi
 
2672
AC_SUBST(LIBZ)
 
2673
])
 
2674
 
 
2675
AC_DEFUN([KDE_TRY_TIFFLIB],
 
2676
[
 
2677
AC_MSG_CHECKING([for libtiff $1])
 
2678
 
 
2679
AC_CACHE_VAL(kde_cv_libtiff_$1,
 
2680
[
 
2681
AC_LANG_SAVE
 
2682
AC_LANG_CPLUSPLUS
 
2683
kde_save_LIBS="$LIBS"
 
2684
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
2685
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
 
2686
else
 
2687
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
 
2688
fi
 
2689
kde_save_CXXFLAGS="$CXXFLAGS"
 
2690
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
2691
 
 
2692
AC_TRY_LINK(dnl
 
2693
[
 
2694
#include<tiffio.h>
 
2695
],
 
2696
    [return (TIFFOpen( "", "r") == 0); ],
 
2697
[
 
2698
    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
 
2699
], [
 
2700
    kde_cv_libtiff_$1=no
 
2701
])
 
2702
 
 
2703
LIBS="$kde_save_LIBS"
 
2704
CXXFLAGS="$kde_save_CXXFLAGS"
 
2705
AC_LANG_RESTORE
 
2706
])
 
2707
 
 
2708
if test "$kde_cv_libtiff_$1" = "no"; then
 
2709
    AC_MSG_RESULT(no)
 
2710
    LIBTIFF=""
 
2711
    $3
 
2712
else
 
2713
    LIBTIFF="$kde_cv_libtiff_$1"
 
2714
    AC_MSG_RESULT(yes)
 
2715
    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
 
2716
    $2
 
2717
fi
 
2718
 
 
2719
])
 
2720
 
 
2721
AC_DEFUN([AC_FIND_TIFF],
 
2722
[
 
2723
AC_REQUIRE([K_PATH_X])
 
2724
AC_REQUIRE([AC_FIND_ZLIB])
 
2725
AC_REQUIRE([AC_FIND_JPEG])
 
2726
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2727
 
 
2728
KDE_TRY_TIFFLIB(tiff, [],
 
2729
   KDE_TRY_TIFFLIB(tiff34))
 
2730
 
 
2731
AC_SUBST(LIBTIFF)
 
2732
])
 
2733
 
 
2734
AC_DEFUN([KDE_FIND_LIBEXR],
 
2735
[
 
2736
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2737
AC_REQUIRE([AC_FIND_ZLIB])
 
2738
AC_CACHE_VAL(ac_cv_libexr,
 
2739
[
 
2740
  if test -z "$PKG_CONFIG"; then
 
2741
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
2742
  fi
 
2743
 
 
2744
  AC_MSG_CHECKING([for OpenEXR libraries])
 
2745
 
 
2746
  if test "$PKG_CONFIG" = "no" ; then
 
2747
     AC_MSG_RESULT(no)
 
2748
     echo "*** The pkg-config script could not be found. Make sure it is"
 
2749
     echo "*** in your path, or set the PKG_CONFIG environment variable"
 
2750
     echo "*** to the full path to pkg-config."
 
2751
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
 
2752
  else
 
2753
     if !(`$PKG_CONFIG --exists OpenEXR`) ; then
 
2754
        AC_MSG_RESULT(no)
 
2755
        EXRSTATUS=no
 
2756
     else
 
2757
        if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then
 
2758
           AC_MSG_RESULT(no)
 
2759
           EXRSTATUS=old
 
2760
        else
 
2761
           kde_save_LIBS="$LIBS"
 
2762
           LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ"
 
2763
           AC_LANG_SAVE
 
2764
           AC_LANG_CPLUSPLUS
 
2765
           kde_save_CXXFLAGS="$CXXFLAGS"
 
2766
           EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
 
2767
           CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS"
 
2768
 
 
2769
           AC_TRY_LINK(dnl
 
2770
               [
 
2771
               #include <ImfRgbaFile.h>
 
2772
               ],
 
2773
               [
 
2774
               using namespace Imf;
 
2775
               RgbaInputFile file ("dummy");
 
2776
               return 0;
 
2777
               ],
 
2778
               eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'",
 
2779
               eval "ac_cv_libexr=no"
 
2780
           )
 
2781
           LIBS="$kde_save_LIBS"
 
2782
           CXXFLAGS="$kde_save_CXXFLAGS"
 
2783
           AC_LANG_RESTORE
 
2784
           ])dnl
 
2785
           if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then
 
2786
               AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
 
2787
               LIB_EXR="$ac_cv_libexr"
 
2788
               AC_MSG_RESULT($ac_cv_libexr)
 
2789
           else
 
2790
               AC_MSG_RESULT(no)
 
2791
               LIB_EXR=""
 
2792
           fi
 
2793
        fi
 
2794
     fi
 
2795
  fi
 
2796
  AC_SUBST(LIB_EXR)
 
2797
  AC_SUBST(EXR_FLAGS)
 
2798
])
 
2799
 
 
2800
 
 
2801
 
 
2802
AC_DEFUN([AC_FIND_PNG],
 
2803
[
 
2804
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2805
AC_REQUIRE([AC_FIND_ZLIB])
 
2806
AC_MSG_CHECKING([for libpng])
 
2807
AC_CACHE_VAL(ac_cv_lib_png,
 
2808
[
 
2809
kde_save_LIBS="$LIBS"
 
2810
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
2811
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
 
2812
else
 
2813
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
 
2814
fi
 
2815
kde_save_CFLAGS="$CFLAGS"
 
2816
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2817
 
 
2818
AC_TRY_LINK(dnl
 
2819
    [
 
2820
    #include<png.h>
 
2821
    ],
 
2822
    [
 
2823
    png_structp png_ptr = png_create_read_struct(  /* image ptr */
 
2824
                PNG_LIBPNG_VER_STRING, 0, 0, 0 );
 
2825
    return( png_ptr != 0 );
 
2826
    ],
 
2827
    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
 
2828
    eval "ac_cv_lib_png=no"
 
2829
)
 
2830
LIBS="$kde_save_LIBS"
 
2831
CFLAGS="$kde_save_CFLAGS"
 
2832
])dnl
 
2833
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
 
2834
  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
 
2835
  LIBPNG="$ac_cv_lib_png"
 
2836
  AC_SUBST(LIBPNG)
 
2837
  AC_MSG_RESULT($ac_cv_lib_png)
 
2838
else
 
2839
  AC_MSG_RESULT(no)
 
2840
  LIBPNG=""
 
2841
  AC_SUBST(LIBPNG)
 
2842
fi
 
2843
])
 
2844
 
 
2845
 
 
2846
AC_DEFUN([AC_FIND_JASPER],
 
2847
[
 
2848
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2849
AC_REQUIRE([AC_FIND_JPEG])
 
2850
AC_MSG_CHECKING([for jasper])
 
2851
AC_CACHE_VAL(ac_cv_jasper,
 
2852
[
 
2853
kde_save_LIBS="$LIBS"
 
2854
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
 
2855
kde_save_CFLAGS="$CFLAGS"
 
2856
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2857
 
 
2858
AC_TRY_LINK(dnl
 
2859
    [
 
2860
    #include<jasper/jasper.h>
 
2861
    ],
 
2862
    [
 
2863
    return( jas_init() );
 
2864
    ],
 
2865
    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
 
2866
    eval "ac_cv_jasper=no"
 
2867
)
 
2868
LIBS="$kde_save_LIBS"
 
2869
CFLAGS="$kde_save_CFLAGS"
 
2870
])dnl
 
2871
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
 
2872
  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
 
2873
  LIB_JASPER="$ac_cv_jasper"
 
2874
  AC_MSG_RESULT($ac_cv_jasper)
 
2875
else
 
2876
  AC_MSG_RESULT(no)
 
2877
  LIB_JASPER=""
 
2878
fi
 
2879
AC_SUBST(LIB_JASPER)
 
2880
])
 
2881
 
 
2882
AC_DEFUN([AC_CHECK_BOOL],
 
2883
[
 
2884
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
 
2885
])
 
2886
 
 
2887
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
 
2888
[
 
2889
AC_MSG_CHECKING(if you need GNU extensions)
 
2890
AC_CACHE_VAL(ac_cv_gnu_extensions,
 
2891
[
 
2892
cat > conftest.c << EOF
 
2893
#include <features.h>
 
2894
 
 
2895
#ifdef __GNU_LIBRARY__
 
2896
yes
 
2897
#endif
 
2898
EOF
 
2899
 
 
2900
if (eval "$ac_cpp conftest.c") 2>&5 |
 
2901
  egrep "yes" >/dev/null 2>&1; then
 
2902
  rm -rf conftest*
 
2903
  ac_cv_gnu_extensions=yes
 
2904
else
 
2905
  ac_cv_gnu_extensions=no
 
2906
fi
 
2907
])
 
2908
 
 
2909
AC_MSG_RESULT($ac_cv_gnu_extensions)
 
2910
if test "$ac_cv_gnu_extensions" = "yes"; then
 
2911
  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
 
2912
fi
 
2913
])
 
2914
 
 
2915
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
 
2916
[
 
2917
AC_MSG_CHECKING([whether $CXX supports -$1])
 
2918
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
 
2919
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
 
2920
[
 
2921
  AC_LANG_SAVE
 
2922
  AC_LANG_CPLUSPLUS
 
2923
  save_CXXFLAGS="$CXXFLAGS"
 
2924
  CXXFLAGS="$CXXFLAGS -$1"
 
2925
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
 
2926
  CXXFLAGS="$save_CXXFLAGS"
 
2927
  AC_LANG_RESTORE
 
2928
])
 
2929
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
 
2930
 AC_MSG_RESULT(yes)
 
2931
 :
 
2932
 $2
 
2933
else
 
2934
 AC_MSG_RESULT(no)
 
2935
 :
 
2936
 $3
 
2937
fi
 
2938
])
 
2939
 
 
2940
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
 
2941
[
 
2942
AC_MSG_CHECKING([whether $CC supports -$1])
 
2943
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
 
2944
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
 
2945
[
 
2946
  AC_LANG_SAVE
 
2947
  AC_LANG_C
 
2948
  save_CFLAGS="$CFLAGS"
 
2949
  CFLAGS="$CFLAGS -$1"
 
2950
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
 
2951
  CFLAGS="$save_CFLAGS"
 
2952
  AC_LANG_RESTORE
 
2953
])
 
2954
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
 
2955
 AC_MSG_RESULT(yes)
 
2956
 :
 
2957
 $2
 
2958
else
 
2959
 AC_MSG_RESULT(no)
 
2960
 :
 
2961
 $3
 
2962
fi
 
2963
])
 
2964
 
 
2965
 
 
2966
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
 
2967
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
 
2968
dnl it's all white-space separated
 
2969
AC_DEFUN([AC_REMOVE_FORBIDDEN],
 
2970
[ __val=$$1
 
2971
  __forbid=" $2 "
 
2972
  if test -n "$__val"; then
 
2973
    __new=""
 
2974
    ac_save_IFS=$IFS
 
2975
    IFS="       "
 
2976
    for i in $__val; do
 
2977
      case "$__forbid" in
 
2978
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
 
2979
        *) # Careful to not add spaces, where there were none, because otherwise
 
2980
           # libtool gets confused, if we change e.g. CXX
 
2981
           if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
 
2982
      esac
 
2983
    done
 
2984
    IFS=$ac_save_IFS
 
2985
    $1=$__new
 
2986
  fi
 
2987
])
 
2988
 
 
2989
 
 
2990
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
 
2991
[
 
2992
  AC_MSG_CHECKING([whether $CC is blacklisted])
 
2993
 
 
2994
  dnl In theory we have tu run this test against $CC and $CXX
 
2995
  dnl in C and in C++ mode, because its perfectly legal for
 
2996
  dnl the user to mix compiler versions, since C has a defined
 
2997
  dnl ABI. 
 
2998
  dnl 
 
2999
  dnl For now, we assume the user is not on crack.
 
3000
 
 
3001
  AC_TRY_COMPILE([
 
3002
#ifdef __GNUC__
 
3003
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
 
3004
choke me
 
3005
#endif
 
3006
#endif
 
3007
], ,
 
3008
  kde_bad_compiler=no, 
 
3009
  kde_bad_compiler=yes
 
3010
)
 
3011
 
 
3012
  AC_MSG_RESULT($kde_bad_compiler)
 
3013
 
 
3014
if test "$kde_bad_compiler" = "yes"; then
 
3015
  AC_MSG_ERROR([
 
3016
 
 
3017
This particular compiler version is blacklisted because it
 
3018
is known to miscompile KDE. Please use a newer version, or
 
3019
if that is not yet available, choose an older version. 
 
3020
 
 
3021
Please do not report a bug or bother us reporting this
 
3022
configure error. We know about it, and we introduced
 
3023
it by intention to avoid untraceable bugs or crashes in KDE.
 
3024
 
 
3025
])
 
3026
fi
 
3027
 
 
3028
])
 
3029
 
 
3030
 
 
3031
AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH],
 
3032
[
 
3033
  AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline],
 
3034
    kde_cv_opt_noinline_match,
 
3035
  [
 
3036
  kde_cv_opt_noinline_match=irrelevant
 
3037
  dnl if we don't use both -O2 and -fno-inline, this check is moot
 
3038
  if echo "$CFLAGS" | grep -e -O2 >/dev/null 2>/dev/null \
 
3039
     && echo "$CFLAGS" | grep -e -fno-inline >/dev/null 2>/dev/null ; then
 
3040
 
 
3041
    ac_cflags_save="$CFLAGS"
 
3042
    CFLAGS="$CFLAGS -D_USE_GNU"
 
3043
 
 
3044
    AC_TRY_LINK([
 
3045
  #include <string.h>
 
3046
], [  const char *pt, *et;
 
3047
  et = __extension__      ({ char __a0, __a1, __a2;       (__builtin_constant_p (  ";,"  ) && ((size_t)(const void *)((   ";,"   )+ 1) - (size_t)(const void *)(   ";,"   ) == 1)        ? ((__a0 =((__const char  *) (  ";,"  ))[0], __a0 == '\0')     ? ((void) (  pt ),((void *)0) )        : ((__a1 = ((__const char *) (  ";,"  ))[1], __a1== '\0')      ? (__extension__ (__builtin_constant_p (  __a0 ) && ( __a0 ) == '\0'   ? (char *) __rawmemchr (   pt  ,   __a0)       : strchr(   pt  ,   __a0 )))   : ((__a2 = ((__const char *) (  ";,"  ))[2], __a2 == '\0')      ? __strpbrk_c2 (  pt , __a0, __a1)      :(((__const char *) (  ";,"  ))[3] == '\0'     ? __strpbrk_c3 (  pt ,__a0, __a1, __a2): strpbrk (  pt ,   ";,"  ))))) : strpbrk (  pt ,  ";,"  )); }) ;
 
3048
],
 
3049
    kde_cv_opt_noinline_match=yes,
 
3050
    kde_cv_opt_noinline_match=no
 
3051
    )
 
3052
 
 
3053
    CFLAGS="$ac_cflags_save"
 
3054
  fi
 
3055
  ])
 
3056
])
 
3057
 
 
3058
 
 
3059
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
 
3060
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
 
3061
[dnl
 
3062
if test "x$kde_use_qt_emb" != "xyes"; then
 
3063
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
 
3064
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
 
3065
else
 
3066
 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
 
3067
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
 
3068
fi
 
3069
])
 
3070
 
 
3071
AC_DEFUN([AC_CHECK_COMPILERS],
 
3072
[
 
3073
  AC_ARG_ENABLE(debug,
 
3074
                AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
 
3075
  [
 
3076
    case $enableval in
 
3077
      yes)
 
3078
        kde_use_debug_code="yes"
 
3079
        kde_use_debug_define=no
 
3080
        ;;
 
3081
      full)
 
3082
        kde_use_debug_code="full"
 
3083
        kde_use_debug_define=no
 
3084
        ;;
 
3085
      *)
 
3086
        kde_use_debug_code="no"
 
3087
        kde_use_debug_define=yes
 
3088
        ;;
 
3089
    esac
 
3090
  ], 
 
3091
    [kde_use_debug_code="no"
 
3092
      kde_use_debug_define=no
 
3093
  ])
 
3094
 
 
3095
  dnl Just for configure --help
 
3096
  AC_ARG_ENABLE(dummyoption,
 
3097
                AC_HELP_STRING([--disable-debug],
 
3098
                               [disables debug output and debug symbols [default=no]]),
 
3099
                [],[])
 
3100
 
 
3101
  AC_ARG_ENABLE(strict,
 
3102
                AC_HELP_STRING([--enable-strict],
 
3103
                              [compiles with strict compiler options (may not work!)]),
 
3104
   [
 
3105
    if test $enableval = "no"; then
 
3106
         kde_use_strict_options="no"
 
3107
       else
 
3108
         kde_use_strict_options="yes"
 
3109
    fi
 
3110
   ], [kde_use_strict_options="no"])
 
3111
 
 
3112
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
 
3113
   [
 
3114
    if test $enableval = "no"; then
 
3115
         kde_use_warnings="no"
 
3116
       else
 
3117
         kde_use_warnings="yes"
 
3118
    fi
 
3119
   ], [kde_use_warnings="yes"])
 
3120
 
 
3121
  dnl enable warnings for debug build
 
3122
  if test "$kde_use_debug_code" != "no"; then
 
3123
    kde_use_warnings=yes
 
3124
  fi
 
3125
 
 
3126
  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
 
3127
    [kde_use_profiling=$enableval],
 
3128
    [kde_use_profiling="no"]
 
3129
  )
 
3130
 
 
3131
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
 
3132
  CFLAGS=" $CFLAGS"
 
3133
 
 
3134
  AC_PROG_CC 
 
3135
 
 
3136
  AC_PROG_CPP
 
3137
 
 
3138
  if test "$GCC" = "yes"; then
 
3139
    if test "$kde_use_debug_code" != "no"; then
 
3140
      if test $kde_use_debug_code = "full"; then
 
3141
        CFLAGS="-g3 -fno-inline $CFLAGS"
 
3142
      else
 
3143
        CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS"
 
3144
      fi
 
3145
    else
 
3146
      CFLAGS="-O2 $CFLAGS"
 
3147
    fi
 
3148
  fi
 
3149
 
 
3150
  if test "$kde_use_debug_define" = "yes"; then
 
3151
    CFLAGS="-DNDEBUG $CFLAGS"
 
3152
  fi
 
3153
 
 
3154
 
 
3155
  case "$host" in
 
3156
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
 
3157
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
 
3158
  esac
 
3159
 
 
3160
  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
 
3161
     LDFLAGS=""
 
3162
  fi
 
3163
 
 
3164
  CXXFLAGS=" $CXXFLAGS"
 
3165
 
 
3166
  AC_PROG_CXX
 
3167
 
 
3168
  KDE_CHECK_FOR_BAD_COMPILER
 
3169
 
 
3170
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
 
3171
    if test "$kde_use_debug_code" != "no"; then
 
3172
      if test "$CXX" = "KCC"; then
 
3173
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
 
3174
      else
 
3175
        if test "$kde_use_debug_code" = "full"; then
 
3176
          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
 
3177
        else
 
3178
          CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS"
 
3179
        fi
 
3180
      fi
 
3181
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
 
3182
 
 
3183
      dnl convenience compiler flags
 
3184
      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
 
3185
      AC_SUBST(WOVERLOADED_VIRTUAL)
 
3186
    else
 
3187
      if test "$CXX" = "KCC"; then
 
3188
        CXXFLAGS="+K3 $CXXFLAGS"
 
3189
      else
 
3190
        CXXFLAGS="-O2 $CXXFLAGS"
 
3191
      fi
 
3192
    fi
 
3193
  fi
 
3194
 
 
3195
  if test "$kde_use_debug_define" = "yes"; then
 
3196
    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
 
3197
  fi  
 
3198
 
 
3199
  if test "$kde_use_profiling" = "yes"; then
 
3200
    KDE_CHECK_COMPILER_FLAG(pg,
 
3201
    [
 
3202
      CFLAGS="-pg $CFLAGS"
 
3203
      CXXFLAGS="-pg $CXXFLAGS"
 
3204
    ])
 
3205
  fi
 
3206
 
 
3207
  if test "$kde_use_warnings" = "yes"; then
 
3208
      if test "$GCC" = "yes"; then
 
3209
        CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
 
3210
        case $host in
 
3211
          *-*-linux-gnu)        
 
3212
            CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
 
3213
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
 
3214
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
 
3215
            KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
 
3216
          ;;
 
3217
        esac
 
3218
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
 
3219
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
 
3220
        dnl ### FIXME: revert for KDE 4
 
3221
        KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
 
3222
     fi
 
3223
  fi
 
3224
 
 
3225
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
 
3226
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
 
3227
  fi
 
3228
 
 
3229
  AC_ARG_ENABLE(pch,
 
3230
     AC_HELP_STRING([--enable-pch],
 
3231
                    [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
 
3232
    [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
 
3233
 
 
3234
  HAVE_GCC_VISIBILITY=0
 
3235
  AC_SUBST([HAVE_GCC_VISIBILITY])
 
3236
 
 
3237
  if test "$GXX" = "yes"; then
 
3238
    gcc_no_reorder_blocks=NO
 
3239
    KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES])
 
3240
    if test $kde_use_debug_code != "no" && \
 
3241
       test $kde_use_debug_code != "full" && \
 
3242
       test "YES" = "$gcc_no_reorder_blocks" ; then
 
3243
          CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
 
3244
          CFLAGS="$CFLAGS -fno-reorder-blocks"
 
3245
    fi
 
3246
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
 
3247
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
 
3248
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
 
3249
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
 
3250
    ENABLE_PERMISSIVE_FLAG="-fpermissive"
 
3251
 
 
3252
    if test "$kde_use_pch" = "yes"; then
 
3253
        AC_MSG_CHECKING(whether gcc supports precompiling c header files)
 
3254
        echo >conftest.h
 
3255
        if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
 
3256
            kde_gcc_supports_pch=yes
 
3257
            AC_MSG_RESULT(yes)
 
3258
        else
 
3259
            kde_gcc_supports_pch=no
 
3260
            AC_MSG_RESULT(no)
 
3261
        fi
 
3262
        if test "$kde_gcc_supports_pch" = "yes"; then
 
3263
            AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
 
3264
            if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
 
3265
                kde_gcc_supports_pch=yes
 
3266
                AC_MSG_RESULT(yes)
 
3267
            else
 
3268
                kde_gcc_supports_pch=no
 
3269
                AC_MSG_RESULT(no)
 
3270
            fi
 
3271
        fi
 
3272
        rm -f conftest.h conftest.h.gch
 
3273
    fi
 
3274
 
 
3275
    KDE_CHECK_FOR_OPT_NOINLINE_MATCH
 
3276
    if test "x$kde_cv_opt_noinline_match" = "xno" ; then
 
3277
       CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`"
 
3278
    fi
 
3279
  fi
 
3280
  AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
 
3281
  if test "$CXX" = "KCC"; then
 
3282
    dnl unfortunately we currently cannot disable exception support in KCC
 
3283
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
 
3284
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
 
3285
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
 
3286
 
 
3287
    if test "$kde_use_pch" = "yes"; then
 
3288
      dnl TODO: support --pch-dir!
 
3289
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
 
3290
      dnl the below works (but the dir must exist), but it's
 
3291
      dnl useless for a whole package.
 
3292
      dnl The are precompiled headers for each source file, so when compiling
 
3293
      dnl from scratch, it doesn't make a difference, and they take up
 
3294
      dnl around ~5Mb _per_ sourcefile.
 
3295
      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
 
3296
      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
 
3297
    fi
 
3298
    dnl this flag controls inlining. by default KCC inlines in optimisation mode
 
3299
    dnl all implementations that are defined inside the class {} declaration. 
 
3300
    dnl because of templates-compatibility with broken gcc compilers, this
 
3301
    dnl can cause excessive inlining. This flag limits it to a sane level
 
3302
    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
 
3303
    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
 
3304
    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
 
3305
    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
 
3306
    dnl Some source files are shared between multiple executables
 
3307
    dnl (or libraries) and some of those need template instantiations.
 
3308
    dnl In that case KCC needs to compile those sources with
 
3309
    dnl --one_instantiation_per_object.  To make it easy for us we compile
 
3310
    dnl _all_ objects with that flag (--one_per is a shorthand).
 
3311
    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
 
3312
  fi
 
3313
  AC_SUBST(USE_EXCEPTIONS)
 
3314
  dnl obsolete macro - provided to keep things going
 
3315
  USE_RTTI=
 
3316
  AC_SUBST(USE_RTTI)
 
3317
 
 
3318
  case "$host" in
 
3319
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
 
3320
      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
 
3321
      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
 
3322
      *-*-solaris*) 
 
3323
        if test "$GXX" = yes; then
 
3324
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
 
3325
          if test ! -f $libstdcpp; then
 
3326
             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])
 
3327
          fi
 
3328
        fi
 
3329
        ;;
 
3330
  esac
 
3331
 
 
3332
  AC_VALIDIFY_CXXFLAGS
 
3333
 
 
3334
  AC_PROG_CXXCPP
 
3335
 
 
3336
  if test "$GCC" = yes; then
 
3337
     NOOPT_CFLAGS=-O0
 
3338
  fi
 
3339
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
 
3340
 
 
3341
  AC_ARG_ENABLE(coverage,
 
3342
    AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
 
3343
      if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
 
3344
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
 
3345
        ac_coverage_linker="-lgcc"
 
3346
      elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
 
3347
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
 
3348
        ac_coverage_linker=""
 
3349
      else
 
3350
        AC_MSG_ERROR([coverage with your compiler is not supported])
 
3351
      fi
 
3352
      CFLAGS="$CFLAGS $ac_coverage_compiler"
 
3353
      CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
 
3354
      LDFLAGS="$LDFLAGS $ac_coverage_linker"
 
3355
    ])
 
3356
 
 
3357
  AC_SUBST(NOOPT_CXXFLAGS)
 
3358
  AC_SUBST(NOOPT_CFLAGS)
 
3359
  AC_SUBST(ENABLE_PERMISSIVE_FLAG)
 
3360
 
 
3361
  KDE_CHECK_NEW_LDFLAGS
 
3362
  KDE_CHECK_FINAL
 
3363
  KDE_CHECK_CLOSURE
 
3364
  KDE_CHECK_NMCHECK
 
3365
 
 
3366
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
 
3367
])
 
3368
 
 
3369
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
 
3370
  [
 
3371
    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
 
3372
      [
 
3373
        AC_LANG_SAVE
 
3374
        AC_LANG_CPLUSPLUS
 
3375
 
 
3376
        safe_CXXFLAGS=$CXXFLAGS
 
3377
        safe_LDFLAGS=$LDFLAGS
 
3378
        CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
 
3379
        LDFLAGS="$LDFLAGS -shared -fPIC"
 
3380
 
 
3381
        AC_TRY_LINK(
 
3382
        [
 
3383
          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
 
3384
          #include <string>
 
3385
          int some_function( void ) __attribute__ ((visibility("default")));
 
3386
          int some_function( void )
 
3387
          {
 
3388
            std::string s("blafasel");
 
3389
            return 0;
 
3390
          }
 
3391
        ], [/* elvis is alive */],
 
3392
        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
 
3393
 
 
3394
        CXXFLAGS=$safe_CXXFLAGS
 
3395
        LDFLAGS=$safe_LDFLAGS
 
3396
        AC_LANG_RESTORE
 
3397
      ]
 
3398
    )
 
3399
 
 
3400
    if test x$kde_cv_val_gcc_visibility_bug = xno; then
 
3401
      CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
 
3402
    fi
 
3403
  ]
 
3404
)
 
3405
 
 
3406
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
 
3407
[
 
3408
  AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
 
3409
 
 
3410
  AC_MSG_CHECKING([grepping for visibility push/pop in headers])
 
3411
 
 
3412
  if test "x$GXX" = "xyes"; then
 
3413
    AC_LANG_SAVE
 
3414
    AC_LANG_CPLUSPLUS
 
3415
    AC_EGREP_CPP(
 
3416
       [GCC visibility push],
 
3417
       [ #include <exception> 
 
3418
       ], 
 
3419
    [
 
3420
      AC_MSG_RESULT(yes)
 
3421
      kde_stdc_visibility_patched=yes ],
 
3422
    [ 
 
3423
      AC_MSG_RESULT(no)
 
3424
      AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for 
 
3425
                   visibility support. Disabling -fvisibility=hidden])
 
3426
 
 
3427
      kde_stdc_visibility_patched=no ])
 
3428
 
 
3429
    AC_LANG_RESTORE
 
3430
 
 
3431
    kde_have_gcc_visibility=no
 
3432
    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
 
3433
    [
 
3434
      kde_have_gcc_visibility=yes
 
3435
      dnl the whole toolchain is just a mess, gcc is just too buggy
 
3436
      dnl to handle STL with visibility enabled. Lets reconsider 
 
3437
      dnl when gcc 4.2 is out or when things get fixed in the compiler.
 
3438
      dnl Contact mueller@kde.org for details.
 
3439
      AC_ARG_ENABLE(gcc-hidden-visibility,
 
3440
        AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
 
3441
          [kde_have_gcc_visibility=$enableval],
 
3442
          [kde_have_gcc_visibility=no])
 
3443
 
 
3444
      AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
 
3445
        [
 
3446
          AC_LANG_SAVE
 
3447
          AC_LANG_CPLUSPLUS
 
3448
 
 
3449
          safe_CXXFLAGS=$CXXFLAGS
 
3450
          CXXFLAGS="$CXXFLAGS $all_includes"
 
3451
 
 
3452
          AC_TRY_COMPILE(
 
3453
          [
 
3454
#include <qglobal.h>
 
3455
#if Q_EXPORT - 0 != 0
 
3456
/* if this compiles, then Q_EXPORT is undefined */
 
3457
/* if Q_EXPORT is nonempty, this will break compilation */
 
3458
#endif
 
3459
          ], [/* elvis is alive */],
 
3460
          kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
 
3461
 
 
3462
          CXXFLAGS=$safe_CXXFLAGS
 
3463
          AC_LANG_RESTORE
 
3464
        ]
 
3465
      )
 
3466
 
 
3467
      if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then
 
3468
        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
 
3469
        KDE_CHECK_VISIBILITY_GCC_BUG
 
3470
        HAVE_GCC_VISIBILITY=1
 
3471
        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
 
3472
      fi
 
3473
    ])
 
3474
  fi
 
3475
])
 
3476
 
 
3477
AC_DEFUN([KDE_ADD_DEPENDENCIES],
 
3478
[
 
3479
   [A]M_DEPENDENCIES(CC)
 
3480
   [A]M_DEPENDENCIES(CXX)
 
3481
])
 
3482
 
 
3483
dnl just a wrapper to clean up configure.in
 
3484
AC_DEFUN([KDE_PROG_LIBTOOL],
 
3485
[
 
3486
AC_REQUIRE([AC_CHECK_COMPILERS])
 
3487
AC_REQUIRE([AC_ENABLE_SHARED])
 
3488
AC_REQUIRE([AC_ENABLE_STATIC])
 
3489
 
 
3490
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
 
3491
AC_REQUIRE([KDE_CHECK_LIB64])
 
3492
 
 
3493
AC_OBJEXT
 
3494
AC_EXEEXT
 
3495
 
 
3496
AM_PROG_LIBTOOL
 
3497
AC_LIBTOOL_CXX
 
3498
 
 
3499
LIBTOOL_SHELL="/bin/sh ./libtool"
 
3500
#  LIBTOOL="$LIBTOOL --silent"
 
3501
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
 
3502
AC_SUBST(KDE_PLUGIN)
 
3503
 
 
3504
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
 
3505
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
 
3506
AC_SUBST(KDE_CHECK_PLUGIN)
 
3507
 
 
3508
# we patch configure quite some so we better keep that consistent for incremental runs 
 
3509
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
 
3510
])
 
3511
 
 
3512
AC_DEFUN([KDE_CHECK_LIB64],
 
3513
[
 
3514
    kdelibsuff="$kde_libs_suffix"
 
3515
    if test -z "$kdelibsuff"; then
 
3516
       kdelibsuff="no"
 
3517
    fi
 
3518
    AC_ARG_ENABLE(libsuffix,
 
3519
        AC_HELP_STRING([--enable-libsuffix],
 
3520
            [/lib directory suffix (64,32,none,auto[=default])]),
 
3521
            kdelibsuff=$enableval)
 
3522
    
 
3523
    if test "$kdelibsuff" = "auto"; then
 
3524
    
 
3525
cat > conftest.c << EOF
 
3526
#include <stdio.h>
 
3527
int main() {
 
3528
 return 0;
 
3529
}
 
3530
EOF
 
3531
        kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
 
3532
    s,.*/lib\([[^\/]]*\)/.*,\1, 
 
3533
    p 
 
3534
}'`
 
3535
        rm -rf conftest.*
 
3536
    fi  
 
3537
        
 
3538
    if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
 
3539
       kdelibsuff=
 
3540
    fi
 
3541
    if test -z "$kdelibsuff"; then
 
3542
        AC_MSG_RESULT([not using lib directory suffix])
 
3543
        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
 
3544
    else
 
3545
        if test "$libdir" = '${exec_prefix}/lib'; then
 
3546
            libdir="$libdir${kdelibsuff}"
 
3547
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
 
3548
        fi
 
3549
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
 
3550
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
 
3551
    fi
 
3552
])
 
3553
 
 
3554
AC_DEFUN([KDE_CHECK_TYPES],
 
3555
[  AC_CHECK_SIZEOF(int, 4)dnl
 
3556
   AC_CHECK_SIZEOF(short)dnl
 
3557
  AC_CHECK_SIZEOF(long, 4)dnl
 
3558
  AC_CHECK_SIZEOF(char *, 4)dnl
 
3559
])dnl
 
3560
 
 
3561
dnl Not used - kept for compat only?
 
3562
AC_DEFUN([KDE_DO_IT_ALL],
 
3563
[
 
3564
AC_CANONICAL_SYSTEM
 
3565
AC_ARG_PROGRAM
 
3566
AM_INIT_AUTOMAKE($1, $2)
 
3567
AM_DISABLE_LIBRARIES
 
3568
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
 
3569
AC_CHECK_COMPILERS
 
3570
KDE_PROG_LIBTOOL
 
3571
AM_KDE_WITH_NLS
 
3572
AC_PATH_KDE
 
3573
])
 
3574
 
 
3575
AC_DEFUN([AC_CHECK_RPATH],
 
3576
[
 
3577
AC_MSG_CHECKING(for rpath)
 
3578
AC_ARG_ENABLE(rpath,
 
3579
      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
 
3580
      USE_RPATH=$enableval, USE_RPATH=yes)
 
3581
 
 
3582
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
 
3583
 
 
3584
  KDE_RPATH="-R \$(libdir)"
 
3585
 
 
3586
  if test "$kde_libraries" != "$libdir"; then
 
3587
      KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
 
3588
  fi
 
3589
 
 
3590
  if test -n "$qt_libraries"; then
 
3591
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
 
3592
  fi
 
3593
  dnl $x_libraries is set to /usr/lib in case
 
3594
  if test -n "$X_LDFLAGS"; then
 
3595
    X_RPATH="-R \$(x_libraries)"
 
3596
    KDE_RPATH="$KDE_RPATH $X_RPATH"
 
3597
  fi
 
3598
  if test -n "$KDE_EXTRA_RPATH"; then
 
3599
    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
 
3600
  fi
 
3601
fi
 
3602
AC_SUBST(KDE_EXTRA_RPATH)
 
3603
AC_SUBST(KDE_RPATH)
 
3604
AC_SUBST(X_RPATH)
 
3605
AC_MSG_RESULT($USE_RPATH)
 
3606
])
 
3607
 
 
3608
dnl Check for the type of the third argument of getsockname
 
3609
AC_DEFUN([AC_CHECK_SOCKLEN_T],
 
3610
[
 
3611
   AC_MSG_CHECKING(for socklen_t)
 
3612
   AC_CACHE_VAL(kde_cv_socklen_t,
 
3613
   [
 
3614
      AC_LANG_PUSH(C++)
 
3615
      kde_cv_socklen_t=no
 
3616
      AC_TRY_COMPILE([
 
3617
         #include <sys/types.h>
 
3618
         #include <sys/socket.h>
 
3619
      ],
 
3620
      [
 
3621
         socklen_t len;
 
3622
         getpeername(0,0,&len);
 
3623
      ],
 
3624
      [
 
3625
         kde_cv_socklen_t=yes
 
3626
         kde_cv_socklen_t_equiv=socklen_t
 
3627
      ])
 
3628
      AC_LANG_POP(C++)
 
3629
   ])
 
3630
   AC_MSG_RESULT($kde_cv_socklen_t)
 
3631
   if test $kde_cv_socklen_t = no; then
 
3632
      AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
 
3633
      AC_CACHE_VAL(kde_cv_socklen_t_equiv,
 
3634
      [
 
3635
         kde_cv_socklen_t_equiv=int
 
3636
         AC_LANG_PUSH(C++)
 
3637
         for t in int size_t unsigned long "unsigned long"; do
 
3638
            AC_TRY_COMPILE([
 
3639
               #include <sys/types.h>
 
3640
               #include <sys/socket.h>
 
3641
            ],
 
3642
            [
 
3643
               $t len;
 
3644
               getpeername(0,0,&len);
 
3645
            ],
 
3646
            [
 
3647
               kde_cv_socklen_t_equiv="$t"
 
3648
               break
 
3649
            ])
 
3650
         done
 
3651
         AC_LANG_POP(C++)
 
3652
      ])
 
3653
      AC_MSG_RESULT($kde_cv_socklen_t_equiv)
 
3654
   fi
 
3655
   AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
 
3656
                     [type to use in place of socklen_t if not defined])
 
3657
   AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
 
3658
                     [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
 
3659
])
 
3660
 
 
3661
dnl This is a merge of some macros out of the gettext aclocal.m4
 
3662
dnl since we don't need anything, I took the things we need
 
3663
dnl the copyright for them is:
 
3664
dnl >
 
3665
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
3666
dnl This Makefile.in is free software; the Free Software Foundation
 
3667
dnl gives unlimited permission to copy and/or distribute it,
 
3668
dnl with or without modifications, as long as this notice is preserved.
 
3669
 
 
3670
dnl This program is distributed in the hope that it will be useful,
 
3671
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
3672
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
3673
dnl PARTICULAR PURPOSE.
 
3674
dnl >
 
3675
dnl for this file it is relicensed under LGPL
 
3676
 
 
3677
AC_DEFUN([AM_KDE_WITH_NLS],
 
3678
  [
 
3679
    dnl If we use NLS figure out what method
 
3680
 
 
3681
    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
 
3682
        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
 
3683
    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
3684
 
 
3685
     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
 
3686
        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
 
3687
        GMSGFMT=":"
 
3688
      fi
 
3689
      MSGFMT=$GMSGFMT
 
3690
      AC_SUBST(GMSGFMT)
 
3691
      AC_SUBST(MSGFMT)
 
3692
 
 
3693
      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
 
3694
        [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
3695
 
 
3696
      dnl Test whether we really found GNU xgettext.
 
3697
      if test "$XGETTEXT" != ":"; then
 
3698
        dnl If it is no GNU xgettext we define it as : so that the
 
3699
        dnl Makefiles still can work.
 
3700
        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
3701
          : ;
 
3702
        else
 
3703
          AC_MSG_RESULT(
 
3704
            [found xgettext programs is not GNU xgettext; ignore it])
 
3705
          XGETTEXT=":"
 
3706
        fi
 
3707
      fi
 
3708
     AC_SUBST(XGETTEXT)
 
3709
 
 
3710
  ])
 
3711
 
 
3712
# Search path for a program which passes the given test.
 
3713
# Ulrich Drepper <drepper@cygnus.com>, 1996.
 
3714
 
 
3715
# serial 1
 
3716
# Stephan Kulow: I appended a _KDE against name conflicts
 
3717
 
 
3718
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
 
3719
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
3720
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
 
3721
[# Extract the first word of "$2", so it can be a program name with args.
 
3722
set dummy $2; ac_word=[$]2
 
3723
AC_MSG_CHECKING([for $ac_word])
 
3724
AC_CACHE_VAL(ac_cv_path_$1,
 
3725
[case "[$]$1" in
 
3726
  /*)
 
3727
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
3728
  ;;
 
3729
  *)
 
3730
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
3731
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
3732
    test -z "$ac_dir" && ac_dir=.
 
3733
    if test -f $ac_dir/$ac_word; then
 
3734
      if [$3]; then
 
3735
        ac_cv_path_$1="$ac_dir/$ac_word"
 
3736
        break
 
3737
      fi
 
3738
    fi
 
3739
  done
 
3740
  IFS="$ac_save_ifs"
 
3741
dnl If no 4th arg is given, leave the cache variable unset,
 
3742
dnl so AC_PATH_PROGS will keep looking.
 
3743
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
3744
])dnl
 
3745
  ;;
 
3746
esac])dnl
 
3747
$1="$ac_cv_path_$1"
 
3748
if test -n "[$]$1"; then
 
3749
  AC_MSG_RESULT([$]$1)
 
3750
else
 
3751
  AC_MSG_RESULT(no)
 
3752
fi
 
3753
AC_SUBST($1)dnl
 
3754
])
 
3755
 
 
3756
 
 
3757
# Check whether LC_MESSAGES is available in <locale.h>.
 
3758
# Ulrich Drepper <drepper@cygnus.com>, 1995.
 
3759
 
 
3760
# serial 1
 
3761
 
 
3762
AC_DEFUN([AM_LC_MESSAGES],
 
3763
  [if test $ac_cv_header_locale_h = yes; then
 
3764
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
3765
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
3766
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
3767
    if test $am_cv_val_LC_MESSAGES = yes; then
 
3768
      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
 
3769
    fi
 
3770
  fi])
 
3771
 
 
3772
dnl From Jim Meyering.
 
3773
dnl FIXME: migrate into libit.
 
3774
 
 
3775
AC_DEFUN([AM_FUNC_OBSTACK],
 
3776
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
 
3777
 [AC_TRY_LINK([#include "obstack.h"],
 
3778
              [struct obstack *mem;obstack_free(mem,(char *) 0)],
 
3779
              am_cv_func_obstack=yes,
 
3780
              am_cv_func_obstack=no)])
 
3781
 if test $am_cv_func_obstack = yes; then
 
3782
   AC_DEFINE(HAVE_OBSTACK)
 
3783
 else
 
3784
   LIBOBJS="$LIBOBJS obstack.o"
 
3785
 fi
 
3786
])
 
3787
 
 
3788
dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
 
3789
dnl FIXME: Migrate into libit
 
3790
 
 
3791
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
 
3792
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
 
3793
 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
 
3794
              am_cv_lib_error_at_line=yes,
 
3795
              am_cv_lib_error_at_line=no)])
 
3796
 if test $am_cv_lib_error_at_line = no; then
 
3797
   LIBOBJS="$LIBOBJS error.o"
 
3798
 fi
 
3799
 AC_SUBST(LIBOBJS)dnl
 
3800
])
 
3801
 
 
3802
# Macro to add for using GNU gettext.
 
3803
# Ulrich Drepper <drepper@cygnus.com>, 1995.
 
3804
 
 
3805
# serial 1
 
3806
# Stephan Kulow: I put a KDE in it to avoid name conflicts
 
3807
 
 
3808
AC_DEFUN([AM_KDE_GNU_GETTEXT],
 
3809
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
3810
   AC_REQUIRE([AC_PROG_RANLIB])dnl
 
3811
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
3812
   AC_REQUIRE([AC_TYPE_OFF_T])dnl
 
3813
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 
3814
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 
3815
   AC_REQUIRE([AC_FUNC_MMAP])dnl
 
3816
   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
 
3817
   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
 
3818
   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
 
3819
__argz_count __argz_stringify __argz_next])
 
3820
 
 
3821
   AC_MSG_CHECKING(for stpcpy)
 
3822
   AC_CACHE_VAL(kde_cv_func_stpcpy,
 
3823
   [
 
3824
   kde_safe_cxxflags=$CXXFLAGS
 
3825
   CXXFLAGS="-Werror"
 
3826
   AC_LANG_SAVE
 
3827
   AC_LANG_CPLUSPLUS
 
3828
   AC_TRY_COMPILE([
 
3829
   #include <string.h>
 
3830
   ],
 
3831
   [
 
3832
   char buffer[200];
 
3833
   stpcpy(buffer, buffer);
 
3834
   ],
 
3835
   kde_cv_func_stpcpy=yes,
 
3836
   kde_cv_func_stpcpy=no)
 
3837
   AC_LANG_RESTORE
 
3838
   CXXFLAGS=$kde_safe_cxxflags
 
3839
   ])
 
3840
   AC_MSG_RESULT($kde_cv_func_stpcpy)
 
3841
   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
 
3842
     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
 
3843
   fi
 
3844
 
 
3845
   AM_LC_MESSAGES
 
3846
 
 
3847
   if test "x$CATOBJEXT" != "x"; then
 
3848
     if test "x$ALL_LINGUAS" = "x"; then
 
3849
       LINGUAS=
 
3850
     else
 
3851
       AC_MSG_CHECKING(for catalogs to be installed)
 
3852
       NEW_LINGUAS=
 
3853
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
 
3854
         case "$ALL_LINGUAS" in
 
3855
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
 
3856
         esac
 
3857
       done
 
3858
       LINGUAS=$NEW_LINGUAS
 
3859
       AC_MSG_RESULT($LINGUAS)
 
3860
     fi
 
3861
 
 
3862
     dnl Construct list of names of catalog files to be constructed.
 
3863
     if test -n "$LINGUAS"; then
 
3864
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
3865
     fi
 
3866
   fi
 
3867
 
 
3868
  ])
 
3869
 
 
3870
AC_DEFUN([AC_HAVE_XPM],
 
3871
 [AC_REQUIRE_CPP()dnl
 
3872
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
3873
 
 
3874
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
 
3875
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
 
3876
 
 
3877
 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
 
3878
        xpm_test=$withval, xpm_test="yes")
 
3879
 if test "x$xpm_test" = xno; then
 
3880
   ac_cv_have_xpm=no
 
3881
 else
 
3882
   AC_MSG_CHECKING(for XPM)
 
3883
   AC_CACHE_VAL(ac_cv_have_xpm,
 
3884
   [
 
3885
    ac_save_ldflags="$LDFLAGS"
 
3886
    ac_save_cflags="$CFLAGS"
 
3887
    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 
3888
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
 
3889
    else
 
3890
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
 
3891
    fi
 
3892
    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
 
3893
    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
 
3894
    AC_TRY_LINK([#include <X11/xpm.h>],[],
 
3895
        ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
 
3896
    LDFLAGS="$ac_save_ldflags"
 
3897
    CFLAGS="$ac_save_cflags"
 
3898
   ])dnl
 
3899
 
 
3900
  if test "$ac_cv_have_xpm" = no; then
 
3901
    AC_MSG_RESULT(no)
 
3902
    XPM_LDFLAGS=""
 
3903
    XPMINC=""
 
3904
    $2
 
3905
  else
 
3906
    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
 
3907
    if test "$XPM_LDFLAGS" = ""; then
 
3908
       XPMLIB='-lXpm $(LIB_X11)'
 
3909
    else
 
3910
       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
 
3911
    fi
 
3912
    if test "$XPM_INCLUDE" = ""; then
 
3913
       XPMINC=""
 
3914
    else
 
3915
       XPMINC="-I$XPM_INCLUDE"
 
3916
    fi
 
3917
    AC_MSG_RESULT(yes)
 
3918
    $1
 
3919
  fi
 
3920
 fi
 
3921
 AC_SUBST(XPMINC)
 
3922
 AC_SUBST(XPMLIB)
 
3923
])
 
3924
 
 
3925
AC_DEFUN([AC_HAVE_DPMS],
 
3926
 [AC_REQUIRE_CPP()dnl
 
3927
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
3928
 
 
3929
 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
 
3930
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
 
3931
 DPMS_LIB=
 
3932
 
 
3933
 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
 
3934
        dpms_test=$withval, dpms_test="yes")
 
3935
 if test "x$dpms_test" = xno; then
 
3936
   ac_cv_have_dpms=no
 
3937
 else
 
3938
   AC_MSG_CHECKING(for DPMS)
 
3939
   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
 
3940
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
 
3941
   AC_CACHE_VAL(ac_cv_have_dpms,
 
3942
   [
 
3943
    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
 
3944
      AC_MSG_RESULT(no)
 
3945
      ac_cv_have_dpms="no"
 
3946
    else
 
3947
      ac_save_ldflags="$LDFLAGS"
 
3948
      ac_save_cflags="$CFLAGS"
 
3949
      ac_save_libs="$LIBS"
 
3950
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
 
3951
      LIBS="-lX11 -lXext $LIBSOCKET"
 
3952
      CFLAGS="$CFLAGS $X_INCLUDES"
 
3953
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3954
      AC_TRY_LINK([
 
3955
          #include <X11/Xproto.h>
 
3956
          #include <X11/X.h>
 
3957
          #include <X11/Xlib.h>
 
3958
          #include <X11/extensions/dpms.h>
 
3959
          int foo_test_dpms()
 
3960
          { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
 
3961
          ac_cv_have_dpms="yes", [
 
3962
              LIBS="-lXdpms $LIBS"
 
3963
              AC_TRY_LINK([
 
3964
                  #include <X11/Xproto.h>
 
3965
                  #include <X11/X.h>
 
3966
                  #include <X11/Xlib.h>
 
3967
                  #include <X11/extensions/dpms.h>
 
3968
                  int foo_test_dpms()
 
3969
                  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
 
3970
                  [
 
3971
                  ac_cv_have_dpms="-lXdpms"
 
3972
                  ],ac_cv_have_dpms="no")
 
3973
              ])
 
3974
      LDFLAGS="$ac_save_ldflags"
 
3975
      CFLAGS="$ac_save_cflags"
 
3976
      LIBS="$ac_save_libs"
 
3977
    fi
 
3978
   ])dnl
 
3979
 
 
3980
  if test "$ac_cv_have_dpms" = no; then
 
3981
    AC_MSG_RESULT(no)
 
3982
    DPMS_LDFLAGS=""
 
3983
    DPMSINC=""
 
3984
    $2
 
3985
  else
 
3986
    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
 
3987
    if test "$ac_cv_have_dpms" = "-lXdpms"; then
 
3988
       DPMS_LIB="-lXdpms"
 
3989
    fi
 
3990
    if test "$DPMS_LDFLAGS" = ""; then
 
3991
       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
 
3992
    else
 
3993
       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
 
3994
    fi
 
3995
    if test "$DPMS_INCLUDE" = ""; then
 
3996
       DPMSINC=""
 
3997
    else
 
3998
       DPMSINC="-I$DPMS_INCLUDE"
 
3999
    fi
 
4000
    AC_MSG_RESULT(yes)
 
4001
    $1
 
4002
  fi
 
4003
 fi
 
4004
 ac_save_cflags="$CFLAGS"
 
4005
 CFLAGS="$CFLAGS $X_INCLUDES"
 
4006
 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
4007
 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
 
4008
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
 
4009
 AC_CHECK_DECL(DPMSCapable,
 
4010
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
 
4011
   [#include <X11/Xlib.h>
 
4012
   #include <X11/extensions/dpms.h>])
 
4013
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
 
4014
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
 
4015
 AC_CHECK_DECL(DPMSInfo,
 
4016
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
 
4017
   [#include <X11/Xlib.h>
 
4018
   #include <X11/extensions/dpms.h>])
 
4019
 CFLAGS="$ac_save_cflags"
 
4020
 AC_SUBST(DPMSINC)
 
4021
 AC_SUBST(DPMSLIB)
 
4022
])
 
4023
 
 
4024
AC_DEFUN([AC_HAVE_GL],
 
4025
 [AC_REQUIRE_CPP()dnl
 
4026
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
4027
 
 
4028
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
 
4029
 test -z "$GL_INCLUDE" && GL_INCLUDE=
 
4030
 
 
4031
 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
 
4032
        gl_test=$withval, gl_test="yes")
 
4033
 if test "x$kde_use_qt_emb" = "xyes"; then
 
4034
   # GL and Qt Embedded is a no-go for now.
 
4035
   ac_cv_have_gl=no
 
4036
 elif test "x$gl_test" = xno; then
 
4037
   ac_cv_have_gl=no
 
4038
 else
 
4039
   AC_MSG_CHECKING(for GL)
 
4040
   AC_CACHE_VAL(ac_cv_have_gl,
 
4041
   [
 
4042
    AC_LANG_SAVE
 
4043
    AC_LANG_CPLUSPLUS
 
4044
    ac_save_ldflags=$LDFLAGS
 
4045
    ac_save_cxxflags=$CXXFLAGS
 
4046
    ac_save_libs=$LIBS
 
4047
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
 
4048
    LIBS="$LIBS -lGL -lGLU"
 
4049
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
 
4050
    LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
 
4051
    CXXFLAGS="$CFLAGS $X_INCLUDES"
 
4052
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
 
4053
    AC_TRY_LINK([#include <GL/gl.h>
 
4054
#include <GL/glu.h>
 
4055
], [],
 
4056
        ac_cv_have_gl="yes", ac_cv_have_gl="no")
 
4057
    AC_LANG_RESTORE
 
4058
    LDFLAGS=$ac_save_ldflags
 
4059
    CXXFLAGS=$ac_save_cxxflags
 
4060
    LIBS=$ac_save_libs
 
4061
   ])dnl
 
4062
 
 
4063
  if test "$ac_cv_have_gl" = "no"; then
 
4064
    AC_MSG_RESULT(no)
 
4065
    GL_LDFLAGS=""
 
4066
    GLINC=""
 
4067
    $2
 
4068
  else
 
4069
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
 
4070
    if test "$GL_LDFLAGS" = ""; then
 
4071
       GLLIB='-lGLU -lGL $(LIB_X11)'
 
4072
    else
 
4073
       GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
 
4074
    fi
 
4075
    if test "$GL_INCLUDE" = ""; then
 
4076
       GLINC=""
 
4077
    else
 
4078
       GLINC="-I$GL_INCLUDE"
 
4079
    fi
 
4080
    AC_MSG_RESULT($ac_cv_have_gl)
 
4081
    $1
 
4082
  fi
 
4083
 fi
 
4084
 AC_SUBST(GLINC)
 
4085
 AC_SUBST(GLLIB)
 
4086
])
 
4087
 
 
4088
 
 
4089
 dnl shadow password and PAM magic - maintained by ossi@kde.org
 
4090
 
 
4091
AC_DEFUN([KDE_PAM], [
 
4092
  AC_REQUIRE([KDE_CHECK_LIBDL])
 
4093
 
 
4094
  want_pam=
 
4095
  AC_ARG_WITH(pam,
 
4096
    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
 
4097
    [ if test "x$withval" = "xyes"; then
 
4098
        want_pam=yes
 
4099
        pam_service=kde
 
4100
      elif test "x$withval" = "xno"; then
 
4101
        want_pam=no
 
4102
      else
 
4103
        want_pam=yes
 
4104
        pam_service=$withval
 
4105
      fi
 
4106
    ], [ pam_service=kde ])
 
4107
 
 
4108
  use_pam=
 
4109
  PAMLIBS=
 
4110
  if test "x$want_pam" != xno; then
 
4111
    AC_CHECK_LIB(pam, pam_start, [
 
4112
      AC_CHECK_HEADER(security/pam_appl.h,
 
4113
        [ pam_header=security/pam_appl.h ],
 
4114
        [ AC_CHECK_HEADER(pam/pam_appl.h,
 
4115
            [ pam_header=pam/pam_appl.h ],
 
4116
            [
 
4117
    AC_MSG_WARN([PAM detected, but no headers found!
 
4118
Make sure you have the necessary development packages installed.])
 
4119
            ]
 
4120
          )
 
4121
        ]
 
4122
      )
 
4123
    ], , $LIBDL)
 
4124
    if test -z "$pam_header"; then
 
4125
      if test "x$want_pam" = xyes; then
 
4126
        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
 
4127
      fi
 
4128
    else
 
4129
      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
 
4130
      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
 
4131
      use_pam=yes
 
4132
 
 
4133
      dnl darwin claims to be something special
 
4134
      if test "$pam_header" = "pam/pam_appl.h"; then
 
4135
        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
 
4136
      fi
 
4137
 
 
4138
      dnl test whether struct pam_message is const (Linux) or not (Sun)
 
4139
      AC_MSG_CHECKING(for const pam_message)
 
4140
      AC_EGREP_HEADER([struct pam_message], $pam_header,
 
4141
        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
 
4142
                          [AC_MSG_RESULT([const: Linux-type PAM])],
 
4143
                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
 
4144
                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
 
4145
                          )],
 
4146
        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
 
4147
    fi
 
4148
  fi
 
4149
 
 
4150
  AC_SUBST(PAMLIBS)
 
4151
])
 
4152
 
 
4153
dnl DEF_PAM_SERVICE(arg name, full name, define name)
 
4154
AC_DEFUN([DEF_PAM_SERVICE], [
 
4155
  AC_ARG_WITH($1-pam,
 
4156
    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
 
4157
    [ if test "x$use_pam" = xyes; then
 
4158
        $3_PAM_SERVICE=$withval
 
4159
      else
 
4160
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
 
4161
You may want to enforce it by using --with-pam.])
 
4162
      fi
 
4163
    ], 
 
4164
    [ if test "x$use_pam" = xyes; then
 
4165
        $3_PAM_SERVICE="$pam_service"
 
4166
      fi
 
4167
    ])
 
4168
    if test -n "$$3_PAM_SERVICE"; then
 
4169
      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
 
4170
      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
 
4171
    fi
 
4172
    AC_SUBST($3_PAM_SERVICE)
 
4173
])
 
4174
 
 
4175
AC_DEFUN([KDE_SHADOWPASSWD], [
 
4176
  AC_REQUIRE([KDE_PAM])
 
4177
 
 
4178
  AC_CHECK_LIB(shadow, getspent,
 
4179
    [ LIBSHADOW="-lshadow"
 
4180
      ac_use_shadow=yes
 
4181
    ],
 
4182
    [ dnl for UnixWare
 
4183
      AC_CHECK_LIB(gen, getspent, 
 
4184
        [ LIBGEN="-lgen"
 
4185
          ac_use_shadow=yes
 
4186
        ], 
 
4187
        [ AC_CHECK_FUNC(getspent, 
 
4188
            [ ac_use_shadow=yes ],
 
4189
            [ ac_use_shadow=no ])
 
4190
        ])
 
4191
    ])
 
4192
  AC_SUBST(LIBSHADOW)
 
4193
  AC_SUBST(LIBGEN)
 
4194
  
 
4195
  AC_MSG_CHECKING([for shadow passwords])
 
4196
 
 
4197
  AC_ARG_WITH(shadow,
 
4198
    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
 
4199
    [ if test "x$withval" != "xno"; then
 
4200
        use_shadow=yes
 
4201
      else
 
4202
        use_shadow=no
 
4203
      fi
 
4204
    ], [
 
4205
      use_shadow="$ac_use_shadow"
 
4206
    ])
 
4207
 
 
4208
  if test "x$use_shadow" = xyes; then
 
4209
    AC_MSG_RESULT(yes)
 
4210
    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
 
4211
  else
 
4212
    AC_MSG_RESULT(no)
 
4213
    LIBSHADOW=
 
4214
    LIBGEN=
 
4215
  fi
 
4216
 
 
4217
  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
 
4218
  dnl this still applies, if we could use it indirectly through pam.
 
4219
  if test "x$use_shadow" = xyes || 
 
4220
     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
 
4221
      case $host in
 
4222
      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
 
4223
        SETUIDFLAGS="-m 4755 -o root";;
 
4224
      *)
 
4225
        SETUIDFLAGS="-m 4755";;
 
4226
      esac
 
4227
  fi
 
4228
  AC_SUBST(SETUIDFLAGS)
 
4229
 
 
4230
])
 
4231
 
 
4232
AC_DEFUN([KDE_PASSWDLIBS], [
 
4233
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
 
4234
  AC_REQUIRE([KDE_PAM])
 
4235
  AC_REQUIRE([KDE_SHADOWPASSWD])
 
4236
 
 
4237
  if test "x$use_pam" = "xyes"; then 
 
4238
    PASSWDLIBS="$PAMLIBS"
 
4239
  else
 
4240
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
 
4241
  fi
 
4242
 
 
4243
  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
 
4244
  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
 
4245
  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
 
4246
  dnl may need to read /etc/master.passwd).
 
4247
  case $host in
 
4248
  *-*-freebsd*)
 
4249
    SETUIDFLAGS="-m 4755 -o root"
 
4250
    ;;
 
4251
  *)
 
4252
    ;;
 
4253
  esac
 
4254
 
 
4255
  AC_SUBST(PASSWDLIBS)
 
4256
])
 
4257
 
 
4258
AC_DEFUN([KDE_CHECK_LIBDL],
 
4259
[
 
4260
AC_CHECK_LIB(dl, dlopen, [
 
4261
LIBDL="-ldl"
 
4262
ac_cv_have_dlfcn=yes
 
4263
])
 
4264
 
 
4265
AC_CHECK_LIB(dld, shl_unload, [
 
4266
LIBDL="-ldld"
 
4267
ac_cv_have_shload=yes
 
4268
])
 
4269
 
 
4270
AC_SUBST(LIBDL)
 
4271
])
 
4272
 
 
4273
AC_DEFUN([KDE_CHECK_DLOPEN],
 
4274
[
 
4275
KDE_CHECK_LIBDL
 
4276
AC_CHECK_HEADERS(dlfcn.h dl.h)
 
4277
if test "$ac_cv_header_dlfcn_h" = "no"; then
 
4278
  ac_cv_have_dlfcn=no
 
4279
fi
 
4280
 
 
4281
if test "$ac_cv_header_dl_h" = "no"; then
 
4282
  ac_cv_have_shload=no
 
4283
fi
 
4284
 
 
4285
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
 
4286
dnl (MM)
 
4287
AC_ARG_ENABLE(dlopen,
 
4288
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
 
4289
enable_dlopen=$enableval,
 
4290
enable_dlopen=yes)
 
4291
 
 
4292
# override the user's opinion, if we know it better ;)
 
4293
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
 
4294
  enable_dlopen=no
 
4295
fi
 
4296
 
 
4297
if test "$ac_cv_have_dlfcn" = "yes"; then
 
4298
  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
 
4299
fi
 
4300
 
 
4301
if test "$ac_cv_have_shload" = "yes"; then
 
4302
  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
 
4303
fi
 
4304
 
 
4305
if test "$enable_dlopen" = no ; then
 
4306
  test -n "$1" && eval $1
 
4307
else
 
4308
  test -n "$2" && eval $2
 
4309
fi
 
4310
 
 
4311
])
 
4312
 
 
4313
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
 
4314
[
 
4315
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
 
4316
KDE_PROG_LIBTOOL
 
4317
AC_MSG_CHECKING([dynamic loading])
 
4318
eval "`egrep '^build_libtool_libs=' libtool`"
 
4319
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
 
4320
  dynamic_loading=yes
 
4321
  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
 
4322
else
 
4323
  dynamic_loading=no
 
4324
fi
 
4325
AC_MSG_RESULT($dynamic_loading)
 
4326
if test "$dynamic_loading" = "yes"; then
 
4327
  $1
 
4328
else
 
4329
  $2
 
4330
fi
 
4331
])
 
4332
 
 
4333
AC_DEFUN([KDE_ADD_INCLUDES],
 
4334
[
 
4335
if test -z "$1"; then
 
4336
  test_include="Pix.h"
 
4337
else
 
4338
  test_include="$1"
 
4339
fi
 
4340
 
 
4341
AC_MSG_CHECKING([for libg++ ($test_include)])
 
4342
 
 
4343
AC_CACHE_VAL(kde_cv_libgpp_includes,
 
4344
[
 
4345
kde_cv_libgpp_includes=no
 
4346
 
 
4347
   for ac_dir in               \
 
4348
                               \
 
4349
     /usr/include/g++          \
 
4350
     /usr/include              \
 
4351
     /usr/unsupported/include  \
 
4352
     /opt/include              \
 
4353
     $extra_include            \
 
4354
     ; \
 
4355
   do
 
4356
     if test -r "$ac_dir/$test_include"; then
 
4357
       kde_cv_libgpp_includes=$ac_dir
 
4358
       break
 
4359
     fi
 
4360
   done
 
4361
])
 
4362
 
 
4363
AC_MSG_RESULT($kde_cv_libgpp_includes)
 
4364
if test "$kde_cv_libgpp_includes" != "no"; then
 
4365
  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
 
4366
fi
 
4367
])
 
4368
])
 
4369
 
 
4370
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
 
4371
[
 
4372
  dnl This code is here specifically to handle the
 
4373
  dnl various flavors of threading library on FreeBSD
 
4374
  dnl 4-, 5-, and 6-, and the (weird) rules around it.
 
4375
  dnl There may be an environment PTHREAD_LIBS that 
 
4376
  dnl specifies what to use; otherwise, search for it.
 
4377
  dnl -pthread is special cased and unsets LIBPTHREAD
 
4378
  dnl below if found.
 
4379
  LIBPTHREAD=""
 
4380
 
 
4381
  if test -n "$PTHREAD_LIBS"; then
 
4382
    if test "x$PTHREAD_LIBS" = "x-pthread" ; then
 
4383
      LIBPTHREAD="PTHREAD"
 
4384
    else
 
4385
      PTHREAD_LIBS_save="$PTHREAD_LIBS"
 
4386
      PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
 
4387
      AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
 
4388
      KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
 
4389
          LIBPTHREAD="$PTHREAD_LIBS_save"])
 
4390
      PTHREAD_LIBS="$PTHREAD_LIBS_save"
 
4391
    fi
 
4392
  fi
 
4393
 
 
4394
  dnl Is this test really needed, in the face of the Tru64 test below?
 
4395
  if test -z "$LIBPTHREAD"; then
 
4396
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
 
4397
  fi
 
4398
 
 
4399
  dnl This is a special Tru64 check, see BR 76171 issue #18.
 
4400
  if test -z "$LIBPTHREAD" ; then
 
4401
    AC_MSG_CHECKING([for pthread_create in -lpthread])
 
4402
    kde_safe_libs=$LIBS
 
4403
    LIBS="$LIBS -lpthread"
 
4404
    AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
 
4405
        AC_MSG_RESULT(yes)
 
4406
        LIBPTHREAD="-lpthread"],[
 
4407
        AC_MSG_RESULT(no)])
 
4408
    LIBS=$kde_safe_libs
 
4409
  fi
 
4410
 
 
4411
  dnl Un-special-case for FreeBSD.
 
4412
  if test "x$LIBPTHREAD" = "xPTHREAD" ; then
 
4413
    LIBPTHREAD=""
 
4414
  fi
 
4415
 
 
4416
  AC_SUBST(LIBPTHREAD)
 
4417
])
 
4418
 
 
4419
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
 
4420
[
 
4421
      USE_THREADS=""
 
4422
      if test -z "$LIBPTHREAD"; then
 
4423
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
 
4424
      fi
 
4425
 
 
4426
    AH_VERBATIM(__svr_define, [
 
4427
#if defined(__SVR4) && !defined(__svr4__)
 
4428
#define __svr4__ 1
 
4429
#endif
 
4430
])
 
4431
    case $host_os in
 
4432
        solaris*)
 
4433
                KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
 
4434
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
 
4435
                ;;
 
4436
        freebsd*)
 
4437
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
 
4438
                ;;
 
4439
        aix*)
 
4440
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
 
4441
                LIBPTHREAD="$LIBPTHREAD -lc_r"
 
4442
                ;;
 
4443
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
 
4444
                if test "$CXX" = "KCC"; then
 
4445
                  CXXFLAGS="$CXXFLAGS --thread_safe"
 
4446
                  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
 
4447
                fi
 
4448
                ;;
 
4449
        *)
 
4450
                ;;
 
4451
    esac
 
4452
    AC_SUBST(USE_THREADS)
 
4453
    AC_SUBST(LIBPTHREAD)
 
4454
])
 
4455
 
 
4456
AC_DEFUN([KDE_CHECK_THREADING],
 
4457
[
 
4458
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
 
4459
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
 
4460
  dnl default is yes if libpthread is found and no if no libpthread is available
 
4461
  if test -z "$LIBPTHREAD"; then
 
4462
    if test -z "$USE_THREADS"; then
 
4463
      kde_check_threading_default=no
 
4464
    else
 
4465
      kde_check_threading_default=yes
 
4466
    fi
 
4467
  else
 
4468
    kde_check_threading_default=yes
 
4469
  fi
 
4470
  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
 
4471
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
 
4472
  if test "x$kde_use_threading" = "xyes"; then
 
4473
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
 
4474
  fi
 
4475
])
 
4476
 
 
4477
AC_DEFUN([KDE_TRY_LINK_PYTHON],
 
4478
[
 
4479
if test "$kde_python_link_found" = no; then
 
4480
 
 
4481
if test "$1" = normal; then
 
4482
  AC_MSG_CHECKING(if a Python application links)
 
4483
else
 
4484
  AC_MSG_CHECKING(if Python depends on $2)
 
4485
fi
 
4486
 
 
4487
AC_CACHE_VAL(kde_cv_try_link_python_$1,
 
4488
[
 
4489
kde_save_cflags="$CFLAGS"
 
4490
CFLAGS="$CFLAGS $PYTHONINC"
 
4491
kde_save_libs="$LIBS"
 
4492
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
 
4493
kde_save_ldflags="$LDFLAGS"
 
4494
LDFLAGS="$LDFLAGS $PYTHONLIB"
 
4495
 
 
4496
AC_TRY_LINK(
 
4497
[
 
4498
#include <Python.h>
 
4499
],[
 
4500
        PySys_SetArgv(1, 0);
 
4501
],
 
4502
        [kde_cv_try_link_python_$1=yes],
 
4503
        [kde_cv_try_link_python_$1=no]
 
4504
)
 
4505
CFLAGS="$kde_save_cflags"
 
4506
LIBS="$kde_save_libs"
 
4507
LDFLAGS="$kde_save_ldflags"
 
4508
])
 
4509
 
 
4510
if test "$kde_cv_try_link_python_$1" = "yes"; then
 
4511
  AC_MSG_RESULT(yes)
 
4512
  kde_python_link_found=yes
 
4513
  if test ! "$1" = normal; then
 
4514
    LIBPYTHON="$LIBPYTHON $2"
 
4515
  fi
 
4516
  $3
 
4517
else
 
4518
  AC_MSG_RESULT(no)
 
4519
  $4
 
4520
fi
 
4521
 
 
4522
fi
 
4523
 
 
4524
])
 
4525
 
 
4526
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
 
4527
[
 
4528
AC_MSG_CHECKING([for Python directory])
 
4529
 
 
4530
AC_CACHE_VAL(kde_cv_pythondir,
 
4531
[
 
4532
  if test -z "$PYTHONDIR"; then
 
4533
    kde_cv_pythondir=/usr/local
 
4534
  else
 
4535
    kde_cv_pythondir="$PYTHONDIR"
 
4536
  fi
 
4537
])
 
4538
 
 
4539
AC_ARG_WITH(pythondir,
 
4540
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
 
4541
[
 
4542
  ac_python_dir=$withval
 
4543
], ac_python_dir=$kde_cv_pythondir
 
4544
)
 
4545
 
 
4546
AC_MSG_RESULT($ac_python_dir)
 
4547
])
 
4548
 
 
4549
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
 
4550
[
 
4551
AC_REQUIRE([KDE_CHECK_LIBDL])
 
4552
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
 
4553
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
 
4554
 
 
4555
if test -z "$1"; then
 
4556
  version="1.5"
 
4557
else
 
4558
  version="$1"
 
4559
fi
 
4560
 
 
4561
AC_MSG_CHECKING([for Python$version])
 
4562
 
 
4563
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
 
4564
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
 
4565
if test ! -r $python_incdir/Python.h; then
 
4566
  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
 
4567
  python_incdir=$python_incdir/python$version
 
4568
  if test ! -r $python_incdir/Python.h; then
 
4569
    python_incdir=no
 
4570
  fi
 
4571
fi
 
4572
 
 
4573
PYTHONINC=-I$python_incdir
 
4574
 
 
4575
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
 
4576
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
 
4577
if test ! -r $python_libdir/libpython$version.so; then
 
4578
  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
 
4579
  if test ! -r $python_libdir/libpython$version.a; then
 
4580
    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
 
4581
    python_libdir=$python_libdir/python$version/config
 
4582
    if test ! -r $python_libdir/libpython$version.a; then
 
4583
      python_libdir=no
 
4584
    fi
 
4585
  fi
 
4586
fi
 
4587
 
 
4588
PYTHONLIB=-L$python_libdir
 
4589
kde_orig_LIBPYTHON=$LIBPYTHON
 
4590
if test -z "$LIBPYTHON"; then
 
4591
  LIBPYTHON=-lpython$version
 
4592
fi
 
4593
 
 
4594
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
 
4595
python_moddir=$python_moddir/python$version
 
4596
if test ! -r $python_moddir/copy.py; then
 
4597
  python_moddir=no
 
4598
fi
 
4599
 
 
4600
PYTHONMODDIR=$python_moddir
 
4601
 
 
4602
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
 
4603
 
 
4604
if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
 
4605
   LIBPYTHON=$kde_orig_LIBPYTHON
 
4606
   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
 
4607
   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
 
4608
   $2
 
4609
else 
 
4610
  dnl Note: this test is very weak
 
4611
  kde_python_link_found=no
 
4612
  KDE_TRY_LINK_PYTHON(normal)
 
4613
  KDE_TRY_LINK_PYTHON(m, -lm)
 
4614
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
 
4615
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
 
4616
  KDE_TRY_LINK_PYTHON(db2, -ldb2)
 
4617
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
 
4618
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
 
4619
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
 
4620
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
 
4621
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
 
4622
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
 
4623
  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
 
4624
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
 
4625
        [AC_MSG_WARN([it seems, Python depends on another library.
 
4626
    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
 
4627
    and contact the authors to let them know about this problem])
 
4628
        ])
 
4629
 
 
4630
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
 
4631
  AC_SUBST(PYTHONINC)
 
4632
  AC_SUBST(PYTHONLIB)
 
4633
  AC_SUBST(LIBPYTHON)
 
4634
  AC_SUBST(PYTHONMODDIR)
 
4635
  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
 
4636
fi
 
4637
 
 
4638
])
 
4639
 
 
4640
 
 
4641
AC_DEFUN([KDE_CHECK_PYTHON],
 
4642
[
 
4643
  KDE_CHECK_PYTHON_INTERN("2.4",
 
4644
   [KDE_CHECK_PYTHON_INTERN("2.3", 
 
4645
     [KDE_CHECK_PYTHON_INTERN("2.2", 
 
4646
       [KDE_CHECK_PYTHON_INTERN("2.1", 
 
4647
         [KDE_CHECK_PYTHON_INTERN("2.0", 
 
4648
           [KDE_CHECK_PYTHON_INTERN($1, $2) ])
 
4649
         ])
 
4650
       ])
 
4651
     ])
 
4652
  ])
 
4653
])
 
4654
 
 
4655
AC_DEFUN([KDE_CHECK_STL],
 
4656
[
 
4657
    AC_LANG_SAVE
 
4658
    AC_LANG_CPLUSPLUS
 
4659
    ac_save_CXXFLAGS="$CXXFLAGS"
 
4660
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
 
4661
 
 
4662
    AC_MSG_CHECKING([if C++ programs can be compiled])
 
4663
    AC_CACHE_VAL(kde_cv_stl_works,
 
4664
    [
 
4665
      AC_TRY_COMPILE([
 
4666
#include <string>
 
4667
using namespace std;
 
4668
],[
 
4669
  string astring="Hallo Welt.";
 
4670
  astring.erase(0, 6); // now astring is "Welt"
 
4671
  return 0;
 
4672
], kde_cv_stl_works=yes,
 
4673
   kde_cv_stl_works=no)
 
4674
])
 
4675
 
 
4676
   AC_MSG_RESULT($kde_cv_stl_works)
 
4677
 
 
4678
   if test "$kde_cv_stl_works" = "yes"; then
 
4679
     # back compatible
 
4680
         AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
 
4681
   else
 
4682
         AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
 
4683
Check config.log for details - if you're using a Linux distribution you might miss
 
4684
a package named similar to libstdc++-dev.])
 
4685
   fi
 
4686
 
 
4687
   CXXFLAGS="$ac_save_CXXFLAGS"
 
4688
   AC_LANG_RESTORE
 
4689
])
 
4690
 
 
4691
AC_DEFUN([AC_FIND_QIMGIO],
 
4692
   [AC_REQUIRE([AC_FIND_JPEG])
 
4693
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
4694
AC_MSG_CHECKING([for qimgio])
 
4695
AC_CACHE_VAL(ac_cv_lib_qimgio,
 
4696
[
 
4697
AC_LANG_SAVE
 
4698
AC_LANG_CPLUSPLUS
 
4699
ac_save_LIBS="$LIBS"
 
4700
ac_save_CXXFLAGS="$CXXFLAGS"
 
4701
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
 
4702
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
 
4703
AC_TRY_RUN(dnl
 
4704
[
 
4705
#include <qimageio.h>
 
4706
#include <qstring.h>
 
4707
int main() {
 
4708
                QString t = "hallo";
 
4709
                t.fill('t');
 
4710
                qInitImageIO();
 
4711
}
 
4712
],
 
4713
            ac_cv_lib_qimgio=yes,
 
4714
            ac_cv_lib_qimgio=no,
 
4715
            ac_cv_lib_qimgio=no)
 
4716
LIBS="$ac_save_LIBS"
 
4717
CXXFLAGS="$ac_save_CXXFLAGS"
 
4718
AC_LANG_RESTORE
 
4719
])dnl
 
4720
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
 
4721
  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
 
4722
  AC_MSG_RESULT(yes)
 
4723
  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
 
4724
  AC_SUBST(LIBQIMGIO)
 
4725
else
 
4726
  AC_MSG_RESULT(not found)
 
4727
fi
 
4728
])
 
4729
 
 
4730
AC_DEFUN([AM_DISABLE_LIBRARIES],
 
4731
[
 
4732
    AC_PROVIDE([AM_ENABLE_STATIC])
 
4733
    AC_PROVIDE([AM_ENABLE_SHARED])
 
4734
    enable_static=no
 
4735
    enable_shared=yes
 
4736
])
 
4737
 
 
4738
 
 
4739
AC_DEFUN([AC_CHECK_UTMP_FILE],
 
4740
[
 
4741
    AC_MSG_CHECKING([for utmp file])
 
4742
 
 
4743
    AC_CACHE_VAL(kde_cv_utmp_file,
 
4744
    [
 
4745
    kde_cv_utmp_file=no
 
4746
 
 
4747
    for ac_file in    \
 
4748
                      \
 
4749
        /var/run/utmp \
 
4750
        /var/adm/utmp \
 
4751
        /etc/utmp     \
 
4752
     ; \
 
4753
    do
 
4754
     if test -r "$ac_file"; then
 
4755
       kde_cv_utmp_file=$ac_file
 
4756
       break
 
4757
     fi
 
4758
    done
 
4759
    ])
 
4760
 
 
4761
    if test "$kde_cv_utmp_file" != "no"; then
 
4762
        AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
 
4763
        $1
 
4764
        AC_MSG_RESULT($kde_cv_utmp_file)
 
4765
    else
 
4766
        $2
 
4767
        AC_MSG_RESULT([non found])
 
4768
    fi
 
4769
])
 
4770
 
 
4771
 
 
4772
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
 
4773
[
 
4774
 
 
4775
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
 
4776
TOPSUBDIRS=""
 
4777
 
 
4778
if test ! -s $srcdir/subdirs; then
 
4779
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
 
4780
  files=`cd $srcdir && ls -1`
 
4781
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
 
4782
  for i in $dirs; do
 
4783
    echo $i >> $srcdir/subdirs
 
4784
  done
 
4785
fi
 
4786
 
 
4787
ac_topsubdirs=
 
4788
if test -s $srcdir/inst-apps; then
 
4789
  ac_topsubdirs="`cat $srcdir/inst-apps`"
 
4790
elif test -s $srcdir/subdirs; then
 
4791
  ac_topsubdirs="`cat $srcdir/subdirs`"
 
4792
fi
 
4793
 
 
4794
for i in $ac_topsubdirs; do
 
4795
  AC_MSG_CHECKING([if $i should be compiled])
 
4796
  if test -d $srcdir/$i; then
 
4797
    install_it="yes"
 
4798
    for j in $DO_NOT_COMPILE; do
 
4799
      if test $i = $j; then
 
4800
        install_it="no"
 
4801
      fi
 
4802
    done
 
4803
  else
 
4804
    install_it="no"
 
4805
  fi
 
4806
  AC_MSG_RESULT($install_it)
 
4807
  vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
 
4808
  if test $install_it = "yes"; then
 
4809
    TOPSUBDIRS="$TOPSUBDIRS $i"
 
4810
    eval "$vari""_SUBDIR_included=yes"
 
4811
  else
 
4812
    eval "$vari""_SUBDIR_included=no"
 
4813
  fi
 
4814
done
 
4815
 
 
4816
AC_SUBST(TOPSUBDIRS)
 
4817
])
 
4818
 
 
4819
AC_DEFUN([KDE_CHECK_NAMESPACES],
 
4820
[
 
4821
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
 
4822
AC_LANG_SAVE
 
4823
AC_LANG_CPLUSPLUS
 
4824
AC_TRY_COMPILE([
 
4825
],
 
4826
[
 
4827
namespace Foo {
 
4828
  extern int i;
 
4829
  namespace Bar {
 
4830
    extern int i;
 
4831
  }
 
4832
}
 
4833
 
 
4834
int Foo::i = 0;
 
4835
int Foo::Bar::i = 1;
 
4836
],[
 
4837
  AC_MSG_RESULT(yes)
 
4838
  AC_DEFINE(HAVE_NAMESPACES)
 
4839
], [
 
4840
AC_MSG_RESULT(no)
 
4841
])
 
4842
AC_LANG_RESTORE
 
4843
])
 
4844
 
 
4845
dnl ------------------------------------------------------------------------
 
4846
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
 
4847
dnl ------------------------------------------------------------------------
 
4848
dnl
 
4849
AC_DEFUN([AC_CHECK_S_ISSOCK],
 
4850
[
 
4851
AC_MSG_CHECKING(for S_ISSOCK)
 
4852
AC_CACHE_VAL(ac_cv_have_s_issock,
 
4853
[
 
4854
AC_TRY_LINK(
 
4855
[
 
4856
#include <sys/stat.h>
 
4857
],
 
4858
[
 
4859
struct stat buff;
 
4860
int b = S_ISSOCK( buff.st_mode );
 
4861
],
 
4862
ac_cv_have_s_issock=yes,
 
4863
ac_cv_have_s_issock=no)
 
4864
])
 
4865
AC_MSG_RESULT($ac_cv_have_s_issock)
 
4866
if test "$ac_cv_have_s_issock" = "yes"; then
 
4867
  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
 
4868
fi
 
4869
 
 
4870
AH_VERBATIM(_ISSOCK,
 
4871
[
 
4872
#ifndef HAVE_S_ISSOCK
 
4873
#define HAVE_S_ISSOCK
 
4874
#define S_ISSOCK(mode) (1==0)
 
4875
#endif
 
4876
])
 
4877
 
 
4878
])
 
4879
 
 
4880
dnl ------------------------------------------------------------------------
 
4881
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
 
4882
dnl ------------------------------------------------------------------------
 
4883
dnl
 
4884
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
 
4885
[
 
4886
AC_MSG_CHECKING(for MAXPATHLEN)
 
4887
AC_CACHE_VAL(ac_cv_maxpathlen,
 
4888
[
 
4889
cat > conftest.$ac_ext <<EOF
 
4890
#ifdef STDC_HEADERS
 
4891
# include <stdlib.h>
 
4892
#endif
 
4893
#include <stdio.h>
 
4894
#include <sys/param.h>
 
4895
#ifndef MAXPATHLEN
 
4896
#define MAXPATHLEN 1024
 
4897
#endif
 
4898
 
 
4899
KDE_HELLO MAXPATHLEN
 
4900
 
 
4901
EOF
 
4902
 
 
4903
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
 
4904
 
 
4905
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
 
4906
    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
 
4907
else
 
4908
    ac_cv_maxpathlen=1024
 
4909
fi
 
4910
 
 
4911
rm conftest.*
 
4912
 
 
4913
])
 
4914
AC_MSG_RESULT($ac_cv_maxpathlen)
 
4915
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
 
4916
])
 
4917
 
 
4918
AC_DEFUN([KDE_CHECK_HEADER],
 
4919
[
 
4920
   kde_safe_cppflags=$CPPFLAGS
 
4921
   CPPFLAGS="$CPPFLAGS $all_includes"
 
4922
   AC_LANG_SAVE
 
4923
   AC_LANG_CPLUSPLUS
 
4924
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
 
4925
   AC_LANG_RESTORE
 
4926
   CPPFLAGS=$kde_safe_cppflags
 
4927
])
 
4928
 
 
4929
AC_DEFUN([KDE_CHECK_HEADERS],
 
4930
[
 
4931
   AH_CHECK_HEADERS([$1])
 
4932
   AC_LANG_SAVE
 
4933
   kde_safe_cppflags=$CPPFLAGS
 
4934
   CPPFLAGS="$CPPFLAGS $all_includes"
 
4935
   AC_LANG_CPLUSPLUS
 
4936
   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
 
4937
   CPPFLAGS=$kde_safe_cppflags
 
4938
   AC_LANG_RESTORE
 
4939
])
 
4940
 
 
4941
AC_DEFUN([KDE_FAST_CONFIGURE],
 
4942
[
 
4943
  dnl makes configure fast (needs perl)
 
4944
  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
 
4945
      with_fast_perl=$enableval, with_fast_perl=yes)
 
4946
])
 
4947
 
 
4948
AC_DEFUN([KDE_CONF_FILES],
 
4949
[
 
4950
  val=
 
4951
  if test -f $srcdir/configure.files ; then
 
4952
    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
 
4953
  fi
 
4954
  CONF_FILES=
 
4955
  if test -n "$val" ; then
 
4956
    for i in $val ; do
 
4957
      CONF_FILES="$CONF_FILES $i"
 
4958
    done
 
4959
  fi
 
4960
  AC_SUBST(CONF_FILES)
 
4961
])dnl
 
4962
 
 
4963
dnl This sets the prefix, for arts and kdelibs
 
4964
dnl Do NOT use in any other module.
 
4965
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
 
4966
AC_DEFUN([KDE_SET_PREFIX_CORE],
 
4967
[
 
4968
  unset CDPATH
 
4969
  dnl make $KDEDIR the default for the installation
 
4970
  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
 
4971
 
 
4972
  if test "x$prefix" = "xNONE"; then
 
4973
    prefix=$ac_default_prefix
 
4974
    ac_configure_args="$ac_configure_args --prefix=$prefix"
 
4975
  fi
 
4976
  # And delete superfluous '/' to make compares easier
 
4977
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4978
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4979
 
 
4980
  kde_libs_prefix='$(prefix)'
 
4981
  kde_libs_htmldir='$(kde_htmldir)'
 
4982
  AC_SUBST(kde_libs_prefix)
 
4983
  AC_SUBST(kde_libs_htmldir)
 
4984
  KDE_FAST_CONFIGURE
 
4985
  KDE_CONF_FILES
 
4986
])
 
4987
 
 
4988
 
 
4989
AC_DEFUN([KDE_SET_PREFIX],
 
4990
[
 
4991
  unset CDPATH
 
4992
  dnl We can't give real code to that macro, only a value.
 
4993
  dnl It only matters for --help, since we set the prefix in this function anyway.
 
4994
  AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
 
4995
 
 
4996
  KDE_SET_DEFAULT_BINDIRS
 
4997
  if test "x$prefix" = "xNONE"; then
 
4998
    dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
 
4999
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
 
5000
  else
 
5001
    dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
 
5002
    kde_save_PATH="$PATH"
 
5003
    PATH="$exec_prefix/bin:$prefix/bin:$PATH"
 
5004
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
 
5005
    PATH="$kde_save_PATH"
 
5006
  fi
 
5007
 
 
5008
  kde_libs_prefix=`$KDECONFIG --prefix`
 
5009
  if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
 
5010
       AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
 
5011
                    This means it has been moved since you installed it.
 
5012
                    This won't work. Please recompile kdelibs for the new prefix.
 
5013
                    ])
 
5014
  fi
 
5015
  kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
 
5016
  kde_libs_suffix=`$KDECONFIG --libsuffix` || kde_libs_suffix=auto
 
5017
 
 
5018
  AC_MSG_CHECKING([where to install])
 
5019
  if test "x$prefix" = "xNONE"; then
 
5020
    prefix=$kde_libs_prefix
 
5021
    AC_MSG_RESULT([$prefix (as returned by kde-config)])
 
5022
  else
 
5023
    dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
 
5024
    given_prefix=$prefix
 
5025
    AC_MSG_RESULT([$prefix (as requested)])
 
5026
  fi
 
5027
 
 
5028
  # And delete superfluous '/' to make compares easier
 
5029
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
5030
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
5031
  given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
5032
 
 
5033
  AC_SUBST(KDECONFIG)
 
5034
  AC_SUBST(kde_libs_prefix)
 
5035
  AC_SUBST(kde_libs_htmldir)
 
5036
 
 
5037
  KDE_FAST_CONFIGURE
 
5038
  KDE_CONF_FILES
 
5039
])
 
5040
 
 
5041
pushdef([AC_PROG_INSTALL],
 
5042
[
 
5043
  dnl our own version, testing for a -p flag
 
5044
  popdef([AC_PROG_INSTALL])
 
5045
  dnl as AC_PROG_INSTALL works as it works we first have
 
5046
  dnl to save if the user didn't specify INSTALL, as the
 
5047
  dnl autoconf one overwrites INSTALL and we have no chance to find
 
5048
  dnl out afterwards
 
5049
  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
 
5050
  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
 
5051
  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
 
5052
  AC_PROG_INSTALL
 
5053
 
 
5054
  if test -z "$kde_save_INSTALL_given" ; then
 
5055
    # OK, user hasn't given any INSTALL, autoconf found one for us
 
5056
    # now we test, if it supports the -p flag
 
5057
    AC_MSG_CHECKING(for -p flag to install)
 
5058
    rm -f confinst.$$.* > /dev/null 2>&1
 
5059
    echo "Testtest" > confinst.$$.orig
 
5060
    ac_res=no
 
5061
    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
 
5062
      if test -f confinst.$$.new ; then
 
5063
        # OK, -p seems to do no harm to install
 
5064
        INSTALL="${INSTALL} -p"
 
5065
        ac_res=yes
 
5066
      fi
 
5067
    fi
 
5068
    rm -f confinst.$$.*
 
5069
    AC_MSG_RESULT($ac_res)
 
5070
  fi
 
5071
  dnl the following tries to resolve some signs and wonders coming up
 
5072
  dnl with different autoconf/automake versions
 
5073
  dnl e.g.:
 
5074
  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
 
5075
  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
 
5076
  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
 
5077
  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
 
5078
  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
 
5079
  dnl   install-@DIR@PROGRAMS targets to explicitly use that flag
 
5080
  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
 
5081
  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
 
5082
  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
 
5083
  dnl  *sometimes KDE does not use the install-@DIR@PROGRAM targets from
 
5084
  dnl   automake (due to broken Makefile.am or whatever) to install programs,
 
5085
  dnl   and so does not see the -s flag in automake > 1.4
 
5086
  dnl to clean up that mess we:
 
5087
  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
 
5088
  dnl   which cleans KDE's program with automake > 1.4;
 
5089
  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
 
5090
  dnl   with automake<=1.4
 
5091
  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
 
5092
  dnl   properly uses install-@DIR@PROGRAMS, but I don't care
 
5093
  dnl
 
5094
  dnl And to all this comes, that I even can't write in comments variable
 
5095
  dnl  names used by automake, because it is so stupid to think I wanted to
 
5096
  dnl  _use_ them, therefor I have written A_M_... instead of AM_
 
5097
  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
 
5098
 
 
5099
  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
 
5100
    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
 
5101
  fi
 
5102
  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
 
5103
    INSTALL_SCRIPT='${INSTALL}'
 
5104
  fi
 
5105
])dnl
 
5106
 
 
5107
AC_DEFUN([KDE_LANG_CPLUSPLUS],
 
5108
[AC_LANG_CPLUSPLUS
 
5109
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
 
5110
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
 
5111
])
 
5112
 
 
5113
pushdef([AC_LANG_CPLUSPLUS],
 
5114
[popdef([AC_LANG_CPLUSPLUS])
 
5115
KDE_LANG_CPLUSPLUS
 
5116
])
 
5117
 
 
5118
AC_DEFUN([KDE_CHECK_LONG_LONG],
 
5119
[
 
5120
AC_MSG_CHECKING(for long long)
 
5121
AC_CACHE_VAL(kde_cv_c_long_long,
 
5122
[
 
5123
  AC_LANG_SAVE
 
5124
  AC_LANG_CPLUSPLUS
 
5125
  AC_TRY_LINK([], [
 
5126
  long long foo = 0;
 
5127
  foo = foo+1;
 
5128
  ],
 
5129
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
 
5130
  AC_LANG_RESTORE
 
5131
])
 
5132
AC_MSG_RESULT($kde_cv_c_long_long)
 
5133
if test "$kde_cv_c_long_long" = yes; then
 
5134
   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
 
5135
fi
 
5136
])
 
5137
 
 
5138
AC_DEFUN([KDE_CHECK_LIB],
 
5139
[
 
5140
     kde_save_LDFLAGS="$LDFLAGS"
 
5141
     dnl AC_CHECK_LIB modifies LIBS, so save it here
 
5142
     kde_save_LIBS="$LIBS"
 
5143
     LDFLAGS="$LDFLAGS $all_libraries"
 
5144
     case $host_os in
 
5145
      aix*) LDFLAGS="-brtl $LDFLAGS"
 
5146
        test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
 
5147
        ;;
 
5148
     esac
 
5149
     AC_CHECK_LIB($1, $2, $3, $4, $5)
 
5150
     LDFLAGS="$kde_save_LDFLAGS"
 
5151
     LIBS="$kde_save_LIBS"
 
5152
])
 
5153
 
 
5154
AC_DEFUN([KDE_JAVA_PREFIX],
 
5155
[
 
5156
        dir=`dirname "$1"`
 
5157
        base=`basename "$1"`
 
5158
        list=`ls -1 $dir 2> /dev/null`
 
5159
        for entry in $list; do 
 
5160
                if test -d $dir/$entry/bin; then
 
5161
                        case $entry in
 
5162
                           $base)
 
5163
                                javadirs="$javadirs $dir/$entry/bin"
 
5164
                                ;;
 
5165
                        esac
 
5166
                elif test -d $dir/$entry/jre/bin; then
 
5167
                        case $entry in
 
5168
                           $base)
 
5169
                                javadirs="$javadirs $dir/$entry/jre/bin"
 
5170
                                ;;
 
5171
                        esac
 
5172
                fi
 
5173
        done
 
5174
])
 
5175
 
 
5176
dnl KDE_CHEC_JAVA_DIR(onlyjre)
 
5177
AC_DEFUN([KDE_CHECK_JAVA_DIR],
 
5178
[
 
5179
 
 
5180
AC_ARG_WITH(java,
 
5181
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
 
5182
[  ac_java_dir=$withval
 
5183
], ac_java_dir=""
 
5184
)
 
5185
 
 
5186
AC_MSG_CHECKING([for Java])
 
5187
 
 
5188
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
 
5189
if test "x$ac_java_dir" = "xno"; then
 
5190
   kde_java_bindir=no
 
5191
   kde_java_includedir=no
 
5192
   kde_java_libjvmdir=no
 
5193
   kde_java_libgcjdir=no
 
5194
   kde_java_libhpidir=no
 
5195
else
 
5196
  if test "x$ac_java_dir" = "x"; then
 
5197
     
 
5198
     
 
5199
      dnl No option set -> collect list of candidate paths
 
5200
      if test -n "$JAVA_HOME"; then
 
5201
        KDE_JAVA_PREFIX($JAVA_HOME)
 
5202
      fi
 
5203
      KDE_JAVA_PREFIX(/usr/j2se)
 
5204
      KDE_JAVA_PREFIX(/usr/lib/j2se)
 
5205
      KDE_JAVA_PREFIX(/usr/j*dk*)
 
5206
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
 
5207
      KDE_JAVA_PREFIX(/opt/j*sdk*)
 
5208
      KDE_JAVA_PREFIX(/usr/lib/java*)
 
5209
      KDE_JAVA_PREFIX(/usr/java*)
 
5210
      KDE_JAVA_PREFIX(/usr/java/j*dk*)
 
5211
      KDE_JAVA_PREFIX(/usr/java/j*re*)
 
5212
      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
 
5213
      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
 
5214
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
 
5215
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
 
5216
      KDE_JAVA_PREFIX(/opt/java*)
 
5217
 
 
5218
      kde_cv_path="NONE"
 
5219
      kde_save_IFS=$IFS
 
5220
      IFS=':'
 
5221
      for dir in $PATH; do
 
5222
          if test -d "$dir"; then
 
5223
              javadirs="$javadirs $dir"
 
5224
          fi
 
5225
      done
 
5226
      IFS=$kde_save_IFS
 
5227
      jredirs=
 
5228
 
 
5229
      dnl Now javadirs contains a list of paths that exist, all ending with bin/
 
5230
      for dir in $javadirs; do
 
5231
          dnl Check for the java executable
 
5232
          if test -x "$dir/java"; then
 
5233
              dnl And also check for a libjvm.so somewhere under there
 
5234
              dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
 
5235
              if test "$dir" != "/usr/bin"; then
 
5236
                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
5237
                  if test ! -f $libjvmdir/libjvm.so; then continue; fi
 
5238
                  jredirs="$jredirs $dir"
 
5239
              fi
 
5240
          fi
 
5241
      done
 
5242
 
 
5243
      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
 
5244
      JAVAC=
 
5245
      JAVA=
 
5246
      kde_java_bindir=no
 
5247
      for dir in $jredirs; do
 
5248
          JAVA="$dir/java"
 
5249
          kde_java_bindir=$dir
 
5250
          if test -x "$dir/javac"; then
 
5251
                JAVAC="$dir/javac"
 
5252
                break
 
5253
          fi
 
5254
      done
 
5255
 
 
5256
      if test -n "$JAVAC"; then
 
5257
          dnl this substitution might not work - well, we test for jni.h below
 
5258
          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
 
5259
      else
 
5260
          kde_java_includedir=no
 
5261
      fi
 
5262
  else
 
5263
    dnl config option set
 
5264
    kde_java_bindir=$ac_java_dir/bin
 
5265
    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
 
5266
        kde_java_includedir=no
 
5267
    else
 
5268
        kde_java_includedir=$ac_java_dir/include
 
5269
    fi
 
5270
  fi
 
5271
fi
 
5272
 
 
5273
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
 
5274
if test "x$kde_java_bindir" != "xno"; then
 
5275
 
 
5276
  dnl Look for libjvm.so
 
5277
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
5278
  dnl Look for libgcj.so
 
5279
  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
 
5280
  dnl Look for libhpi.so and avoid green threads
 
5281
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
 
5282
 
 
5283
  dnl Now check everything's fine under there
 
5284
  dnl the include dir is our flag for having the JDK
 
5285
  if test -d "$kde_java_includedir"; then
 
5286
    if test ! -x "$kde_java_bindir/javac"; then
 
5287
      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
 
5288
    fi
 
5289
    if test ! -x "$kde_java_bindir/javah"; then
 
5290
      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
5291
    fi
 
5292
    if test ! -x "$kde_java_bindir/jar"; then
 
5293
      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
5294
    fi
 
5295
    if test ! -r "$kde_java_includedir/jni.h"; then
 
5296
      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
 
5297
    fi
 
5298
 
 
5299
    jni_includes="-I$kde_java_includedir"
 
5300
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
 
5301
    dnl and under linux here.. 
 
5302
    
 
5303
    dnl not needed for gcj
 
5304
 
 
5305
    if test "x$kde_java_libgcjdir" = "x"; then 
 
5306
      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
 
5307
      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
 
5308
      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
 
5309
    fi
 
5310
 
 
5311
  else
 
5312
    JAVAC=
 
5313
    jni_includes=
 
5314
  fi
 
5315
 
 
5316
  if test "x$kde_java_libgcjdir" = "x"; then 
 
5317
     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
 
5318
        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
 
5319
     fi 
 
5320
  else
 
5321
     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
 
5322
        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
 
5323
     fi 
 
5324
  fi
 
5325
 
 
5326
  if test ! -x "$kde_java_bindir/java"; then
 
5327
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
5328
  fi
 
5329
 
 
5330
  dnl not needed for gcj compile
 
5331
 
 
5332
  if test "x$kde_java_libgcjdir" = "x"; then 
 
5333
      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
 
5334
        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
 
5335
      fi
 
5336
  fi
 
5337
 
 
5338
  if test -n "$jni_includes"; then
 
5339
    dnl Check for JNI version
 
5340
    AC_LANG_SAVE
 
5341
    AC_LANG_CPLUSPLUS
 
5342
    ac_cxxflags_safe="$CXXFLAGS"
 
5343
    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
 
5344
 
 
5345
    AC_TRY_COMPILE([
 
5346
  #include <jni.h>
 
5347
              ],
 
5348
              [
 
5349
  #ifndef JNI_VERSION_1_2
 
5350
  Syntax Error
 
5351
  #endif
 
5352
              ],[ kde_jni_works=yes ],
 
5353
              [ kde_jni_works=no ])
 
5354
 
 
5355
    if test $kde_jni_works = no; then
 
5356
      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
 
5357
                    You need to have Java Development Kit (JDK) version 1.2. 
 
5358
 
 
5359
                    Use --with-java to specify another location.
 
5360
                    Use --without-java to configure without java support.
 
5361
                    Or download a newer JDK and try again. 
 
5362
                    See e.g. http://java.sun.com/products/jdk/1.2 ])
 
5363
    fi
 
5364
 
 
5365
    CXXFLAGS="$ac_cxxflags_safe"    
 
5366
    AC_LANG_RESTORE
 
5367
 
 
5368
    dnl All tests ok, inform and subst the variables
 
5369
 
 
5370
    JAVAC=$kde_java_bindir/javac
 
5371
    JAVAH=$kde_java_bindir/javah
 
5372
    JAR=$kde_java_bindir/jar
 
5373
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
5374
    if test "x$kde_java_libgcjdir" = "x"; then 
 
5375
      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
 
5376
    else
 
5377
      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
 
5378
    fi
 
5379
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
 
5380
 
 
5381
  else
 
5382
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
5383
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
 
5384
  fi
 
5385
elif test -d "/Library/Java/Home"; then
 
5386
  kde_java_bindir="/Library/Java/Home/bin"
 
5387
  jni_includes="-I/Library/Java/Home/include"
 
5388
 
 
5389
  JAVAC=$kde_java_bindir/javac
 
5390
  JAVAH=$kde_java_bindir/javah
 
5391
  JAR=$kde_java_bindir/jar
 
5392
  JVMLIBS="-Wl,-framework,JavaVM"
 
5393
 
 
5394
  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
5395
  AC_MSG_RESULT([Apple Java Framework])
 
5396
else
 
5397
  AC_MSG_RESULT([none found])
 
5398
fi
 
5399
 
 
5400
AC_SUBST(JAVAC)
 
5401
AC_SUBST(JAVAH)
 
5402
AC_SUBST(JAR)
 
5403
AC_SUBST(JVMLIBS)
 
5404
AC_SUBST(jni_includes)
 
5405
 
 
5406
# for backward compat
 
5407
kde_cv_java_includedir=$kde_java_includedir
 
5408
kde_cv_java_bindir=$kde_java_bindir
 
5409
])
 
5410
 
 
5411
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
 
5412
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
 
5413
dnl big packages, m4_foreach is dog-slow.  So use our own version of
 
5414
dnl it.  (matz@kde.org)
 
5415
m4_define([mm_foreach],
 
5416
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
 
5417
m4_define([mm_car], [[$1]])
 
5418
m4_define([mm_car2], [[$@]])
 
5419
m4_define([_mm_foreach],
 
5420
[m4_if(m4_quote($2), [], [],
 
5421
       [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
 
5422
                                                   mm_car2(m4_shift($2)),
 
5423
                                                   [$3])])])
 
5424
m4_define([AC_FOREACH],
 
5425
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
 
5426
 
 
5427
AC_DEFUN([KDE_NEED_FLEX],
 
5428
[
 
5429
kde_libs_safe=$LIBS
 
5430
LIBS="$LIBS $USER_LDFLAGS"
 
5431
AM_PROG_LEX
 
5432
LIBS=$kde_libs_safe
 
5433
if test -z "$LEXLIB"; then
 
5434
    AC_MSG_ERROR([You need to have flex installed.])
 
5435
fi
 
5436
AC_SUBST(LEXLIB)
 
5437
])
 
5438
 
 
5439
AC_DEFUN([AC_PATH_QTOPIA],
 
5440
[
 
5441
  dnl TODO: use AC_CACHE_VAL
 
5442
 
 
5443
  if test -z "$1"; then
 
5444
    qtopia_minver_maj=1
 
5445
    qtopia_minver_min=5
 
5446
    qtopia_minver_pat=0
 
5447
  else
 
5448
    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
 
5449
    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
 
5450
    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
 
5451
  fi
 
5452
 
 
5453
  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
 
5454
  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
 
5455
 
 
5456
  AC_REQUIRE([AC_PATH_QT])
 
5457
 
 
5458
  AC_MSG_CHECKING([for Qtopia])
 
5459
 
 
5460
  LIB_QTOPIA="-lqpe"
 
5461
  AC_SUBST(LIB_QTOPIA)
 
5462
 
 
5463
  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
 
5464
 
 
5465
  ac_qtopia_incdir=NO
 
5466
 
 
5467
  AC_ARG_WITH(qtopia-dir,
 
5468
              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
 
5469
              [  ac_qtopia_incdir="$withval"/include] ) 
 
5470
  
 
5471
  qtopia_incdirs=""
 
5472
  for dir in $kde_qtopia_dirs; do
 
5473
    qtopia_incdirs="$qtopia_incdirs $dir/include"
 
5474
  done
 
5475
 
 
5476
  if test ! "$ac_qtopia_incdir" = "NO"; then
 
5477
    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
 
5478
  fi
 
5479
 
 
5480
  qtopia_incdir=""
 
5481
  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
 
5482
  ac_qtopia_incdir="$qtopia_incdir"
 
5483
 
 
5484
  if test -z "$qtopia_incdir"; then
 
5485
    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
 
5486
  fi
 
5487
 
 
5488
  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
 
5489
  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
 
5490
  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
 
5491
 
 
5492
  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
 
5493
  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
 
5494
  if test "$qtopia_ver" -lt "$qtopia_minver"; then
 
5495
    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
 
5496
is required.])
 
5497
  fi
 
5498
 
 
5499
  AC_LANG_SAVE
 
5500
  AC_LANG_CPLUSPLUS
 
5501
 
 
5502
  ac_cxxflags_safe="$CXXFLAGS"
 
5503
  ac_ldflags_safe="$LDFLAGS"
 
5504
  ac_libs_safe="$LIBS"
 
5505
 
 
5506
  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
 
5507
  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
 
5508
  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
 
5509
 
 
5510
  cat > conftest.$ac_ext <<EOF
 
5511
#include "confdefs.h"
 
5512
#include <qpe/qpeapplication.h>
 
5513
#include <qpe/version.h>
 
5514
 
 
5515
int main( int argc, char **argv )
 
5516
{
 
5517
    QPEApplication app( argc, argv );
 
5518
    return 0;
 
5519
}
 
5520
EOF
 
5521
 
 
5522
  if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
5523
    rm -f conftest*
 
5524
  else
 
5525
    rm -f conftest*
 
5526
    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
 
5527
the end of config.log])
 
5528
  fi
 
5529
 
 
5530
  CXXFLAGS="$ac_cxxflags_safe"
 
5531
  LDFLAGS="$ac_ldflags_safe"
 
5532
  LIBS="$ac_libs_safe"
 
5533
 
 
5534
  AC_LANG_RESTORE
 
5535
 
 
5536
  QTOPIA_INCLUDES="-I$qtopia_incdir"
 
5537
  AC_SUBST(QTOPIA_INCLUDES)
 
5538
 
 
5539
  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
 
5540
])
 
5541
 
 
5542
 
 
5543
AC_DEFUN([KDE_INIT_DOXYGEN],
 
5544
[
 
5545
AC_MSG_CHECKING([for Qt docs])
 
5546
kde_qtdir=
 
5547
if test "${with_qt_dir+set}" = set; then
 
5548
  kde_qtdir="$with_qt_dir"
 
5549
fi
 
5550
 
 
5551
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)
 
5552
AC_MSG_RESULT($QTDOCDIR)
 
5553
 
 
5554
AC_SUBST(QTDOCDIR)
 
5555
 
 
5556
KDE_FIND_PATH(dot, DOT, [], [])
 
5557
if test -n "$DOT"; then
 
5558
  KDE_HAVE_DOT="YES"
 
5559
else
 
5560
  KDE_HAVE_DOT="NO"
 
5561
fi
 
5562
AC_SUBST(KDE_HAVE_DOT)
 
5563
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
 
5564
AC_SUBST(DOXYGEN)
 
5565
 
 
5566
DOXYGEN_PROJECT_NAME="$1"
 
5567
DOXYGEN_PROJECT_NUMBER="$2"
 
5568
AC_SUBST(DOXYGEN_PROJECT_NAME)
 
5569
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
 
5570
 
 
5571
KDE_HAS_DOXYGEN=no
 
5572
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
 
5573
  KDE_HAS_DOXYGEN=yes
 
5574
fi
 
5575
AC_SUBST(KDE_HAS_DOXYGEN)
 
5576
 
 
5577
])
 
5578
 
 
5579
 
 
5580
AC_DEFUN([AC_FIND_BZIP2],
 
5581
[
 
5582
AC_MSG_CHECKING([for bzDecompress in libbz2])
 
5583
AC_CACHE_VAL(ac_cv_lib_bzip2,
 
5584
[
 
5585
AC_LANG_SAVE
 
5586
AC_LANG_CPLUSPLUS
 
5587
kde_save_LIBS="$LIBS"
 
5588
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
 
5589
kde_save_CXXFLAGS="$CXXFLAGS"
 
5590
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
5591
AC_TRY_LINK(dnl
 
5592
[
 
5593
#define BZ_NO_STDIO
 
5594
#include<bzlib.h>
 
5595
],
 
5596
            [ bz_stream s; (void) bzDecompress(&s); ],
 
5597
            eval "ac_cv_lib_bzip2='-lbz2'",
 
5598
            eval "ac_cv_lib_bzip2=no")
 
5599
LIBS="$kde_save_LIBS"
 
5600
CXXFLAGS="$kde_save_CXXFLAGS"
 
5601
AC_LANG_RESTORE
 
5602
])dnl
 
5603
AC_MSG_RESULT($ac_cv_lib_bzip2)
 
5604
 
 
5605
if test ! "$ac_cv_lib_bzip2" = no; then
 
5606
  BZIP2DIR=bzip2
 
5607
 
 
5608
  LIBBZ2="$ac_cv_lib_bzip2"
 
5609
  AC_SUBST(LIBBZ2)
 
5610
 
 
5611
else
 
5612
 
 
5613
   cxx_shared_flag=
 
5614
   ld_shared_flag=
 
5615
   KDE_CHECK_COMPILER_FLAG(shared, [
 
5616
        ld_shared_flag="-shared"
 
5617
   ])
 
5618
   KDE_CHECK_COMPILER_FLAG(fPIC, [
 
5619
        cxx_shared_flag="-fPIC"
 
5620
   ])
 
5621
 
 
5622
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
 
5623
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
 
5624
   [
 
5625
   AC_LANG_SAVE
 
5626
   AC_LANG_CPLUSPLUS
 
5627
   kde_save_LIBS="$LIBS"
 
5628
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
 
5629
   kde_save_CXXFLAGS="$CXXFLAGS"
 
5630
   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
 
5631
 
 
5632
   AC_TRY_LINK(dnl
 
5633
   [
 
5634
   #define BZ_NO_STDIO
 
5635
   #include<bzlib.h>
 
5636
   ],
 
5637
               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
 
5638
               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
 
5639
               eval "ac_cv_lib_bzip2_prefix=no")
 
5640
   LIBS="$kde_save_LIBS"
 
5641
   CXXFLAGS="$kde_save_CXXFLAGS"
 
5642
   AC_LANG_RESTORE
 
5643
   ])dnl
 
5644
 
 
5645
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
 
5646
   
 
5647
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
 
5648
     BZIP2DIR=bzip2
 
5649
    
 
5650
     LIBBZ2="$ac_cv_lib_bzip2_prefix"
 
5651
     AC_SUBST(LIBBZ2)
 
5652
 
 
5653
     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
 
5654
   dnl else, we just ignore this
 
5655
   fi
 
5656
 
 
5657
fi
 
5658
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
 
5659
])
 
5660
 
 
5661
dnl ------------------------------------------------------------------------
 
5662
dnl Try to find the SSL headers and libraries.
 
5663
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
 
5664
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
 
5665
dnl ------------------------------------------------------------------------
 
5666
dnl
 
5667
AC_DEFUN([KDE_CHECK_SSL],
 
5668
[
 
5669
LIBSSL="-lssl -lcrypto"
 
5670
AC_REQUIRE([KDE_CHECK_LIB64])
 
5671
 
 
5672
ac_ssl_includes=NO ac_ssl_libraries=NO
 
5673
ssl_libraries=""
 
5674
ssl_includes=""
 
5675
AC_ARG_WITH(ssl-dir,
 
5676
    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
 
5677
    [  ac_ssl_includes="$withval"/include
 
5678
       ac_ssl_libraries="$withval"/lib$kdelibsuff
 
5679
    ])
 
5680
 
 
5681
want_ssl=yes
 
5682
AC_ARG_WITH(ssl,
 
5683
    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
 
5684
    [want_ssl=$withval])
 
5685
 
 
5686
if test $want_ssl = yes; then
 
5687
 
 
5688
AC_MSG_CHECKING(for OpenSSL)
 
5689
 
 
5690
AC_CACHE_VAL(ac_cv_have_ssl,
 
5691
[#try to guess OpenSSL locations
 
5692
  
 
5693
  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
 
5694
  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
 
5695
  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
 
5696
  ac_ssl_includes="$ssl_incdir"
 
5697
 
 
5698
  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"
 
5699
  if test ! "$ac_ssl_libraries" = "NO"; then
 
5700
    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
 
5701
  fi
 
5702
 
 
5703
  test=NONE
 
5704
  ssl_libdir=NONE
 
5705
  for dir in $ssl_libdirs; do
 
5706
    try="ls -1 $dir/libssl*"
 
5707
    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
 
5708
  done
 
5709
 
 
5710
  ac_ssl_libraries="$ssl_libdir"
 
5711
 
 
5712
  ac_ldflags_safe="$LDFLAGS"
 
5713
  ac_libs_safe="$LIBS"
 
5714
 
 
5715
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
 
5716
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
 
5717
 
 
5718
  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
 
5719
  ac_ssl_rsaref="yes"
 
5720
  ,
 
5721
  ac_ssl_rsaref="no"
 
5722
  )
 
5723
 
 
5724
  LDFLAGS="$ac_ldflags_safe"
 
5725
  LIBS="$ac_libs_safe"
 
5726
 
 
5727
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
 
5728
    have_ssl=no
 
5729
  else
 
5730
    have_ssl=yes;
 
5731
  fi
 
5732
 
 
5733
  ])
 
5734
 
 
5735
  eval "$ac_cv_have_ssl"
 
5736
 
 
5737
  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
 
5738
 
 
5739
  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
 
5740
  AC_MSG_RESULT($ac_ssl_rsaref)
 
5741
 
 
5742
  AC_MSG_CHECKING([for easter eggs])
 
5743
  AC_MSG_RESULT([none found])
 
5744
 
 
5745
else
 
5746
  have_ssl=no
 
5747
fi
 
5748
 
 
5749
if test "$have_ssl" = yes; then
 
5750
  AC_MSG_CHECKING(for OpenSSL version)
 
5751
  dnl Check for SSL version
 
5752
  AC_CACHE_VAL(ac_cv_ssl_version,
 
5753
  [
 
5754
 
 
5755
    cat >conftest.$ac_ext <<EOF
 
5756
#include <openssl/opensslv.h>
 
5757
#include <stdio.h>
 
5758
    int main() {
 
5759
 
 
5760
#ifndef OPENSSL_VERSION_NUMBER
 
5761
      printf("ssl_version=\\"error\\"\n");
 
5762
#else
 
5763
      if (OPENSSL_VERSION_NUMBER < 0x00906000)
 
5764
        printf("ssl_version=\\"old\\"\n");
 
5765
      else
 
5766
        printf("ssl_version=\\"ok\\"\n");
 
5767
#endif
 
5768
     return (0);
 
5769
    }
 
5770
EOF
 
5771
 
 
5772
    ac_save_CPPFLAGS=$CPPFLAGS
 
5773
    if test "$ac_ssl_includes" != "/usr/include"; then
 
5774
        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
 
5775
    fi
 
5776
 
 
5777
    if AC_TRY_EVAL(ac_link); then 
 
5778
 
 
5779
      if eval `./conftest 2>&5`; then
 
5780
        if test $ssl_version = error; then
 
5781
          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
 
5782
        else
 
5783
          if test $ssl_version = old; then
 
5784
            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
 
5785
            have_ssl=no
 
5786
          fi
 
5787
        fi
 
5788
        ac_cv_ssl_version="ssl_version=$ssl_version"
 
5789
      else
 
5790
        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
 
5791
        Check config.log, and if you can't figure it out, send a mail to 
 
5792
        David Faure <faure@kde.org>, attaching your config.log])
 
5793
      fi
 
5794
 
 
5795
    else
 
5796
      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
 
5797
      Check config.log, and if you can't figure it out, send a mail to 
 
5798
      David Faure <faure@kde.org>, attaching your config.log])
 
5799
    fi 
 
5800
    CPPFLAGS=$ac_save_CPPFLAGS
 
5801
 
 
5802
  ])
 
5803
 
 
5804
  eval "$ac_cv_ssl_version"
 
5805
  AC_MSG_RESULT($ssl_version)
 
5806
fi
 
5807
 
 
5808
if test "$have_ssl" != yes; then
 
5809
  LIBSSL="";
 
5810
else
 
5811
  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
 
5812
  ac_cv_have_ssl="have_ssl=yes \
 
5813
    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
 
5814
  
 
5815
  
 
5816
  ssl_libraries="$ac_ssl_libraries"
 
5817
  ssl_includes="$ac_ssl_includes"
 
5818
 
 
5819
  if test "$ac_ssl_rsaref" = yes; then
 
5820
    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
 
5821
  fi
 
5822
 
 
5823
  if test $ssl_version = "old"; then
 
5824
    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
 
5825
  fi
 
5826
fi
 
5827
 
 
5828
SSL_INCLUDES=
 
5829
 
 
5830
if test "$ssl_includes" = "/usr/include"; then
 
5831
  if test -f /usr/kerberos/include/krb5.h; then
 
5832
        SSL_INCLUDES="-I/usr/kerberos/include"
 
5833
  fi
 
5834
elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
 
5835
  SSL_INCLUDES="-I$ssl_includes"
 
5836
fi
 
5837
 
 
5838
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
 
5839
 SSL_LDFLAGS=""
 
5840
else
 
5841
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
 
5842
fi
 
5843
 
 
5844
AC_SUBST(SSL_INCLUDES)
 
5845
AC_SUBST(SSL_LDFLAGS)
 
5846
AC_SUBST(LIBSSL)
 
5847
])
 
5848
 
 
5849
AC_DEFUN([KDE_CHECK_STRLCPY],
 
5850
[
 
5851
  AC_REQUIRE([AC_CHECK_STRLCAT])
 
5852
  AC_REQUIRE([AC_CHECK_STRLCPY])
 
5853
  AC_CHECK_SIZEOF(size_t)
 
5854
  AC_CHECK_SIZEOF(unsigned long)
 
5855
 
 
5856
  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
 
5857
  AC_TRY_COMPILE(,[
 
5858
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
 
5859
       choke me
 
5860
    #endif
 
5861
    ],AC_MSG_RESULT([yes]),[
 
5862
      AC_MSG_RESULT(no)
 
5863
      AC_MSG_ERROR([
 
5864
       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
 
5865
       does not apply. Please mail kde-devel@kde.org with a description of your system!
 
5866
      ])
 
5867
  ])
 
5868
])
 
5869
 
 
5870
AC_DEFUN([KDE_CHECK_BINUTILS],
 
5871
[
 
5872
  AC_MSG_CHECKING([if ld supports unversioned version maps])
 
5873
 
 
5874
  kde_save_LDFLAGS="$LDFLAGS"
 
5875
  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
 
5876
  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
 
5877
  AC_TRY_LINK([int foo;],
 
5878
[
 
5879
#ifdef __INTEL_COMPILER
 
5880
icc apparently does not support libtools version-info and version-script
 
5881
at the same time. Dunno where the bug is, but until somebody figured out,
 
5882
better disable the optional version scripts.
 
5883
#endif
 
5884
 
 
5885
  foo = 42;
 
5886
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
 
5887
  LDFLAGS="$kde_save_LDFLAGS"
 
5888
  rm -f conftest.map
 
5889
  AM_CONDITIONAL(include_VERSION_SCRIPT, 
 
5890
    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
 
5891
 
 
5892
  AC_MSG_RESULT($kde_supports_versionmaps)
 
5893
])
 
5894
 
 
5895
AC_DEFUN([AM_PROG_OBJC],[
 
5896
AC_CHECK_PROGS(OBJC, gcc, gcc)
 
5897
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
 
5898
if test "x${OBJCFLAGS-unset}" = xunset; then
 
5899
   OBJCFLAGS="-g -O2"
 
5900
fi
 
5901
AC_SUBST(OBJCFLAGS)
 
5902
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
 
5903
])
 
5904
 
 
5905
AC_DEFUN([KDE_CHECK_PERL],
 
5906
[
 
5907
        KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
 
5908
                    AC_MSG_ERROR([No Perl found in your $PATH.
 
5909
We need perl to generate some code.])
 
5910
        ])
 
5911
    AC_SUBST(PERL)
 
5912
])
 
5913
 
 
5914
AC_DEFUN([KDE_CHECK_LARGEFILE],
 
5915
[
 
5916
AC_SYS_LARGEFILE
 
5917
if test "$ac_cv_sys_file_offset_bits" != no; then
 
5918
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
 
5919
fi
 
5920
 
 
5921
if test "x$ac_cv_sys_large_files" != "xno"; then
 
5922
  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
 
5923
fi
 
5924
 
 
5925
])
 
5926
 
 
5927
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
 
5928
dnl which allows to search for libs that get installed into the KDE prefix.
 
5929
dnl
 
5930
dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
 
5931
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
 
5932
dnl also defines KSTUFF_PKG_ERRORS on error
 
5933
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
 
5934
 
 
5935
   PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
 
5936
   if test "$prefix" != "$kde_libs_prefix"; then
 
5937
       PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
 
5938
   fi
 
5939
   export PKG_CONFIG_PATH
 
5940
   PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
 
5941
])
 
5942
 
 
5943
 
 
5944
dnl Check for PIE support in the compiler and linker
 
5945
AC_DEFUN([KDE_CHECK_PIE_SUPPORT],
 
5946
[
 
5947
  AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
 
5948
  [
 
5949
    AC_LANG_SAVE
 
5950
    AC_LANG_CPLUSPLUS
 
5951
    safe_CXXFLAGS=$CXXFLAGS
 
5952
    safe_LDFLAGS=$LDFLAGS
 
5953
    CXXFLAGS="$CXXFLAGS -fPIE"
 
5954
    LDFLAGS="$LDFLAGS -pie"
 
5955
 
 
5956
    AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
 
5957
 
 
5958
    CXXFLAGS=$safe_CXXFLAGS
 
5959
    LDFLAGS=$safe_LDFLAGS
 
5960
    AC_LANG_RESTORE
 
5961
  ])
 
5962
 
 
5963
  AC_MSG_CHECKING(if enabling -pie/fPIE support)
 
5964
 
 
5965
  AC_ARG_ENABLE(pie,
 
5966
    AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
 
5967
      [kde_has_pie_support=$enableval],
 
5968
      [kde_has_pie_support=detect])
 
5969
 
 
5970
  if test "$kde_has_pie_support" = "detect"; then
 
5971
    kde_has_pie_support=$kde_cv_val_pie_support
 
5972
  fi
 
5973
 
 
5974
  AC_MSG_RESULT([$kde_has_pie_support])
 
5975
 
 
5976
  KDE_USE_FPIE=""
 
5977
  KDE_USE_PIE=""
 
5978
 
 
5979
  AC_SUBST([KDE_USE_FPIE])
 
5980
  AC_SUBST([KDE_USE_PIE])
 
5981
 
 
5982
  if test "$kde_has_pie_support" = "yes"; then
 
5983
    KDE_USE_FPIE="-fPIE"
 
5984
    KDE_USE_PIE="-pie"
 
5985
  fi
 
5986
])
 
5987
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
5988
 
 
5989
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
 
5990
 
 
5991
 
 
5992
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
5993
# -----------------------------------------------------------
 
5994
# If this macro is not defined by Autoconf, define it here.
 
5995
m4_ifdef([AC_PROVIDE_IFELSE],
 
5996
         [],
 
5997
         [m4_define([AC_PROVIDE_IFELSE],
 
5998
                 [m4_ifdef([AC_PROVIDE_$1],
 
5999
                           [$2], [$3])])])
 
6000
 
 
6001
 
 
6002
# AC_PROG_LIBTOOL
 
6003
# ---------------
 
6004
AC_DEFUN([AC_PROG_LIBTOOL],
 
6005
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
 
6006
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
 
6007
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
 
6008
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
6009
    [AC_LIBTOOL_CXX],
 
6010
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
 
6011
  ])])
 
6012
dnl And a similar setup for Fortran 77 support
 
6013
  AC_PROVIDE_IFELSE([AC_PROG_F77],
 
6014
    [AC_LIBTOOL_F77],
 
6015
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
 
6016
])])
 
6017
 
 
6018
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
 
6019
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
 
6020
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
 
6021
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
6022
    [AC_LIBTOOL_GCJ],
 
6023
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
6024
      [AC_LIBTOOL_GCJ],
 
6025
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
6026
        [AC_LIBTOOL_GCJ],
 
6027
      [ifdef([AC_PROG_GCJ],
 
6028
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
6029
       ifdef([A][M_PROG_GCJ],
 
6030
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
6031
       ifdef([LT_AC_PROG_GCJ],
 
6032
             [define([LT_AC_PROG_GCJ],
 
6033
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
6034
])])# AC_PROG_LIBTOOL
 
6035
 
 
6036
 
 
6037
# _AC_PROG_LIBTOOL
 
6038
# ----------------
 
6039
AC_DEFUN([_AC_PROG_LIBTOOL],
 
6040
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
6041
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
6042
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
 
6043
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
 
6044
 
 
6045
# This can be used to rebuild libtool when needed
 
6046
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
6047
 
 
6048
# Always use our own libtool.
 
6049
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
6050
AC_SUBST(LIBTOOL)dnl
 
6051
 
 
6052
# Prevent multiple expansion
 
6053
define([AC_PROG_LIBTOOL], [])
 
6054
])# _AC_PROG_LIBTOOL
 
6055
 
 
6056
 
 
6057
# AC_LIBTOOL_SETUP
 
6058
# ----------------
 
6059
AC_DEFUN([AC_LIBTOOL_SETUP],
 
6060
[AC_PREREQ(2.50)dnl
 
6061
AC_REQUIRE([AC_ENABLE_SHARED])dnl
 
6062
AC_REQUIRE([AC_ENABLE_STATIC])dnl
 
6063
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
 
6064
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
6065
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
6066
AC_REQUIRE([AC_PROG_CC])dnl
 
6067
AC_REQUIRE([AC_PROG_LD])dnl
 
6068
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
 
6069
AC_REQUIRE([AC_PROG_NM])dnl
 
6070
 
 
6071
AC_REQUIRE([AC_PROG_LN_S])dnl
 
6072
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
6073
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
 
6074
AC_REQUIRE([AC_OBJEXT])dnl
 
6075
AC_REQUIRE([AC_EXEEXT])dnl
 
6076
dnl
 
6077
 
 
6078
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
6079
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
6080
AC_LIBTOOL_OBJDIR
 
6081
 
 
6082
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
6083
_LT_AC_PROG_ECHO_BACKSLASH
 
6084
 
 
6085
case $host_os in
 
6086
aix3*)
 
6087
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
6088
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
6089
  # vanish in a puff of smoke.
 
6090
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
6091
    COLLECT_NAMES=
 
6092
    export COLLECT_NAMES
 
6093
  fi
 
6094
  ;;
 
6095
esac
 
6096
 
 
6097
# Sed substitution that helps us do robust quoting.  It backslashifies
 
6098
# metacharacters that are still active within double-quoted strings.
 
6099
Xsed='sed -e 1s/^X//'
 
6100
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
6101
 
 
6102
# Same as above, but do not quote variable references.
 
6103
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
6104
 
 
6105
# Sed substitution to delay expansion of an escaped shell variable in a
 
6106
# double_quote_subst'ed string.
 
6107
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
6108
 
 
6109
# Sed substitution to avoid accidental globbing in evaled expressions
 
6110
no_glob_subst='s/\*/\\\*/g'
 
6111
 
 
6112
# Constants:
 
6113
rm="rm -f"
 
6114
 
 
6115
# Global variables:
 
6116
default_ofile=libtool
 
6117
can_build_shared=yes
 
6118
 
 
6119
# All known linkers require a `.a' archive for static linking (except MSVC,
 
6120
# which needs '.lib').
 
6121
libext=a
 
6122
ltmain="$ac_aux_dir/ltmain.sh"
 
6123
ofile="$default_ofile"
 
6124
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
6125
 
 
6126
AC_CHECK_TOOL(AR, ar, false)
 
6127
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
6128
AC_CHECK_TOOL(STRIP, strip, :)
 
6129
 
 
6130
old_CC="$CC"
 
6131
old_CFLAGS="$CFLAGS"
 
6132
 
 
6133
# Set sane defaults for various variables
 
6134
test -z "$AR" && AR=ar
 
6135
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
6136
test -z "$AS" && AS=as
 
6137
test -z "$CC" && CC=cc
 
6138
test -z "$LTCC" && LTCC=$CC
 
6139
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 
6140
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
6141
test -z "$LD" && LD=ld
 
6142
test -z "$LN_S" && LN_S="ln -s"
 
6143
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
6144
test -z "$NM" && NM=nm
 
6145
test -z "$SED" && SED=sed
 
6146
test -z "$OBJDUMP" && OBJDUMP=objdump
 
6147
test -z "$RANLIB" && RANLIB=:
 
6148
test -z "$STRIP" && STRIP=:
 
6149
test -z "$ac_objext" && ac_objext=o
 
6150
 
 
6151
# Determine commands to create old-style static archives.
 
6152
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
6153
old_postinstall_cmds='chmod 644 $oldlib'
 
6154
old_postuninstall_cmds=
 
6155
 
 
6156
if test -n "$RANLIB"; then
 
6157
  case $host_os in
 
6158
  openbsd*)
 
6159
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
 
6160
    ;;
 
6161
  *)
 
6162
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
 
6163
    ;;
 
6164
  esac
 
6165
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
6166
fi
 
6167
 
 
6168
_LT_CC_BASENAME([$compiler])
 
6169
 
 
6170
# Only perform the check for file, if the check method requires it
 
6171
case $deplibs_check_method in
 
6172
file_magic*)
 
6173
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
6174
    AC_PATH_MAGIC
 
6175
  fi
 
6176
  ;;
 
6177
esac
 
6178
 
 
6179
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
6180
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
6181
enable_win32_dll=yes, enable_win32_dll=no)
 
6182
 
 
6183
AC_ARG_ENABLE([libtool-lock],
 
6184
    [AC_HELP_STRING([--disable-libtool-lock],
 
6185
        [avoid locking (might break parallel builds)])])
 
6186
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
6187
 
 
6188
AC_ARG_WITH([pic],
 
6189
    [AC_HELP_STRING([--with-pic],
 
6190
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
6191
    [pic_mode="$withval"],
 
6192
    [pic_mode=default])
 
6193
test -z "$pic_mode" && pic_mode=default
 
6194
 
 
6195
# Use C for the default configuration in the libtool script
 
6196
tagname=
 
6197
AC_LIBTOOL_LANG_C_CONFIG
 
6198
_LT_AC_TAGCONFIG
 
6199
])# AC_LIBTOOL_SETUP
 
6200
 
 
6201
 
 
6202
# _LT_AC_SYS_COMPILER
 
6203
# -------------------
 
6204
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
6205
[AC_REQUIRE([AC_PROG_CC])dnl
 
6206
 
 
6207
# If no C compiler was specified, use CC.
 
6208
LTCC=${LTCC-"$CC"}
 
6209
 
 
6210
# If no C compiler flags were specified, use CFLAGS.
 
6211
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
6212
 
 
6213
# Allow CC to be a program name with arguments.
 
6214
compiler=$CC
 
6215
])# _LT_AC_SYS_COMPILER
 
6216
 
 
6217
 
 
6218
# _LT_CC_BASENAME(CC)
 
6219
# -------------------
 
6220
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
6221
AC_DEFUN([_LT_CC_BASENAME],
 
6222
[for cc_temp in $1""; do
 
6223
  case $cc_temp in
 
6224
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
6225
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
6226
    \-*) ;;
 
6227
    *) break;;
 
6228
  esac
 
6229
done
 
6230
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
6231
])
 
6232
 
 
6233
 
 
6234
# _LT_COMPILER_BOILERPLATE
 
6235
# ------------------------
 
6236
# Check for compiler boilerplate output or warnings with
 
6237
# the simple compiler test code.
 
6238
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
 
6239
[ac_outfile=conftest.$ac_objext
 
6240
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
 
6241
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
6242
_lt_compiler_boilerplate=`cat conftest.err`
 
6243
$rm conftest*
 
6244
])# _LT_COMPILER_BOILERPLATE
 
6245
 
 
6246
 
 
6247
# _LT_LINKER_BOILERPLATE
 
6248
# ----------------------
 
6249
# Check for linker boilerplate output or warnings with
 
6250
# the simple link test code.
 
6251
AC_DEFUN([_LT_LINKER_BOILERPLATE],
 
6252
[ac_outfile=conftest.$ac_objext
 
6253
printf "$lt_simple_link_test_code" >conftest.$ac_ext
 
6254
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
6255
_lt_linker_boilerplate=`cat conftest.err`
 
6256
$rm conftest*
 
6257
])# _LT_LINKER_BOILERPLATE
 
6258
 
 
6259
 
 
6260
# _LT_AC_SYS_LIBPATH_AIX
 
6261
# ----------------------
 
6262
# Links a minimal program and checks the executable
 
6263
# for the system default hardcoded library path. In most cases,
 
6264
# this is /usr/lib:/lib, but when the MPI compilers are used
 
6265
# the location of the communication and MPI libs are included too.
 
6266
# If we don't find anything, use the default library path according
 
6267
# to the aix ld manual.
 
6268
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
6269
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
6270
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
6271
}'`
 
6272
# Check for a 64-bit object if we didn't find anything.
 
6273
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; }
 
6274
}'`; fi],[])
 
6275
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
6276
])# _LT_AC_SYS_LIBPATH_AIX
 
6277
 
 
6278
 
 
6279
# _LT_AC_SHELL_INIT(ARG)
 
6280
# ----------------------
 
6281
AC_DEFUN([_LT_AC_SHELL_INIT],
 
6282
[ifdef([AC_DIVERSION_NOTICE],
 
6283
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
6284
         [AC_DIVERT_PUSH(NOTICE)])
 
6285
$1
 
6286
AC_DIVERT_POP
 
6287
])# _LT_AC_SHELL_INIT
 
6288
 
 
6289
 
 
6290
# _LT_AC_PROG_ECHO_BACKSLASH
 
6291
# --------------------------
 
6292
# Add some code to the start of the generated configure script which
 
6293
# will find an echo command which doesn't interpret backslashes.
 
6294
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
 
6295
[_LT_AC_SHELL_INIT([
 
6296
# Check that we are running under the correct shell.
 
6297
SHELL=${CONFIG_SHELL-/bin/sh}
 
6298
 
 
6299
case X$ECHO in
 
6300
X*--fallback-echo)
 
6301
  # Remove one level of quotation (which was required for Make).
 
6302
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
6303
  ;;
 
6304
esac
 
6305
 
 
6306
echo=${ECHO-echo}
 
6307
if test "X[$]1" = X--no-reexec; then
 
6308
  # Discard the --no-reexec flag, and continue.
 
6309
  shift
 
6310
elif test "X[$]1" = X--fallback-echo; then
 
6311
  # Avoid inline document here, it may be left over
 
6312
  :
 
6313
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
 
6314
  # Yippee, $echo works!
 
6315
  :
 
6316
else
 
6317
  # Restart under the correct shell.
 
6318
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
6319
fi
 
6320
 
 
6321
if test "X[$]1" = X--fallback-echo; then
 
6322
  # used as fallback echo
 
6323
  shift
 
6324
  cat <<EOF
 
6325
[$]*
 
6326
EOF
 
6327
  exit 0
 
6328
fi
 
6329
 
 
6330
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
6331
# if CDPATH is set.
 
6332
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
6333
 
 
6334
if test -z "$ECHO"; then
 
6335
if test "X${echo_test_string+set}" != Xset; then
 
6336
# find a string as large as possible, as long as the shell can cope with it
 
6337
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
6338
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
6339
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
 
6340
       echo_test_string=`eval $cmd` &&
 
6341
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
 
6342
    then
 
6343
      break
 
6344
    fi
 
6345
  done
 
6346
fi
 
6347
 
 
6348
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
6349
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
6350
   test "X$echo_testing_string" = "X$echo_test_string"; then
 
6351
  :
 
6352
else
 
6353
  # The Solaris, AIX, and Digital Unix default echo programs unquote
 
6354
  # backslashes.  This makes it impossible to quote backslashes using
 
6355
  #   echo "$something" | sed 's/\\/\\\\/g'
 
6356
  #
 
6357
  # So, first we look for a working echo in the user's PATH.
 
6358
 
 
6359
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
6360
  for dir in $PATH /usr/ucb; do
 
6361
    IFS="$lt_save_ifs"
 
6362
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
6363
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
6364
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
6365
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
6366
      echo="$dir/echo"
 
6367
      break
 
6368
    fi
 
6369
  done
 
6370
  IFS="$lt_save_ifs"
 
6371
 
 
6372
  if test "X$echo" = Xecho; then
 
6373
    # We didn't find a better echo, so look for alternatives.
 
6374
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
 
6375
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
 
6376
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
6377
      # This shell has a builtin print -r that does the trick.
 
6378
      echo='print -r'
 
6379
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
 
6380
         test "X$CONFIG_SHELL" != X/bin/ksh; then
 
6381
      # If we have ksh, try running configure again with it.
 
6382
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
6383
      export ORIGINAL_CONFIG_SHELL
 
6384
      CONFIG_SHELL=/bin/ksh
 
6385
      export CONFIG_SHELL
 
6386
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
6387
    else
 
6388
      # Try using printf.
 
6389
      echo='printf %s\n'
 
6390
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
6391
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
6392
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
6393
        # Cool, printf works
 
6394
        :
 
6395
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
6396
           test "X$echo_testing_string" = 'X\t' &&
 
6397
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
6398
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
6399
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
6400
        export CONFIG_SHELL
 
6401
        SHELL="$CONFIG_SHELL"
 
6402
        export SHELL
 
6403
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
6404
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
6405
           test "X$echo_testing_string" = 'X\t' &&
 
6406
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
6407
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
6408
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
6409
      else
 
6410
        # maybe with a smaller string...
 
6411
        prev=:
 
6412
 
 
6413
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
6414
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
 
6415
          then
 
6416
            break
 
6417
          fi
 
6418
          prev="$cmd"
 
6419
        done
 
6420
 
 
6421
        if test "$prev" != 'sed 50q "[$]0"'; then
 
6422
          echo_test_string=`eval $prev`
 
6423
          export echo_test_string
 
6424
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
6425
        else
 
6426
          # Oops.  We lost completely, so just stick with echo.
 
6427
          echo=echo
 
6428
        fi
 
6429
      fi
 
6430
    fi
 
6431
  fi
 
6432
fi
 
6433
fi
 
6434
 
 
6435
# Copy echo and quote the copy suitably for passing to libtool from
 
6436
# the Makefile, instead of quoting the original, which is used later.
 
6437
ECHO=$echo
 
6438
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
6439
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
6440
fi
 
6441
 
 
6442
AC_SUBST(ECHO)
 
6443
])])# _LT_AC_PROG_ECHO_BACKSLASH
 
6444
 
 
6445
 
 
6446
# _LT_AC_LOCK
 
6447
# -----------
 
6448
AC_DEFUN([_LT_AC_LOCK],
 
6449
[AC_ARG_ENABLE([libtool-lock],
 
6450
    [AC_HELP_STRING([--disable-libtool-lock],
 
6451
        [avoid locking (might break parallel builds)])])
 
6452
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
6453
 
 
6454
# Some flags need to be propagated to the compiler or linker for good
 
6455
# libtool support.
 
6456
case $host in
 
6457
ia64-*-hpux*)
 
6458
  # Find out which ABI we are using.
 
6459
  echo 'int i;' > conftest.$ac_ext
 
6460
  if AC_TRY_EVAL(ac_compile); then
 
6461
    case `/usr/bin/file conftest.$ac_objext` in
 
6462
    *ELF-32*)
 
6463
      HPUX_IA64_MODE="32"
 
6464
      ;;
 
6465
    *ELF-64*)
 
6466
      HPUX_IA64_MODE="64"
 
6467
      ;;
 
6468
    esac
 
6469
  fi
 
6470
  rm -rf conftest*
 
6471
  ;;
 
6472
*-*-irix6*)
 
6473
  # Find out which ABI we are using.
 
6474
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
6475
  if AC_TRY_EVAL(ac_compile); then
 
6476
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
6477
    case `/usr/bin/file conftest.$ac_objext` in
 
6478
    *32-bit*)
 
6479
      LD="${LD-ld} -melf32bsmip"
 
6480
      ;;
 
6481
    *N32*)
 
6482
      LD="${LD-ld} -melf32bmipn32"
 
6483
      ;;
 
6484
    *64-bit*)
 
6485
      LD="${LD-ld} -melf64bmip"
 
6486
      ;;
 
6487
    esac
 
6488
   else
 
6489
    case `/usr/bin/file conftest.$ac_objext` in
 
6490
    *32-bit*)
 
6491
      LD="${LD-ld} -32"
 
6492
      ;;
 
6493
    *N32*)
 
6494
      LD="${LD-ld} -n32"
 
6495
      ;;
 
6496
    *64-bit*)
 
6497
      LD="${LD-ld} -64"
 
6498
      ;;
 
6499
    esac
 
6500
   fi
 
6501
  fi
 
6502
  rm -rf conftest*
 
6503
  ;;
 
6504
 
 
6505
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
6506
  # Find out which ABI we are using.
 
6507
  echo 'int i;' > conftest.$ac_ext
 
6508
  if AC_TRY_EVAL(ac_compile); then
 
6509
    case `/usr/bin/file conftest.o` in
 
6510
    *32-bit*)
 
6511
      case $host in
 
6512
        x86_64-*linux*)
 
6513
          LD="${LD-ld} -m elf_i386"
 
6514
          ;;
 
6515
        ppc64-*linux*|powerpc64-*linux*)
 
6516
          LD="${LD-ld} -m elf32ppclinux"
 
6517
          ;;
 
6518
        s390x-*linux*)
 
6519
          LD="${LD-ld} -m elf_s390"
 
6520
          ;;
 
6521
        sparc64-*linux*)
 
6522
          LD="${LD-ld} -m elf32_sparc"
 
6523
          ;;
 
6524
      esac
 
6525
      ;;
 
6526
    *64-bit*)
 
6527
      case $host in
 
6528
        x86_64-*linux*)
 
6529
          LD="${LD-ld} -m elf_x86_64"
 
6530
          ;;
 
6531
        ppc*-*linux*|powerpc*-*linux*)
 
6532
          LD="${LD-ld} -m elf64ppc"
 
6533
          ;;
 
6534
        s390*-*linux*)
 
6535
          LD="${LD-ld} -m elf64_s390"
 
6536
          ;;
 
6537
        sparc*-*linux*)
 
6538
          LD="${LD-ld} -m elf64_sparc"
 
6539
          ;;
 
6540
      esac
 
6541
      ;;
 
6542
    esac
 
6543
  fi
 
6544
  rm -rf conftest*
 
6545
  ;;
 
6546
 
 
6547
*-*-sco3.2v5*)
 
6548
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
6549
  SAVE_CFLAGS="$CFLAGS"
 
6550
  CFLAGS="$CFLAGS -belf"
 
6551
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
6552
    [AC_LANG_PUSH(C)
 
6553
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
6554
     AC_LANG_POP])
 
6555
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
6556
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
6557
    CFLAGS="$SAVE_CFLAGS"
 
6558
  fi
 
6559
  ;;
 
6560
sparc*-*solaris*)
 
6561
  # Find out which ABI we are using.
 
6562
  echo 'int i;' > conftest.$ac_ext
 
6563
  if AC_TRY_EVAL(ac_compile); then
 
6564
    case `/usr/bin/file conftest.o` in
 
6565
    *64-bit*)
 
6566
      case $lt_cv_prog_gnu_ld in
 
6567
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
6568
      *)    LD="${LD-ld} -64" ;;
 
6569
      esac
 
6570
      ;;
 
6571
    esac
 
6572
  fi
 
6573
  rm -rf conftest*
 
6574
  ;;
 
6575
 
 
6576
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
6577
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
 
6578
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
6579
  AC_CHECK_TOOL(AS, as, false)
 
6580
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
6581
  ;;
 
6582
  ])
 
6583
esac
 
6584
 
 
6585
need_locks="$enable_libtool_lock"
 
6586
 
 
6587
])# _LT_AC_LOCK
 
6588
 
 
6589
 
 
6590
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
6591
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
6592
# ----------------------------------------------------------------
 
6593
# Check whether the given compiler option works
 
6594
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
6595
[AC_REQUIRE([LT_AC_PROG_SED])
 
6596
AC_CACHE_CHECK([$1], [$2],
 
6597
  [$2=no
 
6598
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
6599
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6600
   lt_compiler_flag="$3"
 
6601
   # Insert the option either (1) after the last *FLAGS variable, or
 
6602
   # (2) before a word containing "conftest.", or (3) at the end.
 
6603
   # Note that $ac_compile itself does not contain backslashes and begins
 
6604
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
6605
   # The option is referenced via a variable to avoid confusing sed.
 
6606
   lt_compile=`echo "$ac_compile" | $SED \
 
6607
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
6608
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
6609
   -e 's:$: $lt_compiler_flag:'`
 
6610
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
6611
   (eval "$lt_compile" 2>conftest.err)
 
6612
   ac_status=$?
 
6613
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
6614
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
6615
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
6616
     # The compiler can only warn and ignore the option if not recognized
 
6617
     # So say no if there are warnings other than the usual output.
 
6618
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
 
6619
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
6620
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
 
6621
       $2=yes
 
6622
     fi
 
6623
   fi
 
6624
   $rm conftest*
 
6625
])
 
6626
 
 
6627
if test x"[$]$2" = xyes; then
 
6628
    ifelse([$5], , :, [$5])
 
6629
else
 
6630
    ifelse([$6], , :, [$6])
 
6631
fi
 
6632
])# AC_LIBTOOL_COMPILER_OPTION
 
6633
 
 
6634
 
 
6635
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
6636
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
6637
# ------------------------------------------------------------
 
6638
# Check whether the given compiler option works
 
6639
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
6640
[AC_CACHE_CHECK([$1], [$2],
 
6641
  [$2=no
 
6642
   save_LDFLAGS="$LDFLAGS"
 
6643
   LDFLAGS="$LDFLAGS $3"
 
6644
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
 
6645
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
6646
     # The linker can only warn and ignore the option if not recognized
 
6647
     # So say no if there are warnings
 
6648
     if test -s conftest.err; then
 
6649
       # Append any errors to the config.log.
 
6650
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
6651
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
 
6652
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
6653
       if diff conftest.exp conftest.er2 >/dev/null; then
 
6654
         $2=yes
 
6655
       fi
 
6656
     else
 
6657
       $2=yes
 
6658
     fi
 
6659
   fi
 
6660
   $rm conftest*
 
6661
   LDFLAGS="$save_LDFLAGS"
 
6662
])
 
6663
 
 
6664
if test x"[$]$2" = xyes; then
 
6665
    ifelse([$4], , :, [$4])
 
6666
else
 
6667
    ifelse([$5], , :, [$5])
 
6668
fi
 
6669
])# AC_LIBTOOL_LINKER_OPTION
 
6670
 
 
6671
 
 
6672
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
6673
# --------------------------
 
6674
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
6675
[# find the maximum length of command line arguments
 
6676
AC_MSG_CHECKING([the maximum length of command line arguments])
 
6677
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
6678
  i=0
 
6679
  teststring="ABCD"
 
6680
 
 
6681
  case $build_os in
 
6682
  msdosdjgpp*)
 
6683
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
6684
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
6685
    # during glob expansion).  Even if it were fixed, the result of this
 
6686
    # check would be larger than it should be.
 
6687
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
6688
    ;;
 
6689
 
 
6690
  gnu*)
 
6691
    # Under GNU Hurd, this test is not required because there is
 
6692
    # no limit to the length of command line arguments.
 
6693
    # Libtool will interpret -1 as no limit whatsoever
 
6694
    lt_cv_sys_max_cmd_len=-1;
 
6695
    ;;
 
6696
 
 
6697
  cygwin* | mingw*)
 
6698
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
6699
    # about 5 minutes as the teststring grows exponentially.
 
6700
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
6701
    # you end up with a "frozen" computer, even though with patience
 
6702
    # the test eventually succeeds (with a max line length of 256k).
 
6703
    # Instead, let's just punt: use the minimum linelength reported by
 
6704
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
6705
    lt_cv_sys_max_cmd_len=8192;
 
6706
    ;;
 
6707
 
 
6708
  amigaos*)
 
6709
    # On AmigaOS with pdksh, this test takes hours, literally.
 
6710
    # So we just punt and use a minimum line length of 8192.
 
6711
    lt_cv_sys_max_cmd_len=8192;
 
6712
    ;;
 
6713
 
 
6714
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
6715
    # This has been around since 386BSD, at least.  Likely further.
 
6716
    if test -x /sbin/sysctl; then
 
6717
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
6718
    elif test -x /usr/sbin/sysctl; then
 
6719
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
6720
    else
 
6721
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
6722
    fi
 
6723
    # And add a safety zone
 
6724
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
6725
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
6726
    ;;
 
6727
 
 
6728
  interix*)
 
6729
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
 
6730
    lt_cv_sys_max_cmd_len=196608
 
6731
    ;;
 
6732
 
 
6733
  osf*)
 
6734
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
6735
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
6736
    # nice to cause kernel panics so lets avoid the loop below.
 
6737
    # First set a reasonable default.
 
6738
    lt_cv_sys_max_cmd_len=16384
 
6739
    #
 
6740
    if test -x /sbin/sysconfig; then
 
6741
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
6742
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
6743
      esac
 
6744
    fi
 
6745
    ;;
 
6746
  sco3.2v5*)
 
6747
    lt_cv_sys_max_cmd_len=102400
 
6748
    ;;
 
6749
  sysv5* | sco5v6* | sysv4.2uw2*)
 
6750
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
 
6751
    if test -n "$kargmax"; then
 
6752
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
 
6753
    else
 
6754
      lt_cv_sys_max_cmd_len=32768
 
6755
    fi
 
6756
    ;;
 
6757
  *)
 
6758
    # If test is not a shell built-in, we'll probably end up computing a
 
6759
    # maximum length that is only half of the actual maximum length, but
 
6760
    # we can't tell.
 
6761
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
6762
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
 
6763
               = "XX$teststring") >/dev/null 2>&1 &&
 
6764
            new_result=`expr "X$teststring" : ".*" 2>&1` &&
 
6765
            lt_cv_sys_max_cmd_len=$new_result &&
 
6766
            test $i != 17 # 1/2 MB should be enough
 
6767
    do
 
6768
      i=`expr $i + 1`
 
6769
      teststring=$teststring$teststring
 
6770
    done
 
6771
    teststring=
 
6772
    # Add a significant safety factor because C++ compilers can tack on massive
 
6773
    # amounts of additional arguments before passing them to the linker.
 
6774
    # It appears as though 1/2 is a usable value.
 
6775
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
6776
    ;;
 
6777
  esac
 
6778
])
 
6779
if test -n $lt_cv_sys_max_cmd_len ; then
 
6780
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
6781
else
 
6782
  AC_MSG_RESULT(none)
 
6783
fi
 
6784
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
6785
 
 
6786
 
 
6787
# _LT_AC_CHECK_DLFCN
 
6788
# ------------------
 
6789
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
6790
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
6791
])# _LT_AC_CHECK_DLFCN
 
6792
 
 
6793
 
 
6794
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
6795
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
6796
# ---------------------------------------------------------------------
 
6797
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 
6798
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6799
if test "$cross_compiling" = yes; then :
 
6800
  [$4]
 
6801
else
 
6802
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
6803
  lt_status=$lt_dlunknown
 
6804
  cat > conftest.$ac_ext <<EOF
 
6805
[#line __oline__ "configure"
 
6806
#include "confdefs.h"
 
6807
 
 
6808
#if HAVE_DLFCN_H
 
6809
#include <dlfcn.h>
 
6810
#endif
 
6811
 
 
6812
#include <stdio.h>
 
6813
 
 
6814
#ifdef RTLD_GLOBAL
 
6815
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
6816
#else
 
6817
#  ifdef DL_GLOBAL
 
6818
#    define LT_DLGLOBAL         DL_GLOBAL
 
6819
#  else
 
6820
#    define LT_DLGLOBAL         0
 
6821
#  endif
 
6822
#endif
 
6823
 
 
6824
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
6825
   find out it does not work in some platform. */
 
6826
#ifndef LT_DLLAZY_OR_NOW
 
6827
#  ifdef RTLD_LAZY
 
6828
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
6829
#  else
 
6830
#    ifdef DL_LAZY
 
6831
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
6832
#    else
 
6833
#      ifdef RTLD_NOW
 
6834
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
6835
#      else
 
6836
#        ifdef DL_NOW
 
6837
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
6838
#        else
 
6839
#          define LT_DLLAZY_OR_NOW      0
 
6840
#        endif
 
6841
#      endif
 
6842
#    endif
 
6843
#  endif
 
6844
#endif
 
6845
 
 
6846
#ifdef __cplusplus
 
6847
extern "C" void exit (int);
 
6848
#endif
 
6849
 
 
6850
void fnord() { int i=42;}
 
6851
int main ()
 
6852
{
 
6853
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
6854
  int status = $lt_dlunknown;
 
6855
 
 
6856
  if (self)
 
6857
    {
 
6858
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
6859
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
6860
      /* dlclose (self); */
 
6861
    }
 
6862
  else
 
6863
    puts (dlerror ());
 
6864
 
 
6865
    exit (status);
 
6866
}]
 
6867
EOF
 
6868
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
6869
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
 
6870
    lt_status=$?
 
6871
    case x$lt_status in
 
6872
      x$lt_dlno_uscore) $1 ;;
 
6873
      x$lt_dlneed_uscore) $2 ;;
 
6874
      x$lt_dlunknown|x*) $3 ;;
 
6875
    esac
 
6876
  else :
 
6877
    # compilation failed
 
6878
    $3
 
6879
  fi
 
6880
fi
 
6881
rm -fr conftest*
 
6882
])# _LT_AC_TRY_DLOPEN_SELF
 
6883
 
 
6884
 
 
6885
# AC_LIBTOOL_DLOPEN_SELF
 
6886
# ----------------------
 
6887
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 
6888
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6889
if test "x$enable_dlopen" != xyes; then
 
6890
  enable_dlopen=unknown
 
6891
  enable_dlopen_self=unknown
 
6892
  enable_dlopen_self_static=unknown
 
6893
else
 
6894
  lt_cv_dlopen=no
 
6895
  lt_cv_dlopen_libs=
 
6896
 
 
6897
  case $host_os in
 
6898
  beos*)
 
6899
    lt_cv_dlopen="load_add_on"
 
6900
    lt_cv_dlopen_libs=
 
6901
    lt_cv_dlopen_self=yes
 
6902
    ;;
 
6903
 
 
6904
  mingw* | pw32*)
 
6905
    lt_cv_dlopen="LoadLibrary"
 
6906
    lt_cv_dlopen_libs=
 
6907
   ;;
 
6908
 
 
6909
  cygwin*)
 
6910
    lt_cv_dlopen="dlopen"
 
6911
    lt_cv_dlopen_libs=
 
6912
   ;;
 
6913
 
 
6914
  darwin*)
 
6915
  # if libdl is installed we need to link against it
 
6916
    AC_CHECK_LIB([dl], [dlopen],
 
6917
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
6918
    lt_cv_dlopen="dyld"
 
6919
    lt_cv_dlopen_libs=
 
6920
    lt_cv_dlopen_self=yes
 
6921
    ])
 
6922
   ;;
 
6923
 
 
6924
  *)
 
6925
    AC_CHECK_FUNC([shl_load],
 
6926
          [lt_cv_dlopen="shl_load"],
 
6927
      [AC_CHECK_LIB([dld], [shl_load],
 
6928
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
6929
        [AC_CHECK_FUNC([dlopen],
 
6930
              [lt_cv_dlopen="dlopen"],
 
6931
          [AC_CHECK_LIB([dl], [dlopen],
 
6932
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
6933
            [AC_CHECK_LIB([svld], [dlopen],
 
6934
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
6935
              [AC_CHECK_LIB([dld], [dld_link],
 
6936
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
6937
              ])
 
6938
            ])
 
6939
          ])
 
6940
        ])
 
6941
      ])
 
6942
    ;;
 
6943
  esac
 
6944
 
 
6945
  if test "x$lt_cv_dlopen" != xno; then
 
6946
    enable_dlopen=yes
 
6947
  else
 
6948
    enable_dlopen=no
 
6949
  fi
 
6950
 
 
6951
  case $lt_cv_dlopen in
 
6952
  dlopen)
 
6953
    save_CPPFLAGS="$CPPFLAGS"
 
6954
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
6955
 
 
6956
    save_LDFLAGS="$LDFLAGS"
 
6957
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
6958
 
 
6959
    save_LIBS="$LIBS"
 
6960
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
6961
 
 
6962
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
6963
          lt_cv_dlopen_self, [dnl
 
6964
          _LT_AC_TRY_DLOPEN_SELF(
 
6965
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
6966
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
6967
    ])
 
6968
 
 
6969
    if test "x$lt_cv_dlopen_self" = xyes; then
 
6970
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
 
6971
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
6972
          lt_cv_dlopen_self_static, [dnl
 
6973
          _LT_AC_TRY_DLOPEN_SELF(
 
6974
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
6975
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
6976
      ])
 
6977
    fi
 
6978
 
 
6979
    CPPFLAGS="$save_CPPFLAGS"
 
6980
    LDFLAGS="$save_LDFLAGS"
 
6981
    LIBS="$save_LIBS"
 
6982
    ;;
 
6983
  esac
 
6984
 
 
6985
  case $lt_cv_dlopen_self in
 
6986
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
6987
  *) enable_dlopen_self=unknown ;;
 
6988
  esac
 
6989
 
 
6990
  case $lt_cv_dlopen_self_static in
 
6991
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
6992
  *) enable_dlopen_self_static=unknown ;;
 
6993
  esac
 
6994
fi
 
6995
])# AC_LIBTOOL_DLOPEN_SELF
 
6996
 
 
6997
 
 
6998
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
6999
# ---------------------------------
 
7000
# Check to see if options -c and -o are simultaneously supported by compiler
 
7001
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
7002
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
7003
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
7004
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
7005
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
7006
   $rm -r conftest 2>/dev/null
 
7007
   mkdir conftest
 
7008
   cd conftest
 
7009
   mkdir out
 
7010
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
7011
 
 
7012
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
7013
   # Insert the option either (1) after the last *FLAGS variable, or
 
7014
   # (2) before a word containing "conftest.", or (3) at the end.
 
7015
   # Note that $ac_compile itself does not contain backslashes and begins
 
7016
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
7017
   lt_compile=`echo "$ac_compile" | $SED \
 
7018
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
7019
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
7020
   -e 's:$: $lt_compiler_flag:'`
 
7021
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
7022
   (eval "$lt_compile" 2>out/conftest.err)
 
7023
   ac_status=$?
 
7024
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
7025
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
7026
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
7027
   then
 
7028
     # The compiler can only warn and ignore the option if not recognized
 
7029
     # So say no if there are warnings
 
7030
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
 
7031
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
 
7032
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
7033
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
7034
     fi
 
7035
   fi
 
7036
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
 
7037
   $rm conftest*
 
7038
   # SGI C++ compiler will create directory out/ii_files/ for
 
7039
   # template instantiation
 
7040
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
 
7041
   $rm out/* && rmdir out
 
7042
   cd ..
 
7043
   rmdir conftest
 
7044
   $rm conftest*
 
7045
])
 
7046
])# AC_LIBTOOL_PROG_CC_C_O
 
7047
 
 
7048
 
 
7049
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
7050
# -----------------------------------------
 
7051
# Check to see if we can do hard links to lock some files if needed
 
7052
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
7053
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
7054
 
 
7055
hard_links="nottested"
 
7056
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
7057
  # do not overwrite the value of need_locks provided by the user
 
7058
  AC_MSG_CHECKING([if we can lock with hard links])
 
7059
  hard_links=yes
 
7060
  $rm conftest*
 
7061
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
7062
  touch conftest.a
 
7063
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
7064
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
7065
  AC_MSG_RESULT([$hard_links])
 
7066
  if test "$hard_links" = no; then
 
7067
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
7068
    need_locks=warn
 
7069
  fi
 
7070
else
 
7071
  need_locks=no
 
7072
fi
 
7073
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
7074
 
 
7075
 
 
7076
# AC_LIBTOOL_OBJDIR
 
7077
# -----------------
 
7078
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
7079
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
7080
[rm -f .libs 2>/dev/null
 
7081
mkdir .libs 2>/dev/null
 
7082
if test -d .libs; then
 
7083
  lt_cv_objdir=.libs
 
7084
else
 
7085
  # MS-DOS does not allow filenames that begin with a dot.
 
7086
  lt_cv_objdir=_libs
 
7087
fi
 
7088
rmdir .libs 2>/dev/null])
 
7089
objdir=$lt_cv_objdir
 
7090
])# AC_LIBTOOL_OBJDIR
 
7091
 
 
7092
 
 
7093
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
7094
# ----------------------------------------------
 
7095
# Check hardcoding attributes.
 
7096
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
7097
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
7098
_LT_AC_TAGVAR(hardcode_action, $1)=
 
7099
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
7100
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
 
7101
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
7102
 
 
7103
  # We can hardcode non-existant directories.
 
7104
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
 
7105
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
7106
     # have to relink, otherwise we might link with an installed library
 
7107
     # when we should be linking with a yet-to-be-installed one
 
7108
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
7109
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
 
7110
    # Linking always hardcodes the temporary library directory.
 
7111
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
 
7112
  else
 
7113
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
7114
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
 
7115
  fi
 
7116
else
 
7117
  # We cannot hardcode anything, or else we can only hardcode existing
 
7118
  # directories.
 
7119
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
7120
fi
 
7121
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
7122
 
 
7123
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
7124
  # Fast installation is not supported
 
7125
  enable_fast_install=no
 
7126
elif test "$shlibpath_overrides_runpath" = yes ||
 
7127
     test "$enable_shared" = no; then
 
7128
  # Fast installation is not necessary
 
7129
  enable_fast_install=needless
 
7130
fi
 
7131
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
7132
 
 
7133
 
 
7134
# AC_LIBTOOL_SYS_LIB_STRIP
 
7135
# ------------------------
 
7136
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
7137
[striplib=
 
7138
old_striplib=
 
7139
AC_MSG_CHECKING([whether stripping libraries is possible])
 
7140
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 
7141
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
7142
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
7143
  AC_MSG_RESULT([yes])
 
7144
else
 
7145
# FIXME - insert some real tests, host_os isn't really good enough
 
7146
  case $host_os in
 
7147
   darwin*)
 
7148
       if test -n "$STRIP" ; then
 
7149
         striplib="$STRIP -x"
 
7150
         AC_MSG_RESULT([yes])
 
7151
       else
 
7152
  AC_MSG_RESULT([no])
 
7153
fi
 
7154
       ;;
 
7155
   *)
 
7156
  AC_MSG_RESULT([no])
 
7157
    ;;
 
7158
  esac
 
7159
fi
 
7160
])# AC_LIBTOOL_SYS_LIB_STRIP
 
7161
 
 
7162
 
 
7163
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
7164
# -----------------------------
 
7165
# PORTME Fill in your ld.so characteristics
 
7166
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
7167
[AC_MSG_CHECKING([dynamic linker characteristics])
 
7168
library_names_spec=
 
7169
libname_spec='lib$name'
 
7170
soname_spec=
 
7171
shrext_cmds=".so"
 
7172
postinstall_cmds=
 
7173
postuninstall_cmds=
 
7174
finish_cmds=
 
7175
finish_eval=
 
7176
shlibpath_var=
 
7177
shlibpath_overrides_runpath=unknown
 
7178
version_type=none
 
7179
dynamic_linker="$host_os ld.so"
 
7180
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
7181
if test "$GCC" = yes; then
 
7182
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
7183
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
 
7184
    # if the path contains ";" then we assume it to be the separator
 
7185
    # otherwise default to the standard path separator (i.e. ":") - it is
 
7186
    # assumed that no part of a normal pathname contains ";" but that should
 
7187
    # okay in the real world where ";" in dirpaths is itself problematic.
 
7188
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
7189
  else
 
7190
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
7191
  fi
 
7192
else
 
7193
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
7194
fi
 
7195
need_lib_prefix=unknown
 
7196
hardcode_into_libs=no
 
7197
 
 
7198
# when you set need_version to no, make sure it does not cause -set_version
 
7199
# flags to be left without arguments
 
7200
need_version=unknown
 
7201
 
 
7202
case $host_os in
 
7203
aix3*)
 
7204
  version_type=linux
 
7205
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
7206
  shlibpath_var=LIBPATH
 
7207
 
 
7208
  # AIX 3 has no versioning support, so we append a major version to the name.
 
7209
  soname_spec='${libname}${release}${shared_ext}$major'
 
7210
  ;;
 
7211
 
 
7212
aix4* | aix5*)
 
7213
  version_type=linux
 
7214
  need_lib_prefix=no
 
7215
  need_version=no
 
7216
  hardcode_into_libs=yes
 
7217
  if test "$host_cpu" = ia64; then
 
7218
    # AIX 5 supports IA64
 
7219
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
7220
    shlibpath_var=LD_LIBRARY_PATH
 
7221
  else
 
7222
    # With GCC up to 2.95.x, collect2 would create an import file
 
7223
    # for dependence libraries.  The import file would start with
 
7224
    # the line `#! .'.  This would cause the generated library to
 
7225
    # depend on `.', always an invalid library.  This was fixed in
 
7226
    # development snapshots of GCC prior to 3.0.
 
7227
    case $host_os in
 
7228
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
7229
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
7230
           echo ' yes '
 
7231
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
7232
        :
 
7233
      else
 
7234
        can_build_shared=no
 
7235
      fi
 
7236
      ;;
 
7237
    esac
 
7238
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
7239
    # soname into executable. Probably we can add versioning support to
 
7240
    # collect2, so additional links can be useful in future.
 
7241
    if test "$aix_use_runtimelinking" = yes; then
 
7242
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
7243
      # instead of lib<name>.a to let people know that these are not
 
7244
      # typical AIX shared libraries.
 
7245
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7246
    else
 
7247
      # We preserve .a as extension for shared libraries through AIX4.2
 
7248
      # and later when we are not doing run time linking.
 
7249
      library_names_spec='${libname}${release}.a $libname.a'
 
7250
      soname_spec='${libname}${release}${shared_ext}$major'
 
7251
    fi
 
7252
    shlibpath_var=LIBPATH
 
7253
  fi
 
7254
  ;;
 
7255
 
 
7256
amigaos*)
 
7257
  library_names_spec='$libname.ixlibrary $libname.a'
 
7258
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
7259
  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'
 
7260
  ;;
 
7261
 
 
7262
beos*)
 
7263
  library_names_spec='${libname}${shared_ext}'
 
7264
  dynamic_linker="$host_os ld.so"
 
7265
  shlibpath_var=LIBRARY_PATH
 
7266
  ;;
 
7267
 
 
7268
bsdi[[45]]*)
 
7269
  version_type=linux
 
7270
  need_version=no
 
7271
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7272
  soname_spec='${libname}${release}${shared_ext}$major'
 
7273
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
7274
  shlibpath_var=LD_LIBRARY_PATH
 
7275
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
7276
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
7277
  # the default ld.so.conf also contains /usr/contrib/lib and
 
7278
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
7279
  # libtool to hard-code these into programs
 
7280
  ;;
 
7281
 
 
7282
cygwin* | mingw* | pw32*)
 
7283
  version_type=windows
 
7284
  shrext_cmds=".dll"
 
7285
  need_version=no
 
7286
  need_lib_prefix=no
 
7287
 
 
7288
  case $GCC,$host_os in
 
7289
  yes,cygwin* | yes,mingw* | yes,pw32*)
 
7290
    library_names_spec='$libname.dll.a'
 
7291
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
7292
    postinstall_cmds='base_file=`basename \${file}`~
 
7293
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
 
7294
      dldir=$destdir/`dirname \$dlpath`~
 
7295
      test -d \$dldir || mkdir -p \$dldir~
 
7296
      $install_prog $dir/$dlname \$dldir/$dlname~
 
7297
      chmod a+x \$dldir/$dlname'
 
7298
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
7299
      dlpath=$dir/\$dldll~
 
7300
       $rm \$dlpath'
 
7301
    shlibpath_overrides_runpath=yes
 
7302
 
 
7303
    case $host_os in
 
7304
    cygwin*)
 
7305
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
7306
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
7307
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
7308
      ;;
 
7309
    mingw*)
 
7310
      # MinGW DLLs use traditional 'lib' prefix
 
7311
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
7312
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
7313
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
 
7314
        # It is most probably a Windows format PATH printed by
 
7315
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
7316
        # path with ; separators, and with drive letters. We can handle the
 
7317
        # drive letters (cygwin fileutils understands them), so leave them,
 
7318
        # especially as we might pass files found there to a mingw objdump,
 
7319
        # which wouldn't understand a cygwinified path. Ahh.
 
7320
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
7321
      else
 
7322
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
7323
      fi
 
7324
      ;;
 
7325
    pw32*)
 
7326
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
7327
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
7328
      ;;
 
7329
    esac
 
7330
    ;;
 
7331
 
 
7332
  *)
 
7333
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
7334
    ;;
 
7335
  esac
 
7336
  dynamic_linker='Win32 ld.exe'
 
7337
  # FIXME: first we should search . and the directory the executable is in
 
7338
  shlibpath_var=PATH
 
7339
  ;;
 
7340
 
 
7341
darwin* | rhapsody*)
 
7342
  dynamic_linker="$host_os dyld"
 
7343
  version_type=darwin
 
7344
  need_lib_prefix=no
 
7345
  need_version=no
 
7346
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
7347
  soname_spec='${libname}${release}${major}$shared_ext'
 
7348
  shlibpath_overrides_runpath=yes
 
7349
  shlibpath_var=DYLD_LIBRARY_PATH
 
7350
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
7351
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 
7352
  if test "$GCC" = yes; then
 
7353
    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"`
 
7354
  else
 
7355
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 
7356
  fi
 
7357
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
7358
  ;;
 
7359
 
 
7360
dgux*)
 
7361
  version_type=linux
 
7362
  need_lib_prefix=no
 
7363
  need_version=no
 
7364
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
7365
  soname_spec='${libname}${release}${shared_ext}$major'
 
7366
  shlibpath_var=LD_LIBRARY_PATH
 
7367
  ;;
 
7368
 
 
7369
freebsd1*)
 
7370
  dynamic_linker=no
 
7371
  ;;
 
7372
 
 
7373
freebsd* | dragonfly*)
 
7374
  # DragonFly does not have aout.  When/if they implement a new
 
7375
  # versioning mechanism, adjust this.
 
7376
  if test -x /usr/bin/objformat; then
 
7377
    objformat=`/usr/bin/objformat`
 
7378
  else
 
7379
    case $host_os in
 
7380
    freebsd[[123]]*) objformat=aout ;;
 
7381
    *) objformat=elf ;;
 
7382
    esac
 
7383
  fi
 
7384
  version_type=freebsd-$objformat
 
7385
  case $version_type in
 
7386
    freebsd-elf*)
 
7387
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
7388
      need_version=no
 
7389
      need_lib_prefix=no
 
7390
      ;;
 
7391
    freebsd-*)
 
7392
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
7393
      need_version=yes
 
7394
      ;;
 
7395
  esac
 
7396
  shlibpath_var=LD_LIBRARY_PATH
 
7397
  case $host_os in
 
7398
  freebsd2*)
 
7399
    shlibpath_overrides_runpath=yes
 
7400
    ;;
 
7401
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
7402
    shlibpath_overrides_runpath=yes
 
7403
    hardcode_into_libs=yes
 
7404
    ;;
 
7405
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
 
7406
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
 
7407
    shlibpath_overrides_runpath=no
 
7408
    hardcode_into_libs=yes
 
7409
    ;;
 
7410
  freebsd*) # from 4.6 on
 
7411
    shlibpath_overrides_runpath=yes
 
7412
    hardcode_into_libs=yes
 
7413
    ;;
 
7414
  esac
 
7415
  ;;
 
7416
 
 
7417
gnu*)
 
7418
  version_type=linux
 
7419
  need_lib_prefix=no
 
7420
  need_version=no
 
7421
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
7422
  soname_spec='${libname}${release}${shared_ext}$major'
 
7423
  shlibpath_var=LD_LIBRARY_PATH
 
7424
  hardcode_into_libs=yes
 
7425
  ;;
 
7426
 
 
7427
hpux9* | hpux10* | hpux11*)
 
7428
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
7429
  # link against other versions.
 
7430
  version_type=sunos
 
7431
  need_lib_prefix=no
 
7432
  need_version=no
 
7433
  case $host_cpu in
 
7434
  ia64*)
 
7435
    shrext_cmds='.so'
 
7436
    hardcode_into_libs=yes
 
7437
    dynamic_linker="$host_os dld.so"
 
7438
    shlibpath_var=LD_LIBRARY_PATH
 
7439
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
7440
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7441
    soname_spec='${libname}${release}${shared_ext}$major'
 
7442
    if test "X$HPUX_IA64_MODE" = X32; then
 
7443
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
7444
    else
 
7445
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
7446
    fi
 
7447
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
7448
    ;;
 
7449
   hppa*64*)
 
7450
     shrext_cmds='.sl'
 
7451
     hardcode_into_libs=yes
 
7452
     dynamic_linker="$host_os dld.sl"
 
7453
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
7454
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
7455
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7456
     soname_spec='${libname}${release}${shared_ext}$major'
 
7457
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
7458
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
7459
     ;;
 
7460
   *)
 
7461
    shrext_cmds='.sl'
 
7462
    dynamic_linker="$host_os dld.sl"
 
7463
    shlibpath_var=SHLIB_PATH
 
7464
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
7465
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7466
    soname_spec='${libname}${release}${shared_ext}$major'
 
7467
    ;;
 
7468
  esac
 
7469
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
7470
  postinstall_cmds='chmod 555 $lib'
 
7471
  ;;
 
7472
 
 
7473
interix3*)
 
7474
  version_type=linux
 
7475
  need_lib_prefix=no
 
7476
  need_version=no
 
7477
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
7478
  soname_spec='${libname}${release}${shared_ext}$major'
 
7479
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
 
7480
  shlibpath_var=LD_LIBRARY_PATH
 
7481
  shlibpath_overrides_runpath=no
 
7482
  hardcode_into_libs=yes
 
7483
  ;;
 
7484
 
 
7485
irix5* | irix6* | nonstopux*)
 
7486
  case $host_os in
 
7487
    nonstopux*) version_type=nonstopux ;;
 
7488
    *)
 
7489
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
7490
                version_type=linux
 
7491
        else
 
7492
                version_type=irix
 
7493
        fi ;;
 
7494
  esac
 
7495
  need_lib_prefix=no
 
7496
  need_version=no
 
7497
  soname_spec='${libname}${release}${shared_ext}$major'
 
7498
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
7499
  case $host_os in
 
7500
  irix5* | nonstopux*)
 
7501
    libsuff= shlibsuff=
 
7502
    ;;
 
7503
  *)
 
7504
    case $LD in # libtool.m4 will add one of these switches to LD
 
7505
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
7506
      libsuff= shlibsuff= libmagic=32-bit;;
 
7507
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
7508
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
7509
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
7510
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
7511
    *) libsuff= shlibsuff= libmagic=never-match;;
 
7512
    esac
 
7513
    ;;
 
7514
  esac
 
7515
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
7516
  shlibpath_overrides_runpath=no
 
7517
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
7518
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
7519
  hardcode_into_libs=yes
 
7520
  ;;
 
7521
 
 
7522
# No shared lib support for Linux oldld, aout, or coff.
 
7523
linux*oldld* | linux*aout* | linux*coff*)
 
7524
  dynamic_linker=no
 
7525
  ;;
 
7526
 
 
7527
# This must be Linux ELF.
 
7528
linux* | k*bsd*-gnu)
 
7529
  version_type=linux
 
7530
  need_lib_prefix=no
 
7531
  need_version=no
 
7532
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7533
  soname_spec='${libname}${release}${shared_ext}$major'
 
7534
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
7535
  shlibpath_var=LD_LIBRARY_PATH
 
7536
  shlibpath_overrides_runpath=no
 
7537
  # This implies no fast_install, which is unacceptable.
 
7538
  # Some rework will be needed to allow for fast_install
 
7539
  # before this can be enabled.
 
7540
  hardcode_into_libs=yes
 
7541
 
 
7542
  # Append ld.so.conf contents to the search path
 
7543
  if test -f /etc/ld.so.conf; then
 
7544
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
7545
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
7546
  fi
 
7547
 
 
7548
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
7549
  # powerpc, because MkLinux only supported shared libraries with the
 
7550
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
7551
  # most powerpc-linux boxes support dynamic linking these days and
 
7552
  # people can always --disable-shared, the test was removed, and we
 
7553
  # assume the GNU/Linux dynamic linker is in use.
 
7554
  dynamic_linker='GNU/Linux ld.so'
 
7555
  ;;
 
7556
 
 
7557
netbsdelf*-gnu)
 
7558
  version_type=linux
 
7559
  need_lib_prefix=no
 
7560
  need_version=no
 
7561
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
7562
  soname_spec='${libname}${release}${shared_ext}$major'
 
7563
  shlibpath_var=LD_LIBRARY_PATH
 
7564
  shlibpath_overrides_runpath=no
 
7565
  hardcode_into_libs=yes
 
7566
  dynamic_linker='NetBSD ld.elf_so'
 
7567
  ;;
 
7568
 
 
7569
netbsd*)
 
7570
  version_type=sunos
 
7571
  need_lib_prefix=no
 
7572
  need_version=no
 
7573
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
7574
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
7575
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
7576
    dynamic_linker='NetBSD (a.out) ld.so'
 
7577
  else
 
7578
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
7579
    soname_spec='${libname}${release}${shared_ext}$major'
 
7580
    dynamic_linker='NetBSD ld.elf_so'
 
7581
  fi
 
7582
  shlibpath_var=LD_LIBRARY_PATH
 
7583
  shlibpath_overrides_runpath=yes
 
7584
  hardcode_into_libs=yes
 
7585
  ;;
 
7586
 
 
7587
newsos6)
 
7588
  version_type=linux
 
7589
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7590
  shlibpath_var=LD_LIBRARY_PATH
 
7591
  shlibpath_overrides_runpath=yes
 
7592
  ;;
 
7593
 
 
7594
nto-qnx*)
 
7595
  version_type=linux
 
7596
  need_lib_prefix=no
 
7597
  need_version=no
 
7598
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7599
  soname_spec='${libname}${release}${shared_ext}$major'
 
7600
  shlibpath_var=LD_LIBRARY_PATH
 
7601
  shlibpath_overrides_runpath=yes
 
7602
  ;;
 
7603
 
 
7604
openbsd*)
 
7605
  version_type=sunos
 
7606
  sys_lib_dlsearch_path_spec="/usr/lib"
 
7607
  need_lib_prefix=no
 
7608
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
7609
  case $host_os in
 
7610
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
 
7611
    *)                         need_version=no  ;;
 
7612
  esac
 
7613
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
7614
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
7615
  shlibpath_var=LD_LIBRARY_PATH
 
7616
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
7617
    case $host_os in
 
7618
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
7619
        shlibpath_overrides_runpath=no
 
7620
        ;;
 
7621
      *)
 
7622
        shlibpath_overrides_runpath=yes
 
7623
        ;;
 
7624
      esac
 
7625
  else
 
7626
    shlibpath_overrides_runpath=yes
 
7627
  fi
 
7628
  ;;
 
7629
 
 
7630
os2*)
 
7631
  libname_spec='$name'
 
7632
  shrext_cmds=".dll"
 
7633
  need_lib_prefix=no
 
7634
  library_names_spec='$libname${shared_ext} $libname.a'
 
7635
  dynamic_linker='OS/2 ld.exe'
 
7636
  shlibpath_var=LIBPATH
 
7637
  ;;
 
7638
 
 
7639
osf3* | osf4* | osf5*)
 
7640
  version_type=osf
 
7641
  need_lib_prefix=no
 
7642
  need_version=no
 
7643
  soname_spec='${libname}${release}${shared_ext}$major'
 
7644
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7645
  shlibpath_var=LD_LIBRARY_PATH
 
7646
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
7647
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
7648
  ;;
 
7649
 
 
7650
solaris*)
 
7651
  version_type=linux
 
7652
  need_lib_prefix=no
 
7653
  need_version=no
 
7654
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7655
  soname_spec='${libname}${release}${shared_ext}$major'
 
7656
  shlibpath_var=LD_LIBRARY_PATH
 
7657
  shlibpath_overrides_runpath=yes
 
7658
  hardcode_into_libs=yes
 
7659
  # ldd complains unless libraries are executable
 
7660
  postinstall_cmds='chmod +x $lib'
 
7661
  ;;
 
7662
 
 
7663
sunos4*)
 
7664
  version_type=sunos
 
7665
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
7666
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
7667
  shlibpath_var=LD_LIBRARY_PATH
 
7668
  shlibpath_overrides_runpath=yes
 
7669
  if test "$with_gnu_ld" = yes; then
 
7670
    need_lib_prefix=no
 
7671
  fi
 
7672
  need_version=yes
 
7673
  ;;
 
7674
 
 
7675
sysv4 | sysv4.3*)
 
7676
  version_type=linux
 
7677
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7678
  soname_spec='${libname}${release}${shared_ext}$major'
 
7679
  shlibpath_var=LD_LIBRARY_PATH
 
7680
  case $host_vendor in
 
7681
    sni)
 
7682
      shlibpath_overrides_runpath=no
 
7683
      need_lib_prefix=no
 
7684
      export_dynamic_flag_spec='${wl}-Blargedynsym'
 
7685
      runpath_var=LD_RUN_PATH
 
7686
      ;;
 
7687
    siemens)
 
7688
      need_lib_prefix=no
 
7689
      ;;
 
7690
    motorola)
 
7691
      need_lib_prefix=no
 
7692
      need_version=no
 
7693
      shlibpath_overrides_runpath=no
 
7694
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
7695
      ;;
 
7696
  esac
 
7697
  ;;
 
7698
 
 
7699
sysv4*MP*)
 
7700
  if test -d /usr/nec ;then
 
7701
    version_type=linux
 
7702
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
7703
    soname_spec='$libname${shared_ext}.$major'
 
7704
    shlibpath_var=LD_LIBRARY_PATH
 
7705
  fi
 
7706
  ;;
 
7707
 
 
7708
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
7709
  version_type=freebsd-elf
 
7710
  need_lib_prefix=no
 
7711
  need_version=no
 
7712
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
7713
  soname_spec='${libname}${release}${shared_ext}$major'
 
7714
  shlibpath_var=LD_LIBRARY_PATH
 
7715
  hardcode_into_libs=yes
 
7716
  if test "$with_gnu_ld" = yes; then
 
7717
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
 
7718
    shlibpath_overrides_runpath=no
 
7719
  else
 
7720
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
 
7721
    shlibpath_overrides_runpath=yes
 
7722
    case $host_os in
 
7723
      sco3.2v5*)
 
7724
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
 
7725
        ;;
 
7726
    esac
 
7727
  fi
 
7728
  sys_lib_dlsearch_path_spec='/usr/lib'
 
7729
  ;;
 
7730
 
 
7731
uts4*)
 
7732
  version_type=linux
 
7733
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
7734
  soname_spec='${libname}${release}${shared_ext}$major'
 
7735
  shlibpath_var=LD_LIBRARY_PATH
 
7736
  ;;
 
7737
 
 
7738
*)
 
7739
  dynamic_linker=no
 
7740
  ;;
 
7741
esac
 
7742
AC_MSG_RESULT([$dynamic_linker])
 
7743
test "$dynamic_linker" = no && can_build_shared=no
 
7744
 
 
7745
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
7746
if test "$GCC" = yes; then
 
7747
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
7748
fi
 
7749
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
7750
 
 
7751
 
 
7752
# _LT_AC_TAGCONFIG
 
7753
# ----------------
 
7754
AC_DEFUN([_LT_AC_TAGCONFIG],
 
7755
[AC_ARG_WITH([tags],
 
7756
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
 
7757
        [include additional configurations @<:@automatic@:>@])],
 
7758
    [tagnames="$withval"])
 
7759
 
 
7760
if test -f "$ltmain" && test -n "$tagnames"; then
 
7761
  if test ! -f "${ofile}"; then
 
7762
    AC_MSG_WARN([output file `$ofile' does not exist])
 
7763
  fi
 
7764
 
 
7765
  if test -z "$LTCC"; then
 
7766
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
7767
    if test -z "$LTCC"; then
 
7768
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
 
7769
    else
 
7770
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
7771
    fi
 
7772
  fi
 
7773
  if test -z "$LTCFLAGS"; then
 
7774
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
 
7775
  fi
 
7776
 
 
7777
  # Extract list of available tagged configurations in $ofile.
 
7778
  # Note that this assumes the entire list is on one line.
 
7779
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
7780
 
 
7781
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7782
  for tagname in $tagnames; do
 
7783
    IFS="$lt_save_ifs"
 
7784
    # Check whether tagname contains only valid characters
 
7785
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
7786
    "") ;;
 
7787
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
7788
        ;;
 
7789
    esac
 
7790
 
 
7791
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
7792
    then
 
7793
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
7794
    fi
 
7795
 
 
7796
    # Update the list of available tags.
 
7797
    if test -n "$tagname"; then
 
7798
      echo appending configuration tag \"$tagname\" to $ofile
 
7799
 
 
7800
      case $tagname in
 
7801
      CXX)
 
7802
        if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
7803
            ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
7804
            (test "X$CXX" != "Xg++"))) ; then
 
7805
          AC_LIBTOOL_LANG_CXX_CONFIG
 
7806
        else
 
7807
          tagname=""
 
7808
        fi
 
7809
        ;;
 
7810
 
 
7811
      F77)
 
7812
        if test -n "$F77" && test "X$F77" != "Xno"; then
 
7813
          AC_LIBTOOL_LANG_F77_CONFIG
 
7814
        else
 
7815
          tagname=""
 
7816
        fi
 
7817
        ;;
 
7818
 
 
7819
      GCJ)
 
7820
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
7821
          AC_LIBTOOL_LANG_GCJ_CONFIG
 
7822
        else
 
7823
          tagname=""
 
7824
        fi
 
7825
        ;;
 
7826
 
 
7827
      RC)
 
7828
        AC_LIBTOOL_LANG_RC_CONFIG
 
7829
        ;;
 
7830
 
 
7831
      *)
 
7832
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
7833
        ;;
 
7834
      esac
 
7835
 
 
7836
      # Append the new tag name to the list of available tags.
 
7837
      if test -n "$tagname" ; then
 
7838
      available_tags="$available_tags $tagname"
 
7839
    fi
 
7840
    fi
 
7841
  done
 
7842
  IFS="$lt_save_ifs"
 
7843
 
 
7844
  # Now substitute the updated list of available tags.
 
7845
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
7846
    mv "${ofile}T" "$ofile"
 
7847
    chmod +x "$ofile"
 
7848
  else
 
7849
    rm -f "${ofile}T"
 
7850
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
7851
  fi
 
7852
fi
 
7853
])# _LT_AC_TAGCONFIG
 
7854
 
 
7855
 
 
7856
# AC_LIBTOOL_DLOPEN
 
7857
# -----------------
 
7858
# enable checks for dlopen support
 
7859
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
7860
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
7861
])# AC_LIBTOOL_DLOPEN
 
7862
 
 
7863
 
 
7864
# AC_LIBTOOL_WIN32_DLL
 
7865
# --------------------
 
7866
# declare package support for building win32 DLLs
 
7867
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
7868
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
7869
])# AC_LIBTOOL_WIN32_DLL
 
7870
 
 
7871
 
 
7872
# AC_ENABLE_SHARED([DEFAULT])
 
7873
# ---------------------------
 
7874
# implement the --enable-shared flag
 
7875
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
7876
AC_DEFUN([AC_ENABLE_SHARED],
 
7877
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
7878
AC_ARG_ENABLE([shared],
 
7879
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
7880
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
7881
    [p=${PACKAGE-default}
 
7882
    case $enableval in
 
7883
    yes) enable_shared=yes ;;
 
7884
    no) enable_shared=no ;;
 
7885
    *)
 
7886
      enable_shared=no
 
7887
      # Look at the argument we got.  We use all the common list separators.
 
7888
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7889
      for pkg in $enableval; do
 
7890
        IFS="$lt_save_ifs"
 
7891
        if test "X$pkg" = "X$p"; then
 
7892
          enable_shared=yes
 
7893
        fi
 
7894
      done
 
7895
      IFS="$lt_save_ifs"
 
7896
      ;;
 
7897
    esac],
 
7898
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
7899
])# AC_ENABLE_SHARED
 
7900
 
 
7901
 
 
7902
# AC_DISABLE_SHARED
 
7903
# -----------------
 
7904
# set the default shared flag to --disable-shared
 
7905
AC_DEFUN([AC_DISABLE_SHARED],
 
7906
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7907
AC_ENABLE_SHARED(no)
 
7908
])# AC_DISABLE_SHARED
 
7909
 
 
7910
 
 
7911
# AC_ENABLE_STATIC([DEFAULT])
 
7912
# ---------------------------
 
7913
# implement the --enable-static flag
 
7914
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
7915
AC_DEFUN([AC_ENABLE_STATIC],
 
7916
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
7917
AC_ARG_ENABLE([static],
 
7918
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
7919
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
7920
    [p=${PACKAGE-default}
 
7921
    case $enableval in
 
7922
    yes) enable_static=yes ;;
 
7923
    no) enable_static=no ;;
 
7924
    *)
 
7925
     enable_static=no
 
7926
      # Look at the argument we got.  We use all the common list separators.
 
7927
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7928
      for pkg in $enableval; do
 
7929
        IFS="$lt_save_ifs"
 
7930
        if test "X$pkg" = "X$p"; then
 
7931
          enable_static=yes
 
7932
        fi
 
7933
      done
 
7934
      IFS="$lt_save_ifs"
 
7935
      ;;
 
7936
    esac],
 
7937
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
7938
])# AC_ENABLE_STATIC
 
7939
 
 
7940
 
 
7941
# AC_DISABLE_STATIC
 
7942
# -----------------
 
7943
# set the default static flag to --disable-static
 
7944
AC_DEFUN([AC_DISABLE_STATIC],
 
7945
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7946
AC_ENABLE_STATIC(no)
 
7947
])# AC_DISABLE_STATIC
 
7948
 
 
7949
 
 
7950
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
7951
# ---------------------------------
 
7952
# implement the --enable-fast-install flag
 
7953
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
7954
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
7955
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
7956
AC_ARG_ENABLE([fast-install],
 
7957
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
7958
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
7959
    [p=${PACKAGE-default}
 
7960
    case $enableval in
 
7961
    yes) enable_fast_install=yes ;;
 
7962
    no) enable_fast_install=no ;;
 
7963
    *)
 
7964
      enable_fast_install=no
 
7965
      # Look at the argument we got.  We use all the common list separators.
 
7966
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7967
      for pkg in $enableval; do
 
7968
        IFS="$lt_save_ifs"
 
7969
        if test "X$pkg" = "X$p"; then
 
7970
          enable_fast_install=yes
 
7971
        fi
 
7972
      done
 
7973
      IFS="$lt_save_ifs"
 
7974
      ;;
 
7975
    esac],
 
7976
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
7977
])# AC_ENABLE_FAST_INSTALL
 
7978
 
 
7979
 
 
7980
# AC_DISABLE_FAST_INSTALL
 
7981
# -----------------------
 
7982
# set the default to --disable-fast-install
 
7983
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
7984
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7985
AC_ENABLE_FAST_INSTALL(no)
 
7986
])# AC_DISABLE_FAST_INSTALL
 
7987
 
 
7988
 
 
7989
# AC_LIBTOOL_PICMODE([MODE])
 
7990
# --------------------------
 
7991
# implement the --with-pic flag
 
7992
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
7993
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
7994
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7995
pic_mode=ifelse($#,1,$1,default)
 
7996
])# AC_LIBTOOL_PICMODE
 
7997
 
 
7998
 
 
7999
# AC_PROG_EGREP
 
8000
# -------------
 
8001
# This is predefined starting with Autoconf 2.54, so this conditional
 
8002
# definition can be removed once we require Autoconf 2.54 or later.
 
8003
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 
8004
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 
8005
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
8006
    then ac_cv_prog_egrep='grep -E'
 
8007
    else ac_cv_prog_egrep='egrep'
 
8008
    fi])
 
8009
 EGREP=$ac_cv_prog_egrep
 
8010
 AC_SUBST([EGREP])
 
8011
])])
 
8012
 
 
8013
 
 
8014
# AC_PATH_TOOL_PREFIX
 
8015
# -------------------
 
8016
# find a file program which can recognise shared library
 
8017
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
8018
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
8019
AC_MSG_CHECKING([for $1])
 
8020
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
8021
[case $MAGIC_CMD in
 
8022
[[\\/*] |  ?:[\\/]*])
 
8023
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
8024
  ;;
 
8025
*)
 
8026
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
8027
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
8028
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
8029
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
8030
dnl not every word.  This closes a longstanding sh security hole.
 
8031
  ac_dummy="ifelse([$2], , $PATH, [$2])"
 
8032
  for ac_dir in $ac_dummy; do
 
8033
    IFS="$lt_save_ifs"
 
8034
    test -z "$ac_dir" && ac_dir=.
 
8035
    if test -f $ac_dir/$1; then
 
8036
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
8037
      if test -n "$file_magic_test_file"; then
 
8038
        case $deplibs_check_method in
 
8039
        "file_magic "*)
 
8040
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
8041
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
8042
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
8043
            $EGREP "$file_magic_regex" > /dev/null; then
 
8044
            :
 
8045
          else
 
8046
            cat <<EOF 1>&2
 
8047
 
 
8048
*** Warning: the command libtool uses to detect shared libraries,
 
8049
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
8050
*** The result is that libtool may fail to recognize shared libraries
 
8051
*** as such.  This will affect the creation of libtool libraries that
 
8052
*** depend on shared libraries, but programs linked with such libtool
 
8053
*** libraries will work regardless of this problem.  Nevertheless, you
 
8054
*** may want to report the problem to your system manager and/or to
 
8055
*** bug-libtool@gnu.org
 
8056
 
 
8057
EOF
 
8058
          fi ;;
 
8059
        esac
 
8060
      fi
 
8061
      break
 
8062
    fi
 
8063
  done
 
8064
  IFS="$lt_save_ifs"
 
8065
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
8066
  ;;
 
8067
esac])
 
8068
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
8069
if test -n "$MAGIC_CMD"; then
 
8070
  AC_MSG_RESULT($MAGIC_CMD)
 
8071
else
 
8072
  AC_MSG_RESULT(no)
 
8073
fi
 
8074
])# AC_PATH_TOOL_PREFIX
 
8075
 
 
8076
 
 
8077
# AC_PATH_MAGIC
 
8078
# -------------
 
8079
# find a file program which can recognise a shared library
 
8080
AC_DEFUN([AC_PATH_MAGIC],
 
8081
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
8082
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
8083
  if test -n "$ac_tool_prefix"; then
 
8084
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
8085
  else
 
8086
    MAGIC_CMD=:
 
8087
  fi
 
8088
fi
 
8089
])# AC_PATH_MAGIC
 
8090
 
 
8091
 
 
8092
# AC_PROG_LD
 
8093
# ----------
 
8094
# find the pathname to the GNU or non-GNU linker
 
8095
AC_DEFUN([AC_PROG_LD],
 
8096
[AC_ARG_WITH([gnu-ld],
 
8097
    [AC_HELP_STRING([--with-gnu-ld],
 
8098
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
8099
    [test "$withval" = no || with_gnu_ld=yes],
 
8100
    [with_gnu_ld=no])
 
8101
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
8102
AC_REQUIRE([AC_PROG_CC])dnl
 
8103
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
8104
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
8105
ac_prog=ld
 
8106
if test "$GCC" = yes; then
 
8107
  # Check if gcc -print-prog-name=ld gives a path.
 
8108
  AC_MSG_CHECKING([for ld used by $CC])
 
8109
  case $host in
 
8110
  *-*-mingw*)
 
8111
    # gcc leaves a trailing carriage return which upsets mingw
 
8112
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
8113
  *)
 
8114
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
8115
  esac
 
8116
  case $ac_prog in
 
8117
    # Accept absolute paths.
 
8118
    [[\\/]]* | ?:[[\\/]]*)
 
8119
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
8120
      # Canonicalize the pathname of ld
 
8121
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
 
8122
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
8123
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
 
8124
      done
 
8125
      test -z "$LD" && LD="$ac_prog"
 
8126
      ;;
 
8127
  "")
 
8128
    # If it fails, then pretend we aren't using GCC.
 
8129
    ac_prog=ld
 
8130
    ;;
 
8131
  *)
 
8132
    # If it is relative, then search for the first ld in PATH.
 
8133
    with_gnu_ld=unknown
 
8134
    ;;
 
8135
  esac
 
8136
elif test "$with_gnu_ld" = yes; then
 
8137
  AC_MSG_CHECKING([for GNU ld])
 
8138
else
 
8139
  AC_MSG_CHECKING([for non-GNU ld])
 
8140
fi
 
8141
AC_CACHE_VAL(lt_cv_path_LD,
 
8142
[if test -z "$LD"; then
 
8143
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
8144
  for ac_dir in $PATH; do
 
8145
    IFS="$lt_save_ifs"
 
8146
    test -z "$ac_dir" && ac_dir=.
 
8147
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
8148
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
8149
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
8150
      # but apparently some variants of GNU ld only accept -v.
 
8151
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
8152
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
8153
      *GNU* | *'with BFD'*)
 
8154
        test "$with_gnu_ld" != no && break
 
8155
        ;;
 
8156
      *)
 
8157
        test "$with_gnu_ld" != yes && break
 
8158
        ;;
 
8159
      esac
 
8160
    fi
 
8161
  done
 
8162
  IFS="$lt_save_ifs"
 
8163
else
 
8164
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
8165
fi])
 
8166
LD="$lt_cv_path_LD"
 
8167
if test -n "$LD"; then
 
8168
  AC_MSG_RESULT($LD)
 
8169
else
 
8170
  AC_MSG_RESULT(no)
 
8171
fi
 
8172
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
8173
AC_PROG_LD_GNU
 
8174
])# AC_PROG_LD
 
8175
 
 
8176
 
 
8177
# AC_PROG_LD_GNU
 
8178
# --------------
 
8179
AC_DEFUN([AC_PROG_LD_GNU],
 
8180
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
8181
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
8182
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 
8183
case `$LD -v 2>&1 </dev/null` in
 
8184
*GNU* | *'with BFD'*)
 
8185
  lt_cv_prog_gnu_ld=yes
 
8186
  ;;
 
8187
*)
 
8188
  lt_cv_prog_gnu_ld=no
 
8189
  ;;
 
8190
esac])
 
8191
with_gnu_ld=$lt_cv_prog_gnu_ld
 
8192
])# AC_PROG_LD_GNU
 
8193
 
 
8194
 
 
8195
# AC_PROG_LD_RELOAD_FLAG
 
8196
# ----------------------
 
8197
# find reload flag for linker
 
8198
#   -- PORTME Some linkers may need a different reload flag.
 
8199
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
8200
[AC_CACHE_CHECK([for $LD option to reload object files],
 
8201
  lt_cv_ld_reload_flag,
 
8202
  [lt_cv_ld_reload_flag='-r'])
 
8203
reload_flag=$lt_cv_ld_reload_flag
 
8204
case $reload_flag in
 
8205
"" | " "*) ;;
 
8206
*) reload_flag=" $reload_flag" ;;
 
8207
esac
 
8208
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
8209
case $host_os in
 
8210
  darwin*)
 
8211
    if test "$GCC" = yes; then
 
8212
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
 
8213
    else
 
8214
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
8215
    fi
 
8216
    ;;
 
8217
esac
 
8218
])# AC_PROG_LD_RELOAD_FLAG
 
8219
 
 
8220
 
 
8221
# AC_DEPLIBS_CHECK_METHOD
 
8222
# -----------------------
 
8223
# how to check for library dependencies
 
8224
#  -- PORTME fill in with the dynamic library characteristics
 
8225
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
8226
[AC_CACHE_CHECK([how to recognise dependent libraries],
 
8227
lt_cv_deplibs_check_method,
 
8228
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
8229
lt_cv_file_magic_test_file=
 
8230
lt_cv_deplibs_check_method='unknown'
 
8231
# Need to set the preceding variable on all platforms that support
 
8232
# interlibrary dependencies.
 
8233
# 'none' -- dependencies not supported.
 
8234
# `unknown' -- same as none, but documents that we really don't know.
 
8235
# 'pass_all' -- all dependencies passed with no checks.
 
8236
# 'test_compile' -- check by making test program.
 
8237
# 'file_magic [[regex]]' -- check by looking for files in library path
 
8238
# which responds to the $file_magic_cmd with a given extended regex.
 
8239
# If you have `file' or equivalent on your system and you're not sure
 
8240
# whether `pass_all' will *always* work, you probably want this one.
 
8241
 
 
8242
case $host_os in
 
8243
aix4* | aix5*)
 
8244
  lt_cv_deplibs_check_method=pass_all
 
8245
  ;;
 
8246
 
 
8247
beos*)
 
8248
  lt_cv_deplibs_check_method=pass_all
 
8249
  ;;
 
8250
 
 
8251
bsdi[[45]]*)
 
8252
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
8253
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
8254
  lt_cv_file_magic_test_file=/shlib/libc.so
 
8255
  ;;
 
8256
 
 
8257
cygwin*)
 
8258
  # func_win32_libid is a shell function defined in ltmain.sh
 
8259
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
8260
  lt_cv_file_magic_cmd='func_win32_libid'
 
8261
  ;;
 
8262
 
 
8263
mingw* | pw32*)
 
8264
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
8265
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
 
8266
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
8267
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
8268
  ;;
 
8269
 
 
8270
darwin* | rhapsody*)
 
8271
  lt_cv_deplibs_check_method=pass_all
 
8272
  ;;
 
8273
 
 
8274
freebsd* | dragonfly*)
 
8275
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
8276
    case $host_cpu in
 
8277
    i*86 )
 
8278
      # Not sure whether the presence of OpenBSD here was a mistake.
 
8279
      # Let's accept both of them until this is cleared up.
 
8280
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
8281
      lt_cv_file_magic_cmd=/usr/bin/file
 
8282
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
8283
      ;;
 
8284
    esac
 
8285
  else
 
8286
    lt_cv_deplibs_check_method=pass_all
 
8287
  fi
 
8288
  ;;
 
8289
 
 
8290
gnu*)
 
8291
  lt_cv_deplibs_check_method=pass_all
 
8292
  ;;
 
8293
 
 
8294
hpux10.20* | hpux11*)
 
8295
  lt_cv_file_magic_cmd=/usr/bin/file
 
8296
  case $host_cpu in
 
8297
  ia64*)
 
8298
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
8299
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
8300
    ;;
 
8301
  hppa*64*)
 
8302
    [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]']
 
8303
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
8304
    ;;
 
8305
  *)
 
8306
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
8307
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
8308
    ;;
 
8309
  esac
 
8310
  ;;
 
8311
 
 
8312
interix3*)
 
8313
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
 
8314
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
 
8315
  ;;
 
8316
 
 
8317
irix5* | irix6* | nonstopux*)
 
8318
  case $LD in
 
8319
  *-32|*"-32 ") libmagic=32-bit;;
 
8320
  *-n32|*"-n32 ") libmagic=N32;;
 
8321
  *-64|*"-64 ") libmagic=64-bit;;
 
8322
  *) libmagic=never-match;;
 
8323
  esac
 
8324
  lt_cv_deplibs_check_method=pass_all
 
8325
  ;;
 
8326
 
 
8327
# This must be Linux ELF.
 
8328
linux* | k*bsd*-gnu)
 
8329
  lt_cv_deplibs_check_method=pass_all
 
8330
  ;;
 
8331
 
 
8332
netbsd* | netbsdelf*-gnu)
 
8333
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
8334
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
8335
  else
 
8336
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
8337
  fi
 
8338
  ;;
 
8339
 
 
8340
newos6*)
 
8341
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
8342
  lt_cv_file_magic_cmd=/usr/bin/file
 
8343
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
8344
  ;;
 
8345
 
 
8346
nto-qnx*)
 
8347
  lt_cv_deplibs_check_method=unknown
 
8348
  ;;
 
8349
 
 
8350
openbsd*)
 
8351
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
8352
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
8353
  else
 
8354
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
8355
  fi
 
8356
  ;;
 
8357
 
 
8358
osf3* | osf4* | osf5*)
 
8359
  lt_cv_deplibs_check_method=pass_all
 
8360
  ;;
 
8361
 
 
8362
solaris*)
 
8363
  lt_cv_deplibs_check_method=pass_all
 
8364
  ;;
 
8365
 
 
8366
sysv4 | sysv4.3*)
 
8367
  case $host_vendor in
 
8368
  motorola)
 
8369
    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]]'
 
8370
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
8371
    ;;
 
8372
  ncr)
 
8373
    lt_cv_deplibs_check_method=pass_all
 
8374
    ;;
 
8375
  sequent)
 
8376
    lt_cv_file_magic_cmd='/bin/file'
 
8377
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
8378
    ;;
 
8379
  sni)
 
8380
    lt_cv_file_magic_cmd='/bin/file'
 
8381
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
8382
    lt_cv_file_magic_test_file=/lib/libc.so
 
8383
    ;;
 
8384
  siemens)
 
8385
    lt_cv_deplibs_check_method=pass_all
 
8386
    ;;
 
8387
  pc)
 
8388
    lt_cv_deplibs_check_method=pass_all
 
8389
    ;;
 
8390
  esac
 
8391
  ;;
 
8392
 
 
8393
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
8394
  lt_cv_deplibs_check_method=pass_all
 
8395
  ;;
 
8396
esac
 
8397
])
 
8398
file_magic_cmd=$lt_cv_file_magic_cmd
 
8399
deplibs_check_method=$lt_cv_deplibs_check_method
 
8400
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
8401
])# AC_DEPLIBS_CHECK_METHOD
 
8402
 
 
8403
 
 
8404
# AC_PROG_NM
 
8405
# ----------
 
8406
# find the pathname to a BSD-compatible name lister
 
8407
AC_DEFUN([AC_PROG_NM],
 
8408
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
 
8409
[if test -n "$NM"; then
 
8410
  # Let the user override the test.
 
8411
  lt_cv_path_NM="$NM"
 
8412
else
 
8413
  lt_nm_to_check="${ac_tool_prefix}nm"
 
8414
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
 
8415
    lt_nm_to_check="$lt_nm_to_check nm"
 
8416
  fi
 
8417
  for lt_tmp_nm in $lt_nm_to_check; do
 
8418
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
8419
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
 
8420
      IFS="$lt_save_ifs"
 
8421
      test -z "$ac_dir" && ac_dir=.
 
8422
      tmp_nm="$ac_dir/$lt_tmp_nm"
 
8423
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
8424
        # Check to see if the nm accepts a BSD-compat flag.
 
8425
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
8426
        #   nm: unknown option "B" ignored
 
8427
        # Tru64's nm complains that /dev/null is an invalid object file
 
8428
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
8429
        */dev/null* | *'Invalid file or object type'*)
 
8430
          lt_cv_path_NM="$tmp_nm -B"
 
8431
          break
 
8432
          ;;
 
8433
        *)
 
8434
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
8435
          */dev/null*)
 
8436
            lt_cv_path_NM="$tmp_nm -p"
 
8437
            break
 
8438
            ;;
 
8439
          *)
 
8440
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
8441
            continue # so that we can try to find one that supports BSD flags
 
8442
            ;;
 
8443
          esac
 
8444
          ;;
 
8445
        esac
 
8446
      fi
 
8447
    done
 
8448
    IFS="$lt_save_ifs"
 
8449
  done
 
8450
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
8451
fi])
 
8452
NM="$lt_cv_path_NM"
 
8453
])# AC_PROG_NM
 
8454
 
 
8455
 
 
8456
# AC_CHECK_LIBM
 
8457
# -------------
 
8458
# check for math library
 
8459
AC_DEFUN([AC_CHECK_LIBM],
 
8460
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
8461
LIBM=
 
8462
case $host in
 
8463
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
8464
  # These system don't have libm, or don't need it
 
8465
  ;;
 
8466
*-ncr-sysv4.3*)
 
8467
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
8468
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
8469
  ;;
 
8470
*)
 
8471
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
8472
  ;;
 
8473
esac
 
8474
])# AC_CHECK_LIBM
 
8475
 
 
8476
 
 
8477
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
8478
# -----------------------------------
 
8479
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
8480
# LTDLINCL to the include flags for the libltdl header and adds
 
8481
# --enable-ltdl-convenience to the configure arguments.  Note that
 
8482
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
8483
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
 
8484
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
 
8485
# (note the single quotes!).  If your package is not flat and you're not
 
8486
# using automake, define top_builddir and top_srcdir appropriately in
 
8487
# the Makefiles.
 
8488
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
8489
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
8490
  case $enable_ltdl_convenience in
 
8491
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 
8492
  "") enable_ltdl_convenience=yes
 
8493
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 
8494
  esac
 
8495
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 
8496
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
8497
  # For backwards non-gettext consistent compatibility...
 
8498
  INCLTDL="$LTDLINCL"
 
8499
])# AC_LIBLTDL_CONVENIENCE
 
8500
 
 
8501
 
 
8502
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
8503
# -----------------------------------
 
8504
# sets LIBLTDL to the link flags for the libltdl installable library and
 
8505
# LTDLINCL to the include flags for the libltdl header and adds
 
8506
# --enable-ltdl-install to the configure arguments.  Note that
 
8507
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
8508
# and an installed libltdl is not found, it is assumed to be `libltdl'.
 
8509
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
 
8510
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
8511
# flat and you're not using automake, define top_builddir and top_srcdir
 
8512
# appropriately in the Makefiles.
 
8513
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 
8514
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
8515
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
8516
  AC_CHECK_LIB(ltdl, lt_dlinit,
 
8517
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 
8518
  [if test x"$enable_ltdl_install" = xno; then
 
8519
     AC_MSG_WARN([libltdl not installed, but installation disabled])
 
8520
   else
 
8521
     enable_ltdl_install=yes
 
8522
   fi
 
8523
  ])
 
8524
  if test x"$enable_ltdl_install" = x"yes"; then
 
8525
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
 
8526
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 
8527
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
8528
  else
 
8529
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
8530
    LIBLTDL="-lltdl"
 
8531
    LTDLINCL=
 
8532
  fi
 
8533
  # For backwards non-gettext consistent compatibility...
 
8534
  INCLTDL="$LTDLINCL"
 
8535
])# AC_LIBLTDL_INSTALLABLE
 
8536
 
 
8537
 
 
8538
# AC_LIBTOOL_CXX
 
8539
# --------------
 
8540
# enable support for C++ libraries
 
8541
AC_DEFUN([AC_LIBTOOL_CXX],
 
8542
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
8543
])# AC_LIBTOOL_CXX
 
8544
 
 
8545
 
 
8546
# _LT_AC_LANG_CXX
 
8547
# ---------------
 
8548
AC_DEFUN([_LT_AC_LANG_CXX],
 
8549
[AC_REQUIRE([AC_PROG_CXX])
 
8550
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
8551
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
 
8552
])# _LT_AC_LANG_CXX
 
8553
 
 
8554
# _LT_AC_PROG_CXXCPP
 
8555
# ------------------
 
8556
AC_DEFUN([_LT_AC_PROG_CXXCPP],
 
8557
[
 
8558
AC_REQUIRE([AC_PROG_CXX])
 
8559
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
8560
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
8561
    (test "X$CXX" != "Xg++"))) ; then
 
8562
  AC_PROG_CXXCPP
 
8563
fi
 
8564
])# _LT_AC_PROG_CXXCPP
 
8565
 
 
8566
# AC_LIBTOOL_F77
 
8567
# --------------
 
8568
# enable support for Fortran 77 libraries
 
8569
AC_DEFUN([AC_LIBTOOL_F77],
 
8570
[AC_REQUIRE([_LT_AC_LANG_F77])
 
8571
])# AC_LIBTOOL_F77
 
8572
 
 
8573
 
 
8574
# _LT_AC_LANG_F77
 
8575
# ---------------
 
8576
AC_DEFUN([_LT_AC_LANG_F77],
 
8577
[AC_REQUIRE([AC_PROG_F77])
 
8578
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
 
8579
])# _LT_AC_LANG_F77
 
8580
 
 
8581
 
 
8582
# AC_LIBTOOL_GCJ
 
8583
# --------------
 
8584
# enable support for GCJ libraries
 
8585
AC_DEFUN([AC_LIBTOOL_GCJ],
 
8586
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
8587
])# AC_LIBTOOL_GCJ
 
8588
 
 
8589
 
 
8590
# _LT_AC_LANG_GCJ
 
8591
# ---------------
 
8592
AC_DEFUN([_LT_AC_LANG_GCJ],
 
8593
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
8594
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
 
8595
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
 
8596
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
 
8597
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
8598
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
8599
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
 
8600
])# _LT_AC_LANG_GCJ
 
8601
 
 
8602
 
 
8603
# AC_LIBTOOL_RC
 
8604
# -------------
 
8605
# enable support for Windows resource files
 
8606
AC_DEFUN([AC_LIBTOOL_RC],
 
8607
[AC_REQUIRE([LT_AC_PROG_RC])
 
8608
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
 
8609
])# AC_LIBTOOL_RC
 
8610
 
 
8611
 
 
8612
# AC_LIBTOOL_LANG_C_CONFIG
 
8613
# ------------------------
 
8614
# Ensure that the configuration vars for the C compiler are
 
8615
# suitably defined.  Those variables are subsequently used by
 
8616
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
8617
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
8618
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
8619
[lt_save_CC="$CC"
 
8620
AC_LANG_PUSH(C)
 
8621
 
 
8622
# Source file extension for C test sources.
 
8623
ac_ext=c
 
8624
 
 
8625
# Object file extension for compiled C test sources.
 
8626
objext=o
 
8627
_LT_AC_TAGVAR(objext, $1)=$objext
 
8628
 
 
8629
# Code to be used in simple compile tests
 
8630
lt_simple_compile_test_code="int some_variable = 0;\n"
 
8631
 
 
8632
# Code to be used in simple link tests
 
8633
lt_simple_link_test_code='int main(){return(0);}\n'
 
8634
 
 
8635
_LT_AC_SYS_COMPILER
 
8636
 
 
8637
# save warnings/boilerplate of simple test code
 
8638
_LT_COMPILER_BOILERPLATE
 
8639
_LT_LINKER_BOILERPLATE
 
8640
 
 
8641
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
8642
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
8643
AC_LIBTOOL_PROG_CC_C_O($1)
 
8644
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
8645
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
8646
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
8647
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
8648
AC_LIBTOOL_SYS_LIB_STRIP
 
8649
AC_LIBTOOL_DLOPEN_SELF
 
8650
 
 
8651
# Report which library types will actually be built
 
8652
AC_MSG_CHECKING([if libtool supports shared libraries])
 
8653
AC_MSG_RESULT([$can_build_shared])
 
8654
 
 
8655
AC_MSG_CHECKING([whether to build shared libraries])
 
8656
test "$can_build_shared" = "no" && enable_shared=no
 
8657
 
 
8658
# On AIX, shared libraries and static libraries use the same namespace, and
 
8659
# are all built from PIC.
 
8660
case $host_os in
 
8661
aix3*)
 
8662
  test "$enable_shared" = yes && enable_static=no
 
8663
  if test -n "$RANLIB"; then
 
8664
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
8665
    postinstall_cmds='$RANLIB $lib'
 
8666
  fi
 
8667
  ;;
 
8668
 
 
8669
aix4* | aix5*)
 
8670
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
8671
    test "$enable_shared" = yes && enable_static=no
 
8672
  fi
 
8673
    ;;
 
8674
esac
 
8675
AC_MSG_RESULT([$enable_shared])
 
8676
 
 
8677
AC_MSG_CHECKING([whether to build static libraries])
 
8678
# Make sure either enable_shared or enable_static is yes.
 
8679
test "$enable_shared" = yes || enable_static=yes
 
8680
AC_MSG_RESULT([$enable_static])
 
8681
 
 
8682
AC_LIBTOOL_CONFIG($1)
 
8683
 
 
8684
AC_LANG_POP
 
8685
CC="$lt_save_CC"
 
8686
])# AC_LIBTOOL_LANG_C_CONFIG
 
8687
 
 
8688
 
 
8689
# AC_LIBTOOL_LANG_CXX_CONFIG
 
8690
# --------------------------
 
8691
# Ensure that the configuration vars for the C compiler are
 
8692
# suitably defined.  Those variables are subsequently used by
 
8693
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
8694
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
8695
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
8696
[AC_LANG_PUSH(C++)
 
8697
AC_REQUIRE([AC_PROG_CXX])
 
8698
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
8699
 
 
8700
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8701
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
8702
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
8703
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
8704
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
8705
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
8706
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
8707
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
8708
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
8709
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
8710
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
8711
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
8712
_LT_AC_TAGVAR(module_cmds, $1)=
 
8713
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
8714
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
8715
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8716
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
8717
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
8718
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
8719
 
 
8720
# Dependencies to place before and after the object being linked:
 
8721
_LT_AC_TAGVAR(predep_objects, $1)=
 
8722
_LT_AC_TAGVAR(postdep_objects, $1)=
 
8723
_LT_AC_TAGVAR(predeps, $1)=
 
8724
_LT_AC_TAGVAR(postdeps, $1)=
 
8725
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
8726
 
 
8727
# Source file extension for C++ test sources.
 
8728
ac_ext=cpp
 
8729
 
 
8730
# Object file extension for compiled C++ test sources.
 
8731
objext=o
 
8732
_LT_AC_TAGVAR(objext, $1)=$objext
 
8733
 
 
8734
# Code to be used in simple compile tests
 
8735
lt_simple_compile_test_code="int some_variable = 0;\n"
 
8736
 
 
8737
# Code to be used in simple link tests
 
8738
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
 
8739
 
 
8740
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8741
_LT_AC_SYS_COMPILER
 
8742
 
 
8743
# save warnings/boilerplate of simple test code
 
8744
_LT_COMPILER_BOILERPLATE
 
8745
_LT_LINKER_BOILERPLATE
 
8746
 
 
8747
# Allow CC to be a program name with arguments.
 
8748
lt_save_CC=$CC
 
8749
lt_save_LD=$LD
 
8750
lt_save_GCC=$GCC
 
8751
GCC=$GXX
 
8752
lt_save_with_gnu_ld=$with_gnu_ld
 
8753
lt_save_path_LD=$lt_cv_path_LD
 
8754
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
8755
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
8756
else
 
8757
  $as_unset lt_cv_prog_gnu_ld
 
8758
fi
 
8759
if test -n "${lt_cv_path_LDCXX+set}"; then
 
8760
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
8761
else
 
8762
  $as_unset lt_cv_path_LD
 
8763
fi
 
8764
test -z "${LDCXX+set}" || LD=$LDCXX
 
8765
CC=${CXX-"c++"}
 
8766
compiler=$CC
 
8767
_LT_AC_TAGVAR(compiler, $1)=$CC
 
8768
_LT_CC_BASENAME([$compiler])
 
8769
 
 
8770
# We don't want -fno-exception wen compiling C++ code, so set the
 
8771
# no_builtin_flag separately
 
8772
if test "$GXX" = yes; then
 
8773
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
8774
else
 
8775
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
8776
fi
 
8777
 
 
8778
if test "$GXX" = yes; then
 
8779
  # Set up default GNU C++ configuration
 
8780
 
 
8781
  AC_PROG_LD
 
8782
 
 
8783
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
8784
  # archiving commands below assume that GNU ld is being used.
 
8785
  if test "$with_gnu_ld" = yes; then
 
8786
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8787
    _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'
 
8788
 
 
8789
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
8790
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
8791
 
 
8792
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
8793
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
8794
    #     investigate it a little bit more. (MM)
 
8795
    wlarc='${wl}'
 
8796
 
 
8797
    # ancient GNU ld didn't support --whole-archive et. al.
 
8798
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
8799
        grep 'no-whole-archive' > /dev/null; then
 
8800
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
8801
    else
 
8802
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
8803
    fi
 
8804
  else
 
8805
    with_gnu_ld=no
 
8806
    wlarc=
 
8807
 
 
8808
    # A generic and very simple default shared library creation
 
8809
    # command for GNU C++ for the case where it uses the native
 
8810
    # linker, instead of GNU ld.  If possible, this setting should
 
8811
    # overridden to take advantage of the native linker features on
 
8812
    # the platform it is being used on.
 
8813
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
8814
  fi
 
8815
 
 
8816
  # Commands to make compiler produce verbose output that lists
 
8817
  # what "hidden" libraries, object files and flags are used when
 
8818
  # linking a shared library.
 
8819
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
8820
 
 
8821
else
 
8822
  GXX=no
 
8823
  with_gnu_ld=no
 
8824
  wlarc=
 
8825
fi
 
8826
 
 
8827
# PORTME: fill in a description of your system's C++ link characteristics
 
8828
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
8829
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
8830
case $host_os in
 
8831
  aix3*)
 
8832
    # FIXME: insert proper C++ library support
 
8833
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8834
    ;;
 
8835
  aix4* | aix5*)
 
8836
    if test "$host_cpu" = ia64; then
 
8837
      # On IA64, the linker does run time linking by default, so we don't
 
8838
      # have to do anything special.
 
8839
      aix_use_runtimelinking=no
 
8840
      exp_sym_flag='-Bexport'
 
8841
      no_entry_flag=""
 
8842
    else
 
8843
      aix_use_runtimelinking=no
 
8844
 
 
8845
      # Test if we are trying to use run time linking or normal
 
8846
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
8847
      # need to do runtime linking.
 
8848
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
8849
        for ld_flag in $LDFLAGS; do
 
8850
          case $ld_flag in
 
8851
          *-brtl*)
 
8852
            aix_use_runtimelinking=yes
 
8853
            break
 
8854
            ;;
 
8855
          esac
 
8856
        done
 
8857
        ;;
 
8858
      esac
 
8859
 
 
8860
      exp_sym_flag='-bexport'
 
8861
      no_entry_flag='-bnoentry'
 
8862
    fi
 
8863
 
 
8864
    # When large executables or shared objects are built, AIX ld can
 
8865
    # have problems creating the table of contents.  If linking a library
 
8866
    # or program results in "error TOC overflow" add -mminimal-toc to
 
8867
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
8868
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
8869
 
 
8870
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
8871
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8872
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
8873
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8874
 
 
8875
    if test "$GXX" = yes; then
 
8876
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
8877
      # We only want to do this on AIX 4.2 and lower, the check
 
8878
      # below for broken collect2 doesn't work under 4.3+
 
8879
        collect2name=`${CC} -print-prog-name=collect2`
 
8880
        if test -f "$collect2name" && \
 
8881
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
8882
        then
 
8883
          # We have reworked collect2
 
8884
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
8885
        else
 
8886
          # We have old collect2
 
8887
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
8888
          # It fails to find uninstalled libraries when the uninstalled
 
8889
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
8890
          # to unsupported forces relinking
 
8891
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
8892
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
8893
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
8894
        fi
 
8895
        ;;
 
8896
      esac
 
8897
      shared_flag='-shared'
 
8898
      if test "$aix_use_runtimelinking" = yes; then
 
8899
        shared_flag="$shared_flag "'${wl}-G'
 
8900
      fi
 
8901
    else
 
8902
      # not using gcc
 
8903
      if test "$host_cpu" = ia64; then
 
8904
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
8905
        # chokes on -Wl,-G. The following line is correct:
 
8906
        shared_flag='-G'
 
8907
      else
 
8908
        if test "$aix_use_runtimelinking" = yes; then
 
8909
          shared_flag='${wl}-G'
 
8910
        else
 
8911
          shared_flag='${wl}-bM:SRE'
 
8912
        fi
 
8913
      fi
 
8914
    fi
 
8915
 
 
8916
    # It seems that -bexpall does not export symbols beginning with
 
8917
    # underscore (_), so it is better to generate a list of symbols to export.
 
8918
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
8919
    if test "$aix_use_runtimelinking" = yes; then
 
8920
      # Warning - without using the other runtime loading flags (-brtl),
 
8921
      # -berok will link without error, but may produce a broken library.
 
8922
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
8923
      # Determine the default libpath from the value encoded in an empty executable.
 
8924
      _LT_AC_SYS_LIBPATH_AIX
 
8925
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
8926
 
 
8927
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $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"
 
8928
     else
 
8929
      if test "$host_cpu" = ia64; then
 
8930
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
8931
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
8932
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
 
8933
      else
 
8934
        # Determine the default libpath from the value encoded in an empty executable.
 
8935
        _LT_AC_SYS_LIBPATH_AIX
 
8936
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
8937
        # Warning - without using the other run time loading flags,
 
8938
        # -berok will link without error, but may produce a broken library.
 
8939
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
8940
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
8941
        # Exported symbols can be pulled into shared objects from archives
 
8942
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
8943
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
8944
        # This is similar to how AIX traditionally builds its shared libraries.
 
8945
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
8946
      fi
 
8947
    fi
 
8948
    ;;
 
8949
 
 
8950
  beos*)
 
8951
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
8952
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
8953
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
8954
      # support --undefined.  This deserves some investigation.  FIXME
 
8955
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8956
    else
 
8957
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8958
    fi
 
8959
    ;;
 
8960
 
 
8961
  chorus*)
 
8962
    case $cc_basename in
 
8963
      *)
 
8964
        # FIXME: insert proper C++ library support
 
8965
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8966
        ;;
 
8967
    esac
 
8968
    ;;
 
8969
 
 
8970
  cygwin* | mingw* | pw32*)
 
8971
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
8972
    # as there is no search path for DLLs.
 
8973
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
8974
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
8975
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
8976
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
8977
 
 
8978
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
8979
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
8980
      # If the export-symbols file already is a .def file (1st line
 
8981
      # is EXPORTS), use it as is; otherwise, prepend...
 
8982
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
8983
        cp $export_symbols $output_objdir/$soname.def;
 
8984
      else
 
8985
        echo EXPORTS > $output_objdir/$soname.def;
 
8986
        cat $export_symbols >> $output_objdir/$soname.def;
 
8987
      fi~
 
8988
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
8989
    else
 
8990
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8991
    fi
 
8992
  ;;
 
8993
      darwin* | rhapsody*)
 
8994
        case $host_os in
 
8995
        rhapsody* | darwin1.[[012]])
 
8996
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
8997
         ;;
 
8998
       *) # Darwin 1.3 on
 
8999
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
9000
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
9001
         else
 
9002
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
9003
             10.[[012]])
 
9004
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
9005
               ;;
 
9006
             10.*)
 
9007
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
9008
               ;;
 
9009
           esac
 
9010
         fi
 
9011
         ;;
 
9012
        esac
 
9013
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9014
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
9015
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
9016
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
9017
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
9018
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
9019
 
 
9020
    if test "$GXX" = yes ; then
 
9021
      lt_int_apple_cc_single_mod=no
 
9022
      output_verbose_link_cmd='echo'
 
9023
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
 
9024
       lt_int_apple_cc_single_mod=yes
 
9025
      fi
 
9026
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
9027
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
9028
      else
 
9029
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -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'
 
9030
        fi
 
9031
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
9032
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
9033
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
9034
            _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}'
 
9035
          else
 
9036
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -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}'
 
9037
          fi
 
9038
            _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}'
 
9039
      else
 
9040
      case $cc_basename in
 
9041
        xlc*)
 
9042
         output_verbose_link_cmd='echo'
 
9043
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
9044
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
9045
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
9046
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
9047
          _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}'
 
9048
          ;;
 
9049
       *)
 
9050
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9051
          ;;
 
9052
      esac
 
9053
      fi
 
9054
        ;;
 
9055
 
 
9056
  dgux*)
 
9057
    case $cc_basename in
 
9058
      ec++*)
 
9059
        # FIXME: insert proper C++ library support
 
9060
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9061
        ;;
 
9062
      ghcx*)
 
9063
        # Green Hills C++ Compiler
 
9064
        # FIXME: insert proper C++ library support
 
9065
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9066
        ;;
 
9067
      *)
 
9068
        # FIXME: insert proper C++ library support
 
9069
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9070
        ;;
 
9071
    esac
 
9072
    ;;
 
9073
  freebsd[[12]]*)
 
9074
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
9075
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9076
    ;;
 
9077
  freebsd-elf*)
 
9078
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9079
    ;;
 
9080
  freebsd* | dragonfly*)
 
9081
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
9082
    # conventions
 
9083
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
9084
    ;;
 
9085
  gnu*)
 
9086
    ;;
 
9087
  hpux9*)
 
9088
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
9089
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9090
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
9091
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
9092
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
9093
                                # but as the default
 
9094
                                # location of the library.
 
9095
 
 
9096
    case $cc_basename in
 
9097
    CC*)
 
9098
      # FIXME: insert proper C++ library support
 
9099
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9100
      ;;
 
9101
    aCC*)
 
9102
      _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'
 
9103
      # Commands to make compiler produce verbose output that lists
 
9104
      # what "hidden" libraries, object files and flags are used when
 
9105
      # linking a shared library.
 
9106
      #
 
9107
      # There doesn't appear to be a way to prevent this compiler from
 
9108
      # explicitly linking system object files so we need to strip them
 
9109
      # from the output so that they don't get included in the library
 
9110
      # dependencies.
 
9111
      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'
 
9112
      ;;
 
9113
    *)
 
9114
      if test "$GXX" = yes; then
 
9115
        _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'
 
9116
      else
 
9117
        # FIXME: insert proper C++ library support
 
9118
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9119
      fi
 
9120
      ;;
 
9121
    esac
 
9122
    ;;
 
9123
  hpux10*|hpux11*)
 
9124
    if test $with_gnu_ld = no; then
 
9125
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
9126
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9127
 
 
9128
      case $host_cpu in
 
9129
      hppa*64*|ia64*)
 
9130
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
9131
        ;;
 
9132
      *)
 
9133
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
9134
        ;;
 
9135
      esac
 
9136
    fi
 
9137
    case $host_cpu in
 
9138
    hppa*64*|ia64*)
 
9139
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
9140
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
9141
      ;;
 
9142
    *)
 
9143
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
9144
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
9145
                                              # but as the default
 
9146
                                              # location of the library.
 
9147
      ;;
 
9148
    esac
 
9149
 
 
9150
    case $cc_basename in
 
9151
      CC*)
 
9152
        # FIXME: insert proper C++ library support
 
9153
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9154
        ;;
 
9155
      aCC*)
 
9156
        case $host_cpu in
 
9157
        hppa*64*)
 
9158
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
9159
          ;;
 
9160
        ia64*)
 
9161
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
9162
          ;;
 
9163
        *)
 
9164
          _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'
 
9165
          ;;
 
9166
        esac
 
9167
        # Commands to make compiler produce verbose output that lists
 
9168
        # what "hidden" libraries, object files and flags are used when
 
9169
        # linking a shared library.
 
9170
        #
 
9171
        # There doesn't appear to be a way to prevent this compiler from
 
9172
        # explicitly linking system object files so we need to strip them
 
9173
        # from the output so that they don't get included in the library
 
9174
        # dependencies.
 
9175
        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'
 
9176
        ;;
 
9177
      *)
 
9178
        if test "$GXX" = yes; then
 
9179
          if test $with_gnu_ld = no; then
 
9180
            case $host_cpu in
 
9181
            hppa*64*)
 
9182
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
9183
              ;;
 
9184
            ia64*)
 
9185
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
9186
              ;;
 
9187
            *)
 
9188
              _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'
 
9189
              ;;
 
9190
            esac
 
9191
          fi
 
9192
        else
 
9193
          # FIXME: insert proper C++ library support
 
9194
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9195
        fi
 
9196
        ;;
 
9197
    esac
 
9198
    ;;
 
9199
  interix3*)
 
9200
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
9201
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
9202
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
9203
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
9204
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
9205
    # Instead, shared libraries are loaded at an image base (0x10000000 by
 
9206
    # default) and relocated if they conflict, which is a slow very memory
 
9207
    # consuming and fragmenting process.  To avoid this, we pick a random,
 
9208
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
9209
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
9210
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
9211
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
9212
    ;;
 
9213
  irix5* | irix6*)
 
9214
    case $cc_basename in
 
9215
      CC*)
 
9216
        # SGI C++
 
9217
        _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 ${output_objdir}/so_locations -o $lib'
 
9218
 
 
9219
        # Archives containing C++ object files must be created using
 
9220
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
9221
        # necessary to make sure instantiated templates are included
 
9222
        # in the archive.
 
9223
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
9224
        ;;
 
9225
      *)
 
9226
        if test "$GXX" = yes; then
 
9227
          if test "$with_gnu_ld" = no; then
 
9228
            _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}${output_objdir}/so_locations -o $lib'
 
9229
          else
 
9230
            _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'
 
9231
          fi
 
9232
        fi
 
9233
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
9234
        ;;
 
9235
    esac
 
9236
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
9237
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9238
    ;;
 
9239
  linux* | k*bsd*-gnu)
 
9240
    case $cc_basename in
 
9241
      KCC*)
 
9242
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
9243
 
 
9244
        # KCC will only create a shared library if the output file
 
9245
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
9246
        # to its proper name (with version) after linking.
 
9247
        _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'
 
9248
        _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'
 
9249
        # Commands to make compiler produce verbose output that lists
 
9250
        # what "hidden" libraries, object files and flags are used when
 
9251
        # linking a shared library.
 
9252
        #
 
9253
        # There doesn't appear to be a way to prevent this compiler from
 
9254
        # explicitly linking system object files so we need to strip them
 
9255
        # from the output so that they don't get included in the library
 
9256
        # dependencies.
 
9257
        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'
 
9258
 
 
9259
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
9260
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
9261
 
 
9262
        # Archives containing C++ object files must be created using
 
9263
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
9264
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
9265
        ;;
 
9266
      icpc*)
 
9267
        # Intel C++
 
9268
        with_gnu_ld=yes
 
9269
        # version 8.0 and above of icpc choke on multiply defined symbols
 
9270
        # if we add $predep_objects and $postdep_objects, however 7.1 and
 
9271
        # earlier do not add the objects themselves.
 
9272
        case `$CC -V 2>&1` in
 
9273
        *"Version 7."*)
 
9274
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9275
          _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'
 
9276
          ;;
 
9277
        *)  # Version 8.0 or newer
 
9278
          tmp_idyn=
 
9279
          case $host_cpu in
 
9280
            ia64*) tmp_idyn=' -i_dynamic';;
 
9281
          esac
 
9282
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9283
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
9284
          ;;
 
9285
        esac
 
9286
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9287
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
9288
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
9289
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
9290
        ;;
 
9291
      pgCC*)
 
9292
        # Portland Group C++ compiler
 
9293
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
9294
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
9295
 
 
9296
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
9297
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
9298
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
9299
        ;;
 
9300
      cxx*)
 
9301
        # Compaq C++
 
9302
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9303
        _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'
 
9304
 
 
9305
        runpath_var=LD_RUN_PATH
 
9306
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
9307
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9308
 
 
9309
        # Commands to make compiler produce verbose output that lists
 
9310
        # what "hidden" libraries, object files and flags are used when
 
9311
        # linking a shared library.
 
9312
        #
 
9313
        # There doesn't appear to be a way to prevent this compiler from
 
9314
        # explicitly linking system object files so we need to strip them
 
9315
        # from the output so that they don't get included in the library
 
9316
        # dependencies.
 
9317
        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'
 
9318
        ;;
 
9319
    esac
 
9320
    ;;
 
9321
  lynxos*)
 
9322
    # FIXME: insert proper C++ library support
 
9323
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9324
    ;;
 
9325
  m88k*)
 
9326
    # FIXME: insert proper C++ library support
 
9327
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9328
    ;;
 
9329
  mvs*)
 
9330
    case $cc_basename in
 
9331
      cxx*)
 
9332
        # FIXME: insert proper C++ library support
 
9333
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9334
        ;;
 
9335
      *)
 
9336
        # FIXME: insert proper C++ library support
 
9337
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9338
        ;;
 
9339
    esac
 
9340
    ;;
 
9341
  netbsd* | netbsdelf*-gnu)
 
9342
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
9343
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
9344
      wlarc=
 
9345
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
9346
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
9347
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
9348
    fi
 
9349
    # Workaround some broken pre-1.5 toolchains
 
9350
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
9351
    ;;
 
9352
  openbsd2*)
 
9353
    # C++ shared libraries are fairly broken
 
9354
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9355
    ;;
 
9356
  openbsd*)
 
9357
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
9358
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
9359
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
9360
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
9361
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
9362
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
 
9363
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
9364
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
9365
    fi
 
9366
    output_verbose_link_cmd='echo'
 
9367
    ;;
 
9368
  osf3*)
 
9369
    case $cc_basename in
 
9370
      KCC*)
 
9371
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
9372
 
 
9373
        # KCC will only create a shared library if the output file
 
9374
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
9375
        # to its proper name (with version) after linking.
 
9376
        _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'
 
9377
 
 
9378
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
9379
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9380
 
 
9381
        # Archives containing C++ object files must be created using
 
9382
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
9383
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
9384
 
 
9385
        ;;
 
9386
      RCC*)
 
9387
        # Rational C++ 2.4.1
 
9388
        # FIXME: insert proper C++ library support
 
9389
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9390
        ;;
 
9391
      cxx*)
 
9392
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
9393
        _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 ${output_objdir}/so_locations -o $lib'
 
9394
 
 
9395
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
9396
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9397
 
 
9398
        # Commands to make compiler produce verbose output that lists
 
9399
        # what "hidden" libraries, object files and flags are used when
 
9400
        # linking a shared library.
 
9401
        #
 
9402
        # There doesn't appear to be a way to prevent this compiler from
 
9403
        # explicitly linking system object files so we need to strip them
 
9404
        # from the output so that they don't get included in the library
 
9405
        # dependencies.
 
9406
        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'
 
9407
        ;;
 
9408
      *)
 
9409
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
9410
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
9411
          _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}${output_objdir}/so_locations -o $lib'
 
9412
 
 
9413
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
9414
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9415
 
 
9416
          # Commands to make compiler produce verbose output that lists
 
9417
          # what "hidden" libraries, object files and flags are used when
 
9418
          # linking a shared library.
 
9419
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
9420
 
 
9421
        else
 
9422
          # FIXME: insert proper C++ library support
 
9423
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9424
        fi
 
9425
        ;;
 
9426
    esac
 
9427
    ;;
 
9428
  osf4* | osf5*)
 
9429
    case $cc_basename in
 
9430
      KCC*)
 
9431
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
9432
 
 
9433
        # KCC will only create a shared library if the output file
 
9434
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
9435
        # to its proper name (with version) after linking.
 
9436
        _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'
 
9437
 
 
9438
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
9439
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9440
 
 
9441
        # Archives containing C++ object files must be created using
 
9442
        # the KAI C++ compiler.
 
9443
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
9444
        ;;
 
9445
      RCC*)
 
9446
        # Rational C++ 2.4.1
 
9447
        # FIXME: insert proper C++ library support
 
9448
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9449
        ;;
 
9450
      cxx*)
 
9451
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
9452
        _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 ${output_objdir}/so_locations -o $lib'
 
9453
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
9454
          echo "-hidden">> $lib.exp~
 
9455
          $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 ${output_objdir}/so_locations -o $lib~
 
9456
          $rm $lib.exp'
 
9457
 
 
9458
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
9459
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9460
 
 
9461
        # Commands to make compiler produce verbose output that lists
 
9462
        # what "hidden" libraries, object files and flags are used when
 
9463
        # linking a shared library.
 
9464
        #
 
9465
        # There doesn't appear to be a way to prevent this compiler from
 
9466
        # explicitly linking system object files so we need to strip them
 
9467
        # from the output so that they don't get included in the library
 
9468
        # dependencies.
 
9469
        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'
 
9470
        ;;
 
9471
      *)
 
9472
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
9473
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
9474
         _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}${output_objdir}/so_locations -o $lib'
 
9475
 
 
9476
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
9477
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
9478
 
 
9479
          # Commands to make compiler produce verbose output that lists
 
9480
          # what "hidden" libraries, object files and flags are used when
 
9481
          # linking a shared library.
 
9482
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
9483
 
 
9484
        else
 
9485
          # FIXME: insert proper C++ library support
 
9486
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9487
        fi
 
9488
        ;;
 
9489
    esac
 
9490
    ;;
 
9491
  psos*)
 
9492
    # FIXME: insert proper C++ library support
 
9493
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9494
    ;;
 
9495
  sunos4*)
 
9496
    case $cc_basename in
 
9497
      CC*)
 
9498
        # Sun C++ 4.x
 
9499
        # FIXME: insert proper C++ library support
 
9500
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9501
        ;;
 
9502
      lcc*)
 
9503
        # Lucid
 
9504
        # FIXME: insert proper C++ library support
 
9505
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9506
        ;;
 
9507
      *)
 
9508
        # FIXME: insert proper C++ library support
 
9509
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9510
        ;;
 
9511
    esac
 
9512
    ;;
 
9513
  solaris*)
 
9514
    case $cc_basename in
 
9515
      CC*)
 
9516
        # Sun C++ 4.2, 5.x and Centerline C++
 
9517
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
 
9518
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
9519
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
9520
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
9521
        $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
9522
 
 
9523
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
9524
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
9525
        case $host_os in
 
9526
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
9527
          *)
 
9528
            # The C++ compiler is used as linker so we must use $wl
 
9529
            # flag to pass the commands to the underlying system
 
9530
            # linker. We must also pass each convience library through
 
9531
            # to the system linker between allextract/defaultextract.
 
9532
            # The C++ compiler will combine linker options so we
 
9533
            # cannot just pass the convience library names through
 
9534
            # without $wl.
 
9535
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
9536
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
 
9537
            ;;
 
9538
        esac
 
9539
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
9540
 
 
9541
        output_verbose_link_cmd='echo'
 
9542
 
 
9543
        # Archives containing C++ object files must be created using
 
9544
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
9545
        # necessary to make sure instantiated templates are included
 
9546
        # in the archive.
 
9547
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
9548
        ;;
 
9549
      gcx*)
 
9550
        # Green Hills C++ Compiler
 
9551
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
9552
 
 
9553
        # The C++ compiler must be used to create the archive.
 
9554
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
9555
        ;;
 
9556
      *)
 
9557
        # GNU C++ compiler with Solaris linker
 
9558
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
9559
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
9560
          if $CC --version | grep -v '^2\.7' > /dev/null; then
 
9561
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
9562
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
9563
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
9564
 
 
9565
            # Commands to make compiler produce verbose output that lists
 
9566
            # what "hidden" libraries, object files and flags are used when
 
9567
            # linking a shared library.
 
9568
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
9569
          else
 
9570
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
9571
            # platform.
 
9572
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
9573
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
9574
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
9575
 
 
9576
            # Commands to make compiler produce verbose output that lists
 
9577
            # what "hidden" libraries, object files and flags are used when
 
9578
            # linking a shared library.
 
9579
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
9580
          fi
 
9581
 
 
9582
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
9583
        fi
 
9584
        ;;
 
9585
    esac
 
9586
    ;;
 
9587
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
9588
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
9589
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9590
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
9591
    runpath_var='LD_RUN_PATH'
 
9592
 
 
9593
    case $cc_basename in
 
9594
      CC*)
 
9595
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
9596
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
9597
        ;;
 
9598
      *)
 
9599
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
9600
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
9601
        ;;
 
9602
    esac
 
9603
    ;;
 
9604
  sysv5* | sco3.2v5* | sco5v6*)
 
9605
    # Note: We can NOT use -z defs as we might desire, because we do not
 
9606
    # link with -lc, and that would cause any symbols used from libc to
 
9607
    # always be unresolved, which means just about no library would
 
9608
    # ever link correctly.  If we're not using GNU ld we use -z text
 
9609
    # though, which does catch some bad symbols but isn't as heavy-handed
 
9610
    # as -z defs.
 
9611
    # For security reasons, it is highly recommended that you always
 
9612
    # use absolute paths for naming shared libraries, and exclude the
 
9613
    # DT_RUNPATH tag from executables and libraries.  But doing so
 
9614
    # requires that you compile everything twice, which is a pain.
 
9615
    # So that behaviour is only enabled if SCOABSPATH is set to a
 
9616
    # non-empty value in the environment.  Most likely only useful for
 
9617
    # creating official distributions of packages.
 
9618
    # This is a hack until libtool officially supports absolute path
 
9619
    # names for shared libraries.
 
9620
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
9621
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
9622
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9623
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
9624
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
 
9625
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
9626
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
9627
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
9628
    runpath_var='LD_RUN_PATH'
 
9629
 
 
9630
    case $cc_basename in
 
9631
      CC*)
 
9632
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
9633
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
9634
        ;;
 
9635
      *)
 
9636
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
9637
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
9638
        ;;
 
9639
    esac
 
9640
    ;;
 
9641
  tandem*)
 
9642
    case $cc_basename in
 
9643
      NCC*)
 
9644
        # NonStop-UX NCC 3.20
 
9645
        # FIXME: insert proper C++ library support
 
9646
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9647
        ;;
 
9648
      *)
 
9649
        # FIXME: insert proper C++ library support
 
9650
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9651
        ;;
 
9652
    esac
 
9653
    ;;
 
9654
  vxworks*)
 
9655
    # FIXME: insert proper C++ library support
 
9656
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9657
    ;;
 
9658
  *)
 
9659
    # FIXME: insert proper C++ library support
 
9660
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9661
    ;;
 
9662
esac
 
9663
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
9664
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
9665
 
 
9666
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
9667
_LT_AC_TAGVAR(LD, $1)="$LD"
 
9668
 
 
9669
AC_LIBTOOL_POSTDEP_PREDEP($1)
 
9670
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
9671
AC_LIBTOOL_PROG_CC_C_O($1)
 
9672
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
9673
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
9674
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
9675
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
9676
 
 
9677
AC_LIBTOOL_CONFIG($1)
 
9678
 
 
9679
AC_LANG_POP
 
9680
CC=$lt_save_CC
 
9681
LDCXX=$LD
 
9682
LD=$lt_save_LD
 
9683
GCC=$lt_save_GCC
 
9684
with_gnu_ldcxx=$with_gnu_ld
 
9685
with_gnu_ld=$lt_save_with_gnu_ld
 
9686
lt_cv_path_LDCXX=$lt_cv_path_LD
 
9687
lt_cv_path_LD=$lt_save_path_LD
 
9688
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
9689
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
9690
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
9691
 
 
9692
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
9693
# ------------------------------------
 
9694
# Figure out "hidden" library dependencies from verbose
 
9695
# compiler output when linking a shared library.
 
9696
# Parse the compiler output and extract the necessary
 
9697
# objects, libraries and library flags.
 
9698
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
9699
dnl we can't use the lt_simple_compile_test_code here,
 
9700
dnl because it contains code intended for an executable,
 
9701
dnl not a library.  It's possible we should let each
 
9702
dnl tag define a new lt_????_link_test_code variable,
 
9703
dnl but it's only used here...
 
9704
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
 
9705
int a;
 
9706
void foo (void) { a = 0; }
 
9707
EOF
 
9708
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
 
9709
class Foo
 
9710
{
 
9711
public:
 
9712
  Foo (void) { a = 0; }
 
9713
private:
 
9714
  int a;
 
9715
};
 
9716
EOF
 
9717
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
 
9718
      subroutine foo
 
9719
      implicit none
 
9720
      integer*4 a
 
9721
      a=0
 
9722
      return
 
9723
      end
 
9724
EOF
 
9725
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
 
9726
public class foo {
 
9727
  private int a;
 
9728
  public void bar (void) {
 
9729
    a = 0;
 
9730
  }
 
9731
};
 
9732
EOF
 
9733
])
 
9734
dnl Parse the compiler output and extract the necessary
 
9735
dnl objects, libraries and library flags.
 
9736
if AC_TRY_EVAL(ac_compile); then
 
9737
  # Parse the compiler output and extract the necessary
 
9738
  # objects, libraries and library flags.
 
9739
 
 
9740
  # Sentinel used to keep track of whether or not we are before
 
9741
  # the conftest object file.
 
9742
  pre_test_object_deps_done=no
 
9743
 
 
9744
  # The `*' in the case matches for architectures that use `case' in
 
9745
  # $output_verbose_cmd can trigger glob expansion during the loop
 
9746
  # eval without this substitution.
 
9747
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
 
9748
 
 
9749
  for p in `eval $output_verbose_link_cmd`; do
 
9750
    case $p in
 
9751
 
 
9752
    -L* | -R* | -l*)
 
9753
       # Some compilers place space between "-{L,R}" and the path.
 
9754
       # Remove the space.
 
9755
       if test $p = "-L" \
 
9756
          || test $p = "-R"; then
 
9757
         prev=$p
 
9758
         continue
 
9759
       else
 
9760
         prev=
 
9761
       fi
 
9762
 
 
9763
       if test "$pre_test_object_deps_done" = no; then
 
9764
         case $p in
 
9765
         -L* | -R*)
 
9766
           # Internal compiler library paths should come after those
 
9767
           # provided the user.  The postdeps already come after the
 
9768
           # user supplied libs so there is no need to process them.
 
9769
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
9770
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
9771
           else
 
9772
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
9773
           fi
 
9774
           ;;
 
9775
         # The "-l" case would never come before the object being
 
9776
         # linked, so don't bother handling this case.
 
9777
         esac
 
9778
       else
 
9779
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
9780
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
9781
         else
 
9782
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
9783
         fi
 
9784
       fi
 
9785
       ;;
 
9786
 
 
9787
    *.$objext)
 
9788
       # This assumes that the test object file only shows up
 
9789
       # once in the compiler output.
 
9790
       if test "$p" = "conftest.$objext"; then
 
9791
         pre_test_object_deps_done=yes
 
9792
         continue
 
9793
       fi
 
9794
 
 
9795
       if test "$pre_test_object_deps_done" = no; then
 
9796
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
9797
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
9798
         else
 
9799
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
9800
         fi
 
9801
       else
 
9802
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
9803
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
9804
         else
 
9805
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
9806
         fi
 
9807
       fi
 
9808
       ;;
 
9809
 
 
9810
    *) ;; # Ignore the rest.
 
9811
 
 
9812
    esac
 
9813
  done
 
9814
 
 
9815
  # Clean up.
 
9816
  rm -f a.out a.exe
 
9817
else
 
9818
  echo "libtool.m4: error: problem compiling $1 test program"
 
9819
fi
 
9820
 
 
9821
$rm -f confest.$objext
 
9822
 
 
9823
# PORTME: override above test on systems where it is broken
 
9824
ifelse([$1],[CXX],
 
9825
[case $host_os in
 
9826
interix3*)
 
9827
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
 
9828
  # hack all around it, let's just trust "g++" to DTRT.
 
9829
  _LT_AC_TAGVAR(predep_objects,$1)=
 
9830
  _LT_AC_TAGVAR(postdep_objects,$1)=
 
9831
  _LT_AC_TAGVAR(postdeps,$1)=
 
9832
  ;;
 
9833
 
 
9834
solaris*)
 
9835
  case $cc_basename in
 
9836
  CC*)
 
9837
    # Adding this requires a known-good setup of shared libraries for
 
9838
    # Sun compiler versions before 5.6, else PIC objects from an old
 
9839
    # archive will be linked into the output, leading to subtle bugs.
 
9840
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
 
9841
    ;;
 
9842
  esac
 
9843
  ;;
 
9844
esac
 
9845
])
 
9846
 
 
9847
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
9848
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
9849
esac
 
9850
])# AC_LIBTOOL_POSTDEP_PREDEP
 
9851
 
 
9852
# AC_LIBTOOL_LANG_F77_CONFIG
 
9853
# --------------------------
 
9854
# Ensure that the configuration vars for the C compiler are
 
9855
# suitably defined.  Those variables are subsequently used by
 
9856
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
9857
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
 
9858
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
 
9859
[AC_REQUIRE([AC_PROG_F77])
 
9860
AC_LANG_PUSH(Fortran 77)
 
9861
 
 
9862
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9863
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
9864
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
9865
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
9866
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
9867
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
9868
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
9869
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
9870
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
9871
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
9872
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
9873
_LT_AC_TAGVAR(module_cmds, $1)=
 
9874
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
9875
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
9876
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
9877
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
9878
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
9879
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
9880
 
 
9881
# Source file extension for f77 test sources.
 
9882
ac_ext=f
 
9883
 
 
9884
# Object file extension for compiled f77 test sources.
 
9885
objext=o
 
9886
_LT_AC_TAGVAR(objext, $1)=$objext
 
9887
 
 
9888
# Code to be used in simple compile tests
 
9889
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
9890
 
 
9891
# Code to be used in simple link tests
 
9892
lt_simple_link_test_code="      program t\n      end\n"
 
9893
 
 
9894
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
9895
_LT_AC_SYS_COMPILER
 
9896
 
 
9897
# save warnings/boilerplate of simple test code
 
9898
_LT_COMPILER_BOILERPLATE
 
9899
_LT_LINKER_BOILERPLATE
 
9900
 
 
9901
# Allow CC to be a program name with arguments.
 
9902
lt_save_CC="$CC"
 
9903
CC=${F77-"f77"}
 
9904
compiler=$CC
 
9905
_LT_AC_TAGVAR(compiler, $1)=$CC
 
9906
_LT_CC_BASENAME([$compiler])
 
9907
 
 
9908
AC_MSG_CHECKING([if libtool supports shared libraries])
 
9909
AC_MSG_RESULT([$can_build_shared])
 
9910
 
 
9911
AC_MSG_CHECKING([whether to build shared libraries])
 
9912
test "$can_build_shared" = "no" && enable_shared=no
 
9913
 
 
9914
# On AIX, shared libraries and static libraries use the same namespace, and
 
9915
# are all built from PIC.
 
9916
case $host_os in
 
9917
aix3*)
 
9918
  test "$enable_shared" = yes && enable_static=no
 
9919
  if test -n "$RANLIB"; then
 
9920
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
9921
    postinstall_cmds='$RANLIB $lib'
 
9922
  fi
 
9923
  ;;
 
9924
aix4* | aix5*)
 
9925
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
9926
    test "$enable_shared" = yes && enable_static=no
 
9927
  fi
 
9928
  ;;
 
9929
esac
 
9930
AC_MSG_RESULT([$enable_shared])
 
9931
 
 
9932
AC_MSG_CHECKING([whether to build static libraries])
 
9933
# Make sure either enable_shared or enable_static is yes.
 
9934
test "$enable_shared" = yes || enable_static=yes
 
9935
AC_MSG_RESULT([$enable_static])
 
9936
 
 
9937
_LT_AC_TAGVAR(GCC, $1)="$G77"
 
9938
_LT_AC_TAGVAR(LD, $1)="$LD"
 
9939
 
 
9940
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
9941
AC_LIBTOOL_PROG_CC_C_O($1)
 
9942
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
9943
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
9944
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
9945
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
9946
 
 
9947
AC_LIBTOOL_CONFIG($1)
 
9948
 
 
9949
AC_LANG_POP
 
9950
CC="$lt_save_CC"
 
9951
])# AC_LIBTOOL_LANG_F77_CONFIG
 
9952
 
 
9953
 
 
9954
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
9955
# --------------------------
 
9956
# Ensure that the configuration vars for the C compiler are
 
9957
# suitably defined.  Those variables are subsequently used by
 
9958
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
9959
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
9960
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
9961
[AC_LANG_SAVE
 
9962
 
 
9963
# Source file extension for Java test sources.
 
9964
ac_ext=java
 
9965
 
 
9966
# Object file extension for compiled Java test sources.
 
9967
objext=o
 
9968
_LT_AC_TAGVAR(objext, $1)=$objext
 
9969
 
 
9970
# Code to be used in simple compile tests
 
9971
lt_simple_compile_test_code="class foo {}\n"
 
9972
 
 
9973
# Code to be used in simple link tests
 
9974
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
 
9975
 
 
9976
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
9977
_LT_AC_SYS_COMPILER
 
9978
 
 
9979
# save warnings/boilerplate of simple test code
 
9980
_LT_COMPILER_BOILERPLATE
 
9981
_LT_LINKER_BOILERPLATE
 
9982
 
 
9983
# Allow CC to be a program name with arguments.
 
9984
lt_save_CC="$CC"
 
9985
CC=${GCJ-"gcj"}
 
9986
compiler=$CC
 
9987
_LT_AC_TAGVAR(compiler, $1)=$CC
 
9988
_LT_CC_BASENAME([$compiler])
 
9989
 
 
9990
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
9991
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
9992
 
 
9993
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
9994
 
 
9995
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
9996
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
9997
AC_LIBTOOL_PROG_CC_C_O($1)
 
9998
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
9999
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
10000
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
10001
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
10002
 
 
10003
AC_LIBTOOL_CONFIG($1)
 
10004
 
 
10005
AC_LANG_RESTORE
 
10006
CC="$lt_save_CC"
 
10007
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
10008
 
 
10009
 
 
10010
# AC_LIBTOOL_LANG_RC_CONFIG
 
10011
# -------------------------
 
10012
# Ensure that the configuration vars for the Windows resource compiler are
 
10013
# suitably defined.  Those variables are subsequently used by
 
10014
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
10015
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
10016
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
10017
[AC_LANG_SAVE
 
10018
 
 
10019
# Source file extension for RC test sources.
 
10020
ac_ext=rc
 
10021
 
 
10022
# Object file extension for compiled RC test sources.
 
10023
objext=o
 
10024
_LT_AC_TAGVAR(objext, $1)=$objext
 
10025
 
 
10026
# Code to be used in simple compile tests
 
10027
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
10028
 
 
10029
# Code to be used in simple link tests
 
10030
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
10031
 
 
10032
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
10033
_LT_AC_SYS_COMPILER
 
10034
 
 
10035
# save warnings/boilerplate of simple test code
 
10036
_LT_COMPILER_BOILERPLATE
 
10037
_LT_LINKER_BOILERPLATE
 
10038
 
 
10039
# Allow CC to be a program name with arguments.
 
10040
lt_save_CC="$CC"
 
10041
CC=${RC-"windres"}
 
10042
compiler=$CC
 
10043
_LT_AC_TAGVAR(compiler, $1)=$CC
 
10044
_LT_CC_BASENAME([$compiler])
 
10045
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
10046
 
 
10047
AC_LIBTOOL_CONFIG($1)
 
10048
 
 
10049
AC_LANG_RESTORE
 
10050
CC="$lt_save_CC"
 
10051
])# AC_LIBTOOL_LANG_RC_CONFIG
 
10052
 
 
10053
 
 
10054
# AC_LIBTOOL_CONFIG([TAGNAME])
 
10055
# ----------------------------
 
10056
# If TAGNAME is not passed, then create an initial libtool script
 
10057
# with a default configuration from the untagged config vars.  Otherwise
 
10058
# add code to config.status for appending the configuration named by
 
10059
# TAGNAME from the matching tagged config vars.
 
10060
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
10061
[# The else clause should only fire when bootstrapping the
 
10062
# libtool distribution, otherwise you forgot to ship ltmain.sh
 
10063
# with your package, and you will get complaints that there are
 
10064
# no rules to generate ltmain.sh.
 
10065
if test -f "$ltmain"; then
 
10066
  # See if we are running on zsh, and set the options which allow our commands through
 
10067
  # without removal of \ escapes.
 
10068
  if test -n "${ZSH_VERSION+set}" ; then
 
10069
    setopt NO_GLOB_SUBST
 
10070
  fi
 
10071
  # Now quote all the things that may contain metacharacters while being
 
10072
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 
10073
  # variables and quote the copies for generation of the libtool script.
 
10074
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
 
10075
    SED SHELL STRIP \
 
10076
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
10077
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
10078
    deplibs_check_method reload_flag reload_cmds need_locks \
 
10079
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
10080
    lt_cv_sys_global_symbol_to_c_name_address \
 
10081
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 
10082
    old_postinstall_cmds old_postuninstall_cmds \
 
10083
    _LT_AC_TAGVAR(compiler, $1) \
 
10084
    _LT_AC_TAGVAR(CC, $1) \
 
10085
    _LT_AC_TAGVAR(LD, $1) \
 
10086
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
10087
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
10088
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
10089
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
10090
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
10091
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
10092
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
10093
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
 
10094
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
10095
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
10096
    _LT_AC_TAGVAR(predep_objects, $1) \
 
10097
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
10098
    _LT_AC_TAGVAR(predeps, $1) \
 
10099
    _LT_AC_TAGVAR(postdeps, $1) \
 
10100
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
10101
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
10102
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
10103
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
10104
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
10105
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
10106
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
10107
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
10108
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
10109
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
10110
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
 
10111
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
10112
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
 
10113
    _LT_AC_TAGVAR(module_cmds, $1) \
 
10114
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
 
10115
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
10116
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
10117
    _LT_AC_TAGVAR(include_expsyms, $1); do
 
10118
 
 
10119
    case $var in
 
10120
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
10121
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
10122
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
10123
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
10124
    _LT_AC_TAGVAR(module_cmds, $1) | \
 
10125
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
 
10126
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
10127
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
10128
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
10129
    postinstall_cmds | postuninstall_cmds | \
 
10130
    old_postinstall_cmds | old_postuninstall_cmds | \
 
10131
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
10132
      # Double-quote double-evaled strings.
 
10133
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 
10134
      ;;
 
10135
    *)
 
10136
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 
10137
      ;;
 
10138
    esac
 
10139
  done
 
10140
 
 
10141
  case $lt_echo in
 
10142
  *'\[$]0 --fallback-echo"')
 
10143
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
10144
    ;;
 
10145
  esac
 
10146
 
 
10147
ifelse([$1], [],
 
10148
  [cfgfile="${ofile}T"
 
10149
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
10150
  $rm -f "$cfgfile"
 
10151
  AC_MSG_NOTICE([creating $ofile])],
 
10152
  [cfgfile="$ofile"])
 
10153
 
 
10154
  cat <<__EOF__ >> "$cfgfile"
 
10155
ifelse([$1], [],
 
10156
[#! $SHELL
 
10157
 
 
10158
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
10159
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 
10160
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
10161
#
 
10162
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
10163
# Free Software Foundation, Inc.
 
10164
#
 
10165
# This file is part of GNU Libtool:
 
10166
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
10167
#
 
10168
# This program is free software; you can redistribute it and/or modify
 
10169
# it under the terms of the GNU General Public License as published by
 
10170
# the Free Software Foundation; either version 2 of the License, or
 
10171
# (at your option) any later version.
 
10172
#
 
10173
# This program is distributed in the hope that it will be useful, but
 
10174
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
10175
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
10176
# General Public License for more details.
 
10177
#
 
10178
# You should have received a copy of the GNU General Public License
 
10179
# along with this program; if not, write to the Free Software
 
10180
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
10181
#
 
10182
# As a special exception to the GNU General Public License, if you
 
10183
# distribute this file as part of a program that contains a
 
10184
# configuration script generated by Autoconf, you may include it under
 
10185
# the same distribution terms that you use for the rest of that program.
 
10186
 
 
10187
# A sed program that does not truncate output.
 
10188
SED=$lt_SED
 
10189
 
 
10190
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
 
10191
Xsed="$SED -e 1s/^X//"
 
10192
 
 
10193
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
10194
# if CDPATH is set.
 
10195
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
10196
 
 
10197
# The names of the tagged configurations supported by this script.
 
10198
available_tags=
 
10199
 
 
10200
# ### BEGIN LIBTOOL CONFIG],
 
10201
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
 
10202
 
 
10203
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
10204
 
 
10205
# Shell to use when invoking shell scripts.
 
10206
SHELL=$lt_SHELL
 
10207
 
 
10208
# Whether or not to build shared libraries.
 
10209
build_libtool_libs=$enable_shared
 
10210
 
 
10211
# Whether or not to build static libraries.
 
10212
build_old_libs=$enable_static
 
10213
 
 
10214
# Whether or not to add -lc for building shared libraries.
 
10215
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
10216
 
 
10217
# Whether or not to disallow shared libs when runtime libs are static
 
10218
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
 
10219
 
 
10220
# Whether or not to optimize for fast installation.
 
10221
fast_install=$enable_fast_install
 
10222
 
 
10223
# The host system.
 
10224
host_alias=$host_alias
 
10225
host=$host
 
10226
host_os=$host_os
 
10227
 
 
10228
# The build system.
 
10229
build_alias=$build_alias
 
10230
build=$build
 
10231
build_os=$build_os
 
10232
 
 
10233
# An echo program that does not interpret backslashes.
 
10234
echo=$lt_echo
 
10235
 
 
10236
# The archiver.
 
10237
AR=$lt_AR
 
10238
AR_FLAGS=$lt_AR_FLAGS
 
10239
 
 
10240
# A C compiler.
 
10241
LTCC=$lt_LTCC
 
10242
 
 
10243
# LTCC compiler flags.
 
10244
LTCFLAGS=$lt_LTCFLAGS
 
10245
 
 
10246
# A language-specific compiler.
 
10247
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 
10248
 
 
10249
# Is the compiler the GNU C compiler?
 
10250
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
10251
 
 
10252
# An ERE matcher.
 
10253
EGREP=$lt_EGREP
 
10254
 
 
10255
# The linker used to build libraries.
 
10256
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
 
10257
 
 
10258
# Whether we need hard or soft links.
 
10259
LN_S=$lt_LN_S
 
10260
 
 
10261
# A BSD-compatible nm program.
 
10262
NM=$lt_NM
 
10263
 
 
10264
# A symbol stripping program
 
10265
STRIP=$lt_STRIP
 
10266
 
 
10267
# Used to examine libraries when file_magic_cmd begins "file"
 
10268
MAGIC_CMD=$MAGIC_CMD
 
10269
 
 
10270
# Used on cygwin: DLL creation program.
 
10271
DLLTOOL="$DLLTOOL"
 
10272
 
 
10273
# Used on cygwin: object dumper.
 
10274
OBJDUMP="$OBJDUMP"
 
10275
 
 
10276
# Used on cygwin: assembler.
 
10277
AS="$AS"
 
10278
 
 
10279
# The name of the directory that contains temporary libtool files.
 
10280
objdir=$objdir
 
10281
 
 
10282
# How to create reloadable object files.
 
10283
reload_flag=$lt_reload_flag
 
10284
reload_cmds=$lt_reload_cmds
 
10285
 
 
10286
# How to pass a linker flag through the compiler.
 
10287
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
10288
 
 
10289
# Object file suffix (normally "o").
 
10290
objext="$ac_objext"
 
10291
 
 
10292
# Old archive suffix (normally "a").
 
10293
libext="$libext"
 
10294
 
 
10295
# Shared library suffix (normally ".so").
 
10296
shrext_cmds='$shrext_cmds'
 
10297
 
 
10298
# Executable file suffix (normally "").
 
10299
exeext="$exeext"
 
10300
 
 
10301
# Additional compiler flags for building library objects.
 
10302
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
 
10303
pic_mode=$pic_mode
 
10304
 
 
10305
# What is the maximum length of a command?
 
10306
max_cmd_len=$lt_cv_sys_max_cmd_len
 
10307
 
 
10308
# Does compiler simultaneously support -c and -o options?
 
10309
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
10310
 
 
10311
# Must we lock files when doing compilation?
 
10312
need_locks=$lt_need_locks
 
10313
 
 
10314
# Do we need the lib prefix for modules?
 
10315
need_lib_prefix=$need_lib_prefix
 
10316
 
 
10317
# Do we need a version for libraries?
 
10318
need_version=$need_version
 
10319
 
 
10320
# Whether dlopen is supported.
 
10321
dlopen_support=$enable_dlopen
 
10322
 
 
10323
# Whether dlopen of programs is supported.
 
10324
dlopen_self=$enable_dlopen_self
 
10325
 
 
10326
# Whether dlopen of statically linked programs is supported.
 
10327
dlopen_self_static=$enable_dlopen_self_static
 
10328
 
 
10329
# Compiler flag to prevent dynamic linking.
 
10330
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
 
10331
 
 
10332
# Compiler flag to turn off builtin functions.
 
10333
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
 
10334
 
 
10335
# Compiler flag to allow reflexive dlopens.
 
10336
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
 
10337
 
 
10338
# Compiler flag to generate shared objects directly from archives.
 
10339
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
 
10340
 
 
10341
# Compiler flag to generate thread-safe objects.
 
10342
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
 
10343
 
 
10344
# Library versioning type.
 
10345
version_type=$version_type
 
10346
 
 
10347
# Format of library name prefix.
 
10348
libname_spec=$lt_libname_spec
 
10349
 
 
10350
# List of archive names.  First name is the real one, the rest are links.
 
10351
# The last name is the one that the linker finds with -lNAME.
 
10352
library_names_spec=$lt_library_names_spec
 
10353
 
 
10354
# The coded name of the library, if different from the real name.
 
10355
soname_spec=$lt_soname_spec
 
10356
 
 
10357
# Commands used to build and install an old-style archive.
 
10358
RANLIB=$lt_RANLIB
 
10359
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
 
10360
old_postinstall_cmds=$lt_old_postinstall_cmds
 
10361
old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
10362
 
 
10363
# Create an old-style archive from a shared archive.
 
10364
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
 
10365
 
 
10366
# Create a temporary old-style archive to link instead of a shared archive.
 
10367
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
 
10368
 
 
10369
# Commands used to build and install a shared archive.
 
10370
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
10371
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
 
10372
postinstall_cmds=$lt_postinstall_cmds
 
10373
postuninstall_cmds=$lt_postuninstall_cmds
 
10374
 
 
10375
# Commands used to build a loadable module (assumed same as above if empty)
 
10376
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
 
10377
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
10378
 
 
10379
# Commands to strip libraries.
 
10380
old_striplib=$lt_old_striplib
 
10381
striplib=$lt_striplib
 
10382
 
 
10383
# Dependencies to place before the objects being linked to create a
 
10384
# shared library.
 
10385
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
10386
 
 
10387
# Dependencies to place after the objects being linked to create a
 
10388
# shared library.
 
10389
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
10390
 
 
10391
# Dependencies to place before the objects being linked to create a
 
10392
# shared library.
 
10393
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
10394
 
 
10395
# Dependencies to place after the objects being linked to create a
 
10396
# shared library.
 
10397
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
10398
 
 
10399
# The library search path used internally by the compiler when linking
 
10400
# a shared library.
 
10401
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
10402
 
 
10403
# Method to check whether dependent libraries are shared objects.
 
10404
deplibs_check_method=$lt_deplibs_check_method
 
10405
 
 
10406
# Command to use when deplibs_check_method == file_magic.
 
10407
file_magic_cmd=$lt_file_magic_cmd
 
10408
 
 
10409
# Flag that allows shared libraries with undefined symbols to be built.
 
10410
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
10411
 
 
10412
# Flag that forces no undefined symbols.
 
10413
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
 
10414
 
 
10415
# Commands used to finish a libtool library installation in a directory.
 
10416
finish_cmds=$lt_finish_cmds
 
10417
 
 
10418
# Same as above, but a single script fragment to be evaled but not shown.
 
10419
finish_eval=$lt_finish_eval
 
10420
 
 
10421
# Take the output of nm and produce a listing of raw symbols and C names.
 
10422
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
10423
 
 
10424
# Transform the output of nm in a proper C declaration
 
10425
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
10426
 
 
10427
# Transform the output of nm in a C name address pair
 
10428
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
10429
 
 
10430
# This is the shared library runtime path variable.
 
10431
runpath_var=$runpath_var
 
10432
 
 
10433
# This is the shared library path variable.
 
10434
shlibpath_var=$shlibpath_var
 
10435
 
 
10436
# Is shlibpath searched before the hard-coded library search path?
 
10437
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
10438
 
 
10439
# How to hardcode a shared library path into an executable.
 
10440
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
 
10441
 
 
10442
# Whether we should hardcode library paths into libraries.
 
10443
hardcode_into_libs=$hardcode_into_libs
 
10444
 
 
10445
# Flag to hardcode \$libdir into a binary during linking.
 
10446
# This must work even if \$libdir does not exist.
 
10447
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
10448
 
 
10449
# If ld is used when linking, flag to hardcode \$libdir into
 
10450
# a binary during linking. This must work even if \$libdir does
 
10451
# not exist.
 
10452
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
 
10453
 
 
10454
# Whether we need a single -rpath flag with a separated argument.
 
10455
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
 
10456
 
 
10457
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 
10458
# resulting binary.
 
10459
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
 
10460
 
 
10461
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 
10462
# resulting binary.
 
10463
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
 
10464
 
 
10465
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 
10466
# the resulting binary.
 
10467
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
10468
 
 
10469
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
10470
# and all subsequent libraries and executables linked against it.
 
10471
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
 
10472
 
 
10473
# Variables whose values should be saved in libtool wrapper scripts and
 
10474
# restored at relink time.
 
10475
variables_saved_for_relink="$variables_saved_for_relink"
 
10476
 
 
10477
# Whether libtool must link a program against all its dependency libraries.
 
10478
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
 
10479
 
 
10480
# Compile-time system search path for libraries
 
10481
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
10482
 
 
10483
# Run-time system search path for libraries
 
10484
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
10485
 
 
10486
# Fix the shell variable \$srcfile for the compiler.
 
10487
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
 
10488
 
 
10489
# Set to yes if exported symbols are required.
 
10490
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
 
10491
 
 
10492
# The commands to list exported symbols.
 
10493
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
 
10494
 
 
10495
# The commands to extract the exported symbol list from a shared archive.
 
10496
extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
10497
 
 
10498
# Symbols that should not be listed in the preloaded symbols.
 
10499
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
 
10500
 
 
10501
# Symbols that must always be exported.
 
10502
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
 
10503
 
 
10504
ifelse([$1],[],
 
10505
[# ### END LIBTOOL CONFIG],
 
10506
[# ### END LIBTOOL TAG CONFIG: $tagname])
 
10507
 
 
10508
__EOF__
 
10509
 
 
10510
ifelse([$1],[], [
 
10511
  case $host_os in
 
10512
  aix3*)
 
10513
    cat <<\EOF >> "$cfgfile"
 
10514
 
 
10515
# AIX sometimes has problems with the GCC collect2 program.  For some
 
10516
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
10517
# vanish in a puff of smoke.
 
10518
if test "X${COLLECT_NAMES+set}" != Xset; then
 
10519
  COLLECT_NAMES=
 
10520
  export COLLECT_NAMES
 
10521
fi
 
10522
EOF
 
10523
    ;;
 
10524
  esac
 
10525
 
 
10526
  # We use sed instead of cat because bash on DJGPP gets confused if
 
10527
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
10528
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
10529
  # is reportedly fixed, but why not run on old versions too?
 
10530
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
10531
 
 
10532
  mv -f "$cfgfile" "$ofile" || \
 
10533
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
10534
  chmod +x "$ofile"
 
10535
])
 
10536
else
 
10537
  # If there is no Makefile yet, we rely on a make rule to execute
 
10538
  # `config.status --recheck' to rerun these tests and create the
 
10539
  # libtool script then.
 
10540
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 
10541
  if test -f "$ltmain_in"; then
 
10542
    test -f Makefile && make "$ltmain"
 
10543
  fi
 
10544
fi
 
10545
])# AC_LIBTOOL_CONFIG
 
10546
 
 
10547
 
 
10548
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
10549
# -------------------------------------------
 
10550
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
10551
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
10552
 
 
10553
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
10554
 
 
10555
if test "$GCC" = yes; then
 
10556
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
10557
 
 
10558
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
10559
    lt_cv_prog_compiler_rtti_exceptions,
 
10560
    [-fno-rtti -fno-exceptions], [],
 
10561
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
10562
fi
 
10563
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
10564
 
 
10565
 
 
10566
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
10567
# ---------------------------------
 
10568
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
10569
[AC_REQUIRE([AC_CANONICAL_HOST])
 
10570
AC_REQUIRE([AC_PROG_NM])
 
10571
AC_REQUIRE([AC_OBJEXT])
 
10572
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
10573
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
10574
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
10575
[
 
10576
# These are sane defaults that work on at least a few old systems.
 
10577
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
10578
 
 
10579
# Character class describing NM global symbol codes.
 
10580
symcode='[[BCDEGRST]]'
 
10581
 
 
10582
# Regexp to match symbols that can be accessed directly from C.
 
10583
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
10584
 
 
10585
# Transform an extracted symbol line into a proper C declaration
 
10586
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
10587
 
 
10588
# Transform an extracted symbol line into symbol name and symbol address
 
10589
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'"
 
10590
 
 
10591
# Define system-specific variables.
 
10592
case $host_os in
 
10593
aix*)
 
10594
  symcode='[[BCDT]]'
 
10595
  ;;
 
10596
cygwin* | mingw* | pw32*)
 
10597
  symcode='[[ABCDGISTW]]'
 
10598
  ;;
 
10599
hpux*) # Its linker distinguishes data from code symbols
 
10600
  if test "$host_cpu" = ia64; then
 
10601
    symcode='[[ABCDEGRST]]'
 
10602
  fi
 
10603
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
10604
  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'"
 
10605
  ;;
 
10606
linux* | k*bsd*-gnu)
 
10607
  if test "$host_cpu" = ia64; then
 
10608
    symcode='[[ABCDGIRSTW]]'
 
10609
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
10610
    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'"
 
10611
  fi
 
10612
  ;;
 
10613
irix* | nonstopux*)
 
10614
  symcode='[[BCDEGRST]]'
 
10615
  ;;
 
10616
osf*)
 
10617
  symcode='[[BCDEGQRST]]'
 
10618
  ;;
 
10619
solaris*)
 
10620
  symcode='[[BDRT]]'
 
10621
  ;;
 
10622
sco3.2v5*)
 
10623
  symcode='[[DT]]'
 
10624
  ;;
 
10625
sysv4.2uw2*)
 
10626
  symcode='[[DT]]'
 
10627
  ;;
 
10628
sysv5* | sco5v6* | unixware* | OpenUNIX*)
 
10629
  symcode='[[ABDT]]'
 
10630
  ;;
 
10631
sysv4)
 
10632
  symcode='[[DFNSTU]]'
 
10633
  ;;
 
10634
esac
 
10635
 
 
10636
# Handle CRLF in mingw tool chain
 
10637
opt_cr=
 
10638
case $build_os in
 
10639
mingw*)
 
10640
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
10641
  ;;
 
10642
esac
 
10643
 
 
10644
# If we're using GNU nm, then use its standard symbol codes.
 
10645
case `$NM -V 2>&1` in
 
10646
*GNU* | *'with BFD'*)
 
10647
  symcode='[[ABCDGIRSTW]]' ;;
 
10648
esac
 
10649
 
 
10650
# Try without a prefix undercore, then with it.
 
10651
for ac_symprfx in "" "_"; do
 
10652
 
 
10653
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
10654
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
10655
 
 
10656
  # Write the raw and C identifiers.
 
10657
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
10658
 
 
10659
  # Check to see that the pipe works correctly.
 
10660
  pipe_works=no
 
10661
 
 
10662
  rm -f conftest*
 
10663
  cat > conftest.$ac_ext <<EOF
 
10664
#ifdef __cplusplus
 
10665
extern "C" {
 
10666
#endif
 
10667
char nm_test_var;
 
10668
void nm_test_func(){}
 
10669
#ifdef __cplusplus
 
10670
}
 
10671
#endif
 
10672
int main(){nm_test_var='a';nm_test_func();return(0);}
 
10673
EOF
 
10674
 
 
10675
  if AC_TRY_EVAL(ac_compile); then
 
10676
    # Now try to grab the symbols.
 
10677
    nlist=conftest.nm
 
10678
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
10679
      # Try sorting and uniquifying the output.
 
10680
      if sort "$nlist" | uniq > "$nlist"T; then
 
10681
        mv -f "$nlist"T "$nlist"
 
10682
      else
 
10683
        rm -f "$nlist"T
 
10684
      fi
 
10685
 
 
10686
      # Make sure that we snagged all the symbols we need.
 
10687
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 
10688
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
 
10689
          cat <<EOF > conftest.$ac_ext
 
10690
#ifdef __cplusplus
 
10691
extern "C" {
 
10692
#endif
 
10693
 
 
10694
EOF
 
10695
          # Now generate the symbol file.
 
10696
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
10697
 
 
10698
          cat <<EOF >> conftest.$ac_ext
 
10699
#if defined (__STDC__) && __STDC__
 
10700
# define lt_ptr_t void *
 
10701
#else
 
10702
# define lt_ptr_t char *
 
10703
# define const
 
10704
#endif
 
10705
 
 
10706
/* The mapping between symbol names and symbols. */
 
10707
const struct {
 
10708
  const char *name;
 
10709
  lt_ptr_t address;
 
10710
}
 
10711
lt_preloaded_symbols[[]] =
 
10712
{
 
10713
EOF
 
10714
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
10715
          cat <<\EOF >> conftest.$ac_ext
 
10716
  {0, (lt_ptr_t) 0}
 
10717
};
 
10718
 
 
10719
#ifdef __cplusplus
 
10720
}
 
10721
#endif
 
10722
EOF
 
10723
          # Now try linking the two files.
 
10724
          mv conftest.$ac_objext conftstm.$ac_objext
 
10725
          lt_save_LIBS="$LIBS"
 
10726
          lt_save_CFLAGS="$CFLAGS"
 
10727
          LIBS="conftstm.$ac_objext"
 
10728
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
10729
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
10730
            pipe_works=yes
 
10731
          fi
 
10732
          LIBS="$lt_save_LIBS"
 
10733
          CFLAGS="$lt_save_CFLAGS"
 
10734
        else
 
10735
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
10736
        fi
 
10737
      else
 
10738
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
10739
      fi
 
10740
    else
 
10741
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
10742
    fi
 
10743
  else
 
10744
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
10745
    cat conftest.$ac_ext >&5
 
10746
  fi
 
10747
  rm -f conftest* conftst*
 
10748
 
 
10749
  # Do not use the global_symbol_pipe unless it works.
 
10750
  if test "$pipe_works" = yes; then
 
10751
    break
 
10752
  else
 
10753
    lt_cv_sys_global_symbol_pipe=
 
10754
  fi
 
10755
done
 
10756
])
 
10757
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
10758
  lt_cv_sys_global_symbol_to_cdecl=
 
10759
fi
 
10760
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
10761
  AC_MSG_RESULT(failed)
 
10762
else
 
10763
  AC_MSG_RESULT(ok)
 
10764
fi
 
10765
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
10766
 
 
10767
 
 
10768
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
10769
# ---------------------------------------
 
10770
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
10771
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
10772
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10773
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
10774
 
 
10775
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
10776
 ifelse([$1],[CXX],[
 
10777
  # C++ specific cases for pic, static, wl, etc.
 
10778
  if test "$GXX" = yes; then
 
10779
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10780
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
10781
 
 
10782
    case $host_os in
 
10783
    aix*)
 
10784
      # All AIX code is PIC.
 
10785
      if test "$host_cpu" = ia64; then
 
10786
        # AIX 5 now supports IA64 processor
 
10787
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10788
      fi
 
10789
      ;;
 
10790
    amigaos*)
 
10791
      # FIXME: we need at least 68020 code to build shared libraries, but
 
10792
      # adding the `-m68020' flag to GCC prevents building anything better,
 
10793
      # like `-m68040'.
 
10794
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
10795
      ;;
 
10796
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
10797
      # PIC is the default for these OSes.
 
10798
      ;;
 
10799
    mingw* | os2* | pw32*)
 
10800
      # This hack is so that the source file can tell whether it is being
 
10801
      # built for inclusion in a dll (and should export symbols for example).
 
10802
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
10803
      ;;
 
10804
    darwin* | rhapsody*)
 
10805
      # PIC is the default on this platform
 
10806
      # Common symbols not allowed in MH_DYLIB files
 
10807
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
10808
      ;;
 
10809
    *djgpp*)
 
10810
      # DJGPP does not support shared libraries at all
 
10811
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10812
      ;;
 
10813
    interix3*)
 
10814
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
10815
      # Instead, we relocate shared libraries at runtime.
 
10816
      ;;
 
10817
    sysv4*MP*)
 
10818
      if test -d /usr/nec; then
 
10819
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
10820
      fi
 
10821
      ;;
 
10822
    hpux*)
 
10823
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
10824
      # not for PA HP-UX.
 
10825
      case $host_cpu in
 
10826
      hppa*64*|ia64*)
 
10827
        ;;
 
10828
      *)
 
10829
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10830
        ;;
 
10831
      esac
 
10832
      ;;
 
10833
    *)
 
10834
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10835
      ;;
 
10836
    esac
 
10837
  else
 
10838
    case $host_os in
 
10839
      aix4* | aix5*)
 
10840
        # All AIX code is PIC.
 
10841
        if test "$host_cpu" = ia64; then
 
10842
          # AIX 5 now supports IA64 processor
 
10843
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10844
        else
 
10845
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
10846
        fi
 
10847
        ;;
 
10848
      chorus*)
 
10849
        case $cc_basename in
 
10850
        cxch68*)
 
10851
          # Green Hills C++ Compiler
 
10852
          # _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"
 
10853
          ;;
 
10854
        esac
 
10855
        ;;
 
10856
       darwin*)
 
10857
         # PIC is the default on this platform
 
10858
         # Common symbols not allowed in MH_DYLIB files
 
10859
         case $cc_basename in
 
10860
           xlc*)
 
10861
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
10862
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10863
           ;;
 
10864
         esac
 
10865
       ;;
 
10866
      dgux*)
 
10867
        case $cc_basename in
 
10868
          ec++*)
 
10869
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10870
            ;;
 
10871
          ghcx*)
 
10872
            # Green Hills C++ Compiler
 
10873
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10874
            ;;
 
10875
          *)
 
10876
            ;;
 
10877
        esac
 
10878
        ;;
 
10879
      freebsd* | dragonfly*)
 
10880
        # FreeBSD uses GNU C++
 
10881
        ;;
 
10882
      hpux9* | hpux10* | hpux11*)
 
10883
        case $cc_basename in
 
10884
          CC*)
 
10885
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10886
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
10887
            if test "$host_cpu" != ia64; then
 
10888
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
10889
            fi
 
10890
            ;;
 
10891
          aCC*)
 
10892
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10893
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
10894
            case $host_cpu in
 
10895
            hppa*64*|ia64*)
 
10896
              # +Z the default
 
10897
              ;;
 
10898
            *)
 
10899
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
10900
              ;;
 
10901
            esac
 
10902
            ;;
 
10903
          *)
 
10904
            ;;
 
10905
        esac
 
10906
        ;;
 
10907
      interix*)
 
10908
        # This is c89, which is MS Visual C++ (no shared libs)
 
10909
        # Anyone wants to do a port?
 
10910
        ;;
 
10911
      irix5* | irix6* | nonstopux*)
 
10912
        case $cc_basename in
 
10913
          CC*)
 
10914
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10915
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10916
            # CC pic flag -KPIC is the default.
 
10917
            ;;
 
10918
          *)
 
10919
            ;;
 
10920
        esac
 
10921
        ;;
 
10922
      linux* | k*bsd*-gnu)
 
10923
        case $cc_basename in
 
10924
          KCC*)
 
10925
            # KAI C++ Compiler
 
10926
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
10927
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
10928
            ;;
 
10929
          icpc* | ecpc*)
 
10930
            # Intel C++
 
10931
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10932
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10933
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
10934
            ;;
 
10935
          pgCC*)
 
10936
            # Portland Group C++ compiler.
 
10937
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10938
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
10939
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10940
            ;;
 
10941
          cxx*)
 
10942
            # Compaq C++
 
10943
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
10944
            # Linux and Compaq Tru64 Unix objects are PIC.
 
10945
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10946
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10947
            ;;
 
10948
          *)
 
10949
            ;;
 
10950
        esac
 
10951
        ;;
 
10952
      lynxos*)
 
10953
        ;;
 
10954
      m88k*)
 
10955
        ;;
 
10956
      mvs*)
 
10957
        case $cc_basename in
 
10958
          cxx*)
 
10959
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
10960
            ;;
 
10961
          *)
 
10962
            ;;
 
10963
        esac
 
10964
        ;;
 
10965
      netbsd* | netbsdelf*-gnu)
 
10966
        ;;
 
10967
      osf3* | osf4* | osf5*)
 
10968
        case $cc_basename in
 
10969
          KCC*)
 
10970
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
10971
            ;;
 
10972
          RCC*)
 
10973
            # Rational C++ 2.4.1
 
10974
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
10975
            ;;
 
10976
          cxx*)
 
10977
            # Digital/Compaq C++
 
10978
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
10979
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
10980
            # Linux and Compaq Tru64 Unix objects are PIC.
 
10981
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
10982
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
10983
            ;;
 
10984
          *)
 
10985
            ;;
 
10986
        esac
 
10987
        ;;
 
10988
      psos*)
 
10989
        ;;
 
10990
      solaris*)
 
10991
        case $cc_basename in
 
10992
          CC*)
 
10993
            # Sun C++ 4.2, 5.x and Centerline C++
 
10994
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
10995
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
10996
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
10997
            ;;
 
10998
          gcx*)
 
10999
            # Green Hills C++ Compiler
 
11000
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
11001
            ;;
 
11002
          *)
 
11003
            ;;
 
11004
        esac
 
11005
        ;;
 
11006
      sunos4*)
 
11007
        case $cc_basename in
 
11008
          CC*)
 
11009
            # Sun C++ 4.x
 
11010
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
11011
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11012
            ;;
 
11013
          lcc*)
 
11014
            # Lucid
 
11015
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
11016
            ;;
 
11017
          *)
 
11018
            ;;
 
11019
        esac
 
11020
        ;;
 
11021
      tandem*)
 
11022
        case $cc_basename in
 
11023
          NCC*)
 
11024
            # NonStop-UX NCC 3.20
 
11025
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
11026
            ;;
 
11027
          *)
 
11028
            ;;
 
11029
        esac
 
11030
        ;;
 
11031
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
11032
        case $cc_basename in
 
11033
          CC*)
 
11034
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11035
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
11036
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11037
            ;;
 
11038
        esac
 
11039
        ;;
 
11040
      vxworks*)
 
11041
        ;;
 
11042
      *)
 
11043
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
11044
        ;;
 
11045
    esac
 
11046
  fi
 
11047
],
 
11048
[
 
11049
  if test "$GCC" = yes; then
 
11050
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11051
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
11052
 
 
11053
    case $host_os in
 
11054
      aix*)
 
11055
      # All AIX code is PIC.
 
11056
      if test "$host_cpu" = ia64; then
 
11057
        # AIX 5 now supports IA64 processor
 
11058
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11059
      fi
 
11060
      ;;
 
11061
 
 
11062
    amigaos*)
 
11063
      # FIXME: we need at least 68020 code to build shared libraries, but
 
11064
      # adding the `-m68020' flag to GCC prevents building anything better,
 
11065
      # like `-m68040'.
 
11066
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
11067
      ;;
 
11068
 
 
11069
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
11070
      # PIC is the default for these OSes.
 
11071
      ;;
 
11072
 
 
11073
    mingw* | pw32* | os2*)
 
11074
      # This hack is so that the source file can tell whether it is being
 
11075
      # built for inclusion in a dll (and should export symbols for example).
 
11076
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
11077
      ;;
 
11078
 
 
11079
    darwin* | rhapsody*)
 
11080
      # PIC is the default on this platform
 
11081
      # Common symbols not allowed in MH_DYLIB files
 
11082
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
11083
      ;;
 
11084
 
 
11085
    interix3*)
 
11086
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
11087
      # Instead, we relocate shared libraries at runtime.
 
11088
      ;;
 
11089
 
 
11090
    msdosdjgpp*)
 
11091
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
11092
      # on systems that don't support them.
 
11093
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
11094
      enable_shared=no
 
11095
      ;;
 
11096
 
 
11097
    sysv4*MP*)
 
11098
      if test -d /usr/nec; then
 
11099
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
11100
      fi
 
11101
      ;;
 
11102
 
 
11103
    hpux*)
 
11104
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
11105
      # not for PA HP-UX.
 
11106
      case $host_cpu in
 
11107
      hppa*64*|ia64*)
 
11108
        # +Z the default
 
11109
        ;;
 
11110
      *)
 
11111
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
11112
        ;;
 
11113
      esac
 
11114
      ;;
 
11115
 
 
11116
    *)
 
11117
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
11118
      ;;
 
11119
    esac
 
11120
  else
 
11121
    # PORTME Check for flag to pass linker flags through the system compiler.
 
11122
    case $host_os in
 
11123
    aix*)
 
11124
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11125
      if test "$host_cpu" = ia64; then
 
11126
        # AIX 5 now supports IA64 processor
 
11127
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11128
      else
 
11129
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
11130
      fi
 
11131
      ;;
 
11132
      darwin*)
 
11133
        # PIC is the default on this platform
 
11134
        # Common symbols not allowed in MH_DYLIB files
 
11135
       case $cc_basename in
 
11136
         xlc*)
 
11137
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
11138
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11139
         ;;
 
11140
       esac
 
11141
       ;;
 
11142
 
 
11143
    mingw* | pw32* | os2*)
 
11144
      # This hack is so that the source file can tell whether it is being
 
11145
      # built for inclusion in a dll (and should export symbols for example).
 
11146
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
11147
      ;;
 
11148
 
 
11149
    hpux9* | hpux10* | hpux11*)
 
11150
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11151
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
11152
      # not for PA HP-UX.
 
11153
      case $host_cpu in
 
11154
      hppa*64*|ia64*)
 
11155
        # +Z the default
 
11156
        ;;
 
11157
      *)
 
11158
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
11159
        ;;
 
11160
      esac
 
11161
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
11162
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
11163
      ;;
 
11164
 
 
11165
    irix5* | irix6* | nonstopux*)
 
11166
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11167
      # PIC (with -KPIC) is the default.
 
11168
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
11169
      ;;
 
11170
 
 
11171
    newsos6)
 
11172
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
11173
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11174
      ;;
 
11175
 
 
11176
    linux* | k*bsd*-gnu)
 
11177
      case $cc_basename in
 
11178
      icc* | ecc*)
 
11179
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11180
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
11181
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
11182
        ;;
 
11183
      pgcc* | pgf77* | pgf90* | pgf95*)
 
11184
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
11185
        # which looks to be a dead project)
 
11186
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11187
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
11188
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11189
        ;;
 
11190
      ccc*)
 
11191
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11192
        # All Alpha code is PIC.
 
11193
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
11194
        ;;
 
11195
      esac
 
11196
      ;;
 
11197
 
 
11198
    osf3* | osf4* | osf5*)
 
11199
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11200
      # All OSF/1 code is PIC.
 
11201
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
11202
      ;;
 
11203
 
 
11204
    solaris*)
 
11205
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
11206
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11207
      case $cc_basename in
 
11208
      f77* | f90* | f95*)
 
11209
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
11210
      *)
 
11211
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
11212
      esac
 
11213
      ;;
 
11214
 
 
11215
    sunos4*)
 
11216
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
11217
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
11218
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11219
      ;;
 
11220
 
 
11221
    sysv4 | sysv4.2uw2* | sysv4.3*)
 
11222
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11223
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
11224
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11225
      ;;
 
11226
 
 
11227
    sysv4*MP*)
 
11228
      if test -d /usr/nec ;then
 
11229
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
11230
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11231
      fi
 
11232
      ;;
 
11233
 
 
11234
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
11235
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11236
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
11237
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11238
      ;;
 
11239
 
 
11240
    unicos*)
 
11241
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
11242
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
11243
      ;;
 
11244
 
 
11245
    uts4*)
 
11246
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
11247
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
11248
      ;;
 
11249
 
 
11250
    *)
 
11251
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
11252
      ;;
 
11253
    esac
 
11254
  fi
 
11255
])
 
11256
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
11257
 
 
11258
#
 
11259
# Check to make sure the PIC flag actually works.
 
11260
#
 
11261
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
11262
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
11263
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
11264
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
 
11265
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
11266
     "" | " "*) ;;
 
11267
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
11268
     esac],
 
11269
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
11270
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
11271
fi
 
11272
case $host_os in
 
11273
  # For platforms which do not support PIC, -DPIC is meaningless:
 
11274
  *djgpp*)
 
11275
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
11276
    ;;
 
11277
  *)
 
11278
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
 
11279
    ;;
 
11280
esac
 
11281
 
 
11282
#
 
11283
# Check to make sure the static flag actually works.
 
11284
#
 
11285
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
 
11286
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
 
11287
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
11288
  $lt_tmp_static_flag,
 
11289
  [],
 
11290
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
11291
])
 
11292
 
 
11293
 
 
11294
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
11295
# ------------------------------------
 
11296
# See if the linker supports building shared libraries.
 
11297
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
11298
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
11299
ifelse([$1],[CXX],[
 
11300
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
11301
  case $host_os in
 
11302
  aix4* | aix5*)
 
11303
    # If we're using GNU nm, then we don't want the "-C" option.
 
11304
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
11305
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
11306
      _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'
 
11307
    else
 
11308
      _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'
 
11309
    fi
 
11310
    ;;
 
11311
  pw32*)
 
11312
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
11313
  ;;
 
11314
  cygwin* | mingw*)
 
11315
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
11316
  ;;
 
11317
  linux* | k*bsd*-gnu)
 
11318
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 
11319
  ;;
 
11320
  *)
 
11321
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
11322
  ;;
 
11323
  esac
 
11324
],[
 
11325
  runpath_var=
 
11326
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
11327
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
11328
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
11329
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
11330
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
11331
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
11332
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
11333
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
11334
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
11335
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
11336
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
11337
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
11338
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
11339
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
11340
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
11341
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
11342
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
11343
  _LT_AC_TAGVAR(module_cmds, $1)=
 
11344
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
11345
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
11346
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
11347
  # include_expsyms should be a list of space-separated symbols to be *always*
 
11348
  # included in the symbol list
 
11349
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
11350
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
11351
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
11352
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
11353
  # as well as any symbol that contains `d'.
 
11354
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
11355
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
11356
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
11357
  # the symbol is explicitly referenced.  Since portable code cannot
 
11358
  # rely on this symbol name, it's probably fine to never include it in
 
11359
  # preloaded symbol tables.
 
11360
  extract_expsyms_cmds=
 
11361
  # Just being paranoid about ensuring that cc_basename is set.
 
11362
  _LT_CC_BASENAME([$compiler])
 
11363
  case $host_os in
 
11364
  cygwin* | mingw* | pw32*)
 
11365
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
11366
    # When not using gcc, we currently assume that we are using
 
11367
    # Microsoft Visual C++.
 
11368
    if test "$GCC" != yes; then
 
11369
      with_gnu_ld=no
 
11370
    fi
 
11371
    ;;
 
11372
  interix*)
 
11373
    # we just hope/assume this is gcc and not c89 (= MSVC++)
 
11374
    with_gnu_ld=yes
 
11375
    ;;
 
11376
  openbsd*)
 
11377
    with_gnu_ld=no
 
11378
    ;;
 
11379
  esac
 
11380
 
 
11381
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
11382
  if test "$with_gnu_ld" = yes; then
 
11383
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
11384
    wlarc='${wl}'
 
11385
 
 
11386
    # Set some defaults for GNU ld with shared library support. These
 
11387
    # are reset later if shared libraries are not supported. Putting them
 
11388
    # here allows them to be overridden if necessary.
 
11389
    runpath_var=LD_RUN_PATH
 
11390
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
11391
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
11392
    # ancient GNU ld didn't support --whole-archive et. al.
 
11393
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
11394
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
11395
      else
 
11396
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
11397
    fi
 
11398
    supports_anon_versioning=no
 
11399
    case `$LD -v 2>/dev/null` in
 
11400
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
11401
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
11402
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
11403
      *\ 2.11.*) ;; # other 2.11 versions
 
11404
      *) supports_anon_versioning=yes ;;
 
11405
    esac
 
11406
 
 
11407
    # See if GNU ld supports shared libraries.
 
11408
    case $host_os in
 
11409
    aix3* | aix4* | aix5*)
 
11410
      # On AIX/PPC, the GNU linker is very broken
 
11411
      if test "$host_cpu" != ia64; then
 
11412
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11413
        cat <<EOF 1>&2
 
11414
 
 
11415
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
11416
*** to be unable to reliably create shared libraries on AIX.
 
11417
*** Therefore, libtool is disabling shared libraries support.  If you
 
11418
*** really care for shared libraries, you may want to modify your PATH
 
11419
*** so that a non-GNU linker is found, and then restart.
 
11420
 
 
11421
EOF
 
11422
      fi
 
11423
      ;;
 
11424
 
 
11425
    amigaos*)
 
11426
      _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)'
 
11427
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
11428
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11429
 
 
11430
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
11431
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
11432
      # to version 4, is to share data among multiple programs linked
 
11433
      # with the same dynamic library.  Since this doesn't match the
 
11434
      # behavior of shared libraries on other platforms, we can't use
 
11435
      # them.
 
11436
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11437
      ;;
 
11438
 
 
11439
    beos*)
 
11440
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
11441
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
11442
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
11443
        # support --undefined.  This deserves some investigation.  FIXME
 
11444
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
11445
      else
 
11446
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11447
      fi
 
11448
      ;;
 
11449
 
 
11450
    cygwin* | mingw* | pw32*)
 
11451
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
11452
      # as there is no search path for DLLs.
 
11453
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
11454
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
11455
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
11456
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
11457
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
11458
 
 
11459
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
11460
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
11461
        # If the export-symbols file already is a .def file (1st line
 
11462
        # is EXPORTS), use it as is; otherwise, prepend...
 
11463
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
11464
          cp $export_symbols $output_objdir/$soname.def;
 
11465
        else
 
11466
          echo EXPORTS > $output_objdir/$soname.def;
 
11467
          cat $export_symbols >> $output_objdir/$soname.def;
 
11468
        fi~
 
11469
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
11470
      else
 
11471
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11472
      fi
 
11473
      ;;
 
11474
 
 
11475
    interix3*)
 
11476
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
11477
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11478
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
11479
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
11480
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
11481
      # Instead, shared libraries are loaded at an image base (0x10000000 by
 
11482
      # default) and relocated if they conflict, which is a slow very memory
 
11483
      # consuming and fragmenting process.  To avoid this, we pick a random,
 
11484
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
11485
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
11486
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
11487
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
11488
      ;;
 
11489
 
 
11490
    linux* | k*bsd*-gnu)
 
11491
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
11492
        tmp_addflag=
 
11493
        case $cc_basename,$host_cpu in
 
11494
        pgcc*)                          # Portland Group C compiler
 
11495
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
11496
          tmp_addflag=' $pic_flag'
 
11497
          ;;
 
11498
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
 
11499
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
11500
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
11501
        ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
 
11502
          tmp_addflag=' -i_dynamic' ;;
 
11503
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
11504
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
11505
        ifc* | ifort*)                  # Intel Fortran compiler
 
11506
          tmp_addflag=' -nofor_main' ;;
 
11507
        esac
 
11508
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
11509
 
 
11510
        if test $supports_anon_versioning = yes; then
 
11511
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
 
11512
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
11513
  $echo "local: *; };" >> $output_objdir/$libname.ver~
 
11514
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
11515
        fi
 
11516
        _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 
11517
      else
 
11518
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11519
      fi
 
11520
      ;;
 
11521
 
 
11522
    netbsd* | netbsdelf*-gnu)
 
11523
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
11524
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
11525
        wlarc=
 
11526
      else
 
11527
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
11528
        _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'
 
11529
      fi
 
11530
      ;;
 
11531
 
 
11532
    solaris*)
 
11533
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 
11534
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11535
        cat <<EOF 1>&2
 
11536
 
 
11537
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
11538
*** create shared libraries on Solaris systems.  Therefore, libtool
 
11539
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
11540
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
11541
*** your PATH or compiler configuration so that the native linker is
 
11542
*** used, and then restart.
 
11543
 
 
11544
EOF
 
11545
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
11546
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
11547
        _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'
 
11548
      else
 
11549
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11550
      fi
 
11551
      ;;
 
11552
 
 
11553
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
 
11554
      case `$LD -v 2>&1` in
 
11555
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
 
11556
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11557
        cat <<_LT_EOF 1>&2
 
11558
 
 
11559
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 
11560
*** reliably create shared libraries on SCO systems.  Therefore, libtool
 
11561
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
11562
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
 
11563
*** your PATH or compiler configuration so that the native linker is
 
11564
*** used, and then restart.
 
11565
 
 
11566
_LT_EOF
 
11567
        ;;
 
11568
        *)
 
11569
          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
11570
            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
 
11571
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
 
11572
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
 
11573
          else
 
11574
            _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11575
          fi
 
11576
        ;;
 
11577
      esac
 
11578
      ;;
 
11579
 
 
11580
    sunos4*)
 
11581
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
11582
      wlarc=
 
11583
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11584
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11585
      ;;
 
11586
 
 
11587
    *)
 
11588
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
11589
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
11590
        _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'
 
11591
      else
 
11592
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11593
      fi
 
11594
      ;;
 
11595
    esac
 
11596
 
 
11597
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
 
11598
      runpath_var=
 
11599
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
11600
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
11601
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
11602
    fi
 
11603
  else
 
11604
    # PORTME fill in a description of your system's linker (not GNU ld)
 
11605
    case $host_os in
 
11606
    aix3*)
 
11607
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
11608
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
11609
      _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'
 
11610
      # Note: this linker hardcodes the directories in LIBPATH if there
 
11611
      # are no directories specified by -L.
 
11612
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11613
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 
11614
        # Neither direct hardcoding nor static linking is supported with a
 
11615
        # broken collect2.
 
11616
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
11617
      fi
 
11618
      ;;
 
11619
 
 
11620
    aix4* | aix5*)
 
11621
      if test "$host_cpu" = ia64; then
 
11622
        # On IA64, the linker does run time linking by default, so we don't
 
11623
        # have to do anything special.
 
11624
        aix_use_runtimelinking=no
 
11625
        exp_sym_flag='-Bexport'
 
11626
        no_entry_flag=""
 
11627
      else
 
11628
        # If we're using GNU nm, then we don't want the "-C" option.
 
11629
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
11630
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
11631
          _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'
 
11632
        else
 
11633
          _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'
 
11634
        fi
 
11635
        aix_use_runtimelinking=no
 
11636
 
 
11637
        # Test if we are trying to use run time linking or normal
 
11638
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
11639
        # need to do runtime linking.
 
11640
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
11641
          for ld_flag in $LDFLAGS; do
 
11642
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
11643
            aix_use_runtimelinking=yes
 
11644
            break
 
11645
          fi
 
11646
          done
 
11647
          ;;
 
11648
        esac
 
11649
 
 
11650
        exp_sym_flag='-bexport'
 
11651
        no_entry_flag='-bnoentry'
 
11652
      fi
 
11653
 
 
11654
      # When large executables or shared objects are built, AIX ld can
 
11655
      # have problems creating the table of contents.  If linking a library
 
11656
      # or program results in "error TOC overflow" add -mminimal-toc to
 
11657
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
11658
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
11659
 
 
11660
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
11661
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11662
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
11663
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
11664
 
 
11665
      if test "$GCC" = yes; then
 
11666
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
11667
        # We only want to do this on AIX 4.2 and lower, the check
 
11668
        # below for broken collect2 doesn't work under 4.3+
 
11669
          collect2name=`${CC} -print-prog-name=collect2`
 
11670
          if test -f "$collect2name" && \
 
11671
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
11672
          then
 
11673
          # We have reworked collect2
 
11674
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11675
          else
 
11676
          # We have old collect2
 
11677
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
11678
          # It fails to find uninstalled libraries when the uninstalled
 
11679
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
11680
          # to unsupported forces relinking
 
11681
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11682
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
11683
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
11684
          fi
 
11685
          ;;
 
11686
        esac
 
11687
        shared_flag='-shared'
 
11688
        if test "$aix_use_runtimelinking" = yes; then
 
11689
          shared_flag="$shared_flag "'${wl}-G'
 
11690
        fi
 
11691
      else
 
11692
        # not using gcc
 
11693
        if test "$host_cpu" = ia64; then
 
11694
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
11695
        # chokes on -Wl,-G. The following line is correct:
 
11696
          shared_flag='-G'
 
11697
        else
 
11698
          if test "$aix_use_runtimelinking" = yes; then
 
11699
            shared_flag='${wl}-G'
 
11700
          else
 
11701
            shared_flag='${wl}-bM:SRE'
 
11702
          fi
 
11703
        fi
 
11704
      fi
 
11705
 
 
11706
      # It seems that -bexpall does not export symbols beginning with
 
11707
      # underscore (_), so it is better to generate a list of symbols to export.
 
11708
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
11709
      if test "$aix_use_runtimelinking" = yes; then
 
11710
        # Warning - without using the other runtime loading flags (-brtl),
 
11711
        # -berok will link without error, but may produce a broken library.
 
11712
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
11713
       # Determine the default libpath from the value encoded in an empty executable.
 
11714
       _LT_AC_SYS_LIBPATH_AIX
 
11715
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
11716
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $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"
 
11717
       else
 
11718
        if test "$host_cpu" = ia64; then
 
11719
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
11720
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
11721
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
 
11722
        else
 
11723
         # Determine the default libpath from the value encoded in an empty executable.
 
11724
         _LT_AC_SYS_LIBPATH_AIX
 
11725
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
11726
          # Warning - without using the other run time loading flags,
 
11727
          # -berok will link without error, but may produce a broken library.
 
11728
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
11729
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
11730
          # Exported symbols can be pulled into shared objects from archives
 
11731
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
11732
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
11733
          # This is similar to how AIX traditionally builds its shared libraries.
 
11734
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
11735
        fi
 
11736
      fi
 
11737
      ;;
 
11738
 
 
11739
    amigaos*)
 
11740
      _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)'
 
11741
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
11742
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11743
      # see comment about different semantics on the GNU ld section
 
11744
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11745
      ;;
 
11746
 
 
11747
    bsdi[[45]]*)
 
11748
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
11749
      ;;
 
11750
 
 
11751
    cygwin* | mingw* | pw32*)
 
11752
      # When not using gcc, we currently assume that we are using
 
11753
      # Microsoft Visual C++.
 
11754
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
11755
      # no search path for DLLs.
 
11756
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
11757
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
11758
      # Tell ltmain to make .lib files, not .a files.
 
11759
      libext=lib
 
11760
      # Tell ltmain to make .dll files, not .so files.
 
11761
      shrext_cmds=".dll"
 
11762
      # FIXME: Setting linknames here is a bad hack.
 
11763
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
11764
      # The linker will automatically build a .lib file if we build a DLL.
 
11765
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
11766
      # FIXME: Should let the user specify the lib program.
 
11767
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
11768
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
 
11769
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
11770
      ;;
 
11771
 
 
11772
    darwin* | rhapsody*)
 
11773
      case $host_os in
 
11774
        rhapsody* | darwin1.[[012]])
 
11775
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
11776
         ;;
 
11777
       *) # Darwin 1.3 on
 
11778
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
11779
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
11780
         else
 
11781
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
11782
             10.[[012]])
 
11783
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
11784
               ;;
 
11785
             10.*)
 
11786
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
11787
               ;;
 
11788
           esac
 
11789
         fi
 
11790
         ;;
 
11791
      esac
 
11792
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
11793
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
11794
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
11795
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
11796
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
11797
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
11798
    if test "$GCC" = yes ; then
 
11799
        output_verbose_link_cmd='echo'
 
11800
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
11801
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
11802
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
11803
      _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}'
 
11804
      _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}'
 
11805
    else
 
11806
      case $cc_basename in
 
11807
        xlc*)
 
11808
         output_verbose_link_cmd='echo'
 
11809
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
11810
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
11811
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
11812
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
11813
          _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}'
 
11814
          ;;
 
11815
       *)
 
11816
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11817
          ;;
 
11818
      esac
 
11819
    fi
 
11820
      ;;
 
11821
 
 
11822
    dgux*)
 
11823
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
11824
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
11825
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11826
      ;;
 
11827
 
 
11828
    freebsd1*)
 
11829
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
11830
      ;;
 
11831
 
 
11832
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
11833
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
11834
    # does not break anything, and helps significantly (at the cost of a little
 
11835
    # extra space).
 
11836
    freebsd2.2*)
 
11837
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
11838
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
11839
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11840
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11841
      ;;
 
11842
 
 
11843
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
11844
    freebsd2*)
 
11845
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
11846
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11847
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11848
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11849
      ;;
 
11850
 
 
11851
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
11852
    freebsd* | dragonfly*)
 
11853
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
11854
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
11855
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11856
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11857
      ;;
 
11858
 
 
11859
    hpux9*)
 
11860
      if test "$GCC" = yes; then
 
11861
        _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'
 
11862
      else
 
11863
        _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'
 
11864
      fi
 
11865
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
11866
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
11867
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11868
 
 
11869
      # hardcode_minus_L: Not really in the search PATH,
 
11870
      # but as the default location of the library.
 
11871
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11872
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
11873
      ;;
 
11874
 
 
11875
    hpux10*)
 
11876
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
11877
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
11878
      else
 
11879
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
11880
      fi
 
11881
      if test "$with_gnu_ld" = no; then
 
11882
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
11883
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
11884
 
 
11885
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11886
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
11887
 
 
11888
        # hardcode_minus_L: Not really in the search PATH,
 
11889
        # but as the default location of the library.
 
11890
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11891
      fi
 
11892
      ;;
 
11893
 
 
11894
    hpux11*)
 
11895
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
11896
        case $host_cpu in
 
11897
        hppa*64*)
 
11898
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
11899
          ;;
 
11900
        ia64*)
 
11901
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
11902
          ;;
 
11903
        *)
 
11904
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
11905
          ;;
 
11906
        esac
 
11907
      else
 
11908
        case $host_cpu in
 
11909
        hppa*64*)
 
11910
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
11911
          ;;
 
11912
        ia64*)
 
11913
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
11914
          ;;
 
11915
        *)
 
11916
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
11917
          ;;
 
11918
        esac
 
11919
      fi
 
11920
      if test "$with_gnu_ld" = no; then
 
11921
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
11922
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
11923
 
 
11924
        case $host_cpu in
 
11925
        hppa*64*|ia64*)
 
11926
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
11927
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
11928
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11929
          ;;
 
11930
        *)
 
11931
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11932
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
11933
 
 
11934
          # hardcode_minus_L: Not really in the search PATH,
 
11935
          # but as the default location of the library.
 
11936
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11937
          ;;
 
11938
        esac
 
11939
      fi
 
11940
      ;;
 
11941
 
 
11942
    irix5* | irix6* | nonstopux*)
 
11943
      if test "$GCC" = yes; then
 
11944
        _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'
 
11945
      else
 
11946
        _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'
 
11947
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
11948
      fi
 
11949
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
11950
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
11951
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
11952
      ;;
 
11953
 
 
11954
    netbsd* | netbsdelf*-gnu)
 
11955
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
11956
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
11957
      else
 
11958
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
11959
      fi
 
11960
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
11961
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11962
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11963
      ;;
 
11964
 
 
11965
    newsos6)
 
11966
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
11967
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11968
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
11969
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
11970
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11971
      ;;
 
11972
 
 
11973
    openbsd*)
 
11974
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
11975
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
11976
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
11977
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
11978
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
11979
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
11980
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
11981
      else
 
11982
       case $host_os in
 
11983
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
11984
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
11985
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
11986
           ;;
 
11987
         *)
 
11988
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
11989
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
11990
           ;;
 
11991
       esac
 
11992
      fi
 
11993
      ;;
 
11994
 
 
11995
    os2*)
 
11996
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
11997
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
11998
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
11999
      _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'
 
12000
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
12001
      ;;
 
12002
 
 
12003
    osf3*)
 
12004
      if test "$GCC" = yes; then
 
12005
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
12006
        _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'
 
12007
      else
 
12008
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
12009
        _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'
 
12010
      fi
 
12011
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
12012
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
12013
      ;;
 
12014
 
 
12015
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
12016
      if test "$GCC" = yes; then
 
12017
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
12018
        _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'
 
12019
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
12020
      else
 
12021
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
12022
        _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'
 
12023
        _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~
 
12024
        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
12025
 
 
12026
        # Both c and cxx compiler support -rpath directly
 
12027
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
12028
      fi
 
12029
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
12030
      ;;
 
12031
 
 
12032
    solaris*)
 
12033
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
12034
      if test "$GCC" = yes; then
 
12035
        wlarc='${wl}'
 
12036
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
12037
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
12038
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
12039
      else
 
12040
        wlarc=''
 
12041
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
12042
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
12043
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
12044
      fi
 
12045
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
12046
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
12047
      case $host_os in
 
12048
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
12049
      *)
 
12050
        # The compiler driver will combine linker options so we
 
12051
        # cannot just pass the convience library names through
 
12052
        # without $wl, iff we do not link with $LD.
 
12053
        # Luckily, gcc supports the same syntax we need for Sun Studio.
 
12054
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
12055
        case $wlarc in
 
12056
        '')
 
12057
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
12058
        *)
 
12059
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
 
12060
        esac ;;
 
12061
      esac
 
12062
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
12063
      ;;
 
12064
 
 
12065
    sunos4*)
 
12066
      if test "x$host_vendor" = xsequent; then
 
12067
        # Use $CC to link under sequent, because it throws in some extra .o
 
12068
        # files that make .init and .fini sections work.
 
12069
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
12070
      else
 
12071
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
12072
      fi
 
12073
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
12074
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
12075
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
12076
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
12077
      ;;
 
12078
 
 
12079
    sysv4)
 
12080
      case $host_vendor in
 
12081
        sni)
 
12082
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
12083
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
12084
        ;;
 
12085
        siemens)
 
12086
          ## LD is ld it makes a PLAMLIB
 
12087
          ## CC just makes a GrossModule.
 
12088
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
12089
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
12090
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
12091
        ;;
 
12092
        motorola)
 
12093
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
12094
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
12095
        ;;
 
12096
      esac
 
12097
      runpath_var='LD_RUN_PATH'
 
12098
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
12099
      ;;
 
12100
 
 
12101
    sysv4.3*)
 
12102
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
12103
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
12104
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
12105
      ;;
 
12106
 
 
12107
    sysv4*MP*)
 
12108
      if test -d /usr/nec; then
 
12109
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
12110
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
12111
        runpath_var=LD_RUN_PATH
 
12112
        hardcode_runpath_var=yes
 
12113
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
12114
      fi
 
12115
      ;;
 
12116
 
 
12117
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
 
12118
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
12119
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
12120
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
12121
      runpath_var='LD_RUN_PATH'
 
12122
 
 
12123
      if test "$GCC" = yes; then
 
12124
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
12125
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
12126
      else
 
12127
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
12128
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
12129
      fi
 
12130
      ;;
 
12131
 
 
12132
    sysv5* | sco3.2v5* | sco5v6*)
 
12133
      # Note: We can NOT use -z defs as we might desire, because we do not
 
12134
      # link with -lc, and that would cause any symbols used from libc to
 
12135
      # always be unresolved, which means just about no library would
 
12136
      # ever link correctly.  If we're not using GNU ld we use -z text
 
12137
      # though, which does catch some bad symbols but isn't as heavy-handed
 
12138
      # as -z defs.
 
12139
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
12140
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
12141
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
12142
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
12143
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
 
12144
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
12145
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
12146
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
12147
      runpath_var='LD_RUN_PATH'
 
12148
 
 
12149
      if test "$GCC" = yes; then
 
12150
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
12151
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
12152
      else
 
12153
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
12154
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
12155
      fi
 
12156
      ;;
 
12157
 
 
12158
    uts4*)
 
12159
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
12160
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
12161
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
12162
      ;;
 
12163
 
 
12164
    *)
 
12165
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
12166
      ;;
 
12167
    esac
 
12168
  fi
 
12169
])
 
12170
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
12171
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
12172
 
 
12173
#
 
12174
# Do we need to explicitly link libc?
 
12175
#
 
12176
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
12177
x|xyes)
 
12178
  # Assume -lc should be added
 
12179
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
12180
 
 
12181
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
12182
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
12183
    *'~'*)
 
12184
      # FIXME: we may have to deal with multi-command sequences.
 
12185
      ;;
 
12186
    '$CC '*)
 
12187
      # Test whether the compiler implicitly links with -lc since on some
 
12188
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
12189
      # to ld, don't add -lc before -lgcc.
 
12190
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
12191
      $rm conftest*
 
12192
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
12193
 
 
12194
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
12195
        soname=conftest
 
12196
        lib=conftest
 
12197
        libobjs=conftest.$ac_objext
 
12198
        deplibs=
 
12199
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
12200
        pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
 
12201
        compiler_flags=-v
 
12202
        linker_flags=-v
 
12203
        verstring=
 
12204
        output_objdir=.
 
12205
        libname=conftest
 
12206
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
12207
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
12208
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
12209
        then
 
12210
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
12211
        else
 
12212
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
12213
        fi
 
12214
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
12215
      else
 
12216
        cat conftest.err 1>&5
 
12217
      fi
 
12218
      $rm conftest*
 
12219
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
12220
      ;;
 
12221
    esac
 
12222
  fi
 
12223
  ;;
 
12224
esac
 
12225
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
12226
 
 
12227
 
 
12228
# _LT_AC_FILE_LTDLL_C
 
12229
# -------------------
 
12230
# Be careful that the start marker always follows a newline.
 
12231
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
 
12232
# /* ltdll.c starts here */
 
12233
# #define WIN32_LEAN_AND_MEAN
 
12234
# #include <windows.h>
 
12235
# #undef WIN32_LEAN_AND_MEAN
 
12236
# #include <stdio.h>
 
12237
#
 
12238
# #ifndef __CYGWIN__
 
12239
# #  ifdef __CYGWIN32__
 
12240
# #    define __CYGWIN__ __CYGWIN32__
 
12241
# #  endif
 
12242
# #endif
 
12243
#
 
12244
# #ifdef __cplusplus
 
12245
# extern "C" {
 
12246
# #endif
 
12247
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
 
12248
# #ifdef __cplusplus
 
12249
# }
 
12250
# #endif
 
12251
#
 
12252
# #ifdef __CYGWIN__
 
12253
# #include <cygwin/cygwin_dll.h>
 
12254
# DECLARE_CYGWIN_DLL( DllMain );
 
12255
# #endif
 
12256
# HINSTANCE __hDllInstance_base;
 
12257
#
 
12258
# BOOL APIENTRY
 
12259
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
 
12260
# {
 
12261
#   __hDllInstance_base = hInst;
 
12262
#   return TRUE;
 
12263
# }
 
12264
# /* ltdll.c ends here */
 
12265
])# _LT_AC_FILE_LTDLL_C
 
12266
 
 
12267
 
 
12268
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
12269
# ---------------------------------
 
12270
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
12271
 
 
12272
 
 
12273
# old names
 
12274
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
 
12275
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
 
12276
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
 
12277
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
12278
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
12279
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
 
12280
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
 
12281
 
 
12282
# This is just to silence aclocal about the macro not being used
 
12283
ifelse([AC_DISABLE_FAST_INSTALL])
 
12284
 
 
12285
AC_DEFUN([LT_AC_PROG_GCJ],
 
12286
[AC_CHECK_TOOL(GCJ, gcj, no)
 
12287
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
12288
  AC_SUBST(GCJFLAGS)
 
12289
])
 
12290
 
 
12291
AC_DEFUN([LT_AC_PROG_RC],
 
12292
[AC_CHECK_TOOL(RC, windres, no)
 
12293
])
 
12294
 
 
12295
# NOTE: This macro has been submitted for inclusion into   #
 
12296
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
12297
#  a released version of Autoconf we should remove this    #
 
12298
#  macro and use it instead.                               #
 
12299
# LT_AC_PROG_SED
 
12300
# --------------
 
12301
# Check for a fully-functional sed program, that truncates
 
12302
# as few characters as possible.  Prefer GNU sed if found.
 
12303
AC_DEFUN([LT_AC_PROG_SED],
 
12304
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
12305
AC_CACHE_VAL(lt_cv_path_SED,
 
12306
[# Loop through the user's path and test for sed and gsed.
 
12307
# Then use that list of sed's as ones to test for truncation.
 
12308
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
12309
for as_dir in $PATH
 
12310
do
 
12311
  IFS=$as_save_IFS
 
12312
  test -z "$as_dir" && as_dir=.
 
12313
  for lt_ac_prog in sed gsed; do
 
12314
    for ac_exec_ext in '' $ac_executable_extensions; do
 
12315
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
12316
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
12317
      fi
 
12318
    done
 
12319
  done
 
12320
done
 
12321
lt_ac_max=0
 
12322
lt_ac_count=0
 
12323
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
12324
# along with /bin/sed that truncates output.
 
12325
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
12326
  test ! -f $lt_ac_sed && continue
 
12327
  cat /dev/null > conftest.in
 
12328
  lt_ac_count=0
 
12329
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
12330
  # Check for GNU sed and select it if it is found.
 
12331
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
12332
    lt_cv_path_SED=$lt_ac_sed
 
12333
    break
 
12334
  fi
 
12335
  while true; do
 
12336
    cat conftest.in conftest.in >conftest.tmp
 
12337
    mv conftest.tmp conftest.in
 
12338
    cp conftest.in conftest.nl
 
12339
    echo >>conftest.nl
 
12340
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
12341
    cmp -s conftest.out conftest.nl || break
 
12342
    # 10000 chars as input seems more than enough
 
12343
    test $lt_ac_count -gt 10 && break
 
12344
    lt_ac_count=`expr $lt_ac_count + 1`
 
12345
    if test $lt_ac_count -gt $lt_ac_max; then
 
12346
      lt_ac_max=$lt_ac_count
 
12347
      lt_cv_path_SED=$lt_ac_sed
 
12348
    fi
 
12349
  done
 
12350
done
 
12351
])
 
12352
SED=$lt_cv_path_SED
 
12353
AC_MSG_RESULT([$SED])
 
12354
])
 
12355
 
 
12356
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
 
12357
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
 
12358
dnl also defines GSTUFF_PKG_ERRORS on error
 
12359
AC_DEFUN([PKG_CHECK_MODULES], [
 
12360
  succeeded=no
 
12361
 
 
12362
  if test -z "$PKG_CONFIG"; then
 
12363
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
12364
  fi
 
12365
 
 
12366
  if test "$PKG_CONFIG" = "no" ; then
 
12367
     echo "*** The pkg-config script could not be found. Make sure it is"
 
12368
     echo "*** in your path, or set the PKG_CONFIG environment variable"
 
12369
     echo "*** to the full path to pkg-config."
 
12370
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
 
12371
  else
 
12372
     PKG_CONFIG_MIN_VERSION=0.9.0
 
12373
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
 
12374
        AC_MSG_CHECKING(for $2)
 
12375
 
 
12376
        if $PKG_CONFIG --exists "$2" ; then
 
12377
            AC_MSG_RESULT(yes)
 
12378
            succeeded=yes
 
12379
 
 
12380
            AC_MSG_CHECKING($1_CFLAGS)
 
12381
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
 
12382
            AC_MSG_RESULT($$1_CFLAGS)
 
12383
 
 
12384
            AC_MSG_CHECKING($1_LIBS)
 
12385
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
 
12386
            AC_MSG_RESULT($$1_LIBS)
 
12387
        else
 
12388
            $1_CFLAGS=""
 
12389
            $1_LIBS=""
 
12390
            ## If we have a custom action on failure, don't print errors, but 
 
12391
            ## do set a variable so people can do so.
 
12392
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
12393
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
 
12394
        fi
 
12395
 
 
12396
        AC_SUBST($1_CFLAGS)
 
12397
        AC_SUBST($1_LIBS)
 
12398
     else
 
12399
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
 
12400
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
 
12401
     fi
 
12402
  fi
 
12403
 
 
12404
  if test $succeeded = yes; then
 
12405
     ifelse([$3], , :, [$3])
 
12406
  else
 
12407
     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
 
12408
  fi
 
12409
])
 
12410
 
 
12411
 
 
12412
 
 
12413
# AM_CONDITIONAL                                              -*- Autoconf -*-
 
12414
 
 
12415
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
 
12416
 
 
12417
# This program is free software; you can redistribute it and/or modify
 
12418
# it under the terms of the GNU General Public License as published by
 
12419
# the Free Software Foundation; either version 2, or (at your option)
 
12420
# any later version.
 
12421
 
 
12422
# This program is distributed in the hope that it will be useful,
 
12423
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12424
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12425
# GNU General Public License for more details.
 
12426
 
 
12427
# You should have received a copy of the GNU General Public License
 
12428
# along with this program; if not, write to the Free Software
 
12429
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12430
# 02111-1307, USA.
 
12431
 
 
12432
# serial 5
 
12433
 
 
12434
AC_PREREQ(2.52)
 
12435
 
 
12436
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
12437
# -------------------------------------
 
12438
# Define a conditional.
 
12439
AC_DEFUN([AM_CONDITIONAL],
 
12440
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
12441
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
12442
AC_SUBST([$1_TRUE])
 
12443
AC_SUBST([$1_FALSE])
 
12444
if $2; then
 
12445
  $1_TRUE=
 
12446
  $1_FALSE='#'
 
12447
else
 
12448
  $1_TRUE='#'
 
12449
  $1_FALSE=
 
12450
fi
 
12451
AC_CONFIG_COMMANDS_PRE(
 
12452
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
12453
  AC_MSG_ERROR([conditional "$1" was never defined.
 
12454
Usually this means the macro was only invoked conditionally.])
 
12455
fi])])
 
12456
 
 
12457
# Do all the work for Automake.                            -*- Autoconf -*-
 
12458
 
 
12459
# This macro actually does too much some checks are only needed if
 
12460
# your package does certain things.  But this isn't really a big deal.
 
12461
 
 
12462
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
 
12463
# Free Software Foundation, Inc.
 
12464
 
 
12465
# This program is free software; you can redistribute it and/or modify
 
12466
# it under the terms of the GNU General Public License as published by
 
12467
# the Free Software Foundation; either version 2, or (at your option)
 
12468
# any later version.
 
12469
 
 
12470
# This program is distributed in the hope that it will be useful,
 
12471
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12472
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12473
# GNU General Public License for more details.
 
12474
 
 
12475
# You should have received a copy of the GNU General Public License
 
12476
# along with this program; if not, write to the Free Software
 
12477
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12478
# 02111-1307, USA.
 
12479
 
 
12480
# serial 10
 
12481
 
 
12482
AC_PREREQ([2.54])
 
12483
 
 
12484
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
 
12485
# the ones we care about.
 
12486
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
12487
 
 
12488
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
12489
# AM_INIT_AUTOMAKE([OPTIONS])
 
12490
# -----------------------------------------------
 
12491
# The call with PACKAGE and VERSION arguments is the old style
 
12492
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
12493
# and VERSION should now be passed to AC_INIT and removed from
 
12494
# the call to AM_INIT_AUTOMAKE.
 
12495
# We support both call styles for the transition.  After
 
12496
# the next Automake release, Autoconf can make the AC_INIT
 
12497
# arguments mandatory, and then we can depend on a new Autoconf
 
12498
# release and drop the old call support.
 
12499
AC_DEFUN([AM_INIT_AUTOMAKE],
 
12500
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
12501
 AC_REQUIRE([AC_PROG_INSTALL])dnl
 
12502
# test to see if srcdir already configured
 
12503
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
12504
   test -f $srcdir/config.status; then
 
12505
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
12506
fi
 
12507
 
 
12508
# test whether we have cygpath
 
12509
if test -z "$CYGPATH_W"; then
 
12510
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
12511
    CYGPATH_W='cygpath -w'
 
12512
  else
 
12513
    CYGPATH_W=echo
 
12514
  fi
 
12515
fi
 
12516
AC_SUBST([CYGPATH_W])
 
12517
 
 
12518
# Define the identity of the package.
 
12519
dnl Distinguish between old-style and new-style calls.
 
12520
m4_ifval([$2],
 
12521
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
12522
 AC_SUBST([PACKAGE], [$1])dnl
 
12523
 AC_SUBST([VERSION], [$2])],
 
12524
[_AM_SET_OPTIONS([$1])dnl
 
12525
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
12526
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
12527
 
 
12528
_AM_IF_OPTION([no-define],,
 
12529
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
12530
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
12531
 
 
12532
# Some tools Automake needs.
 
12533
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
12534
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
12535
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
12536
AM_MISSING_PROG(AUTOCONF, autoconf)
 
12537
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
12538
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
12539
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
12540
AM_MISSING_PROG(AMTAR, tar)
 
12541
AM_PROG_INSTALL_SH
 
12542
AM_PROG_INSTALL_STRIP
 
12543
# We need awk for the "check" target.  The system "awk" is bad on
 
12544
# some platforms.
 
12545
AC_REQUIRE([AC_PROG_AWK])dnl
 
12546
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
12547
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
12548
 
 
12549
_AM_IF_OPTION([no-dependencies],,
 
12550
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
12551
                  [_AM_DEPENDENCIES(CC)],
 
12552
                  [define([AC_PROG_CC],
 
12553
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
12554
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
12555
                  [_AM_DEPENDENCIES(CXX)],
 
12556
                  [define([AC_PROG_CXX],
 
12557
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
12558
])
 
12559
])
 
12560
 
 
12561
 
 
12562
# When config.status generates a header, we must update the stamp-h file.
 
12563
# This file resides in the same directory as the config header
 
12564
# that is generated.  The stamp files are numbered to have different names.
 
12565
 
 
12566
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
12567
# loop where config.status creates the headers, so we can generate
 
12568
# our stamp files there.
 
12569
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
12570
[# Compute $1's index in $config_headers.
 
12571
_am_stamp_count=1
 
12572
for _am_header in $config_headers :; do
 
12573
  case $_am_header in
 
12574
    $1 | $1:* )
 
12575
      break ;;
 
12576
    * )
 
12577
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
12578
  esac
 
12579
done
 
12580
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
12581
 
 
12582
# Copyright 2002  Free Software Foundation, Inc.
 
12583
 
 
12584
# This program is free software; you can redistribute it and/or modify
 
12585
# it under the terms of the GNU General Public License as published by
 
12586
# the Free Software Foundation; either version 2, or (at your option)
 
12587
# any later version.
 
12588
 
 
12589
# This program is distributed in the hope that it will be useful,
 
12590
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12591
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12592
# GNU General Public License for more details.
 
12593
 
 
12594
# You should have received a copy of the GNU General Public License
 
12595
# along with this program; if not, write to the Free Software
 
12596
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19
12597
 
20
12598
# AM_AUTOMAKE_VERSION(VERSION)
21
12599
# ----------------------------
22
12600
# Automake X.Y traces this macro to ensure aclocal.m4 has been
23
12601
# generated from the m4 files accompanying Automake X.Y.
24
 
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
12602
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
25
12603
 
26
12604
# AM_SET_CURRENT_AUTOMAKE_VERSION
27
12605
# -------------------------------
28
12606
# Call AM_AUTOMAKE_VERSION so it can be traced.
29
12607
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
30
12608
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
31
 
         [AM_AUTOMAKE_VERSION([1.9.6])])
32
 
 
33
 
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
34
 
 
35
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
36
 
#
37
 
# This file is free software; the Free Software Foundation
38
 
# gives unlimited permission to copy and/or distribute it,
39
 
# with or without modifications, as long as this notice is preserved.
 
12609
         [AM_AUTOMAKE_VERSION([1.7.9])])
 
12610
 
 
12611
# Helper functions for option handling.                    -*- Autoconf -*-
 
12612
 
 
12613
# Copyright 2001, 2002  Free Software Foundation, Inc.
 
12614
 
 
12615
# This program is free software; you can redistribute it and/or modify
 
12616
# it under the terms of the GNU General Public License as published by
 
12617
# the Free Software Foundation; either version 2, or (at your option)
 
12618
# any later version.
 
12619
 
 
12620
# This program is distributed in the hope that it will be useful,
 
12621
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12622
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12623
# GNU General Public License for more details.
 
12624
 
 
12625
# You should have received a copy of the GNU General Public License
 
12626
# along with this program; if not, write to the Free Software
 
12627
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12628
# 02111-1307, USA.
 
12629
 
 
12630
# serial 2
 
12631
 
 
12632
# _AM_MANGLE_OPTION(NAME)
 
12633
# -----------------------
 
12634
AC_DEFUN([_AM_MANGLE_OPTION],
 
12635
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
12636
 
 
12637
# _AM_SET_OPTION(NAME)
 
12638
# ------------------------------
 
12639
# Set option NAME.  Presently that only means defining a flag for this option.
 
12640
AC_DEFUN([_AM_SET_OPTION],
 
12641
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
12642
 
 
12643
# _AM_SET_OPTIONS(OPTIONS)
 
12644
# ----------------------------------
 
12645
# OPTIONS is a space-separated list of Automake options.
 
12646
AC_DEFUN([_AM_SET_OPTIONS],
 
12647
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
12648
 
 
12649
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
12650
# -------------------------------------------
 
12651
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
12652
AC_DEFUN([_AM_IF_OPTION],
 
12653
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
12654
 
 
12655
#
 
12656
# Check to make sure that the build environment is sane.
 
12657
#
 
12658
 
 
12659
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
12660
 
 
12661
# This program is free software; you can redistribute it and/or modify
 
12662
# it under the terms of the GNU General Public License as published by
 
12663
# the Free Software Foundation; either version 2, or (at your option)
 
12664
# any later version.
 
12665
 
 
12666
# This program is distributed in the hope that it will be useful,
 
12667
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12668
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12669
# GNU General Public License for more details.
 
12670
 
 
12671
# You should have received a copy of the GNU General Public License
 
12672
# along with this program; if not, write to the Free Software
 
12673
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12674
# 02111-1307, USA.
 
12675
 
 
12676
# serial 3
 
12677
 
 
12678
# AM_SANITY_CHECK
 
12679
# ---------------
 
12680
AC_DEFUN([AM_SANITY_CHECK],
 
12681
[AC_MSG_CHECKING([whether build environment is sane])
 
12682
# Just in case
 
12683
sleep 1
 
12684
echo timestamp > conftest.file
 
12685
# Do `set' in a subshell so we don't clobber the current shell's
 
12686
# arguments.  Must try -L first in case configure is actually a
 
12687
# symlink; some systems play weird games with the mod time of symlinks
 
12688
# (eg FreeBSD returns the mod time of the symlink's containing
 
12689
# directory).
 
12690
if (
 
12691
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
12692
   if test "$[*]" = "X"; then
 
12693
      # -L didn't work.
 
12694
      set X `ls -t $srcdir/configure conftest.file`
 
12695
   fi
 
12696
   rm -f conftest.file
 
12697
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
12698
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
12699
 
 
12700
      # If neither matched, then we have a broken ls.  This can happen
 
12701
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
12702
      # broken ls alias from the environment.  This has actually
 
12703
      # happened.  Such a system could not be considered "sane".
 
12704
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
12705
alias in your environment])
 
12706
   fi
 
12707
 
 
12708
   test "$[2]" = conftest.file
 
12709
   )
 
12710
then
 
12711
   # Ok.
 
12712
   :
 
12713
else
 
12714
   AC_MSG_ERROR([newly created file is older than distributed files!
 
12715
Check your system clock])
 
12716
fi
 
12717
AC_MSG_RESULT(yes)])
 
12718
 
 
12719
#  -*- Autoconf -*-
 
12720
 
 
12721
 
 
12722
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
12723
 
 
12724
# This program is free software; you can redistribute it and/or modify
 
12725
# it under the terms of the GNU General Public License as published by
 
12726
# the Free Software Foundation; either version 2, or (at your option)
 
12727
# any later version.
 
12728
 
 
12729
# This program is distributed in the hope that it will be useful,
 
12730
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12731
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12732
# GNU General Public License for more details.
 
12733
 
 
12734
# You should have received a copy of the GNU General Public License
 
12735
# along with this program; if not, write to the Free Software
 
12736
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12737
# 02111-1307, USA.
 
12738
 
 
12739
# serial 3
 
12740
 
 
12741
# AM_MISSING_PROG(NAME, PROGRAM)
 
12742
# ------------------------------
 
12743
AC_DEFUN([AM_MISSING_PROG],
 
12744
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
12745
$1=${$1-"${am_missing_run}$2"}
 
12746
AC_SUBST($1)])
 
12747
 
 
12748
 
 
12749
# AM_MISSING_HAS_RUN
 
12750
# ------------------
 
12751
# Define MISSING if not defined so far and test if it supports --run.
 
12752
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
12753
AC_DEFUN([AM_MISSING_HAS_RUN],
 
12754
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
12755
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
12756
# Use eval to expand $SHELL
 
12757
if eval "$MISSING --run true"; then
 
12758
  am_missing_run="$MISSING --run "
 
12759
else
 
12760
  am_missing_run=
 
12761
  AC_MSG_WARN([`missing' script is too old or missing])
 
12762
fi
 
12763
])
 
12764
 
 
12765
# AM_AUX_DIR_EXPAND
 
12766
 
 
12767
# Copyright 2001 Free Software Foundation, Inc.
 
12768
 
 
12769
# This program is free software; you can redistribute it and/or modify
 
12770
# it under the terms of the GNU General Public License as published by
 
12771
# the Free Software Foundation; either version 2, or (at your option)
 
12772
# any later version.
 
12773
 
 
12774
# This program is distributed in the hope that it will be useful,
 
12775
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12776
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12777
# GNU General Public License for more details.
 
12778
 
 
12779
# You should have received a copy of the GNU General Public License
 
12780
# along with this program; if not, write to the Free Software
 
12781
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12782
# 02111-1307, USA.
40
12783
 
41
12784
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42
12785
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
76
12819
# absolute PATH.  The drawback is that using absolute paths prevent a
77
12820
# configured tree to be moved without reconfiguration.
78
12821
 
79
 
AC_DEFUN([AM_AUX_DIR_EXPAND],
80
 
[dnl Rely on autoconf to set up CDPATH properly.
81
 
AC_PREREQ([2.50])dnl
 
12822
# Rely on autoconf to set up CDPATH properly.
 
12823
AC_PREREQ([2.50])
 
12824
 
 
12825
AC_DEFUN([AM_AUX_DIR_EXPAND], [
82
12826
# expand $ac_aux_dir to an absolute path
83
12827
am_aux_dir=`cd $ac_aux_dir && pwd`
84
12828
])
85
12829
 
86
 
# AM_CONDITIONAL                                            -*- Autoconf -*-
87
 
 
88
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
89
 
# Free Software Foundation, Inc.
90
 
#
91
 
# This file is free software; the Free Software Foundation
92
 
# gives unlimited permission to copy and/or distribute it,
93
 
# with or without modifications, as long as this notice is preserved.
94
 
 
95
 
# serial 7
96
 
 
97
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
98
 
# -------------------------------------
99
 
# Define a conditional.
100
 
AC_DEFUN([AM_CONDITIONAL],
101
 
[AC_PREREQ(2.52)dnl
102
 
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
103
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
104
 
AC_SUBST([$1_TRUE])
105
 
AC_SUBST([$1_FALSE])
106
 
if $2; then
107
 
  $1_TRUE=
108
 
  $1_FALSE='#'
 
12830
# AM_PROG_INSTALL_SH
 
12831
# ------------------
 
12832
# Define $install_sh.
 
12833
 
 
12834
# Copyright 2001 Free Software Foundation, Inc.
 
12835
 
 
12836
# This program is free software; you can redistribute it and/or modify
 
12837
# it under the terms of the GNU General Public License as published by
 
12838
# the Free Software Foundation; either version 2, or (at your option)
 
12839
# any later version.
 
12840
 
 
12841
# This program is distributed in the hope that it will be useful,
 
12842
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12843
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12844
# GNU General Public License for more details.
 
12845
 
 
12846
# You should have received a copy of the GNU General Public License
 
12847
# along with this program; if not, write to the Free Software
 
12848
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12849
# 02111-1307, USA.
 
12850
 
 
12851
AC_DEFUN([AM_PROG_INSTALL_SH],
 
12852
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
12853
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
12854
AC_SUBST(install_sh)])
 
12855
 
 
12856
# AM_PROG_INSTALL_STRIP
 
12857
 
 
12858
# Copyright 2001 Free Software Foundation, Inc.
 
12859
 
 
12860
# This program is free software; you can redistribute it and/or modify
 
12861
# it under the terms of the GNU General Public License as published by
 
12862
# the Free Software Foundation; either version 2, or (at your option)
 
12863
# any later version.
 
12864
 
 
12865
# This program is distributed in the hope that it will be useful,
 
12866
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12867
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12868
# GNU General Public License for more details.
 
12869
 
 
12870
# You should have received a copy of the GNU General Public License
 
12871
# along with this program; if not, write to the Free Software
 
12872
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12873
# 02111-1307, USA.
 
12874
 
 
12875
# One issue with vendor `install' (even GNU) is that you can't
 
12876
# specify the program used to strip binaries.  This is especially
 
12877
# annoying in cross-compiling environments, where the build's strip
 
12878
# is unlikely to handle the host's binaries.
 
12879
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
12880
# always use install-sh in `make install-strip', and initialize
 
12881
# STRIPPROG with the value of the STRIP variable (set by the user).
 
12882
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
12883
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
12884
# Installed binaries are usually stripped using `strip' when the user
 
12885
# run `make install-strip'.  However `strip' might not be the right
 
12886
# tool to use in cross-compilation environments, therefore Automake
 
12887
# will honor the `STRIP' environment variable to overrule this program.
 
12888
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
12889
if test "$cross_compiling" != no; then
 
12890
  AC_CHECK_TOOL([STRIP], [strip], :)
 
12891
fi
 
12892
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
12893
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
12894
 
 
12895
#                                                          -*- Autoconf -*-
 
12896
# Copyright (C) 2003  Free Software Foundation, Inc.
 
12897
 
 
12898
# This program is free software; you can redistribute it and/or modify
 
12899
# it under the terms of the GNU General Public License as published by
 
12900
# the Free Software Foundation; either version 2, or (at your option)
 
12901
# any later version.
 
12902
 
 
12903
# This program is distributed in the hope that it will be useful,
 
12904
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12905
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12906
# GNU General Public License for more details.
 
12907
 
 
12908
# You should have received a copy of the GNU General Public License
 
12909
# along with this program; if not, write to the Free Software
 
12910
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12911
# 02111-1307, USA.
 
12912
 
 
12913
# serial 1
 
12914
 
 
12915
# Check whether the underlying file-system supports filenames
 
12916
# with a leading dot.  For instance MS-DOS doesn't.
 
12917
AC_DEFUN([AM_SET_LEADING_DOT],
 
12918
[rm -rf .tst 2>/dev/null
 
12919
mkdir .tst 2>/dev/null
 
12920
if test -d .tst; then
 
12921
  am__leading_dot=.
109
12922
else
110
 
  $1_TRUE='#'
111
 
  $1_FALSE=
 
12923
  am__leading_dot=_
112
12924
fi
113
 
AC_CONFIG_COMMANDS_PRE(
114
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
115
 
  AC_MSG_ERROR([[conditional "$1" was never defined.
116
 
Usually this means the macro was only invoked conditionally.]])
117
 
fi])])
118
 
 
119
 
 
120
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
121
 
# Free Software Foundation, Inc.
122
 
#
123
 
# This file is free software; the Free Software Foundation
124
 
# gives unlimited permission to copy and/or distribute it,
125
 
# with or without modifications, as long as this notice is preserved.
126
 
 
127
 
# serial 8
 
12925
rmdir .tst 2>/dev/null
 
12926
AC_SUBST([am__leading_dot])])
 
12927
 
 
12928
# serial 5                                              -*- Autoconf -*-
 
12929
 
 
12930
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 
12931
 
 
12932
# This program is free software; you can redistribute it and/or modify
 
12933
# it under the terms of the GNU General Public License as published by
 
12934
# the Free Software Foundation; either version 2, or (at your option)
 
12935
# any later version.
 
12936
 
 
12937
# This program is distributed in the hope that it will be useful,
 
12938
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12939
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12940
# GNU General Public License for more details.
 
12941
 
 
12942
# You should have received a copy of the GNU General Public License
 
12943
# along with this program; if not, write to the Free Software
 
12944
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
12945
# 02111-1307, USA.
 
12946
 
128
12947
 
129
12948
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
130
12949
# written in clear, in which case automake, when reading aclocal.m4,
133
12952
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
134
12953
 
135
12954
 
 
12955
 
136
12956
# _AM_DEPENDENCIES(NAME)
137
12957
# ----------------------
138
12958
# See how the compiler implements dependency checking.
191
13011
    : > sub/conftest.c
192
13012
    for i in 1 2 3 4 5 6; do
193
13013
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
194
 
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
195
 
      # Solaris 8's {/usr,}/bin/sh.
196
 
      touch sub/conftst$i.h
 
13014
      : > sub/conftst$i.h
197
13015
    done
198
13016
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
199
13017
 
221
13039
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
222
13040
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
223
13041
      # icc doesn't choke on unknown options, it will just issue warnings
224
 
      # or remarks (even with -Werror).  So we grep stderr for any message
225
 
      # that says an option was ignored or not supported.
226
 
      # When given -MP, icc 7.0 and 7.1 complain thusly:
227
 
      #   icc: Command line warning: ignoring option '-M'; no argument required
228
 
      # The diagnosis changed in icc 8.0:
229
 
      #   icc: Command line remark: option '-MP' not supported
230
 
      if (grep 'ignoring option' conftest.err ||
231
 
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
13042
      # (even with -Werror).  So we grep stderr for any message
 
13043
      # that says an option was ignored.
 
13044
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
232
13045
        am_cv_$1_dependencies_compiler_type=$depmode
233
13046
        break
234
13047
      fi
262
13075
# ------------
263
13076
AC_DEFUN([AM_DEP_TRACK],
264
13077
[AC_ARG_ENABLE(dependency-tracking,
265
 
[  --disable-dependency-tracking  speeds up one-time build
266
 
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
13078
[  --disable-dependency-tracking Speeds up one-time builds
 
13079
  --enable-dependency-tracking  Do not reject slow dependency extractors])
267
13080
if test "x$enable_dependency_tracking" != xno; then
268
13081
  am_depcomp="$ac_aux_dir/depcomp"
269
13082
  AMDEPBACKSLASH='\'
272
13085
AC_SUBST([AMDEPBACKSLASH])
273
13086
])
274
13087
 
275
 
# Generate code to set up dependency tracking.              -*- Autoconf -*-
276
 
 
277
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
278
 
# Free Software Foundation, Inc.
279
 
#
280
 
# This file is free software; the Free Software Foundation
281
 
# gives unlimited permission to copy and/or distribute it,
282
 
# with or without modifications, as long as this notice is preserved.
283
 
 
284
 
#serial 3
 
13088
# Generate code to set up dependency tracking.   -*- Autoconf -*-
 
13089
 
 
13090
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
13091
 
 
13092
# This program is free software; you can redistribute it and/or modify
 
13093
# it under the terms of the GNU General Public License as published by
 
13094
# the Free Software Foundation; either version 2, or (at your option)
 
13095
# any later version.
 
13096
 
 
13097
# This program is distributed in the hope that it will be useful,
 
13098
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13099
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13100
# GNU General Public License for more details.
 
13101
 
 
13102
# You should have received a copy of the GNU General Public License
 
13103
# along with this program; if not, write to the Free Software
 
13104
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
13105
# 02111-1307, USA.
 
13106
 
 
13107
#serial 2
285
13108
 
286
13109
# _AM_OUTPUT_DEPENDENCY_COMMANDS
287
13110
# ------------------------------
300
13123
  else
301
13124
    continue
302
13125
  fi
303
 
  # Extract the definition of DEPDIR, am__include, and am__quote
304
 
  # from the Makefile without running `make'.
305
 
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
13126
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
 
13127
  # Extract the definition of DEP_FILES from the Makefile without
 
13128
  # running `make'.
 
13129
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
306
13130
  test -z "$DEPDIR" && continue
307
 
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
308
 
  test -z "am__include" && continue
309
 
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
310
13131
  # When using ansi2knr, U may be empty or an underscore; expand it
311
 
  U=`sed -n 's/^U = //p' < "$mf"`
312
 
  # Find all dependency output files, they are included files with
313
 
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
314
 
  # simplest approach to changing $(DEPDIR) to its actual value in the
315
 
  # expansion.
316
 
  for file in `sed -n "
317
 
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
13132
  U=`sed -n -e '/^U = / s///p' < "$mf"`
 
13133
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
 
13134
  # We invoke sed twice because it is the simplest approach to
 
13135
  # changing $(DEPDIR) to its actual value in the expansion.
 
13136
  for file in `sed -n -e '
 
13137
    /^DEP_FILES = .*\\\\$/ {
 
13138
      s/^DEP_FILES = //
 
13139
      :loop
 
13140
        s/\\\\$//
 
13141
        p
 
13142
        n
 
13143
        /\\\\$/ b loop
 
13144
      p
 
13145
    }
 
13146
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
318
13147
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
319
13148
    # Make sure the directory exists.
320
13149
    test -f "$dirpart/$file" && continue
340
13169
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
341
13170
])
342
13171
 
343
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
344
 
# Free Software Foundation, Inc.
345
 
#
346
 
# This file is free software; the Free Software Foundation
347
 
# gives unlimited permission to copy and/or distribute it,
348
 
# with or without modifications, as long as this notice is preserved.
349
 
 
350
 
# serial 8
351
 
 
352
 
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
353
 
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
354
 
 
355
 
# Do all the work for Automake.                             -*- Autoconf -*-
356
 
 
357
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
358
 
# Free Software Foundation, Inc.
359
 
#
360
 
# This file is free software; the Free Software Foundation
361
 
# gives unlimited permission to copy and/or distribute it,
362
 
# with or without modifications, as long as this notice is preserved.
363
 
 
364
 
# serial 12
365
 
 
366
 
# This macro actually does too much.  Some checks are only needed if
367
 
# your package does certain things.  But this isn't really a big deal.
368
 
 
369
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
370
 
# AM_INIT_AUTOMAKE([OPTIONS])
371
 
# -----------------------------------------------
372
 
# The call with PACKAGE and VERSION arguments is the old style
373
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
374
 
# and VERSION should now be passed to AC_INIT and removed from
375
 
# the call to AM_INIT_AUTOMAKE.
376
 
# We support both call styles for the transition.  After
377
 
# the next Automake release, Autoconf can make the AC_INIT
378
 
# arguments mandatory, and then we can depend on a new Autoconf
379
 
# release and drop the old call support.
380
 
AC_DEFUN([AM_INIT_AUTOMAKE],
381
 
[AC_PREREQ([2.58])dnl
382
 
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
383
 
dnl the ones we care about.
384
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
385
 
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
386
 
AC_REQUIRE([AC_PROG_INSTALL])dnl
387
 
# test to see if srcdir already configured
388
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
389
 
   test -f $srcdir/config.status; then
390
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
391
 
fi
392
 
 
393
 
# test whether we have cygpath
394
 
if test -z "$CYGPATH_W"; then
395
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
396
 
    CYGPATH_W='cygpath -w'
397
 
  else
398
 
    CYGPATH_W=echo
399
 
  fi
400
 
fi
401
 
AC_SUBST([CYGPATH_W])
402
 
 
403
 
# Define the identity of the package.
404
 
dnl Distinguish between old-style and new-style calls.
405
 
m4_ifval([$2],
406
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
407
 
 AC_SUBST([PACKAGE], [$1])dnl
408
 
 AC_SUBST([VERSION], [$2])],
409
 
[_AM_SET_OPTIONS([$1])dnl
410
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
411
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
412
 
 
413
 
_AM_IF_OPTION([no-define],,
414
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
415
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
416
 
 
417
 
# Some tools Automake needs.
418
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
419
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
420
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
421
 
AM_MISSING_PROG(AUTOCONF, autoconf)
422
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
423
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
424
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
425
 
AM_PROG_INSTALL_SH
426
 
AM_PROG_INSTALL_STRIP
427
 
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
428
 
# We need awk for the "check" target.  The system "awk" is bad on
429
 
# some platforms.
430
 
AC_REQUIRE([AC_PROG_AWK])dnl
431
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
432
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
433
 
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
434
 
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
435
 
                             [_AM_PROG_TAR([v7])])])
436
 
_AM_IF_OPTION([no-dependencies],,
437
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
438
 
                  [_AM_DEPENDENCIES(CC)],
439
 
                  [define([AC_PROG_CC],
440
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
441
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
442
 
                  [_AM_DEPENDENCIES(CXX)],
443
 
                  [define([AC_PROG_CXX],
444
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
445
 
])
446
 
])
447
 
 
448
 
 
449
 
# When config.status generates a header, we must update the stamp-h file.
450
 
# This file resides in the same directory as the config header
451
 
# that is generated.  The stamp files are numbered to have different names.
452
 
 
453
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
454
 
# loop where config.status creates the headers, so we can generate
455
 
# our stamp files there.
456
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
457
 
[# Compute $1's index in $config_headers.
458
 
_am_stamp_count=1
459
 
for _am_header in $config_headers :; do
460
 
  case $_am_header in
461
 
    $1 | $1:* )
462
 
      break ;;
463
 
    * )
464
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
465
 
  esac
466
 
done
467
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
468
 
 
469
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
470
 
#
471
 
# This file is free software; the Free Software Foundation
472
 
# gives unlimited permission to copy and/or distribute it,
473
 
# with or without modifications, as long as this notice is preserved.
474
 
 
475
 
# AM_PROG_INSTALL_SH
476
 
# ------------------
477
 
# Define $install_sh.
478
 
AC_DEFUN([AM_PROG_INSTALL_SH],
479
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
480
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
481
 
AC_SUBST(install_sh)])
482
 
 
483
 
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
484
 
#
485
 
# This file is free software; the Free Software Foundation
486
 
# gives unlimited permission to copy and/or distribute it,
487
 
# with or without modifications, as long as this notice is preserved.
 
13172
# Check to see how 'make' treats includes.      -*- Autoconf -*-
 
13173
 
 
13174
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 
13175
 
 
13176
# This program is free software; you can redistribute it and/or modify
 
13177
# it under the terms of the GNU General Public License as published by
 
13178
# the Free Software Foundation; either version 2, or (at your option)
 
13179
# any later version.
 
13180
 
 
13181
# This program is distributed in the hope that it will be useful,
 
13182
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13183
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13184
# GNU General Public License for more details.
 
13185
 
 
13186
# You should have received a copy of the GNU General Public License
 
13187
# along with this program; if not, write to the Free Software
 
13188
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
13189
# 02111-1307, USA.
488
13190
 
489
13191
# serial 2
490
13192
 
491
 
# Check whether the underlying file-system supports filenames
492
 
# with a leading dot.  For instance MS-DOS doesn't.
493
 
AC_DEFUN([AM_SET_LEADING_DOT],
494
 
[rm -rf .tst 2>/dev/null
495
 
mkdir .tst 2>/dev/null
496
 
if test -d .tst; then
497
 
  am__leading_dot=.
498
 
else
499
 
  am__leading_dot=_
500
 
fi
501
 
rmdir .tst 2>/dev/null
502
 
AC_SUBST([am__leading_dot])])
503
 
 
504
 
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
505
 
# Free Software Foundation, Inc.
506
 
#
507
 
# This file is free software; the Free Software Foundation
508
 
# gives unlimited permission to copy and/or distribute it,
509
 
# with or without modifications, as long as this notice is preserved.
510
 
 
511
 
# serial 5
512
 
 
513
 
# AM_PROG_LEX
514
 
# -----------
515
 
# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
516
 
# "missing" invocation, for better error output.
517
 
AC_DEFUN([AM_PROG_LEX],
518
 
[AC_PREREQ(2.50)dnl
519
 
AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
520
 
AC_REQUIRE([AC_PROG_LEX])dnl
521
 
if test "$LEX" = :; then
522
 
  LEX=${am_missing_run}flex
523
 
fi])
524
 
 
525
 
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
526
 
 
527
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
528
 
#
529
 
# This file is free software; the Free Software Foundation
530
 
# gives unlimited permission to copy and/or distribute it,
531
 
# with or without modifications, as long as this notice is preserved.
532
 
 
533
 
# serial 3
534
 
 
535
13193
# AM_MAKE_INCLUDE()
536
13194
# -----------------
537
13195
# Check to see how make treats includes.
574
13232
rm -f confinc confmf
575
13233
])
576
13234
 
577
 
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
578
 
 
579
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
580
 
# Free Software Foundation, Inc.
581
 
#
582
 
# This file is free software; the Free Software Foundation
583
 
# gives unlimited permission to copy and/or distribute it,
584
 
# with or without modifications, as long as this notice is preserved.
585
 
 
586
 
# serial 4
587
 
 
588
 
# AM_MISSING_PROG(NAME, PROGRAM)
589
 
# ------------------------------
590
 
AC_DEFUN([AM_MISSING_PROG],
591
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
592
 
$1=${$1-"${am_missing_run}$2"}
593
 
AC_SUBST($1)])
594
 
 
595
 
 
596
 
# AM_MISSING_HAS_RUN
597
 
# ------------------
598
 
# Define MISSING if not defined so far and test if it supports --run.
599
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
600
 
AC_DEFUN([AM_MISSING_HAS_RUN],
601
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
602
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
603
 
# Use eval to expand $SHELL
604
 
if eval "$MISSING --run true"; then
605
 
  am_missing_run="$MISSING --run "
606
 
else
607
 
  am_missing_run=
608
 
  AC_MSG_WARN([`missing' script is too old or missing])
609
 
fi
610
 
])
611
 
 
612
 
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
613
 
#
614
 
# This file is free software; the Free Software Foundation
615
 
# gives unlimited permission to copy and/or distribute it,
616
 
# with or without modifications, as long as this notice is preserved.
617
 
 
618
 
# AM_PROG_MKDIR_P
619
 
# ---------------
620
 
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
621
 
#
622
 
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
623
 
# created by `make install' are always world readable, even if the
624
 
# installer happens to have an overly restrictive umask (e.g. 077).
625
 
# This was a mistake.  There are at least two reasons why we must not
626
 
# use `-m 0755':
627
 
#   - it causes special bits like SGID to be ignored,
628
 
#   - it may be too restrictive (some setups expect 775 directories).
629
 
#
630
 
# Do not use -m 0755 and let people choose whatever they expect by
631
 
# setting umask.
632
 
#
633
 
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
634
 
# Some implementations (such as Solaris 8's) are not thread-safe: if a
635
 
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
636
 
# concurrently, both version can detect that a/ is missing, but only
637
 
# one can create it and the other will error out.  Consequently we
638
 
# restrict ourselves to GNU make (using the --version option ensures
639
 
# this.)
640
 
AC_DEFUN([AM_PROG_MKDIR_P],
641
 
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
642
 
  # We used to keeping the `.' as first argument, in order to
643
 
  # allow $(mkdir_p) to be used without argument.  As in
644
 
  #   $(mkdir_p) $(somedir)
645
 
  # where $(somedir) is conditionally defined.  However this is wrong
646
 
  # for two reasons:
647
 
  #  1. if the package is installed by a user who cannot write `.'
648
 
  #     make install will fail,
649
 
  #  2. the above comment should most certainly read
650
 
  #     $(mkdir_p) $(DESTDIR)$(somedir)
651
 
  #     so it does not work when $(somedir) is undefined and
652
 
  #     $(DESTDIR) is not.
653
 
  #  To support the latter case, we have to write
654
 
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
655
 
  #  so the `.' trick is pointless.
656
 
  mkdir_p='mkdir -p --'
657
 
else
658
 
  # On NextStep and OpenStep, the `mkdir' command does not
659
 
  # recognize any option.  It will interpret all options as
660
 
  # directories to create, and then abort because `.' already
661
 
  # exists.
662
 
  for d in ./-p ./--version;
663
 
  do
664
 
    test -d $d && rmdir $d
665
 
  done
666
 
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
667
 
  if test -f "$ac_aux_dir/mkinstalldirs"; then
668
 
    mkdir_p='$(mkinstalldirs)'
669
 
  else
670
 
    mkdir_p='$(install_sh) -d'
671
 
  fi
672
 
fi
673
 
AC_SUBST([mkdir_p])])
674
 
 
675
 
# Helper functions for option handling.                     -*- Autoconf -*-
676
 
 
677
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
678
 
#
679
 
# This file is free software; the Free Software Foundation
680
 
# gives unlimited permission to copy and/or distribute it,
681
 
# with or without modifications, as long as this notice is preserved.
 
13235
 
 
13236
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
13237
 
 
13238
# This program is free software; you can redistribute it and/or modify
 
13239
# it under the terms of the GNU General Public License as published by
 
13240
# the Free Software Foundation; either version 2, or (at your option)
 
13241
# any later version.
 
13242
 
 
13243
# This program is distributed in the hope that it will be useful,
 
13244
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13245
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13246
# GNU General Public License for more details.
 
13247
 
 
13248
# You should have received a copy of the GNU General Public License
 
13249
# along with this program; if not, write to the Free Software
 
13250
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
13251
# 02111-1307, USA.
682
13252
 
683
13253
# serial 3
684
13254
 
685
 
# _AM_MANGLE_OPTION(NAME)
686
 
# -----------------------
687
 
AC_DEFUN([_AM_MANGLE_OPTION],
688
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
689
 
 
690
 
# _AM_SET_OPTION(NAME)
691
 
# ------------------------------
692
 
# Set option NAME.  Presently that only means defining a flag for this option.
693
 
AC_DEFUN([_AM_SET_OPTION],
694
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
695
 
 
696
 
# _AM_SET_OPTIONS(OPTIONS)
697
 
# ----------------------------------
698
 
# OPTIONS is a space-separated list of Automake options.
699
 
AC_DEFUN([_AM_SET_OPTIONS],
700
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
701
 
 
702
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
703
 
# -------------------------------------------
704
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
705
 
AC_DEFUN([_AM_IF_OPTION],
706
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
707
 
 
708
 
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
709
 
 
710
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
711
 
# Free Software Foundation, Inc.
712
 
#
713
 
# This file is free software; the Free Software Foundation
714
 
# gives unlimited permission to copy and/or distribute it,
715
 
# with or without modifications, as long as this notice is preserved.
716
 
 
717
 
# serial 4
718
 
 
719
 
# AM_SANITY_CHECK
720
 
# ---------------
721
 
AC_DEFUN([AM_SANITY_CHECK],
722
 
[AC_MSG_CHECKING([whether build environment is sane])
723
 
# Just in case
724
 
sleep 1
725
 
echo timestamp > conftest.file
726
 
# Do `set' in a subshell so we don't clobber the current shell's
727
 
# arguments.  Must try -L first in case configure is actually a
728
 
# symlink; some systems play weird games with the mod time of symlinks
729
 
# (eg FreeBSD returns the mod time of the symlink's containing
730
 
# directory).
731
 
if (
732
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
733
 
   if test "$[*]" = "X"; then
734
 
      # -L didn't work.
735
 
      set X `ls -t $srcdir/configure conftest.file`
736
 
   fi
737
 
   rm -f conftest.file
738
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
739
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
740
 
 
741
 
      # If neither matched, then we have a broken ls.  This can happen
742
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
743
 
      # broken ls alias from the environment.  This has actually
744
 
      # happened.  Such a system could not be considered "sane".
745
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
746
 
alias in your environment])
747
 
   fi
748
 
 
749
 
   test "$[2]" = conftest.file
750
 
   )
751
 
then
752
 
   # Ok.
753
 
   :
754
 
else
755
 
   AC_MSG_ERROR([newly created file is older than distributed files!
756
 
Check your system clock])
757
 
fi
758
 
AC_MSG_RESULT(yes)])
759
 
 
760
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
761
 
#
762
 
# This file is free software; the Free Software Foundation
763
 
# gives unlimited permission to copy and/or distribute it,
764
 
# with or without modifications, as long as this notice is preserved.
765
 
 
766
 
# AM_PROG_INSTALL_STRIP
767
 
# ---------------------
768
 
# One issue with vendor `install' (even GNU) is that you can't
769
 
# specify the program used to strip binaries.  This is especially
770
 
# annoying in cross-compiling environments, where the build's strip
771
 
# is unlikely to handle the host's binaries.
772
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
773
 
# always use install-sh in `make install-strip', and initialize
774
 
# STRIPPROG with the value of the STRIP variable (set by the user).
775
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
776
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
777
 
# Installed binaries are usually stripped using `strip' when the user
778
 
# run `make install-strip'.  However `strip' might not be the right
779
 
# tool to use in cross-compilation environments, therefore Automake
780
 
# will honor the `STRIP' environment variable to overrule this program.
781
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
782
 
if test "$cross_compiling" != no; then
783
 
  AC_CHECK_TOOL([STRIP], [strip], :)
784
 
fi
785
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
786
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
787
 
 
788
 
# Check how to create a tarball.                            -*- Autoconf -*-
789
 
 
790
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
791
 
#
792
 
# This file is free software; the Free Software Foundation
793
 
# gives unlimited permission to copy and/or distribute it,
794
 
# with or without modifications, as long as this notice is preserved.
795
 
 
796
 
# serial 2
797
 
 
798
 
# _AM_PROG_TAR(FORMAT)
799
 
# --------------------
800
 
# Check how to create a tarball in format FORMAT.
801
 
# FORMAT should be one of `v7', `ustar', or `pax'.
802
 
#
803
 
# Substitute a variable $(am__tar) that is a command
804
 
# writing to stdout a FORMAT-tarball containing the directory
805
 
# $tardir.
806
 
#     tardir=directory && $(am__tar) > result.tar
807
 
#
808
 
# Substitute a variable $(am__untar) that extract such
809
 
# a tarball read from stdin.
810
 
#     $(am__untar) < result.tar
811
 
AC_DEFUN([_AM_PROG_TAR],
812
 
[# Always define AMTAR for backward compatibility.
813
 
AM_MISSING_PROG([AMTAR], [tar])
814
 
m4_if([$1], [v7],
815
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
816
 
     [m4_case([$1], [ustar],, [pax],,
817
 
              [m4_fatal([Unknown tar format])])
818
 
AC_MSG_CHECKING([how to create a $1 tar archive])
819
 
# Loop over all known methods to create a tar archive until one works.
820
 
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
821
 
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
822
 
# Do not fold the above two line into one, because Tru64 sh and
823
 
# Solaris sh will not grok spaces in the rhs of `-'.
824
 
for _am_tool in $_am_tools
825
 
do
826
 
  case $_am_tool in
827
 
  gnutar)
828
 
    for _am_tar in tar gnutar gtar;
829
 
    do
830
 
      AM_RUN_LOG([$_am_tar --version]) && break
831
 
    done
832
 
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
833
 
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
834
 
    am__untar="$_am_tar -xf -"
835
 
    ;;
836
 
  plaintar)
837
 
    # Must skip GNU tar: if it does not support --format= it doesn't create
838
 
    # ustar tarball either.
839
 
    (tar --version) >/dev/null 2>&1 && continue
840
 
    am__tar='tar chf - "$$tardir"'
841
 
    am__tar_='tar chf - "$tardir"'
842
 
    am__untar='tar xf -'
843
 
    ;;
844
 
  pax)
845
 
    am__tar='pax -L -x $1 -w "$$tardir"'
846
 
    am__tar_='pax -L -x $1 -w "$tardir"'
847
 
    am__untar='pax -r'
848
 
    ;;
849
 
  cpio)
850
 
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
851
 
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
852
 
    am__untar='cpio -i -H $1 -d'
853
 
    ;;
854
 
  none)
855
 
    am__tar=false
856
 
    am__tar_=false
857
 
    am__untar=false
858
 
    ;;
859
 
  esac
860
 
 
861
 
  # If the value was cached, stop now.  We just wanted to have am__tar
862
 
  # and am__untar set.
863
 
  test -n "${am_cv_prog_tar_$1}" && break
864
 
 
865
 
  # tar/untar a dummy directory, and stop if the command works
866
 
  rm -rf conftest.dir
867
 
  mkdir conftest.dir
868
 
  echo GrepMe > conftest.dir/file
869
 
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
870
 
  rm -rf conftest.dir
871
 
  if test -s conftest.tar; then
872
 
    AM_RUN_LOG([$am__untar <conftest.tar])
873
 
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
874
 
  fi
875
 
done
876
 
rm -rf conftest.dir
877
 
 
878
 
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
879
 
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
880
 
AC_SUBST([am__tar])
881
 
AC_SUBST([am__untar])
882
 
]) # _AM_PROG_TAR
883
 
 
884
 
m4_include([acinclude.m4])
 
13255
AC_PREREQ(2.50)
 
13256
 
 
13257
# AM_PROG_LEX
 
13258
# -----------
 
13259
# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
 
13260
# "missing" invocation, for better error output.
 
13261
AC_DEFUN([AM_PROG_LEX],
 
13262
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
 
13263
AC_REQUIRE([AC_PROG_LEX])dnl
 
13264
if test "$LEX" = :; then
 
13265
  LEX=${am_missing_run}flex
 
13266
fi])
 
13267
 
 
13268
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
 
13269
 
 
13270
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
13271
 
 
13272
# This program is free software; you can redistribute it and/or modify
 
13273
# it under the terms of the GNU General Public License as published by
 
13274
# the Free Software Foundation; either version 2, or (at your option)
 
13275
# any later version.
 
13276
 
 
13277
# This program is distributed in the hope that it will be useful,
 
13278
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13279
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13280
# GNU General Public License for more details.
 
13281
 
 
13282
# You should have received a copy of the GNU General Public License
 
13283
# along with this program; if not, write to the Free Software
 
13284
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
13285
# 02111-1307, USA.
 
13286
 
 
13287
AC_PREREQ([2.52])
 
13288
 
 
13289
# serial 6
 
13290
 
 
13291
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
13292
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
13293