~ubuntu-branches/ubuntu/karmic/guarddog/karmic

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Siegfried-Angel Gevatter Pujals (RainCT)
  • Date: 2007-11-06 23:43:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20071106234311-eeiuy01hc66d34df
Tags: 2.6.0-1ubuntu1
* Merge from debian unstable, remaining changes:
   - Bump standards version to 3.7.2 (no changes)
   - Bump debhelper build dependency to version >>5
   - Fix kde/guarddog.desktop and add some translations
   - debian/rules: move .desktop file to /usr/share/applications;
     debian/dirs: add usr/share/applications
   - Use dh_icons (previous Ubuntu revision used dh_iconcache).
   - Modify Maintainer value to match the DebianMaintainerField
     specification.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2
2
 
3
 
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
 
# Free Software Foundation, Inc.
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005  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
 
 
15
 
dnl    This file is part of the KDE libraries/packages
16
 
dnl    Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
17
 
dnl              (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
18
 
 
19
 
dnl    This file is free software; you can redistribute it and/or
20
 
dnl    modify it under the terms of the GNU Library General Public
21
 
dnl    License as published by the Free Software Foundation; either
22
 
dnl    version 2 of the License, or (at your option) any later version.
23
 
 
24
 
dnl    This library is distributed in the hope that it will be useful,
25
 
dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
26
 
dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27
 
dnl    Library General Public License for more details.
28
 
 
29
 
dnl    You should have received a copy of the GNU Library General Public License
30
 
dnl    along with this library; see the file COPYING.LIB.  If not, write to
31
 
dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
32
 
dnl    Boston, MA 02111-1307, USA.
33
 
 
34
 
dnl IMPORTANT NOTE:
35
 
dnl Please do not modify this file unless you expect your modifications to be
36
 
dnl carried into every other module in the repository. 
37
 
dnl
38
 
dnl Single-module modifications are best placed in configure.in for kdelibs
39
 
dnl and kdebase or configure.in.in if present.
40
 
 
41
 
# KDE_PATH_X_DIRECT
42
 
dnl Internal subroutine of AC_PATH_X.
43
 
dnl Set ac_x_includes and/or ac_x_libraries.
44
 
AC_DEFUN([KDE_PATH_X_DIRECT],
45
 
[
46
 
AC_REQUIRE([KDE_CHECK_LIB64])
47
 
 
48
 
if test "$ac_x_includes" = NO; then
49
 
  # Guess where to find include files, by looking for this one X11 .h file.
50
 
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
51
 
 
52
 
  # First, try using that file with no special directory specified.
53
 
AC_TRY_CPP([#include <$x_direct_test_include>],
54
 
[# We can compile using X headers with no special include directory.
55
 
ac_x_includes=],
56
 
[# Look for the header file in a standard set of common directories.
57
 
# Check X11 before X11Rn because it is often a symlink to the current release.
58
 
  for ac_dir in               \
59
 
    /usr/X11/include          \
60
 
    /usr/X11R6/include        \
61
 
    /usr/X11R5/include        \
62
 
    /usr/X11R4/include        \
63
 
                              \
64
 
    /usr/include/X11          \
65
 
    /usr/include/X11R6        \
66
 
    /usr/include/X11R5        \
67
 
    /usr/include/X11R4        \
68
 
                              \
69
 
    /usr/local/X11/include    \
70
 
    /usr/local/X11R6/include  \
71
 
    /usr/local/X11R5/include  \
72
 
    /usr/local/X11R4/include  \
73
 
                              \
74
 
    /usr/local/include/X11    \
75
 
    /usr/local/include/X11R6  \
76
 
    /usr/local/include/X11R5  \
77
 
    /usr/local/include/X11R4  \
78
 
                              \
79
 
    /usr/X386/include         \
80
 
    /usr/x386/include         \
81
 
    /usr/XFree86/include/X11  \
82
 
                              \
83
 
    /usr/include              \
84
 
    /usr/local/include        \
85
 
    /usr/unsupported/include  \
86
 
    /usr/athena/include       \
87
 
    /usr/local/x11r5/include  \
88
 
    /usr/lpp/Xamples/include  \
89
 
                              \
90
 
    /usr/openwin/include      \
91
 
    /usr/openwin/share/include \
92
 
    ; \
93
 
  do
94
 
    if test -r "$ac_dir/$x_direct_test_include"; then
95
 
      ac_x_includes=$ac_dir
96
 
      break
97
 
    fi
98
 
  done])
99
 
fi # $ac_x_includes = NO
100
 
 
101
 
if test "$ac_x_libraries" = NO; then
102
 
  # Check for the libraries.
103
 
 
104
 
  test -z "$x_direct_test_library" && x_direct_test_library=Xt
105
 
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
106
 
 
107
 
  # See if we find them without any special options.
108
 
  # Don't add to $LIBS permanently.
109
 
  ac_save_LIBS="$LIBS"
110
 
  LIBS="-l$x_direct_test_library $LIBS"
111
 
AC_TRY_LINK([#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 -o `kde-config --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` == 3.2; then
606
 
                kde33ornewer=
607
 
              fi
608
 
            fi
609
 
        fi
610
 
 
611
 
        if test -n "$kde32ornewer"; then
612
 
            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
613
 
            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
614
 
        fi
615
 
        if test -n "$kde33ornewer"; then
616
 
            KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
617
 
            AC_SUBST(MAKEKDEWIDGETS)
618
 
        fi
619
 
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
620
 
 
621
 
        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
622
 
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
623
 
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
624
 
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
625
 
            if test "$KDE_XSL_STYLESHEET" = "NO"; then
626
 
                KDE_XSL_STYLESHEET=""
627
 
            else
628
 
                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
629
 
            fi
630
 
        fi
631
 
 
632
 
        DCOP_DEPENDENCIES='$(DCOPIDL)'
633
 
        if test -n "$kde32ornewer"; then
634
 
            KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
635
 
            DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
636
 
            AC_SUBST(KCONFIG_COMPILER)
637
 
            AC_SUBST(KCFG_DEPENDENCIES)
638
 
            AC_SUBST(DCOPIDLNG)
639
 
        fi
640
 
        AC_SUBST(DCOPIDL)
641
 
        AC_SUBST(DCOPIDL2CPP)
642
 
        AC_SUBST(DCOP_DEPENDENCIES)
643
 
        AC_SUBST(MCOPIDL)
644
 
        AC_SUBST(ARTSCCONFIG)
645
 
        AC_SUBST(MEINPROC)
646
 
        AC_SUBST(KDE_XSL_STYLESHEET)
647
 
        AC_SUBST(XMLLINT)
648
 
])dnl
649
 
 
650
 
AC_DEFUN([AC_CREATE_KFSSTND],
651
 
[
652
 
AC_REQUIRE([AC_CHECK_RPATH])
653
 
 
654
 
AC_MSG_CHECKING([for KDE paths])
655
 
kde_result=""
656
 
kde_cached_paths=yes
657
 
AC_CACHE_VAL(kde_cv_all_paths,
658
 
[
659
 
  KDE_SET_DEFAULT_PATHS($1)
660
 
  kde_cached_paths=no
661
 
])
662
 
eval "$kde_cv_all_paths"
663
 
KDE_CHECK_PATHS_FOR_COMPLETENESS
664
 
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
665
 
  # wrong values were cached, may be, we can set better ones
666
 
  kde_result=
667
 
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
668
 
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
669
 
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
670
 
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
671
 
  kde_have_all_paths=
672
 
  kde_styledir=
673
 
  kde_widgetdir=
674
 
  xdg_appsdir = xdg_menudir= xdg_directorydir= 
675
 
  KDE_SET_DEFAULT_PATHS($1)
676
 
  eval "$kde_cv_all_paths"
677
 
  KDE_CHECK_PATHS_FOR_COMPLETENESS
678
 
  kde_result="$kde_result (cache overridden)"
679
 
fi
680
 
if test "$kde_have_all_paths" = "no"; then
681
 
  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
682
 
Since it had compiled and linked before, it must be a strange problem on your system.
683
 
Look at config.log for details. If you are not able to fix this, look at
684
 
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
685
 
(If you're using an egcs version on Linux, you may update binutils!)
686
 
])
687
 
else
688
 
  rm -f conftest*
689
 
  AC_MSG_RESULT($kde_result)
690
 
fi
691
 
 
692
 
bindir=$kde_bindir
693
 
 
694
 
KDE_SUBST_PROGRAMS
695
 
 
696
 
])
697
 
 
698
 
AC_DEFUN([AC_SUBST_KFSSTND],
699
 
[
700
 
AC_SUBST(kde_htmldir)
701
 
AC_SUBST(kde_appsdir)
702
 
AC_SUBST(kde_icondir)
703
 
AC_SUBST(kde_sounddir)
704
 
AC_SUBST(kde_datadir)
705
 
AC_SUBST(kde_locale)
706
 
AC_SUBST(kde_confdir)
707
 
AC_SUBST(kde_kcfgdir)
708
 
AC_SUBST(kde_mimedir)
709
 
AC_SUBST(kde_wallpaperdir)
710
 
AC_SUBST(kde_bindir)
711
 
dnl X Desktop Group standards
712
 
AC_SUBST(xdg_appsdir)
713
 
AC_SUBST(xdg_menudir)
714
 
AC_SUBST(xdg_directorydir)
715
 
dnl for KDE 2
716
 
AC_SUBST(kde_templatesdir)
717
 
AC_SUBST(kde_servicesdir)
718
 
AC_SUBST(kde_servicetypesdir)
719
 
AC_SUBST(kde_moduledir)
720
 
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
721
 
AC_SUBST(kde_styledir)
722
 
AC_SUBST(kde_widgetdir)
723
 
if test "$kde_qtver" = 1; then
724
 
  kde_minidir="$kde_icondir/mini"
725
 
else
726
 
# for KDE 1 - this breaks KDE2 apps using minidir, but
727
 
# that's the plan ;-/
728
 
  kde_minidir="/dev/null"
729
 
fi
730
 
dnl AC_SUBST(kde_minidir)
731
 
dnl AC_SUBST(kde_cgidir)
732
 
dnl AC_SUBST(kde_toolbardir)
733
 
])
734
 
 
735
 
AC_DEFUN([KDE_MISC_TESTS],
736
 
[
737
 
   dnl Checks for libraries.
738
 
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
739
 
   AC_SUBST(LIBUTIL)
740
 
   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
741
 
   AC_SUBST(LIBCOMPAT)
742
 
   kde_have_crypt=
743
 
   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
744
 
      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
745
 
        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
746
 
You should install libcrypt from another source or configure with PAM
747
 
support])
748
 
        kde_have_crypt=no
749
 
      ]))
750
 
   AC_SUBST(LIBCRYPT)
751
 
   if test $kde_have_crypt = yes; then
752
 
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
753
 
   fi
754
 
   AC_CHECK_SOCKLEN_T
755
 
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
756
 
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
757
 
      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
758
 
        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
759
 
   fi
760
 
   AC_CHECK_FUNC(inet_ntoa)
761
 
   if test $ac_cv_func_inet_ntoa = no; then
762
 
     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
763
 
   fi
764
 
   AC_CHECK_FUNC(connect)
765
 
   if test $ac_cv_func_connect = no; then
766
 
      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
767
 
        $X_EXTRA_LIBS)
768
 
   fi
769
 
 
770
 
   AC_CHECK_FUNC(remove)
771
 
   if test $ac_cv_func_remove = no; then
772
 
      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
773
 
   fi
774
 
 
775
 
   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
776
 
   AC_CHECK_FUNC(shmat, ,
777
 
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
778
 
   
779
 
   # more headers that need to be explicitly included on darwin
780
 
   AC_CHECK_HEADERS(sys/types.h stdint.h)
781
 
 
782
 
   # sys/bitypes.h is needed for uint32_t and friends on Tru64
783
 
   AC_CHECK_HEADERS(sys/bitypes.h)
784
 
 
785
 
   # darwin requires a poll emulation library
786
 
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
787
 
 
788
 
   # for some image handling on Mac OS X
789
 
   AC_CHECK_HEADERS(Carbon/Carbon.h)
790
 
 
791
 
   # CoreAudio framework
792
 
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
793
 
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
794
 
     FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
795
 
   ])
796
 
 
797
 
   AC_CHECK_RES_INIT
798
 
   AC_SUBST(LIB_POLL)
799
 
   AC_SUBST(FRAMEWORK_COREAUDIO)
800
 
   LIBSOCKET="$X_EXTRA_LIBS"
801
 
   AC_SUBST(LIBSOCKET)
802
 
   AC_SUBST(X_EXTRA_LIBS)
803
 
   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
804
 
   AC_SUBST(LIBUCB)
805
 
 
806
 
   case $host in  dnl this *is* LynxOS specific
807
 
   *-*-lynxos* )
808
 
        AC_MSG_CHECKING([LynxOS header file wrappers])
809
 
        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
810
 
        AC_MSG_RESULT(disabled)
811
 
        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
812
 
         ;;
813
 
    esac
814
 
 
815
 
   KDE_CHECK_TYPES
816
 
   KDE_CHECK_LIBDL
817
 
   KDE_CHECK_STRLCPY
818
 
 
819
 
# darwin needs this to initialize the environment
820
 
AC_CHECK_HEADERS(crt_externs.h)
821
 
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
822
 
 
823
 
AH_VERBATIM(_DARWIN_ENVIRON,
824
 
[
825
 
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
826
 
# include <sys/time.h>
827
 
# include <crt_externs.h>
828
 
# define environ (*_NSGetEnviron())
829
 
#endif
830
 
])
831
 
 
832
 
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
833
 
[
834
 
/*
835
 
 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
836
 
 * that defines bzero.
837
 
 */
838
 
 
839
 
#if defined(_AIX)
840
 
#include <strings.h>
841
 
#endif
842
 
])
843
 
 
844
 
AC_CHECK_FUNCS([vsnprintf snprintf])
845
 
 
846
 
AH_VERBATIM(_TRU64,[
847
 
/*
848
 
 * On HP-UX, the declaration of vsnprintf() is needed every time !
849
 
 */
850
 
 
851
 
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
852
 
#if __STDC__
853
 
#include <stdarg.h>
854
 
#include <stdlib.h>
855
 
#else
856
 
#include <varargs.h>
857
 
#endif
858
 
#ifdef __cplusplus
859
 
extern "C"
860
 
#endif
861
 
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
862
 
#ifdef __cplusplus
863
 
extern "C"
864
 
#endif
865
 
int snprintf(char *str, size_t n, char const *fmt, ...);
866
 
#endif
867
 
])
868
 
 
869
 
])
870
 
 
871
 
dnl ------------------------------------------------------------------------
872
 
dnl Find the header files and libraries for X-Windows. Extended the
873
 
dnl macro AC_PATH_X
874
 
dnl ------------------------------------------------------------------------
875
 
dnl
876
 
AC_DEFUN([K_PATH_X],
877
 
[
878
 
AC_REQUIRE([KDE_MISC_TESTS])dnl
879
 
AC_REQUIRE([KDE_CHECK_LIB64])
880
 
 
881
 
AC_ARG_ENABLE(
882
 
  embedded,
883
 
  AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
884
 
  kde_use_qt_emb=$enableval,
885
 
  kde_use_qt_emb=no
886
 
)
887
 
 
888
 
AC_ARG_ENABLE(
889
 
  qtopia,
890
 
  AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
891
 
  kde_use_qt_emb_palm=$enableval,
892
 
  kde_use_qt_emb_palm=no
893
 
)
894
 
 
895
 
AC_ARG_ENABLE(
896
 
  mac,
897
 
  AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
898
 
  kde_use_qt_mac=$enableval,
899
 
  kde_use_qt_mac=no
900
 
)
901
 
 
902
 
# used to disable x11-specific stuff on special platforms
903
 
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
904
 
 
905
 
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
906
 
 
907
 
AC_MSG_CHECKING(for X)
908
 
 
909
 
AC_CACHE_VAL(kde_cv_have_x,
910
 
[# One or both of the vars are not set, and there is no cached value.
911
 
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
912
 
   kde_x_includes=NO
913
 
else
914
 
   kde_x_includes=$x_includes
915
 
fi
916
 
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
917
 
   kde_x_libraries=NO
918
 
else
919
 
   kde_x_libraries=$x_libraries
920
 
fi
921
 
 
922
 
# below we use the standard autoconf calls
923
 
ac_x_libraries=$kde_x_libraries
924
 
ac_x_includes=$kde_x_includes
925
 
 
926
 
KDE_PATH_X_DIRECT
927
 
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
928
 
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
929
 
dnl location. The correct location is /usr/lib32 or an undefined value
930
 
dnl (the linker is smart enough to pick the correct default library).
931
 
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
932
 
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
933
 
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
934
 
dnl x_includes should be left alone.
935
 
case "$host" in
936
 
mips-sgi-irix6*)
937
 
  ;;
938
 
*-*-solaris*)
939
 
  ;;
940
 
*)
941
 
  _AC_PATH_X_XMKMF
942
 
  if test -z "$ac_x_includes"; then
943
 
    ac_x_includes="."
944
 
  fi
945
 
  if test -z "$ac_x_libraries"; then
946
 
    ac_x_libraries="/usr/lib${kdelibsuff}"
947
 
  fi
948
 
esac
949
 
#from now on we use our own again
950
 
 
951
 
# when the user already gave --x-includes, we ignore
952
 
# what the standard autoconf macros told us.
953
 
if test "$kde_x_includes" = NO; then
954
 
  kde_x_includes=$ac_x_includes
955
 
fi
956
 
 
957
 
# for --x-libraries too
958
 
if test "$kde_x_libraries" = NO; then
959
 
  kde_x_libraries=$ac_x_libraries
960
 
fi
961
 
 
962
 
if test "$kde_x_includes" = NO; then
963
 
  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
964
 
fi
965
 
 
966
 
if test "$kde_x_libraries" = NO; then
967
 
  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
968
 
fi
969
 
 
970
 
# Record where we found X for the cache.
971
 
kde_cv_have_x="have_x=yes \
972
 
         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
973
 
])dnl
974
 
 
975
 
eval "$kde_cv_have_x"
976
 
 
977
 
if test "$have_x" != yes; then
978
 
  AC_MSG_RESULT($have_x)
979
 
  no_x=yes
980
 
else
981
 
  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
982
 
fi
983
 
 
984
 
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
985
 
  X_INCLUDES=""
986
 
  x_includes="."; dnl better than nothing :-
987
 
 else
988
 
  x_includes=$kde_x_includes
989
 
  X_INCLUDES="-I$x_includes"
990
 
fi
991
 
 
992
 
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
993
 
  X_LDFLAGS=""
994
 
  x_libraries="/usr/lib"; dnl better than nothing :-
995
 
 else
996
 
  x_libraries=$kde_x_libraries
997
 
  X_LDFLAGS="-L$x_libraries"
998
 
fi
999
 
all_includes="$X_INCLUDES"
1000
 
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
1001
 
 
1002
 
# Check for libraries that X11R6 Xt/Xaw programs need.
1003
 
ac_save_LDFLAGS="$LDFLAGS"
1004
 
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1005
 
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1006
 
# check for ICE first), but we must link in the order -lSM -lICE or
1007
 
# we get undefined symbols.  So assume we have SM if we have ICE.
1008
 
# These have to be linked with before -lX11, unlike the other
1009
 
# libraries we check for below, so use a different variable.
1010
 
#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1011
 
AC_CHECK_LIB(ICE, IceConnectionNumber,
1012
 
  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
1013
 
LDFLAGS="$ac_save_LDFLAGS"
1014
 
 
1015
 
LIB_X11='-lX11 $(LIBSOCKET)'
1016
 
 
1017
 
AC_MSG_CHECKING(for libXext)
1018
 
AC_CACHE_VAL(kde_cv_have_libXext,
1019
 
[
1020
 
kde_ldflags_safe="$LDFLAGS"
1021
 
kde_libs_safe="$LIBS"
1022
 
 
1023
 
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
1024
 
LIBS="-lXext -lX11 $LIBSOCKET"
1025
 
 
1026
 
AC_TRY_LINK([
1027
 
#include <stdio.h>
1028
 
#ifdef STDC_HEADERS
1029
 
# include <stdlib.h>
1030
 
#endif
1031
 
],
1032
 
[
1033
 
printf("hello Xext\n");
1034
 
],
1035
 
kde_cv_have_libXext=yes,
1036
 
kde_cv_have_libXext=no
1037
 
)
1038
 
 
1039
 
LDFLAGS=$kde_ldflags_safe
1040
 
LIBS=$kde_libs_safe
1041
 
])
1042
 
 
1043
 
AC_MSG_RESULT($kde_cv_have_libXext)
1044
 
 
1045
 
if test "$kde_cv_have_libXext" = "no"; then
1046
 
  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1047
 
can't find it itself, we stop here assuming that make wouldn't find
1048
 
them either.])
1049
 
fi
1050
 
 
1051
 
LIB_XEXT="-lXext"
1052
 
QTE_NORTTI=""
1053
 
 
1054
 
elif test "$kde_use_qt_emb" = "yes"; then
1055
 
  dnl We're using QT Embedded
1056
 
  CPPFLAGS=-DQWS
1057
 
  CXXFLAGS="$CXXFLAGS -fno-rtti"
1058
 
  QTE_NORTTI="-fno-rtti -DQWS"
1059
 
  X_PRE_LIBS=""
1060
 
  LIB_X11=""
1061
 
  LIB_XEXT=""
1062
 
  LIB_XRENDER=""
1063
 
  LIBSM=""
1064
 
  X_INCLUDES=""
1065
 
  X_LDFLAGS=""
1066
 
  x_includes=""
1067
 
  x_libraries=""
1068
 
elif test "$kde_use_qt_mac" = "yes"; then
1069
 
  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1070
 
  dnl be included to get the information) --Sam
1071
 
  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1072
 
  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1073
 
  X_PRE_LIBS=""
1074
 
  LIB_X11=""
1075
 
  LIB_XEXT=""
1076
 
  LIB_XRENDER=""
1077
 
  LIBSM=""
1078
 
  X_INCLUDES=""
1079
 
  X_LDFLAGS=""
1080
 
  x_includes=""
1081
 
  x_libraries=""
1082
 
fi
1083
 
AC_SUBST(X_PRE_LIBS)
1084
 
AC_SUBST(LIB_X11)
1085
 
AC_SUBST(LIB_XRENDER)
1086
 
AC_SUBST(LIBSM)
1087
 
AC_SUBST(X_INCLUDES)
1088
 
AC_SUBST(X_LDFLAGS)
1089
 
AC_SUBST(x_includes)
1090
 
AC_SUBST(x_libraries)
1091
 
AC_SUBST(QTE_NORTTI)
1092
 
AC_SUBST(LIB_XEXT)
1093
 
 
1094
 
])
1095
 
 
1096
 
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1097
 
[
1098
 
AC_REQUIRE([KDE_USE_QT])
1099
 
cat > conftest.$ac_ext <<EOF
1100
 
#include "confdefs.h"
1101
 
#include <qglobal.h>
1102
 
#include <qapplication.h>
1103
 
EOF
1104
 
if test "$kde_qtver" = "2"; then
1105
 
cat >> conftest.$ac_ext <<EOF
1106
 
#include <qevent.h>
1107
 
#include <qstring.h>
1108
 
#include <qstyle.h>
1109
 
EOF
1110
 
 
1111
 
if test $kde_qtsubver -gt 0; then
1112
 
cat >> conftest.$ac_ext <<EOF
1113
 
#if QT_VERSION < 210
1114
 
#error 1
1115
 
#endif
1116
 
EOF
1117
 
fi
1118
 
fi
1119
 
 
1120
 
if test "$kde_qtver" = "3"; then
1121
 
cat >> conftest.$ac_ext <<EOF
1122
 
#include <qcursor.h>
1123
 
#include <qstylefactory.h>
1124
 
#include <private/qucomextra_p.h>
1125
 
EOF
1126
 
fi
1127
 
 
1128
 
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1129
 
cat >> conftest.$ac_ext <<EOF
1130
 
#error 1
1131
 
#endif
1132
 
 
1133
 
int main() {
1134
 
EOF
1135
 
if test "$kde_qtver" = "2"; then
1136
 
cat >> conftest.$ac_ext <<EOF
1137
 
    QStringList *t = new QStringList();
1138
 
    Q_UNUSED(t);
1139
 
EOF
1140
 
if test $kde_qtsubver -gt 0; then
1141
 
cat >> conftest.$ac_ext <<EOF
1142
 
    QString s;
1143
 
    s.setLatin1("Elvis is alive", 14);
1144
 
EOF
1145
 
fi
1146
 
fi
1147
 
if test "$kde_qtver" = "3"; then
1148
 
cat >> conftest.$ac_ext <<EOF
1149
 
    (void)QStyleFactory::create(QString::null);
1150
 
    QCursor c(Qt::WhatsThisCursor);
1151
 
EOF
1152
 
fi
1153
 
cat >> conftest.$ac_ext <<EOF
1154
 
    return 0;
1155
 
}
1156
 
EOF
1157
 
])
1158
 
 
1159
 
AC_DEFUN([KDE_USE_QT],
1160
 
[
1161
 
if test -z "$1"; then
1162
 
  # Current default Qt version: 3.3
1163
 
  kde_qtver=3
1164
 
  kde_qtsubver=3
1165
 
else
1166
 
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1167
 
  # following is the check if subversion isnt found in passed argument
1168
 
  if test "$kde_qtsubver" = "$1"; then
1169
 
    kde_qtsubver=1
1170
 
  fi
1171
 
  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1172
 
  if test "$kde_qtver" = "1"; then
1173
 
    kde_qtsubver=42
1174
 
  fi
1175
 
fi
1176
 
 
1177
 
if test -z "$2"; then
1178
 
  if test "$kde_qtver" = "2"; then
1179
 
    if test $kde_qtsubver -gt 0; then
1180
 
      kde_qt_minversion=">= Qt 2.2.2"
1181
 
    else
1182
 
      kde_qt_minversion=">= Qt 2.0.2"
1183
 
    fi
1184
 
  fi
1185
 
  if test "$kde_qtver" = "3"; then
1186
 
    if test $kde_qtsubver -gt 0; then
1187
 
         if test $kde_qtsubver -gt 1; then
1188
 
            if test $kde_qtsubver -gt 2; then
1189
 
                kde_qt_minversion=">= Qt 3.3"
1190
 
            else
1191
 
                kde_qt_minversion=">= Qt 3.2"
1192
 
            fi
1193
 
         else
1194
 
            kde_qt_minversion=">= Qt 3.1 (20021021)"
1195
 
         fi
1196
 
    else
1197
 
      kde_qt_minversion=">= Qt 3.0"
1198
 
    fi
1199
 
  fi
1200
 
  if test "$kde_qtver" = "1"; then
1201
 
    kde_qt_minversion=">= 1.42 and < 2.0"
1202
 
  fi
1203
 
else
1204
 
   kde_qt_minversion="$2"
1205
 
fi
1206
 
 
1207
 
if test -z "$3"; then
1208
 
   if test $kde_qtver = 3; then
1209
 
     if test $kde_qtsubver -gt 0; then
1210
 
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1211
 
       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1212
 
       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1213
 
     else
1214
 
       kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
1215
 
     fi
1216
 
   fi
1217
 
   if test $kde_qtver = 2; then
1218
 
     if test $kde_qtsubver -gt 0; then
1219
 
       kde_qt_verstring="QT_VERSION >= 222"
1220
 
     else
1221
 
       kde_qt_verstring="QT_VERSION >= 200"
1222
 
     fi
1223
 
   fi
1224
 
   if test $kde_qtver = 1; then
1225
 
    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1226
 
   fi
1227
 
else
1228
 
   kde_qt_verstring="$3"
1229
 
fi
1230
 
 
1231
 
if test $kde_qtver = 3; then
1232
 
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1233
 
fi
1234
 
if test $kde_qtver = 2; then
1235
 
   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1236
 
fi
1237
 
if test $kde_qtver = 1; then
1238
 
   kde_qt_dirs="$QTDIR /usr/lib/qt"
1239
 
fi
1240
 
])
1241
 
 
1242
 
AC_DEFUN([KDE_CHECK_QT_DIRECT],
1243
 
[
1244
 
AC_REQUIRE([KDE_USE_QT])
1245
 
AC_MSG_CHECKING([if Qt compiles without flags])
1246
 
AC_CACHE_VAL(kde_cv_qt_direct,
1247
 
[
1248
 
AC_LANG_SAVE
1249
 
AC_LANG_CPLUSPLUS
1250
 
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1251
 
ac_LIBRARY_PATH="$LIBRARY_PATH"
1252
 
ac_cxxflags_safe="$CXXFLAGS"
1253
 
ac_ldflags_safe="$LDFLAGS"
1254
 
ac_libs_safe="$LIBS"
1255
 
 
1256
 
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1257
 
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1258
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1259
 
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1260
 
else
1261
 
LIBS="$LIBQT $LIBSOCKET"
1262
 
fi
1263
 
LD_LIBRARY_PATH=
1264
 
export LD_LIBRARY_PATH
1265
 
LIBRARY_PATH=
1266
 
export LIBRARY_PATH
1267
 
 
1268
 
KDE_PRINT_QT_PROGRAM
1269
 
 
1270
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1271
 
  kde_cv_qt_direct="yes"
1272
 
else
1273
 
  kde_cv_qt_direct="no"
1274
 
  echo "configure: failed program was:" >&AC_FD_CC
1275
 
  cat conftest.$ac_ext >&AC_FD_CC
1276
 
fi
1277
 
 
1278
 
rm -f conftest*
1279
 
CXXFLAGS="$ac_cxxflags_safe"
1280
 
LDFLAGS="$ac_ldflags_safe"
1281
 
LIBS="$ac_libs_safe"
1282
 
 
1283
 
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1284
 
export LD_LIBRARY_PATH
1285
 
LIBRARY_PATH="$ac_LIBRARY_PATH"
1286
 
export LIBRARY_PATH
1287
 
AC_LANG_RESTORE
1288
 
])
1289
 
 
1290
 
if test "$kde_cv_qt_direct" = "yes"; then
1291
 
  AC_MSG_RESULT(yes)
1292
 
  $1
1293
 
else
1294
 
  AC_MSG_RESULT(no)
1295
 
  $2
1296
 
fi
1297
 
])
1298
 
 
1299
 
dnl ------------------------------------------------------------------------
1300
 
dnl Try to find the Qt headers and libraries.
1301
 
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1302
 
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1303
 
dnl ------------------------------------------------------------------------
1304
 
dnl
1305
 
AC_DEFUN([AC_PATH_QT_1_3],
1306
 
[
1307
 
AC_REQUIRE([K_PATH_X])
1308
 
AC_REQUIRE([KDE_USE_QT])
1309
 
AC_REQUIRE([KDE_CHECK_LIB64])
1310
 
 
1311
 
dnl ------------------------------------------------------------------------
1312
 
dnl Add configure flag to enable linking to MT version of Qt library.
1313
 
dnl ------------------------------------------------------------------------
1314
 
 
1315
 
AC_ARG_ENABLE(
1316
 
  mt,
1317
 
  AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1318
 
  kde_use_qt_mt=$enableval,
1319
 
  [
1320
 
    if test $kde_qtver = 3; then
1321
 
      kde_use_qt_mt=yes
1322
 
    else
1323
 
      kde_use_qt_mt=no
1324
 
    fi
1325
 
  ]
1326
 
)
1327
 
 
1328
 
USING_QT_MT=""
1329
 
 
1330
 
dnl ------------------------------------------------------------------------
1331
 
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1332
 
dnl ------------------------------------------------------------------------
1333
 
 
1334
 
KDE_MT_LDFLAGS=
1335
 
KDE_MT_LIBS=
1336
 
if test "x$kde_use_qt_mt" = "xyes"; then
1337
 
  KDE_CHECK_THREADING
1338
 
  if test "x$kde_use_threading" = "xyes"; then
1339
 
    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1340
 
    KDE_MT_LDFLAGS="$USE_THREADS"
1341
 
    KDE_MT_LIBS="$LIBPTHREAD"
1342
 
  else
1343
 
    kde_use_qt_mt=no
1344
 
  fi
1345
 
fi
1346
 
AC_SUBST(KDE_MT_LDFLAGS)
1347
 
AC_SUBST(KDE_MT_LIBS)
1348
 
 
1349
 
kde_qt_was_given=yes
1350
 
 
1351
 
dnl ------------------------------------------------------------------------
1352
 
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1353
 
dnl ------------------------------------------------------------------------
1354
 
if test -z "$LIBQT_GLOB"; then
1355
 
  if test "x$kde_use_qt_emb" = "xyes"; then
1356
 
    LIBQT_GLOB="libqte.*"
1357
 
  else
1358
 
    LIBQT_GLOB="libqt.*"
1359
 
  fi
1360
 
fi
1361
 
 
1362
 
if test -z "$LIBQT"; then
1363
 
dnl ------------------------------------------------------------
1364
 
dnl If we got --enable-embedded then adjust the Qt library name.
1365
 
dnl ------------------------------------------------------------
1366
 
  if test "x$kde_use_qt_emb" = "xyes"; then
1367
 
    qtlib="qte"
1368
 
  else
1369
 
    qtlib="qt"
1370
 
  fi
1371
 
 
1372
 
  kde_int_qt="-l$qtlib"
1373
 
else
1374
 
  kde_int_qt="$LIBQT"
1375
 
  kde_lib_qt_set=yes
1376
 
fi
1377
 
 
1378
 
if test -z "$LIBQPE"; then
1379
 
dnl ------------------------------------------------------------
1380
 
dnl If we got --enable-palmtop then add -lqpe to the link line
1381
 
dnl ------------------------------------------------------------
1382
 
  if test "x$kde_use_qt_emb" = "xyes"; then
1383
 
    if test "x$kde_use_qt_emb_palm" = "xyes"; then
1384
 
      LIB_QPE="-lqpe"
1385
 
    else
1386
 
      LIB_QPE=""
1387
 
    fi
1388
 
  else
1389
 
    LIB_QPE=""
1390
 
  fi
1391
 
fi
1392
 
 
1393
 
dnl ------------------------------------------------------------------------
1394
 
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1395
 
dnl ------------------------------------------------------------------------
1396
 
 
1397
 
if test "x$kde_use_qt_mt" = "xyes"; then
1398
 
  if test -z "$LIBQT"; then
1399
 
    LIBQT="-l$qtlib-mt"
1400
 
    kde_int_qt="-l$qtlib-mt"
1401
 
  else
1402
 
    LIBQT="$qtlib-mt"
1403
 
    kde_int_qt="$qtlib-mt"
1404
 
  fi
1405
 
  LIBQT_GLOB="lib$qtlib-mt.*"
1406
 
  USING_QT_MT="using -mt"
1407
 
else
1408
 
  LIBQT="-l$qtlib"
1409
 
fi
1410
 
 
1411
 
if test $kde_qtver != 1; then
1412
 
 
1413
 
  AC_REQUIRE([AC_FIND_PNG])
1414
 
  AC_REQUIRE([AC_FIND_JPEG])
1415
 
  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1416
 
fi
1417
 
 
1418
 
if test $kde_qtver = 3; then
1419
 
  AC_REQUIRE([KDE_CHECK_LIBDL])
1420
 
  LIBQT="$LIBQT $LIBDL"
1421
 
fi
1422
 
 
1423
 
AC_MSG_CHECKING([for Qt])
1424
 
 
1425
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1426
 
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1427
 
fi
1428
 
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1429
 
qt_libraries=""
1430
 
qt_includes=""
1431
 
AC_ARG_WITH(qt-dir,
1432
 
    AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1433
 
    [  ac_qt_includes="$withval"/include
1434
 
       ac_qt_libraries="$withval"/lib${kdelibsuff}
1435
 
       ac_qt_bindir="$withval"/bin
1436
 
    ])
1437
 
 
1438
 
AC_ARG_WITH(qt-includes,
1439
 
    AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1440
 
    [
1441
 
       ac_qt_includes="$withval"
1442
 
    ])
1443
 
 
1444
 
kde_qt_libs_given=no
1445
 
 
1446
 
AC_ARG_WITH(qt-libraries,
1447
 
    AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1448
 
    [  ac_qt_libraries="$withval"
1449
 
       kde_qt_libs_given=yes
1450
 
    ])
1451
 
 
1452
 
AC_CACHE_VAL(ac_cv_have_qt,
1453
 
[#try to guess Qt locations
1454
 
 
1455
 
qt_incdirs=""
1456
 
for dir in $kde_qt_dirs; do
1457
 
   qt_incdirs="$qt_incdirs $dir/include $dir"
1458
 
done
1459
 
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"
1460
 
if test ! "$ac_qt_includes" = "NO"; then
1461
 
   qt_incdirs="$ac_qt_includes $qt_incdirs"
1462
 
fi
1463
 
 
1464
 
if test "$kde_qtver" != "1"; then
1465
 
  kde_qt_header=qstyle.h
1466
 
else
1467
 
  kde_qt_header=qglobal.h
1468
 
fi
1469
 
 
1470
 
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1471
 
ac_qt_includes="$qt_incdir"
1472
 
 
1473
 
qt_libdirs=""
1474
 
for dir in $kde_qt_dirs; do
1475
 
   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1476
 
done
1477
 
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1478
 
if test ! "$ac_qt_libraries" = "NO"; then
1479
 
  qt_libdir=$ac_qt_libraries
1480
 
else
1481
 
  qt_libdirs="$ac_qt_libraries $qt_libdirs"
1482
 
  # if the Qt was given, the chance is too big that libqt.* doesn't exist
1483
 
  qt_libdir=NONE
1484
 
  for dir in $qt_libdirs; do
1485
 
    try="ls -1 $dir/${LIBQT_GLOB}"
1486
 
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1487
 
  done
1488
 
fi
1489
 
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1490
 
  if test -e "$a"; then
1491
 
    LIBQT="$LIBQT ${kde_int_qt}_incremental"
1492
 
    break
1493
 
  fi
1494
 
done
1495
 
 
1496
 
ac_qt_libraries="$qt_libdir"
1497
 
 
1498
 
AC_LANG_SAVE
1499
 
AC_LANG_CPLUSPLUS
1500
 
 
1501
 
ac_cxxflags_safe="$CXXFLAGS"
1502
 
ac_ldflags_safe="$LDFLAGS"
1503
 
ac_libs_safe="$LIBS"
1504
 
 
1505
 
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1506
 
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1507
 
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1508
 
 
1509
 
KDE_PRINT_QT_PROGRAM
1510
 
 
1511
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1512
 
  rm -f conftest*
1513
 
else
1514
 
  echo "configure: failed program was:" >&AC_FD_CC
1515
 
  cat conftest.$ac_ext >&AC_FD_CC
1516
 
  ac_qt_libraries="NO"
1517
 
fi
1518
 
rm -f conftest*
1519
 
CXXFLAGS="$ac_cxxflags_safe"
1520
 
LDFLAGS="$ac_ldflags_safe"
1521
 
LIBS="$ac_libs_safe"
1522
 
 
1523
 
AC_LANG_RESTORE
1524
 
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1525
 
  ac_cv_have_qt="have_qt=no"
1526
 
  ac_qt_notfound=""
1527
 
  missing_qt_mt=""
1528
 
  if test "$ac_qt_includes" = NO; then
1529
 
    if test "$ac_qt_libraries" = NO; then
1530
 
      ac_qt_notfound="(headers and libraries)";
1531
 
    else
1532
 
      ac_qt_notfound="(headers)";
1533
 
    fi
1534
 
  else
1535
 
    if test "x$kde_use_qt_mt" = "xyes"; then
1536
 
       missing_qt_mt="
1537
 
Make sure that you have compiled Qt with thread support!"
1538
 
       ac_qt_notfound="(library $qtlib-mt)";
1539
 
    else
1540
 
       ac_qt_notfound="(library $qtlib)";
1541
 
    fi
1542
 
  fi
1543
 
 
1544
 
  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1545
 
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1546
 
else
1547
 
  have_qt="yes"
1548
 
fi
1549
 
])
1550
 
 
1551
 
eval "$ac_cv_have_qt"
1552
 
 
1553
 
if test "$have_qt" != yes; then
1554
 
  AC_MSG_RESULT([$have_qt]);
1555
 
else
1556
 
  ac_cv_have_qt="have_qt=yes \
1557
 
    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1558
 
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1559
 
 
1560
 
  qt_libraries="$ac_qt_libraries"
1561
 
  qt_includes="$ac_qt_includes"
1562
 
fi
1563
 
 
1564
 
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1565
 
     KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1566
 
fi
1567
 
 
1568
 
AC_SUBST(qt_libraries)
1569
 
AC_SUBST(qt_includes)
1570
 
 
1571
 
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1572
 
 QT_INCLUDES=""
1573
 
else
1574
 
 QT_INCLUDES="-I$qt_includes"
1575
 
 all_includes="$QT_INCLUDES $all_includes"
1576
 
fi
1577
 
 
1578
 
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1579
 
 QT_LDFLAGS=""
1580
 
else
1581
 
 QT_LDFLAGS="-L$qt_libraries"
1582
 
 all_libraries="$QT_LDFLAGS $all_libraries"
1583
 
fi
1584
 
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1585
 
 
1586
 
AC_SUBST(QT_INCLUDES)
1587
 
AC_SUBST(QT_LDFLAGS)
1588
 
AC_PATH_QT_MOC_UIC
1589
 
 
1590
 
KDE_CHECK_QT_JPEG
1591
 
 
1592
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1593
 
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1594
 
else
1595
 
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1596
 
fi
1597
 
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1598
 
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1599
 
  if test -e "$a"; then
1600
 
     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1601
 
     break
1602
 
  fi
1603
 
done
1604
 
 
1605
 
AC_SUBST(LIB_QT)
1606
 
AC_SUBST(LIB_QPE)
1607
 
 
1608
 
AC_SUBST(kde_qtver)
1609
 
])
1610
 
 
1611
 
AC_DEFUN([AC_PATH_QT],
1612
 
[
1613
 
AC_PATH_QT_1_3
1614
 
])
1615
 
 
1616
 
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1617
 
[
1618
 
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1619
 
 
1620
 
if test x$ac_uic_supports_libpath = xyes; then
1621
 
 
1622
 
AC_MSG_CHECKING([if UIC has KDE plugins available])
1623
 
AC_CACHE_VAL(kde_cv_uic_plugins,
1624
 
[
1625
 
cat > actest.ui << EOF
1626
 
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1627
 
<class>NewConnectionDialog</class>
1628
 
<widget class="QDialog">
1629
 
   <widget class="KLineEdit">
1630
 
        <property name="name">
1631
 
           <cstring>testInput</cstring>
1632
 
        </property>
1633
 
   </widget>
1634
 
</widget>
1635
 
</UI>
1636
 
EOF
1637
 
       
1638
 
 
1639
 
 
1640
 
kde_cv_uic_plugins=no
1641
 
kde_line="$UIC_PATH -L $kde_widgetdir"
1642
 
if test x$ac_uic_supports_nounload = xyes; then
1643
 
   kde_line="$kde_line -nounload"
1644
 
fi
1645
 
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1646
 
if AC_TRY_EVAL(kde_line); then
1647
 
        # if you're trying to debug this check and think it's incorrect,
1648
 
        # better check your installation. The check _is_ correct - your
1649
 
        # installation is not.
1650
 
        if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1651
 
                kde_cv_uic_plugins=yes
1652
 
        fi
1653
 
fi
1654
 
rm -f actest.ui actest.cpp
1655
 
])
1656
 
 
1657
 
AC_MSG_RESULT([$kde_cv_uic_plugins])
1658
 
if test "$kde_cv_uic_plugins" != yes; then
1659
 
        AC_MSG_ERROR([
1660
 
you need to install kdelibs first.
1661
 
 
1662
 
If you did install kdelibs, then the Qt version that is picked up by
1663
 
this configure is not the same version you used to compile kdelibs. 
1664
 
The Qt Plugin installed by kdelibs is *ONLY* loadable if its the 
1665
 
same Qt version, compiled with the same compiler and the same Qt
1666
 
configuration settings.
1667
 
])
1668
 
fi
1669
 
fi
1670
 
])
1671
 
 
1672
 
AC_DEFUN([KDE_CHECK_FINAL],
1673
 
[
1674
 
  AC_ARG_ENABLE(final,
1675
 
        AC_HELP_STRING([--enable-final],
1676
 
                       [build size optimized apps (experimental - needs lots of memory)]),
1677
 
        kde_use_final=$enableval, kde_use_final=no)
1678
 
 
1679
 
  if test "x$kde_use_final" = "xyes"; then
1680
 
      KDE_USE_FINAL_TRUE=""
1681
 
      KDE_USE_FINAL_FALSE="#"
1682
 
   else
1683
 
      KDE_USE_FINAL_TRUE="#"
1684
 
      KDE_USE_FINAL_FALSE=""
1685
 
  fi
1686
 
  AC_SUBST(KDE_USE_FINAL_TRUE)
1687
 
  AC_SUBST(KDE_USE_FINAL_FALSE)
1688
 
])
1689
 
 
1690
 
AC_DEFUN([KDE_CHECK_CLOSURE],
1691
 
[
1692
 
  AC_ARG_ENABLE(closure,
1693
 
                AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1694
 
        kde_use_closure=$enableval, kde_use_closure=no)
1695
 
 
1696
 
  KDE_NO_UNDEFINED=""
1697
 
  if test "x$kde_use_closure" = "xyes"; then
1698
 
       KDE_USE_CLOSURE_TRUE=""
1699
 
       KDE_USE_CLOSURE_FALSE="#"
1700
 
#       CXXFLAGS="$CXXFLAGS $REPO"
1701
 
  else
1702
 
       KDE_USE_CLOSURE_TRUE="#"
1703
 
       KDE_USE_CLOSURE_FALSE=""
1704
 
       KDE_NO_UNDEFINED=""
1705
 
       case $host in 
1706
 
         *-*-linux-gnu)
1707
 
           KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1708
 
                [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1709
 
                [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1710
 
                [KDE_NO_UNDEFINED=""])],
1711
 
            [KDE_NO_UNDEFINED=""])
1712
 
           ;;
1713
 
       esac
1714
 
  fi
1715
 
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
1716
 
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
1717
 
  AC_SUBST(KDE_NO_UNDEFINED)
1718
 
])
1719
 
 
1720
 
dnl Check if the linker supports --enable-new-dtags and --as-needed
1721
 
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
1722
 
[
1723
 
  AC_ARG_ENABLE(new_ldflags,
1724
 
                AC_HELP_STRING([--enable-new-ldflags],
1725
 
                [enable the new linker flags]),
1726
 
        kde_use_new_ldflags=$enableval, 
1727
 
        kde_use_new_ldflags=no)
1728
 
 
1729
 
  LDFLAGS_AS_NEEDED=""
1730
 
  LDFLAGS_NEW_DTAGS=""
1731
 
  if test "x$kde_use_new_ldflags" = "xyes"; then
1732
 
       LDFLAGS_NEW_DTAGS=""
1733
 
       KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
1734
 
                [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
1735
 
 
1736
 
       KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
1737
 
                [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
1738
 
  fi
1739
 
  AC_SUBST(LDFLAGS_AS_NEEDED)
1740
 
  AC_SUBST(LDFLAGS_NEW_DTAGS)
1741
 
])
1742
 
 
1743
 
AC_DEFUN([KDE_CHECK_NMCHECK],
1744
 
[
1745
 
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1746
 
        kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1747
 
 
1748
 
  if test "$kde_use_nmcheck" = "yes"; then
1749
 
      KDE_USE_NMCHECK_TRUE=""
1750
 
      KDE_USE_NMCHECK_FALSE="#"
1751
 
   else
1752
 
      KDE_USE_NMCHECK_TRUE="#"
1753
 
      KDE_USE_NMCHECK_FALSE=""
1754
 
  fi
1755
 
  AC_SUBST(KDE_USE_NMCHECK_TRUE)
1756
 
  AC_SUBST(KDE_USE_NMCHECK_FALSE)
1757
 
])
1758
 
 
1759
 
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1760
 
savex=$exec_prefix
1761
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1762
 
tmp=$$2
1763
 
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1764
 
exec_prefix=$savex
1765
 
])
1766
 
 
1767
 
dnl ------------------------------------------------------------------------
1768
 
dnl Now, the same with KDE
1769
 
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1770
 
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1771
 
dnl ------------------------------------------------------------------------
1772
 
dnl
1773
 
AC_DEFUN([AC_BASE_PATH_KDE],
1774
 
[
1775
 
AC_REQUIRE([KDE_CHECK_STL])
1776
 
AC_REQUIRE([AC_PATH_QT])dnl
1777
 
AC_REQUIRE([KDE_CHECK_LIB64])
1778
 
 
1779
 
AC_CHECK_RPATH
1780
 
AC_MSG_CHECKING([for KDE])
1781
 
 
1782
 
if test "${prefix}" != NONE; then
1783
 
  kde_includes=${includedir}
1784
 
  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1785
 
 
1786
 
  kde_libraries=${libdir}
1787
 
  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1788
 
 
1789
 
else
1790
 
  ac_kde_includes=
1791
 
  ac_kde_libraries=
1792
 
  kde_libraries=""
1793
 
  kde_includes=""
1794
 
fi
1795
 
 
1796
 
AC_CACHE_VAL(ac_cv_have_kde,
1797
 
[#try to guess kde locations
1798
 
 
1799
 
if test "$kde_qtver" = 1; then
1800
 
  kde_check_header="ksock.h"
1801
 
  kde_check_lib="libkdecore.la"
1802
 
else
1803
 
  kde_check_header="ksharedptr.h"
1804
 
  kde_check_lib="libkio.la"
1805
 
fi
1806
 
 
1807
 
if test -z "$1"; then
1808
 
 
1809
 
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"
1810
 
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1811
 
kde_incdirs="$ac_kde_includes $kde_incdirs"
1812
 
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1813
 
ac_kde_includes="$kde_incdir"
1814
 
 
1815
 
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1816
 
  AC_MSG_ERROR([
1817
 
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1818
 
So, check this please and use another prefix!])
1819
 
fi
1820
 
 
1821
 
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}"
1822
 
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1823
 
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1824
 
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1825
 
ac_kde_libraries="$kde_libdir"
1826
 
 
1827
 
kde_widgetdir=NO
1828
 
dnl this might be somewhere else
1829
 
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1830
 
 
1831
 
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1832
 
AC_MSG_ERROR([
1833
 
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1834
 
So, check this please and use another prefix!])
1835
 
fi
1836
 
 
1837
 
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1838
 
AC_MSG_ERROR([
1839
 
I can't find the designer plugins. These are required and should have been installed
1840
 
by kdelibs])
1841
 
fi
1842
 
 
1843
 
if test -n "$kde_widgetdir"; then
1844
 
    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1845
 
fi
1846
 
 
1847
 
 
1848
 
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1849
 
  ac_cv_have_kde="have_kde=no"
1850
 
else
1851
 
  ac_cv_have_kde="have_kde=yes \
1852
 
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1853
 
fi
1854
 
 
1855
 
else dnl test -z $1, e.g. from kdelibs
1856
 
 
1857
 
  ac_cv_have_kde="have_kde=no"
1858
 
 
1859
 
fi
1860
 
])dnl
1861
 
 
1862
 
eval "$ac_cv_have_kde"
1863
 
 
1864
 
if test "$have_kde" != "yes"; then
1865
 
 if test "${prefix}" = NONE; then
1866
 
  ac_kde_prefix="$ac_default_prefix"
1867
 
 else
1868
 
  ac_kde_prefix="$prefix"
1869
 
 fi
1870
 
 if test "$exec_prefix" = NONE; then
1871
 
  ac_kde_exec_prefix="$ac_kde_prefix"
1872
 
  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1873
 
 else
1874
 
  ac_kde_exec_prefix="$exec_prefix"
1875
 
  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1876
 
 fi
1877
 
 
1878
 
 kde_libraries="${libdir}"
1879
 
 kde_includes="${includedir}"
1880
 
 
1881
 
else
1882
 
  ac_cv_have_kde="have_kde=yes \
1883
 
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1884
 
  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1885
 
 
1886
 
  kde_libraries="$ac_kde_libraries"
1887
 
  kde_includes="$ac_kde_includes"
1888
 
fi
1889
 
AC_SUBST(kde_libraries)
1890
 
AC_SUBST(kde_includes)
1891
 
 
1892
 
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
1893
 
 KDE_INCLUDES=""
1894
 
else
1895
 
 KDE_INCLUDES="-I$kde_includes"
1896
 
 all_includes="$KDE_INCLUDES $all_includes"
1897
 
fi
1898
 
 
1899
 
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1900
 
 
1901
 
KDE_LDFLAGS="-L$kde_libraries"
1902
 
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
1903
 
 all_libraries="$KDE_LDFLAGS $all_libraries"
1904
 
fi
1905
 
 
1906
 
AC_SUBST(KDE_LDFLAGS)
1907
 
AC_SUBST(KDE_INCLUDES)
1908
 
 
1909
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1910
 
 
1911
 
all_libraries="$all_libraries $USER_LDFLAGS"
1912
 
all_includes="$all_includes $USER_INCLUDES"
1913
 
AC_SUBST(all_includes)
1914
 
AC_SUBST(all_libraries)
1915
 
 
1916
 
if test -z "$1"; then
1917
 
KDE_CHECK_UIC_PLUGINS
1918
 
fi
1919
 
 
1920
 
ac_kde_libraries="$kde_libdir"
1921
 
 
1922
 
AC_SUBST(AUTODIRS)
1923
 
 
1924
 
 
1925
 
])
1926
 
 
1927
 
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1928
 
[
1929
 
AC_MSG_CHECKING(for extra includes)
1930
 
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1931
 
  kde_use_extra_includes="$withval",
1932
 
  kde_use_extra_includes=NONE
1933
 
)
1934
 
kde_extra_includes=
1935
 
if test -n "$kde_use_extra_includes" && \
1936
 
   test "$kde_use_extra_includes" != "NONE"; then
1937
 
 
1938
 
   ac_save_ifs=$IFS
1939
 
   IFS=':'
1940
 
   for dir in $kde_use_extra_includes; do
1941
 
     kde_extra_includes="$kde_extra_includes $dir"
1942
 
     USER_INCLUDES="$USER_INCLUDES -I$dir"
1943
 
   done
1944
 
   IFS=$ac_save_ifs
1945
 
   kde_use_extra_includes="added"
1946
 
else
1947
 
   kde_use_extra_includes="no"
1948
 
fi
1949
 
AC_SUBST(USER_INCLUDES)
1950
 
 
1951
 
AC_MSG_RESULT($kde_use_extra_includes)
1952
 
 
1953
 
kde_extra_libs=
1954
 
AC_MSG_CHECKING(for extra libs)
1955
 
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1956
 
  kde_use_extra_libs=$withval,
1957
 
  kde_use_extra_libs=NONE
1958
 
)
1959
 
if test -n "$kde_use_extra_libs" && \
1960
 
   test "$kde_use_extra_libs" != "NONE"; then
1961
 
 
1962
 
   ac_save_ifs=$IFS
1963
 
   IFS=':'
1964
 
   for dir in $kde_use_extra_libs; do
1965
 
     kde_extra_libs="$kde_extra_libs $dir"
1966
 
     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1967
 
     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1968
 
   done
1969
 
   IFS=$ac_save_ifs
1970
 
   kde_use_extra_libs="added"
1971
 
else
1972
 
   kde_use_extra_libs="no"
1973
 
fi
1974
 
 
1975
 
AC_SUBST(USER_LDFLAGS)
1976
 
 
1977
 
AC_MSG_RESULT($kde_use_extra_libs)
1978
 
 
1979
 
])
1980
 
 
1981
 
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1982
 
[
1983
 
    AC_MSG_CHECKING([for KDE headers installed])
1984
 
    AC_LANG_SAVE
1985
 
    AC_LANG_CPLUSPLUS
1986
 
cat > conftest.$ac_ext <<EOF
1987
 
#ifdef STDC_HEADERS
1988
 
# include <stdlib.h>
1989
 
#endif
1990
 
#include <stdio.h>
1991
 
#include "confdefs.h"
1992
 
#include <kapp.h>
1993
 
 
1994
 
int main() {
1995
 
    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1996
 
    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1997
 
    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1998
 
    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1999
 
    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
2000
 
    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
2001
 
    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
2002
 
    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
2003
 
    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
2004
 
    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
2005
 
    printf("kde_wallpaperdir=\\"%s\\"\n",
2006
 
        KApplication::kde_wallpaperdir().data());
2007
 
    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
2008
 
    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
2009
 
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
2010
 
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
2011
 
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
2012
 
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
2013
 
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
2014
 
    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
2015
 
    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
2016
 
    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
2017
 
    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
2018
 
    return 0;
2019
 
    }
2020
 
EOF
2021
 
 
2022
 
 ac_save_CPPFLAGS=$CPPFLAGS
2023
 
 CPPFLAGS="$all_includes $CPPFLAGS"
2024
 
 if AC_TRY_EVAL(ac_compile); then
2025
 
   AC_MSG_RESULT(yes)
2026
 
 else
2027
 
   AC_MSG_ERROR([your system is not able to compile a small KDE application!
2028
 
Check, if you installed the KDE header files correctly.
2029
 
For more details about this problem, look at the end of config.log.])
2030
 
  fi
2031
 
  CPPFLAGS=$ac_save_CPPFLAGS
2032
 
 
2033
 
  AC_LANG_RESTORE
2034
 
])
2035
 
 
2036
 
AC_DEFUN([KDE_CHECK_KDEQTADDON],
2037
 
[
2038
 
AC_MSG_CHECKING(for kde-qt-addon)
2039
 
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2040
 
[
2041
 
 kde_ldflags_safe="$LDFLAGS"
2042
 
 kde_libs_safe="$LIBS"
2043
 
 kde_cxxflags_safe="$CXXFLAGS"
2044
 
 
2045
 
 LIBS="-lkde-qt-addon $LIBQT $LIBS"
2046
 
 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
2047
 
 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
2048
 
 
2049
 
 AC_TRY_LINK([
2050
 
   #include <qdom.h>
2051
 
 ],
2052
 
 [
2053
 
   QDomDocument doc;
2054
 
 ],
2055
 
  kde_cv_have_kdeqtaddon=yes,
2056
 
  kde_cv_have_kdeqtaddon=no
2057
 
 )
2058
 
 
2059
 
 LDFLAGS=$kde_ldflags_safe
2060
 
 LIBS=$kde_libs_safe
2061
 
 CXXFLAGS=$kde_cxxflags_safe
2062
 
])
2063
 
 
2064
 
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2065
 
 
2066
 
if test "$kde_cv_have_kdeqtaddon" = "no"; then
2067
 
  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2068
 
It is a separate package (and CVS module) named kde-qt-addon.])
2069
 
fi
2070
 
])
2071
 
 
2072
 
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2073
 
[
2074
 
   AC_REQUIRE([KDE_MISC_TESTS])
2075
 
   AC_REQUIRE([KDE_CHECK_LIBDL])
2076
 
   AC_REQUIRE([K_PATH_X])
2077
 
 
2078
 
if test $kde_qtver = 3; then
2079
 
   case $host in 
2080
 
               *cygwin*) lib_kded="-lkdeinit_kded" ;;
2081
 
               *) lib_kded="" ;;
2082
 
       esac
2083
 
   AC_SUBST(LIB_KDED, $lib_kded)
2084
 
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2085
 
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2086
 
   AC_SUBST(LIB_KIO, "-lkio")
2087
 
   AC_SUBST(LIB_KJS, "-lkjs")
2088
 
   AC_SUBST(LIB_SMB, "-lsmb")
2089
 
   AC_SUBST(LIB_KAB, "-lkab")
2090
 
   AC_SUBST(LIB_KABC, "-lkabc")
2091
 
   AC_SUBST(LIB_KHTML, "-lkhtml")
2092
 
   AC_SUBST(LIB_KSPELL, "-lkspell")
2093
 
   AC_SUBST(LIB_KPARTS, "-lkparts")
2094
 
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2095
 
   AC_SUBST(LIB_KUTILS, "-lkutils")
2096
 
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
2097
 
   AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2098
 
   AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2099
 
   AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2100
 
   AC_SUBST(LIB_KUNITTEST, "-lkunittest")
2101
 
# these are for backward compatibility
2102
 
   AC_SUBST(LIB_KSYCOCA, "-lkio")
2103
 
   AC_SUBST(LIB_KFILE, "-lkio")
2104
 
elif test $kde_qtver = 2; then
2105
 
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2106
 
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2107
 
   AC_SUBST(LIB_KIO, "-lkio")
2108
 
   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2109
 
   AC_SUBST(LIB_SMB, "-lsmb")
2110
 
   AC_SUBST(LIB_KFILE, "-lkfile")
2111
 
   AC_SUBST(LIB_KAB, "-lkab")
2112
 
   AC_SUBST(LIB_KHTML, "-lkhtml")
2113
 
   AC_SUBST(LIB_KSPELL, "-lkspell")
2114
 
   AC_SUBST(LIB_KPARTS, "-lkparts")
2115
 
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2116
 
else
2117
 
   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2118
 
   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2119
 
   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2120
 
   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2121
 
   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2122
 
fi
2123
 
])
2124
 
 
2125
 
AC_DEFUN([AC_PATH_KDE],
2126
 
[
2127
 
  AC_BASE_PATH_KDE
2128
 
  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2129
 
  [
2130
 
  if test "$enableval" = "no";
2131
 
    then ac_use_path_checking="default"
2132
 
    else ac_use_path_checking=""
2133
 
  fi
2134
 
  ],
2135
 
  [
2136
 
  if test "$kde_qtver" = 1;
2137
 
    then ac_use_path_checking=""
2138
 
    else ac_use_path_checking="default"
2139
 
  fi
2140
 
  ]
2141
 
  )
2142
 
 
2143
 
  AC_CREATE_KFSSTND($ac_use_path_checking)
2144
 
 
2145
 
  AC_SUBST_KFSSTND
2146
 
  KDE_CREATE_LIBS_ALIASES
2147
 
])
2148
 
 
2149
 
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2150
 
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2151
 
[
2152
 
AC_MSG_CHECKING(for $1)
2153
 
AC_CACHE_VAL(kde_cv_func_$1,
2154
 
[
2155
 
AC_LANG_SAVE
2156
 
AC_LANG_CPLUSPLUS
2157
 
save_CXXFLAGS="$CXXFLAGS"
2158
 
kde_safe_LIBS="$LIBS"
2159
 
LIBS="$LIBS $X_EXTRA_LIBS"
2160
 
if test "$GXX" = "yes"; then
2161
 
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2162
 
fi
2163
 
AC_TRY_COMPILE([
2164
 
$2
2165
 
],
2166
 
[
2167
 
$3
2168
 
],
2169
 
kde_cv_func_$1=yes,
2170
 
kde_cv_func_$1=no)
2171
 
CXXFLAGS="$save_CXXFLAGS"
2172
 
LIBS="$kde_safe_LIBS"
2173
 
AC_LANG_RESTORE
2174
 
])
2175
 
 
2176
 
AC_MSG_RESULT($kde_cv_func_$1)
2177
 
 
2178
 
AC_MSG_CHECKING([if $1 needs custom prototype])
2179
 
AC_CACHE_VAL(kde_cv_proto_$1,
2180
 
[
2181
 
if test "x$kde_cv_func_$1" = xyes; then
2182
 
  kde_cv_proto_$1=no
2183
 
else
2184
 
  case "$1" in
2185
 
        setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2186
 
                kde_cv_proto_$1="yes - in libkdefakes"
2187
 
                ;;
2188
 
        *)
2189
 
                kde_cv_proto_$1=unknown
2190
 
                ;;
2191
 
  esac
2192
 
fi
2193
 
 
2194
 
if test "x$kde_cv_proto_$1" = xunknown; then
2195
 
 
2196
 
AC_LANG_SAVE
2197
 
AC_LANG_CPLUSPLUS
2198
 
  kde_safe_libs=$LIBS
2199
 
  LIBS="$LIBS $X_EXTRA_LIBS"
2200
 
  AC_TRY_LINK([
2201
 
$2
2202
 
 
2203
 
extern "C" $4;
2204
 
],
2205
 
[
2206
 
$3
2207
 
],
2208
 
[ kde_cv_func_$1=yes
2209
 
  kde_cv_proto_$1=yes ],
2210
 
  [kde_cv_proto_$1="$1 unavailable"]
2211
 
)
2212
 
LIBS=$kde_safe_libs
2213
 
AC_LANG_RESTORE
2214
 
fi
2215
 
])
2216
 
AC_MSG_RESULT($kde_cv_proto_$1)
2217
 
 
2218
 
if test "x$kde_cv_func_$1" = xyes; then
2219
 
  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2220
 
  $6
2221
 
fi
2222
 
if test "x$kde_cv_proto_$1" = xno; then
2223
 
  AC_DEFINE(HAVE_$5_PROTO, 1,
2224
 
  [Define if you have the $1 prototype])
2225
 
fi
2226
 
 
2227
 
AH_VERBATIM([_HAVE_$5_PROTO],
2228
 
[
2229
 
#if !defined(HAVE_$5_PROTO)
2230
 
#ifdef __cplusplus
2231
 
extern "C" {
2232
 
#endif
2233
 
$4;
2234
 
#ifdef __cplusplus
2235
 
}
2236
 
#endif
2237
 
#endif
2238
 
])
2239
 
])
2240
 
 
2241
 
AC_DEFUN([AC_CHECK_SETENV],
2242
 
[
2243
 
        KDE_CHECK_FUNC_EXT(setenv, [
2244
 
#include <stdlib.h>
2245
 
], 
2246
 
                [setenv("VAR", "VALUE", 1);],
2247
 
                [int setenv (const char *, const char *, int)],
2248
 
                [SETENV])
2249
 
])
2250
 
 
2251
 
AC_DEFUN([AC_CHECK_UNSETENV],
2252
 
[
2253
 
        KDE_CHECK_FUNC_EXT(unsetenv, [
2254
 
#include <stdlib.h>
2255
 
], 
2256
 
                [unsetenv("VAR");],
2257
 
                [void unsetenv (const char *)],
2258
 
                [UNSETENV])
2259
 
])
2260
 
 
2261
 
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2262
 
[
2263
 
        KDE_CHECK_FUNC_EXT(getdomainname, [
2264
 
#include <stdlib.h>
2265
 
#include <unistd.h>
2266
 
#include <netdb.h>
2267
 
], 
2268
 
                [
2269
 
char buffer[200];
2270
 
getdomainname(buffer, 200);
2271
 
],      
2272
 
                [#include <sys/types.h>
2273
 
                int getdomainname (char *, size_t)],
2274
 
                [GETDOMAINNAME])
2275
 
])
2276
 
 
2277
 
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2278
 
[
2279
 
        KDE_CHECK_FUNC_EXT(gethostname, [
2280
 
#include <stdlib.h>
2281
 
#include <unistd.h>
2282
 
], 
2283
 
                [
2284
 
char buffer[200];
2285
 
gethostname(buffer, 200);
2286
 
],      
2287
 
                [int gethostname (char *, unsigned int)],
2288
 
                [GETHOSTNAME])
2289
 
])
2290
 
 
2291
 
AC_DEFUN([AC_CHECK_USLEEP],
2292
 
[
2293
 
        KDE_CHECK_FUNC_EXT(usleep, [
2294
 
#include <unistd.h>
2295
 
], 
2296
 
                [
2297
 
usleep(200);
2298
 
],      
2299
 
                [int usleep (unsigned int)],
2300
 
                [USLEEP])
2301
 
])
2302
 
 
2303
 
 
2304
 
AC_DEFUN([AC_CHECK_RANDOM],
2305
 
[
2306
 
        KDE_CHECK_FUNC_EXT(random, [
2307
 
#include <stdlib.h>
2308
 
], 
2309
 
                [
2310
 
random();
2311
 
],      
2312
 
                [long int random(void)],
2313
 
                [RANDOM])
2314
 
 
2315
 
        KDE_CHECK_FUNC_EXT(srandom, [
2316
 
#include <stdlib.h>
2317
 
], 
2318
 
                [
2319
 
srandom(27);
2320
 
],      
2321
 
                [void srandom(unsigned int)],
2322
 
                [SRANDOM])
2323
 
 
2324
 
])
2325
 
 
2326
 
AC_DEFUN([AC_CHECK_INITGROUPS],
2327
 
[
2328
 
        KDE_CHECK_FUNC_EXT(initgroups, [
2329
 
#include <sys/types.h>
2330
 
#include <unistd.h>
2331
 
#include <grp.h>
2332
 
],
2333
 
        [
2334
 
char buffer[200];
2335
 
initgroups(buffer, 27);
2336
 
],
2337
 
        [int initgroups(const char *, gid_t)],
2338
 
        [INITGROUPS])
2339
 
])
2340
 
 
2341
 
AC_DEFUN([AC_CHECK_MKSTEMPS],
2342
 
[
2343
 
        KDE_CHECK_FUNC_EXT(mkstemps, [
2344
 
#include <stdlib.h>
2345
 
#include <unistd.h>
2346
 
],
2347
 
        [
2348
 
mkstemps("/tmp/aaaXXXXXX", 6);
2349
 
],
2350
 
        [int mkstemps(char *, int)],
2351
 
        [MKSTEMPS])
2352
 
])
2353
 
 
2354
 
AC_DEFUN([AC_CHECK_MKSTEMP],
2355
 
[
2356
 
        KDE_CHECK_FUNC_EXT(mkstemp, [
2357
 
#include <stdlib.h>
2358
 
#include <unistd.h>
2359
 
],
2360
 
        [
2361
 
mkstemp("/tmp/aaaXXXXXX");
2362
 
],
2363
 
        [int mkstemp(char *)],
2364
 
        [MKSTEMP])
2365
 
])
2366
 
 
2367
 
AC_DEFUN([AC_CHECK_MKDTEMP],
2368
 
[
2369
 
        KDE_CHECK_FUNC_EXT(mkdtemp, [
2370
 
#include <stdlib.h>
2371
 
#include <unistd.h>
2372
 
],
2373
 
        [
2374
 
mkdtemp("/tmp/aaaXXXXXX");
2375
 
],
2376
 
        [char *mkdtemp(char *)],
2377
 
        [MKDTEMP])
2378
 
])
2379
 
 
2380
 
 
2381
 
AC_DEFUN([AC_CHECK_RES_INIT],
2382
 
[
2383
 
  AC_MSG_CHECKING([if res_init needs -lresolv])
2384
 
  kde_libs_safe="$LIBS"
2385
 
  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2386
 
  AC_TRY_LINK(
2387
 
    [
2388
 
#include <sys/types.h>
2389
 
#include <netinet/in.h>
2390
 
#include <arpa/nameser.h>
2391
 
#include <resolv.h>
2392
 
    ],
2393
 
    [
2394
 
      res_init(); 
2395
 
    ],
2396
 
    [
2397
 
      LIBRESOLV="-lresolv"
2398
 
      AC_MSG_RESULT(yes)
2399
 
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2400
 
    ],
2401
 
    [ AC_MSG_RESULT(no) ]
2402
 
  )
2403
 
  LIBS=$kde_libs_safe
2404
 
  AC_SUBST(LIBRESOLV)
2405
 
 
2406
 
  KDE_CHECK_FUNC_EXT(res_init,
2407
 
    [
2408
 
#include <sys/types.h>
2409
 
#include <netinet/in.h>
2410
 
#include <arpa/nameser.h>
2411
 
#include <resolv.h>
2412
 
    ],
2413
 
    [res_init()],
2414
 
    [int res_init(void)],
2415
 
    [RES_INIT])
2416
 
])
2417
 
 
2418
 
AC_DEFUN([AC_CHECK_STRLCPY],
2419
 
[
2420
 
        KDE_CHECK_FUNC_EXT(strlcpy, [
2421
 
#include <string.h>
2422
 
],
2423
 
[ char buf[20];
2424
 
  strlcpy(buf, "KDE function test", sizeof(buf));
2425
 
],
2426
 
        [unsigned long strlcpy(char*, const char*, unsigned long)],
2427
 
        [STRLCPY])
2428
 
])
2429
 
 
2430
 
AC_DEFUN([AC_CHECK_STRLCAT],
2431
 
[
2432
 
        KDE_CHECK_FUNC_EXT(strlcat, [
2433
 
#include <string.h>
2434
 
],
2435
 
[ char buf[20];
2436
 
  buf[0]='\0';
2437
 
  strlcat(buf, "KDE function test", sizeof(buf));
2438
 
],
2439
 
        [unsigned long strlcat(char*, const char*, unsigned long)],
2440
 
        [STRLCAT])
2441
 
])
2442
 
 
2443
 
AC_DEFUN([AC_CHECK_RES_QUERY],
2444
 
[
2445
 
        KDE_CHECK_FUNC_EXT(res_query, [
2446
 
#include <sys/types.h>
2447
 
#include <netinet/in.h>
2448
 
#include <arpa/nameser.h>
2449
 
#include <resolv.h>
2450
 
#include <netdb.h>
2451
 
],
2452
 
[
2453
 
res_query(NULL, 0, 0, NULL, 0);
2454
 
],
2455
 
        [int res_query(const char *, int, int, unsigned char *, int)],
2456
 
        [RES_QUERY])
2457
 
])
2458
 
 
2459
 
AC_DEFUN([AC_CHECK_DN_SKIPNAME],
2460
 
[
2461
 
        KDE_CHECK_FUNC_EXT(dn_skipname, [
2462
 
#include <sys/types.h>
2463
 
#include <netinet/in.h>
2464
 
#include <arpa/nameser.h>
2465
 
#include <resolv.h>
2466
 
],
2467
 
[
2468
 
dn_skipname (NULL, NULL);
2469
 
],
2470
 
        [int dn_skipname (unsigned char *, unsigned char *)],
2471
 
        [DN_SKIPNAME])
2472
 
])
2473
 
 
2474
 
 
2475
 
AC_DEFUN([AC_FIND_GIF],
2476
 
   [AC_MSG_CHECKING([for giflib])
2477
 
AC_CACHE_VAL(ac_cv_lib_gif,
2478
 
[ac_save_LIBS="$LIBS"
2479
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2480
 
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2481
 
else
2482
 
LIBS="$all_libraries -lgif"
2483
 
fi
2484
 
AC_TRY_LINK(dnl
2485
 
[
2486
 
#ifdef __cplusplus
2487
 
extern "C" {
2488
 
#endif
2489
 
int GifLastError(void);
2490
 
#ifdef __cplusplus
2491
 
}
2492
 
#endif
2493
 
/* We use char because int might match the return type of a gcc2
2494
 
    builtin and then its argument prototype would still apply.  */
2495
 
],
2496
 
            [return GifLastError();],
2497
 
            eval "ac_cv_lib_gif=yes",
2498
 
            eval "ac_cv_lib_gif=no")
2499
 
LIBS="$ac_save_LIBS"
2500
 
])dnl
2501
 
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2502
 
  AC_MSG_RESULT(yes)
2503
 
  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2504
 
else
2505
 
  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2506
 
fi
2507
 
])
2508
 
 
2509
 
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2510
 
[
2511
 
AC_MSG_CHECKING([for libjpeg$2])
2512
 
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2513
 
[
2514
 
ac_save_LIBS="$LIBS"
2515
 
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2516
 
ac_save_CFLAGS="$CFLAGS"
2517
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2518
 
AC_TRY_LINK(
2519
 
[/* Override any gcc2 internal prototype to avoid an error.  */
2520
 
struct jpeg_decompress_struct;
2521
 
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2522
 
typedef int size_t;
2523
 
#ifdef __cplusplus
2524
 
extern "C" {
2525
 
#endif
2526
 
    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2527
 
                                    int version, size_t structsize);
2528
 
#ifdef __cplusplus
2529
 
}
2530
 
#endif
2531
 
/* We use char because int might match the return type of a gcc2
2532
 
    builtin and then its argument prototype would still apply.  */
2533
 
],
2534
 
            [jpeg_CreateDecompress(0L, 0, 0);],
2535
 
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2536
 
            eval "ac_cv_lib_jpeg_$1=no")
2537
 
LIBS="$ac_save_LIBS"
2538
 
CFLAGS="$ac_save_CFLAGS"
2539
 
])
2540
 
 
2541
 
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2542
 
  LIBJPEG="$ac_cv_lib_jpeg_$1"
2543
 
  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2544
 
else
2545
 
  AC_MSG_RESULT(no)
2546
 
  $3
2547
 
fi
2548
 
 
2549
 
])
2550
 
 
2551
 
AC_DEFUN([AC_FIND_JPEG],
2552
 
[
2553
 
dnl first look for libraries
2554
 
KDE_FIND_JPEG_HELPER(6b, 6b,
2555
 
   KDE_FIND_JPEG_HELPER(normal, [],
2556
 
    [
2557
 
       LIBJPEG=
2558
 
    ]
2559
 
   )
2560
 
)
2561
 
 
2562
 
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2563
 
dnl requires system dependent includes loaded before it)
2564
 
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2565
 
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2566
 
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2567
 
 
2568
 
dnl if headers _and_ libraries are missing, this is no error, and we
2569
 
dnl continue with a warning (the user will get no jpeg support in khtml)
2570
 
dnl if only one is missing, it means a configuration error, but we still
2571
 
dnl only warn
2572
 
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2573
 
  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2574
 
else
2575
 
  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2576
 
    AC_MSG_WARN([
2577
 
There is an installation error in jpeg support. You seem to have only one
2578
 
of either the headers _or_ the libraries installed. You may need to either
2579
 
provide correct --with-extra-... options, or the development package of
2580
 
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2581
 
Disabling JPEG support.
2582
 
])
2583
 
  else
2584
 
    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2585
 
  fi
2586
 
  jpeg_incdir=
2587
 
  LIBJPEG=
2588
 
fi
2589
 
 
2590
 
AC_SUBST(LIBJPEG)
2591
 
AH_VERBATIM(_AC_CHECK_JPEG,
2592
 
[/*
2593
 
 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2594
 
 * headers and I'm too lazy to write a configure test as long as only
2595
 
 * unixware is related
2596
 
 */
2597
 
#ifdef _UNIXWARE
2598
 
#define HAVE_BOOLEAN
2599
 
#endif
2600
 
])
2601
 
])
2602
 
 
2603
 
AC_DEFUN([KDE_CHECK_QT_JPEG],
2604
 
[
2605
 
if test -n "$LIBJPEG"; then
2606
 
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2607
 
AC_CACHE_VAL(kde_cv_qt_jpeg,
2608
 
[
2609
 
AC_LANG_SAVE
2610
 
AC_LANG_CPLUSPLUS
2611
 
ac_save_LIBS="$LIBS"
2612
 
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2613
 
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2614
 
ac_save_CXXFLAGS="$CXXFLAGS"
2615
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2616
 
AC_TRY_LINK(
2617
 
[#include <qapplication.h>],
2618
 
            [
2619
 
            int argc;
2620
 
            char** argv;
2621
 
            QApplication app(argc, argv);],
2622
 
            eval "kde_cv_qt_jpeg=no",
2623
 
            eval "kde_cv_qt_jpeg=yes")
2624
 
LIBS="$ac_save_LIBS"
2625
 
CXXFLAGS="$ac_save_CXXFLAGS"
2626
 
AC_LANG_RESTORE
2627
 
fi
2628
 
])
2629
 
 
2630
 
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2631
 
  AC_MSG_RESULT(yes)
2632
 
  LIBJPEG_QT='$(LIBJPEG)'
2633
 
else
2634
 
  AC_MSG_RESULT(no)
2635
 
  LIBJPEG_QT=
2636
 
fi
2637
 
 
2638
 
])
2639
 
 
2640
 
AC_DEFUN([AC_FIND_ZLIB],
2641
 
[
2642
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2643
 
AC_MSG_CHECKING([for libz])
2644
 
AC_CACHE_VAL(ac_cv_lib_z,
2645
 
[
2646
 
kde_save_LIBS="$LIBS"
2647
 
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2648
 
kde_save_CFLAGS="$CFLAGS"
2649
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2650
 
AC_TRY_LINK(dnl
2651
 
[
2652
 
#include<zlib.h>
2653
 
],
2654
 
[
2655
 
  char buf[42];
2656
 
  gzFile f = (gzFile) 0;
2657
 
  /* this would segfault.. but we only link, don't run */
2658
 
  (void) gzgets(f, buf, sizeof(buf));
2659
 
 
2660
 
  return (zlibVersion() == ZLIB_VERSION); 
2661
 
],
2662
 
            eval "ac_cv_lib_z='-lz'",
2663
 
            eval "ac_cv_lib_z=no")
2664
 
LIBS="$kde_save_LIBS"
2665
 
CFLAGS="$kde_save_CFLAGS"
2666
 
])dnl
2667
 
if test ! "$ac_cv_lib_z" = no; then
2668
 
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2669
 
  LIBZ="$ac_cv_lib_z"
2670
 
  AC_MSG_RESULT($ac_cv_lib_z)
2671
 
else
2672
 
  AC_MSG_ERROR(not found. 
2673
 
          Possibly configure picks up an outdated version
2674
 
          installed by XFree86. Remove it from your system.
2675
 
 
2676
 
          Check your installation and look into config.log)
2677
 
  LIBZ=""
2678
 
fi
2679
 
AC_SUBST(LIBZ)
2680
 
])
2681
 
 
2682
 
AC_DEFUN([KDE_TRY_TIFFLIB],
2683
 
[
2684
 
AC_MSG_CHECKING([for libtiff $1])
2685
 
 
2686
 
AC_CACHE_VAL(kde_cv_libtiff_$1,
2687
 
[
2688
 
AC_LANG_SAVE
2689
 
AC_LANG_CPLUSPLUS
2690
 
kde_save_LIBS="$LIBS"
2691
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2692
 
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2693
 
else
2694
 
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2695
 
fi
2696
 
kde_save_CXXFLAGS="$CXXFLAGS"
2697
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2698
 
 
2699
 
AC_TRY_LINK(dnl
2700
 
[
2701
 
#include<tiffio.h>
2702
 
],
2703
 
    [return (TIFFOpen( "", "r") == 0); ],
2704
 
[
2705
 
    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2706
 
], [
2707
 
    kde_cv_libtiff_$1=no
2708
 
])
2709
 
 
2710
 
LIBS="$kde_save_LIBS"
2711
 
CXXFLAGS="$kde_save_CXXFLAGS"
2712
 
AC_LANG_RESTORE
2713
 
])
2714
 
 
2715
 
if test "$kde_cv_libtiff_$1" = "no"; then
2716
 
    AC_MSG_RESULT(no)
2717
 
    LIBTIFF=""
2718
 
    $3
2719
 
else
2720
 
    LIBTIFF="$kde_cv_libtiff_$1"
2721
 
    AC_MSG_RESULT(yes)
2722
 
    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2723
 
    $2
2724
 
fi
2725
 
 
2726
 
])
2727
 
 
2728
 
AC_DEFUN([AC_FIND_TIFF],
2729
 
[
2730
 
AC_REQUIRE([K_PATH_X])
2731
 
AC_REQUIRE([AC_FIND_ZLIB])
2732
 
AC_REQUIRE([AC_FIND_JPEG])
2733
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2734
 
 
2735
 
KDE_TRY_TIFFLIB(tiff, [],
2736
 
   KDE_TRY_TIFFLIB(tiff34))
2737
 
 
2738
 
AC_SUBST(LIBTIFF)
2739
 
])
2740
 
 
2741
 
 
2742
 
AC_DEFUN([AC_FIND_PNG],
2743
 
[
2744
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2745
 
AC_REQUIRE([AC_FIND_ZLIB])
2746
 
AC_MSG_CHECKING([for libpng])
2747
 
AC_CACHE_VAL(ac_cv_lib_png,
2748
 
[
2749
 
kde_save_LIBS="$LIBS"
2750
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2751
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2752
 
else
2753
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2754
 
fi
2755
 
kde_save_CFLAGS="$CFLAGS"
2756
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2757
 
 
2758
 
AC_TRY_LINK(dnl
2759
 
    [
2760
 
    #include<png.h>
2761
 
    ],
2762
 
    [
2763
 
    png_structp png_ptr = png_create_read_struct(  /* image ptr */
2764
 
                PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2765
 
    return( png_ptr != 0 );
2766
 
    ],
2767
 
    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2768
 
    eval "ac_cv_lib_png=no"
2769
 
)
2770
 
LIBS="$kde_save_LIBS"
2771
 
CFLAGS="$kde_save_CFLAGS"
2772
 
])dnl
2773
 
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2774
 
  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2775
 
  LIBPNG="$ac_cv_lib_png"
2776
 
  AC_SUBST(LIBPNG)
2777
 
  AC_MSG_RESULT($ac_cv_lib_png)
2778
 
else
2779
 
  AC_MSG_RESULT(no)
2780
 
  LIBPNG=""
2781
 
  AC_SUBST(LIBPNG)
2782
 
fi
2783
 
])
2784
 
 
2785
 
 
2786
 
AC_DEFUN([AC_FIND_JASPER],
2787
 
[
2788
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2789
 
AC_REQUIRE([AC_FIND_JPEG])
2790
 
AC_MSG_CHECKING([for jasper])
2791
 
AC_CACHE_VAL(ac_cv_jasper,
2792
 
[
2793
 
kde_save_LIBS="$LIBS"
2794
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2795
 
kde_save_CFLAGS="$CFLAGS"
2796
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2797
 
 
2798
 
AC_TRY_LINK(dnl
2799
 
    [
2800
 
    #include<jasper/jasper.h>
2801
 
    ],
2802
 
    [
2803
 
    return( jas_init() );
2804
 
    ],
2805
 
    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2806
 
    eval "ac_cv_jasper=no"
2807
 
)
2808
 
LIBS="$kde_save_LIBS"
2809
 
CFLAGS="$kde_save_CFLAGS"
2810
 
])dnl
2811
 
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2812
 
  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2813
 
  LIB_JASPER="$ac_cv_jasper"
2814
 
  AC_MSG_RESULT($ac_cv_jasper)
2815
 
else
2816
 
  AC_MSG_RESULT(no)
2817
 
  LIB_JASPER=""
2818
 
fi
2819
 
AC_SUBST(LIB_JASPER)
2820
 
])
2821
 
 
2822
 
AC_DEFUN([AC_CHECK_BOOL],
2823
 
[
2824
 
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2825
 
])
2826
 
 
2827
 
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2828
 
[
2829
 
AC_MSG_CHECKING(if you need GNU extensions)
2830
 
AC_CACHE_VAL(ac_cv_gnu_extensions,
2831
 
[
2832
 
cat > conftest.c << EOF
2833
 
#include <features.h>
2834
 
 
2835
 
#ifdef __GNU_LIBRARY__
2836
 
yes
2837
 
#endif
2838
 
EOF
2839
 
 
2840
 
if (eval "$ac_cpp conftest.c") 2>&5 |
2841
 
  egrep "yes" >/dev/null 2>&1; then
2842
 
  rm -rf conftest*
2843
 
  ac_cv_gnu_extensions=yes
2844
 
else
2845
 
  ac_cv_gnu_extensions=no
2846
 
fi
2847
 
])
2848
 
 
2849
 
AC_MSG_RESULT($ac_cv_gnu_extensions)
2850
 
if test "$ac_cv_gnu_extensions" = "yes"; then
2851
 
  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2852
 
fi
2853
 
])
2854
 
 
2855
 
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2856
 
[
2857
 
AC_MSG_CHECKING([whether $CXX supports -$1])
2858
 
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2859
 
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2860
 
[
2861
 
  AC_LANG_SAVE
2862
 
  AC_LANG_CPLUSPLUS
2863
 
  save_CXXFLAGS="$CXXFLAGS"
2864
 
  CXXFLAGS="$CXXFLAGS -$1"
2865
 
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2866
 
  CXXFLAGS="$save_CXXFLAGS"
2867
 
  AC_LANG_RESTORE
2868
 
])
2869
 
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2870
 
 AC_MSG_RESULT(yes)
2871
 
 :
2872
 
 $2
2873
 
else
2874
 
 AC_MSG_RESULT(no)
2875
 
 :
2876
 
 $3
2877
 
fi
2878
 
])
2879
 
 
2880
 
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
2881
 
[
2882
 
AC_MSG_CHECKING([whether $CC supports -$1])
2883
 
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2884
 
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
2885
 
[
2886
 
  AC_LANG_SAVE
2887
 
  AC_LANG_C
2888
 
  save_CFLAGS="$CFLAGS"
2889
 
  CFLAGS="$CFLAGS -$1"
2890
 
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
2891
 
  CFLAGS="$save_CFLAGS"
2892
 
  AC_LANG_RESTORE
2893
 
])
2894
 
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
2895
 
 AC_MSG_RESULT(yes)
2896
 
 :
2897
 
 $2
2898
 
else
2899
 
 AC_MSG_RESULT(no)
2900
 
 :
2901
 
 $3
2902
 
fi
2903
 
])
2904
 
 
2905
 
 
2906
 
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2907
 
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2908
 
dnl it's all white-space separated
2909
 
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2910
 
[ __val=$$1
2911
 
  __forbid=" $2 "
2912
 
  if test -n "$__val"; then
2913
 
    __new=""
2914
 
    ac_save_IFS=$IFS
2915
 
    IFS="       "
2916
 
    for i in $__val; do
2917
 
      case "$__forbid" in
2918
 
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2919
 
        *) # Careful to not add spaces, where there were none, because otherwise
2920
 
           # libtool gets confused, if we change e.g. CXX
2921
 
           if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2922
 
      esac
2923
 
    done
2924
 
    IFS=$ac_save_IFS
2925
 
    $1=$__new
2926
 
  fi
2927
 
])
2928
 
 
2929
 
 
2930
 
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
2931
 
[
2932
 
  AC_MSG_CHECKING([whether $CC is blacklisted])
2933
 
 
2934
 
  dnl In theory we have tu run this test against $CC and $CXX
2935
 
  dnl in C and in C++ mode, because its perfectly legal for
2936
 
  dnl the user to mix compiler versions, since C has a defined
2937
 
  dnl ABI. 
2938
 
  dnl 
2939
 
  dnl For now, we assume the user is not on crack.
2940
 
 
2941
 
  AC_TRY_COMPILE([
2942
 
#ifdef __GNUC__
2943
 
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
2944
 
choke me
2945
 
#endif
2946
 
#endif
2947
 
], ,
2948
 
  kde_bad_compiler=no, 
2949
 
  kde_bad_compiler=yes
2950
 
)
2951
 
 
2952
 
  AC_MSG_RESULT($kde_bad_compiler)
2953
 
 
2954
 
if test "$kde_bad_compiler" = "yes"; then
2955
 
  AC_MSG_ERROR([
2956
 
 
2957
 
This particular compiler version is blacklisted because it
2958
 
is known to miscompile KDE. Please use a newer version, or
2959
 
if that is not yet available, choose an older version. 
2960
 
 
2961
 
Please do not report a bug or bother us reporting this
2962
 
configure error. We know about it, and we introduced
2963
 
it by intention to avoid untraceable bugs or crashes in KDE.
2964
 
 
2965
 
])
2966
 
fi
2967
 
 
2968
 
])
2969
 
 
2970
 
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2971
 
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2972
 
[dnl
2973
 
if test "x$kde_use_qt_emb" != "xyes"; then
2974
 
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2975
 
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2976
 
else
2977
 
 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2978
 
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2979
 
fi
2980
 
])
2981
 
 
2982
 
AC_DEFUN([AC_CHECK_COMPILERS],
2983
 
[
2984
 
  AC_ARG_ENABLE(debug,
2985
 
                AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
2986
 
  [
2987
 
    case $enableval in
2988
 
      yes)
2989
 
        kde_use_debug_code="yes"
2990
 
        kde_use_debug_define=no
2991
 
        ;;
2992
 
      full)
2993
 
        kde_use_debug_code="full"
2994
 
        kde_use_debug_define=no
2995
 
        ;;
2996
 
      *)
2997
 
        kde_use_debug_code="no"
2998
 
        kde_use_debug_define=yes
2999
 
        ;;
3000
 
    esac
3001
 
  ], 
3002
 
    [kde_use_debug_code="no"
3003
 
      kde_use_debug_define=no
3004
 
  ])
3005
 
 
3006
 
  dnl Just for configure --help
3007
 
  AC_ARG_ENABLE(dummyoption,
3008
 
                AC_HELP_STRING([--disable-debug],
3009
 
                               [disables debug output and debug symbols [default=no]]),
3010
 
                [],[])
3011
 
 
3012
 
  AC_ARG_ENABLE(strict,
3013
 
                AC_HELP_STRING([--enable-strict],
3014
 
                              [compiles with strict compiler options (may not work!)]),
3015
 
   [
3016
 
    if test $enableval = "no"; then
3017
 
         kde_use_strict_options="no"
3018
 
       else
3019
 
         kde_use_strict_options="yes"
3020
 
    fi
3021
 
   ], [kde_use_strict_options="no"])
3022
 
 
3023
 
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
3024
 
   [
3025
 
    if test $enableval = "no"; then
3026
 
         kde_use_warnings="no"
3027
 
       else
3028
 
         kde_use_warnings="yes"
3029
 
    fi
3030
 
   ], [kde_use_warnings="yes"])
3031
 
 
3032
 
  dnl enable warnings for debug build
3033
 
  if test "$kde_use_debug_code" != "no"; then
3034
 
    kde_use_warnings=yes
3035
 
  fi
3036
 
 
3037
 
  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
3038
 
    [kde_use_profiling=$enableval],
3039
 
    [kde_use_profiling="no"]
3040
 
  )
3041
 
 
3042
 
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
3043
 
  CFLAGS=" $CFLAGS"
3044
 
 
3045
 
  AC_PROG_CC 
3046
 
 
3047
 
  AC_PROG_CPP
3048
 
 
3049
 
  if test "$GCC" = "yes"; then
3050
 
    if test "$kde_use_debug_code" != "no"; then
3051
 
      if test $kde_use_debug_code = "full"; then
3052
 
        CFLAGS="-g3 -fno-inline $CFLAGS"
3053
 
      else
3054
 
        CFLAGS="-g -O2 $CFLAGS"
3055
 
      fi
3056
 
    else
3057
 
      CFLAGS="-O2 $CFLAGS"
3058
 
    fi
3059
 
  fi
3060
 
 
3061
 
  if test "$kde_use_debug_define" = "yes"; then
3062
 
    CFLAGS="-DNDEBUG $CFLAGS"
3063
 
  fi
3064
 
 
3065
 
 
3066
 
  case "$host" in
3067
 
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
3068
 
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
3069
 
  esac
3070
 
 
3071
 
  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
3072
 
     LDFLAGS=""
3073
 
  fi
3074
 
 
3075
 
  CXXFLAGS=" $CXXFLAGS"
3076
 
 
3077
 
  AC_PROG_CXX
3078
 
 
3079
 
  KDE_CHECK_FOR_BAD_COMPILER
3080
 
 
3081
 
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3082
 
    if test "$kde_use_debug_code" != "no"; then
3083
 
      if test "$CXX" = "KCC"; then
3084
 
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3085
 
      else
3086
 
        if test "$kde_use_debug_code" = "full"; then
3087
 
          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
3088
 
        else
3089
 
          CXXFLAGS="-g -O2 $CXXFLAGS"
3090
 
        fi
3091
 
      fi
3092
 
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
3093
 
 
3094
 
      dnl convenience compiler flags
3095
 
      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
3096
 
      AC_SUBST(WOVERLOADED_VIRTUAL)
3097
 
    else
3098
 
      if test "$CXX" = "KCC"; then
3099
 
        CXXFLAGS="+K3 $CXXFLAGS"
3100
 
      else
3101
 
        CXXFLAGS="-O2 $CXXFLAGS"
3102
 
      fi  
3103
 
    fi
3104
 
  fi
3105
 
 
3106
 
  if test "$kde_use_debug_define" = "yes"; then
3107
 
    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
3108
 
  fi  
3109
 
 
3110
 
  if test "$kde_use_profiling" = "yes"; then
3111
 
    KDE_CHECK_COMPILER_FLAG(pg,
3112
 
    [
3113
 
      CFLAGS="-pg $CFLAGS"
3114
 
      CXXFLAGS="-pg $CXXFLAGS"
3115
 
    ])
3116
 
  fi
3117
 
 
3118
 
  if test "$kde_use_warnings" = "yes"; then
3119
 
      if test "$GCC" = "yes"; then
3120
 
        dnl ### FIXME: remove -Wno-non-virtual-dtor for KDE 4
3121
 
        CXXFLAGS="-Wall -W -Wpointer-arith -Wno-non-virtual-dtor $CXXFLAGS"
3122
 
        case $host in
3123
 
          *-*-linux-gnu)        
3124
 
            CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3125
 
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
3126
 
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3127
 
            KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
3128
 
          ;;
3129
 
        esac
3130
 
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3131
 
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3132
 
        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
3133
 
     fi
3134
 
  fi
3135
 
 
3136
 
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
3137
 
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3138
 
  fi
3139
 
 
3140
 
  AC_ARG_ENABLE(pch,
3141
 
     AC_HELP_STRING([--enable-pch],
3142
 
                    [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3143
 
    [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3144
 
 
3145
 
  HAVE_GCC_VISIBILITY=0
3146
 
  AC_SUBST([HAVE_GCC_VISIBILITY])
3147
 
 
3148
 
  if test "$GXX" = "yes"; then
3149
 
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3150
 
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3151
 
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3152
 
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
3153
 
    ENABLE_PERMISSIVE_FLAG="-fpermissive"
3154
 
 
3155
 
    if test "$kde_use_pch" = "yes"; then
3156
 
        AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3157
 
        echo >conftest.h
3158
 
        if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3159
 
            kde_gcc_supports_pch=yes
3160
 
            AC_MSG_RESULT(yes)
3161
 
        else
3162
 
            kde_gcc_supports_pch=no
3163
 
            AC_MSG_RESULT(no)
3164
 
        fi
3165
 
        if test "$kde_gcc_supports_pch" = "yes"; then
3166
 
            AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3167
 
            if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3168
 
                kde_gcc_supports_pch=yes
3169
 
                AC_MSG_RESULT(yes)
3170
 
            else
3171
 
                kde_gcc_supports_pch=no
3172
 
                AC_MSG_RESULT(no)
3173
 
            fi
3174
 
        fi
3175
 
        rm -f conftest.h conftest.h.gch
3176
 
    fi
3177
 
  fi
3178
 
  AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3179
 
  if test "$CXX" = "KCC"; then
3180
 
    dnl unfortunately we currently cannot disable exception support in KCC
3181
 
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3182
 
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3183
 
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
3184
 
 
3185
 
    if test "$kde_use_pch" = "yes"; then
3186
 
      dnl TODO: support --pch-dir!
3187
 
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3188
 
      dnl the below works (but the dir must exist), but it's
3189
 
      dnl useless for a whole package.
3190
 
      dnl The are precompiled headers for each source file, so when compiling
3191
 
      dnl from scratch, it doesn't make a difference, and they take up
3192
 
      dnl around ~5Mb _per_ sourcefile.
3193
 
      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3194
 
      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3195
 
    fi
3196
 
    dnl this flag controls inlining. by default KCC inlines in optimisation mode
3197
 
    dnl all implementations that are defined inside the class {} declaration. 
3198
 
    dnl because of templates-compatibility with broken gcc compilers, this
3199
 
    dnl can cause excessive inlining. This flag limits it to a sane level
3200
 
    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3201
 
    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3202
 
    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3203
 
    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3204
 
    dnl Some source files are shared between multiple executables
3205
 
    dnl (or libraries) and some of those need template instantiations.
3206
 
    dnl In that case KCC needs to compile those sources with
3207
 
    dnl --one_instantiation_per_object.  To make it easy for us we compile
3208
 
    dnl _all_ objects with that flag (--one_per is a shorthand).
3209
 
    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3210
 
  fi
3211
 
  AC_SUBST(USE_EXCEPTIONS)
3212
 
  dnl obsolete macro - provided to keep things going
3213
 
  USE_RTTI=
3214
 
  AC_SUBST(USE_RTTI)
3215
 
 
3216
 
  case "$host" in
3217
 
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3218
 
      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3219
 
      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3220
 
      *-*-solaris*) 
3221
 
        if test "$GXX" = yes; then
3222
 
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
3223
 
          if test ! -f $libstdcpp; then
3224
 
             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])
3225
 
          fi
3226
 
        fi
3227
 
        ;;
3228
 
  esac
3229
 
 
3230
 
  AC_VALIDIFY_CXXFLAGS
3231
 
 
3232
 
  AC_PROG_CXXCPP
3233
 
 
3234
 
  if test "$GCC" = yes; then
3235
 
     NOOPT_CFLAGS=-O0
3236
 
  fi
3237
 
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3238
 
 
3239
 
  AC_ARG_ENABLE(coverage,
3240
 
    AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3241
 
      if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3242
 
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3243
 
        ac_coverage_linker="-lgcc"
3244
 
      elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3245
 
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3246
 
        ac_coverage_linker=""
3247
 
      else
3248
 
        AC_MSG_ERROR([coverage with your compiler is not supported])
3249
 
      fi
3250
 
      CFLAGS="$CFLAGS $ac_coverage_compiler"
3251
 
      CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3252
 
      LDFLAGS="$LDFLAGS $ac_coverage_linker"
3253
 
    ])
3254
 
 
3255
 
  AC_SUBST(NOOPT_CXXFLAGS)
3256
 
  AC_SUBST(NOOPT_CFLAGS)
3257
 
  AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3258
 
 
3259
 
  KDE_CHECK_NEW_LDFLAGS
3260
 
  KDE_CHECK_FINAL
3261
 
  KDE_CHECK_CLOSURE
3262
 
  KDE_CHECK_NMCHECK
3263
 
 
3264
 
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3265
 
])
3266
 
 
3267
 
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
3268
 
  [
3269
 
    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
3270
 
      [
3271
 
        AC_LANG_SAVE
3272
 
        AC_LANG_CPLUSPLUS
3273
 
 
3274
 
        safe_CXXFLAGS=$CXXFLAGS
3275
 
        safe_LDFLAGS=$LDFLAGS
3276
 
        CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
3277
 
        LDFLAGS="$LDFLAGS -shared -fPIC"
3278
 
 
3279
 
        AC_TRY_LINK(
3280
 
        [
3281
 
          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
3282
 
          #include <string>
3283
 
          int some_function( void ) __attribute__ ((visibility("default")));
3284
 
          int some_function( void )
3285
 
          {
3286
 
            std::string s("blafasel");
3287
 
            return 0;
3288
 
          }
3289
 
        ], [/* elvis is alive */],
3290
 
        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
3291
 
 
3292
 
        CXXFLAGS=$safe_CXXFLAGS
3293
 
        LDFLAGS=$safe_LDFLAGS
3294
 
        AC_LANG_RESTORE
3295
 
      ]
3296
 
    )
3297
 
 
3298
 
    if test x$kde_cv_val_gcc_visibility_bug = xno; then
3299
 
      CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
3300
 
    fi
3301
 
  ]
3302
 
)
3303
 
 
3304
 
AC_DEFUN([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY],
3305
 
[
3306
 
  if test "$GXX" = "yes"; then
3307
 
    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
3308
 
    [
3309
 
        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
3310
 
        KDE_CHECK_VISIBILITY_GCC_BUG
3311
 
 
3312
 
        HAVE_GCC_VISIBILITY=1
3313
 
        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3314
 
    ])
3315
 
  fi
3316
 
])
3317
 
 
3318
 
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
3319
 
[
3320
 
  AC_REQUIRE([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY])
3321
 
])
3322
 
 
3323
 
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3324
 
[
3325
 
   [A]M_DEPENDENCIES(CC)
3326
 
   [A]M_DEPENDENCIES(CXX)
3327
 
])
3328
 
 
3329
 
dnl just a wrapper to clean up configure.in
3330
 
AC_DEFUN([KDE_PROG_LIBTOOL],
3331
 
[
3332
 
AC_REQUIRE([AC_CHECK_COMPILERS])
3333
 
AC_REQUIRE([AC_ENABLE_SHARED])
3334
 
AC_REQUIRE([AC_ENABLE_STATIC])
3335
 
 
3336
 
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3337
 
AC_REQUIRE([KDE_CHECK_LIB64])
3338
 
 
3339
 
AC_OBJEXT
3340
 
AC_EXEEXT
3341
 
 
3342
 
AM_PROG_LIBTOOL
3343
 
AC_LIBTOOL_CXX
3344
 
 
3345
 
LIBTOOL_SHELL="/bin/sh ./libtool"
3346
 
#  LIBTOOL="$LIBTOOL --silent"
3347
 
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3348
 
AC_SUBST(KDE_PLUGIN)
3349
 
 
3350
 
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
3351
 
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
3352
 
AC_SUBST(KDE_CHECK_PLUGIN)
3353
 
 
3354
 
# we patch configure quite some so we better keep that consistent for incremental runs 
3355
 
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3356
 
])
3357
 
 
3358
 
AC_DEFUN([KDE_CHECK_LIB64],
3359
 
[
3360
 
    kdelibsuff="$kde_libs_suffix"
3361
 
    if test -z "$kdelibsuff"; then
3362
 
       kdelibsuff=no
3363
 
    fi
3364
 
    AC_ARG_ENABLE(libsuffix,
3365
 
        AC_HELP_STRING([--enable-libsuffix],
3366
 
            [/lib directory suffix (64,32,none[=default])]),
3367
 
            kdelibsuff=$enableval)
3368
 
    # TODO: add an auto case that compiles a little C app to check
3369
 
    # where the glibc is
3370
 
    if test "$kdelibsuff" = "no"; then
3371
 
       kdelibsuff=
3372
 
    fi
3373
 
    if test -z "$kdelibsuff"; then
3374
 
        AC_MSG_RESULT([not using lib directory suffix])
3375
 
        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3376
 
    else
3377
 
        if test "$libdir" = '${exec_prefix}/lib'; then
3378
 
            libdir="$libdir${kdelibsuff}"
3379
 
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
3380
 
        fi
3381
 
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3382
 
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3383
 
    fi
3384
 
])
3385
 
 
3386
 
AC_DEFUN([KDE_CHECK_TYPES],
3387
 
[  AC_CHECK_SIZEOF(int, 4)dnl
3388
 
   AC_CHECK_SIZEOF(short)dnl
3389
 
  AC_CHECK_SIZEOF(long, 4)dnl
3390
 
  AC_CHECK_SIZEOF(char *, 4)dnl
3391
 
])dnl
3392
 
 
3393
 
dnl Not used - kept for compat only?
3394
 
AC_DEFUN([KDE_DO_IT_ALL],
3395
 
[
3396
 
AC_CANONICAL_SYSTEM
3397
 
AC_ARG_PROGRAM
3398
 
AM_INIT_AUTOMAKE($1, $2)
3399
 
AM_DISABLE_LIBRARIES
3400
 
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3401
 
AC_CHECK_COMPILERS
3402
 
KDE_PROG_LIBTOOL
3403
 
AM_KDE_WITH_NLS
3404
 
AC_PATH_KDE
3405
 
])
3406
 
 
3407
 
AC_DEFUN([AC_CHECK_RPATH],
3408
 
[
3409
 
AC_MSG_CHECKING(for rpath)
3410
 
AC_ARG_ENABLE(rpath,
3411
 
      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3412
 
      USE_RPATH=$enableval, USE_RPATH=yes)
3413
 
 
3414
 
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3415
 
 
3416
 
  KDE_RPATH="-R \$(libdir)"
3417
 
 
3418
 
  if test "$kde_libraries" != "$libdir"; then
3419
 
      KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3420
 
  fi
3421
 
 
3422
 
  if test -n "$qt_libraries"; then
3423
 
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3424
 
  fi
3425
 
  dnl $x_libraries is set to /usr/lib in case
3426
 
  if test -n "$X_LDFLAGS"; then
3427
 
    X_RPATH="-R \$(x_libraries)"
3428
 
    KDE_RPATH="$KDE_RPATH $X_RPATH"
3429
 
  fi
3430
 
  if test -n "$KDE_EXTRA_RPATH"; then
3431
 
    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3432
 
  fi
3433
 
fi
3434
 
AC_SUBST(KDE_EXTRA_RPATH)
3435
 
AC_SUBST(KDE_RPATH)
3436
 
AC_SUBST(X_RPATH)
3437
 
AC_MSG_RESULT($USE_RPATH)
3438
 
])
3439
 
 
3440
 
dnl Check for the type of the third argument of getsockname
3441
 
AC_DEFUN([AC_CHECK_SOCKLEN_T],
3442
 
[
3443
 
   AC_MSG_CHECKING(for socklen_t)
3444
 
   AC_CACHE_VAL(kde_cv_socklen_t,
3445
 
   [
3446
 
      AC_LANG_PUSH(C++)
3447
 
      kde_cv_socklen_t=no
3448
 
      AC_TRY_COMPILE([
3449
 
         #include <sys/types.h>
3450
 
         #include <sys/socket.h>
3451
 
      ],
3452
 
      [
3453
 
         socklen_t len;
3454
 
         getpeername(0,0,&len);
3455
 
      ],
3456
 
      [
3457
 
         kde_cv_socklen_t=yes
3458
 
         kde_cv_socklen_t_equiv=socklen_t
3459
 
      ])
3460
 
      AC_LANG_POP(C++)
3461
 
   ])
3462
 
   AC_MSG_RESULT($kde_cv_socklen_t)
3463
 
   if test $kde_cv_socklen_t = no; then
3464
 
      AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3465
 
      AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3466
 
      [
3467
 
         kde_cv_socklen_t_equiv=int
3468
 
         AC_LANG_PUSH(C++)
3469
 
         for t in int size_t unsigned long "unsigned long"; do
3470
 
            AC_TRY_COMPILE([
3471
 
               #include <sys/types.h>
3472
 
               #include <sys/socket.h>
3473
 
            ],
3474
 
            [
3475
 
               $t len;
3476
 
               getpeername(0,0,&len);
3477
 
            ],
3478
 
            [
3479
 
               kde_cv_socklen_t_equiv="$t"
3480
 
               break
3481
 
            ])
3482
 
         done
3483
 
         AC_LANG_POP(C++)
3484
 
      ])
3485
 
      AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3486
 
   fi
3487
 
   AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3488
 
                     [type to use in place of socklen_t if not defined])
3489
 
   AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3490
 
                     [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3491
 
])
3492
 
 
3493
 
dnl This is a merge of some macros out of the gettext aclocal.m4
3494
 
dnl since we don't need anything, I took the things we need
3495
 
dnl the copyright for them is:
3496
 
dnl >
3497
 
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3498
 
dnl This Makefile.in is free software; the Free Software Foundation
3499
 
dnl gives unlimited permission to copy and/or distribute it,
3500
 
dnl with or without modifications, as long as this notice is preserved.
3501
 
 
3502
 
dnl This program is distributed in the hope that it will be useful,
3503
 
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3504
 
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3505
 
dnl PARTICULAR PURPOSE.
3506
 
dnl >
3507
 
dnl for this file it is relicensed under LGPL
3508
 
 
3509
 
AC_DEFUN([AM_KDE_WITH_NLS],
3510
 
  [
3511
 
    dnl If we use NLS figure out what method
3512
 
 
3513
 
    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3514
 
        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3515
 
    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3516
 
 
3517
 
     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3518
 
        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3519
 
        GMSGFMT=":"
3520
 
      fi
3521
 
      MSGFMT=$GMSGFMT
3522
 
      AC_SUBST(GMSGFMT)
3523
 
      AC_SUBST(MSGFMT)
3524
 
 
3525
 
      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3526
 
        [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3527
 
 
3528
 
      dnl Test whether we really found GNU xgettext.
3529
 
      if test "$XGETTEXT" != ":"; then
3530
 
        dnl If it is no GNU xgettext we define it as : so that the
3531
 
        dnl Makefiles still can work.
3532
 
        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3533
 
          : ;
3534
 
        else
3535
 
          AC_MSG_RESULT(
3536
 
            [found xgettext programs is not GNU xgettext; ignore it])
3537
 
          XGETTEXT=":"
3538
 
        fi
3539
 
      fi
3540
 
     AC_SUBST(XGETTEXT)
3541
 
 
3542
 
  ])
3543
 
 
3544
 
# Search path for a program which passes the given test.
3545
 
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3546
 
 
3547
 
# serial 1
3548
 
# Stephan Kulow: I appended a _KDE against name conflicts
3549
 
 
3550
 
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3551
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3552
 
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3553
 
[# Extract the first word of "$2", so it can be a program name with args.
3554
 
set dummy $2; ac_word=[$]2
3555
 
AC_MSG_CHECKING([for $ac_word])
3556
 
AC_CACHE_VAL(ac_cv_path_$1,
3557
 
[case "[$]$1" in
3558
 
  /*)
3559
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3560
 
  ;;
3561
 
  *)
3562
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3563
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
3564
 
    test -z "$ac_dir" && ac_dir=.
3565
 
    if test -f $ac_dir/$ac_word; then
3566
 
      if [$3]; then
3567
 
        ac_cv_path_$1="$ac_dir/$ac_word"
3568
 
        break
3569
 
      fi
3570
 
    fi
3571
 
  done
3572
 
  IFS="$ac_save_ifs"
3573
 
dnl If no 4th arg is given, leave the cache variable unset,
3574
 
dnl so AC_PATH_PROGS will keep looking.
3575
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3576
 
])dnl
3577
 
  ;;
3578
 
esac])dnl
3579
 
$1="$ac_cv_path_$1"
3580
 
if test -n "[$]$1"; then
3581
 
  AC_MSG_RESULT([$]$1)
3582
 
else
3583
 
  AC_MSG_RESULT(no)
3584
 
fi
3585
 
AC_SUBST($1)dnl
3586
 
])
3587
 
 
3588
 
 
3589
 
# Check whether LC_MESSAGES is available in <locale.h>.
3590
 
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3591
 
 
3592
 
# serial 1
3593
 
 
3594
 
AC_DEFUN([AM_LC_MESSAGES],
3595
 
  [if test $ac_cv_header_locale_h = yes; then
3596
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3597
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3598
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3599
 
    if test $am_cv_val_LC_MESSAGES = yes; then
3600
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3601
 
    fi
3602
 
  fi])
3603
 
 
3604
 
dnl From Jim Meyering.
3605
 
dnl FIXME: migrate into libit.
3606
 
 
3607
 
AC_DEFUN([AM_FUNC_OBSTACK],
3608
 
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3609
 
 [AC_TRY_LINK([#include "obstack.h"],
3610
 
              [struct obstack *mem;obstack_free(mem,(char *) 0)],
3611
 
              am_cv_func_obstack=yes,
3612
 
              am_cv_func_obstack=no)])
3613
 
 if test $am_cv_func_obstack = yes; then
3614
 
   AC_DEFINE(HAVE_OBSTACK)
3615
 
 else
3616
 
   LIBOBJS="$LIBOBJS obstack.o"
3617
 
 fi
3618
 
])
3619
 
 
3620
 
dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
3621
 
dnl FIXME: Migrate into libit
3622
 
 
3623
 
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3624
 
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3625
 
 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3626
 
              am_cv_lib_error_at_line=yes,
3627
 
              am_cv_lib_error_at_line=no)])
3628
 
 if test $am_cv_lib_error_at_line = no; then
3629
 
   LIBOBJS="$LIBOBJS error.o"
3630
 
 fi
3631
 
 AC_SUBST(LIBOBJS)dnl
3632
 
])
3633
 
 
3634
 
# Macro to add for using GNU gettext.
3635
 
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3636
 
 
3637
 
# serial 1
3638
 
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3639
 
 
3640
 
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3641
 
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3642
 
   AC_REQUIRE([AC_PROG_RANLIB])dnl
3643
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
3644
 
   AC_REQUIRE([AC_TYPE_OFF_T])dnl
3645
 
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3646
 
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3647
 
   AC_REQUIRE([AC_FUNC_MMAP])dnl
3648
 
   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3649
 
   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3650
 
   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3651
 
__argz_count __argz_stringify __argz_next])
3652
 
 
3653
 
   AC_MSG_CHECKING(for stpcpy)
3654
 
   AC_CACHE_VAL(kde_cv_func_stpcpy,
3655
 
   [
3656
 
   kde_safe_cxxflags=$CXXFLAGS
3657
 
   CXXFLAGS="-Werror"
3658
 
   AC_LANG_SAVE
3659
 
   AC_LANG_CPLUSPLUS
3660
 
   AC_TRY_COMPILE([
3661
 
   #include <string.h>
3662
 
   ],
3663
 
   [
3664
 
   char buffer[200];
3665
 
   stpcpy(buffer, buffer);
3666
 
   ],
3667
 
   kde_cv_func_stpcpy=yes,
3668
 
   kde_cv_func_stpcpy=no)
3669
 
   AC_LANG_RESTORE
3670
 
   CXXFLAGS=$kde_safe_cxxflags
3671
 
   ])
3672
 
   AC_MSG_RESULT($kde_cv_func_stpcpy)
3673
 
   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3674
 
     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3675
 
   fi
3676
 
 
3677
 
   AM_LC_MESSAGES
3678
 
 
3679
 
   if test "x$CATOBJEXT" != "x"; then
3680
 
     if test "x$ALL_LINGUAS" = "x"; then
3681
 
       LINGUAS=
3682
 
     else
3683
 
       AC_MSG_CHECKING(for catalogs to be installed)
3684
 
       NEW_LINGUAS=
3685
 
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
3686
 
         case "$ALL_LINGUAS" in
3687
 
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3688
 
         esac
3689
 
       done
3690
 
       LINGUAS=$NEW_LINGUAS
3691
 
       AC_MSG_RESULT($LINGUAS)
3692
 
     fi
3693
 
 
3694
 
     dnl Construct list of names of catalog files to be constructed.
3695
 
     if test -n "$LINGUAS"; then
3696
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3697
 
     fi
3698
 
   fi
3699
 
 
3700
 
  ])
3701
 
 
3702
 
AC_DEFUN([AC_HAVE_XPM],
3703
 
 [AC_REQUIRE_CPP()dnl
3704
 
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3705
 
 
3706
 
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3707
 
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3708
 
 
3709
 
 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3710
 
        xpm_test=$withval, xpm_test="yes")
3711
 
 if test "x$xpm_test" = xno; then
3712
 
   ac_cv_have_xpm=no
3713
 
 else
3714
 
   AC_MSG_CHECKING(for XPM)
3715
 
   AC_CACHE_VAL(ac_cv_have_xpm,
3716
 
   [
3717
 
    ac_save_ldflags="$LDFLAGS"
3718
 
    ac_save_cflags="$CFLAGS"
3719
 
    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3720
 
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3721
 
    else
3722
 
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3723
 
    fi
3724
 
    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3725
 
    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3726
 
    AC_TRY_LINK([#include <X11/xpm.h>],[],
3727
 
        ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3728
 
    LDFLAGS="$ac_save_ldflags"
3729
 
    CFLAGS="$ac_save_cflags"
3730
 
   ])dnl
3731
 
 
3732
 
  if test "$ac_cv_have_xpm" = no; then
3733
 
    AC_MSG_RESULT(no)
3734
 
    XPM_LDFLAGS=""
3735
 
    XPMINC=""
3736
 
    $2
3737
 
  else
3738
 
    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3739
 
    if test "$XPM_LDFLAGS" = ""; then
3740
 
       XPMLIB='-lXpm $(LIB_X11)'
3741
 
    else
3742
 
       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3743
 
    fi
3744
 
    if test "$XPM_INCLUDE" = ""; then
3745
 
       XPMINC=""
3746
 
    else
3747
 
       XPMINC="-I$XPM_INCLUDE"
3748
 
    fi
3749
 
    AC_MSG_RESULT(yes)
3750
 
    $1
3751
 
  fi
3752
 
 fi
3753
 
 AC_SUBST(XPMINC)
3754
 
 AC_SUBST(XPMLIB)
3755
 
])
3756
 
 
3757
 
AC_DEFUN([AC_HAVE_DPMS],
3758
 
 [AC_REQUIRE_CPP()dnl
3759
 
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3760
 
 
3761
 
 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3762
 
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3763
 
 DPMS_LIB=
3764
 
 
3765
 
 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3766
 
        dpms_test=$withval, dpms_test="yes")
3767
 
 if test "x$dpms_test" = xno; then
3768
 
   ac_cv_have_dpms=no
3769
 
 else
3770
 
   AC_MSG_CHECKING(for DPMS)
3771
 
   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3772
 
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3773
 
   AC_CACHE_VAL(ac_cv_have_dpms,
3774
 
   [
3775
 
    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3776
 
      AC_MSG_RESULT(no)
3777
 
      ac_cv_have_dpms="no"
3778
 
    else
3779
 
      ac_save_ldflags="$LDFLAGS"
3780
 
      ac_save_cflags="$CFLAGS"
3781
 
      ac_save_libs="$LIBS"
3782
 
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3783
 
      CFLAGS="$CFLAGS $X_INCLUDES"
3784
 
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3785
 
      AC_TRY_LINK([
3786
 
          #include <X11/Xproto.h>
3787
 
          #include <X11/X.h>
3788
 
          #include <X11/Xlib.h>
3789
 
          #include <X11/extensions/dpms.h>
3790
 
          int foo_test_dpms()
3791
 
          { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3792
 
          ac_cv_have_dpms="yes", [
3793
 
              LDFLAGS="$ac_save_ldflags"
3794
 
              CFLAGS="$ac_save_cflags"
3795
 
              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3796
 
              LIBS="$LIBS -lXdpms"
3797
 
              CFLAGS="$CFLAGS $X_INCLUDES"
3798
 
              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3799
 
              AC_TRY_LINK([
3800
 
                  #include <X11/Xproto.h>
3801
 
                  #include <X11/X.h>
3802
 
                  #include <X11/Xlib.h>
3803
 
                  #include <X11/extensions/dpms.h>
3804
 
                  int foo_test_dpms()
3805
 
                  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3806
 
                  [
3807
 
                  ac_cv_have_dpms="-lXdpms"
3808
 
                  ],ac_cv_have_dpms="no")
3809
 
              ])
3810
 
      LDFLAGS="$ac_save_ldflags"
3811
 
      CFLAGS="$ac_save_cflags"
3812
 
      LIBS="$ac_save_libs"
3813
 
    fi
3814
 
   ])dnl
3815
 
 
3816
 
  if test "$ac_cv_have_dpms" = no; then
3817
 
    AC_MSG_RESULT(no)
3818
 
    DPMS_LDFLAGS=""
3819
 
    DPMSINC=""
3820
 
    $2
3821
 
  else
3822
 
    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3823
 
    if test "$ac_cv_have_dpms" = "-lXdpms"; then
3824
 
       DPMS_LIB="-lXdpms"
3825
 
    fi
3826
 
    if test "$DPMS_LDFLAGS" = ""; then
3827
 
       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3828
 
    else
3829
 
       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3830
 
    fi
3831
 
    if test "$DPMS_INCLUDE" = ""; then
3832
 
       DPMSINC=""
3833
 
    else
3834
 
       DPMSINC="-I$DPMS_INCLUDE"
3835
 
    fi
3836
 
    AC_MSG_RESULT(yes)
3837
 
    $1
3838
 
  fi
3839
 
 fi
3840
 
 ac_save_cflags="$CFLAGS"
3841
 
 CFLAGS="$CFLAGS $X_INCLUDES"
3842
 
 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3843
 
 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3844
 
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3845
 
 AC_CHECK_DECL(DPMSCapable,
3846
 
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3847
 
   [#include <X11/extensions/dpms.h>])
3848
 
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3849
 
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3850
 
 AC_CHECK_DECL(DPMSInfo,
3851
 
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3852
 
   [#include <X11/extensions/dpms.h>])
3853
 
 CFLAGS="$ac_save_cflags"
3854
 
 AC_SUBST(DPMSINC)
3855
 
 AC_SUBST(DPMSLIB)
3856
 
])
3857
 
 
3858
 
AC_DEFUN([AC_HAVE_GL],
3859
 
 [AC_REQUIRE_CPP()dnl
3860
 
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3861
 
 
3862
 
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3863
 
 test -z "$GL_INCLUDE" && GL_INCLUDE=
3864
 
 
3865
 
 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
3866
 
        gl_test=$withval, gl_test="yes")
3867
 
 if test "x$kde_use_qt_emb" = "xyes"; then
3868
 
   # GL and Qt Embedded is a no-go for now.
3869
 
   ac_cv_have_gl=no
3870
 
 elif test "x$gl_test" = xno; then
3871
 
   ac_cv_have_gl=no
3872
 
 else
3873
 
   AC_MSG_CHECKING(for GL)
3874
 
   AC_CACHE_VAL(ac_cv_have_gl,
3875
 
   [
3876
 
    AC_LANG_SAVE
3877
 
    AC_LANG_CPLUSPLUS
3878
 
    ac_save_ldflags=$LDFLAGS
3879
 
    ac_save_cxxflags=$CXXFLAGS
3880
 
    ac_save_libs=$LIBS
3881
 
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
3882
 
    LIBS="$LIBS -lGL -lGLU"
3883
 
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
3884
 
    LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
3885
 
    CXXFLAGS="$CFLAGS $X_INCLUDES"
3886
 
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3887
 
    AC_TRY_LINK([#include <GL/gl.h>
3888
 
#include <GL/glu.h>
3889
 
], [],
3890
 
        ac_cv_have_gl="yes", ac_cv_have_gl="no")
3891
 
    AC_LANG_RESTORE
3892
 
    LDFLAGS=$ac_save_ldflags
3893
 
    CXXFLAGS=$ac_save_cxxflags
3894
 
    LIBS=$ac_save_libs
3895
 
   ])dnl
3896
 
 
3897
 
  if test "$ac_cv_have_gl" = "no"; then
3898
 
    AC_MSG_RESULT(no)
3899
 
    GL_LDFLAGS=""
3900
 
    GLINC=""
3901
 
    $2
3902
 
  else
3903
 
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3904
 
    if test "$GL_LDFLAGS" = ""; then
3905
 
       GLLIB='-lGLU -lGL $(LIB_X11)'
3906
 
    else
3907
 
       GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3908
 
    fi
3909
 
    if test "$GL_INCLUDE" = ""; then
3910
 
       GLINC=""
3911
 
    else
3912
 
       GLINC="-I$GL_INCLUDE"
3913
 
    fi
3914
 
    AC_MSG_RESULT($ac_cv_have_gl)
3915
 
    $1
3916
 
  fi
3917
 
 fi
3918
 
 AC_SUBST(GLINC)
3919
 
 AC_SUBST(GLLIB)
3920
 
])
3921
 
 
3922
 
 
3923
 
 dnl shadow password and PAM magic - maintained by ossi@kde.org
3924
 
 
3925
 
AC_DEFUN([KDE_PAM], [
3926
 
  AC_REQUIRE([KDE_CHECK_LIBDL])
3927
 
 
3928
 
  want_pam=
3929
 
  AC_ARG_WITH(pam,
3930
 
    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
3931
 
    [ if test "x$withval" = "xyes"; then
3932
 
        want_pam=yes
3933
 
        pam_service=kde
3934
 
      elif test "x$withval" = "xno"; then
3935
 
        want_pam=no
3936
 
      else
3937
 
        want_pam=yes
3938
 
        pam_service=$withval
3939
 
      fi
3940
 
    ], [ pam_service=kde ])
3941
 
 
3942
 
  use_pam=
3943
 
  PAMLIBS=
3944
 
  if test "x$want_pam" != xno; then
3945
 
    AC_CHECK_LIB(pam, pam_start, [
3946
 
      AC_CHECK_HEADER(security/pam_appl.h,
3947
 
        [ pam_header=security/pam_appl.h ],
3948
 
        [ AC_CHECK_HEADER(pam/pam_appl.h,
3949
 
            [ pam_header=pam/pam_appl.h ],
3950
 
            [
3951
 
    AC_MSG_WARN([PAM detected, but no headers found!
3952
 
Make sure you have the necessary development packages installed.])
3953
 
            ]
3954
 
          )
3955
 
        ]
3956
 
      )
3957
 
    ], , $LIBDL)
3958
 
    if test -z "$pam_header"; then
3959
 
      if test "x$want_pam" = xyes; then
3960
 
        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
3961
 
      fi
3962
 
    else
3963
 
      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3964
 
      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3965
 
      use_pam=yes
3966
 
 
3967
 
      dnl darwin claims to be something special
3968
 
      if test "$pam_header" = "pam/pam_appl.h"; then
3969
 
        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
3970
 
      fi
3971
 
 
3972
 
      dnl test whether struct pam_message is const (Linux) or not (Sun)
3973
 
      AC_MSG_CHECKING(for const pam_message)
3974
 
      AC_EGREP_HEADER([struct pam_message], $pam_header,
3975
 
        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3976
 
                          [AC_MSG_RESULT([const: Linux-type PAM])],
3977
 
                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
3978
 
                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3979
 
                          )],
3980
 
        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3981
 
    fi
3982
 
  fi
3983
 
 
3984
 
  AC_SUBST(PAMLIBS)
3985
 
])
3986
 
 
3987
 
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3988
 
AC_DEFUN([DEF_PAM_SERVICE], [
3989
 
  AC_ARG_WITH($1-pam,
3990
 
    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
3991
 
    [ if test "x$use_pam" = xyes; then
3992
 
        $3_PAM_SERVICE=$withval
3993
 
      else
3994
 
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3995
 
You may want to enforce it by using --with-pam.])
3996
 
      fi
3997
 
    ], 
3998
 
    [ if test "x$use_pam" = xyes; then
3999
 
        $3_PAM_SERVICE="$pam_service"
4000
 
      fi
4001
 
    ])
4002
 
    if test -n "$$3_PAM_SERVICE"; then
4003
 
      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
4004
 
      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
4005
 
    fi
4006
 
    AC_SUBST($3_PAM_SERVICE)
4007
 
])
4008
 
 
4009
 
AC_DEFUN([KDE_SHADOWPASSWD], [
4010
 
  AC_REQUIRE([KDE_PAM])
4011
 
 
4012
 
  AC_CHECK_LIB(shadow, getspent,
4013
 
    [ LIBSHADOW="-lshadow"
4014
 
      ac_use_shadow=yes
4015
 
    ],
4016
 
    [ dnl for UnixWare
4017
 
      AC_CHECK_LIB(gen, getspent, 
4018
 
        [ LIBGEN="-lgen"
4019
 
          ac_use_shadow=yes
4020
 
        ], 
4021
 
        [ AC_CHECK_FUNC(getspent, 
4022
 
            [ ac_use_shadow=yes ],
4023
 
            [ ac_use_shadow=no ])
4024
 
        ])
4025
 
    ])
4026
 
  AC_SUBST(LIBSHADOW)
4027
 
  AC_SUBST(LIBGEN)
4028
 
  
4029
 
  AC_MSG_CHECKING([for shadow passwords])
4030
 
 
4031
 
  AC_ARG_WITH(shadow,
4032
 
    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
4033
 
    [ if test "x$withval" != "xno"; then
4034
 
        use_shadow=yes
4035
 
      else
4036
 
        use_shadow=no
4037
 
      fi
4038
 
    ], [
4039
 
      use_shadow="$ac_use_shadow"
4040
 
    ])
4041
 
 
4042
 
  if test "x$use_shadow" = xyes; then
4043
 
    AC_MSG_RESULT(yes)
4044
 
    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
4045
 
  else
4046
 
    AC_MSG_RESULT(no)
4047
 
    LIBSHADOW=
4048
 
    LIBGEN=
4049
 
  fi
4050
 
 
4051
 
  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
4052
 
  dnl this still applies, if we could use it indirectly through pam.
4053
 
  if test "x$use_shadow" = xyes || 
4054
 
     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
4055
 
      case $host in
4056
 
      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
4057
 
        SETUIDFLAGS="-m 4755 -o root";;
4058
 
      *)
4059
 
        SETUIDFLAGS="-m 4755";;
4060
 
      esac
4061
 
  fi
4062
 
  AC_SUBST(SETUIDFLAGS)
4063
 
 
4064
 
])
4065
 
 
4066
 
AC_DEFUN([KDE_PASSWDLIBS], [
4067
 
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
4068
 
  AC_REQUIRE([KDE_PAM])
4069
 
  AC_REQUIRE([KDE_SHADOWPASSWD])
4070
 
 
4071
 
  if test "x$use_pam" = "xyes"; then 
4072
 
    PASSWDLIBS="$PAMLIBS"
4073
 
  else
4074
 
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
4075
 
  fi
4076
 
 
4077
 
  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
4078
 
  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
4079
 
  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
4080
 
  dnl may need to read /etc/master.passwd).
4081
 
  case $host in
4082
 
  *-*-freebsd*)
4083
 
    SETUIDFLAGS="-m 4755 -o root"
4084
 
    ;;
4085
 
  *)
4086
 
    ;;
4087
 
  esac
4088
 
 
4089
 
  AC_SUBST(PASSWDLIBS)
4090
 
])
4091
 
 
4092
 
AC_DEFUN([KDE_CHECK_LIBDL],
4093
 
[
4094
 
AC_CHECK_LIB(dl, dlopen, [
4095
 
LIBDL="-ldl"
4096
 
ac_cv_have_dlfcn=yes
4097
 
])
4098
 
 
4099
 
AC_CHECK_LIB(dld, shl_unload, [
4100
 
LIBDL="-ldld"
4101
 
ac_cv_have_shload=yes
4102
 
])
4103
 
 
4104
 
AC_SUBST(LIBDL)
4105
 
])
4106
 
 
4107
 
AC_DEFUN([KDE_CHECK_DLOPEN],
4108
 
[
4109
 
KDE_CHECK_LIBDL
4110
 
AC_CHECK_HEADERS(dlfcn.h dl.h)
4111
 
if test "$ac_cv_header_dlfcn_h" = "no"; then
4112
 
  ac_cv_have_dlfcn=no
4113
 
fi
4114
 
 
4115
 
if test "$ac_cv_header_dl_h" = "no"; then
4116
 
  ac_cv_have_shload=no
4117
 
fi
4118
 
 
4119
 
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4120
 
dnl (MM)
4121
 
AC_ARG_ENABLE(dlopen,
4122
 
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
4123
 
enable_dlopen=$enableval,
4124
 
enable_dlopen=yes)
4125
 
 
4126
 
# override the user's opinion, if we know it better ;)
4127
 
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
4128
 
  enable_dlopen=no
4129
 
fi
4130
 
 
4131
 
if test "$ac_cv_have_dlfcn" = "yes"; then
4132
 
  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
4133
 
fi
4134
 
 
4135
 
if test "$ac_cv_have_shload" = "yes"; then
4136
 
  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
4137
 
fi
4138
 
 
4139
 
if test "$enable_dlopen" = no ; then
4140
 
  test -n "$1" && eval $1
4141
 
else
4142
 
  test -n "$2" && eval $2
4143
 
fi
4144
 
 
4145
 
])
4146
 
 
4147
 
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
4148
 
[
4149
 
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4150
 
KDE_PROG_LIBTOOL
4151
 
AC_MSG_CHECKING([dynamic loading])
4152
 
eval "`egrep '^build_libtool_libs=' libtool`"
4153
 
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
4154
 
  dynamic_loading=yes
4155
 
  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
4156
 
else
4157
 
  dynamic_loading=no
4158
 
fi
4159
 
AC_MSG_RESULT($dynamic_loading)
4160
 
if test "$dynamic_loading" = "yes"; then
4161
 
  $1
4162
 
else
4163
 
  $2
4164
 
fi
4165
 
])
4166
 
 
4167
 
AC_DEFUN([KDE_ADD_INCLUDES],
4168
 
[
4169
 
if test -z "$1"; then
4170
 
  test_include="Pix.h"
4171
 
else
4172
 
  test_include="$1"
4173
 
fi
4174
 
 
4175
 
AC_MSG_CHECKING([for libg++ ($test_include)])
4176
 
 
4177
 
AC_CACHE_VAL(kde_cv_libgpp_includes,
4178
 
[
4179
 
kde_cv_libgpp_includes=no
4180
 
 
4181
 
   for ac_dir in               \
4182
 
                               \
4183
 
     /usr/include/g++          \
4184
 
     /usr/include              \
4185
 
     /usr/unsupported/include  \
4186
 
     /opt/include              \
4187
 
     $extra_include            \
4188
 
     ; \
4189
 
   do
4190
 
     if test -r "$ac_dir/$test_include"; then
4191
 
       kde_cv_libgpp_includes=$ac_dir
4192
 
       break
4193
 
     fi
4194
 
   done
4195
 
])
4196
 
 
4197
 
AC_MSG_RESULT($kde_cv_libgpp_includes)
4198
 
if test "$kde_cv_libgpp_includes" != "no"; then
4199
 
  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
4200
 
fi
4201
 
])
4202
 
])
4203
 
 
4204
 
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
4205
 
[
4206
 
  dnl This code is here specifically to handle the
4207
 
  dnl various flavors of threading library on FreeBSD
4208
 
  dnl 4-, 5-, and 6-, and the (weird) rules around it.
4209
 
  dnl There may be an environment PTHREAD_LIBS that 
4210
 
  dnl specifies what to use; otherwise, search for it.
4211
 
  dnl -pthread is special cased and unsets LIBPTHREAD
4212
 
  dnl below if found.
4213
 
  LIBPTHREAD=""
4214
 
 
4215
 
  if test -n "$PTHREAD_LIBS"; then
4216
 
    if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4217
 
      LIBPTHREAD="PTHREAD"
4218
 
    else
4219
 
      PTHREAD_LIBS_save="$PTHREAD_LIBS"
4220
 
      PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4221
 
      AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4222
 
      KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4223
 
          LIBPTHREAD="$PTHREAD_LIBS_save"])
4224
 
      PTHREAD_LIBS="$PTHREAD_LIBS_save"
4225
 
    fi
4226
 
  fi
4227
 
 
4228
 
  dnl Is this test really needed, in the face of the Tru64 test below?
4229
 
  if test -z "$LIBPTHREAD"; then
4230
 
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4231
 
  fi
4232
 
 
4233
 
  dnl This is a special Tru64 check, see BR 76171 issue #18.
4234
 
  if test -z "$LIBPTHREAD" ; then
4235
 
    AC_MSG_CHECKING([for pthread_create in -lpthread])
4236
 
    kde_safe_libs=$LIBS
4237
 
    LIBS="$LIBS -lpthread"
4238
 
    AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4239
 
        AC_MSG_RESULT(yes)
4240
 
        LIBPTHREAD="-lpthread"],[
4241
 
        AC_MSG_RESULT(no)])
4242
 
    LIBS=$kde_safe_libs
4243
 
  fi
4244
 
 
4245
 
  dnl Un-special-case for FreeBSD.
4246
 
  if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4247
 
    LIBPTHREAD=""
4248
 
  fi
4249
 
 
4250
 
  AC_SUBST(LIBPTHREAD)
4251
 
])
4252
 
 
4253
 
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
4254
 
[
4255
 
      USE_THREADS=""
4256
 
      if test -z "$LIBPTHREAD"; then
4257
 
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
4258
 
      fi
4259
 
 
4260
 
    AH_VERBATIM(__svr_define, [
4261
 
#if defined(__SVR4) && !defined(__svr4__)
4262
 
#define __svr4__ 1
4263
 
#endif
4264
 
])
4265
 
    case $host_os in
4266
 
        solaris*)
4267
 
                KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4268
 
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4269
 
                ;;
4270
 
        freebsd*)
4271
 
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
4272
 
                ;;
4273
 
        aix*)
4274
 
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4275
 
                LIBPTHREAD="$LIBPTHREAD -lc_r"
4276
 
                ;;
4277
 
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4278
 
                if test "$CXX" = "KCC"; then
4279
 
                  CXXFLAGS="$CXXFLAGS --thread_safe"
4280
 
                  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4281
 
                fi
4282
 
                ;;
4283
 
        *)
4284
 
                ;;
4285
 
    esac
4286
 
    AC_SUBST(USE_THREADS)
4287
 
    AC_SUBST(LIBPTHREAD)
4288
 
])
4289
 
 
4290
 
AC_DEFUN([KDE_CHECK_THREADING],
4291
 
[
4292
 
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4293
 
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4294
 
  dnl default is yes if libpthread is found and no if no libpthread is available
4295
 
  if test -z "$LIBPTHREAD"; then
4296
 
    if test -z "$USE_THREADS"; then
4297
 
      kde_check_threading_default=no
4298
 
    else
4299
 
      kde_check_threading_default=yes
4300
 
    fi
4301
 
  else
4302
 
    kde_check_threading_default=yes
4303
 
  fi
4304
 
  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
4305
 
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4306
 
  if test "x$kde_use_threading" = "xyes"; then
4307
 
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4308
 
  fi
4309
 
])
4310
 
 
4311
 
AC_DEFUN([KDE_TRY_LINK_PYTHON],
4312
 
[
4313
 
if test "$kde_python_link_found" = no; then
4314
 
 
4315
 
if test "$1" = normal; then
4316
 
  AC_MSG_CHECKING(if a Python application links)
4317
 
else
4318
 
  AC_MSG_CHECKING(if Python depends on $2)
4319
 
fi
4320
 
 
4321
 
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4322
 
[
4323
 
kde_save_cflags="$CFLAGS"
4324
 
CFLAGS="$CFLAGS $PYTHONINC"
4325
 
kde_save_libs="$LIBS"
4326
 
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4327
 
kde_save_ldflags="$LDFLAGS"
4328
 
LDFLAGS="$LDFLAGS $PYTHONLIB"
4329
 
 
4330
 
AC_TRY_LINK(
4331
 
[
4332
 
#include <Python.h>
4333
 
],[
4334
 
        PySys_SetArgv(1, 0);
4335
 
],
4336
 
        [kde_cv_try_link_python_$1=yes],
4337
 
        [kde_cv_try_link_python_$1=no]
4338
 
)
4339
 
CFLAGS="$kde_save_cflags"
4340
 
LIBS="$kde_save_libs"
4341
 
LDFLAGS="$kde_save_ldflags"
4342
 
])
4343
 
 
4344
 
if test "$kde_cv_try_link_python_$1" = "yes"; then
4345
 
  AC_MSG_RESULT(yes)
4346
 
  kde_python_link_found=yes
4347
 
  if test ! "$1" = normal; then
4348
 
    LIBPYTHON="$LIBPYTHON $2"
4349
 
  fi
4350
 
  $3
4351
 
else
4352
 
  AC_MSG_RESULT(no)
4353
 
  $4
4354
 
fi
4355
 
 
4356
 
fi
4357
 
 
4358
 
])
4359
 
 
4360
 
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4361
 
[
4362
 
AC_MSG_CHECKING([for Python directory])
4363
 
 
4364
 
AC_CACHE_VAL(kde_cv_pythondir,
4365
 
[
4366
 
  if test -z "$PYTHONDIR"; then
4367
 
    kde_cv_pythondir=/usr/local
4368
 
  else
4369
 
    kde_cv_pythondir="$PYTHONDIR"
4370
 
  fi
4371
 
])
4372
 
 
4373
 
AC_ARG_WITH(pythondir,
4374
 
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4375
 
[
4376
 
  ac_python_dir=$withval
4377
 
], ac_python_dir=$kde_cv_pythondir
4378
 
)
4379
 
 
4380
 
AC_MSG_RESULT($ac_python_dir)
4381
 
])
4382
 
 
4383
 
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4384
 
[
4385
 
AC_REQUIRE([KDE_CHECK_LIBDL])
4386
 
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4387
 
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4388
 
 
4389
 
if test -z "$1"; then
4390
 
  version="1.5"
4391
 
else
4392
 
  version="$1"
4393
 
fi
4394
 
 
4395
 
AC_MSG_CHECKING([for Python$version])
4396
 
 
4397
 
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4398
 
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4399
 
if test ! -r $python_incdir/Python.h; then
4400
 
  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4401
 
  python_incdir=$python_incdir/python$version
4402
 
  if test ! -r $python_incdir/Python.h; then
4403
 
    python_incdir=no
4404
 
  fi
4405
 
fi
4406
 
 
4407
 
PYTHONINC=-I$python_incdir
4408
 
 
4409
 
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4410
 
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4411
 
if test ! -r $python_libdir/libpython$version.so; then
4412
 
  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4413
 
  if test ! -r $python_libdir/libpython$version.a; then
4414
 
    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4415
 
    python_libdir=$python_libdir/python$version/config
4416
 
    if test ! -r $python_libdir/libpython$version.a; then
4417
 
      python_libdir=no
4418
 
    fi
4419
 
  fi
4420
 
fi
4421
 
 
4422
 
PYTHONLIB=-L$python_libdir
4423
 
kde_orig_LIBPYTHON=$LIBPYTHON
4424
 
if test -z "$LIBPYTHON"; then
4425
 
  LIBPYTHON=-lpython$version
4426
 
fi
4427
 
 
4428
 
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4429
 
python_moddir=$python_moddir/python$version
4430
 
if test ! -r $python_moddir/copy.py; then
4431
 
  python_moddir=no
4432
 
fi
4433
 
 
4434
 
PYTHONMODDIR=$python_moddir
4435
 
 
4436
 
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4437
 
 
4438
 
if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
4439
 
   LIBPYTHON=$kde_orig_LIBPYTHON
4440
 
   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4441
 
   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4442
 
   $2
4443
 
else 
4444
 
  dnl Note: this test is very weak
4445
 
  kde_python_link_found=no
4446
 
  KDE_TRY_LINK_PYTHON(normal)
4447
 
  KDE_TRY_LINK_PYTHON(m, -lm)
4448
 
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4449
 
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4450
 
  KDE_TRY_LINK_PYTHON(db2, -ldb2)
4451
 
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4452
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4453
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4454
 
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4455
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4456
 
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4457
 
  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4458
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4459
 
        [AC_MSG_WARN([it seems, Python depends on another library.
4460
 
    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4461
 
    and contact the authors to let them know about this problem])
4462
 
        ])
4463
 
 
4464
 
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4465
 
  AC_SUBST(PYTHONINC)
4466
 
  AC_SUBST(PYTHONLIB)
4467
 
  AC_SUBST(LIBPYTHON)
4468
 
  AC_SUBST(PYTHONMODDIR)
4469
 
  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4470
 
fi
4471
 
 
4472
 
])
4473
 
 
4474
 
 
4475
 
AC_DEFUN([KDE_CHECK_PYTHON],
4476
 
[
4477
 
  KDE_CHECK_PYTHON_INTERN("2.4",
4478
 
   [KDE_CHECK_PYTHON_INTERN("2.3", 
4479
 
     [KDE_CHECK_PYTHON_INTERN("2.2", 
4480
 
       [KDE_CHECK_PYTHON_INTERN("2.1", 
4481
 
         [KDE_CHECK_PYTHON_INTERN("2.0", 
4482
 
           [KDE_CHECK_PYTHON_INTERN($1, $2) ])
4483
 
         ])
4484
 
       ])
4485
 
     ])
4486
 
  ])
4487
 
])
4488
 
 
4489
 
AC_DEFUN([KDE_CHECK_STL],
4490
 
[
4491
 
    AC_LANG_SAVE
4492
 
    AC_LANG_CPLUSPLUS
4493
 
    ac_save_CXXFLAGS="$CXXFLAGS"
4494
 
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4495
 
 
4496
 
    AC_MSG_CHECKING([if C++ programs can be compiled])
4497
 
    AC_CACHE_VAL(kde_cv_stl_works,
4498
 
    [
4499
 
      AC_TRY_COMPILE([
4500
 
#include <string>
4501
 
using namespace std;
4502
 
],[
4503
 
  string astring="Hallo Welt.";
4504
 
  astring.erase(0, 6); // now astring is "Welt"
4505
 
  return 0;
4506
 
], kde_cv_stl_works=yes,
4507
 
   kde_cv_stl_works=no)
4508
 
])
4509
 
 
4510
 
   AC_MSG_RESULT($kde_cv_stl_works)
4511
 
 
4512
 
   if test "$kde_cv_stl_works" = "yes"; then
4513
 
     # back compatible
4514
 
         AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4515
 
   else
4516
 
         AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4517
 
Check config.log for details - if you're using a Linux distribution you might miss
4518
 
a package named similar to libstdc++-dev.])
4519
 
   fi
4520
 
 
4521
 
   CXXFLAGS="$ac_save_CXXFLAGS"
4522
 
   AC_LANG_RESTORE
4523
 
])
4524
 
 
4525
 
AC_DEFUN([AC_FIND_QIMGIO],
4526
 
   [AC_REQUIRE([AC_FIND_JPEG])
4527
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4528
 
AC_MSG_CHECKING([for qimgio])
4529
 
AC_CACHE_VAL(ac_cv_lib_qimgio,
4530
 
[
4531
 
AC_LANG_SAVE
4532
 
AC_LANG_CPLUSPLUS
4533
 
ac_save_LIBS="$LIBS"
4534
 
ac_save_CXXFLAGS="$CXXFLAGS"
4535
 
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4536
 
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4537
 
AC_TRY_RUN(dnl
4538
 
[
4539
 
#include <qimageio.h>
4540
 
#include <qstring.h>
4541
 
int main() {
4542
 
                QString t = "hallo";
4543
 
                t.fill('t');
4544
 
                qInitImageIO();
4545
 
}
4546
 
],
4547
 
            ac_cv_lib_qimgio=yes,
4548
 
            ac_cv_lib_qimgio=no,
4549
 
            ac_cv_lib_qimgio=no)
4550
 
LIBS="$ac_save_LIBS"
4551
 
CXXFLAGS="$ac_save_CXXFLAGS"
4552
 
AC_LANG_RESTORE
4553
 
])dnl
4554
 
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4555
 
  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4556
 
  AC_MSG_RESULT(yes)
4557
 
  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4558
 
  AC_SUBST(LIBQIMGIO)
4559
 
else
4560
 
  AC_MSG_RESULT(not found)
4561
 
fi
4562
 
])
4563
 
 
4564
 
AC_DEFUN([AM_DISABLE_LIBRARIES],
4565
 
[
4566
 
    AC_PROVIDE([AM_ENABLE_STATIC])
4567
 
    AC_PROVIDE([AM_ENABLE_SHARED])
4568
 
    enable_static=no
4569
 
    enable_shared=yes
4570
 
])
4571
 
 
4572
 
 
4573
 
AC_DEFUN([AC_CHECK_UTMP_FILE],
4574
 
[
4575
 
    AC_MSG_CHECKING([for utmp file])
4576
 
 
4577
 
    AC_CACHE_VAL(kde_cv_utmp_file,
4578
 
    [
4579
 
    kde_cv_utmp_file=no
4580
 
 
4581
 
    for ac_file in    \
4582
 
                      \
4583
 
        /var/run/utmp \
4584
 
        /var/adm/utmp \
4585
 
        /etc/utmp     \
4586
 
     ; \
4587
 
    do
4588
 
     if test -r "$ac_file"; then
4589
 
       kde_cv_utmp_file=$ac_file
4590
 
       break
4591
 
     fi
4592
 
    done
4593
 
    ])
4594
 
 
4595
 
    if test "$kde_cv_utmp_file" != "no"; then
4596
 
        AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4597
 
        $1
4598
 
        AC_MSG_RESULT($kde_cv_utmp_file)
4599
 
    else
4600
 
        $2
4601
 
        AC_MSG_RESULT([non found])
4602
 
    fi
4603
 
])
4604
 
 
4605
 
 
4606
 
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4607
 
[
4608
 
 
4609
 
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4610
 
TOPSUBDIRS=""
4611
 
 
4612
 
if test ! -s $srcdir/subdirs; then
4613
 
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
4614
 
  files=`cd $srcdir && ls -1`
4615
 
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4616
 
  for i in $dirs; do
4617
 
    echo $i >> $srcdir/subdirs
4618
 
  done
4619
 
fi
4620
 
 
4621
 
ac_topsubdirs=
4622
 
if test -s $srcdir/inst-apps; then
4623
 
  ac_topsubdirs="`cat $srcdir/inst-apps`"
4624
 
elif test -s $srcdir/subdirs; then
4625
 
  ac_topsubdirs="`cat $srcdir/subdirs`"
4626
 
fi
4627
 
 
4628
 
for i in $ac_topsubdirs; do
4629
 
  AC_MSG_CHECKING([if $i should be compiled])
4630
 
  if test -d $srcdir/$i; then
4631
 
    install_it="yes"
4632
 
    for j in $DO_NOT_COMPILE; do
4633
 
      if test $i = $j; then
4634
 
        install_it="no"
4635
 
      fi
4636
 
    done
4637
 
  else
4638
 
    install_it="no"
4639
 
  fi
4640
 
  AC_MSG_RESULT($install_it)
4641
 
  vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
4642
 
  if test $install_it = "yes"; then
4643
 
    TOPSUBDIRS="$TOPSUBDIRS $i"
4644
 
    eval "$vari""_SUBDIR_included=yes"
4645
 
  else
4646
 
    eval "$vari""_SUBDIR_included=no"
4647
 
  fi
4648
 
done
4649
 
 
4650
 
AC_SUBST(TOPSUBDIRS)
4651
 
])
4652
 
 
4653
 
AC_DEFUN([KDE_CHECK_NAMESPACES],
4654
 
[
4655
 
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4656
 
AC_LANG_SAVE
4657
 
AC_LANG_CPLUSPLUS
4658
 
AC_TRY_COMPILE([
4659
 
],
4660
 
[
4661
 
namespace Foo {
4662
 
  extern int i;
4663
 
  namespace Bar {
4664
 
    extern int i;
4665
 
  }
4666
 
}
4667
 
 
4668
 
int Foo::i = 0;
4669
 
int Foo::Bar::i = 1;
4670
 
],[
4671
 
  AC_MSG_RESULT(yes)
4672
 
  AC_DEFINE(HAVE_NAMESPACES)
4673
 
], [
4674
 
AC_MSG_RESULT(no)
4675
 
])
4676
 
AC_LANG_RESTORE
4677
 
])
4678
 
 
4679
 
dnl ------------------------------------------------------------------------
4680
 
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4681
 
dnl ------------------------------------------------------------------------
4682
 
dnl
4683
 
AC_DEFUN([AC_CHECK_S_ISSOCK],
4684
 
[
4685
 
AC_MSG_CHECKING(for S_ISSOCK)
4686
 
AC_CACHE_VAL(ac_cv_have_s_issock,
4687
 
[
4688
 
AC_TRY_LINK(
4689
 
[
4690
 
#include <sys/stat.h>
4691
 
],
4692
 
[
4693
 
struct stat buff;
4694
 
int b = S_ISSOCK( buff.st_mode );
4695
 
],
4696
 
ac_cv_have_s_issock=yes,
4697
 
ac_cv_have_s_issock=no)
4698
 
])
4699
 
AC_MSG_RESULT($ac_cv_have_s_issock)
4700
 
if test "$ac_cv_have_s_issock" = "yes"; then
4701
 
  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4702
 
fi
4703
 
 
4704
 
AH_VERBATIM(_ISSOCK,
4705
 
[
4706
 
#ifndef HAVE_S_ISSOCK
4707
 
#define HAVE_S_ISSOCK
4708
 
#define S_ISSOCK(mode) (1==0)
4709
 
#endif
4710
 
])
4711
 
 
4712
 
])
4713
 
 
4714
 
dnl ------------------------------------------------------------------------
4715
 
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4716
 
dnl ------------------------------------------------------------------------
4717
 
dnl
4718
 
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4719
 
[
4720
 
AC_MSG_CHECKING(for MAXPATHLEN)
4721
 
AC_CACHE_VAL(ac_cv_maxpathlen,
4722
 
[
4723
 
cat > conftest.$ac_ext <<EOF
4724
 
#ifdef STDC_HEADERS
4725
 
# include <stdlib.h>
4726
 
#endif
4727
 
#include <stdio.h>
4728
 
#include <sys/param.h>
4729
 
#ifndef MAXPATHLEN
4730
 
#define MAXPATHLEN 1024
4731
 
#endif
4732
 
 
4733
 
KDE_HELLO MAXPATHLEN
4734
 
 
4735
 
EOF
4736
 
 
4737
 
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4738
 
 
4739
 
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4740
 
    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4741
 
else
4742
 
    ac_cv_maxpathlen=1024
4743
 
fi
4744
 
 
4745
 
rm conftest.*
4746
 
 
4747
 
])
4748
 
AC_MSG_RESULT($ac_cv_maxpathlen)
4749
 
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4750
 
])
4751
 
 
4752
 
AC_DEFUN([KDE_CHECK_HEADER],
4753
 
[
4754
 
   kde_safe_cppflags=$CPPFLAGS
4755
 
   CPPFLAGS="$CPPFLAGS $all_includes"
4756
 
   AC_LANG_SAVE
4757
 
   AC_LANG_CPLUSPLUS
4758
 
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4759
 
   AC_LANG_RESTORE
4760
 
   CPPFLAGS=$kde_safe_cppflags
4761
 
])
4762
 
 
4763
 
AC_DEFUN([KDE_CHECK_HEADERS],
4764
 
[
4765
 
   AH_CHECK_HEADERS([$1])
4766
 
   AC_LANG_SAVE
4767
 
   kde_safe_cppflags=$CPPFLAGS
4768
 
   CPPFLAGS="$CPPFLAGS $all_includes"
4769
 
   AC_LANG_CPLUSPLUS
4770
 
   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4771
 
   CPPFLAGS=$kde_safe_cppflags
4772
 
   AC_LANG_RESTORE
4773
 
])
4774
 
 
4775
 
AC_DEFUN([KDE_FAST_CONFIGURE],
4776
 
[
4777
 
  dnl makes configure fast (needs perl)
4778
 
  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4779
 
      with_fast_perl=$enableval, with_fast_perl=yes)
4780
 
])
4781
 
 
4782
 
AC_DEFUN([KDE_CONF_FILES],
4783
 
[
4784
 
  val=
4785
 
  if test -f $srcdir/configure.files ; then
4786
 
    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4787
 
  fi
4788
 
  CONF_FILES=
4789
 
  if test -n "$val" ; then
4790
 
    for i in $val ; do
4791
 
      CONF_FILES="$CONF_FILES $i"
4792
 
    done
4793
 
  fi
4794
 
  AC_SUBST(CONF_FILES)
4795
 
])dnl
4796
 
 
4797
 
dnl This sets the prefix, for arts and kdelibs
4798
 
dnl Do NOT use in any other module.
4799
 
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
4800
 
AC_DEFUN([KDE_SET_PREFIX_CORE],
4801
 
[
4802
 
  unset CDPATH
4803
 
  dnl make $KDEDIR the default for the installation
4804
 
  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4805
 
 
4806
 
  if test "x$prefix" = "xNONE"; then
4807
 
    prefix=$ac_default_prefix
4808
 
    ac_configure_args="$ac_configure_args --prefix=$prefix"
4809
 
  fi
4810
 
  # And delete superfluous '/' to make compares easier
4811
 
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4812
 
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4813
 
 
4814
 
  kde_libs_prefix='$(prefix)'
4815
 
  kde_libs_htmldir='$(kde_htmldir)'
4816
 
  AC_SUBST(kde_libs_prefix)
4817
 
  AC_SUBST(kde_libs_htmldir)
4818
 
  KDE_FAST_CONFIGURE
4819
 
  KDE_CONF_FILES
4820
 
])
4821
 
 
4822
 
 
4823
 
AC_DEFUN([KDE_SET_PREFIX],
4824
 
[
4825
 
  unset CDPATH
4826
 
  dnl We can't give real code to that macro, only a value.
4827
 
  dnl It only matters for --help, since we set the prefix in this function anyway.
4828
 
  AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
4829
 
 
4830
 
  KDE_SET_DEFAULT_BINDIRS
4831
 
  if test "x$prefix" = "xNONE"; then
4832
 
    dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
4833
 
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4834
 
  else
4835
 
    dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
4836
 
    kde_save_PATH="$PATH"
4837
 
    PATH="$exec_prefix/bin:$prefix/bin:$PATH"
4838
 
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4839
 
    PATH="$kde_save_PATH"
4840
 
  fi
4841
 
 
4842
 
  kde_libs_prefix=`$KDECONFIG --prefix`
4843
 
  if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
4844
 
       AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
4845
 
                    This means it has been moved since you installed it.
4846
 
                    This won't work. Please recompile kdelibs for the new prefix.
4847
 
                    ])
4848
 
  fi
4849
 
  kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
4850
 
  kde_libs_suffix=`$KDECONFIG --libsuffix`
4851
 
 
4852
 
  AC_MSG_CHECKING([where to install])
4853
 
  if test "x$prefix" = "xNONE"; then
4854
 
    prefix=$kde_libs_prefix
4855
 
    AC_MSG_RESULT([$prefix (as returned by kde-config)])
4856
 
  else
4857
 
    dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
4858
 
    given_prefix=$prefix
4859
 
    AC_MSG_RESULT([$prefix (as requested)])
4860
 
  fi
4861
 
 
4862
 
  # And delete superfluous '/' to make compares easier
4863
 
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4864
 
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4865
 
  given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4866
 
 
4867
 
  AC_SUBST(KDECONFIG)
4868
 
  AC_SUBST(kde_libs_prefix)
4869
 
  AC_SUBST(kde_libs_htmldir)
4870
 
 
4871
 
  KDE_FAST_CONFIGURE
4872
 
  KDE_CONF_FILES
4873
 
])
4874
 
 
4875
 
pushdef([AC_PROG_INSTALL],
4876
 
[
4877
 
  dnl our own version, testing for a -p flag
4878
 
  popdef([AC_PROG_INSTALL])
4879
 
  dnl as AC_PROG_INSTALL works as it works we first have
4880
 
  dnl to save if the user didn't specify INSTALL, as the
4881
 
  dnl autoconf one overwrites INSTALL and we have no chance to find
4882
 
  dnl out afterwards
4883
 
  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4884
 
  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4885
 
  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4886
 
  AC_PROG_INSTALL
4887
 
 
4888
 
  if test -z "$kde_save_INSTALL_given" ; then
4889
 
    # OK, user hasn't given any INSTALL, autoconf found one for us
4890
 
    # now we test, if it supports the -p flag
4891
 
    AC_MSG_CHECKING(for -p flag to install)
4892
 
    rm -f confinst.$$.* > /dev/null 2>&1
4893
 
    echo "Testtest" > confinst.$$.orig
4894
 
    ac_res=no
4895
 
    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4896
 
      if test -f confinst.$$.new ; then
4897
 
        # OK, -p seems to do no harm to install
4898
 
        INSTALL="${INSTALL} -p"
4899
 
        ac_res=yes
4900
 
      fi
4901
 
    fi
4902
 
    rm -f confinst.$$.*
4903
 
    AC_MSG_RESULT($ac_res)
4904
 
  fi
4905
 
  dnl the following tries to resolve some signs and wonders coming up
4906
 
  dnl with different autoconf/automake versions
4907
 
  dnl e.g.:
4908
 
  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4909
 
  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4910
 
  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4911
 
  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4912
 
  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4913
 
  dnl   install-@DIR@PROGRAMS targets to explicitly use that flag
4914
 
  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4915
 
  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
4916
 
  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
4917
 
  dnl  *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4918
 
  dnl   automake (due to broken Makefile.am or whatever) to install programs,
4919
 
  dnl   and so does not see the -s flag in automake > 1.4
4920
 
  dnl to clean up that mess we:
4921
 
  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4922
 
  dnl   which cleans KDE's program with automake > 1.4;
4923
 
  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4924
 
  dnl   with automake<=1.4
4925
 
  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
4926
 
  dnl   properly uses install-@DIR@PROGRAMS, but I don't care
4927
 
  dnl
4928
 
  dnl And to all this comes, that I even can't write in comments variable
4929
 
  dnl  names used by automake, because it is so stupid to think I wanted to
4930
 
  dnl  _use_ them, therefor I have written A_M_... instead of AM_
4931
 
  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4932
 
 
4933
 
  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4934
 
    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4935
 
  fi
4936
 
  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4937
 
    INSTALL_SCRIPT='${INSTALL}'
4938
 
  fi
4939
 
])dnl
4940
 
 
4941
 
AC_DEFUN([KDE_LANG_CPLUSPLUS],
4942
 
[AC_LANG_CPLUSPLUS
4943
 
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4944
 
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4945
 
])
4946
 
 
4947
 
pushdef([AC_LANG_CPLUSPLUS],
4948
 
[popdef([AC_LANG_CPLUSPLUS])
4949
 
KDE_LANG_CPLUSPLUS
4950
 
])
4951
 
 
4952
 
AC_DEFUN([KDE_CHECK_LONG_LONG],
4953
 
[
4954
 
AC_MSG_CHECKING(for long long)
4955
 
AC_CACHE_VAL(kde_cv_c_long_long,
4956
 
[
4957
 
  AC_LANG_SAVE
4958
 
  AC_LANG_CPLUSPLUS
4959
 
  AC_TRY_LINK([], [
4960
 
  long long foo = 0;
4961
 
  foo = foo+1;
4962
 
  ],
4963
 
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4964
 
  AC_LANG_RESTORE
4965
 
])
4966
 
AC_MSG_RESULT($kde_cv_c_long_long)
4967
 
if test "$kde_cv_c_long_long" = yes; then
4968
 
   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4969
 
fi
4970
 
])
4971
 
 
4972
 
AC_DEFUN([KDE_CHECK_LIB],
4973
 
[
4974
 
     kde_save_LDFLAGS="$LDFLAGS"
4975
 
     dnl AC_CHECK_LIB modifies LIBS, so save it here
4976
 
     kde_save_LIBS="$LIBS"
4977
 
     LDFLAGS="$LDFLAGS $all_libraries"
4978
 
     case $host_os in
4979
 
      aix*) LDFLAGS="-brtl $LDFLAGS"
4980
 
        test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4981
 
        ;;
4982
 
     esac
4983
 
     AC_CHECK_LIB($1, $2, $3, $4, $5)
4984
 
     LDFLAGS="$kde_save_LDFLAGS"
4985
 
     LIBS="$kde_save_LIBS"
4986
 
])
4987
 
 
4988
 
AC_DEFUN([KDE_JAVA_PREFIX],
4989
 
[
4990
 
        dir=`dirname "$1"`
4991
 
        base=`basename "$1"`
4992
 
        list=`ls -1 $dir 2> /dev/null`
4993
 
        for entry in $list; do 
4994
 
                if test -d $dir/$entry/bin; then
4995
 
                        case $entry in
4996
 
                           $base)
4997
 
                                javadirs="$javadirs $dir/$entry/bin"
4998
 
                                ;;
4999
 
                        esac
5000
 
                elif test -d $dir/$entry/jre/bin; then
5001
 
                        case $entry in
5002
 
                           $base)
5003
 
                                javadirs="$javadirs $dir/$entry/jre/bin"
5004
 
                                ;;
5005
 
                        esac
5006
 
                fi
5007
 
        done
5008
 
])
5009
 
 
5010
 
dnl KDE_CHEC_JAVA_DIR(onlyjre)
5011
 
AC_DEFUN([KDE_CHECK_JAVA_DIR],
5012
 
[
5013
 
 
5014
 
AC_ARG_WITH(java,
5015
 
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
5016
 
[  ac_java_dir=$withval
5017
 
], ac_java_dir=""
5018
 
)
5019
 
 
5020
 
AC_MSG_CHECKING([for Java])
5021
 
 
5022
 
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
5023
 
if test "x$ac_java_dir" = "xno"; then
5024
 
   kde_java_bindir=no
5025
 
   kde_java_includedir=no
5026
 
   kde_java_libjvmdir=no
5027
 
   kde_java_libgcjdir=no
5028
 
   kde_java_libhpidir=no
5029
 
else
5030
 
  if test "x$ac_java_dir" = "x"; then
5031
 
     
5032
 
     
5033
 
      dnl No option set -> collect list of candidate paths
5034
 
      if test -n "$JAVA_HOME"; then
5035
 
        KDE_JAVA_PREFIX($JAVA_HOME)
5036
 
      fi
5037
 
      KDE_JAVA_PREFIX(/usr/j2se)
5038
 
      KDE_JAVA_PREFIX(/usr/lib/j2se)
5039
 
      KDE_JAVA_PREFIX(/usr/j*dk*)
5040
 
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
5041
 
      KDE_JAVA_PREFIX(/opt/j*sdk*)
5042
 
      KDE_JAVA_PREFIX(/usr/lib/java*)
5043
 
      KDE_JAVA_PREFIX(/usr/java*)
5044
 
      KDE_JAVA_PREFIX(/usr/java/j*dk*)
5045
 
      KDE_JAVA_PREFIX(/usr/java/j*re*)
5046
 
      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
5047
 
      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
5048
 
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
5049
 
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
5050
 
      KDE_JAVA_PREFIX(/opt/java*)
5051
 
 
5052
 
      kde_cv_path="NONE"
5053
 
      kde_save_IFS=$IFS
5054
 
      IFS=':'
5055
 
      for dir in $PATH; do
5056
 
          if test -d "$dir"; then
5057
 
              javadirs="$javadirs $dir"
5058
 
          fi
5059
 
      done
5060
 
      IFS=$kde_save_IFS
5061
 
      jredirs=
5062
 
 
5063
 
      dnl Now javadirs contains a list of paths that exist, all ending with bin/
5064
 
      for dir in $javadirs; do
5065
 
          dnl Check for the java executable
5066
 
          if test -x "$dir/java"; then
5067
 
              dnl And also check for a libjvm.so somewhere under there
5068
 
              dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
5069
 
              if test "$dir" != "/usr/bin"; then
5070
 
                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5071
 
                  if test ! -f $libjvmdir/libjvm.so; then continue; fi
5072
 
                  jredirs="$jredirs $dir"
5073
 
              fi
5074
 
          fi
5075
 
      done
5076
 
 
5077
 
      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
5078
 
      JAVAC=
5079
 
      JAVA=
5080
 
      kde_java_bindir=no
5081
 
      for dir in $jredirs; do
5082
 
          JAVA="$dir/java"
5083
 
          kde_java_bindir=$dir
5084
 
          if test -x "$dir/javac"; then
5085
 
                JAVAC="$dir/javac"
5086
 
                break
5087
 
          fi
5088
 
      done
5089
 
 
5090
 
      if test -n "$JAVAC"; then
5091
 
          dnl this substitution might not work - well, we test for jni.h below
5092
 
          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
5093
 
      else
5094
 
          kde_java_includedir=no
5095
 
      fi
5096
 
  else
5097
 
    dnl config option set
5098
 
    kde_java_bindir=$ac_java_dir/bin
5099
 
    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
5100
 
        kde_java_includedir=no
5101
 
    else
5102
 
        kde_java_includedir=$ac_java_dir/include
5103
 
    fi
5104
 
  fi
5105
 
fi
5106
 
 
5107
 
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
5108
 
if test "x$kde_java_bindir" != "xno"; then
5109
 
 
5110
 
  dnl Look for libjvm.so
5111
 
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5112
 
  dnl Look for libgcj.so
5113
 
  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5114
 
  dnl Look for libhpi.so and avoid green threads
5115
 
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5116
 
 
5117
 
  dnl Now check everything's fine under there
5118
 
  dnl the include dir is our flag for having the JDK
5119
 
  if test -d "$kde_java_includedir"; then
5120
 
    if test ! -x "$kde_java_bindir/javac"; then
5121
 
      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
5122
 
    fi
5123
 
    if test ! -x "$kde_java_bindir/javah"; then
5124
 
      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5125
 
    fi
5126
 
    if test ! -x "$kde_java_bindir/jar"; then
5127
 
      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5128
 
    fi
5129
 
    if test ! -r "$kde_java_includedir/jni.h"; then
5130
 
      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
5131
 
    fi
5132
 
 
5133
 
    jni_includes="-I$kde_java_includedir"
5134
 
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5135
 
    dnl and under linux here.. 
5136
 
    
5137
 
    dnl not needed for gcj
5138
 
 
5139
 
    if test "x$kde_java_libgcjdir" = "x"; then 
5140
 
      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5141
 
      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5142
 
      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5143
 
    fi
5144
 
 
5145
 
  else
5146
 
    JAVAC=
5147
 
    jni_includes=
5148
 
  fi
5149
 
 
5150
 
  if test "x$kde_java_libgcjdir" = "x"; then 
5151
 
     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5152
 
        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5153
 
     fi 
5154
 
  else
5155
 
     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5156
 
        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5157
 
     fi 
5158
 
  fi
5159
 
 
5160
 
  if test ! -x "$kde_java_bindir/java"; then
5161
 
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5162
 
  fi
5163
 
 
5164
 
  dnl not needed for gcj compile
5165
 
 
5166
 
  if test "x$kde_java_libgcjdir" = "x"; then 
5167
 
      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5168
 
        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5169
 
      fi
5170
 
  fi
5171
 
 
5172
 
  if test -n "$jni_includes"; then
5173
 
    dnl Check for JNI version
5174
 
    AC_LANG_SAVE
5175
 
    AC_LANG_CPLUSPLUS
5176
 
    ac_cxxflags_safe="$CXXFLAGS"
5177
 
    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
5178
 
 
5179
 
    AC_TRY_COMPILE([
5180
 
  #include <jni.h>
5181
 
              ],
5182
 
              [
5183
 
  #ifndef JNI_VERSION_1_2
5184
 
  Syntax Error
5185
 
  #endif
5186
 
              ],[ kde_jni_works=yes ],
5187
 
              [ kde_jni_works=no ])
5188
 
 
5189
 
    if test $kde_jni_works = no; then
5190
 
      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
5191
 
                    You need to have Java Development Kit (JDK) version 1.2. 
5192
 
 
5193
 
                    Use --with-java to specify another location.
5194
 
                    Use --without-java to configure without java support.
5195
 
                    Or download a newer JDK and try again. 
5196
 
                    See e.g. http://java.sun.com/products/jdk/1.2 ])
5197
 
    fi
5198
 
 
5199
 
    CXXFLAGS="$ac_cxxflags_safe"    
5200
 
    AC_LANG_RESTORE
5201
 
 
5202
 
    dnl All tests ok, inform and subst the variables
5203
 
 
5204
 
    JAVAC=$kde_java_bindir/javac
5205
 
    JAVAH=$kde_java_bindir/javah
5206
 
    JAR=$kde_java_bindir/jar
5207
 
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5208
 
    if test "x$kde_java_libgcjdir" = "x"; then 
5209
 
      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5210
 
    else
5211
 
      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5212
 
    fi
5213
 
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
5214
 
 
5215
 
  else
5216
 
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5217
 
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
5218
 
  fi
5219
 
elif test -d "/Library/Java/Home"; then
5220
 
  kde_java_bindir="/Library/Java/Home/bin"
5221
 
  jni_includes="-I/Library/Java/Home/include"
5222
 
 
5223
 
  JAVAC=$kde_java_bindir/javac
5224
 
  JAVAH=$kde_java_bindir/javah
5225
 
  JAR=$kde_java_bindir/jar
5226
 
  JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
5227
 
 
5228
 
  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5229
 
  AC_MSG_RESULT([Apple Java Framework])
5230
 
else
5231
 
  AC_MSG_RESULT([none found])
5232
 
fi
5233
 
 
5234
 
AC_SUBST(JAVAC)
5235
 
AC_SUBST(JAVAH)
5236
 
AC_SUBST(JAR)
5237
 
AC_SUBST(JVMLIBS)
5238
 
AC_SUBST(jni_includes)
5239
 
 
5240
 
# for backward compat
5241
 
kde_cv_java_includedir=$kde_java_includedir
5242
 
kde_cv_java_bindir=$kde_java_bindir
5243
 
])
5244
 
 
5245
 
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
5246
 
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
5247
 
dnl big packages, m4_foreach is dog-slow.  So use our own version of
5248
 
dnl it.  (matz@kde.org)
5249
 
m4_define([mm_foreach],
5250
 
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
5251
 
m4_define([mm_car], [[$1]])
5252
 
m4_define([mm_car2], [[$@]])
5253
 
m4_define([_mm_foreach],
5254
 
[m4_if(m4_quote($2), [], [],
5255
 
       [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5256
 
                                                   mm_car2(m4_shift($2)),
5257
 
                                                   [$3])])])
5258
 
m4_define([AC_FOREACH],
5259
 
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5260
 
 
5261
 
AC_DEFUN([KDE_NEED_FLEX],
5262
 
[
5263
 
kde_libs_safe=$LIBS
5264
 
LIBS="$LIBS $USER_LDFLAGS"
5265
 
AM_PROG_LEX
5266
 
LIBS=$kde_libs_safe
5267
 
if test -z "$LEXLIB"; then
5268
 
    AC_MSG_ERROR([You need to have flex installed.])
5269
 
fi
5270
 
AC_SUBST(LEXLIB)
5271
 
])
5272
 
 
5273
 
AC_DEFUN([AC_PATH_QTOPIA],
5274
 
[
5275
 
  dnl TODO: use AC_CACHE_VAL
5276
 
 
5277
 
  if test -z "$1"; then
5278
 
    qtopia_minver_maj=1
5279
 
    qtopia_minver_min=5
5280
 
    qtopia_minver_pat=0
5281
 
  else
5282
 
    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5283
 
    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5284
 
    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5285
 
  fi
5286
 
 
5287
 
  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5288
 
  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5289
 
 
5290
 
  AC_REQUIRE([AC_PATH_QT])
5291
 
 
5292
 
  AC_MSG_CHECKING([for Qtopia])
5293
 
 
5294
 
  LIB_QTOPIA="-lqpe"
5295
 
  AC_SUBST(LIB_QTOPIA)
5296
 
 
5297
 
  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5298
 
 
5299
 
  ac_qtopia_incdir=NO
5300
 
 
5301
 
  AC_ARG_WITH(qtopia-dir,
5302
 
              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
5303
 
              [  ac_qtopia_incdir="$withval"/include] ) 
5304
 
  
5305
 
  qtopia_incdirs=""
5306
 
  for dir in $kde_qtopia_dirs; do
5307
 
    qtopia_incdirs="$qtopia_incdirs $dir/include"
5308
 
  done
5309
 
 
5310
 
  if test ! "$ac_qtopia_incdir" = "NO"; then
5311
 
    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5312
 
  fi
5313
 
 
5314
 
  qtopia_incdir=""
5315
 
  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5316
 
  ac_qtopia_incdir="$qtopia_incdir"
5317
 
 
5318
 
  if test -z "$qtopia_incdir"; then
5319
 
    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5320
 
  fi
5321
 
 
5322
 
  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5323
 
  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5324
 
  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5325
 
 
5326
 
  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5327
 
  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5328
 
  if test "$qtopia_ver" -lt "$qtopia_minver"; then
5329
 
    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5330
 
is required.])
5331
 
  fi
5332
 
 
5333
 
  AC_LANG_SAVE
5334
 
  AC_LANG_CPLUSPLUS
5335
 
 
5336
 
  ac_cxxflags_safe="$CXXFLAGS"
5337
 
  ac_ldflags_safe="$LDFLAGS"
5338
 
  ac_libs_safe="$LIBS"
5339
 
 
5340
 
  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5341
 
  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5342
 
  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5343
 
 
5344
 
  cat > conftest.$ac_ext <<EOF
5345
 
#include "confdefs.h"
5346
 
#include <qpe/qpeapplication.h>
5347
 
#include <qpe/version.h>
5348
 
 
5349
 
int main( int argc, char **argv )
5350
 
{
5351
 
    QPEApplication app( argc, argv );
5352
 
    return 0;
5353
 
}
5354
 
EOF
5355
 
 
5356
 
  if AC_TRY_EVAL(ac_link) && test -s conftest; then
5357
 
    rm -f conftest*
5358
 
  else
5359
 
    rm -f conftest*
5360
 
    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5361
 
the end of config.log])
5362
 
  fi
5363
 
 
5364
 
  CXXFLAGS="$ac_cxxflags_safe"
5365
 
  LDFLAGS="$ac_ldflags_safe"
5366
 
  LIBS="$ac_libs_safe"
5367
 
 
5368
 
  AC_LANG_RESTORE
5369
 
 
5370
 
  QTOPIA_INCLUDES="-I$qtopia_incdir"
5371
 
  AC_SUBST(QTOPIA_INCLUDES)
5372
 
 
5373
 
  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5374
 
])
5375
 
 
5376
 
 
5377
 
AC_DEFUN([KDE_INIT_DOXYGEN],
5378
 
[
5379
 
AC_MSG_CHECKING([for Qt docs])
5380
 
kde_qtdir=
5381
 
if test "${with_qt_dir+set}" = set; then
5382
 
  kde_qtdir="$with_qt_dir"
5383
 
fi
5384
 
 
5385
 
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)
5386
 
AC_MSG_RESULT($QTDOCDIR)
5387
 
 
5388
 
AC_SUBST(QTDOCDIR)
5389
 
 
5390
 
KDE_FIND_PATH(dot, DOT, [], [])
5391
 
if test -n "$DOT"; then
5392
 
  KDE_HAVE_DOT="YES"
5393
 
else
5394
 
  KDE_HAVE_DOT="NO"
5395
 
fi
5396
 
AC_SUBST(KDE_HAVE_DOT)
5397
 
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5398
 
AC_SUBST(DOXYGEN)
5399
 
 
5400
 
DOXYGEN_PROJECT_NAME="$1"
5401
 
DOXYGEN_PROJECT_NUMBER="$2"
5402
 
AC_SUBST(DOXYGEN_PROJECT_NAME)
5403
 
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5404
 
 
5405
 
KDE_HAS_DOXYGEN=no
5406
 
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5407
 
  KDE_HAS_DOXYGEN=yes
5408
 
fi
5409
 
AC_SUBST(KDE_HAS_DOXYGEN)
5410
 
 
5411
 
])
5412
 
 
5413
 
 
5414
 
AC_DEFUN([AC_FIND_BZIP2],
5415
 
[
5416
 
AC_MSG_CHECKING([for bzDecompress in libbz2])
5417
 
AC_CACHE_VAL(ac_cv_lib_bzip2,
5418
 
[
5419
 
AC_LANG_SAVE
5420
 
AC_LANG_CPLUSPLUS
5421
 
kde_save_LIBS="$LIBS"
5422
 
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5423
 
kde_save_CXXFLAGS="$CXXFLAGS"
5424
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5425
 
AC_TRY_LINK(dnl
5426
 
[
5427
 
#define BZ_NO_STDIO
5428
 
#include<bzlib.h>
5429
 
],
5430
 
            [ bz_stream s; (void) bzDecompress(&s); ],
5431
 
            eval "ac_cv_lib_bzip2='-lbz2'",
5432
 
            eval "ac_cv_lib_bzip2=no")
5433
 
LIBS="$kde_save_LIBS"
5434
 
CXXFLAGS="$kde_save_CXXFLAGS"
5435
 
AC_LANG_RESTORE
5436
 
])dnl
5437
 
AC_MSG_RESULT($ac_cv_lib_bzip2)
5438
 
 
5439
 
if test ! "$ac_cv_lib_bzip2" = no; then
5440
 
  BZIP2DIR=bzip2
5441
 
 
5442
 
  LIBBZ2="$ac_cv_lib_bzip2"
5443
 
  AC_SUBST(LIBBZ2)
5444
 
 
5445
 
else
5446
 
 
5447
 
   cxx_shared_flag=
5448
 
   ld_shared_flag=
5449
 
   KDE_CHECK_COMPILER_FLAG(shared, [
5450
 
        ld_shared_flag="-shared"
5451
 
   ])
5452
 
   KDE_CHECK_COMPILER_FLAG(fPIC, [
5453
 
        cxx_shared_flag="-fPIC"
5454
 
   ])
5455
 
 
5456
 
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5457
 
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5458
 
   [
5459
 
   AC_LANG_SAVE
5460
 
   AC_LANG_CPLUSPLUS
5461
 
   kde_save_LIBS="$LIBS"
5462
 
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5463
 
   kde_save_CXXFLAGS="$CXXFLAGS"
5464
 
   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5465
 
 
5466
 
   AC_TRY_LINK(dnl
5467
 
   [
5468
 
   #define BZ_NO_STDIO
5469
 
   #include<bzlib.h>
5470
 
   ],
5471
 
               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5472
 
               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5473
 
               eval "ac_cv_lib_bzip2_prefix=no")
5474
 
   LIBS="$kde_save_LIBS"
5475
 
   CXXFLAGS="$kde_save_CXXFLAGS"
5476
 
   AC_LANG_RESTORE
5477
 
   ])dnl
5478
 
 
5479
 
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5480
 
   
5481
 
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5482
 
     BZIP2DIR=bzip2
5483
 
    
5484
 
     LIBBZ2="$ac_cv_lib_bzip2_prefix"
5485
 
     AC_SUBST(LIBBZ2)
5486
 
 
5487
 
     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5488
 
   dnl else, we just ignore this
5489
 
   fi
5490
 
 
5491
 
fi
5492
 
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5493
 
])
5494
 
 
5495
 
dnl ------------------------------------------------------------------------
5496
 
dnl Try to find the SSL headers and libraries.
5497
 
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5498
 
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5499
 
dnl ------------------------------------------------------------------------
5500
 
dnl
5501
 
AC_DEFUN([KDE_CHECK_SSL],
5502
 
[
5503
 
LIBSSL="-lssl -lcrypto"
5504
 
AC_REQUIRE([KDE_CHECK_LIB64])
5505
 
 
5506
 
ac_ssl_includes=NO ac_ssl_libraries=NO
5507
 
ssl_libraries=""
5508
 
ssl_includes=""
5509
 
AC_ARG_WITH(ssl-dir,
5510
 
    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5511
 
    [  ac_ssl_includes="$withval"/include
5512
 
       ac_ssl_libraries="$withval"/lib$kdelibsuff
5513
 
    ])
5514
 
 
5515
 
want_ssl=yes
5516
 
AC_ARG_WITH(ssl,
5517
 
    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5518
 
    [want_ssl=$withval])
5519
 
 
5520
 
if test $want_ssl = yes; then
5521
 
 
5522
 
AC_MSG_CHECKING(for OpenSSL)
5523
 
 
5524
 
AC_CACHE_VAL(ac_cv_have_ssl,
5525
 
[#try to guess OpenSSL locations
5526
 
  
5527
 
  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5528
 
  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5529
 
  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5530
 
  ac_ssl_includes="$ssl_incdir"
5531
 
 
5532
 
  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"
5533
 
  if test ! "$ac_ssl_libraries" = "NO"; then
5534
 
    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5535
 
  fi
5536
 
 
5537
 
  test=NONE
5538
 
  ssl_libdir=NONE
5539
 
  for dir in $ssl_libdirs; do
5540
 
    try="ls -1 $dir/libssl*"
5541
 
    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5542
 
  done
5543
 
 
5544
 
  ac_ssl_libraries="$ssl_libdir"
5545
 
 
5546
 
  ac_ldflags_safe="$LDFLAGS"
5547
 
  ac_libs_safe="$LIBS"
5548
 
 
5549
 
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5550
 
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5551
 
 
5552
 
  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5553
 
  ac_ssl_rsaref="yes"
5554
 
  ,
5555
 
  ac_ssl_rsaref="no"
5556
 
  )
5557
 
 
5558
 
  LDFLAGS="$ac_ldflags_safe"
5559
 
  LIBS="$ac_libs_safe"
5560
 
 
5561
 
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5562
 
    have_ssl=no
5563
 
  else
5564
 
    have_ssl=yes;
5565
 
  fi
5566
 
 
5567
 
  ])
5568
 
 
5569
 
  eval "$ac_cv_have_ssl"
5570
 
 
5571
 
  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5572
 
 
5573
 
  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5574
 
  AC_MSG_RESULT($ac_ssl_rsaref)
5575
 
 
5576
 
  AC_MSG_CHECKING([for easter eggs])
5577
 
  AC_MSG_RESULT([none found])
5578
 
 
5579
 
else
5580
 
  have_ssl=no
5581
 
fi
5582
 
 
5583
 
if test "$have_ssl" = yes; then
5584
 
  AC_MSG_CHECKING(for OpenSSL version)
5585
 
  dnl Check for SSL version
5586
 
  AC_CACHE_VAL(ac_cv_ssl_version,
5587
 
  [
5588
 
 
5589
 
    cat >conftest.$ac_ext <<EOF
5590
 
#include <openssl/opensslv.h>
5591
 
#include <stdio.h>
5592
 
    int main() {
5593
 
 
5594
 
#ifndef OPENSSL_VERSION_NUMBER
5595
 
      printf("ssl_version=\\"error\\"\n");
5596
 
#else
5597
 
      if (OPENSSL_VERSION_NUMBER < 0x00906000)
5598
 
        printf("ssl_version=\\"old\\"\n");
5599
 
      else
5600
 
        printf("ssl_version=\\"ok\\"\n");
5601
 
#endif
5602
 
     return (0);
5603
 
    }
5604
 
EOF
5605
 
 
5606
 
    ac_save_CPPFLAGS=$CPPFLAGS
5607
 
    if test "$ac_ssl_includes" != "/usr/include"; then
5608
 
        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5609
 
    fi
5610
 
 
5611
 
    if AC_TRY_EVAL(ac_link); then 
5612
 
 
5613
 
      if eval `./conftest 2>&5`; then
5614
 
        if test $ssl_version = error; then
5615
 
          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5616
 
        else
5617
 
          if test $ssl_version = old; then
5618
 
            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5619
 
            have_ssl=no
5620
 
          fi
5621
 
        fi
5622
 
        ac_cv_ssl_version="ssl_version=$ssl_version"
5623
 
      else
5624
 
        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5625
 
        Check config.log, and if you can't figure it out, send a mail to 
5626
 
        David Faure <faure@kde.org>, attaching your config.log])
5627
 
      fi
5628
 
 
5629
 
    else
5630
 
      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5631
 
      Check config.log, and if you can't figure it out, send a mail to 
5632
 
      David Faure <faure@kde.org>, attaching your config.log])
5633
 
    fi 
5634
 
    CPPFLAGS=$ac_save_CPPFLAGS
5635
 
 
5636
 
  ])
5637
 
 
5638
 
  eval "$ac_cv_ssl_version"
5639
 
  AC_MSG_RESULT($ssl_version)
5640
 
fi
5641
 
 
5642
 
if test "$have_ssl" != yes; then
5643
 
  LIBSSL="";
5644
 
else
5645
 
  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5646
 
  ac_cv_have_ssl="have_ssl=yes \
5647
 
    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5648
 
  
5649
 
  
5650
 
  ssl_libraries="$ac_ssl_libraries"
5651
 
  ssl_includes="$ac_ssl_includes"
5652
 
 
5653
 
  if test "$ac_ssl_rsaref" = yes; then
5654
 
    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
5655
 
  fi
5656
 
 
5657
 
  if test $ssl_version = "old"; then
5658
 
    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5659
 
  fi
5660
 
fi
5661
 
 
5662
 
SSL_INCLUDES=
5663
 
 
5664
 
if test "$ssl_includes" = "/usr/include"; then
5665
 
  if test -f /usr/kerberos/include/krb5.h; then
5666
 
        SSL_INCLUDES="-I/usr/kerberos/include"
5667
 
  fi
5668
 
elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5669
 
  SSL_INCLUDES="-I$ssl_includes"
5670
 
fi
5671
 
 
5672
 
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5673
 
 SSL_LDFLAGS=""
5674
 
else
5675
 
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5676
 
fi
5677
 
 
5678
 
AC_SUBST(SSL_INCLUDES)
5679
 
AC_SUBST(SSL_LDFLAGS)
5680
 
AC_SUBST(LIBSSL)
5681
 
])
5682
 
 
5683
 
AC_DEFUN([KDE_CHECK_STRLCPY],
5684
 
[
5685
 
  AC_REQUIRE([AC_CHECK_STRLCAT])
5686
 
  AC_REQUIRE([AC_CHECK_STRLCPY])
5687
 
  AC_CHECK_SIZEOF(size_t)
5688
 
  AC_CHECK_SIZEOF(unsigned long)
5689
 
 
5690
 
  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5691
 
  AC_TRY_COMPILE(,[
5692
 
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5693
 
       choke me
5694
 
    #endif
5695
 
    ],AC_MSG_RESULT([yes]),[
5696
 
      AC_MSG_RESULT(no)
5697
 
      AC_MSG_ERROR([
5698
 
       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
5699
 
       does not apply. Please mail kde-devel@kde.org with a description of your system!
5700
 
      ])
5701
 
  ])
5702
 
])
5703
 
 
5704
 
AC_DEFUN([KDE_CHECK_BINUTILS],
5705
 
[
5706
 
  AC_MSG_CHECKING([if ld supports unversioned version maps])
5707
 
 
5708
 
  kde_save_LDFLAGS="$LDFLAGS"
5709
 
  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5710
 
  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5711
 
  AC_TRY_LINK([int foo;],
5712
 
[
5713
 
#ifdef __INTEL_COMPILER
5714
 
icc apparently does not support libtools version-info and version-script
5715
 
at the same time. Dunno where the bug is, but until somebody figured out,
5716
 
better disable the optional version scripts.
5717
 
#endif
5718
 
 
5719
 
  foo = 42;
5720
 
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5721
 
  LDFLAGS="$kde_save_LDFLAGS"
5722
 
  rm -f conftest.map
5723
 
  AM_CONDITIONAL(include_VERSION_SCRIPT, 
5724
 
    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5725
 
 
5726
 
  AC_MSG_RESULT($kde_supports_versionmaps)
5727
 
])
5728
 
 
5729
 
AC_DEFUN([AM_PROG_OBJC],[
5730
 
AC_CHECK_PROGS(OBJC, gcc, gcc)
5731
 
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5732
 
if test "x${OBJCFLAGS-unset}" = xunset; then
5733
 
   OBJCFLAGS="-g -O2"
5734
 
fi
5735
 
AC_SUBST(OBJCFLAGS)
5736
 
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5737
 
])
5738
 
 
5739
 
AC_DEFUN([KDE_CHECK_PERL],
5740
 
[
5741
 
        KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5742
 
                    AC_MSG_ERROR([No Perl found in your $PATH.
5743
 
We need perl to generate some code.])
5744
 
        ])
5745
 
    AC_SUBST(PERL)
5746
 
])
5747
 
 
5748
 
AC_DEFUN([KDE_CHECK_LARGEFILE],
5749
 
[
5750
 
AC_SYS_LARGEFILE
5751
 
if test "$ac_cv_sys_file_offset_bits" != no; then
5752
 
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5753
 
fi
5754
 
 
5755
 
if test "x$ac_cv_sys_large_files" != "xno"; then
5756
 
  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5757
 
fi
5758
 
 
5759
 
])
5760
 
 
5761
 
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
5762
 
dnl which allows to search for libs that get installed into the KDE prefix.
5763
 
dnl
5764
 
dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
5765
 
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
5766
 
dnl also defines KSTUFF_PKG_ERRORS on error
5767
 
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5768
 
 
5769
 
   PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5770
 
   if test "$prefix" != "$kde_libs_prefix"; then
5771
 
       PKG_CONFIG_PATH="$kde_libs_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5772
 
   fi
5773
 
   export PKG_CONFIG_PATH
5774
 
   PKG_CHECK_MODULES($1,$2,$3,$4)
5775
 
])
5776
 
 
5777
 
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5778
 
 
5779
 
# serial 47 AC_PROG_LIBTOOL
5780
 
 
5781
 
 
5782
 
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5783
 
# -----------------------------------------------------------
5784
 
# If this macro is not defined by Autoconf, define it here.
5785
 
m4_ifdef([AC_PROVIDE_IFELSE],
5786
 
         [],
5787
 
         [m4_define([AC_PROVIDE_IFELSE],
5788
 
                 [m4_ifdef([AC_PROVIDE_$1],
5789
 
                           [$2], [$3])])])
5790
 
 
5791
 
 
5792
 
# AC_PROG_LIBTOOL
5793
 
# ---------------
5794
 
AC_DEFUN([AC_PROG_LIBTOOL],
5795
 
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5796
 
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5797
 
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5798
 
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
5799
 
    [AC_LIBTOOL_CXX],
5800
 
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5801
 
  ])])
5802
 
dnl And a similar setup for Fortran 77 support
5803
 
  AC_PROVIDE_IFELSE([AC_PROG_F77],
5804
 
    [AC_LIBTOOL_F77],
5805
 
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5806
 
])])
5807
 
 
5808
 
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5809
 
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5810
 
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5811
 
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5812
 
    [AC_LIBTOOL_GCJ],
5813
 
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5814
 
      [AC_LIBTOOL_GCJ],
5815
 
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5816
 
        [AC_LIBTOOL_GCJ],
5817
 
      [ifdef([AC_PROG_GCJ],
5818
 
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5819
 
       ifdef([A][M_PROG_GCJ],
5820
 
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5821
 
       ifdef([LT_AC_PROG_GCJ],
5822
 
             [define([LT_AC_PROG_GCJ],
5823
 
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5824
 
])])# AC_PROG_LIBTOOL
5825
 
 
5826
 
 
5827
 
# _AC_PROG_LIBTOOL
5828
 
# ----------------
5829
 
AC_DEFUN([_AC_PROG_LIBTOOL],
5830
 
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5831
 
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5832
 
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
5833
 
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5834
 
 
5835
 
# This can be used to rebuild libtool when needed
5836
 
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5837
 
 
5838
 
# Always use our own libtool.
5839
 
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5840
 
AC_SUBST(LIBTOOL)dnl
5841
 
 
5842
 
# Prevent multiple expansion
5843
 
define([AC_PROG_LIBTOOL], [])
5844
 
])# _AC_PROG_LIBTOOL
5845
 
 
5846
 
 
5847
 
# AC_LIBTOOL_SETUP
5848
 
# ----------------
5849
 
AC_DEFUN([AC_LIBTOOL_SETUP],
5850
 
[AC_PREREQ(2.50)dnl
5851
 
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5852
 
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5853
 
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5854
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5855
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5856
 
AC_REQUIRE([AC_PROG_CC])dnl
5857
 
AC_REQUIRE([AC_PROG_LD])dnl
5858
 
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5859
 
AC_REQUIRE([AC_PROG_NM])dnl
5860
 
 
5861
 
AC_REQUIRE([AC_PROG_LN_S])dnl
5862
 
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5863
 
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5864
 
AC_REQUIRE([AC_OBJEXT])dnl
5865
 
AC_REQUIRE([AC_EXEEXT])dnl
5866
 
dnl
5867
 
 
5868
 
AC_LIBTOOL_SYS_MAX_CMD_LEN
5869
 
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5870
 
AC_LIBTOOL_OBJDIR
5871
 
 
5872
 
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5873
 
_LT_AC_PROG_ECHO_BACKSLASH
5874
 
 
5875
 
case $host_os in
5876
 
aix3*)
5877
 
  # AIX sometimes has problems with the GCC collect2 program.  For some
5878
 
  # reason, if we set the COLLECT_NAMES environment variable, the problems
5879
 
  # vanish in a puff of smoke.
5880
 
  if test "X${COLLECT_NAMES+set}" != Xset; then
5881
 
    COLLECT_NAMES=
5882
 
    export COLLECT_NAMES
5883
 
  fi
5884
 
  ;;
5885
 
esac
5886
 
 
5887
 
# Sed substitution that helps us do robust quoting.  It backslashifies
5888
 
# metacharacters that are still active within double-quoted strings.
5889
 
Xsed='sed -e s/^X//'
5890
 
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5891
 
 
5892
 
# Same as above, but do not quote variable references.
5893
 
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5894
 
 
5895
 
# Sed substitution to delay expansion of an escaped shell variable in a
5896
 
# double_quote_subst'ed string.
5897
 
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5898
 
 
5899
 
# Sed substitution to avoid accidental globbing in evaled expressions
5900
 
no_glob_subst='s/\*/\\\*/g'
5901
 
 
5902
 
# Constants:
5903
 
rm="rm -f"
5904
 
 
5905
 
# Global variables:
5906
 
default_ofile=libtool
5907
 
can_build_shared=yes
5908
 
 
5909
 
# All known linkers require a `.a' archive for static linking (except M$VC,
5910
 
# which needs '.lib').
5911
 
libext=a
5912
 
ltmain="$ac_aux_dir/ltmain.sh"
5913
 
ofile="$default_ofile"
5914
 
with_gnu_ld="$lt_cv_prog_gnu_ld"
5915
 
 
5916
 
AC_CHECK_TOOL(AR, ar, false)
5917
 
AC_CHECK_TOOL(RANLIB, ranlib, :)
5918
 
AC_CHECK_TOOL(STRIP, strip, :)
5919
 
 
5920
 
old_CC="$CC"
5921
 
old_CFLAGS="$CFLAGS"
5922
 
 
5923
 
# Set sane defaults for various variables
5924
 
test -z "$AR" && AR=ar
5925
 
test -z "$AR_FLAGS" && AR_FLAGS=cru
5926
 
test -z "$AS" && AS=as
5927
 
test -z "$CC" && CC=cc
5928
 
test -z "$LTCC" && LTCC=$CC
5929
 
test -z "$DLLTOOL" && DLLTOOL=dlltool
5930
 
test -z "$LD" && LD=ld
5931
 
test -z "$LN_S" && LN_S="ln -s"
5932
 
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5933
 
test -z "$NM" && NM=nm
5934
 
test -z "$SED" && SED=sed
5935
 
test -z "$OBJDUMP" && OBJDUMP=objdump
5936
 
test -z "$RANLIB" && RANLIB=:
5937
 
test -z "$STRIP" && STRIP=:
5938
 
test -z "$ac_objext" && ac_objext=o
5939
 
 
5940
 
# Determine commands to create old-style static archives.
5941
 
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5942
 
old_postinstall_cmds='chmod 644 $oldlib'
5943
 
old_postuninstall_cmds=
5944
 
 
5945
 
if test -n "$RANLIB"; then
5946
 
  case $host_os in
5947
 
  openbsd*)
5948
 
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5949
 
    ;;
5950
 
  *)
5951
 
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5952
 
    ;;
5953
 
  esac
5954
 
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5955
 
fi
5956
 
 
5957
 
# Only perform the check for file, if the check method requires it
5958
 
case $deplibs_check_method in
5959
 
file_magic*)
5960
 
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5961
 
    AC_PATH_MAGIC
5962
 
  fi
5963
 
  ;;
5964
 
esac
5965
 
 
5966
 
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5967
 
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5968
 
enable_win32_dll=yes, enable_win32_dll=no)
5969
 
 
5970
 
AC_ARG_ENABLE([libtool-lock],
5971
 
    [AC_HELP_STRING([--disable-libtool-lock],
5972
 
        [avoid locking (might break parallel builds)])])
5973
 
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5974
 
 
5975
 
AC_ARG_WITH([pic],
5976
 
    [AC_HELP_STRING([--with-pic],
5977
 
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5978
 
    [pic_mode="$withval"],
5979
 
    [pic_mode=default])
5980
 
test -z "$pic_mode" && pic_mode=default
5981
 
 
5982
 
# Use C for the default configuration in the libtool script
5983
 
tagname=
5984
 
AC_LIBTOOL_LANG_C_CONFIG
5985
 
_LT_AC_TAGCONFIG
5986
 
])# AC_LIBTOOL_SETUP
5987
 
 
5988
 
 
5989
 
# _LT_AC_SYS_COMPILER
5990
 
# -------------------
5991
 
AC_DEFUN([_LT_AC_SYS_COMPILER],
5992
 
[AC_REQUIRE([AC_PROG_CC])dnl
5993
 
 
5994
 
# If no C compiler was specified, use CC.
5995
 
LTCC=${LTCC-"$CC"}
5996
 
 
5997
 
# Allow CC to be a program name with arguments.
5998
 
compiler=$CC
5999
 
])# _LT_AC_SYS_COMPILER
6000
 
 
6001
 
 
6002
 
# _LT_AC_SYS_LIBPATH_AIX
6003
 
# ----------------------
6004
 
# Links a minimal program and checks the executable
6005
 
# for the system default hardcoded library path. In most cases,
6006
 
# this is /usr/lib:/lib, but when the MPI compilers are used
6007
 
# the location of the communication and MPI libs are included too.
6008
 
# If we don't find anything, use the default library path according
6009
 
# to the aix ld manual.
6010
 
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
6011
 
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6012
 
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
6013
 
}'`
6014
 
# Check for a 64-bit object if we didn't find anything.
6015
 
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; }
6016
 
}'`; fi],[])
6017
 
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6018
 
])# _LT_AC_SYS_LIBPATH_AIX
6019
 
 
6020
 
 
6021
 
# _LT_AC_SHELL_INIT(ARG)
6022
 
# ----------------------
6023
 
AC_DEFUN([_LT_AC_SHELL_INIT],
6024
 
[ifdef([AC_DIVERSION_NOTICE],
6025
 
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6026
 
         [AC_DIVERT_PUSH(NOTICE)])
6027
 
$1
6028
 
AC_DIVERT_POP
6029
 
])# _LT_AC_SHELL_INIT
6030
 
 
6031
 
 
6032
 
# _LT_AC_PROG_ECHO_BACKSLASH
6033
 
# --------------------------
6034
 
# Add some code to the start of the generated configure script which
6035
 
# will find an echo command which doesn't interpret backslashes.
6036
 
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
6037
 
[_LT_AC_SHELL_INIT([
6038
 
# Check that we are running under the correct shell.
6039
 
SHELL=${CONFIG_SHELL-/bin/sh}
6040
 
 
6041
 
case X$ECHO in
6042
 
X*--fallback-echo)
6043
 
  # Remove one level of quotation (which was required for Make).
6044
 
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6045
 
  ;;
6046
 
esac
6047
 
 
6048
 
echo=${ECHO-echo}
6049
 
if test "X[$]1" = X--no-reexec; then
6050
 
  # Discard the --no-reexec flag, and continue.
6051
 
  shift
6052
 
elif test "X[$]1" = X--fallback-echo; then
6053
 
  # Avoid inline document here, it may be left over
6054
 
  :
6055
 
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
6056
 
  # Yippee, $echo works!
6057
 
  :
6058
 
else
6059
 
  # Restart under the correct shell.
6060
 
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6061
 
fi
6062
 
 
6063
 
if test "X[$]1" = X--fallback-echo; then
6064
 
  # used as fallback echo
6065
 
  shift
6066
 
  cat <<EOF
6067
 
[$]*
6068
 
EOF
6069
 
  exit 0
6070
 
fi
6071
 
 
6072
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
6073
 
# if CDPATH is set.
6074
 
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6075
 
 
6076
 
if test -z "$ECHO"; then
6077
 
if test "X${echo_test_string+set}" != Xset; then
6078
 
# find a string as large as possible, as long as the shell can cope with it
6079
 
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6080
 
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6081
 
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
6082
 
       echo_test_string="`eval $cmd`" &&
6083
 
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6084
 
    then
6085
 
      break
6086
 
    fi
6087
 
  done
6088
 
fi
6089
 
 
6090
 
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6091
 
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6092
 
   test "X$echo_testing_string" = "X$echo_test_string"; then
6093
 
  :
6094
 
else
6095
 
  # The Solaris, AIX, and Digital Unix default echo programs unquote
6096
 
  # backslashes.  This makes it impossible to quote backslashes using
6097
 
  #   echo "$something" | sed 's/\\/\\\\/g'
6098
 
  #
6099
 
  # So, first we look for a working echo in the user's PATH.
6100
 
 
6101
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6102
 
  for dir in $PATH /usr/ucb; do
6103
 
    IFS="$lt_save_ifs"
6104
 
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6105
 
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6106
 
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6107
 
       test "X$echo_testing_string" = "X$echo_test_string"; then
6108
 
      echo="$dir/echo"
6109
 
      break
6110
 
    fi
6111
 
  done
6112
 
  IFS="$lt_save_ifs"
6113
 
 
6114
 
  if test "X$echo" = Xecho; then
6115
 
    # We didn't find a better echo, so look for alternatives.
6116
 
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6117
 
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6118
 
       test "X$echo_testing_string" = "X$echo_test_string"; then
6119
 
      # This shell has a builtin print -r that does the trick.
6120
 
      echo='print -r'
6121
 
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6122
 
         test "X$CONFIG_SHELL" != X/bin/ksh; then
6123
 
      # If we have ksh, try running configure again with it.
6124
 
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6125
 
      export ORIGINAL_CONFIG_SHELL
6126
 
      CONFIG_SHELL=/bin/ksh
6127
 
      export CONFIG_SHELL
6128
 
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6129
 
    else
6130
 
      # Try using printf.
6131
 
      echo='printf %s\n'
6132
 
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6133
 
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6134
 
         test "X$echo_testing_string" = "X$echo_test_string"; then
6135
 
        # Cool, printf works
6136
 
        :
6137
 
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6138
 
           test "X$echo_testing_string" = 'X\t' &&
6139
 
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6140
 
           test "X$echo_testing_string" = "X$echo_test_string"; then
6141
 
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6142
 
        export CONFIG_SHELL
6143
 
        SHELL="$CONFIG_SHELL"
6144
 
        export SHELL
6145
 
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
6146
 
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6147
 
           test "X$echo_testing_string" = 'X\t' &&
6148
 
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6149
 
           test "X$echo_testing_string" = "X$echo_test_string"; then
6150
 
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
6151
 
      else
6152
 
        # maybe with a smaller string...
6153
 
        prev=:
6154
 
 
6155
 
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6156
 
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6157
 
          then
6158
 
            break
6159
 
          fi
6160
 
          prev="$cmd"
6161
 
        done
6162
 
 
6163
 
        if test "$prev" != 'sed 50q "[$]0"'; then
6164
 
          echo_test_string=`eval $prev`
6165
 
          export echo_test_string
6166
 
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6167
 
        else
6168
 
          # Oops.  We lost completely, so just stick with echo.
6169
 
          echo=echo
6170
 
        fi
6171
 
      fi
6172
 
    fi
6173
 
  fi
6174
 
fi
6175
 
fi
6176
 
 
6177
 
# Copy echo and quote the copy suitably for passing to libtool from
6178
 
# the Makefile, instead of quoting the original, which is used later.
6179
 
ECHO=$echo
6180
 
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6181
 
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6182
 
fi
6183
 
 
6184
 
AC_SUBST(ECHO)
6185
 
])])# _LT_AC_PROG_ECHO_BACKSLASH
6186
 
 
6187
 
 
6188
 
# _LT_AC_LOCK
6189
 
# -----------
6190
 
AC_DEFUN([_LT_AC_LOCK],
6191
 
[AC_ARG_ENABLE([libtool-lock],
6192
 
    [AC_HELP_STRING([--disable-libtool-lock],
6193
 
        [avoid locking (might break parallel builds)])])
6194
 
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6195
 
 
6196
 
# Some flags need to be propagated to the compiler or linker for good
6197
 
# libtool support.
6198
 
case $host in
6199
 
ia64-*-hpux*)
6200
 
  # Find out which ABI we are using.
6201
 
  echo 'int i;' > conftest.$ac_ext
6202
 
  if AC_TRY_EVAL(ac_compile); then
6203
 
    case `/usr/bin/file conftest.$ac_objext` in
6204
 
    *ELF-32*)
6205
 
      HPUX_IA64_MODE="32"
6206
 
      ;;
6207
 
    *ELF-64*)
6208
 
      HPUX_IA64_MODE="64"
6209
 
      ;;
6210
 
    esac
6211
 
  fi
6212
 
  rm -rf conftest*
6213
 
  ;;
6214
 
*-*-irix6*)
6215
 
  # Find out which ABI we are using.
6216
 
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6217
 
  if AC_TRY_EVAL(ac_compile); then
6218
 
   if test "$lt_cv_prog_gnu_ld" = yes; then
6219
 
    case `/usr/bin/file conftest.$ac_objext` in
6220
 
    *32-bit*)
6221
 
      LD="${LD-ld} -melf32bsmip"
6222
 
      ;;
6223
 
    *N32*)
6224
 
      LD="${LD-ld} -melf32bmipn32"
6225
 
      ;;
6226
 
    *64-bit*)
6227
 
      LD="${LD-ld} -melf64bmip"
6228
 
      ;;
6229
 
    esac
6230
 
   else
6231
 
    case `/usr/bin/file conftest.$ac_objext` in
6232
 
    *32-bit*)
6233
 
      LD="${LD-ld} -32"
6234
 
      ;;
6235
 
    *N32*)
6236
 
      LD="${LD-ld} -n32"
6237
 
      ;;
6238
 
    *64-bit*)
6239
 
      LD="${LD-ld} -64"
6240
 
      ;;
6241
 
    esac
6242
 
   fi
6243
 
  fi
6244
 
  rm -rf conftest*
6245
 
  ;;
6246
 
 
6247
 
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6248
 
  # Find out which ABI we are using.
6249
 
  echo 'int i;' > conftest.$ac_ext
6250
 
  if AC_TRY_EVAL(ac_compile); then
6251
 
    case "`/usr/bin/file conftest.o`" in
6252
 
    *32-bit*)
6253
 
      LINUX_64_MODE="32"
6254
 
      case $host in
6255
 
        x86_64-*linux*)
6256
 
          LD="${LD-ld} -m elf_i386"
6257
 
          ;;
6258
 
        ppc64-*linux*)
6259
 
          LD="${LD-ld} -m elf32ppclinux"
6260
 
          ;;
6261
 
        s390x-*linux*)
6262
 
          LD="${LD-ld} -m elf_s390"
6263
 
          ;;
6264
 
        sparc64-*linux*)
6265
 
          LD="${LD-ld} -m elf32_sparc"
6266
 
          ;;
6267
 
      esac
6268
 
      ;;
6269
 
    *64-bit*)
6270
 
      LINUX_64_MODE="64"
6271
 
      case $host in
6272
 
        x86_64-*linux*)
6273
 
          LD="${LD-ld} -m elf_x86_64"
6274
 
          ;;
6275
 
        ppc*-*linux*|powerpc*-*linux*)
6276
 
          LD="${LD-ld} -m elf64ppc"
6277
 
          ;;
6278
 
        s390*-*linux*)
6279
 
          LD="${LD-ld} -m elf64_s390"
6280
 
          ;;
6281
 
        sparc*-*linux*)
6282
 
          LD="${LD-ld} -m elf64_sparc"
6283
 
          ;;
6284
 
      esac
6285
 
      ;;
6286
 
    esac
6287
 
  fi
6288
 
  rm -rf conftest*
6289
 
  ;;
6290
 
 
6291
 
*-*-sco3.2v5*)
6292
 
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6293
 
  SAVE_CFLAGS="$CFLAGS"
6294
 
  CFLAGS="$CFLAGS -belf"
6295
 
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6296
 
    [AC_LANG_PUSH(C)
6297
 
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6298
 
     AC_LANG_POP])
6299
 
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6300
 
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6301
 
    CFLAGS="$SAVE_CFLAGS"
6302
 
  fi
6303
 
  ;;
6304
 
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6305
 
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6306
 
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6307
 
  AC_CHECK_TOOL(AS, as, false)
6308
 
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
6309
 
  ;;
6310
 
  ])
6311
 
esac
6312
 
 
6313
 
need_locks="$enable_libtool_lock"
6314
 
 
6315
 
])# _LT_AC_LOCK
6316
 
 
6317
 
 
6318
 
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6319
 
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6320
 
# ----------------------------------------------------------------
6321
 
# Check whether the given compiler option works
6322
 
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6323
 
[AC_REQUIRE([LT_AC_PROG_SED])
6324
 
AC_CACHE_CHECK([$1], [$2],
6325
 
  [$2=no
6326
 
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6327
 
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6328
 
   lt_compiler_flag="$3"
6329
 
   # Insert the option either (1) after the last *FLAGS variable, or
6330
 
   # (2) before a word containing "conftest.", or (3) at the end.
6331
 
   # Note that $ac_compile itself does not contain backslashes and begins
6332
 
   # with a dollar sign (not a hyphen), so the echo should work correctly.
6333
 
   # The option is referenced via a variable to avoid confusing sed.
6334
 
   lt_compile=`echo "$ac_compile" | $SED \
6335
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6336
 
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6337
 
   -e 's:$: $lt_compiler_flag:'`
6338
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6339
 
   (eval "$lt_compile" 2>conftest.err)
6340
 
   ac_status=$?
6341
 
   cat conftest.err >&AS_MESSAGE_LOG_FD
6342
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6343
 
   if (exit $ac_status) && test -s "$ac_outfile"; then
6344
 
     # The compiler can only warn and ignore the option if not recognized
6345
 
     # So say no if there are warnings
6346
 
     if test ! -s conftest.err; then
6347
 
       $2=yes
6348
 
     fi
6349
 
   fi
6350
 
   $rm conftest*
6351
 
])
6352
 
 
6353
 
if test x"[$]$2" = xyes; then
6354
 
    ifelse([$5], , :, [$5])
6355
 
else
6356
 
    ifelse([$6], , :, [$6])
6357
 
fi
6358
 
])# AC_LIBTOOL_COMPILER_OPTION
6359
 
 
6360
 
 
6361
 
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6362
 
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
6363
 
# ------------------------------------------------------------
6364
 
# Check whether the given compiler option works
6365
 
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6366
 
[AC_CACHE_CHECK([$1], [$2],
6367
 
  [$2=no
6368
 
   save_LDFLAGS="$LDFLAGS"
6369
 
   LDFLAGS="$LDFLAGS $3"
6370
 
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
6371
 
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6372
 
     # The compiler can only warn and ignore the option if not recognized
6373
 
     # So say no if there are warnings
6374
 
     if test -s conftest.err; then
6375
 
       # Append any errors to the config.log.
6376
 
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
6377
 
     else
6378
 
       $2=yes
6379
 
     fi
6380
 
   fi
6381
 
   $rm conftest*
6382
 
   LDFLAGS="$save_LDFLAGS"
6383
 
])
6384
 
 
6385
 
if test x"[$]$2" = xyes; then
6386
 
    ifelse([$4], , :, [$4])
6387
 
else
6388
 
    ifelse([$5], , :, [$5])
6389
 
fi
6390
 
])# AC_LIBTOOL_LINKER_OPTION
6391
 
 
6392
 
 
6393
 
# AC_LIBTOOL_SYS_MAX_CMD_LEN
6394
 
# --------------------------
6395
 
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6396
 
[# find the maximum length of command line arguments
6397
 
AC_MSG_CHECKING([the maximum length of command line arguments])
6398
 
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6399
 
  i=0
6400
 
  testring="ABCD"
6401
 
 
6402
 
  case $build_os in
6403
 
  msdosdjgpp*)
6404
 
    # On DJGPP, this test can blow up pretty badly due to problems in libc
6405
 
    # (any single argument exceeding 2000 bytes causes a buffer overrun
6406
 
    # during glob expansion).  Even if it were fixed, the result of this
6407
 
    # check would be larger than it should be.
6408
 
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6409
 
    ;;
6410
 
 
6411
 
  gnu*)
6412
 
    # Under GNU Hurd, this test is not required because there is
6413
 
    # no limit to the length of command line arguments.
6414
 
    # Libtool will interpret -1 as no limit whatsoever
6415
 
    lt_cv_sys_max_cmd_len=-1;
6416
 
    ;;
6417
 
 
6418
 
  cygwin* | mingw*)
6419
 
    # On Win9x/ME, this test blows up -- it succeeds, but takes
6420
 
    # about 5 minutes as the teststring grows exponentially.
6421
 
    # Worse, since 9x/ME are not pre-emptively multitasking,
6422
 
    # you end up with a "frozen" computer, even though with patience
6423
 
    # the test eventually succeeds (with a max line length of 256k).
6424
 
    # Instead, let's just punt: use the minimum linelength reported by
6425
 
    # all of the supported platforms: 8192 (on NT/2K/XP).
6426
 
    lt_cv_sys_max_cmd_len=8192;
6427
 
    ;;
6428
 
 
6429
 
 *)
6430
 
    # If test is not a shell built-in, we'll probably end up computing a
6431
 
    # maximum length that is only half of the actual maximum length, but
6432
 
    # we can't tell.
6433
 
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6434
 
               = "XX$testring") >/dev/null 2>&1 &&
6435
 
            new_result=`expr "X$testring" : ".*" 2>&1` &&
6436
 
            lt_cv_sys_max_cmd_len=$new_result &&
6437
 
            test $i != 17 # 1/2 MB should be enough
6438
 
    do
6439
 
      i=`expr $i + 1`
6440
 
      testring=$testring$testring
6441
 
    done
6442
 
    testring=
6443
 
    # Add a significant safety factor because C++ compilers can tack on massive
6444
 
    # amounts of additional arguments before passing them to the linker.
6445
 
    # It appears as though 1/2 is a usable value.
6446
 
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6447
 
    ;;
6448
 
  esac
6449
 
])
6450
 
if test -n $lt_cv_sys_max_cmd_len ; then
6451
 
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6452
 
else
6453
 
  AC_MSG_RESULT(none)
6454
 
fi
6455
 
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6456
 
 
6457
 
 
6458
 
# _LT_AC_CHECK_DLFCN
6459
 
# --------------------
6460
 
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6461
 
[AC_CHECK_HEADERS(dlfcn.h)dnl
6462
 
])# _LT_AC_CHECK_DLFCN
6463
 
 
6464
 
 
6465
 
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6466
 
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6467
 
# ------------------------------------------------------------------
6468
 
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6469
 
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6470
 
if test "$cross_compiling" = yes; then :
6471
 
  [$4]
6472
 
else
6473
 
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6474
 
  lt_status=$lt_dlunknown
6475
 
  cat > conftest.$ac_ext <<EOF
6476
 
[#line __oline__ "configure"
6477
 
#include "confdefs.h"
6478
 
 
6479
 
#if HAVE_DLFCN_H
6480
 
#include <dlfcn.h>
6481
 
#endif
6482
 
 
6483
 
#include <stdio.h>
6484
 
 
6485
 
#ifdef RTLD_GLOBAL
6486
 
#  define LT_DLGLOBAL           RTLD_GLOBAL
6487
 
#else
6488
 
#  ifdef DL_GLOBAL
6489
 
#    define LT_DLGLOBAL         DL_GLOBAL
6490
 
#  else
6491
 
#    define LT_DLGLOBAL         0
6492
 
#  endif
6493
 
#endif
6494
 
 
6495
 
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6496
 
   find out it does not work in some platform. */
6497
 
#ifndef LT_DLLAZY_OR_NOW
6498
 
#  ifdef RTLD_LAZY
6499
 
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6500
 
#  else
6501
 
#    ifdef DL_LAZY
6502
 
#      define LT_DLLAZY_OR_NOW          DL_LAZY
6503
 
#    else
6504
 
#      ifdef RTLD_NOW
6505
 
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
6506
 
#      else
6507
 
#        ifdef DL_NOW
6508
 
#          define LT_DLLAZY_OR_NOW      DL_NOW
6509
 
#        else
6510
 
#          define LT_DLLAZY_OR_NOW      0
6511
 
#        endif
6512
 
#      endif
6513
 
#    endif
6514
 
#  endif
6515
 
#endif
6516
 
 
6517
 
#ifdef __cplusplus
6518
 
extern "C" void exit (int);
6519
 
#endif
6520
 
 
6521
 
void fnord() { int i=42;}
6522
 
int main ()
6523
 
{
6524
 
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6525
 
  int status = $lt_dlunknown;
6526
 
 
6527
 
  if (self)
6528
 
    {
6529
 
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6530
 
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6531
 
      /* dlclose (self); */
6532
 
    }
6533
 
 
6534
 
    exit (status);
6535
 
}]
6536
 
EOF
6537
 
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6538
 
    (./conftest; exit; ) 2>/dev/null
6539
 
    lt_status=$?
6540
 
    case x$lt_status in
6541
 
      x$lt_dlno_uscore) $1 ;;
6542
 
      x$lt_dlneed_uscore) $2 ;;
6543
 
      x$lt_unknown|x*) $3 ;;
6544
 
    esac
6545
 
  else :
6546
 
    # compilation failed
6547
 
    $3
6548
 
  fi
6549
 
fi
6550
 
rm -fr conftest*
6551
 
])# _LT_AC_TRY_DLOPEN_SELF
6552
 
 
6553
 
 
6554
 
# AC_LIBTOOL_DLOPEN_SELF
6555
 
# -------------------
6556
 
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6557
 
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6558
 
if test "x$enable_dlopen" != xyes; then
6559
 
  enable_dlopen=unknown
6560
 
  enable_dlopen_self=unknown
6561
 
  enable_dlopen_self_static=unknown
6562
 
else
6563
 
  lt_cv_dlopen=no
6564
 
  lt_cv_dlopen_libs=
6565
 
 
6566
 
  case $host_os in
6567
 
  beos*)
6568
 
    lt_cv_dlopen="load_add_on"
6569
 
    lt_cv_dlopen_libs=
6570
 
    lt_cv_dlopen_self=yes
6571
 
    ;;
6572
 
 
6573
 
  mingw* | pw32*)
6574
 
    lt_cv_dlopen="LoadLibrary"
6575
 
    lt_cv_dlopen_libs=
6576
 
   ;;
6577
 
 
6578
 
  cygwin*)
6579
 
    lt_cv_dlopen="dlopen"
6580
 
    lt_cv_dlopen_libs=
6581
 
   ;;
6582
 
 
6583
 
  darwin*)
6584
 
  # if libdl is installed we need to link against it
6585
 
    AC_CHECK_LIB([dl], [dlopen],
6586
 
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6587
 
    lt_cv_dlopen="dyld"
6588
 
    lt_cv_dlopen_libs=
6589
 
    lt_cv_dlopen_self=yes
6590
 
    ])
6591
 
   ;;
6592
 
    
6593
 
  *)
6594
 
    AC_CHECK_FUNC([shl_load],
6595
 
          [lt_cv_dlopen="shl_load"],
6596
 
      [AC_CHECK_LIB([dld], [shl_load],
6597
 
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6598
 
        [AC_CHECK_FUNC([dlopen],
6599
 
              [lt_cv_dlopen="dlopen"],
6600
 
          [AC_CHECK_LIB([dl], [dlopen],
6601
 
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6602
 
            [AC_CHECK_LIB([svld], [dlopen],
6603
 
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6604
 
              [AC_CHECK_LIB([dld], [dld_link],
6605
 
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6606
 
              ])
6607
 
            ])
6608
 
          ])
6609
 
        ])
6610
 
      ])
6611
 
    ;;
6612
 
  esac
6613
 
 
6614
 
  if test "x$lt_cv_dlopen" != xno; then
6615
 
    enable_dlopen=yes
6616
 
  else
6617
 
    enable_dlopen=no
6618
 
  fi
6619
 
 
6620
 
  case $lt_cv_dlopen in
6621
 
  dlopen)
6622
 
    save_CPPFLAGS="$CPPFLAGS"
6623
 
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6624
 
 
6625
 
    save_LDFLAGS="$LDFLAGS"
6626
 
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6627
 
 
6628
 
    save_LIBS="$LIBS"
6629
 
    LIBS="$lt_cv_dlopen_libs $LIBS"
6630
 
 
6631
 
    AC_CACHE_CHECK([whether a program can dlopen itself],
6632
 
          lt_cv_dlopen_self, [dnl
6633
 
          _LT_AC_TRY_DLOPEN_SELF(
6634
 
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6635
 
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6636
 
    ])
6637
 
 
6638
 
    if test "x$lt_cv_dlopen_self" = xyes; then
6639
 
      LDFLAGS="$LDFLAGS $link_static_flag"
6640
 
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6641
 
          lt_cv_dlopen_self_static, [dnl
6642
 
          _LT_AC_TRY_DLOPEN_SELF(
6643
 
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6644
 
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
6645
 
      ])
6646
 
    fi
6647
 
 
6648
 
    CPPFLAGS="$save_CPPFLAGS"
6649
 
    LDFLAGS="$save_LDFLAGS"
6650
 
    LIBS="$save_LIBS"
6651
 
    ;;
6652
 
  esac
6653
 
 
6654
 
  case $lt_cv_dlopen_self in
6655
 
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6656
 
  *) enable_dlopen_self=unknown ;;
6657
 
  esac
6658
 
 
6659
 
  case $lt_cv_dlopen_self_static in
6660
 
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6661
 
  *) enable_dlopen_self_static=unknown ;;
6662
 
  esac
6663
 
fi
6664
 
])# AC_LIBTOOL_DLOPEN_SELF
6665
 
 
6666
 
 
6667
 
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6668
 
# ---------------------------------
6669
 
# Check to see if options -c and -o are simultaneously supported by compiler
6670
 
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6671
 
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6672
 
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6673
 
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6674
 
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6675
 
   $rm -r conftest 2>/dev/null
6676
 
   mkdir conftest
6677
 
   cd conftest
6678
 
   mkdir out
6679
 
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6680
 
 
6681
 
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6682
 
   # that will create temporary files in the current directory regardless of
6683
 
   # the output directory.  Thus, making CWD read-only will cause this test
6684
 
   # to fail, enabling locking or at least warning the user not to do parallel
6685
 
   # builds.
6686
 
   chmod -w .
6687
 
 
6688
 
   lt_compiler_flag="-o out/conftest2.$ac_objext"
6689
 
   # Insert the option either (1) after the last *FLAGS variable, or
6690
 
   # (2) before a word containing "conftest.", or (3) at the end.
6691
 
   # Note that $ac_compile itself does not contain backslashes and begins
6692
 
   # with a dollar sign (not a hyphen), so the echo should work correctly.
6693
 
   lt_compile=`echo "$ac_compile" | $SED \
6694
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6695
 
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6696
 
   -e 's:$: $lt_compiler_flag:'`
6697
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6698
 
   (eval "$lt_compile" 2>out/conftest.err)
6699
 
   ac_status=$?
6700
 
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
6701
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6702
 
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
6703
 
   then
6704
 
     # The compiler can only warn and ignore the option if not recognized
6705
 
     # So say no if there are warnings
6706
 
     if test ! -s out/conftest.err; then
6707
 
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6708
 
     fi
6709
 
   fi
6710
 
   chmod u+w .
6711
 
   $rm conftest* out/*
6712
 
   rmdir out
6713
 
   cd ..
6714
 
   rmdir conftest
6715
 
   $rm conftest*
6716
 
])
6717
 
])# AC_LIBTOOL_PROG_CC_C_O
6718
 
 
6719
 
 
6720
 
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6721
 
# -----------------------------------------
6722
 
# Check to see if we can do hard links to lock some files if needed
6723
 
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6724
 
[AC_REQUIRE([_LT_AC_LOCK])dnl
6725
 
 
6726
 
hard_links="nottested"
6727
 
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6728
 
  # do not overwrite the value of need_locks provided by the user
6729
 
  AC_MSG_CHECKING([if we can lock with hard links])
6730
 
  hard_links=yes
6731
 
  $rm conftest*
6732
 
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6733
 
  touch conftest.a
6734
 
  ln conftest.a conftest.b 2>&5 || hard_links=no
6735
 
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6736
 
  AC_MSG_RESULT([$hard_links])
6737
 
  if test "$hard_links" = no; then
6738
 
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6739
 
    need_locks=warn
6740
 
  fi
6741
 
else
6742
 
  need_locks=no
6743
 
fi
6744
 
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6745
 
 
6746
 
 
6747
 
# AC_LIBTOOL_OBJDIR
6748
 
# -----------------
6749
 
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6750
 
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6751
 
[rm -f .libs 2>/dev/null
6752
 
mkdir .libs 2>/dev/null
6753
 
if test -d .libs; then
6754
 
  lt_cv_objdir=.libs
6755
 
else
6756
 
  # MS-DOS does not allow filenames that begin with a dot.
6757
 
  lt_cv_objdir=_libs
6758
 
fi
6759
 
rmdir .libs 2>/dev/null])
6760
 
objdir=$lt_cv_objdir
6761
 
])# AC_LIBTOOL_OBJDIR
6762
 
 
6763
 
 
6764
 
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6765
 
# ----------------------------------------------
6766
 
# Check hardcoding attributes.
6767
 
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6768
 
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6769
 
_LT_AC_TAGVAR(hardcode_action, $1)=
6770
 
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6771
 
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6772
 
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6773
 
 
6774
 
  # We can hardcode non-existant directories.
6775
 
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6776
 
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
6777
 
     # have to relink, otherwise we might link with an installed library
6778
 
     # when we should be linking with a yet-to-be-installed one
6779
 
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6780
 
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6781
 
    # Linking always hardcodes the temporary library directory.
6782
 
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
6783
 
  else
6784
 
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
6785
 
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
6786
 
  fi
6787
 
else
6788
 
  # We cannot hardcode anything, or else we can only hardcode existing
6789
 
  # directories.
6790
 
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6791
 
fi
6792
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6793
 
 
6794
 
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6795
 
  # Fast installation is not supported
6796
 
  enable_fast_install=no
6797
 
elif test "$shlibpath_overrides_runpath" = yes ||
6798
 
     test "$enable_shared" = no; then
6799
 
  # Fast installation is not necessary
6800
 
  enable_fast_install=needless
6801
 
fi
6802
 
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6803
 
 
6804
 
 
6805
 
# AC_LIBTOOL_SYS_LIB_STRIP
6806
 
# ------------------------
6807
 
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6808
 
[striplib=
6809
 
old_striplib=
6810
 
AC_MSG_CHECKING([whether stripping libraries is possible])
6811
 
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6812
 
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6813
 
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6814
 
  AC_MSG_RESULT([yes])
6815
 
else
6816
 
# FIXME - insert some real tests, host_os isn't really good enough
6817
 
  case $host_os in
6818
 
   darwin*)
6819
 
       if test -n "$STRIP" ; then
6820
 
         striplib="$STRIP -x"
6821
 
         AC_MSG_RESULT([yes])
6822
 
       else
6823
 
  AC_MSG_RESULT([no])
6824
 
fi
6825
 
       ;;
6826
 
   *)
6827
 
  AC_MSG_RESULT([no])
6828
 
    ;;
6829
 
  esac  
6830
 
fi
6831
 
])# AC_LIBTOOL_SYS_LIB_STRIP
6832
 
 
6833
 
 
6834
 
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6835
 
# -----------------------------
6836
 
# PORTME Fill in your ld.so characteristics
6837
 
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6838
 
[AC_MSG_CHECKING([dynamic linker characteristics])
6839
 
library_names_spec=
6840
 
libname_spec='lib$name'
6841
 
soname_spec=
6842
 
shrext=".so"
6843
 
postinstall_cmds=
6844
 
postuninstall_cmds=
6845
 
finish_cmds=
6846
 
finish_eval=
6847
 
shlibpath_var=
6848
 
shlibpath_overrides_runpath=unknown
6849
 
version_type=none
6850
 
dynamic_linker="$host_os ld.so"
6851
 
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6852
 
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6853
 
need_lib_prefix=unknown
6854
 
hardcode_into_libs=no
6855
 
 
6856
 
# when you set need_version to no, make sure it does not cause -set_version
6857
 
# flags to be left without arguments
6858
 
need_version=unknown
6859
 
 
6860
 
case $host_os in
6861
 
aix3*)
6862
 
  version_type=linux
6863
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6864
 
  shlibpath_var=LIBPATH
6865
 
 
6866
 
  # AIX 3 has no versioning support, so we append a major version to the name.
6867
 
  soname_spec='${libname}${release}${shared_ext}$major'
6868
 
  ;;
6869
 
 
6870
 
aix4* | aix5*)
6871
 
  version_type=linux
6872
 
  need_lib_prefix=no
6873
 
  need_version=no
6874
 
  hardcode_into_libs=yes
6875
 
  if test "$host_cpu" = ia64; then
6876
 
    # AIX 5 supports IA64
6877
 
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
6878
 
    shlibpath_var=LD_LIBRARY_PATH
6879
 
  else
6880
 
    # With GCC up to 2.95.x, collect2 would create an import file
6881
 
    # for dependence libraries.  The import file would start with
6882
 
    # the line `#! .'.  This would cause the generated library to
6883
 
    # depend on `.', always an invalid library.  This was fixed in
6884
 
    # development snapshots of GCC prior to 3.0.
6885
 
    case $host_os in
6886
 
      aix4 | aix4.[[01]] | aix4.[[01]].*)
6887
 
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6888
 
           echo ' yes '
6889
 
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6890
 
        :
6891
 
      else
6892
 
        can_build_shared=no
6893
 
      fi
6894
 
      ;;
6895
 
    esac
6896
 
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6897
 
    # soname into executable. Probably we can add versioning support to
6898
 
    # collect2, so additional links can be useful in future.
6899
 
    if test "$aix_use_runtimelinking" = yes; then
6900
 
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6901
 
      # instead of lib<name>.a to let people know that these are not
6902
 
      # typical AIX shared libraries.
6903
 
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6904
 
    else
6905
 
      # We preserve .a as extension for shared libraries through AIX4.2
6906
 
      # and later when we are not doing run time linking.
6907
 
      library_names_spec='${libname}${release}.a $libname.a'
6908
 
      soname_spec='${libname}${release}${shared_ext}$major'
6909
 
    fi
6910
 
    shlibpath_var=LIBPATH
6911
 
  fi
6912
 
  ;;
6913
 
 
6914
 
amigaos*)
6915
 
  library_names_spec='$libname.ixlibrary $libname.a'
6916
 
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
6917
 
  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'
6918
 
  ;;
6919
 
 
6920
 
beos*)
6921
 
  library_names_spec='${libname}${shared_ext}'
6922
 
  dynamic_linker="$host_os ld.so"
6923
 
  shlibpath_var=LIBRARY_PATH
6924
 
  ;;
6925
 
 
6926
 
bsdi4*)
6927
 
  version_type=linux
6928
 
  need_version=no
6929
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6930
 
  soname_spec='${libname}${release}${shared_ext}$major'
6931
 
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6932
 
  shlibpath_var=LD_LIBRARY_PATH
6933
 
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6934
 
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6935
 
  # the default ld.so.conf also contains /usr/contrib/lib and
6936
 
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6937
 
  # libtool to hard-code these into programs
6938
 
  ;;
6939
 
 
6940
 
cygwin* | mingw* | pw32*)
6941
 
  version_type=windows
6942
 
  shrext=".dll"
6943
 
  need_version=no
6944
 
  need_lib_prefix=no
6945
 
 
6946
 
  case $GCC,$host_os in
6947
 
  yes,cygwin* | yes,mingw* | yes,pw32*)
6948
 
    library_names_spec='$libname.dll.a'
6949
 
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
6950
 
    postinstall_cmds='base_file=`basename \${file}`~
6951
 
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
6952
 
      dldir=$destdir/`dirname \$dlpath`~
6953
 
      test -d \$dldir || mkdir -p \$dldir~
6954
 
      $install_prog $dir/$dlname \$dldir/$dlname'
6955
 
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6956
 
      dlpath=$dir/\$dldll~
6957
 
       $rm \$dlpath'
6958
 
    shlibpath_overrides_runpath=yes
6959
 
 
6960
 
    case $host_os in
6961
 
    cygwin*)
6962
 
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
6963
 
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6964
 
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
6965
 
      ;;
6966
 
    mingw*)
6967
 
      # MinGW DLLs use traditional 'lib' prefix
6968
 
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6969
 
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6970
 
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
6971
 
        # It is most probably a Windows format PATH printed by
6972
 
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
6973
 
        # path with ; separators, and with drive letters. We can handle the
6974
 
        # drive letters (cygwin fileutils understands them), so leave them,
6975
 
        # especially as we might pass files found there to a mingw objdump,
6976
 
        # which wouldn't understand a cygwinified path. Ahh.
6977
 
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6978
 
      else
6979
 
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
6980
 
      fi
6981
 
      ;;
6982
 
    pw32*)
6983
 
      # pw32 DLLs use 'pw' prefix rather than 'lib'
6984
 
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
6985
 
      ;;
6986
 
    esac
6987
 
    ;;
6988
 
 
6989
 
  *)
6990
 
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6991
 
    ;;
6992
 
  esac
6993
 
  dynamic_linker='Win32 ld.exe'
6994
 
  # FIXME: first we should search . and the directory the executable is in
6995
 
  shlibpath_var=PATH
6996
 
  ;;
6997
 
 
6998
 
darwin* | rhapsody*)
6999
 
  dynamic_linker="$host_os dyld"
7000
 
  version_type=darwin
7001
 
  need_lib_prefix=no
7002
 
  need_version=no
7003
 
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
7004
 
  soname_spec='${libname}${release}${major}$shared_ext'
7005
 
  shlibpath_overrides_runpath=yes
7006
 
  shlibpath_var=DYLD_LIBRARY_PATH
7007
 
  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
7008
 
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
7009
 
  if test "$GCC" = yes; then
7010
 
    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"`
7011
 
  else
7012
 
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
7013
 
  fi
7014
 
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
7015
 
  ;;
7016
 
 
7017
 
dgux*)
7018
 
  version_type=linux
7019
 
  need_lib_prefix=no
7020
 
  need_version=no
7021
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
7022
 
  soname_spec='${libname}${release}${shared_ext}$major'
7023
 
  shlibpath_var=LD_LIBRARY_PATH
7024
 
  ;;
7025
 
 
7026
 
freebsd1*)
7027
 
  dynamic_linker=no
7028
 
  ;;
7029
 
 
7030
 
freebsd*-gnu*)
7031
 
  version_type=linux
7032
 
  need_lib_prefix=no
7033
 
  need_version=no
7034
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7035
 
  soname_spec='${libname}${release}${shared_ext}$major'
7036
 
  shlibpath_var=LD_LIBRARY_PATH
7037
 
  shlibpath_overrides_runpath=no
7038
 
  hardcode_into_libs=yes
7039
 
  dynamic_linker='GNU ld.so'
7040
 
  ;;
7041
 
 
7042
 
freebsd*)
7043
 
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
7044
 
  version_type=freebsd-$objformat
7045
 
  case $version_type in
7046
 
    freebsd-elf*)
7047
 
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7048
 
      need_version=no
7049
 
      need_lib_prefix=no
7050
 
      ;;
7051
 
    freebsd-*)
7052
 
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
7053
 
      need_version=yes
7054
 
      ;;
7055
 
  esac
7056
 
  shlibpath_var=LD_LIBRARY_PATH
7057
 
  case $host_os in
7058
 
  freebsd2*)
7059
 
    shlibpath_overrides_runpath=yes
7060
 
    ;;
7061
 
  freebsd3.[01]* | freebsdelf3.[01]*)
7062
 
    shlibpath_overrides_runpath=yes
7063
 
    hardcode_into_libs=yes
7064
 
    ;;
7065
 
  *) # from 3.2 on
7066
 
    shlibpath_overrides_runpath=no
7067
 
    hardcode_into_libs=yes
7068
 
    ;;
7069
 
  esac
7070
 
  ;;
7071
 
 
7072
 
gnu*)
7073
 
  version_type=linux
7074
 
  need_lib_prefix=no
7075
 
  need_version=no
7076
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
7077
 
  soname_spec='${libname}${release}${shared_ext}$major'
7078
 
  shlibpath_var=LD_LIBRARY_PATH
7079
 
  hardcode_into_libs=yes
7080
 
  ;;
7081
 
 
7082
 
hpux9* | hpux10* | hpux11*)
7083
 
  # Give a soname corresponding to the major version so that dld.sl refuses to
7084
 
  # link against other versions.
7085
 
  version_type=sunos
7086
 
  need_lib_prefix=no
7087
 
  need_version=no
7088
 
  case "$host_cpu" in
7089
 
  ia64*)
7090
 
    shrext='.so'
7091
 
    hardcode_into_libs=yes
7092
 
    dynamic_linker="$host_os dld.so"
7093
 
    shlibpath_var=LD_LIBRARY_PATH
7094
 
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7095
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7096
 
    soname_spec='${libname}${release}${shared_ext}$major'
7097
 
    if test "X$HPUX_IA64_MODE" = X32; then
7098
 
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
7099
 
    else
7100
 
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
7101
 
    fi
7102
 
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7103
 
    ;;
7104
 
   hppa*64*)
7105
 
     shrext='.sl'
7106
 
     hardcode_into_libs=yes
7107
 
     dynamic_linker="$host_os dld.sl"
7108
 
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
7109
 
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7110
 
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7111
 
     soname_spec='${libname}${release}${shared_ext}$major'
7112
 
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
7113
 
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7114
 
     ;;
7115
 
   *)
7116
 
    shrext='.sl'
7117
 
    dynamic_linker="$host_os dld.sl"
7118
 
    shlibpath_var=SHLIB_PATH
7119
 
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7120
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7121
 
    soname_spec='${libname}${release}${shared_ext}$major'
7122
 
    ;;
7123
 
  esac
7124
 
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
7125
 
  postinstall_cmds='chmod 555 $lib'
7126
 
  ;;
7127
 
 
7128
 
irix5* | irix6* | nonstopux*)
7129
 
  case $host_os in
7130
 
    nonstopux*) version_type=nonstopux ;;
7131
 
    *)
7132
 
        if test "$lt_cv_prog_gnu_ld" = yes; then
7133
 
                version_type=linux
7134
 
        else
7135
 
                version_type=irix
7136
 
        fi ;;
7137
 
  esac
7138
 
  need_lib_prefix=no
7139
 
  need_version=no
7140
 
  soname_spec='${libname}${release}${shared_ext}$major'
7141
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7142
 
  case $host_os in
7143
 
  irix5* | nonstopux*)
7144
 
    libsuff= shlibsuff=
7145
 
    ;;
7146
 
  *)
7147
 
    case $LD in # libtool.m4 will add one of these switches to LD
7148
 
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7149
 
      libsuff= shlibsuff= libmagic=32-bit;;
7150
 
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7151
 
      libsuff=32 shlibsuff=N32 libmagic=N32;;
7152
 
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7153
 
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
7154
 
    *) libsuff= shlibsuff= libmagic=never-match;;
7155
 
    esac
7156
 
    ;;
7157
 
  esac
7158
 
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7159
 
  shlibpath_overrides_runpath=no
7160
 
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7161
 
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7162
 
  hardcode_into_libs=yes
7163
 
  ;;
7164
 
 
7165
 
# No shared lib support for Linux oldld, aout, or coff.
7166
 
linux*oldld* | linux*aout* | linux*coff*)
7167
 
  dynamic_linker=no
7168
 
  ;;
7169
 
 
7170
 
# This must be Linux ELF.
7171
 
linux*)
7172
 
  version_type=linux
7173
 
  need_lib_prefix=no
7174
 
  need_version=no
7175
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7176
 
  soname_spec='${libname}${release}${shared_ext}$major'
7177
 
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7178
 
  libsuff=
7179
 
  if test "x$LINUX_64_MODE" = x64; then
7180
 
    # Some platforms are per default 64-bit, so there's no /lib64
7181
 
    if test -d /lib64; then
7182
 
      libsuff=64
7183
 
    fi
7184
 
  fi
7185
 
  shlibpath_var=LD_LIBRARY_PATH
7186
 
  shlibpath_overrides_runpath=no
7187
 
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
7188
 
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
7189
 
  # This implies no fast_install, which is unacceptable.
7190
 
  # Some rework will be needed to allow for fast_install
7191
 
  # before this can be enabled.
7192
 
  hardcode_into_libs=yes
7193
 
 
7194
 
  # We used to test for /lib/ld.so.1 and disable shared libraries on
7195
 
  # powerpc, because MkLinux only supported shared libraries with the
7196
 
  # GNU dynamic linker.  Since this was broken with cross compilers,
7197
 
  # most powerpc-linux boxes support dynamic linking these days and
7198
 
  # people can always --disable-shared, the test was removed, and we
7199
 
  # assume the GNU/Linux dynamic linker is in use.
7200
 
  dynamic_linker='GNU/Linux ld.so'
7201
 
  ;;
7202
 
 
7203
 
netbsd*)
7204
 
  version_type=sunos
7205
 
  need_lib_prefix=no
7206
 
  need_version=no
7207
 
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7208
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7209
 
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7210
 
    dynamic_linker='NetBSD (a.out) ld.so'
7211
 
  else
7212
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
7213
 
    soname_spec='${libname}${release}${shared_ext}$major'
7214
 
    dynamic_linker='NetBSD ld.elf_so'
7215
 
  fi
7216
 
  shlibpath_var=LD_LIBRARY_PATH
7217
 
  shlibpath_overrides_runpath=yes
7218
 
  hardcode_into_libs=yes
7219
 
  ;;
7220
 
 
7221
 
newsos6)
7222
 
  version_type=linux
7223
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7224
 
  shlibpath_var=LD_LIBRARY_PATH
7225
 
  shlibpath_overrides_runpath=yes
7226
 
  ;;
7227
 
 
7228
 
nto-qnx*)
7229
 
  version_type=linux
7230
 
  need_lib_prefix=no
7231
 
  need_version=no
7232
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7233
 
  soname_spec='${libname}${release}${shared_ext}$major'
7234
 
  shlibpath_var=LD_LIBRARY_PATH
7235
 
  shlibpath_overrides_runpath=yes
7236
 
  ;;
7237
 
 
7238
 
openbsd*)
7239
 
  version_type=sunos
7240
 
  need_lib_prefix=no
7241
 
  need_version=no
7242
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7243
 
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7244
 
  shlibpath_var=LD_LIBRARY_PATH
7245
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7246
 
    case $host_os in
7247
 
      openbsd2.[[89]] | openbsd2.[[89]].*)
7248
 
        shlibpath_overrides_runpath=no
7249
 
        ;;
7250
 
      *)
7251
 
        shlibpath_overrides_runpath=yes
7252
 
        ;;
7253
 
      esac
7254
 
  else
7255
 
    shlibpath_overrides_runpath=yes
7256
 
  fi
7257
 
  ;;
7258
 
 
7259
 
os2*)
7260
 
  libname_spec='$name'
7261
 
  shrext=".dll"
7262
 
  need_lib_prefix=no
7263
 
  library_names_spec='$libname${shared_ext} $libname.a'
7264
 
  dynamic_linker='OS/2 ld.exe'
7265
 
  shlibpath_var=LIBPATH
7266
 
  ;;
7267
 
 
7268
 
osf3* | osf4* | osf5*)
7269
 
  version_type=osf
7270
 
  need_lib_prefix=no
7271
 
  need_version=no
7272
 
  soname_spec='${libname}${release}${shared_ext}$major'
7273
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7274
 
  shlibpath_var=LD_LIBRARY_PATH
7275
 
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7276
 
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7277
 
  ;;
7278
 
 
7279
 
sco3.2v5*)
7280
 
  version_type=osf
7281
 
  soname_spec='${libname}${release}${shared_ext}$major'
7282
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7283
 
  shlibpath_var=LD_LIBRARY_PATH
7284
 
  ;;
7285
 
 
7286
 
solaris*)
7287
 
  version_type=linux
7288
 
  need_lib_prefix=no
7289
 
  need_version=no
7290
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7291
 
  soname_spec='${libname}${release}${shared_ext}$major'
7292
 
  shlibpath_var=LD_LIBRARY_PATH
7293
 
  shlibpath_overrides_runpath=yes
7294
 
  hardcode_into_libs=yes
7295
 
  # ldd complains unless libraries are executable
7296
 
  postinstall_cmds='chmod +x $lib'
7297
 
  ;;
7298
 
 
7299
 
sunos4*)
7300
 
  version_type=sunos
7301
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7302
 
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7303
 
  shlibpath_var=LD_LIBRARY_PATH
7304
 
  shlibpath_overrides_runpath=yes
7305
 
  if test "$with_gnu_ld" = yes; then
7306
 
    need_lib_prefix=no
7307
 
  fi
7308
 
  need_version=yes
7309
 
  ;;
7310
 
 
7311
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7312
 
  version_type=linux
7313
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7314
 
  soname_spec='${libname}${release}${shared_ext}$major'
7315
 
  shlibpath_var=LD_LIBRARY_PATH
7316
 
  case $host_vendor in
7317
 
    sni)
7318
 
      shlibpath_overrides_runpath=no
7319
 
      need_lib_prefix=no
7320
 
      export_dynamic_flag_spec='${wl}-Blargedynsym'
7321
 
      runpath_var=LD_RUN_PATH
7322
 
      ;;
7323
 
    siemens)
7324
 
      need_lib_prefix=no
7325
 
      ;;
7326
 
    motorola)
7327
 
      need_lib_prefix=no
7328
 
      need_version=no
7329
 
      shlibpath_overrides_runpath=no
7330
 
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7331
 
      ;;
7332
 
  esac
7333
 
  ;;
7334
 
 
7335
 
sysv4*MP*)
7336
 
  if test -d /usr/nec ;then
7337
 
    version_type=linux
7338
 
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7339
 
    soname_spec='$libname${shared_ext}.$major'
7340
 
    shlibpath_var=LD_LIBRARY_PATH
7341
 
  fi
7342
 
  ;;
7343
 
 
7344
 
uts4*)
7345
 
  version_type=linux
7346
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7347
 
  soname_spec='${libname}${release}${shared_ext}$major'
7348
 
  shlibpath_var=LD_LIBRARY_PATH
7349
 
  ;;
7350
 
 
7351
 
*)
7352
 
  dynamic_linker=no
7353
 
  ;;
7354
 
esac
7355
 
AC_MSG_RESULT([$dynamic_linker])
7356
 
test "$dynamic_linker" = no && can_build_shared=no
7357
 
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7358
 
 
7359
 
 
7360
 
# _LT_AC_TAGCONFIG
7361
 
# ----------------
7362
 
AC_DEFUN([_LT_AC_TAGCONFIG],
7363
 
[AC_ARG_WITH([tags],
7364
 
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7365
 
        [include additional configurations @<:@automatic@:>@])],
7366
 
    [tagnames="$withval"])
7367
 
 
7368
 
if test -f "$ltmain" && test -n "$tagnames"; then
7369
 
  if test ! -f "${ofile}"; then
7370
 
    AC_MSG_WARN([output file `$ofile' does not exist])
7371
 
  fi
7372
 
 
7373
 
  if test -z "$LTCC"; then
7374
 
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7375
 
    if test -z "$LTCC"; then
7376
 
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7377
 
    else
7378
 
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7379
 
    fi
7380
 
  fi
7381
 
 
7382
 
  # Extract list of available tagged configurations in $ofile.
7383
 
  # Note that this assumes the entire list is on one line.
7384
 
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7385
 
 
7386
 
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7387
 
  for tagname in $tagnames; do
7388
 
    IFS="$lt_save_ifs"
7389
 
    # Check whether tagname contains only valid characters
7390
 
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7391
 
    "") ;;
7392
 
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
7393
 
        ;;
7394
 
    esac
7395
 
 
7396
 
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7397
 
    then
7398
 
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
7399
 
    fi
7400
 
 
7401
 
    # Update the list of available tags.
7402
 
    if test -n "$tagname"; then
7403
 
      echo appending configuration tag \"$tagname\" to $ofile
7404
 
 
7405
 
      case $tagname in
7406
 
      CXX)
7407
 
        if test -n "$CXX" && test "X$CXX" != "Xno"; then
7408
 
          AC_LIBTOOL_LANG_CXX_CONFIG
7409
 
        else
7410
 
          tagname=""
7411
 
        fi
7412
 
        ;;
7413
 
 
7414
 
      F77)
7415
 
        if test -n "$F77" && test "X$F77" != "Xno"; then
7416
 
          AC_LIBTOOL_LANG_F77_CONFIG
7417
 
        else
7418
 
          tagname=""
7419
 
        fi
7420
 
        ;;
7421
 
 
7422
 
      GCJ)
7423
 
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7424
 
          AC_LIBTOOL_LANG_GCJ_CONFIG
7425
 
        else
7426
 
          tagname=""
7427
 
        fi
7428
 
        ;;
7429
 
 
7430
 
      RC)
7431
 
        AC_LIBTOOL_LANG_RC_CONFIG
7432
 
        ;;
7433
 
 
7434
 
      *)
7435
 
        AC_MSG_ERROR([Unsupported tag name: $tagname])
7436
 
        ;;
7437
 
      esac
7438
 
 
7439
 
      # Append the new tag name to the list of available tags.
7440
 
      if test -n "$tagname" ; then
7441
 
      available_tags="$available_tags $tagname"
7442
 
    fi
7443
 
    fi
7444
 
  done
7445
 
  IFS="$lt_save_ifs"
7446
 
 
7447
 
  # Now substitute the updated list of available tags.
7448
 
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7449
 
    mv "${ofile}T" "$ofile"
7450
 
    chmod +x "$ofile"
7451
 
  else
7452
 
    rm -f "${ofile}T"
7453
 
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
7454
 
  fi
7455
 
fi
7456
 
])# _LT_AC_TAGCONFIG
7457
 
 
7458
 
 
7459
 
# AC_LIBTOOL_DLOPEN
7460
 
# -----------------
7461
 
# enable checks for dlopen support
7462
 
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7463
 
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7464
 
])# AC_LIBTOOL_DLOPEN
7465
 
 
7466
 
 
7467
 
# AC_LIBTOOL_WIN32_DLL
7468
 
# --------------------
7469
 
# declare package support for building win32 dll's
7470
 
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7471
 
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7472
 
])# AC_LIBTOOL_WIN32_DLL
7473
 
 
7474
 
 
7475
 
# AC_ENABLE_SHARED([DEFAULT])
7476
 
# ---------------------------
7477
 
# implement the --enable-shared flag
7478
 
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7479
 
AC_DEFUN([AC_ENABLE_SHARED],
7480
 
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7481
 
AC_ARG_ENABLE([shared],
7482
 
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7483
 
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7484
 
    [p=${PACKAGE-default}
7485
 
    case $enableval in
7486
 
    yes) enable_shared=yes ;;
7487
 
    no) enable_shared=no ;;
7488
 
    *)
7489
 
      enable_shared=no
7490
 
      # Look at the argument we got.  We use all the common list separators.
7491
 
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7492
 
      for pkg in $enableval; do
7493
 
        IFS="$lt_save_ifs"
7494
 
        if test "X$pkg" = "X$p"; then
7495
 
          enable_shared=yes
7496
 
        fi
7497
 
      done
7498
 
      IFS="$lt_save_ifs"
7499
 
      ;;
7500
 
    esac],
7501
 
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7502
 
])# AC_ENABLE_SHARED
7503
 
 
7504
 
 
7505
 
# AC_DISABLE_SHARED
7506
 
# -----------------
7507
 
#- set the default shared flag to --disable-shared
7508
 
AC_DEFUN([AC_DISABLE_SHARED],
7509
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7510
 
AC_ENABLE_SHARED(no)
7511
 
])# AC_DISABLE_SHARED
7512
 
 
7513
 
 
7514
 
# AC_ENABLE_STATIC([DEFAULT])
7515
 
# ---------------------------
7516
 
# implement the --enable-static flag
7517
 
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7518
 
AC_DEFUN([AC_ENABLE_STATIC],
7519
 
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7520
 
AC_ARG_ENABLE([static],
7521
 
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7522
 
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7523
 
    [p=${PACKAGE-default}
7524
 
    case $enableval in
7525
 
    yes) enable_static=yes ;;
7526
 
    no) enable_static=no ;;
7527
 
    *)
7528
 
     enable_static=no
7529
 
      # Look at the argument we got.  We use all the common list separators.
7530
 
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7531
 
      for pkg in $enableval; do
7532
 
        IFS="$lt_save_ifs"
7533
 
        if test "X$pkg" = "X$p"; then
7534
 
          enable_static=yes
7535
 
        fi
7536
 
      done
7537
 
      IFS="$lt_save_ifs"
7538
 
      ;;
7539
 
    esac],
7540
 
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7541
 
])# AC_ENABLE_STATIC
7542
 
 
7543
 
 
7544
 
# AC_DISABLE_STATIC
7545
 
# -----------------
7546
 
# set the default static flag to --disable-static
7547
 
AC_DEFUN([AC_DISABLE_STATIC],
7548
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7549
 
AC_ENABLE_STATIC(no)
7550
 
])# AC_DISABLE_STATIC
7551
 
 
7552
 
 
7553
 
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7554
 
# ---------------------------------
7555
 
# implement the --enable-fast-install flag
7556
 
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7557
 
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7558
 
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7559
 
AC_ARG_ENABLE([fast-install],
7560
 
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7561
 
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7562
 
    [p=${PACKAGE-default}
7563
 
    case $enableval in
7564
 
    yes) enable_fast_install=yes ;;
7565
 
    no) enable_fast_install=no ;;
7566
 
    *)
7567
 
      enable_fast_install=no
7568
 
      # Look at the argument we got.  We use all the common list separators.
7569
 
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7570
 
      for pkg in $enableval; do
7571
 
        IFS="$lt_save_ifs"
7572
 
        if test "X$pkg" = "X$p"; then
7573
 
          enable_fast_install=yes
7574
 
        fi
7575
 
      done
7576
 
      IFS="$lt_save_ifs"
7577
 
      ;;
7578
 
    esac],
7579
 
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7580
 
])# AC_ENABLE_FAST_INSTALL
7581
 
 
7582
 
 
7583
 
# AC_DISABLE_FAST_INSTALL
7584
 
# -----------------------
7585
 
# set the default to --disable-fast-install
7586
 
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7587
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7588
 
AC_ENABLE_FAST_INSTALL(no)
7589
 
])# AC_DISABLE_FAST_INSTALL
7590
 
 
7591
 
 
7592
 
# AC_LIBTOOL_PICMODE([MODE])
7593
 
# --------------------------
7594
 
# implement the --with-pic flag
7595
 
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7596
 
AC_DEFUN([AC_LIBTOOL_PICMODE],
7597
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7598
 
pic_mode=ifelse($#,1,$1,default)
7599
 
])# AC_LIBTOOL_PICMODE
7600
 
 
7601
 
 
7602
 
# AC_PROG_EGREP
7603
 
# -------------
7604
 
# This is predefined starting with Autoconf 2.54, so this conditional
7605
 
# definition can be removed once we require Autoconf 2.54 or later.
7606
 
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7607
 
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7608
 
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7609
 
    then ac_cv_prog_egrep='grep -E'
7610
 
    else ac_cv_prog_egrep='egrep'
7611
 
    fi])
7612
 
 EGREP=$ac_cv_prog_egrep
7613
 
 AC_SUBST([EGREP])
7614
 
])])
7615
 
 
7616
 
 
7617
 
# AC_PATH_TOOL_PREFIX
7618
 
# -------------------
7619
 
# find a file program which can recognise shared library
7620
 
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7621
 
[AC_REQUIRE([AC_PROG_EGREP])dnl
7622
 
AC_MSG_CHECKING([for $1])
7623
 
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7624
 
[case $MAGIC_CMD in
7625
 
[[\\/*] |  ?:[\\/]*])
7626
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7627
 
  ;;
7628
 
*)
7629
 
  lt_save_MAGIC_CMD="$MAGIC_CMD"
7630
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7631
 
dnl $ac_dummy forces splitting on constant user-supplied paths.
7632
 
dnl POSIX.2 word splitting is done only on the output of word expansions,
7633
 
dnl not every word.  This closes a longstanding sh security hole.
7634
 
  ac_dummy="ifelse([$2], , $PATH, [$2])"
7635
 
  for ac_dir in $ac_dummy; do
7636
 
    IFS="$lt_save_ifs"
7637
 
    test -z "$ac_dir" && ac_dir=.
7638
 
    if test -f $ac_dir/$1; then
7639
 
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7640
 
      if test -n "$file_magic_test_file"; then
7641
 
        case $deplibs_check_method in
7642
 
        "file_magic "*)
7643
 
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7644
 
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7645
 
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7646
 
            $EGREP "$file_magic_regex" > /dev/null; then
7647
 
            :
7648
 
          else
7649
 
            cat <<EOF 1>&2
7650
 
 
7651
 
*** Warning: the command libtool uses to detect shared libraries,
7652
 
*** $file_magic_cmd, produces output that libtool cannot recognize.
7653
 
*** The result is that libtool may fail to recognize shared libraries
7654
 
*** as such.  This will affect the creation of libtool libraries that
7655
 
*** depend on shared libraries, but programs linked with such libtool
7656
 
*** libraries will work regardless of this problem.  Nevertheless, you
7657
 
*** may want to report the problem to your system manager and/or to
7658
 
*** bug-libtool@gnu.org
7659
 
 
7660
 
EOF
7661
 
          fi ;;
7662
 
        esac
7663
 
      fi
7664
 
      break
7665
 
    fi
7666
 
  done
7667
 
  IFS="$lt_save_ifs"
7668
 
  MAGIC_CMD="$lt_save_MAGIC_CMD"
7669
 
  ;;
7670
 
esac])
7671
 
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7672
 
if test -n "$MAGIC_CMD"; then
7673
 
  AC_MSG_RESULT($MAGIC_CMD)
7674
 
else
7675
 
  AC_MSG_RESULT(no)
7676
 
fi
7677
 
])# AC_PATH_TOOL_PREFIX
7678
 
 
7679
 
 
7680
 
# AC_PATH_MAGIC
7681
 
# -------------
7682
 
# find a file program which can recognise a shared library
7683
 
AC_DEFUN([AC_PATH_MAGIC],
7684
 
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7685
 
if test -z "$lt_cv_path_MAGIC_CMD"; then
7686
 
  if test -n "$ac_tool_prefix"; then
7687
 
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7688
 
  else
7689
 
    MAGIC_CMD=:
7690
 
  fi
7691
 
fi
7692
 
])# AC_PATH_MAGIC
7693
 
 
7694
 
 
7695
 
# AC_PROG_LD
7696
 
# ----------
7697
 
# find the pathname to the GNU or non-GNU linker
7698
 
AC_DEFUN([AC_PROG_LD],
7699
 
[AC_ARG_WITH([gnu-ld],
7700
 
    [AC_HELP_STRING([--with-gnu-ld],
7701
 
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
7702
 
    [test "$withval" = no || with_gnu_ld=yes],
7703
 
    [with_gnu_ld=no])
7704
 
AC_REQUIRE([LT_AC_PROG_SED])dnl
7705
 
AC_REQUIRE([AC_PROG_CC])dnl
7706
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7707
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7708
 
ac_prog=ld
7709
 
if test "$GCC" = yes; then
7710
 
  # Check if gcc -print-prog-name=ld gives a path.
7711
 
  AC_MSG_CHECKING([for ld used by $CC])
7712
 
  case $host in
7713
 
  *-*-mingw*)
7714
 
    # gcc leaves a trailing carriage return which upsets mingw
7715
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7716
 
  *)
7717
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7718
 
  esac
7719
 
  case $ac_prog in
7720
 
    # Accept absolute paths.
7721
 
    [[\\/]]* | ?:[[\\/]]*)
7722
 
      re_direlt='/[[^/]][[^/]]*/\.\./'
7723
 
      # Canonicalize the pathname of ld
7724
 
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7725
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7726
 
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7727
 
      done
7728
 
      test -z "$LD" && LD="$ac_prog"
7729
 
      ;;
7730
 
  "")
7731
 
    # If it fails, then pretend we aren't using GCC.
7732
 
    ac_prog=ld
7733
 
    ;;
7734
 
  *)
7735
 
    # If it is relative, then search for the first ld in PATH.
7736
 
    with_gnu_ld=unknown
7737
 
    ;;
7738
 
  esac
7739
 
elif test "$with_gnu_ld" = yes; then
7740
 
  AC_MSG_CHECKING([for GNU ld])
7741
 
else
7742
 
  AC_MSG_CHECKING([for non-GNU ld])
7743
 
fi
7744
 
AC_CACHE_VAL(lt_cv_path_LD,
7745
 
[if test -z "$LD"; then
7746
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7747
 
  for ac_dir in $PATH; do
7748
 
    IFS="$lt_save_ifs"
7749
 
    test -z "$ac_dir" && ac_dir=.
7750
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7751
 
      lt_cv_path_LD="$ac_dir/$ac_prog"
7752
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
7753
 
      # but apparently some GNU ld's only accept -v.
7754
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
7755
 
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7756
 
      *GNU* | *'with BFD'*)
7757
 
        test "$with_gnu_ld" != no && break
7758
 
        ;;
7759
 
      *)
7760
 
        test "$with_gnu_ld" != yes && break
7761
 
        ;;
7762
 
      esac
7763
 
    fi
7764
 
  done
7765
 
  IFS="$lt_save_ifs"
7766
 
else
7767
 
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
7768
 
fi])
7769
 
LD="$lt_cv_path_LD"
7770
 
if test -n "$LD"; then
7771
 
  AC_MSG_RESULT($LD)
7772
 
else
7773
 
  AC_MSG_RESULT(no)
7774
 
fi
7775
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7776
 
AC_PROG_LD_GNU
7777
 
])# AC_PROG_LD
7778
 
 
7779
 
 
7780
 
# AC_PROG_LD_GNU
7781
 
# --------------
7782
 
AC_DEFUN([AC_PROG_LD_GNU],
7783
 
[AC_REQUIRE([AC_PROG_EGREP])dnl
7784
 
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7785
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7786
 
case `$LD -v 2>&1 </dev/null` in
7787
 
*GNU* | *'with BFD'*)
7788
 
  lt_cv_prog_gnu_ld=yes
7789
 
  ;;
7790
 
*)
7791
 
  lt_cv_prog_gnu_ld=no
7792
 
  ;;
7793
 
esac])
7794
 
with_gnu_ld=$lt_cv_prog_gnu_ld
7795
 
])# AC_PROG_LD_GNU
7796
 
 
7797
 
 
7798
 
# AC_PROG_LD_RELOAD_FLAG
7799
 
# ----------------------
7800
 
# find reload flag for linker
7801
 
#   -- PORTME Some linkers may need a different reload flag.
7802
 
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7803
 
[AC_CACHE_CHECK([for $LD option to reload object files],
7804
 
  lt_cv_ld_reload_flag,
7805
 
  [lt_cv_ld_reload_flag='-r'])
7806
 
reload_flag=$lt_cv_ld_reload_flag
7807
 
case $reload_flag in
7808
 
"" | " "*) ;;
7809
 
*) reload_flag=" $reload_flag" ;;
7810
 
esac
7811
 
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7812
 
])# AC_PROG_LD_RELOAD_FLAG
7813
 
 
7814
 
 
7815
 
# AC_DEPLIBS_CHECK_METHOD
7816
 
# -----------------------
7817
 
# how to check for library dependencies
7818
 
#  -- PORTME fill in with the dynamic library characteristics
7819
 
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7820
 
[AC_CACHE_CHECK([how to recognise dependent libraries],
7821
 
lt_cv_deplibs_check_method,
7822
 
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7823
 
lt_cv_file_magic_test_file=
7824
 
lt_cv_deplibs_check_method='unknown'
7825
 
# Need to set the preceding variable on all platforms that support
7826
 
# interlibrary dependencies.
7827
 
# 'none' -- dependencies not supported.
7828
 
# `unknown' -- same as none, but documents that we really don't know.
7829
 
# 'pass_all' -- all dependencies passed with no checks.
7830
 
# 'test_compile' -- check by making test program.
7831
 
# 'file_magic [[regex]]' -- check by looking for files in library path
7832
 
# which responds to the $file_magic_cmd with a given extended regex.
7833
 
# If you have `file' or equivalent on your system and you're not sure
7834
 
# whether `pass_all' will *always* work, you probably want this one.
7835
 
 
7836
 
case $host_os in
7837
 
aix4* | aix5*)
7838
 
  lt_cv_deplibs_check_method=pass_all
7839
 
  ;;
7840
 
 
7841
 
beos*)
7842
 
  lt_cv_deplibs_check_method=pass_all
7843
 
  ;;
7844
 
 
7845
 
bsdi4*)
7846
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7847
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
7848
 
  lt_cv_file_magic_test_file=/shlib/libc.so
7849
 
  ;;
7850
 
 
7851
 
cygwin*)
7852
 
  lt_cv_deplibs_check_method=pass_all
7853
 
  ;;
7854
 
  
7855
 
mingw* | pw32*)
7856
 
  # win32_libid is a shell function defined in ltmain.sh
7857
 
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7858
 
  lt_cv_file_magic_cmd='win32_libid'
7859
 
  ;;
7860
 
 
7861
 
darwin* | rhapsody*)
7862
 
  # this will be overwritten by pass_all, but leave it in just in case
7863
 
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7864
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
7865
 
  case "$host_os" in
7866
 
  rhapsody* | darwin1.[[012]])
7867
 
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7868
 
    ;;
7869
 
  *) # Darwin 1.3 on
7870
 
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7871
 
    ;;
7872
 
  esac
7873
 
  lt_cv_deplibs_check_method=pass_all
7874
 
  ;;
7875
 
 
7876
 
freebsd*)
7877
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7878
 
    case $host_cpu in
7879
 
    i*86 )
7880
 
      # Not sure whether the presence of OpenBSD here was a mistake.
7881
 
      # Let's accept both of them until this is cleared up.
7882
 
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7883
 
      lt_cv_file_magic_cmd=/usr/bin/file
7884
 
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7885
 
      ;;
7886
 
    esac
7887
 
  else
7888
 
    lt_cv_deplibs_check_method=pass_all
7889
 
  fi
7890
 
  ;;
7891
 
 
7892
 
gnu*)
7893
 
  lt_cv_deplibs_check_method=pass_all
7894
 
  ;;
7895
 
 
7896
 
hpux10.20* | hpux11*)
7897
 
  lt_cv_file_magic_cmd=/usr/bin/file
7898
 
  case "$host_cpu" in
7899
 
  ia64*)
7900
 
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7901
 
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7902
 
    ;;
7903
 
  hppa*64*)
7904
 
    [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]']
7905
 
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7906
 
    ;;
7907
 
  *)
7908
 
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7909
 
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7910
 
    ;;
7911
 
  esac
7912
 
  ;;
7913
 
 
7914
 
irix5* | irix6* | nonstopux*)
7915
 
  case $host_os in
7916
 
  irix5* | nonstopux*)
7917
 
    # this will be overridden with pass_all, but let us keep it just in case
7918
 
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7919
 
    ;;
7920
 
  *)
7921
 
    case $LD in
7922
 
    *-32|*"-32 ") libmagic=32-bit;;
7923
 
    *-n32|*"-n32 ") libmagic=N32;;
7924
 
    *-64|*"-64 ") libmagic=64-bit;;
7925
 
    *) libmagic=never-match;;
7926
 
    esac
7927
 
    # this will be overridden with pass_all, but let us keep it just in case
7928
 
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7929
 
    ;;
7930
 
  esac
7931
 
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7932
 
  lt_cv_deplibs_check_method=pass_all
7933
 
  ;;
7934
 
 
7935
 
# This must be Linux ELF.
7936
 
linux*)
7937
 
  case $host_cpu in
7938
 
  alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
7939
 
    lt_cv_deplibs_check_method=pass_all ;;
7940
 
  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
7941
 
  arm* )
7942
 
    lt_cv_deplibs_check_method=pass_all ;;
7943
 
  *)
7944
 
    # glibc up to 2.1.1 does not perform some relocations on ARM
7945
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7946
 
  esac
7947
 
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7948
 
  ;;
7949
 
 
7950
 
netbsd*)
7951
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7952
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7953
 
  else
7954
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7955
 
  fi
7956
 
  ;;
7957
 
 
7958
 
newos6*)
7959
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7960
 
  lt_cv_file_magic_cmd=/usr/bin/file
7961
 
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7962
 
  ;;
7963
 
 
7964
 
nto-qnx*)
7965
 
  lt_cv_deplibs_check_method=unknown
7966
 
  ;;
7967
 
 
7968
 
openbsd*)
7969
 
  lt_cv_file_magic_cmd=/usr/bin/file
7970
 
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7971
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7972
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7973
 
  else
7974
 
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7975
 
  fi
7976
 
  ;;
7977
 
 
7978
 
osf3* | osf4* | osf5*)
7979
 
  # this will be overridden with pass_all, but let us keep it just in case
7980
 
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7981
 
  lt_cv_file_magic_test_file=/shlib/libc.so
7982
 
  lt_cv_deplibs_check_method=pass_all
7983
 
  ;;
7984
 
 
7985
 
sco3.2v5*)
7986
 
  lt_cv_deplibs_check_method=pass_all
7987
 
  ;;
7988
 
 
7989
 
solaris*)
7990
 
  lt_cv_deplibs_check_method=pass_all
7991
 
  lt_cv_file_magic_test_file=/lib/libc.so
7992
 
  ;;
7993
 
 
7994
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7995
 
  case $host_vendor in
7996
 
  motorola)
7997
 
    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]]'
7998
 
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7999
 
    ;;
8000
 
  ncr)
8001
 
    lt_cv_deplibs_check_method=pass_all
8002
 
    ;;
8003
 
  sequent)
8004
 
    lt_cv_file_magic_cmd='/bin/file'
8005
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
8006
 
    ;;
8007
 
  sni)
8008
 
    lt_cv_file_magic_cmd='/bin/file'
8009
 
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
8010
 
    lt_cv_file_magic_test_file=/lib/libc.so
8011
 
    ;;
8012
 
  siemens)
8013
 
    lt_cv_deplibs_check_method=pass_all
8014
 
    ;;
8015
 
  esac
8016
 
  ;;
8017
 
 
8018
 
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
8019
 
  lt_cv_deplibs_check_method=pass_all
8020
 
  ;;
8021
 
esac
8022
 
])
8023
 
file_magic_cmd=$lt_cv_file_magic_cmd
8024
 
deplibs_check_method=$lt_cv_deplibs_check_method
8025
 
test -z "$deplibs_check_method" && deplibs_check_method=unknown
8026
 
])# AC_DEPLIBS_CHECK_METHOD
8027
 
 
8028
 
 
8029
 
# AC_PROG_NM
8030
 
# ----------
8031
 
# find the pathname to a BSD-compatible name lister
8032
 
AC_DEFUN([AC_PROG_NM],
8033
 
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
8034
 
[if test -n "$NM"; then
8035
 
  # Let the user override the test.
8036
 
  lt_cv_path_NM="$NM"
8037
 
else
8038
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8039
 
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
8040
 
    IFS="$lt_save_ifs"
8041
 
    test -z "$ac_dir" && ac_dir=.
8042
 
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
8043
 
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
8044
 
      # Check to see if the nm accepts a BSD-compat flag.
8045
 
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
8046
 
      #   nm: unknown option "B" ignored
8047
 
      # Tru64's nm complains that /dev/null is an invalid object file
8048
 
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
8049
 
      */dev/null* | *'Invalid file or object type'*)
8050
 
        lt_cv_path_NM="$tmp_nm -B"
8051
 
        break
8052
 
        ;;
8053
 
      *)
8054
 
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8055
 
        */dev/null*)
8056
 
          lt_cv_path_NM="$tmp_nm -p"
8057
 
          break
8058
 
          ;;
8059
 
        *)
8060
 
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8061
 
          continue # so that we can try to find one that supports BSD flags
8062
 
          ;;
8063
 
        esac
8064
 
      esac
8065
 
    fi
8066
 
  done
8067
 
  IFS="$lt_save_ifs"
8068
 
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
8069
 
fi])
8070
 
NM="$lt_cv_path_NM"
8071
 
])# AC_PROG_NM
8072
 
 
8073
 
 
8074
 
# AC_CHECK_LIBM
8075
 
# -------------
8076
 
# check for math library
8077
 
AC_DEFUN([AC_CHECK_LIBM],
8078
 
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8079
 
LIBM=
8080
 
case $host in
8081
 
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
8082
 
  # These system don't have libm, or don't need it
8083
 
  ;;
8084
 
*-ncr-sysv4.3*)
8085
 
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
8086
 
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
8087
 
  ;;
8088
 
*)
8089
 
  AC_CHECK_LIB(m, cos, LIBM="-lm")
8090
 
  ;;
8091
 
esac
8092
 
])# AC_CHECK_LIBM
8093
 
 
8094
 
 
8095
 
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
8096
 
# -----------------------------------
8097
 
# sets LIBLTDL to the link flags for the libltdl convenience library and
8098
 
# LTDLINCL to the include flags for the libltdl header and adds
8099
 
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
8100
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
8101
 
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
8102
 
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
8103
 
# '${top_srcdir}/' (note the single quotes!).  If your package is not
8104
 
# flat and you're not using automake, define top_builddir and
8105
 
# top_srcdir appropriately in the Makefiles.
8106
 
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
8107
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8108
 
  case $enable_ltdl_convenience in
8109
 
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8110
 
  "") enable_ltdl_convenience=yes
8111
 
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8112
 
  esac
8113
 
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
8114
 
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8115
 
  # For backwards non-gettext consistent compatibility...
8116
 
  INCLTDL="$LTDLINCL"
8117
 
])# AC_LIBLTDL_CONVENIENCE
8118
 
 
8119
 
 
8120
 
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
8121
 
# -----------------------------------
8122
 
# sets LIBLTDL to the link flags for the libltdl installable library and
8123
 
# LTDLINCL to the include flags for the libltdl header and adds
8124
 
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
8125
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
8126
 
# DIRECTORY is not provided and an installed libltdl is not found, it is
8127
 
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
8128
 
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8129
 
# quotes!).  If your package is not flat and you're not using automake,
8130
 
# define top_builddir and top_srcdir appropriately in the Makefiles.
8131
 
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
8132
 
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
8133
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8134
 
  AC_CHECK_LIB(ltdl, lt_dlinit,
8135
 
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8136
 
  [if test x"$enable_ltdl_install" = xno; then
8137
 
     AC_MSG_WARN([libltdl not installed, but installation disabled])
8138
 
   else
8139
 
     enable_ltdl_install=yes
8140
 
   fi
8141
 
  ])
8142
 
  if test x"$enable_ltdl_install" = x"yes"; then
8143
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
8144
 
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8145
 
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8146
 
  else
8147
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8148
 
    LIBLTDL="-lltdl"
8149
 
    LTDLINCL=
8150
 
  fi
8151
 
  # For backwards non-gettext consistent compatibility...
8152
 
  INCLTDL="$LTDLINCL"
8153
 
])# AC_LIBLTDL_INSTALLABLE
8154
 
 
8155
 
 
8156
 
# AC_LIBTOOL_CXX
8157
 
# --------------
8158
 
# enable support for C++ libraries
8159
 
AC_DEFUN([AC_LIBTOOL_CXX],
8160
 
[AC_REQUIRE([_LT_AC_LANG_CXX])
8161
 
])# AC_LIBTOOL_CXX
8162
 
 
8163
 
 
8164
 
# _LT_AC_LANG_CXX
8165
 
# ---------------
8166
 
AC_DEFUN([_LT_AC_LANG_CXX],
8167
 
[AC_REQUIRE([AC_PROG_CXX])
8168
 
AC_REQUIRE([AC_PROG_CXXCPP])
8169
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8170
 
])# _LT_AC_LANG_CXX
8171
 
 
8172
 
 
8173
 
# AC_LIBTOOL_F77
8174
 
# --------------
8175
 
# enable support for Fortran 77 libraries
8176
 
AC_DEFUN([AC_LIBTOOL_F77],
8177
 
[AC_REQUIRE([_LT_AC_LANG_F77])
8178
 
])# AC_LIBTOOL_F77
8179
 
 
8180
 
 
8181
 
# _LT_AC_LANG_F77
8182
 
# ---------------
8183
 
AC_DEFUN([_LT_AC_LANG_F77],
8184
 
[AC_REQUIRE([AC_PROG_F77])
8185
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8186
 
])# _LT_AC_LANG_F77
8187
 
 
8188
 
 
8189
 
# AC_LIBTOOL_GCJ
8190
 
# --------------
8191
 
# enable support for GCJ libraries
8192
 
AC_DEFUN([AC_LIBTOOL_GCJ],
8193
 
[AC_REQUIRE([_LT_AC_LANG_GCJ])
8194
 
])# AC_LIBTOOL_GCJ
8195
 
 
8196
 
 
8197
 
# _LT_AC_LANG_GCJ
8198
 
# ---------------
8199
 
AC_DEFUN([_LT_AC_LANG_GCJ],
8200
 
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8201
 
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8202
 
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8203
 
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8204
 
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8205
 
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8206
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8207
 
])# _LT_AC_LANG_GCJ
8208
 
 
8209
 
 
8210
 
# AC_LIBTOOL_RC
8211
 
# --------------
8212
 
# enable support for Windows resource files
8213
 
AC_DEFUN([AC_LIBTOOL_RC],
8214
 
[AC_REQUIRE([LT_AC_PROG_RC])
8215
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8216
 
])# AC_LIBTOOL_RC
8217
 
 
8218
 
 
8219
 
# AC_LIBTOOL_LANG_C_CONFIG
8220
 
# ------------------------
8221
 
# Ensure that the configuration vars for the C compiler are
8222
 
# suitably defined.  Those variables are subsequently used by
8223
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8224
 
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8225
 
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
8226
 
[lt_save_CC="$CC"
8227
 
AC_LANG_PUSH(C)
8228
 
 
8229
 
# Source file extension for C test sources.
8230
 
ac_ext=c
8231
 
 
8232
 
# Object file extension for compiled C test sources.
8233
 
objext=o
8234
 
_LT_AC_TAGVAR(objext, $1)=$objext
8235
 
 
8236
 
# Code to be used in simple compile tests
8237
 
lt_simple_compile_test_code="int some_variable = 0;\n"
8238
 
 
8239
 
# Code to be used in simple link tests
8240
 
lt_simple_link_test_code='int main(){return(0);}\n'
8241
 
 
8242
 
_LT_AC_SYS_COMPILER
8243
 
 
8244
 
#
8245
 
# Check for any special shared library compilation flags.
8246
 
#
8247
 
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
8248
 
if test "$GCC" = no; then
8249
 
  case $host_os in
8250
 
  sco3.2v5*)
8251
 
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
8252
 
    ;;
8253
 
  esac
8254
 
fi
8255
 
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
8256
 
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
8257
 
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
8258
 
  else
8259
 
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
8260
 
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
8261
 
  fi
8262
 
fi
8263
 
 
8264
 
 
8265
 
#
8266
 
# Check to make sure the static flag actually works.
8267
 
#
8268
 
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
8269
 
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
8270
 
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
8271
 
  [],
8272
 
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
8273
 
 
8274
 
 
8275
 
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8276
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8277
 
AC_LIBTOOL_PROG_CC_C_O($1)
8278
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8279
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8280
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8281
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8282
 
AC_LIBTOOL_SYS_LIB_STRIP
8283
 
AC_LIBTOOL_DLOPEN_SELF($1)
8284
 
 
8285
 
# Report which librarie types wil actually be built
8286
 
AC_MSG_CHECKING([if libtool supports shared libraries])
8287
 
AC_MSG_RESULT([$can_build_shared])
8288
 
 
8289
 
AC_MSG_CHECKING([whether to build shared libraries])
8290
 
test "$can_build_shared" = "no" && enable_shared=no
8291
 
 
8292
 
# On AIX, shared libraries and static libraries use the same namespace, and
8293
 
# are all built from PIC.
8294
 
case "$host_os" in
8295
 
aix3*)
8296
 
  test "$enable_shared" = yes && enable_static=no
8297
 
  if test -n "$RANLIB"; then
8298
 
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
8299
 
    postinstall_cmds='$RANLIB $lib'
8300
 
  fi
8301
 
  ;;
8302
 
 
8303
 
aix4*)
8304
 
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8305
 
    test "$enable_shared" = yes && enable_static=no
8306
 
  fi
8307
 
  ;;
8308
 
  darwin* | rhapsody*)
8309
 
  if test "$GCC" = yes; then
8310
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8311
 
    case "$host_os" in
8312
 
    rhapsody* | darwin1.[[012]])
8313
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8314
 
      ;;
8315
 
    *) # Darwin 1.3 on
8316
 
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8317
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8318
 
      else
8319
 
        case ${MACOSX_DEPLOYMENT_TARGET} in
8320
 
          10.[012])
8321
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8322
 
            ;;
8323
 
          10.*)
8324
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8325
 
            ;;
8326
 
        esac
8327
 
      fi
8328
 
      ;;
8329
 
    esac
8330
 
    output_verbose_link_cmd='echo'
8331
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8332
 
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8333
 
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8334
 
    _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 $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8335
 
    _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 $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8336
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
8337
 
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8338
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8339
 
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8340
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8341
 
  else
8342
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8343
 
  fi  
8344
 
    ;;  
8345
 
esac
8346
 
AC_MSG_RESULT([$enable_shared])
8347
 
 
8348
 
AC_MSG_CHECKING([whether to build static libraries])
8349
 
# Make sure either enable_shared or enable_static is yes.
8350
 
test "$enable_shared" = yes || enable_static=yes
8351
 
AC_MSG_RESULT([$enable_static])
8352
 
 
8353
 
AC_LIBTOOL_CONFIG($1)
8354
 
 
8355
 
AC_LANG_POP
8356
 
CC="$lt_save_CC"
8357
 
])# AC_LIBTOOL_LANG_C_CONFIG
8358
 
 
8359
 
 
8360
 
# AC_LIBTOOL_LANG_CXX_CONFIG
8361
 
# --------------------------
8362
 
# Ensure that the configuration vars for the C compiler are
8363
 
# suitably defined.  Those variables are subsequently used by
8364
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8365
 
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8366
 
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
8367
 
[AC_LANG_PUSH(C++)
8368
 
AC_REQUIRE([AC_PROG_CXX])
8369
 
AC_REQUIRE([AC_PROG_CXXCPP])
8370
 
 
8371
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8372
 
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8373
 
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8374
 
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8375
 
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8376
 
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8377
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8378
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8379
 
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8380
 
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8381
 
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8382
 
_LT_AC_TAGVAR(module_cmds, $1)=
8383
 
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8384
 
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8385
 
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8386
 
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8387
 
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8388
 
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8389
 
 
8390
 
# Dependencies to place before and after the object being linked:
8391
 
_LT_AC_TAGVAR(predep_objects, $1)=
8392
 
_LT_AC_TAGVAR(postdep_objects, $1)=
8393
 
_LT_AC_TAGVAR(predeps, $1)=
8394
 
_LT_AC_TAGVAR(postdeps, $1)=
8395
 
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8396
 
 
8397
 
# Source file extension for C++ test sources.
8398
 
ac_ext=cc
8399
 
 
8400
 
# Object file extension for compiled C++ test sources.
8401
 
objext=o
8402
 
_LT_AC_TAGVAR(objext, $1)=$objext
8403
 
 
8404
 
# Code to be used in simple compile tests
8405
 
lt_simple_compile_test_code="int some_variable = 0;\n"
8406
 
 
8407
 
# Code to be used in simple link tests
8408
 
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
8409
 
 
8410
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8411
 
_LT_AC_SYS_COMPILER
8412
 
 
8413
 
# Allow CC to be a program name with arguments.
8414
 
lt_save_CC=$CC
8415
 
lt_save_LD=$LD
8416
 
lt_save_GCC=$GCC
8417
 
GCC=$GXX
8418
 
lt_save_with_gnu_ld=$with_gnu_ld
8419
 
lt_save_path_LD=$lt_cv_path_LD
8420
 
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8421
 
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8422
 
else
8423
 
  unset lt_cv_prog_gnu_ld
8424
 
fi
8425
 
if test -n "${lt_cv_path_LDCXX+set}"; then
8426
 
  lt_cv_path_LD=$lt_cv_path_LDCXX
8427
 
else
8428
 
  unset lt_cv_path_LD
8429
 
fi
8430
 
test -z "${LDCXX+set}" || LD=$LDCXX
8431
 
CC=${CXX-"c++"}
8432
 
compiler=$CC
8433
 
_LT_AC_TAGVAR(compiler, $1)=$CC
8434
 
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8435
 
 
8436
 
# We don't want -fno-exception wen compiling C++ code, so set the
8437
 
# no_builtin_flag separately
8438
 
if test "$GXX" = yes; then
8439
 
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8440
 
else
8441
 
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8442
 
fi
8443
 
 
8444
 
if test "$GXX" = yes; then
8445
 
  # Set up default GNU C++ configuration
8446
 
 
8447
 
  AC_PROG_LD
8448
 
 
8449
 
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
8450
 
  # archiving commands below assume that GNU ld is being used.
8451
 
  if test "$with_gnu_ld" = yes; then
8452
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8453
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8454
 
 
8455
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8456
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8457
 
 
8458
 
    # If archive_cmds runs LD, not CC, wlarc should be empty
8459
 
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8460
 
    #     investigate it a little bit more. (MM)
8461
 
    wlarc='${wl}'
8462
 
 
8463
 
    # ancient GNU ld didn't support --whole-archive et. al.
8464
 
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8465
 
        grep 'no-whole-archive' > /dev/null; then
8466
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8467
 
    else
8468
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8469
 
    fi
8470
 
  else
8471
 
    with_gnu_ld=no
8472
 
    wlarc=
8473
 
 
8474
 
    # A generic and very simple default shared library creation
8475
 
    # command for GNU C++ for the case where it uses the native
8476
 
    # linker, instead of GNU ld.  If possible, this setting should
8477
 
    # overridden to take advantage of the native linker features on
8478
 
    # the platform it is being used on.
8479
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
8480
 
  fi
8481
 
 
8482
 
  # Commands to make compiler produce verbose output that lists
8483
 
  # what "hidden" libraries, object files and flags are used when
8484
 
  # linking a shared library.
8485
 
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8486
 
 
8487
 
else
8488
 
  GXX=no
8489
 
  with_gnu_ld=no
8490
 
  wlarc=
8491
 
fi
8492
 
 
8493
 
# PORTME: fill in a description of your system's C++ link characteristics
8494
 
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8495
 
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8496
 
case $host_os in
8497
 
  aix3*)
8498
 
    # FIXME: insert proper C++ library support
8499
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8500
 
    ;;
8501
 
  aix4* | aix5*)
8502
 
    if test "$host_cpu" = ia64; then
8503
 
      # On IA64, the linker does run time linking by default, so we don't
8504
 
      # have to do anything special.
8505
 
      aix_use_runtimelinking=no
8506
 
      exp_sym_flag='-Bexport'
8507
 
      no_entry_flag=""
8508
 
    else
8509
 
      # KDE requires run time linking.  Make it the default.
8510
 
      aix_use_runtimelinking=yes
8511
 
      exp_sym_flag='-bexport'
8512
 
      no_entry_flag='-bnoentry'
8513
 
    fi
8514
 
 
8515
 
    # When large executables or shared objects are built, AIX ld can
8516
 
    # have problems creating the table of contents.  If linking a library
8517
 
    # or program results in "error TOC overflow" add -mminimal-toc to
8518
 
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8519
 
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8520
 
 
8521
 
    _LT_AC_TAGVAR(archive_cmds, $1)=''
8522
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8523
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8524
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8525
 
 
8526
 
    if test "$GXX" = yes; then
8527
 
      case $host_os in aix4.[012]|aix4.[012].*)
8528
 
      # We only want to do this on AIX 4.2 and lower, the check
8529
 
      # below for broken collect2 doesn't work under 4.3+
8530
 
        collect2name=`${CC} -print-prog-name=collect2`
8531
 
        if test -f "$collect2name" && \
8532
 
           strings "$collect2name" | grep resolve_lib_name >/dev/null
8533
 
        then
8534
 
          # We have reworked collect2
8535
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8536
 
        else
8537
 
          # We have old collect2
8538
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8539
 
          # It fails to find uninstalled libraries when the uninstalled
8540
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
8541
 
          # to unsupported forces relinking
8542
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8543
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8544
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8545
 
        fi
8546
 
      esac
8547
 
      shared_flag='-shared'
8548
 
    else
8549
 
      # not using gcc
8550
 
      if test "$host_cpu" = ia64; then
8551
 
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8552
 
        # chokes on -Wl,-G. The following line is correct:
8553
 
        shared_flag='-G'
8554
 
      else
8555
 
        if test "$aix_use_runtimelinking" = yes; then
8556
 
          shared_flag='-qmkshrobj ${wl}-G'
8557
 
        else
8558
 
          shared_flag='-qmkshrobj'
8559
 
        fi
8560
 
      fi
8561
 
    fi
8562
 
 
8563
 
    # Let the compiler handle the export list.
8564
 
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
8565
 
    if test "$aix_use_runtimelinking" = yes; then
8566
 
      # Warning - without using the other runtime loading flags (-brtl),
8567
 
      # -berok will link without error, but may produce a broken library.
8568
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8569
 
      # Determine the default libpath from the value encoded in an empty executable.
8570
 
      _LT_AC_SYS_LIBPATH_AIX
8571
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8572
 
 
8573
 
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8574
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8575
 
     else
8576
 
      if test "$host_cpu" = ia64; then
8577
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8578
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8579
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8580
 
      else
8581
 
        # Determine the default libpath from the value encoded in an empty executable.
8582
 
        _LT_AC_SYS_LIBPATH_AIX
8583
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8584
 
        # Warning - without using the other run time loading flags,
8585
 
        # -berok will link without error, but may produce a broken library.
8586
 
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8587
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8588
 
        # -bexpall does not export symbols beginning with underscore (_)
8589
 
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8590
 
        # Exported symbols can be pulled into shared objects from archives
8591
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8592
 
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8593
 
        # This is similar to how AIX traditionally builds it's shared libraries.
8594
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8595
 
      fi
8596
 
    fi
8597
 
    ;;
8598
 
  chorus*)
8599
 
    case $cc_basename in
8600
 
      *)
8601
 
        # FIXME: insert proper C++ library support
8602
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8603
 
        ;;
8604
 
    esac
8605
 
    ;;
8606
 
 
8607
 
  cygwin* | mingw* | pw32*)
8608
 
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8609
 
    # as there is no search path for DLLs.
8610
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8611
 
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
8612
 
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
8613
 
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8614
 
 
8615
 
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8616
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8617
 
      # If the export-symbols file already is a .def file (1st line
8618
 
      # is EXPORTS), use it as is; otherwise, prepend...
8619
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8620
 
        cp $export_symbols $output_objdir/$soname.def;
8621
 
      else
8622
 
        echo EXPORTS > $output_objdir/$soname.def;
8623
 
        cat $export_symbols >> $output_objdir/$soname.def;
8624
 
      fi~
8625
 
      $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8626
 
    else
8627
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8628
 
    fi
8629
 
  ;;
8630
 
 
8631
 
  darwin* | rhapsody*)
8632
 
  if test "$GXX" = yes; then
8633
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8634
 
    case "$host_os" in
8635
 
    rhapsody* | darwin1.[[012]])
8636
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8637
 
      ;;
8638
 
    *) # Darwin 1.3 on
8639
 
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8640
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8641
 
      else
8642
 
        case ${MACOSX_DEPLOYMENT_TARGET} in
8643
 
          10.[012])
8644
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8645
 
            ;;
8646
 
          10.*)
8647
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8648
 
            ;;
8649
 
        esac
8650
 
      fi
8651
 
      ;;
8652
 
    esac
8653
 
    lt_int_apple_cc_single_mod=no
8654
 
    output_verbose_link_cmd='echo'
8655
 
    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8656
 
      lt_int_apple_cc_single_mod=yes
8657
 
    fi
8658
 
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8659
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8660
 
    else
8661
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
8662
 
    fi
8663
 
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8664
 
 
8665
 
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8666
 
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8667
 
      _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 $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8668
 
    else
8669
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8670
 
    fi
8671
 
    _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 $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8672
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
8673
 
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8674
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8675
 
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8676
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8677
 
  else
8678
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8679
 
  fi
8680
 
    ;;
8681
 
 
8682
 
  dgux*)
8683
 
    case $cc_basename in
8684
 
      ec++)
8685
 
        # FIXME: insert proper C++ library support
8686
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8687
 
        ;;
8688
 
      ghcx)
8689
 
        # Green Hills C++ Compiler
8690
 
        # FIXME: insert proper C++ library support
8691
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8692
 
        ;;
8693
 
      *)
8694
 
        # FIXME: insert proper C++ library support
8695
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8696
 
        ;;
8697
 
    esac
8698
 
    ;;
8699
 
  freebsd[12]*)
8700
 
    # C++ shared libraries reported to be fairly broken before switch to ELF
8701
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8702
 
    ;;
8703
 
  freebsd-elf*)
8704
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8705
 
    ;;
8706
 
  freebsd*)
8707
 
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8708
 
    # conventions
8709
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8710
 
    ;;
8711
 
  gnu*)
8712
 
    ;;
8713
 
  hpux9*)
8714
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8715
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8716
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8717
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8718
 
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8719
 
                                # but as the default
8720
 
                                # location of the library.
8721
 
 
8722
 
    case $cc_basename in
8723
 
    CC)
8724
 
      # FIXME: insert proper C++ library support
8725
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8726
 
      ;;
8727
 
    aCC)
8728
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8729
 
      # Commands to make compiler produce verbose output that lists
8730
 
      # what "hidden" libraries, object files and flags are used when
8731
 
      # linking a shared library.
8732
 
      #
8733
 
      # There doesn't appear to be a way to prevent this compiler from
8734
 
      # explicitly linking system object files so we need to strip them
8735
 
      # from the output so that they don't get included in the library
8736
 
      # dependencies.
8737
 
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8738
 
      ;;
8739
 
    *)
8740
 
      if test "$GXX" = yes; then
8741
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8742
 
      else
8743
 
        # FIXME: insert proper C++ library support
8744
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8745
 
      fi
8746
 
      ;;
8747
 
    esac
8748
 
    ;;
8749
 
  hpux10*|hpux11*)
8750
 
    if test $with_gnu_ld = no; then
8751
 
      case "$host_cpu" in
8752
 
      hppa*64*)
8753
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8754
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8755
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8756
 
        ;;
8757
 
      ia64*)
8758
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8759
 
        ;;
8760
 
      *)
8761
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8762
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8763
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8764
 
        ;;
8765
 
      esac
8766
 
    fi
8767
 
    case "$host_cpu" in
8768
 
    hppa*64*)
8769
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
8770
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8771
 
      ;;
8772
 
    ia64*)
8773
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
8774
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8775
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8776
 
                                              # but as the default
8777
 
                                              # location of the library.
8778
 
      ;;
8779
 
    *)
8780
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8781
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8782
 
                                              # but as the default
8783
 
                                              # location of the library.
8784
 
      ;;
8785
 
    esac
8786
 
 
8787
 
    case $cc_basename in
8788
 
      CC)
8789
 
        # FIXME: insert proper C++ library support
8790
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8791
 
        ;;
8792
 
      aCC)
8793
 
        case "$host_cpu" in
8794
 
        hppa*64*|ia64*)
8795
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8796
 
          ;;
8797
 
        *)
8798
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8799
 
          ;;
8800
 
        esac
8801
 
        # Commands to make compiler produce verbose output that lists
8802
 
        # what "hidden" libraries, object files and flags are used when
8803
 
        # linking a shared library.
8804
 
        #
8805
 
        # There doesn't appear to be a way to prevent this compiler from
8806
 
        # explicitly linking system object files so we need to strip them
8807
 
        # from the output so that they don't get included in the library
8808
 
        # dependencies.
8809
 
        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'
8810
 
        ;;
8811
 
      *)
8812
 
        if test "$GXX" = yes; then
8813
 
          if test $with_gnu_ld = no; then
8814
 
            case "$host_cpu" in
8815
 
            ia64*|hppa*64*)
8816
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8817
 
              ;;
8818
 
            *)
8819
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8820
 
              ;;
8821
 
            esac
8822
 
          fi
8823
 
        else
8824
 
          # FIXME: insert proper C++ library support
8825
 
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
8826
 
        fi
8827
 
        ;;
8828
 
    esac
8829
 
    ;;
8830
 
  irix5* | irix6*)
8831
 
    case $cc_basename in
8832
 
      CC)
8833
 
        # SGI C++
8834
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8835
 
 
8836
 
        # Archives containing C++ object files must be created using
8837
 
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8838
 
        # necessary to make sure instantiated templates are included
8839
 
        # in the archive.
8840
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8841
 
        ;;
8842
 
      *)
8843
 
        if test "$GXX" = yes; then
8844
 
          if test "$with_gnu_ld" = no; then
8845
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8846
 
          else
8847
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
8848
 
          fi
8849
 
        fi
8850
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8851
 
        ;;
8852
 
    esac
8853
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8854
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8855
 
    ;;
8856
 
  linux*)
8857
 
    case $cc_basename in
8858
 
      KCC)
8859
 
        # Kuck and Associates, Inc. (KAI) C++ Compiler
8860
 
 
8861
 
        # KCC will only create a shared library if the output file
8862
 
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
8863
 
        # to its proper name (with version) after linking.
8864
 
        _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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8865
 
        _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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8866
 
        # Commands to make compiler produce verbose output that lists
8867
 
        # what "hidden" libraries, object files and flags are used when
8868
 
        # linking a shared library.
8869
 
        #
8870
 
        # There doesn't appear to be a way to prevent this compiler from
8871
 
        # explicitly linking system object files so we need to strip them
8872
 
        # from the output so that they don't get included in the library
8873
 
        # dependencies.
8874
 
        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'
8875
 
 
8876
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8877
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8878
 
 
8879
 
        # Archives containing C++ object files must be created using
8880
 
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8881
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8882
 
        ;;
8883
 
      icpc)
8884
 
        # Intel C++
8885
 
        with_gnu_ld=yes
8886
 
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8887
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8888
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8889
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8890
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8891
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8892
 
        ;;
8893
 
      cxx)
8894
 
        # Compaq C++
8895
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8896
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8897
 
 
8898
 
        runpath_var=LD_RUN_PATH
8899
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8900
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8901
 
 
8902
 
        # Commands to make compiler produce verbose output that lists
8903
 
        # what "hidden" libraries, object files and flags are used when
8904
 
        # linking a shared library.
8905
 
        #
8906
 
        # There doesn't appear to be a way to prevent this compiler from
8907
 
        # explicitly linking system object files so we need to strip them
8908
 
        # from the output so that they don't get included in the library
8909
 
        # dependencies.
8910
 
        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'
8911
 
        ;;
8912
 
    esac
8913
 
    ;;
8914
 
  lynxos*)
8915
 
    # FIXME: insert proper C++ library support
8916
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8917
 
    ;;
8918
 
  m88k*)
8919
 
    # FIXME: insert proper C++ library support
8920
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8921
 
    ;;
8922
 
  mvs*)
8923
 
    case $cc_basename in
8924
 
      cxx)
8925
 
        # FIXME: insert proper C++ library support
8926
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8927
 
        ;;
8928
 
      *)
8929
 
        # FIXME: insert proper C++ library support
8930
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8931
 
        ;;
8932
 
    esac
8933
 
    ;;
8934
 
  netbsd*)
8935
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8936
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8937
 
      wlarc=
8938
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8939
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8940
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8941
 
    fi
8942
 
    # Workaround some broken pre-1.5 toolchains
8943
 
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8944
 
    ;;
8945
 
  osf3*)
8946
 
    case $cc_basename in
8947
 
      KCC)
8948
 
        # Kuck and Associates, Inc. (KAI) C++ Compiler
8949
 
 
8950
 
        # KCC will only create a shared library if the output file
8951
 
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
8952
 
        # to its proper name (with version) after linking.
8953
 
        _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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8954
 
 
8955
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8956
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8957
 
 
8958
 
        # Archives containing C++ object files must be created using
8959
 
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8960
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8961
 
 
8962
 
        ;;
8963
 
      RCC)
8964
 
        # Rational C++ 2.4.1
8965
 
        # FIXME: insert proper C++ library support
8966
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8967
 
        ;;
8968
 
      cxx)
8969
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8970
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8971
 
 
8972
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8973
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8974
 
 
8975
 
        # Commands to make compiler produce verbose output that lists
8976
 
        # what "hidden" libraries, object files and flags are used when
8977
 
        # linking a shared library.
8978
 
        #
8979
 
        # There doesn't appear to be a way to prevent this compiler from
8980
 
        # explicitly linking system object files so we need to strip them
8981
 
        # from the output so that they don't get included in the library
8982
 
        # dependencies.
8983
 
        output_verbose_link_cmd='templist=`$CC -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'
8984
 
        ;;
8985
 
      *)
8986
 
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8987
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8988
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8989
 
 
8990
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8991
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8992
 
 
8993
 
          # Commands to make compiler produce verbose output that lists
8994
 
          # what "hidden" libraries, object files and flags are used when
8995
 
          # linking a shared library.
8996
 
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8997
 
 
8998
 
        else
8999
 
          # FIXME: insert proper C++ library support
9000
 
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
9001
 
        fi
9002
 
        ;;
9003
 
    esac
9004
 
    ;;
9005
 
  osf4* | osf5*)
9006
 
    case $cc_basename in
9007
 
      KCC)
9008
 
        # Kuck and Associates, Inc. (KAI) C++ Compiler
9009
 
 
9010
 
        # KCC will only create a shared library if the output file
9011
 
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
9012
 
        # to its proper name (with version) after linking.
9013
 
        _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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
9014
 
 
9015
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9016
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9017
 
 
9018
 
        # Archives containing C++ object files must be created using
9019
 
        # the KAI C++ compiler.
9020
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
9021
 
        ;;
9022
 
      RCC)
9023
 
        # Rational C++ 2.4.1
9024
 
        # FIXME: insert proper C++ library support
9025
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9026
 
        ;;
9027
 
      cxx)
9028
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9029
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
9030
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9031
 
          echo "-hidden">> $lib.exp~
9032
 
          $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
9033
 
          $rm $lib.exp'
9034
 
 
9035
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9036
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9037
 
 
9038
 
        # Commands to make compiler produce verbose output that lists
9039
 
        # what "hidden" libraries, object files and flags are used when
9040
 
        # linking a shared library.
9041
 
        #
9042
 
        # There doesn't appear to be a way to prevent this compiler from
9043
 
        # explicitly linking system object files so we need to strip them
9044
 
        # from the output so that they don't get included in the library
9045
 
        # dependencies.
9046
 
        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'
9047
 
        ;;
9048
 
      *)
9049
 
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9050
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9051
 
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
9052
 
 
9053
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9054
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9055
 
 
9056
 
          # Commands to make compiler produce verbose output that lists
9057
 
          # what "hidden" libraries, object files and flags are used when
9058
 
          # linking a shared library.
9059
 
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9060
 
 
9061
 
        else
9062
 
          # FIXME: insert proper C++ library support
9063
 
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
9064
 
        fi
9065
 
        ;;
9066
 
    esac
9067
 
    ;;
9068
 
  psos*)
9069
 
    # FIXME: insert proper C++ library support
9070
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9071
 
    ;;
9072
 
  sco*)
9073
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9074
 
    case $cc_basename in
9075
 
      CC)
9076
 
        # FIXME: insert proper C++ library support
9077
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9078
 
        ;;
9079
 
      *)
9080
 
        # FIXME: insert proper C++ library support
9081
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9082
 
        ;;
9083
 
    esac
9084
 
    ;;
9085
 
  sunos4*)
9086
 
    case $cc_basename in
9087
 
      CC)
9088
 
        # Sun C++ 4.x
9089
 
        # FIXME: insert proper C++ library support
9090
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9091
 
        ;;
9092
 
      lcc)
9093
 
        # Lucid
9094
 
        # FIXME: insert proper C++ library support
9095
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9096
 
        ;;
9097
 
      *)
9098
 
        # FIXME: insert proper C++ library support
9099
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9100
 
        ;;
9101
 
    esac
9102
 
    ;;
9103
 
  solaris*)
9104
 
    case $cc_basename in
9105
 
      CC)
9106
 
        # Sun C++ 4.2, 5.x and Centerline C++
9107
 
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9108
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
9109
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9110
 
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9111
 
 
9112
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9113
 
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9114
 
        case $host_os in
9115
 
          solaris2.[0-5] | solaris2.[0-5].*) ;;
9116
 
          *)
9117
 
            # The C++ compiler is used as linker so we must use $wl
9118
 
            # flag to pass the commands to the underlying system
9119
 
            # linker.
9120
 
            # Supported since Solaris 2.6 (maybe 2.5.1?)
9121
 
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9122
 
            ;;
9123
 
        esac
9124
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9125
 
 
9126
 
        # Commands to make compiler produce verbose output that lists
9127
 
        # what "hidden" libraries, object files and flags are used when
9128
 
        # linking a shared library.
9129
 
        #
9130
 
        # There doesn't appear to be a way to prevent this compiler from
9131
 
        # explicitly linking system object files so we need to strip them
9132
 
        # from the output so that they don't get included in the library
9133
 
        # dependencies.
9134
 
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9135
 
 
9136
 
        # Archives containing C++ object files must be created using
9137
 
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
9138
 
        # necessary to make sure instantiated templates are included
9139
 
        # in the archive.
9140
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9141
 
        ;;
9142
 
      gcx)
9143
 
        # Green Hills C++ Compiler
9144
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9145
 
 
9146
 
        # The C++ compiler must be used to create the archive.
9147
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9148
 
        ;;
9149
 
      *)
9150
 
        # GNU C++ compiler with Solaris linker
9151
 
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9152
 
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9153
 
          if $CC --version | grep -v '^2\.7' > /dev/null; then
9154
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9155
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9156
 
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9157
 
 
9158
 
            # Commands to make compiler produce verbose output that lists
9159
 
            # what "hidden" libraries, object files and flags are used when
9160
 
            # linking a shared library.
9161
 
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9162
 
          else
9163
 
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
9164
 
            # platform.
9165
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9166
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9167
 
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9168
 
 
9169
 
            # Commands to make compiler produce verbose output that lists
9170
 
            # what "hidden" libraries, object files and flags are used when
9171
 
            # linking a shared library.
9172
 
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9173
 
          fi
9174
 
 
9175
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9176
 
        fi
9177
 
        ;;
9178
 
    esac
9179
 
    ;;
9180
 
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
9181
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9182
 
    ;;
9183
 
  tandem*)
9184
 
    case $cc_basename in
9185
 
      NCC)
9186
 
        # NonStop-UX NCC 3.20
9187
 
        # FIXME: insert proper C++ library support
9188
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9189
 
        ;;
9190
 
      *)
9191
 
        # FIXME: insert proper C++ library support
9192
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9193
 
        ;;
9194
 
    esac
9195
 
    ;;
9196
 
  vxworks*)
9197
 
    # FIXME: insert proper C++ library support
9198
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9199
 
    ;;
9200
 
  *)
9201
 
    # FIXME: insert proper C++ library support
9202
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9203
 
    ;;
9204
 
esac
9205
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9206
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9207
 
 
9208
 
_LT_AC_TAGVAR(GCC, $1)="$GXX"
9209
 
_LT_AC_TAGVAR(LD, $1)="$LD"
9210
 
 
9211
 
AC_LIBTOOL_POSTDEP_PREDEP($1)
9212
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9213
 
AC_LIBTOOL_PROG_CC_C_O($1)
9214
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9215
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9216
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9217
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9218
 
AC_LIBTOOL_SYS_LIB_STRIP
9219
 
AC_LIBTOOL_DLOPEN_SELF($1)
9220
 
 
9221
 
AC_LIBTOOL_CONFIG($1)
9222
 
 
9223
 
AC_LANG_POP
9224
 
CC=$lt_save_CC
9225
 
LDCXX=$LD
9226
 
LD=$lt_save_LD
9227
 
GCC=$lt_save_GCC
9228
 
with_gnu_ldcxx=$with_gnu_ld
9229
 
with_gnu_ld=$lt_save_with_gnu_ld
9230
 
lt_cv_path_LDCXX=$lt_cv_path_LD
9231
 
lt_cv_path_LD=$lt_save_path_LD
9232
 
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9233
 
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9234
 
])# AC_LIBTOOL_LANG_CXX_CONFIG
9235
 
 
9236
 
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
9237
 
# ------------------------
9238
 
# Figure out "hidden" library dependencies from verbose
9239
 
# compiler output when linking a shared library.
9240
 
# Parse the compiler output and extract the necessary
9241
 
# objects, libraries and library flags.
9242
 
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
9243
 
dnl we can't use the lt_simple_compile_test_code here,
9244
 
dnl because it contains code intended for an executable,
9245
 
dnl not a library.  It's possible we should let each
9246
 
dnl tag define a new lt_????_link_test_code variable,
9247
 
dnl but it's only used here...
9248
 
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9249
 
int a;
9250
 
void foo (void) { a = 0; }
9251
 
EOF
9252
 
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9253
 
class Foo
9254
 
{
9255
 
public:
9256
 
  Foo (void) { a = 0; }
9257
 
private:
9258
 
  int a;
9259
 
};
9260
 
EOF
9261
 
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9262
 
      subroutine foo
9263
 
      implicit none
9264
 
      integer*4 a
9265
 
      a=0
9266
 
      return
9267
 
      end
9268
 
EOF
9269
 
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9270
 
public class foo {
9271
 
  private int a;
9272
 
  public void bar (void) {
9273
 
    a = 0;
9274
 
  }
9275
 
};
9276
 
EOF
9277
 
])
9278
 
dnl Parse the compiler output and extract the necessary
9279
 
dnl objects, libraries and library flags.
9280
 
if AC_TRY_EVAL(ac_compile); then
9281
 
  # Parse the compiler output and extract the necessary
9282
 
  # objects, libraries and library flags.
9283
 
 
9284
 
  # Sentinel used to keep track of whether or not we are before
9285
 
  # the conftest object file.
9286
 
  pre_test_object_deps_done=no
9287
 
 
9288
 
  # The `*' in the case matches for architectures that use `case' in
9289
 
  # $output_verbose_cmd can trigger glob expansion during the loop
9290
 
  # eval without this substitution.
9291
 
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
9292
 
 
9293
 
  for p in `eval $output_verbose_link_cmd`; do
9294
 
    case $p in
9295
 
 
9296
 
    -L* | -R* | -l*)
9297
 
       # Some compilers place space between "-{L,R}" and the path.
9298
 
       # Remove the space.
9299
 
       if test $p = "-L" \
9300
 
          || test $p = "-R"; then
9301
 
         prev=$p
9302
 
         continue
9303
 
       else
9304
 
         prev=
9305
 
       fi
9306
 
 
9307
 
       if test "$pre_test_object_deps_done" = no; then
9308
 
         case $p in
9309
 
         -L* | -R*)
9310
 
           # Internal compiler library paths should come after those
9311
 
           # provided the user.  The postdeps already come after the
9312
 
           # user supplied libs so there is no need to process them.
9313
 
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9314
 
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9315
 
           else
9316
 
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9317
 
           fi
9318
 
           ;;
9319
 
         # The "-l" case would never come before the object being
9320
 
         # linked, so don't bother handling this case.
9321
 
         esac
9322
 
       else
9323
 
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9324
 
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9325
 
         else
9326
 
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9327
 
         fi
9328
 
       fi
9329
 
       ;;
9330
 
 
9331
 
    *.$objext|*.$libext)
9332
 
       # This assumes that the test object file only shows up
9333
 
       # once in the compiler output.
9334
 
       if test "$p" = "conftest.$objext"; then
9335
 
         pre_test_object_deps_done=yes
9336
 
         continue
9337
 
       fi
9338
 
 
9339
 
       if test "$pre_test_object_deps_done" = no; then
9340
 
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9341
 
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
9342
 
         else
9343
 
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9344
 
         fi
9345
 
       else
9346
 
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9347
 
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
9348
 
         else
9349
 
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9350
 
         fi
9351
 
       fi
9352
 
       ;;
9353
 
 
9354
 
    *) ;; # Ignore the rest.
9355
 
 
9356
 
    esac
9357
 
  done
9358
 
 
9359
 
  # Clean up.
9360
 
  rm -f a.out a.exe
9361
 
else
9362
 
  echo "libtool.m4: error: problem compiling $1 test program"
9363
 
fi
9364
 
 
9365
 
$rm -f confest.$objext
9366
 
 
9367
 
case " $_LT_AC_TAGVAR(postdeps, $1) " in
9368
 
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9369
 
esac
9370
 
])# AC_LIBTOOL_POSTDEP_PREDEP
9371
 
 
9372
 
# AC_LIBTOOL_LANG_F77_CONFIG
9373
 
# ------------------------
9374
 
# Ensure that the configuration vars for the C compiler are
9375
 
# suitably defined.  Those variables are subsequently used by
9376
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9377
 
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9378
 
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
9379
 
[AC_REQUIRE([AC_PROG_F77])
9380
 
AC_LANG_PUSH(Fortran 77)
9381
 
 
9382
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9383
 
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9384
 
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9385
 
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9386
 
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9387
 
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9388
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9389
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9390
 
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9391
 
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9392
 
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
9393
 
_LT_AC_TAGVAR(module_cmds, $1)=
9394
 
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
9395
 
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9396
 
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9397
 
_LT_AC_TAGVAR(no_undefined_flag, $1)=
9398
 
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9399
 
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9400
 
 
9401
 
# Source file extension for f77 test sources.
9402
 
ac_ext=f
9403
 
 
9404
 
# Object file extension for compiled f77 test sources.
9405
 
objext=o
9406
 
_LT_AC_TAGVAR(objext, $1)=$objext
9407
 
 
9408
 
# Code to be used in simple compile tests
9409
 
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
9410
 
 
9411
 
# Code to be used in simple link tests
9412
 
lt_simple_link_test_code="      program t\n      end\n"
9413
 
 
9414
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9415
 
_LT_AC_SYS_COMPILER
9416
 
 
9417
 
# Allow CC to be a program name with arguments.
9418
 
lt_save_CC="$CC"
9419
 
CC=${F77-"f77"}
9420
 
compiler=$CC
9421
 
_LT_AC_TAGVAR(compiler, $1)=$CC
9422
 
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
9423
 
 
9424
 
AC_MSG_CHECKING([if libtool supports shared libraries])
9425
 
AC_MSG_RESULT([$can_build_shared])
9426
 
 
9427
 
AC_MSG_CHECKING([whether to build shared libraries])
9428
 
test "$can_build_shared" = "no" && enable_shared=no
9429
 
 
9430
 
# On AIX, shared libraries and static libraries use the same namespace, and
9431
 
# are all built from PIC.
9432
 
case "$host_os" in
9433
 
aix3*)
9434
 
  test "$enable_shared" = yes && enable_static=no
9435
 
  if test -n "$RANLIB"; then
9436
 
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
9437
 
    postinstall_cmds='$RANLIB $lib'
9438
 
  fi
9439
 
  ;;
9440
 
aix4*)
9441
 
  test "$enable_shared" = yes && enable_static=no
9442
 
  ;;
9443
 
esac
9444
 
AC_MSG_RESULT([$enable_shared])
9445
 
 
9446
 
AC_MSG_CHECKING([whether to build static libraries])
9447
 
# Make sure either enable_shared or enable_static is yes.
9448
 
test "$enable_shared" = yes || enable_static=yes
9449
 
AC_MSG_RESULT([$enable_static])
9450
 
 
9451
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9452
 
 
9453
 
_LT_AC_TAGVAR(GCC, $1)="$G77"
9454
 
_LT_AC_TAGVAR(LD, $1)="$LD"
9455
 
 
9456
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9457
 
AC_LIBTOOL_PROG_CC_C_O($1)
9458
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9459
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9460
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9461
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9462
 
AC_LIBTOOL_SYS_LIB_STRIP
9463
 
 
9464
 
 
9465
 
AC_LIBTOOL_CONFIG($1)
9466
 
 
9467
 
AC_LANG_POP
9468
 
CC="$lt_save_CC"
9469
 
])# AC_LIBTOOL_LANG_F77_CONFIG
9470
 
 
9471
 
 
9472
 
# AC_LIBTOOL_LANG_GCJ_CONFIG
9473
 
# --------------------------
9474
 
# Ensure that the configuration vars for the C compiler are
9475
 
# suitably defined.  Those variables are subsequently used by
9476
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9477
 
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9478
 
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9479
 
[AC_LANG_SAVE
9480
 
 
9481
 
# Source file extension for Java test sources.
9482
 
ac_ext=java
9483
 
 
9484
 
# Object file extension for compiled Java test sources.
9485
 
objext=o
9486
 
_LT_AC_TAGVAR(objext, $1)=$objext
9487
 
 
9488
 
# Code to be used in simple compile tests
9489
 
lt_simple_compile_test_code="class foo {}\n"
9490
 
 
9491
 
# Code to be used in simple link tests
9492
 
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9493
 
 
9494
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9495
 
_LT_AC_SYS_COMPILER
9496
 
 
9497
 
# Allow CC to be a program name with arguments.
9498
 
lt_save_CC="$CC"
9499
 
CC=${GCJ-"gcj"}
9500
 
compiler=$CC
9501
 
_LT_AC_TAGVAR(compiler, $1)=$CC
9502
 
 
9503
 
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9504
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9505
 
 
9506
 
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9507
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9508
 
AC_LIBTOOL_PROG_CC_C_O($1)
9509
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9510
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9511
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9512
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9513
 
AC_LIBTOOL_SYS_LIB_STRIP
9514
 
AC_LIBTOOL_DLOPEN_SELF($1)
9515
 
 
9516
 
AC_LIBTOOL_CONFIG($1)
9517
 
 
9518
 
AC_LANG_RESTORE
9519
 
CC="$lt_save_CC"
9520
 
])# AC_LIBTOOL_LANG_GCJ_CONFIG
9521
 
 
9522
 
 
9523
 
# AC_LIBTOOL_LANG_RC_CONFIG
9524
 
# --------------------------
9525
 
# Ensure that the configuration vars for the Windows resource compiler are
9526
 
# suitably defined.  Those variables are subsequently used by
9527
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9528
 
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9529
 
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
9530
 
[AC_LANG_SAVE
9531
 
 
9532
 
# Source file extension for RC test sources.
9533
 
ac_ext=rc
9534
 
 
9535
 
# Object file extension for compiled RC test sources.
9536
 
objext=o
9537
 
_LT_AC_TAGVAR(objext, $1)=$objext
9538
 
 
9539
 
# Code to be used in simple compile tests
9540
 
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9541
 
 
9542
 
# Code to be used in simple link tests
9543
 
lt_simple_link_test_code="$lt_simple_compile_test_code"
9544
 
 
9545
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9546
 
_LT_AC_SYS_COMPILER
9547
 
 
9548
 
# Allow CC to be a program name with arguments.
9549
 
lt_save_CC="$CC"
9550
 
CC=${RC-"windres"}
9551
 
compiler=$CC
9552
 
_LT_AC_TAGVAR(compiler, $1)=$CC
9553
 
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9554
 
 
9555
 
AC_LIBTOOL_CONFIG($1)
9556
 
 
9557
 
AC_LANG_RESTORE
9558
 
CC="$lt_save_CC"
9559
 
])# AC_LIBTOOL_LANG_RC_CONFIG
9560
 
 
9561
 
 
9562
 
# AC_LIBTOOL_CONFIG([TAGNAME])
9563
 
# ----------------------------
9564
 
# If TAGNAME is not passed, then create an initial libtool script
9565
 
# with a default configuration from the untagged config vars.  Otherwise
9566
 
# add code to config.status for appending the configuration named by
9567
 
# TAGNAME from the matching tagged config vars.
9568
 
AC_DEFUN([AC_LIBTOOL_CONFIG],
9569
 
[# The else clause should only fire when bootstrapping the
9570
 
# libtool distribution, otherwise you forgot to ship ltmain.sh
9571
 
# with your package, and you will get complaints that there are
9572
 
# no rules to generate ltmain.sh.
9573
 
if test -f "$ltmain"; then
9574
 
  # See if we are running on zsh, and set the options which allow our commands through
9575
 
  # without removal of \ escapes.
9576
 
  if test -n "${ZSH_VERSION+set}" ; then
9577
 
    setopt NO_GLOB_SUBST
9578
 
  fi  
9579
 
  # Now quote all the things that may contain metacharacters while being
9580
 
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
9581
 
  # variables and quote the copies for generation of the libtool script.
9582
 
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9583
 
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9584
 
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9585
 
    deplibs_check_method reload_flag reload_cmds need_locks \
9586
 
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9587
 
    lt_cv_sys_global_symbol_to_c_name_address \
9588
 
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9589
 
    old_postinstall_cmds old_postuninstall_cmds \
9590
 
    _LT_AC_TAGVAR(compiler, $1) \
9591
 
    _LT_AC_TAGVAR(CC, $1) \
9592
 
    _LT_AC_TAGVAR(LD, $1) \
9593
 
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9594
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9595
 
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9596
 
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9597
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9598
 
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9599
 
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9600
 
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9601
 
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
9602
 
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9603
 
    _LT_AC_TAGVAR(predep_objects, $1) \
9604
 
    _LT_AC_TAGVAR(postdep_objects, $1) \
9605
 
    _LT_AC_TAGVAR(predeps, $1) \
9606
 
    _LT_AC_TAGVAR(postdeps, $1) \
9607
 
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9608
 
    _LT_AC_TAGVAR(archive_cmds, $1) \
9609
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9610
 
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
9611
 
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
9612
 
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9613
 
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
9614
 
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
9615
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
9616
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9617
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9618
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9619
 
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
9620
 
    _LT_AC_TAGVAR(module_cmds, $1) \
9621
 
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
9622
 
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9623
 
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
9624
 
    _LT_AC_TAGVAR(include_expsyms, $1); do
9625
 
 
9626
 
    case $var in
9627
 
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
9628
 
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9629
 
    _LT_AC_TAGVAR(archive_cmds, $1) | \
9630
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9631
 
    _LT_AC_TAGVAR(module_cmds, $1) | \
9632
 
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
9633
 
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9634
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9635
 
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
9636
 
    postinstall_cmds | postuninstall_cmds | \
9637
 
    old_postinstall_cmds | old_postuninstall_cmds | \
9638
 
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9639
 
      # Double-quote double-evaled strings.
9640
 
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9641
 
      ;;
9642
 
    *)
9643
 
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9644
 
      ;;
9645
 
    esac
9646
 
  done
9647
 
 
9648
 
  case $lt_echo in
9649
 
  *'\[$]0 --fallback-echo"')
9650
 
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9651
 
    ;;
9652
 
  esac
9653
 
 
9654
 
ifelse([$1], [],
9655
 
  [cfgfile="${ofile}T"
9656
 
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9657
 
  $rm -f "$cfgfile"
9658
 
  AC_MSG_NOTICE([creating $ofile])],
9659
 
  [cfgfile="$ofile"])
9660
 
 
9661
 
  cat <<__EOF__ >> "$cfgfile"
9662
 
ifelse([$1], [],
9663
 
[#! $SHELL
9664
 
 
9665
 
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9666
 
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9667
 
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
9668
 
#
9669
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9670
 
# Free Software Foundation, Inc.
9671
 
#
9672
 
# This file is part of GNU Libtool:
9673
 
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9674
 
#
9675
 
# This program is free software; you can redistribute it and/or modify
9676
 
# it under the terms of the GNU General Public License as published by
9677
 
# the Free Software Foundation; either version 2 of the License, or
9678
 
# (at your option) any later version.
9679
 
#
9680
 
# This program is distributed in the hope that it will be useful, but
9681
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
9682
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9683
 
# General Public License for more details.
9684
 
#
9685
 
# You should have received a copy of the GNU General Public License
9686
 
# along with this program; if not, write to the Free Software
9687
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9688
 
#
9689
 
# As a special exception to the GNU General Public License, if you
9690
 
# distribute this file as part of a program that contains a
9691
 
# configuration script generated by Autoconf, you may include it under
9692
 
# the same distribution terms that you use for the rest of that program.
9693
 
 
9694
 
# A sed program that does not truncate output.
9695
 
SED=$lt_SED
9696
 
 
9697
 
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
9698
 
Xsed="$SED -e s/^X//"
9699
 
 
9700
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
9701
 
# if CDPATH is set.
9702
 
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9703
 
 
9704
 
# The names of the tagged configurations supported by this script.
9705
 
available_tags=
9706
 
 
9707
 
# ### BEGIN LIBTOOL CONFIG],
9708
 
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9709
 
 
9710
 
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9711
 
 
9712
 
# Shell to use when invoking shell scripts.
9713
 
SHELL=$lt_SHELL
9714
 
 
9715
 
# Whether or not to build shared libraries.
9716
 
build_libtool_libs=$enable_shared
9717
 
 
9718
 
# Whether or not to build static libraries.
9719
 
build_old_libs=$enable_static
9720
 
 
9721
 
# Whether or not to add -lc for building shared libraries.
9722
 
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9723
 
 
9724
 
# Whether or not to disallow shared libs when runtime libs are static
9725
 
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9726
 
 
9727
 
# Whether or not to optimize for fast installation.
9728
 
fast_install=$enable_fast_install
9729
 
 
9730
 
# The host system.
9731
 
host_alias=$host_alias
9732
 
host=$host
9733
 
 
9734
 
# An echo program that does not interpret backslashes.
9735
 
echo=$lt_echo
9736
 
 
9737
 
# The archiver.
9738
 
AR=$lt_AR
9739
 
AR_FLAGS=$lt_AR_FLAGS
9740
 
 
9741
 
# A C compiler.
9742
 
LTCC=$lt_LTCC
9743
 
 
9744
 
# A language-specific compiler.
9745
 
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
9746
 
 
9747
 
# Is the compiler the GNU C compiler?
9748
 
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
9749
 
 
9750
 
# An ERE matcher.
9751
 
EGREP=$lt_EGREP
9752
 
 
9753
 
# The linker used to build libraries.
9754
 
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
9755
 
 
9756
 
# Whether we need hard or soft links.
9757
 
LN_S=$lt_LN_S
9758
 
 
9759
 
# A BSD-compatible nm program.
9760
 
NM=$lt_NM
9761
 
 
9762
 
# A symbol stripping program
9763
 
STRIP=$STRIP
9764
 
 
9765
 
# Used to examine libraries when file_magic_cmd begins "file"
9766
 
MAGIC_CMD=$MAGIC_CMD
9767
 
 
9768
 
# Used on cygwin: DLL creation program.
9769
 
DLLTOOL="$DLLTOOL"
9770
 
 
9771
 
# Used on cygwin: object dumper.
9772
 
OBJDUMP="$OBJDUMP"
9773
 
 
9774
 
# Used on cygwin: assembler.
9775
 
AS="$AS"
9776
 
 
9777
 
# The name of the directory that contains temporary libtool files.
9778
 
objdir=$objdir
9779
 
 
9780
 
# How to create reloadable object files.
9781
 
reload_flag=$lt_reload_flag
9782
 
reload_cmds=$lt_reload_cmds
9783
 
 
9784
 
# How to pass a linker flag through the compiler.
9785
 
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9786
 
 
9787
 
# Object file suffix (normally "o").
9788
 
objext="$ac_objext"
9789
 
 
9790
 
# Old archive suffix (normally "a").
9791
 
libext="$libext"
9792
 
 
9793
 
# Shared library suffix (normally ".so").
9794
 
shrext='$shrext'
9795
 
 
9796
 
# Executable file suffix (normally "").
9797
 
exeext="$exeext"
9798
 
 
9799
 
# Additional compiler flags for building library objects.
9800
 
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9801
 
pic_mode=$pic_mode
9802
 
 
9803
 
# What is the maximum length of a command?
9804
 
max_cmd_len=$lt_cv_sys_max_cmd_len
9805
 
 
9806
 
# Does compiler simultaneously support -c and -o options?
9807
 
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
9808
 
 
9809
 
# Must we lock files when doing compilation ?
9810
 
need_locks=$lt_need_locks
9811
 
 
9812
 
# Do we need the lib prefix for modules?
9813
 
need_lib_prefix=$need_lib_prefix
9814
 
 
9815
 
# Do we need a version for libraries?
9816
 
need_version=$need_version
9817
 
 
9818
 
# Whether dlopen is supported.
9819
 
dlopen_support=$enable_dlopen
9820
 
 
9821
 
# Whether dlopen of programs is supported.
9822
 
dlopen_self=$enable_dlopen_self
9823
 
 
9824
 
# Whether dlopen of statically linked programs is supported.
9825
 
dlopen_self_static=$enable_dlopen_self_static
9826
 
 
9827
 
# Compiler flag to prevent dynamic linking.
9828
 
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9829
 
 
9830
 
# Compiler flag to turn off builtin functions.
9831
 
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9832
 
 
9833
 
# Compiler flag to allow reflexive dlopens.
9834
 
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9835
 
 
9836
 
# Compiler flag to generate shared objects directly from archives.
9837
 
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9838
 
 
9839
 
# Compiler flag to generate thread-safe objects.
9840
 
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9841
 
 
9842
 
# Library versioning type.
9843
 
version_type=$version_type
9844
 
 
9845
 
# Format of library name prefix.
9846
 
libname_spec=$lt_libname_spec
9847
 
 
9848
 
# List of archive names.  First name is the real one, the rest are links.
9849
 
# The last name is the one that the linker finds with -lNAME.
9850
 
library_names_spec=$lt_library_names_spec
9851
 
 
9852
 
# The coded name of the library, if different from the real name.
9853
 
soname_spec=$lt_soname_spec
9854
 
 
9855
 
# Commands used to build and install an old-style archive.
9856
 
RANLIB=$lt_RANLIB
9857
 
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9858
 
old_postinstall_cmds=$lt_old_postinstall_cmds
9859
 
old_postuninstall_cmds=$lt_old_postuninstall_cmds
9860
 
 
9861
 
# Create an old-style archive from a shared archive.
9862
 
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9863
 
 
9864
 
# Create a temporary old-style archive to link instead of a shared archive.
9865
 
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9866
 
 
9867
 
# Commands used to build and install a shared archive.
9868
 
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9869
 
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9870
 
postinstall_cmds=$lt_postinstall_cmds
9871
 
postuninstall_cmds=$lt_postuninstall_cmds
9872
 
 
9873
 
# Commands used to build a loadable module (assumed same as above if empty)
9874
 
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
9875
 
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
9876
 
 
9877
 
# Commands to strip libraries.
9878
 
old_striplib=$lt_old_striplib
9879
 
striplib=$lt_striplib
9880
 
 
9881
 
# Dependencies to place before the objects being linked to create a
9882
 
# shared library.
9883
 
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9884
 
 
9885
 
# Dependencies to place after the objects being linked to create a
9886
 
# shared library.
9887
 
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9888
 
 
9889
 
# Dependencies to place before the objects being linked to create a
9890
 
# shared library.
9891
 
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9892
 
 
9893
 
# Dependencies to place after the objects being linked to create a
9894
 
# shared library.
9895
 
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9896
 
 
9897
 
# The library search path used internally by the compiler when linking
9898
 
# a shared library.
9899
 
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9900
 
 
9901
 
# Method to check whether dependent libraries are shared objects.
9902
 
deplibs_check_method=$lt_deplibs_check_method
9903
 
 
9904
 
# Command to use when deplibs_check_method == file_magic.
9905
 
file_magic_cmd=$lt_file_magic_cmd
9906
 
 
9907
 
# Flag that allows shared libraries with undefined symbols to be built.
9908
 
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9909
 
 
9910
 
# Flag that forces no undefined symbols.
9911
 
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9912
 
 
9913
 
# Commands used to finish a libtool library installation in a directory.
9914
 
finish_cmds=$lt_finish_cmds
9915
 
 
9916
 
# Same as above, but a single script fragment to be evaled but not shown.
9917
 
finish_eval=$lt_finish_eval
9918
 
 
9919
 
# Take the output of nm and produce a listing of raw symbols and C names.
9920
 
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9921
 
 
9922
 
# Transform the output of nm in a proper C declaration
9923
 
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9924
 
 
9925
 
# Transform the output of nm in a C name address pair
9926
 
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9927
 
 
9928
 
# This is the shared library runtime path variable.
9929
 
runpath_var=$runpath_var
9930
 
 
9931
 
# This is the shared library path variable.
9932
 
shlibpath_var=$shlibpath_var
9933
 
 
9934
 
# Is shlibpath searched before the hard-coded library search path?
9935
 
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9936
 
 
9937
 
# How to hardcode a shared library path into an executable.
9938
 
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9939
 
 
9940
 
# Whether we should hardcode library paths into libraries.
9941
 
hardcode_into_libs=$hardcode_into_libs
9942
 
 
9943
 
# Flag to hardcode \$libdir into a binary during linking.
9944
 
# This must work even if \$libdir does not exist.
9945
 
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9946
 
 
9947
 
# If ld is used when linking, flag to hardcode \$libdir into
9948
 
# a binary during linking. This must work even if \$libdir does
9949
 
# not exist.
9950
 
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
9951
 
 
9952
 
# Whether we need a single -rpath flag with a separated argument.
9953
 
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9954
 
 
9955
 
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
9956
 
# resulting binary.
9957
 
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9958
 
 
9959
 
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9960
 
# resulting binary.
9961
 
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9962
 
 
9963
 
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9964
 
# the resulting binary.
9965
 
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9966
 
 
9967
 
# Set to yes if building a shared library automatically hardcodes DIR into the library
9968
 
# and all subsequent libraries and executables linked against it.
9969
 
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
9970
 
 
9971
 
# Variables whose values should be saved in libtool wrapper scripts and
9972
 
# restored at relink time.
9973
 
variables_saved_for_relink="$variables_saved_for_relink"
9974
 
 
9975
 
# Whether libtool must link a program against all its dependency libraries.
9976
 
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9977
 
 
9978
 
# Compile-time system search path for libraries
9979
 
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9980
 
 
9981
 
# Run-time system search path for libraries
9982
 
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9983
 
 
9984
 
# Fix the shell variable \$srcfile for the compiler.
9985
 
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9986
 
 
9987
 
# Set to yes if exported symbols are required.
9988
 
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9989
 
 
9990
 
# The commands to list exported symbols.
9991
 
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9992
 
 
9993
 
# The commands to extract the exported symbol list from a shared archive.
9994
 
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9995
 
 
9996
 
# Symbols that should not be listed in the preloaded symbols.
9997
 
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9998
 
 
9999
 
# Symbols that must always be exported.
10000
 
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
10001
 
 
10002
 
ifelse([$1],[],
10003
 
[# ### END LIBTOOL CONFIG],
10004
 
[# ### END LIBTOOL TAG CONFIG: $tagname])
10005
 
 
10006
 
__EOF__
10007
 
 
10008
 
ifelse([$1],[], [
10009
 
  case $host_os in
10010
 
  aix3*)
10011
 
    cat <<\EOF >> "$cfgfile"
10012
 
 
10013
 
# AIX sometimes has problems with the GCC collect2 program.  For some
10014
 
# reason, if we set the COLLECT_NAMES environment variable, the problems
10015
 
# vanish in a puff of smoke.
10016
 
if test "X${COLLECT_NAMES+set}" != Xset; then
10017
 
  COLLECT_NAMES=
10018
 
  export COLLECT_NAMES
10019
 
fi
10020
 
EOF
10021
 
    ;;
10022
 
  esac
10023
 
 
10024
 
  # We use sed instead of cat because bash on DJGPP gets confused if
10025
 
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10026
 
  # text mode, it properly converts lines to CR/LF.  This bash problem
10027
 
  # is reportedly fixed, but why not run on old versions too?
10028
 
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10029
 
 
10030
 
  mv -f "$cfgfile" "$ofile" || \
10031
 
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10032
 
  chmod +x "$ofile"
10033
 
])
10034
 
else
10035
 
  # If there is no Makefile yet, we rely on a make rule to execute
10036
 
  # `config.status --recheck' to rerun these tests and create the
10037
 
  # libtool script then.
10038
 
  test -f Makefile && make "$ltmain"
10039
 
fi
10040
 
])# AC_LIBTOOL_CONFIG
10041
 
 
10042
 
 
10043
 
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
10044
 
# -------------------------------------------
10045
 
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
10046
 
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10047
 
 
10048
 
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
10049
 
 
10050
 
if test "$GCC" = yes; then
10051
 
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
10052
 
 
10053
 
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
10054
 
    lt_cv_prog_compiler_rtti_exceptions,
10055
 
    [-fno-rtti -fno-exceptions], [],
10056
 
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
10057
 
fi
10058
 
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
10059
 
 
10060
 
 
10061
 
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10062
 
# ---------------------------------
10063
 
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
10064
 
[AC_REQUIRE([AC_CANONICAL_HOST])
10065
 
AC_REQUIRE([AC_PROG_NM])
10066
 
AC_REQUIRE([AC_OBJEXT])
10067
 
# Check for command to grab the raw symbol name followed by C symbol from nm.
10068
 
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
10069
 
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
10070
 
[
10071
 
# These are sane defaults that work on at least a few old systems.
10072
 
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
10073
 
 
10074
 
# Character class describing NM global symbol codes.
10075
 
symcode='[[BCDEGRST]]'
10076
 
 
10077
 
# Regexp to match symbols that can be accessed directly from C.
10078
 
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
10079
 
 
10080
 
# Transform the above into a raw symbol and a C symbol.
10081
 
symxfrm='\1 \2\3 \3'
10082
 
 
10083
 
# Transform an extracted symbol line into a proper C declaration
10084
 
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
10085
 
 
10086
 
# Transform an extracted symbol line into symbol name and symbol address
10087
 
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'"
10088
 
 
10089
 
# Define system-specific variables.
10090
 
case $host_os in
10091
 
aix*)
10092
 
  symcode='[[BCDT]]'
10093
 
  ;;
10094
 
cygwin* | mingw* | pw32*)
10095
 
  symcode='[[ABCDGISTW]]'
10096
 
  ;;
10097
 
hpux*) # Its linker distinguishes data from code symbols
10098
 
  if test "$host_cpu" = ia64; then
10099
 
    symcode='[[ABCDEGRST]]'
10100
 
  fi
10101
 
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10102
 
  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'"
10103
 
  ;;
10104
 
irix* | nonstopux*)
10105
 
  symcode='[[BCDEGRST]]'
10106
 
  ;;
10107
 
osf*)
10108
 
  symcode='[[BCDEGQRST]]'
10109
 
  ;;
10110
 
solaris* | sysv5*)
10111
 
  symcode='[[BDT]]'
10112
 
  ;;
10113
 
sysv4)
10114
 
  symcode='[[DFNSTU]]'
10115
 
  ;;
10116
 
esac
10117
 
 
10118
 
# Handle CRLF in mingw tool chain
10119
 
opt_cr=
10120
 
case $build_os in
10121
 
mingw*)
10122
 
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10123
 
  ;;
10124
 
esac
10125
 
 
10126
 
# If we're using GNU nm, then use its standard symbol codes.
10127
 
case `$NM -V 2>&1` in
10128
 
*GNU* | *'with BFD'*)
10129
 
  symcode='[[ABCDGISTW]]' ;;
10130
 
esac
10131
 
 
10132
 
# Try without a prefix undercore, then with it.
10133
 
for ac_symprfx in "" "_"; do
10134
 
 
10135
 
  # Write the raw and C identifiers.
10136
 
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
10137
 
 
10138
 
  # Check to see that the pipe works correctly.
10139
 
  pipe_works=no
10140
 
 
10141
 
  rm -f conftest*
10142
 
  cat > conftest.$ac_ext <<EOF
10143
 
#ifdef __cplusplus
10144
 
extern "C" {
10145
 
#endif
10146
 
char nm_test_var;
10147
 
void nm_test_func(){}
10148
 
#ifdef __cplusplus
10149
 
}
10150
 
#endif
10151
 
int main(){nm_test_var='a';nm_test_func();return(0);}
10152
 
EOF
10153
 
 
10154
 
  if AC_TRY_EVAL(ac_compile); then
10155
 
    # Now try to grab the symbols.
10156
 
    nlist=conftest.nm
10157
 
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10158
 
      # Try sorting and uniquifying the output.
10159
 
      if sort "$nlist" | uniq > "$nlist"T; then
10160
 
        mv -f "$nlist"T "$nlist"
10161
 
      else
10162
 
        rm -f "$nlist"T
10163
 
      fi
10164
 
 
10165
 
      # Make sure that we snagged all the symbols we need.
10166
 
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
10167
 
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
10168
 
          cat <<EOF > conftest.$ac_ext
10169
 
#ifdef __cplusplus
10170
 
extern "C" {
10171
 
#endif
10172
 
 
10173
 
EOF
10174
 
          # Now generate the symbol file.
10175
 
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10176
 
 
10177
 
          cat <<EOF >> conftest.$ac_ext
10178
 
#if defined (__STDC__) && __STDC__
10179
 
# define lt_ptr_t void *
10180
 
#else
10181
 
# define lt_ptr_t char *
10182
 
# define const
10183
 
#endif
10184
 
 
10185
 
/* The mapping between symbol names and symbols. */
10186
 
const struct {
10187
 
  const char *name;
10188
 
  lt_ptr_t address;
10189
 
}
10190
 
lt_preloaded_symbols[[]] =
10191
 
{
10192
 
EOF
10193
 
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10194
 
          cat <<\EOF >> conftest.$ac_ext
10195
 
  {0, (lt_ptr_t) 0}
10196
 
};
10197
 
 
10198
 
#ifdef __cplusplus
10199
 
}
10200
 
#endif
10201
 
EOF
10202
 
          # Now try linking the two files.
10203
 
          mv conftest.$ac_objext conftstm.$ac_objext
10204
 
          lt_save_LIBS="$LIBS"
10205
 
          lt_save_CFLAGS="$CFLAGS"
10206
 
          LIBS="conftstm.$ac_objext"
10207
 
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10208
 
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10209
 
            pipe_works=yes
10210
 
          fi
10211
 
          LIBS="$lt_save_LIBS"
10212
 
          CFLAGS="$lt_save_CFLAGS"
10213
 
        else
10214
 
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10215
 
        fi
10216
 
      else
10217
 
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10218
 
      fi
10219
 
    else
10220
 
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10221
 
    fi
10222
 
  else
10223
 
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10224
 
    cat conftest.$ac_ext >&5
10225
 
  fi
10226
 
  rm -f conftest* conftst*
10227
 
 
10228
 
  # Do not use the global_symbol_pipe unless it works.
10229
 
  if test "$pipe_works" = yes; then
10230
 
    break
10231
 
  else
10232
 
    lt_cv_sys_global_symbol_pipe=
10233
 
  fi
10234
 
done
10235
 
])
10236
 
if test -z "$lt_cv_sys_global_symbol_pipe"; then
10237
 
  lt_cv_sys_global_symbol_to_cdecl=
10238
 
fi
10239
 
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10240
 
  AC_MSG_RESULT(failed)
10241
 
else
10242
 
  AC_MSG_RESULT(ok)
10243
 
fi
10244
 
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10245
 
 
10246
 
 
10247
 
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
10248
 
# ---------------------------------------
10249
 
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
10250
 
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10251
 
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10252
 
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10253
 
 
10254
 
AC_MSG_CHECKING([for $compiler option to produce PIC])
10255
 
 ifelse([$1],[CXX],[
10256
 
  # C++ specific cases for pic, static, wl, etc.
10257
 
  if test "$GXX" = yes; then
10258
 
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10259
 
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10260
 
 
10261
 
    case $host_os in
10262
 
    aix*)
10263
 
      # All AIX code is PIC.
10264
 
      if test "$host_cpu" = ia64; then
10265
 
        # AIX 5 now supports IA64 processor
10266
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10267
 
      fi
10268
 
      ;;
10269
 
    amigaos*)
10270
 
      # FIXME: we need at least 68020 code to build shared libraries, but
10271
 
      # adding the `-m68020' flag to GCC prevents building anything better,
10272
 
      # like `-m68040'.
10273
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10274
 
      ;;
10275
 
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10276
 
      # PIC is the default for these OSes.
10277
 
      ;;
10278
 
    mingw* | os2* | pw32*)
10279
 
      # This hack is so that the source file can tell whether it is being
10280
 
      # built for inclusion in a dll (and should export symbols for example).
10281
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10282
 
      ;;
10283
 
    darwin* | rhapsody*)
10284
 
      # PIC is the default on this platform
10285
 
      # Common symbols not allowed in MH_DYLIB files
10286
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10287
 
      ;;
10288
 
    *djgpp*)
10289
 
      # DJGPP does not support shared libraries at all
10290
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10291
 
      ;;
10292
 
    sysv4*MP*)
10293
 
      if test -d /usr/nec; then
10294
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10295
 
      fi
10296
 
      ;;
10297
 
    hpux*)
10298
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10299
 
      # not for PA HP-UX.
10300
 
      case "$host_cpu" in
10301
 
      hppa*64*|ia64*)
10302
 
        ;;
10303
 
      *)
10304
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10305
 
        ;;
10306
 
      esac
10307
 
      ;;
10308
 
    *)
10309
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10310
 
      ;;
10311
 
    esac
10312
 
  else
10313
 
    case $host_os in
10314
 
      aix4* | aix5*)
10315
 
        # All AIX code is PIC.
10316
 
        if test "$host_cpu" = ia64; then
10317
 
          # AIX 5 now supports IA64 processor
10318
 
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10319
 
        else
10320
 
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10321
 
        fi
10322
 
        ;;
10323
 
      chorus*)
10324
 
        case $cc_basename in
10325
 
        cxch68)
10326
 
          # Green Hills C++ Compiler
10327
 
          # _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"
10328
 
          ;;
10329
 
        esac
10330
 
        ;;
10331
 
      dgux*)
10332
 
        case $cc_basename in
10333
 
          ec++)
10334
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10335
 
            ;;
10336
 
          ghcx)
10337
 
            # Green Hills C++ Compiler
10338
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10339
 
            ;;
10340
 
          *)
10341
 
            ;;
10342
 
        esac
10343
 
        ;;
10344
 
      freebsd*)
10345
 
        # FreeBSD uses GNU C++
10346
 
        ;;
10347
 
      hpux9* | hpux10* | hpux11*)
10348
 
        case $cc_basename in
10349
 
          CC)
10350
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10351
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10352
 
            if test "$host_cpu" != ia64; then
10353
 
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10354
 
            fi
10355
 
            ;;
10356
 
          aCC)
10357
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10358
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10359
 
            case "$host_cpu" in
10360
 
            hppa*64*|ia64*)
10361
 
              # +Z the default
10362
 
              ;;
10363
 
            *)
10364
 
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10365
 
              ;;
10366
 
            esac
10367
 
            ;;
10368
 
          *)
10369
 
            ;;
10370
 
        esac
10371
 
        ;;
10372
 
      irix5* | irix6* | nonstopux*)
10373
 
        case $cc_basename in
10374
 
          CC)
10375
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10376
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10377
 
            # CC pic flag -KPIC is the default.
10378
 
            ;;
10379
 
          *)
10380
 
            ;;
10381
 
        esac
10382
 
        ;;
10383
 
      linux*)
10384
 
        case $cc_basename in
10385
 
          KCC)
10386
 
            # KAI C++ Compiler
10387
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10388
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10389
 
            ;;
10390
 
          icpc)
10391
 
            # Intel C++
10392
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10393
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10394
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10395
 
            ;; 
10396
 
          cxx)
10397
 
            # Compaq C++
10398
 
            # Make sure the PIC flag is empty.  It appears that all Alpha
10399
 
            # Linux and Compaq Tru64 Unix objects are PIC.
10400
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10401
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10402
 
            ;;
10403
 
          *)
10404
 
            ;;
10405
 
        esac
10406
 
        ;;
10407
 
      lynxos*)
10408
 
        ;;
10409
 
      m88k*)
10410
 
        ;;
10411
 
      mvs*)
10412
 
        case $cc_basename in
10413
 
          cxx)
10414
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10415
 
            ;;
10416
 
          *)
10417
 
            ;;
10418
 
        esac
10419
 
        ;;
10420
 
      netbsd*)
10421
 
        ;;
10422
 
      osf3* | osf4* | osf5*)
10423
 
        case $cc_basename in
10424
 
          KCC)
10425
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10426
 
            ;;
10427
 
          RCC)
10428
 
            # Rational C++ 2.4.1
10429
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10430
 
            ;;
10431
 
          cxx)
10432
 
            # Digital/Compaq C++
10433
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10434
 
            # Make sure the PIC flag is empty.  It appears that all Alpha
10435
 
            # Linux and Compaq Tru64 Unix objects are PIC.
10436
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10437
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10438
 
            ;;
10439
 
          *)
10440
 
            ;;
10441
 
        esac
10442
 
        ;;
10443
 
      psos*)
10444
 
        ;;
10445
 
      sco*)
10446
 
        case $cc_basename in
10447
 
          CC)
10448
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10449
 
            ;;
10450
 
          *)
10451
 
            ;;
10452
 
        esac
10453
 
        ;;
10454
 
      solaris*)
10455
 
        case $cc_basename in
10456
 
          CC)
10457
 
            # Sun C++ 4.2, 5.x and Centerline C++
10458
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10459
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10460
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10461
 
            ;;
10462
 
          gcx)
10463
 
            # Green Hills C++ Compiler
10464
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10465
 
            ;;
10466
 
          *)
10467
 
            ;;
10468
 
        esac
10469
 
        ;;
10470
 
      sunos4*)
10471
 
        case $cc_basename in
10472
 
          CC)
10473
 
            # Sun C++ 4.x
10474
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10475
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10476
 
            ;;
10477
 
          lcc)
10478
 
            # Lucid
10479
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10480
 
            ;;
10481
 
          *)
10482
 
            ;;
10483
 
        esac
10484
 
        ;;
10485
 
      tandem*)
10486
 
        case $cc_basename in
10487
 
          NCC)
10488
 
            # NonStop-UX NCC 3.20
10489
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10490
 
            ;;
10491
 
          *)
10492
 
            ;;
10493
 
        esac
10494
 
        ;;
10495
 
      unixware*)
10496
 
        ;;
10497
 
      vxworks*)
10498
 
        ;;
10499
 
      *)
10500
 
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10501
 
        ;;
10502
 
    esac
10503
 
  fi
10504
 
],
10505
 
[
10506
 
  if test "$GCC" = yes; then
10507
 
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10508
 
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10509
 
 
10510
 
    case $host_os in
10511
 
      aix*)
10512
 
      # All AIX code is PIC.
10513
 
      if test "$host_cpu" = ia64; then
10514
 
        # AIX 5 now supports IA64 processor
10515
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10516
 
      fi
10517
 
      ;;
10518
 
 
10519
 
    amigaos*)
10520
 
      # FIXME: we need at least 68020 code to build shared libraries, but
10521
 
      # adding the `-m68020' flag to GCC prevents building anything better,
10522
 
      # like `-m68040'.
10523
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10524
 
      ;;
10525
 
 
10526
 
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10527
 
      # PIC is the default for these OSes.
10528
 
      ;;
10529
 
 
10530
 
    mingw* | pw32* | os2*)
10531
 
      # This hack is so that the source file can tell whether it is being
10532
 
      # built for inclusion in a dll (and should export symbols for example).
10533
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10534
 
      ;;
10535
 
 
10536
 
    darwin* | rhapsody*)
10537
 
      # PIC is the default on this platform
10538
 
      # Common symbols not allowed in MH_DYLIB files
10539
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10540
 
      ;;
10541
 
 
10542
 
    msdosdjgpp*)
10543
 
      # Just because we use GCC doesn't mean we suddenly get shared libraries
10544
 
      # on systems that don't support them.
10545
 
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10546
 
      enable_shared=no
10547
 
      ;;
10548
 
 
10549
 
    sysv4*MP*)
10550
 
      if test -d /usr/nec; then
10551
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10552
 
      fi
10553
 
      ;;
10554
 
 
10555
 
    hpux*)
10556
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10557
 
      # not for PA HP-UX.
10558
 
      case "$host_cpu" in
10559
 
      hppa*64*|ia64*)
10560
 
        # +Z the default
10561
 
        ;;
10562
 
      *)
10563
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10564
 
        ;;
10565
 
      esac
10566
 
      ;;
10567
 
 
10568
 
    *)
10569
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10570
 
      ;;
10571
 
    esac
10572
 
  else
10573
 
    # PORTME Check for flag to pass linker flags through the system compiler.
10574
 
    case $host_os in
10575
 
    aix*)
10576
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10577
 
      if test "$host_cpu" = ia64; then
10578
 
        # AIX 5 now supports IA64 processor
10579
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10580
 
      else
10581
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10582
 
      fi
10583
 
      ;;
10584
 
 
10585
 
    mingw* | pw32* | os2*)
10586
 
      # This hack is so that the source file can tell whether it is being
10587
 
      # built for inclusion in a dll (and should export symbols for example).
10588
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10589
 
      ;;
10590
 
 
10591
 
    hpux9* | hpux10* | hpux11*)
10592
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10593
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10594
 
      # not for PA HP-UX.
10595
 
      case "$host_cpu" in
10596
 
      hppa*64*|ia64*)
10597
 
        # +Z the default
10598
 
        ;;
10599
 
      *)
10600
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10601
 
        ;;
10602
 
      esac
10603
 
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
10604
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10605
 
      ;;
10606
 
 
10607
 
    irix5* | irix6* | nonstopux*)
10608
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10609
 
      # PIC (with -KPIC) is the default.
10610
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10611
 
      ;;
10612
 
 
10613
 
    newsos6)
10614
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10615
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10616
 
      ;;
10617
 
 
10618
 
    linux*)
10619
 
      case $CC in
10620
 
      icc* | ecc*)
10621
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10622
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10623
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10624
 
        ;;
10625
 
      ccc*)
10626
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10627
 
        # All Alpha code is PIC.
10628
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10629
 
        ;;
10630
 
      esac
10631
 
      ;;
10632
 
 
10633
 
    osf3* | osf4* | osf5*)
10634
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10635
 
      # All OSF/1 code is PIC.
10636
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10637
 
      ;;
10638
 
 
10639
 
    sco3.2v5*)
10640
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10641
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10642
 
      ;;
10643
 
 
10644
 
    solaris*)
10645
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10646
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10647
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10648
 
      ;;
10649
 
 
10650
 
    sunos4*)
10651
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10652
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10653
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10654
 
      ;;
10655
 
 
10656
 
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10657
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10658
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10659
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10660
 
      ;;
10661
 
 
10662
 
    sysv4*MP*)
10663
 
      if test -d /usr/nec ;then
10664
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10665
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10666
 
      fi
10667
 
      ;;
10668
 
 
10669
 
    uts4*)
10670
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10671
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10672
 
      ;;
10673
 
 
10674
 
    *)
10675
 
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10676
 
      ;;
10677
 
    esac
10678
 
  fi
10679
 
])
10680
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10681
 
 
10682
 
#
10683
 
# Check to make sure the PIC flag actually works.
10684
 
#
10685
 
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10686
 
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10687
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10688
 
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10689
 
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10690
 
     "" | " "*) ;;
10691
 
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10692
 
     esac],
10693
 
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10694
 
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10695
 
fi
10696
 
case "$host_os" in
10697
 
  # For platforms which do not support PIC, -DPIC is meaningless:
10698
 
  *djgpp*)
10699
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10700
 
    ;;
10701
 
  *)
10702
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10703
 
    ;;
10704
 
esac
10705
 
])
10706
 
 
10707
 
 
10708
 
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
10709
 
# ------------------------------------
10710
 
# See if the linker supports building shared libraries.
10711
 
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
10712
 
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10713
 
ifelse([$1],[CXX],[
10714
 
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10715
 
  case $host_os in
10716
 
  aix4* | aix5*)
10717
 
    # If we're using GNU nm, then we don't want the "-C" option.
10718
 
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
10719
 
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10720
 
      _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'
10721
 
    else
10722
 
      _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'
10723
 
    fi
10724
 
    ;;
10725
 
  pw32*)
10726
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10727
 
  ;;
10728
 
  cygwin* | mingw*)
10729
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10730
 
  ;;
10731
 
  *)
10732
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10733
 
  ;;
10734
 
  esac
10735
 
],[
10736
 
  runpath_var=
10737
 
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
10738
 
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10739
 
  _LT_AC_TAGVAR(archive_cmds, $1)=
10740
 
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10741
 
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10742
 
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10743
 
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10744
 
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10745
 
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
10746
 
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10747
 
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
10748
 
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10749
 
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
10750
 
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10751
 
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10752
 
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
10753
 
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
10754
 
  _LT_AC_TAGVAR(module_cmds, $1)=
10755
 
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
10756
 
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
10757
 
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10758
 
  # include_expsyms should be a list of space-separated symbols to be *always*
10759
 
  # included in the symbol list
10760
 
  _LT_AC_TAGVAR(include_expsyms, $1)=
10761
 
  # exclude_expsyms can be an extended regexp of symbols to exclude
10762
 
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
10763
 
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10764
 
  # as well as any symbol that contains `d'.
10765
 
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
10766
 
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10767
 
  # platforms (ab)use it in PIC code, but their linkers get confused if
10768
 
  # the symbol is explicitly referenced.  Since portable code cannot
10769
 
  # rely on this symbol name, it's probably fine to never include it in
10770
 
  # preloaded symbol tables.
10771
 
  extract_expsyms_cmds=
10772
 
 
10773
 
  case $host_os in
10774
 
  cygwin* | mingw* | pw32*)
10775
 
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
10776
 
    # When not using gcc, we currently assume that we are using
10777
 
    # Microsoft Visual C++.
10778
 
    if test "$GCC" != yes; then
10779
 
      with_gnu_ld=no
10780
 
    fi
10781
 
    ;;
10782
 
  openbsd*)
10783
 
    with_gnu_ld=no
10784
 
    ;;
10785
 
  esac
10786
 
 
10787
 
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
10788
 
  if test "$with_gnu_ld" = yes; then
10789
 
    # If archive_cmds runs LD, not CC, wlarc should be empty
10790
 
    wlarc='${wl}'
10791
 
 
10792
 
    # See if GNU ld supports shared libraries.
10793
 
    case $host_os in
10794
 
    aix3* | aix4* | aix5*)
10795
 
      # On AIX/PPC, the GNU linker is very broken
10796
 
      if test "$host_cpu" != ia64; then
10797
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10798
 
        cat <<EOF 1>&2
10799
 
 
10800
 
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
10801
 
*** to be unable to reliably create shared libraries on AIX.
10802
 
*** Therefore, libtool is disabling shared libraries support.  If you
10803
 
*** really care for shared libraries, you may want to modify your PATH
10804
 
*** so that a non-GNU linker is found, and then restart.
10805
 
 
10806
 
EOF
10807
 
      fi
10808
 
      ;;
10809
 
 
10810
 
    amigaos*)
10811
 
      _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)'
10812
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10813
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10814
 
 
10815
 
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
10816
 
      # that the semantics of dynamic libraries on AmigaOS, at least up
10817
 
      # to version 4, is to share data among multiple programs linked
10818
 
      # with the same dynamic library.  Since this doesn't match the
10819
 
      # behavior of shared libraries on other platforms, we can't use
10820
 
      # them.
10821
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10822
 
      ;;
10823
 
 
10824
 
    beos*)
10825
 
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10826
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10827
 
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10828
 
        # support --undefined.  This deserves some investigation.  FIXME
10829
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10830
 
      else
10831
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10832
 
      fi
10833
 
      ;;
10834
 
 
10835
 
    cygwin* | mingw* | pw32*)
10836
 
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10837
 
      # as there is no search path for DLLs.
10838
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10839
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
10840
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
10841
 
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10842
 
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10843
 
 
10844
 
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10845
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10846
 
        # If the export-symbols file already is a .def file (1st line
10847
 
        # is EXPORTS), use it as is; otherwise, prepend...
10848
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10849
 
          cp $export_symbols $output_objdir/$soname.def;
10850
 
        else
10851
 
          echo EXPORTS > $output_objdir/$soname.def;
10852
 
          cat $export_symbols >> $output_objdir/$soname.def;
10853
 
        fi~
10854
 
        $CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
10855
 
      else
10856
 
        ld_shlibs=no
10857
 
      fi
10858
 
      ;;
10859
 
 
10860
 
    netbsd*)
10861
 
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10862
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10863
 
        wlarc=
10864
 
      else
10865
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10866
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10867
 
      fi
10868
 
      ;;
10869
 
 
10870
 
    solaris* | sysv5*)
10871
 
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
10872
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10873
 
        cat <<EOF 1>&2
10874
 
 
10875
 
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10876
 
*** create shared libraries on Solaris systems.  Therefore, libtool
10877
 
*** is disabling shared libraries support.  We urge you to upgrade GNU
10878
 
*** binutils to release 2.9.1 or newer.  Another option is to modify
10879
 
*** your PATH or compiler configuration so that the native linker is
10880
 
*** used, and then restart.
10881
 
 
10882
 
EOF
10883
 
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10884
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10885
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10886
 
      else
10887
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10888
 
      fi
10889
 
      ;;
10890
 
 
10891
 
    sunos4*)
10892
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10893
 
      wlarc=
10894
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10895
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10896
 
      ;;
10897
 
 
10898
 
    *)
10899
 
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10900
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10901
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10902
 
      else
10903
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10904
 
      fi
10905
 
      ;;
10906
 
    esac
10907
 
 
10908
 
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10909
 
      runpath_var=LD_RUN_PATH
10910
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10911
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10912
 
      # ancient GNU ld didn't support --whole-archive et. al.
10913
 
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
10914
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10915
 
      else
10916
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10917
 
      fi
10918
 
    fi
10919
 
  else
10920
 
    # PORTME fill in a description of your system's linker (not GNU ld)
10921
 
    case $host_os in
10922
 
    aix3*)
10923
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10924
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10925
 
      _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'
10926
 
      # Note: this linker hardcodes the directories in LIBPATH if there
10927
 
      # are no directories specified by -L.
10928
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10929
 
      if test "$GCC" = yes && test -z "$link_static_flag"; then
10930
 
        # Neither direct hardcoding nor static linking is supported with a
10931
 
        # broken collect2.
10932
 
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10933
 
      fi
10934
 
      ;;
10935
 
 
10936
 
    aix4* | aix5*)
10937
 
      if test "$host_cpu" = ia64; then
10938
 
        # On IA64, the linker does run time linking by default, so we don't
10939
 
        # have to do anything special.
10940
 
        aix_use_runtimelinking=no
10941
 
        exp_sym_flag='-Bexport'
10942
 
        no_entry_flag=""
10943
 
      else
10944
 
        # If we're using GNU nm, then we don't want the "-C" option.
10945
 
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
10946
 
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10947
 
          _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'
10948
 
        else
10949
 
          _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'
10950
 
        fi
10951
 
 
10952
 
        # KDE requires run time linking.  Make it the default.
10953
 
        aix_use_runtimelinking=yes
10954
 
        exp_sym_flag='-bexport'
10955
 
        no_entry_flag='-bnoentry'
10956
 
      fi
10957
 
 
10958
 
      # When large executables or shared objects are built, AIX ld can
10959
 
      # have problems creating the table of contents.  If linking a library
10960
 
      # or program results in "error TOC overflow" add -mminimal-toc to
10961
 
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
10962
 
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10963
 
 
10964
 
      _LT_AC_TAGVAR(archive_cmds, $1)=''
10965
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10966
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10967
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10968
 
 
10969
 
      if test "$GCC" = yes; then
10970
 
        case $host_os in aix4.[012]|aix4.[012].*)
10971
 
        # We only want to do this on AIX 4.2 and lower, the check
10972
 
        # below for broken collect2 doesn't work under 4.3+
10973
 
          collect2name=`${CC} -print-prog-name=collect2`
10974
 
          if test -f "$collect2name" && \
10975
 
           strings "$collect2name" | grep resolve_lib_name >/dev/null
10976
 
          then
10977
 
          # We have reworked collect2
10978
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10979
 
          else
10980
 
          # We have old collect2
10981
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10982
 
          # It fails to find uninstalled libraries when the uninstalled
10983
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
10984
 
          # to unsupported forces relinking
10985
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10986
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10987
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10988
 
          fi
10989
 
        esac
10990
 
        shared_flag='-shared'
10991
 
      else
10992
 
        # not using gcc
10993
 
        if test "$host_cpu" = ia64; then
10994
 
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10995
 
        # chokes on -Wl,-G. The following line is correct:
10996
 
          shared_flag='-G'
10997
 
        else
10998
 
        if test "$aix_use_runtimelinking" = yes; then
10999
 
            shared_flag='-qmkshrobj ${wl}-G'
11000
 
          else
11001
 
            shared_flag='-qmkshrobj'
11002
 
        fi
11003
 
        fi
11004
 
      fi
11005
 
 
11006
 
      # Let the compiler handle the export list.
11007
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
11008
 
      if test "$aix_use_runtimelinking" = yes; then
11009
 
        # Warning - without using the other runtime loading flags (-brtl),
11010
 
        # -berok will link without error, but may produce a broken library.
11011
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
11012
 
       # Determine the default libpath from the value encoded in an empty executable.
11013
 
        _LT_AC_SYS_LIBPATH_AIX
11014
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11015
 
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
11016
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11017
 
       else
11018
 
        if test "$host_cpu" = ia64; then
11019
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
11020
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
11021
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
11022
 
        else
11023
 
         # Determine the default libpath from the value encoded in an empty executable.
11024
 
         _LT_AC_SYS_LIBPATH_AIX
11025
 
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11026
 
          # Warning - without using the other run time loading flags,
11027
 
          # -berok will link without error, but may produce a broken library.
11028
 
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
11029
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
11030
 
          # -bexpall does not export symbols beginning with underscore (_)
11031
 
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
11032
 
          # Exported symbols can be pulled into shared objects from archives
11033
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
11034
 
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11035
 
          # This is similar to how AIX traditionally builds it's shared libraries.
11036
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11037
 
        fi
11038
 
      fi
11039
 
      ;;
11040
 
 
11041
 
    amigaos*)
11042
 
      _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)'
11043
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11044
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11045
 
      # see comment about different semantics on the GNU ld section
11046
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11047
 
      ;;
11048
 
 
11049
 
    bsdi4*)
11050
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
11051
 
      ;;
11052
 
 
11053
 
    cygwin* | mingw* | pw32*)
11054
 
      # When not using gcc, we currently assume that we are using
11055
 
      # Microsoft Visual C++.
11056
 
      # hardcode_libdir_flag_spec is actually meaningless, as there is
11057
 
      # no search path for DLLs.
11058
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
11059
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
11060
 
      # Tell ltmain to make .lib files, not .a files.
11061
 
      libext=lib
11062
 
      # Tell ltmain to make .dll files, not .so files.
11063
 
      shrext=".dll"
11064
 
      # FIXME: Setting linknames here is a bad hack.
11065
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
11066
 
      # The linker will automatically build a .lib file if we build a DLL.
11067
 
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
11068
 
      # FIXME: Should let the user specify the lib program.
11069
 
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
11070
 
      fix_srcfile_path='`cygpath -w "$srcfile"`'
11071
 
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11072
 
      ;;
11073
 
 
11074
 
    darwin* | rhapsody*)
11075
 
    if test "$GXX" = yes ; then
11076
 
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11077
 
      case "$host_os" in
11078
 
      rhapsody* | darwin1.[[012]])
11079
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
11080
 
        ;;
11081
 
      *) # Darwin 1.3 on
11082
 
        if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
11083
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11084
 
        else
11085
 
          case ${MACOSX_DEPLOYMENT_TARGET} in
11086
 
            10.[012])
11087
 
              _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11088
 
              ;;
11089
 
            10.*)
11090
 
              _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
11091
 
              ;;
11092
 
          esac
11093
 
        fi
11094
 
        ;;
11095
 
      esac
11096
 
        lt_int_apple_cc_single_mod=no
11097
 
        output_verbose_link_cmd='echo'
11098
 
        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
11099
 
          lt_int_apple_cc_single_mod=yes
11100
 
        fi
11101
 
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11102
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
11103
 
        else
11104
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
11105
 
      fi
11106
 
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
11107
 
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
11108
 
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11109
 
          _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 $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11110
 
        else
11111
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11112
 
        fi
11113
 
          _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 $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11114
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
11115
 
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
11116
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11117
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
11118
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11119
 
    else  
11120
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11121
 
    fi  
11122
 
      ;;
11123
 
 
11124
 
    dgux*)
11125
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11126
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11127
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11128
 
      ;;
11129
 
 
11130
 
    freebsd1*)
11131
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11132
 
      ;;
11133
 
 
11134
 
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11135
 
    # support.  Future versions do this automatically, but an explicit c++rt0.o
11136
 
    # does not break anything, and helps significantly (at the cost of a little
11137
 
    # extra space).
11138
 
    freebsd2.2*)
11139
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11140
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11141
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11142
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11143
 
      ;;
11144
 
 
11145
 
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11146
 
    freebsd2*)
11147
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11148
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11149
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11150
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11151
 
      ;;
11152
 
 
11153
 
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11154
 
    freebsd*)
11155
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
11156
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11157
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11158
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11159
 
      ;;
11160
 
 
11161
 
    hpux9*)
11162
 
      if test "$GCC" = yes; then
11163
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11164
 
      else
11165
 
        _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'
11166
 
      fi
11167
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11168
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11169
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11170
 
 
11171
 
      # hardcode_minus_L: Not really in the search PATH,
11172
 
      # but as the default location of the library.
11173
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11174
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11175
 
      ;;
11176
 
 
11177
 
    hpux10* | hpux11*)
11178
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11179
 
        case "$host_cpu" in
11180
 
        hppa*64*|ia64*)
11181
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11182
 
          ;;
11183
 
        *)
11184
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
11185
 
          ;;
11186
 
        esac
11187
 
      else
11188
 
        case "$host_cpu" in
11189
 
        hppa*64*|ia64*)
11190
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
11191
 
          ;;
11192
 
        *)
11193
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11194
 
          ;;
11195
 
        esac
11196
 
      fi
11197
 
      if test "$with_gnu_ld" = no; then
11198
 
        case "$host_cpu" in
11199
 
        hppa*64*)
11200
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11201
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11202
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11203
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
11204
 
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11205
 
          ;;
11206
 
        ia64*)
11207
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11208
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
11209
 
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11210
 
 
11211
 
          # hardcode_minus_L: Not really in the search PATH,
11212
 
          # but as the default location of the library.
11213
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11214
 
          ;;
11215
 
        *)
11216
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11217
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11218
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11219
 
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11220
 
 
11221
 
          # hardcode_minus_L: Not really in the search PATH,
11222
 
          # but as the default location of the library.
11223
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11224
 
          ;;
11225
 
        esac
11226
 
      fi
11227
 
      ;;
11228
 
 
11229
 
    irix5* | irix6* | nonstopux*)
11230
 
      if test "$GCC" = yes; then
11231
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11232
 
      else
11233
 
        _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'
11234
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11235
 
      fi
11236
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11237
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11238
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11239
 
      ;;
11240
 
 
11241
 
    netbsd*)
11242
 
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11243
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
11244
 
      else
11245
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
11246
 
      fi
11247
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11248
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11249
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11250
 
      ;;
11251
 
 
11252
 
    newsos6)
11253
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11254
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11255
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11256
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11257
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11258
 
      ;;
11259
 
 
11260
 
    openbsd*)
11261
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11262
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11263
 
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11264
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11265
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11266
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11267
 
      else
11268
 
       case $host_os in
11269
 
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11270
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11271
 
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11272
 
           ;;
11273
 
         *)
11274
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11275
 
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11276
 
           ;;
11277
 
       esac
11278
 
      fi
11279
 
      ;;
11280
 
 
11281
 
    os2*)
11282
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11283
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11284
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11285
 
      _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 $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
11286
 
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11287
 
      ;;
11288
 
 
11289
 
    osf3*)
11290
 
      if test "$GCC" = yes; then
11291
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11292
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11293
 
      else
11294
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11295
 
        _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'
11296
 
      fi
11297
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11298
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11299
 
      ;;
11300
 
 
11301
 
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
11302
 
      if test "$GCC" = yes; then
11303
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11304
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${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'
11305
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11306
 
      else
11307
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11308
 
        _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'
11309
 
        _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~
11310
 
        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
11311
 
 
11312
 
        # Both c and cxx compiler support -rpath directly
11313
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
11314
 
      fi
11315
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11316
 
      ;;
11317
 
 
11318
 
    sco3.2v5*)
11319
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11320
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11321
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
11322
 
      runpath_var=LD_RUN_PATH
11323
 
      hardcode_runpath_var=yes
11324
 
      ;;
11325
 
 
11326
 
    solaris*)
11327
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11328
 
      if test "$GCC" = yes; then
11329
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11330
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11331
 
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
11332
 
      else
11333
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11334
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11335
 
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11336
 
      fi
11337
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11338
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11339
 
      case $host_os in
11340
 
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11341
 
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
11342
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
11343
 
      esac
11344
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11345
 
      ;;
11346
 
 
11347
 
    sunos4*)
11348
 
      if test "x$host_vendor" = xsequent; then
11349
 
        # Use $CC to link under sequent, because it throws in some extra .o
11350
 
        # files that make .init and .fini sections work.
11351
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
11352
 
      else
11353
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11354
 
      fi
11355
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11356
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11357
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11358
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11359
 
      ;;
11360
 
 
11361
 
    sysv4)
11362
 
      case $host_vendor in
11363
 
        sni)
11364
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11365
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
11366
 
        ;;
11367
 
        siemens)
11368
 
          ## LD is ld it makes a PLAMLIB
11369
 
          ## CC just makes a GrossModule.
11370
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11371
 
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
11372
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
11373
 
        ;;
11374
 
        motorola)
11375
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11376
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
11377
 
        ;;
11378
 
      esac
11379
 
      runpath_var='LD_RUN_PATH'
11380
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11381
 
      ;;
11382
 
 
11383
 
    sysv4.3*)
11384
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11385
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11386
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
11387
 
      ;;
11388
 
 
11389
 
    sysv4*MP*)
11390
 
      if test -d /usr/nec; then
11391
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11392
 
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11393
 
        runpath_var=LD_RUN_PATH
11394
 
        hardcode_runpath_var=yes
11395
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
11396
 
      fi
11397
 
      ;;
11398
 
 
11399
 
    sysv4.2uw2*)
11400
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11401
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11402
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11403
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11404
 
      hardcode_runpath_var=yes
11405
 
      runpath_var=LD_RUN_PATH
11406
 
      ;;
11407
 
 
11408
 
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
11409
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
11410
 
      if test "$GCC" = yes; then
11411
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11412
 
      else
11413
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11414
 
      fi
11415
 
      runpath_var='LD_RUN_PATH'
11416
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11417
 
      ;;
11418
 
 
11419
 
    sysv5*)
11420
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11421
 
      # $CC -shared without GNU ld will not create a library from C++
11422
 
      # object files and a static libstdc++, better avoid it by now
11423
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11424
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11425
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11426
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11427
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11428
 
      runpath_var='LD_RUN_PATH'
11429
 
      ;;
11430
 
 
11431
 
    uts4*)
11432
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11433
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11434
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11435
 
      ;;
11436
 
 
11437
 
    *)
11438
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11439
 
      ;;
11440
 
    esac
11441
 
  fi
11442
 
])
11443
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
11444
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
11445
 
 
11446
 
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11447
 
if test "$GCC" = yes; then
11448
 
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11449
 
fi
11450
 
 
11451
 
#
11452
 
# Do we need to explicitly link libc?
11453
 
#
11454
 
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11455
 
x|xyes)
11456
 
  # Assume -lc should be added
11457
 
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11458
 
 
11459
 
  if test "$enable_shared" = yes && test "$GCC" = yes; then
11460
 
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
11461
 
    *'~'*)
11462
 
      # FIXME: we may have to deal with multi-command sequences.
11463
 
      ;;
11464
 
    '$CC '*)
11465
 
      # Test whether the compiler implicitly links with -lc since on some
11466
 
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
11467
 
      # to ld, don't add -lc before -lgcc.
11468
 
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11469
 
      $rm conftest*
11470
 
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11471
 
  
11472
 
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11473
 
        soname=conftest
11474
 
        lib=conftest
11475
 
        libobjs=conftest.$ac_objext
11476
 
        deplibs=
11477
 
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11478
 
        compiler_flags=-v
11479
 
        linker_flags=-v
11480
 
        verstring=
11481
 
        output_objdir=.
11482
 
        libname=conftest
11483
 
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11484
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
11485
 
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11486
 
        then
11487
 
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11488
 
        else
11489
 
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11490
 
        fi
11491
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11492
 
      else
11493
 
        cat conftest.err 1>&5
11494
 
      fi
11495
 
      $rm conftest*
11496
 
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11497
 
      ;;
11498
 
    esac
11499
 
  fi
11500
 
  ;;
11501
 
esac
11502
 
])# AC_LIBTOOL_PROG_LD_SHLIBS
11503
 
 
11504
 
 
11505
 
# _LT_AC_FILE_LTDLL_C
11506
 
# -------------------
11507
 
# Be careful that the start marker always follows a newline.
11508
 
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11509
 
# /* ltdll.c starts here */
11510
 
# #define WIN32_LEAN_AND_MEAN
11511
 
# #include <windows.h>
11512
 
# #undef WIN32_LEAN_AND_MEAN
11513
 
# #include <stdio.h>
11514
 
#
11515
 
# #ifndef __CYGWIN__
11516
 
# #  ifdef __CYGWIN32__
11517
 
# #    define __CYGWIN__ __CYGWIN32__
11518
 
# #  endif
11519
 
# #endif
11520
 
#
11521
 
# #ifdef __cplusplus
11522
 
# extern "C" {
11523
 
# #endif
11524
 
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11525
 
# #ifdef __cplusplus
11526
 
# }
11527
 
# #endif
11528
 
#
11529
 
# #ifdef __CYGWIN__
11530
 
# #include <cygwin/cygwin_dll.h>
11531
 
# DECLARE_CYGWIN_DLL( DllMain );
11532
 
# #endif
11533
 
# HINSTANCE __hDllInstance_base;
11534
 
#
11535
 
# BOOL APIENTRY
11536
 
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11537
 
# {
11538
 
#   __hDllInstance_base = hInst;
11539
 
#   return TRUE;
11540
 
# }
11541
 
# /* ltdll.c ends here */
11542
 
])# _LT_AC_FILE_LTDLL_C
11543
 
 
11544
 
 
11545
 
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
11546
 
# ---------------------------------
11547
 
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11548
 
 
11549
 
 
11550
 
# old names
11551
 
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
11552
 
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
11553
 
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
11554
 
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11555
 
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11556
 
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
11557
 
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
11558
 
 
11559
 
# This is just to silence aclocal about the macro not being used
11560
 
ifelse([AC_DISABLE_FAST_INSTALL])
11561
 
 
11562
 
AC_DEFUN([LT_AC_PROG_GCJ],
11563
 
[AC_CHECK_TOOL(GCJ, gcj, no)
11564
 
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11565
 
  AC_SUBST(GCJFLAGS)
11566
 
])
11567
 
 
11568
 
AC_DEFUN([LT_AC_PROG_RC],
11569
 
[AC_CHECK_TOOL(RC, windres, no)
11570
 
])
11571
 
 
11572
 
# NOTE: This macro has been submitted for inclusion into   #
11573
 
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
11574
 
#  a released version of Autoconf we should remove this    #
11575
 
#  macro and use it instead.                               #
11576
 
# LT_AC_PROG_SED
11577
 
# --------------
11578
 
# Check for a fully-functional sed program, that truncates
11579
 
# as few characters as possible.  Prefer GNU sed if found.
11580
 
AC_DEFUN([LT_AC_PROG_SED],
11581
 
[AC_MSG_CHECKING([for a sed that does not truncate output])
11582
 
AC_CACHE_VAL(lt_cv_path_SED,
11583
 
[# Loop through the user's path and test for sed and gsed.
11584
 
# Then use that list of sed's as ones to test for truncation.
11585
 
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11586
 
for as_dir in $PATH
11587
 
do
11588
 
  IFS=$as_save_IFS
11589
 
  test -z "$as_dir" && as_dir=.
11590
 
  for lt_ac_prog in sed gsed; do
11591
 
    for ac_exec_ext in '' $ac_executable_extensions; do
11592
 
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11593
 
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11594
 
      fi
11595
 
    done
11596
 
  done
11597
 
done
11598
 
lt_ac_max=0
11599
 
lt_ac_count=0
11600
 
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11601
 
# along with /bin/sed that truncates output.
11602
 
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11603
 
  test ! -f $lt_ac_sed && break
11604
 
  cat /dev/null > conftest.in
11605
 
  lt_ac_count=0
11606
 
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11607
 
  # Check for GNU sed and select it if it is found.
11608
 
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11609
 
    lt_cv_path_SED=$lt_ac_sed
11610
 
    break
11611
 
  fi
11612
 
  while true; do
11613
 
    cat conftest.in conftest.in >conftest.tmp
11614
 
    mv conftest.tmp conftest.in
11615
 
    cp conftest.in conftest.nl
11616
 
    echo >>conftest.nl
11617
 
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11618
 
    cmp -s conftest.out conftest.nl || break
11619
 
    # 10000 chars as input seems more than enough
11620
 
    test $lt_ac_count -gt 10 && break
11621
 
    lt_ac_count=`expr $lt_ac_count + 1`
11622
 
    if test $lt_ac_count -gt $lt_ac_max; then
11623
 
      lt_ac_max=$lt_ac_count
11624
 
      lt_cv_path_SED=$lt_ac_sed
11625
 
    fi
11626
 
  done
11627
 
done
11628
 
])
11629
 
SED=$lt_cv_path_SED
11630
 
AC_MSG_RESULT([$SED])
11631
 
])
11632
 
 
11633
 
# AM_CONDITIONAL                                              -*- Autoconf -*-
11634
 
 
11635
 
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
11636
 
 
11637
 
# This program is free software; you can redistribute it and/or modify
11638
 
# it under the terms of the GNU General Public License as published by
11639
 
# the Free Software Foundation; either version 2, or (at your option)
11640
 
# any later version.
11641
 
 
11642
 
# This program is distributed in the hope that it will be useful,
11643
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11644
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11645
 
# GNU General Public License for more details.
11646
 
 
11647
 
# You should have received a copy of the GNU General Public License
11648
 
# along with this program; if not, write to the Free Software
11649
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11650
 
# 02111-1307, USA.
11651
 
 
11652
 
# serial 5
11653
 
 
11654
 
AC_PREREQ(2.52)
11655
 
 
11656
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
11657
 
# -------------------------------------
11658
 
# Define a conditional.
11659
 
AC_DEFUN([AM_CONDITIONAL],
11660
 
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
11661
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
11662
 
AC_SUBST([$1_TRUE])
11663
 
AC_SUBST([$1_FALSE])
11664
 
if $2; then
11665
 
  $1_TRUE=
11666
 
  $1_FALSE='#'
11667
 
else
11668
 
  $1_TRUE='#'
11669
 
  $1_FALSE=
11670
 
fi
11671
 
AC_CONFIG_COMMANDS_PRE(
11672
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
11673
 
  AC_MSG_ERROR([conditional \"$1\" was never defined.
11674
 
Usually this means the macro was only invoked conditionally.])
11675
 
fi])])
11676
 
 
11677
 
# Do all the work for Automake.                            -*- Autoconf -*-
11678
 
 
11679
 
# This macro actually does too much some checks are only needed if
11680
 
# your package does certain things.  But this isn't really a big deal.
11681
 
 
11682
 
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
11683
 
# Free Software Foundation, Inc.
11684
 
 
11685
 
# This program is free software; you can redistribute it and/or modify
11686
 
# it under the terms of the GNU General Public License as published by
11687
 
# the Free Software Foundation; either version 2, or (at your option)
11688
 
# any later version.
11689
 
 
11690
 
# This program is distributed in the hope that it will be useful,
11691
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11692
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11693
 
# GNU General Public License for more details.
11694
 
 
11695
 
# You should have received a copy of the GNU General Public License
11696
 
# along with this program; if not, write to the Free Software
11697
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11698
 
# 02111-1307, USA.
11699
 
 
11700
 
# serial 8
11701
 
 
11702
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
11703
 
# written in clear, in which case automake, when reading aclocal.m4,
11704
 
# will think it sees a *use*, and therefore will trigger all it's
11705
 
# C support machinery.  Also note that it means that autoscan, seeing
11706
 
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
11707
 
 
11708
 
 
11709
 
AC_PREREQ([2.52])
11710
 
 
11711
 
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
11712
 
# the ones we care about.
11713
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
11714
 
 
11715
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
11716
 
# AM_INIT_AUTOMAKE([OPTIONS])
11717
 
# -----------------------------------------------
11718
 
# The call with PACKAGE and VERSION arguments is the old style
11719
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
11720
 
# and VERSION should now be passed to AC_INIT and removed from
11721
 
# the call to AM_INIT_AUTOMAKE.
11722
 
# We support both call styles for the transition.  After
11723
 
# the next Automake release, Autoconf can make the AC_INIT
11724
 
# arguments mandatory, and then we can depend on a new Autoconf
11725
 
# release and drop the old call support.
11726
 
AC_DEFUN([AM_INIT_AUTOMAKE],
11727
 
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
11728
 
 AC_REQUIRE([AC_PROG_INSTALL])dnl
11729
 
# test to see if srcdir already configured
11730
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
11731
 
   test -f $srcdir/config.status; then
11732
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
11733
 
fi
11734
 
 
11735
 
# Define the identity of the package.
11736
 
dnl Distinguish between old-style and new-style calls.
11737
 
m4_ifval([$2],
11738
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
11739
 
 AC_SUBST([PACKAGE], [$1])dnl
11740
 
 AC_SUBST([VERSION], [$2])],
11741
 
[_AM_SET_OPTIONS([$1])dnl
11742
 
 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
11743
 
 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
11744
 
 
11745
 
_AM_IF_OPTION([no-define],,
11746
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
11747
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
11748
 
 
11749
 
# Some tools Automake needs.
11750
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
11751
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
11752
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
11753
 
AM_MISSING_PROG(AUTOCONF, autoconf)
11754
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
11755
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
11756
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
11757
 
AM_MISSING_PROG(AMTAR, tar)
11758
 
AM_PROG_INSTALL_SH
11759
 
AM_PROG_INSTALL_STRIP
11760
 
# We need awk for the "check" target.  The system "awk" is bad on
11761
 
# some platforms.
11762
 
AC_REQUIRE([AC_PROG_AWK])dnl
11763
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
11764
 
 
11765
 
_AM_IF_OPTION([no-dependencies],,
11766
 
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
11767
 
                  [_AM_DEPENDENCIES(CC)],
11768
 
                  [define([AC_PROG_][CC],
11769
 
                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
11770
 
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
11771
 
                  [_AM_DEPENDENCIES(CXX)],
11772
 
                  [define([AC_PROG_][CXX],
11773
 
                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
11774
 
])
11775
 
])
11776
 
 
11777
 
# Copyright 2002  Free Software Foundation, Inc.
11778
 
 
11779
 
# This program is free software; you can redistribute it and/or modify
11780
 
# it under the terms of the GNU General Public License as published by
11781
 
# the Free Software Foundation; either version 2, or (at your option)
11782
 
# any later version.
11783
 
 
11784
 
# This program is distributed in the hope that it will be useful,
11785
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11786
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11787
 
# GNU General Public License for more details.
11788
 
 
11789
 
# You should have received a copy of the GNU General Public License
11790
 
# along with this program; if not, write to the Free Software
11791
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
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.
11792
19
 
11793
20
# AM_AUTOMAKE_VERSION(VERSION)
11794
21
# ----------------------------
11795
22
# Automake X.Y traces this macro to ensure aclocal.m4 has been
11796
23
# generated from the m4 files accompanying Automake X.Y.
11797
 
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
 
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
11798
25
 
11799
26
# AM_SET_CURRENT_AUTOMAKE_VERSION
11800
27
# -------------------------------
11801
28
# Call AM_AUTOMAKE_VERSION so it can be traced.
11802
29
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
11803
30
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
11804
 
         [AM_AUTOMAKE_VERSION([1.6.3])])
11805
 
 
11806
 
# Helper functions for option handling.                    -*- Autoconf -*-
11807
 
 
11808
 
# Copyright 2001, 2002  Free Software Foundation, Inc.
11809
 
 
11810
 
# This program is free software; you can redistribute it and/or modify
11811
 
# it under the terms of the GNU General Public License as published by
11812
 
# the Free Software Foundation; either version 2, or (at your option)
11813
 
# any later version.
11814
 
 
11815
 
# This program is distributed in the hope that it will be useful,
11816
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11817
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11818
 
# GNU General Public License for more details.
11819
 
 
11820
 
# You should have received a copy of the GNU General Public License
11821
 
# along with this program; if not, write to the Free Software
11822
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11823
 
# 02111-1307, USA.
11824
 
 
11825
 
# serial 2
11826
 
 
11827
 
# _AM_MANGLE_OPTION(NAME)
11828
 
# -----------------------
11829
 
AC_DEFUN([_AM_MANGLE_OPTION],
11830
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
11831
 
 
11832
 
# _AM_SET_OPTION(NAME)
11833
 
# ------------------------------
11834
 
# Set option NAME.  Presently that only means defining a flag for this option.
11835
 
AC_DEFUN([_AM_SET_OPTION],
11836
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
11837
 
 
11838
 
# _AM_SET_OPTIONS(OPTIONS)
11839
 
# ----------------------------------
11840
 
# OPTIONS is a space-separated list of Automake options.
11841
 
AC_DEFUN([_AM_SET_OPTIONS],
11842
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
11843
 
 
11844
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
11845
 
# -------------------------------------------
11846
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11847
 
AC_DEFUN([_AM_IF_OPTION],
11848
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
11849
 
 
11850
 
#
11851
 
# Check to make sure that the build environment is sane.
11852
 
#
11853
 
 
11854
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
11855
 
 
11856
 
# This program is free software; you can redistribute it and/or modify
11857
 
# it under the terms of the GNU General Public License as published by
11858
 
# the Free Software Foundation; either version 2, or (at your option)
11859
 
# any later version.
11860
 
 
11861
 
# This program is distributed in the hope that it will be useful,
11862
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11863
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11864
 
# GNU General Public License for more details.
11865
 
 
11866
 
# You should have received a copy of the GNU General Public License
11867
 
# along with this program; if not, write to the Free Software
11868
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11869
 
# 02111-1307, USA.
11870
 
 
11871
 
# serial 3
11872
 
 
11873
 
# AM_SANITY_CHECK
11874
 
# ---------------
11875
 
AC_DEFUN([AM_SANITY_CHECK],
11876
 
[AC_MSG_CHECKING([whether build environment is sane])
11877
 
# Just in case
11878
 
sleep 1
11879
 
echo timestamp > conftest.file
11880
 
# Do `set' in a subshell so we don't clobber the current shell's
11881
 
# arguments.  Must try -L first in case configure is actually a
11882
 
# symlink; some systems play weird games with the mod time of symlinks
11883
 
# (eg FreeBSD returns the mod time of the symlink's containing
11884
 
# directory).
11885
 
if (
11886
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
11887
 
   if test "$[*]" = "X"; then
11888
 
      # -L didn't work.
11889
 
      set X `ls -t $srcdir/configure conftest.file`
11890
 
   fi
11891
 
   rm -f conftest.file
11892
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
11893
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
11894
 
 
11895
 
      # If neither matched, then we have a broken ls.  This can happen
11896
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
11897
 
      # broken ls alias from the environment.  This has actually
11898
 
      # happened.  Such a system could not be considered "sane".
11899
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
11900
 
alias in your environment])
11901
 
   fi
11902
 
 
11903
 
   test "$[2]" = conftest.file
11904
 
   )
11905
 
then
11906
 
   # Ok.
11907
 
   :
11908
 
else
11909
 
   AC_MSG_ERROR([newly created file is older than distributed files!
11910
 
Check your system clock])
11911
 
fi
11912
 
AC_MSG_RESULT(yes)])
11913
 
 
11914
 
#  -*- Autoconf -*-
11915
 
 
11916
 
 
11917
 
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
11918
 
 
11919
 
# This program is free software; you can redistribute it and/or modify
11920
 
# it under the terms of the GNU General Public License as published by
11921
 
# the Free Software Foundation; either version 2, or (at your option)
11922
 
# any later version.
11923
 
 
11924
 
# This program is distributed in the hope that it will be useful,
11925
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11926
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11927
 
# GNU General Public License for more details.
11928
 
 
11929
 
# You should have received a copy of the GNU General Public License
11930
 
# along with this program; if not, write to the Free Software
11931
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11932
 
# 02111-1307, USA.
11933
 
 
11934
 
# serial 3
11935
 
 
11936
 
# AM_MISSING_PROG(NAME, PROGRAM)
11937
 
# ------------------------------
11938
 
AC_DEFUN([AM_MISSING_PROG],
11939
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
11940
 
$1=${$1-"${am_missing_run}$2"}
11941
 
AC_SUBST($1)])
11942
 
 
11943
 
 
11944
 
# AM_MISSING_HAS_RUN
11945
 
# ------------------
11946
 
# Define MISSING if not defined so far and test if it supports --run.
11947
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
11948
 
AC_DEFUN([AM_MISSING_HAS_RUN],
11949
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11950
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
11951
 
# Use eval to expand $SHELL
11952
 
if eval "$MISSING --run true"; then
11953
 
  am_missing_run="$MISSING --run "
11954
 
else
11955
 
  am_missing_run=
11956
 
  AC_MSG_WARN([`missing' script is too old or missing])
11957
 
fi
11958
 
])
11959
 
 
11960
 
# AM_AUX_DIR_EXPAND
11961
 
 
11962
 
# Copyright 2001 Free Software Foundation, Inc.
11963
 
 
11964
 
# This program is free software; you can redistribute it and/or modify
11965
 
# it under the terms of the GNU General Public License as published by
11966
 
# the Free Software Foundation; either version 2, or (at your option)
11967
 
# any later version.
11968
 
 
11969
 
# This program is distributed in the hope that it will be useful,
11970
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11971
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11972
 
# GNU General Public License for more details.
11973
 
 
11974
 
# You should have received a copy of the GNU General Public License
11975
 
# along with this program; if not, write to the Free Software
11976
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11977
 
# 02111-1307, USA.
 
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.
11978
40
 
11979
41
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
11980
42
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
12014
76
# absolute PATH.  The drawback is that using absolute paths prevent a
12015
77
# configured tree to be moved without reconfiguration.
12016
78
 
12017
 
# Rely on autoconf to set up CDPATH properly.
12018
 
AC_PREREQ([2.50])
12019
 
 
12020
 
AC_DEFUN([AM_AUX_DIR_EXPAND], [
 
79
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
80
[dnl Rely on autoconf to set up CDPATH properly.
 
81
AC_PREREQ([2.50])dnl
12021
82
# expand $ac_aux_dir to an absolute path
12022
83
am_aux_dir=`cd $ac_aux_dir && pwd`
12023
84
])
12024
85
 
12025
 
# AM_PROG_INSTALL_SH
12026
 
# ------------------
12027
 
# Define $install_sh.
12028
 
 
12029
 
# Copyright 2001 Free Software Foundation, Inc.
12030
 
 
12031
 
# This program is free software; you can redistribute it and/or modify
12032
 
# it under the terms of the GNU General Public License as published by
12033
 
# the Free Software Foundation; either version 2, or (at your option)
12034
 
# any later version.
12035
 
 
12036
 
# This program is distributed in the hope that it will be useful,
12037
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12038
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12039
 
# GNU General Public License for more details.
12040
 
 
12041
 
# You should have received a copy of the GNU General Public License
12042
 
# along with this program; if not, write to the Free Software
12043
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12044
 
# 02111-1307, USA.
12045
 
 
12046
 
AC_DEFUN([AM_PROG_INSTALL_SH],
12047
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12048
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
12049
 
AC_SUBST(install_sh)])
12050
 
 
12051
 
# AM_PROG_INSTALL_STRIP
12052
 
 
12053
 
# Copyright 2001 Free Software Foundation, Inc.
12054
 
 
12055
 
# This program is free software; you can redistribute it and/or modify
12056
 
# it under the terms of the GNU General Public License as published by
12057
 
# the Free Software Foundation; either version 2, or (at your option)
12058
 
# any later version.
12059
 
 
12060
 
# This program is distributed in the hope that it will be useful,
12061
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12062
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12063
 
# GNU General Public License for more details.
12064
 
 
12065
 
# You should have received a copy of the GNU General Public License
12066
 
# along with this program; if not, write to the Free Software
12067
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12068
 
# 02111-1307, USA.
12069
 
 
12070
 
# One issue with vendor `install' (even GNU) is that you can't
12071
 
# specify the program used to strip binaries.  This is especially
12072
 
# annoying in cross-compiling environments, where the build's strip
12073
 
# is unlikely to handle the host's binaries.
12074
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
12075
 
# always use install-sh in `make install-strip', and initialize
12076
 
# STRIPPROG with the value of the STRIP variable (set by the user).
12077
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
12078
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
12079
 
# Installed binaries are usually stripped using `strip' when the user
12080
 
# run `make install-strip'.  However `strip' might not be the right
12081
 
# tool to use in cross-compilation environments, therefore Automake
12082
 
# will honor the `STRIP' environment variable to overrule this program.
12083
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
12084
 
if test "$cross_compiling" != no; then
12085
 
  AC_CHECK_TOOL([STRIP], [strip], :)
 
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='#'
 
109
else
 
110
  $1_TRUE='#'
 
111
  $1_FALSE=
12086
112
fi
12087
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
12088
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
12089
 
 
12090
 
# serial 4                                              -*- Autoconf -*-
12091
 
 
12092
 
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
12093
 
 
12094
 
# This program is free software; you can redistribute it and/or modify
12095
 
# it under the terms of the GNU General Public License as published by
12096
 
# the Free Software Foundation; either version 2, or (at your option)
12097
 
# any later version.
12098
 
 
12099
 
# This program is distributed in the hope that it will be useful,
12100
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12101
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12102
 
# GNU General Public License for more details.
12103
 
 
12104
 
# You should have received a copy of the GNU General Public License
12105
 
# along with this program; if not, write to the Free Software
12106
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12107
 
# 02111-1307, USA.
12108
 
 
 
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
12109
128
 
12110
129
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
12111
130
# written in clear, in which case automake, when reading aclocal.m4,
12114
133
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
12115
134
 
12116
135
 
12117
 
 
12118
136
# _AM_DEPENDENCIES(NAME)
12119
137
# ----------------------
12120
138
# See how the compiler implements dependency checking.
12150
168
  # using a relative directory.
12151
169
  cp "$am_depcomp" conftest.dir
12152
170
  cd conftest.dir
 
171
  # We will build objects and dependencies in a subdirectory because
 
172
  # it helps to detect inapplicable dependency modes.  For instance
 
173
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
174
  # side effect of compilation, but ICC will put the dependencies in
 
175
  # the current directory while Tru64 will put them in the object
 
176
  # directory.
 
177
  mkdir sub
12153
178
 
12154
179
  am_cv_$1_dependencies_compiler_type=none
12155
180
  if test "$am_compiler_list" = ""; then
12156
181
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
12157
182
  fi
12158
183
  for depmode in $am_compiler_list; do
 
184
    # Setup a source with many dependencies, because some compilers
 
185
    # like to wrap large dependency lists on column 80 (with \), and
 
186
    # we should not choose a depcomp mode which is confused by this.
 
187
    #
12159
188
    # We need to recreate these files for each test, as the compiler may
12160
189
    # overwrite some of them when testing with obscure command lines.
12161
190
    # This happens at least with the AIX C compiler.
12162
 
    echo '#include "conftest.h"' > conftest.c
12163
 
    echo 'int i;' > conftest.h
12164
 
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
 
191
    : > sub/conftest.c
 
192
    for i in 1 2 3 4 5 6; do
 
193
      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
 
197
    done
 
198
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12165
199
 
12166
200
    case $depmode in
12167
201
    nosideeffect)
12179
213
    # mode.  It turns out that the SunPro C++ compiler does not properly
12180
214
    # handle `-M -o', and we need to detect this.
12181
215
    if depmode=$depmode \
12182
 
       source=conftest.c object=conftest.o \
12183
 
       depfile=conftest.Po tmpdepfile=conftest.TPo \
12184
 
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
12185
 
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
 
216
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
217
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
218
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
219
         >/dev/null 2>conftest.err &&
 
220
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
221
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12186
222
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12187
 
      am_cv_$1_dependencies_compiler_type=$depmode
12188
 
      break
 
223
      # 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
 
232
        am_cv_$1_dependencies_compiler_type=$depmode
 
233
        break
 
234
      fi
12189
235
    fi
12190
236
  done
12191
237
 
12196
242
fi
12197
243
])
12198
244
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
245
AM_CONDITIONAL([am__fastdep$1], [
 
246
  test "x$enable_dependency_tracking" != xno \
 
247
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
12199
248
])
12200
249
 
12201
250
 
12204
253
# Choose a directory name for dependency files.
12205
254
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
12206
255
AC_DEFUN([AM_SET_DEPDIR],
12207
 
[rm -f .deps 2>/dev/null
12208
 
mkdir .deps 2>/dev/null
12209
 
if test -d .deps; then
12210
 
  DEPDIR=.deps
12211
 
else
12212
 
  # MS-DOS does not allow filenames that begin with a dot.
12213
 
  DEPDIR=_deps
12214
 
fi
12215
 
rmdir .deps 2>/dev/null
12216
 
AC_SUBST([DEPDIR])
 
256
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
257
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
12217
258
])
12218
259
 
12219
260
 
12221
262
# ------------
12222
263
AC_DEFUN([AM_DEP_TRACK],
12223
264
[AC_ARG_ENABLE(dependency-tracking,
12224
 
[  --disable-dependency-tracking Speeds up one-time builds
12225
 
  --enable-dependency-tracking  Do not reject slow dependency extractors])
 
265
[  --disable-dependency-tracking  speeds up one-time build
 
266
  --enable-dependency-tracking   do not reject slow dependency extractors])
12226
267
if test "x$enable_dependency_tracking" != xno; then
12227
268
  am_depcomp="$ac_aux_dir/depcomp"
12228
269
  AMDEPBACKSLASH='\'
12231
272
AC_SUBST([AMDEPBACKSLASH])
12232
273
])
12233
274
 
12234
 
# Generate code to set up dependency tracking.   -*- Autoconf -*-
12235
 
 
12236
 
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
12237
 
 
12238
 
# This program is free software; you can redistribute it and/or modify
12239
 
# it under the terms of the GNU General Public License as published by
12240
 
# the Free Software Foundation; either version 2, or (at your option)
12241
 
# any later version.
12242
 
 
12243
 
# This program is distributed in the hope that it will be useful,
12244
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12245
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12246
 
# GNU General Public License for more details.
12247
 
 
12248
 
# You should have received a copy of the GNU General Public License
12249
 
# along with this program; if not, write to the Free Software
12250
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12251
 
# 02111-1307, USA.
12252
 
 
12253
 
#serial 2
 
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
12254
285
 
12255
286
# _AM_OUTPUT_DEPENDENCY_COMMANDS
12256
287
# ------------------------------
12269
300
  else
12270
301
    continue
12271
302
  fi
12272
 
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
12273
 
  # Extract the definition of DEP_FILES from the Makefile without
12274
 
  # running `make'.
12275
 
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
 
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"`
12276
306
  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"`
12277
310
  # When using ansi2knr, U may be empty or an underscore; expand it
12278
 
  U=`sed -n -e '/^U = / s///p' < "$mf"`
12279
 
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
12280
 
  # We invoke sed twice because it is the simplest approach to
12281
 
  # changing $(DEPDIR) to its actual value in the expansion.
12282
 
  for file in `sed -n -e '
12283
 
    /^DEP_FILES = .*\\\\$/ {
12284
 
      s/^DEP_FILES = //
12285
 
      :loop
12286
 
        s/\\\\$//
12287
 
        p
12288
 
        n
12289
 
        /\\\\$/ b loop
12290
 
      p
12291
 
    }
12292
 
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
 
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" | \
12293
318
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
12294
319
    # Make sure the directory exists.
12295
320
    test -f "$dirpart/$file" && continue
12315
340
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
12316
341
])
12317
342
 
12318
 
# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
12319
 
 
12320
 
# This program is free software; you can redistribute it and/or modify
12321
 
# it under the terms of the GNU General Public License as published by
12322
 
# the Free Software Foundation; either version 2, or (at your option)
12323
 
# any later version.
12324
 
 
12325
 
# This program is distributed in the hope that it will be useful,
12326
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12327
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12328
 
# GNU General Public License for more details.
12329
 
 
12330
 
# You should have received a copy of the GNU General Public License
12331
 
# along with this program; if not, write to the Free Software
12332
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12333
 
# 02111-1307, USA.
 
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.
12334
488
 
12335
489
# serial 2
12336
490
 
 
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
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
505
 
 
506
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
507
#
 
508
# This file is free software; the Free Software Foundation
 
509
# gives unlimited permission to copy and/or distribute it,
 
510
# with or without modifications, as long as this notice is preserved.
 
511
 
 
512
# serial 3
 
513
 
12337
514
# AM_MAKE_INCLUDE()
12338
515
# -----------------
12339
516
# Check to see how make treats includes.
12340
517
AC_DEFUN([AM_MAKE_INCLUDE],
12341
518
[am_make=${MAKE-make}
12342
519
cat > confinc << 'END'
12343
 
doit:
 
520
am__doit:
12344
521
        @echo done
 
522
.PHONY: am__doit
12345
523
END
12346
524
# If we don't find an include directive, just comment out the code.
12347
525
AC_MSG_CHECKING([for style of include used by $am_make])
12355
533
# In particular we don't look at `^make:' because GNU make might
12356
534
# be invoked under some other name (usually "gmake"), in which
12357
535
# case it prints its new name instead of `make'.
12358
 
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
 
536
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
12359
537
   am__include=include
12360
538
   am__quote=
12361
539
   _am_result=GNU
12369
547
      _am_result=BSD
12370
548
   fi
12371
549
fi
12372
 
AC_SUBST(am__include)
12373
 
AC_SUBST(am__quote)
12374
 
AC_MSG_RESULT($_am_result)
 
550
AC_SUBST([am__include])
 
551
AC_SUBST([am__quote])
 
552
AC_MSG_RESULT([$_am_result])
12375
553
rm -f confinc confmf
12376
554
])
12377
555
 
12378
 
 
12379
 
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
12380
 
 
12381
 
# This program is free software; you can redistribute it and/or modify
12382
 
# it under the terms of the GNU General Public License as published by
12383
 
# the Free Software Foundation; either version 2, or (at your option)
12384
 
# any later version.
12385
 
 
12386
 
# This program is distributed in the hope that it will be useful,
12387
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12388
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12389
 
# GNU General Public License for more details.
12390
 
 
12391
 
# You should have received a copy of the GNU General Public License
12392
 
# along with this program; if not, write to the Free Software
12393
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12394
 
# 02111-1307, USA.
 
556
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
557
 
 
558
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
559
# Free Software Foundation, Inc.
 
560
#
 
561
# This file is free software; the Free Software Foundation
 
562
# gives unlimited permission to copy and/or distribute it,
 
563
# with or without modifications, as long as this notice is preserved.
 
564
 
 
565
# serial 4
 
566
 
 
567
# AM_MISSING_PROG(NAME, PROGRAM)
 
568
# ------------------------------
 
569
AC_DEFUN([AM_MISSING_PROG],
 
570
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
571
$1=${$1-"${am_missing_run}$2"}
 
572
AC_SUBST($1)])
 
573
 
 
574
 
 
575
# AM_MISSING_HAS_RUN
 
576
# ------------------
 
577
# Define MISSING if not defined so far and test if it supports --run.
 
578
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
579
AC_DEFUN([AM_MISSING_HAS_RUN],
 
580
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
581
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
582
# Use eval to expand $SHELL
 
583
if eval "$MISSING --run true"; then
 
584
  am_missing_run="$MISSING --run "
 
585
else
 
586
  am_missing_run=
 
587
  AC_MSG_WARN([`missing' script is too old or missing])
 
588
fi
 
589
])
 
590
 
 
591
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
592
#
 
593
# This file is free software; the Free Software Foundation
 
594
# gives unlimited permission to copy and/or distribute it,
 
595
# with or without modifications, as long as this notice is preserved.
 
596
 
 
597
# AM_PROG_MKDIR_P
 
598
# ---------------
 
599
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
600
#
 
601
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
602
# created by `make install' are always world readable, even if the
 
603
# installer happens to have an overly restrictive umask (e.g. 077).
 
604
# This was a mistake.  There are at least two reasons why we must not
 
605
# use `-m 0755':
 
606
#   - it causes special bits like SGID to be ignored,
 
607
#   - it may be too restrictive (some setups expect 775 directories).
 
608
#
 
609
# Do not use -m 0755 and let people choose whatever they expect by
 
610
# setting umask.
 
611
#
 
612
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
613
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
614
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
615
# concurrently, both version can detect that a/ is missing, but only
 
616
# one can create it and the other will error out.  Consequently we
 
617
# restrict ourselves to GNU make (using the --version option ensures
 
618
# this.)
 
619
AC_DEFUN([AM_PROG_MKDIR_P],
 
620
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
621
  # We used to keeping the `.' as first argument, in order to
 
622
  # allow $(mkdir_p) to be used without argument.  As in
 
623
  #   $(mkdir_p) $(somedir)
 
624
  # where $(somedir) is conditionally defined.  However this is wrong
 
625
  # for two reasons:
 
626
  #  1. if the package is installed by a user who cannot write `.'
 
627
  #     make install will fail,
 
628
  #  2. the above comment should most certainly read
 
629
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
630
  #     so it does not work when $(somedir) is undefined and
 
631
  #     $(DESTDIR) is not.
 
632
  #  To support the latter case, we have to write
 
633
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
634
  #  so the `.' trick is pointless.
 
635
  mkdir_p='mkdir -p --'
 
636
else
 
637
  # On NextStep and OpenStep, the `mkdir' command does not
 
638
  # recognize any option.  It will interpret all options as
 
639
  # directories to create, and then abort because `.' already
 
640
  # exists.
 
641
  for d in ./-p ./--version;
 
642
  do
 
643
    test -d $d && rmdir $d
 
644
  done
 
645
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
646
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
647
    mkdir_p='$(mkinstalldirs)'
 
648
  else
 
649
    mkdir_p='$(install_sh) -d'
 
650
  fi
 
651
fi
 
652
AC_SUBST([mkdir_p])])
 
653
 
 
654
# Helper functions for option handling.                     -*- Autoconf -*-
 
655
 
 
656
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
657
#
 
658
# This file is free software; the Free Software Foundation
 
659
# gives unlimited permission to copy and/or distribute it,
 
660
# with or without modifications, as long as this notice is preserved.
12395
661
 
12396
662
# serial 3
12397
663
 
12398
 
AC_PREREQ(2.50)
12399
 
 
12400
 
# AM_PROG_LEX
12401
 
# -----------
12402
 
# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
12403
 
# "missing" invocation, for better error output.
12404
 
AC_DEFUN([AM_PROG_LEX],
12405
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
12406
 
AC_REQUIRE([AC_PROG_LEX])dnl
12407
 
if test "$LEX" = :; then
12408
 
  LEX=${am_missing_run}flex
12409
 
fi])
12410
 
 
12411
 
 
12412
 
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
12413
 
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
12414
 
dnl also defines GSTUFF_PKG_ERRORS on error
12415
 
AC_DEFUN([PKG_CHECK_MODULES], [
12416
 
  succeeded=no
12417
 
 
12418
 
  if test -z "$PKG_CONFIG"; then
12419
 
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
12420
 
  fi
12421
 
 
12422
 
  if test "$PKG_CONFIG" = "no" ; then
12423
 
     echo "*** The pkg-config script could not be found. Make sure it is"
12424
 
     echo "*** in your path, or set the PKG_CONFIG environment variable"
12425
 
     echo "*** to the full path to pkg-config."
12426
 
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
12427
 
  else
12428
 
     PKG_CONFIG_MIN_VERSION=0.9.0
12429
 
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12430
 
        AC_MSG_CHECKING(for $2)
12431
 
 
12432
 
        if $PKG_CONFIG --exists "$2" ; then
12433
 
            AC_MSG_RESULT(yes)
12434
 
            succeeded=yes
12435
 
 
12436
 
            AC_MSG_CHECKING($1_CFLAGS)
12437
 
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
12438
 
            AC_MSG_RESULT($$1_CFLAGS)
12439
 
 
12440
 
            AC_MSG_CHECKING($1_LIBS)
12441
 
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
12442
 
            AC_MSG_RESULT($$1_LIBS)
12443
 
        else
12444
 
            $1_CFLAGS=""
12445
 
            $1_LIBS=""
12446
 
            ## If we have a custom action on failure, don't print errors, but 
12447
 
            ## do set a variable so people can do so.
12448
 
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
12449
 
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
12450
 
        fi
12451
 
 
12452
 
        AC_SUBST($1_CFLAGS)
12453
 
        AC_SUBST($1_LIBS)
12454
 
     else
12455
 
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12456
 
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
12457
 
     fi
12458
 
  fi
12459
 
 
12460
 
  if test $succeeded = yes; then
12461
 
     ifelse([$3], , :, [$3])
12462
 
  else
12463
 
     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])
12464
 
  fi
12465
 
])
12466
 
 
12467
 
 
12468
 
 
12469
 
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
12470
 
 
12471
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
12472
 
 
12473
 
# This program is free software; you can redistribute it and/or modify
12474
 
# it under the terms of the GNU General Public License as published by
12475
 
# the Free Software Foundation; either version 2, or (at your option)
12476
 
# any later version.
12477
 
 
12478
 
# This program is distributed in the hope that it will be useful,
12479
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12480
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12481
 
# GNU General Public License for more details.
12482
 
 
12483
 
# You should have received a copy of the GNU General Public License
12484
 
# along with this program; if not, write to the Free Software
12485
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12486
 
# 02111-1307, USA.
12487
 
 
12488
 
AC_PREREQ([2.52])
12489
 
 
12490
 
# serial 6
12491
 
 
12492
 
# When config.status generates a header, we must update the stamp-h file.
12493
 
# This file resides in the same directory as the config header
12494
 
# that is generated.  We must strip everything past the first ":",
12495
 
# and everything past the last "/".
12496
 
 
12497
 
# _AM_DIRNAME(PATH)
12498
 
# -----------------
12499
 
# Like AS_DIRNAME, only do it during macro expansion
12500
 
AC_DEFUN([_AM_DIRNAME],
12501
 
       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
12502
 
              m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
12503
 
                    m4_if(regexp([$1], [^/.*]), -1,
12504
 
                          [.],
12505
 
                          patsubst([$1], [^\(/\).*], [\1])),
12506
 
                    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
12507
 
              patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
12508
 
])# _AM_DIRNAME
12509
 
 
12510
 
 
12511
 
# The stamp files are numbered to have different names.
12512
 
# We could number them on a directory basis, but that's additional
12513
 
# complications, let's have a unique counter.
12514
 
m4_define([_AM_STAMP_Count], [0])
12515
 
 
12516
 
 
12517
 
# _AM_STAMP(HEADER)
12518
 
# -----------------
12519
 
# The name of the stamp file for HEADER.
12520
 
AC_DEFUN([_AM_STAMP],
12521
 
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
12522
 
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
12523
 
                               [:.*])))/stamp-h[]_AM_STAMP_Count])
12524
 
 
12525
 
 
12526
 
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
12527
 
# ------------------------------------------------------------
12528
 
# We used to try to get a real timestamp in stamp-h.  But the fear is that
12529
 
# that will cause unnecessary cvs conflicts.
12530
 
AC_DEFUN([_AM_CONFIG_HEADER],
12531
 
[# Add the stamp file to the list of files AC keeps track of,
12532
 
# along with our hook.
12533
 
AC_CONFIG_HEADERS([$1],
12534
 
                  [# update the timestamp
12535
 
echo 'timestamp for $1' >"_AM_STAMP([$1])"
12536
 
$2],
12537
 
                  [$3])
12538
 
])# _AM_CONFIG_HEADER
12539
 
 
12540
 
 
12541
 
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
12542
 
# --------------------------------------------------------------
12543
 
AC_DEFUN([AM_CONFIG_HEADER],
12544
 
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
12545
 
])# AM_CONFIG_HEADER
12546
 
 
 
664
# _AM_MANGLE_OPTION(NAME)
 
665
# -----------------------
 
666
AC_DEFUN([_AM_MANGLE_OPTION],
 
667
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
668
 
 
669
# _AM_SET_OPTION(NAME)
 
670
# ------------------------------
 
671
# Set option NAME.  Presently that only means defining a flag for this option.
 
672
AC_DEFUN([_AM_SET_OPTION],
 
673
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
674
 
 
675
# _AM_SET_OPTIONS(OPTIONS)
 
676
# ----------------------------------
 
677
# OPTIONS is a space-separated list of Automake options.
 
678
AC_DEFUN([_AM_SET_OPTIONS],
 
679
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
680
 
 
681
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
682
# -------------------------------------------
 
683
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
684
AC_DEFUN([_AM_IF_OPTION],
 
685
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
686
 
 
687
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
688
 
 
689
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
690
# Free Software Foundation, Inc.
 
691
#
 
692
# This file is free software; the Free Software Foundation
 
693
# gives unlimited permission to copy and/or distribute it,
 
694
# with or without modifications, as long as this notice is preserved.
 
695
 
 
696
# serial 4
 
697
 
 
698
# AM_SANITY_CHECK
 
699
# ---------------
 
700
AC_DEFUN([AM_SANITY_CHECK],
 
701
[AC_MSG_CHECKING([whether build environment is sane])
 
702
# Just in case
 
703
sleep 1
 
704
echo timestamp > conftest.file
 
705
# Do `set' in a subshell so we don't clobber the current shell's
 
706
# arguments.  Must try -L first in case configure is actually a
 
707
# symlink; some systems play weird games with the mod time of symlinks
 
708
# (eg FreeBSD returns the mod time of the symlink's containing
 
709
# directory).
 
710
if (
 
711
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
712
   if test "$[*]" = "X"; then
 
713
      # -L didn't work.
 
714
      set X `ls -t $srcdir/configure conftest.file`
 
715
   fi
 
716
   rm -f conftest.file
 
717
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
718
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
719
 
 
720
      # If neither matched, then we have a broken ls.  This can happen
 
721
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
722
      # broken ls alias from the environment.  This has actually
 
723
      # happened.  Such a system could not be considered "sane".
 
724
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
725
alias in your environment])
 
726
   fi
 
727
 
 
728
   test "$[2]" = conftest.file
 
729
   )
 
730
then
 
731
   # Ok.
 
732
   :
 
733
else
 
734
   AC_MSG_ERROR([newly created file is older than distributed files!
 
735
Check your system clock])
 
736
fi
 
737
AC_MSG_RESULT(yes)])
 
738
 
 
739
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
740
#
 
741
# This file is free software; the Free Software Foundation
 
742
# gives unlimited permission to copy and/or distribute it,
 
743
# with or without modifications, as long as this notice is preserved.
 
744
 
 
745
# AM_PROG_INSTALL_STRIP
 
746
# ---------------------
 
747
# One issue with vendor `install' (even GNU) is that you can't
 
748
# specify the program used to strip binaries.  This is especially
 
749
# annoying in cross-compiling environments, where the build's strip
 
750
# is unlikely to handle the host's binaries.
 
751
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
752
# always use install-sh in `make install-strip', and initialize
 
753
# STRIPPROG with the value of the STRIP variable (set by the user).
 
754
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
755
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
756
# Installed binaries are usually stripped using `strip' when the user
 
757
# run `make install-strip'.  However `strip' might not be the right
 
758
# tool to use in cross-compilation environments, therefore Automake
 
759
# will honor the `STRIP' environment variable to overrule this program.
 
760
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
761
if test "$cross_compiling" != no; then
 
762
  AC_CHECK_TOOL([STRIP], [strip], :)
 
763
fi
 
764
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
765
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
766
 
 
767
# Check how to create a tarball.                            -*- Autoconf -*-
 
768
 
 
769
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
770
#
 
771
# This file is free software; the Free Software Foundation
 
772
# gives unlimited permission to copy and/or distribute it,
 
773
# with or without modifications, as long as this notice is preserved.
 
774
 
 
775
# serial 2
 
776
 
 
777
# _AM_PROG_TAR(FORMAT)
 
778
# --------------------
 
779
# Check how to create a tarball in format FORMAT.
 
780
# FORMAT should be one of `v7', `ustar', or `pax'.
 
781
#
 
782
# Substitute a variable $(am__tar) that is a command
 
783
# writing to stdout a FORMAT-tarball containing the directory
 
784
# $tardir.
 
785
#     tardir=directory && $(am__tar) > result.tar
 
786
#
 
787
# Substitute a variable $(am__untar) that extract such
 
788
# a tarball read from stdin.
 
789
#     $(am__untar) < result.tar
 
790
AC_DEFUN([_AM_PROG_TAR],
 
791
[# Always define AMTAR for backward compatibility.
 
792
AM_MISSING_PROG([AMTAR], [tar])
 
793
m4_if([$1], [v7],
 
794
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
795
     [m4_case([$1], [ustar],, [pax],,
 
796
              [m4_fatal([Unknown tar format])])
 
797
AC_MSG_CHECKING([how to create a $1 tar archive])
 
798
# Loop over all known methods to create a tar archive until one works.
 
799
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
800
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
801
# Do not fold the above two line into one, because Tru64 sh and
 
802
# Solaris sh will not grok spaces in the rhs of `-'.
 
803
for _am_tool in $_am_tools
 
804
do
 
805
  case $_am_tool in
 
806
  gnutar)
 
807
    for _am_tar in tar gnutar gtar;
 
808
    do
 
809
      AM_RUN_LOG([$_am_tar --version]) && break
 
810
    done
 
811
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
812
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
813
    am__untar="$_am_tar -xf -"
 
814
    ;;
 
815
  plaintar)
 
816
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
817
    # ustar tarball either.
 
818
    (tar --version) >/dev/null 2>&1 && continue
 
819
    am__tar='tar chf - "$$tardir"'
 
820
    am__tar_='tar chf - "$tardir"'
 
821
    am__untar='tar xf -'
 
822
    ;;
 
823
  pax)
 
824
    am__tar='pax -L -x $1 -w "$$tardir"'
 
825
    am__tar_='pax -L -x $1 -w "$tardir"'
 
826
    am__untar='pax -r'
 
827
    ;;
 
828
  cpio)
 
829
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
830
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
831
    am__untar='cpio -i -H $1 -d'
 
832
    ;;
 
833
  none)
 
834
    am__tar=false
 
835
    am__tar_=false
 
836
    am__untar=false
 
837
    ;;
 
838
  esac
 
839
 
 
840
  # If the value was cached, stop now.  We just wanted to have am__tar
 
841
  # and am__untar set.
 
842
  test -n "${am_cv_prog_tar_$1}" && break
 
843
 
 
844
  # tar/untar a dummy directory, and stop if the command works
 
845
  rm -rf conftest.dir
 
846
  mkdir conftest.dir
 
847
  echo GrepMe > conftest.dir/file
 
848
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
849
  rm -rf conftest.dir
 
850
  if test -s conftest.tar; then
 
851
    AM_RUN_LOG([$am__untar <conftest.tar])
 
852
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
853
  fi
 
854
done
 
855
rm -rf conftest.dir
 
856
 
 
857
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
858
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
859
AC_SUBST([am__tar])
 
860
AC_SUBST([am__untar])
 
861
]) # _AM_PROG_TAR
 
862
 
 
863
m4_include([acinclude.m4])