~ubuntu-branches/ubuntu/maverick/kaptain/maverick

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Tobias Toedter
  • Date: 2008-05-30 09:14:40 UTC
  • mfrom: (3.1.4 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080530091440-hkj713cgx4nxytp6
Tags: 1:0.72-2
* Use hardening-wrapper on m68k as well
* Remove DM upload rights
* Change maintainer e-mail address

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.7.6 -*- Autoconf -*-
2
2
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005  Free Software Foundation, Inc.
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
4
# Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
15
 
#
16
 
# This file is free software; the Free Software Foundation
17
 
# gives unlimited permission to copy and/or distribute it,
18
 
# with or without modifications, as long as this notice is preserved.
 
14
 
 
15
dnl    This file is part of the KDE libraries/packages
 
16
dnl    Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
 
17
dnl              (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
 
18
 
 
19
dnl    This file is free software; you can redistribute it and/or
 
20
dnl    modify it under the terms of the GNU Library General Public
 
21
dnl    License as published by the Free Software Foundation; either
 
22
dnl    version 2 of the License, or (at your option) any later version.
 
23
 
 
24
dnl    This library is distributed in the hope that it will be useful,
 
25
dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
26
dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
27
dnl    Library General Public License for more details.
 
28
 
 
29
dnl    You should have received a copy of the GNU Library General Public License
 
30
dnl    along with this library; see the file COPYING.LIB.  If not, write to
 
31
dnl    the Free Software Foundation, Inc., 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
dnl ------------------------------------------------------------------------
 
42
dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
 
43
dnl thanks to Raja R Harinath.
 
44
dnl ------------------------------------------------------------------------
 
45
dnl
 
46
ifdef([_AC_PATH_X_XMKMF],[],
 
47
   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
 
48
ifdef([AC_OUTPUT_SUBDIRS],[],
 
49
   [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
 
50
 
 
51
# KDE_PATH_X_DIRECT
 
52
dnl Internal subroutine of AC_PATH_X.
 
53
dnl Set ac_x_includes and/or ac_x_libraries.
 
54
AC_DEFUN(KDE_PATH_X_DIRECT,
 
55
[
 
56
AC_REQUIRE([KDE_CHECK_LIB64])
 
57
 
 
58
if test "$ac_x_includes" = NO; then
 
59
  # Guess where to find include files, by looking for this one X11 .h file.
 
60
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
 
61
 
 
62
  # First, try using that file with no special directory specified.
 
63
AC_TRY_CPP([#include <$x_direct_test_include>],
 
64
[# We can compile using X headers with no special include directory.
 
65
ac_x_includes=],
 
66
[# Look for the header file in a standard set of common directories.
 
67
# Check X11 before X11Rn because it is often a symlink to the current release.
 
68
  for ac_dir in               \
 
69
    /usr/X11/include          \
 
70
    /usr/X11R6/include        \
 
71
    /usr/X11R5/include        \
 
72
    /usr/X11R4/include        \
 
73
                              \
 
74
    /usr/include/X11          \
 
75
    /usr/include/X11R6        \
 
76
    /usr/include/X11R5        \
 
77
    /usr/include/X11R4        \
 
78
                              \
 
79
    /usr/local/X11/include    \
 
80
    /usr/local/X11R6/include  \
 
81
    /usr/local/X11R5/include  \
 
82
    /usr/local/X11R4/include  \
 
83
                              \
 
84
    /usr/local/include/X11    \
 
85
    /usr/local/include/X11R6  \
 
86
    /usr/local/include/X11R5  \
 
87
    /usr/local/include/X11R4  \
 
88
                              \
 
89
    /usr/X386/include         \
 
90
    /usr/x386/include         \
 
91
    /usr/XFree86/include/X11  \
 
92
                              \
 
93
    /usr/include              \
 
94
    /usr/local/include        \
 
95
    /usr/unsupported/include  \
 
96
    /usr/athena/include       \
 
97
    /usr/local/x11r5/include  \
 
98
    /usr/lpp/Xamples/include  \
 
99
                              \
 
100
    /usr/openwin/include      \
 
101
    /usr/openwin/share/include \
 
102
    ; \
 
103
  do
 
104
    if test -r "$ac_dir/$x_direct_test_include"; then
 
105
      ac_x_includes=$ac_dir
 
106
      break
 
107
    fi
 
108
  done])
 
109
fi # $ac_x_includes = NO
 
110
 
 
111
if test "$ac_x_libraries" = NO; then
 
112
  # Check for the libraries.
 
113
 
 
114
  test -z "$x_direct_test_library" && x_direct_test_library=Xt
 
115
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
 
116
 
 
117
  # See if we find them without any special options.
 
118
  # Don't add to $LIBS permanently.
 
119
  ac_save_LIBS="$LIBS"
 
120
  LIBS="-l$x_direct_test_library $LIBS"
 
121
AC_TRY_LINK(, [${x_direct_test_function}()],
 
122
[LIBS="$ac_save_LIBS"
 
123
# We can link X programs with no special library path.
 
124
ac_x_libraries=],
 
125
[LIBS="$ac_save_LIBS"
 
126
# First see if replacing the include by lib works.
 
127
# Check X11 before X11Rn because it is often a symlink to the current release.
 
128
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
 
129
    /usr/X11/lib${kdelibsuff}           \
 
130
    /usr/X11R6/lib${kdelibsuff}         \
 
131
    /usr/X11R5/lib${kdelibsuff}         \
 
132
    /usr/X11R4/lib${kdelibsuff}         \
 
133
                                        \
 
134
    /usr/lib${kdelibsuff}/X11           \
 
135
    /usr/lib${kdelibsuff}/X11R6         \
 
136
    /usr/lib${kdelibsuff}/X11R5         \
 
137
    /usr/lib${kdelibsuff}/X11R4         \
 
138
                                        \
 
139
    /usr/local/X11/lib${kdelibsuff}     \
 
140
    /usr/local/X11R6/lib${kdelibsuff}   \
 
141
    /usr/local/X11R5/lib${kdelibsuff}   \
 
142
    /usr/local/X11R4/lib${kdelibsuff}   \
 
143
                                        \
 
144
    /usr/local/lib${kdelibsuff}/X11     \
 
145
    /usr/local/lib${kdelibsuff}/X11R6   \
 
146
    /usr/local/lib${kdelibsuff}/X11R5   \
 
147
    /usr/local/lib${kdelibsuff}/X11R4   \
 
148
                                        \
 
149
    /usr/X386/lib${kdelibsuff}          \
 
150
    /usr/x386/lib${kdelibsuff}          \
 
151
    /usr/XFree86/lib${kdelibsuff}/X11   \
 
152
                                        \
 
153
    /usr/lib${kdelibsuff}               \
 
154
    /usr/local/lib${kdelibsuff}         \
 
155
    /usr/unsupported/lib${kdelibsuff}   \
 
156
    /usr/athena/lib${kdelibsuff}        \
 
157
    /usr/local/x11r5/lib${kdelibsuff}   \
 
158
    /usr/lpp/Xamples/lib${kdelibsuff}   \
 
159
    /lib/usr/lib${kdelibsuff}/X11       \
 
160
                                        \
 
161
    /usr/openwin/lib${kdelibsuff}       \
 
162
    /usr/openwin/share/lib${kdelibsuff} \
 
163
    ; \
 
164
do
 
165
dnl Don't even attempt the hair of trying to link an X program!
 
166
  for ac_extension in a so sl; do
 
167
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
 
168
      ac_x_libraries=$ac_dir
 
169
      break 2
 
170
    fi
 
171
  done
 
172
done])
 
173
fi # $ac_x_libraries = NO
 
174
])
 
175
 
 
176
 
 
177
dnl ------------------------------------------------------------------------
 
178
dnl Find a file (or one of more files in a list of dirs)
 
179
dnl ------------------------------------------------------------------------
 
180
dnl
 
181
AC_DEFUN(AC_FIND_FILE,
 
182
[
 
183
$3=NO
 
184
for i in $2;
 
185
do
 
186
  for j in $1;
 
187
  do
 
188
    echo "configure: __oline__: $i/$j" >&AC_FD_CC
 
189
    if test -r "$i/$j"; then
 
190
      echo "taking that" >&AC_FD_CC
 
191
      $3=$i
 
192
      break 2
 
193
    fi
 
194
  done
 
195
done
 
196
])
 
197
 
 
198
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
 
199
dnl     if-not-found, test-parameter)
 
200
AC_DEFUN(KDE_FIND_PATH,
 
201
[
 
202
   AC_MSG_CHECKING([for $1])
 
203
   if test -n "$$2"; then
 
204
        kde_cv_path="$$2";
 
205
   else
 
206
        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
 
207
 
 
208
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
 
209
        [
 
210
        kde_cv_path="NONE"
 
211
        dirs="$3"
 
212
        kde_save_IFS=$IFS
 
213
        IFS=':'
 
214
        for dir in $PATH; do
 
215
          dirs="$dirs $dir"
 
216
        done
 
217
        IFS=$kde_save_IFS
 
218
 
 
219
        for dir in $dirs; do
 
220
          if test -x "$dir/$1"; then
 
221
            if test -n "$5"
 
222
            then
 
223
              evalstr="$dir/$1 $5 2>&1 "
 
224
              if eval $evalstr; then
 
225
                kde_cv_path="$dir/$1"
 
226
                break
 
227
              fi
 
228
            else
 
229
                kde_cv_path="$dir/$1"
 
230
                break
 
231
            fi
 
232
          fi
 
233
        done
 
234
 
 
235
        eval "kde_cv_path_$kde_cache=$kde_cv_path"
 
236
 
 
237
        ])
 
238
 
 
239
      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
 
240
 
 
241
   fi
 
242
 
 
243
   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
 
244
      AC_MSG_RESULT(not found)
 
245
      $4
 
246
   else
 
247
      AC_MSG_RESULT($kde_cv_path)
 
248
      $2=$kde_cv_path
 
249
 
 
250
   fi
 
251
])
 
252
 
 
253
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
 
254
[
 
255
    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
 
256
Please check whether you installed Qt correctly.
 
257
You need to have a running moc binary.
 
258
configure tried to run $ac_cv_path_moc and the test didn't
 
259
succeed. If configure shouldn't have tried this one, set
 
260
the environment variable MOC to the right one before running
 
261
configure.
 
262
])
 
263
])
 
264
 
 
265
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
 
266
[
 
267
    AC_MSG_WARN([No Qt ui compiler (uic) found!
 
268
Please check whether you installed Qt correctly.
 
269
You need to have a running uic binary.
 
270
configure tried to run $ac_cv_path_uic and the test didn't
 
271
succeed. If configure shouldn't have tried this one, set
 
272
the environment variable UIC to the right one before running
 
273
configure.
 
274
])
 
275
])
 
276
 
 
277
 
 
278
AC_DEFUN(KDE_CHECK_UIC_FLAG,
 
279
[
 
280
    AC_MSG_CHECKING([whether uic supports -$1 ])
 
281
    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
 
282
    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
 
283
    [
 
284
        cat >conftest.ui <<EOT
 
285
        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
 
286
EOT
 
287
        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
 
288
        if AC_TRY_EVAL(ac_uic_testrun); then
 
289
            eval "kde_cv_prog_uic_$kde_cache=yes"
 
290
        else
 
291
            eval "kde_cv_prog_uic_$kde_cache=no"
 
292
        fi
 
293
        rm -f conftest*
 
294
    ])
 
295
 
 
296
    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
 
297
        AC_MSG_RESULT([yes])
 
298
        :
 
299
        $3
 
300
    else
 
301
        AC_MSG_RESULT([no])
 
302
        :
 
303
        $4
 
304
    fi
 
305
])
 
306
 
 
307
 
 
308
dnl ------------------------------------------------------------------------
 
309
dnl Find the meta object compiler and the ui compiler in the PATH,
 
310
dnl in $QTDIR/bin, and some more usual places
 
311
dnl ------------------------------------------------------------------------
 
312
dnl
 
313
AC_DEFUN(AC_PATH_QT_MOC_UIC,
 
314
[
 
315
   qt_bindirs=""
 
316
   for dir in $kde_qt_dirs; do
 
317
      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
 
318
   done
 
319
   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
 
320
   if test ! "$ac_qt_bindir" = "NO"; then
 
321
      qt_bindirs="$ac_qt_bindir $qt_bindirs"
 
322
   fi
 
323
 
 
324
   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
 
325
   if test -z "$UIC_NOT_NEEDED"; then
 
326
     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
 
327
     if test -z "$UIC_PATH" ; then
 
328
       KDE_UIC_ERROR_MESSAGE
 
329
       exit 1
 
330
     elif test $kde_qtver = 3; then
 
331
       KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
 
332
       KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
 
333
 
 
334
       UIC=$UIC_PATH
 
335
       if test x$ac_uic_supports_libpath = xyes; then
 
336
           UIC="$UIC -L \$(kde_widgetdir)"
 
337
       fi
 
338
       if test x$ac_uic_supports_nounload = xyes; then
 
339
           UIC="$UIC -nounload"
 
340
       fi
 
341
     fi
 
342
   else
 
343
     UIC="echo uic not available: "
 
344
   fi
 
345
 
 
346
   AC_SUBST(MOC)
 
347
   AC_SUBST(UIC)
 
348
 
 
349
   UIC_TR="i18n"
 
350
   if test $kde_qtver = 3; then
 
351
     UIC_TR="tr2i18n"
 
352
   fi
 
353
 
 
354
   AC_SUBST(UIC_TR)
 
355
])
 
356
 
 
357
AC_DEFUN(KDE_1_CHECK_PATHS,
 
358
[
 
359
  KDE_1_CHECK_PATH_HEADERS
 
360
 
 
361
  KDE_TEST_RPATH=
 
362
 
 
363
  if test -n "$USE_RPATH"; then
 
364
 
 
365
     if test -n "$kde_libraries"; then
 
366
       KDE_TEST_RPATH="-R $kde_libraries"
 
367
     fi
 
368
 
 
369
     if test -n "$qt_libraries"; then
 
370
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
 
371
     fi
 
372
 
 
373
     if test -n "$x_libraries"; then
 
374
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
 
375
     fi
 
376
 
 
377
     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
 
378
  fi
 
379
 
 
380
AC_MSG_CHECKING([for KDE libraries installed])
 
381
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'
 
382
 
 
383
if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
384
  AC_MSG_RESULT(yes)
 
385
else
 
386
  AC_MSG_ERROR([your system fails at linking a small KDE application!
 
387
Check, if your compiler is installed correctly and if you have used the
 
388
same compiler to compile Qt and kdelibs as you did use now.
 
389
For more details about this problem, look at the end of config.log.])
 
390
fi
 
391
 
 
392
if eval `KDEDIR= ./conftest 2>&5`; then
 
393
  kde_result=done
 
394
else
 
395
  kde_result=problems
 
396
fi
 
397
 
 
398
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
 
399
kde_have_all_paths=yes
 
400
 
 
401
KDE_SET_PATHS($kde_result)
 
402
 
 
403
])
 
404
 
 
405
AC_DEFUN(KDE_SET_PATHS,
 
406
[
 
407
  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
 
408
        kde_htmldir=\"$kde_htmldir\" \
 
409
        kde_appsdir=\"$kde_appsdir\" \
 
410
        kde_icondir=\"$kde_icondir\" \
 
411
        kde_sounddir=\"$kde_sounddir\" \
 
412
        kde_datadir=\"$kde_datadir\" \
 
413
        kde_locale=\"$kde_locale\" \
 
414
        kde_cgidir=\"$kde_cgidir\" \
 
415
        kde_confdir=\"$kde_confdir\" \
 
416
        kde_mimedir=\"$kde_mimedir\" \
 
417
        kde_toolbardir=\"$kde_toolbardir\" \
 
418
        kde_wallpaperdir=\"$kde_wallpaperdir\" \
 
419
        kde_templatesdir=\"$kde_templatesdir\" \
 
420
        kde_bindir=\"$kde_bindir\" \
 
421
        kde_servicesdir=\"$kde_servicesdir\" \
 
422
        kde_servicetypesdir=\"$kde_servicetypesdir\" \
 
423
        kde_moduledir=\"$kde_moduledir\" \
 
424
   kde_styledir=\"$kde_styledir\" \
 
425
        kde_widgetdir=\"$kde_widgetdir\" \
 
426
        kde_result=$1"
 
427
])
 
428
 
 
429
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
 
430
[
 
431
if test "$1" = "default"; then
 
432
 
 
433
  if test -z "$kde_htmldir"; then
 
434
    kde_htmldir='\${prefix}/share/doc/HTML'
 
435
  fi
 
436
  if test -z "$kde_appsdir"; then
 
437
    kde_appsdir='\${prefix}/share/applnk'
 
438
  fi
 
439
  if test -z "$kde_icondir"; then
 
440
    kde_icondir='\${prefix}/share/icons'
 
441
  fi
 
442
  if test -z "$kde_sounddir"; then
 
443
    kde_sounddir='\${prefix}/share/sounds'
 
444
  fi
 
445
  if test -z "$kde_datadir"; then
 
446
    kde_datadir='\${prefix}/share/apps'
 
447
  fi
 
448
  if test -z "$kde_locale"; then
 
449
    kde_locale='\${prefix}/share/locale'
 
450
  fi
 
451
  if test -z "$kde_cgidir"; then
 
452
    kde_cgidir='\${exec_prefix}/cgi-bin'
 
453
  fi
 
454
  if test -z "$kde_confdir"; then
 
455
    kde_confdir='\${prefix}/share/config'
 
456
  fi
 
457
  if test -z "$kde_mimedir"; then
 
458
    kde_mimedir='\${prefix}/share/mimelnk'
 
459
  fi
 
460
  if test -z "$kde_toolbardir"; then
 
461
    kde_toolbardir='\${prefix}/share/toolbar'
 
462
  fi
 
463
  if test -z "$kde_wallpaperdir"; then
 
464
    kde_wallpaperdir='\${prefix}/share/wallpapers'
 
465
  fi
 
466
  if test -z "$kde_templatesdir"; then
 
467
    kde_templatesdir='\${prefix}/share/templates'
 
468
  fi
 
469
  if test -z "$kde_bindir"; then
 
470
    kde_bindir='\${exec_prefix}/bin'
 
471
  fi
 
472
  if test -z "$kde_servicesdir"; then
 
473
    kde_servicesdir='\${prefix}/share/services'
 
474
  fi
 
475
  if test -z "$kde_servicetypesdir"; then
 
476
    kde_servicetypesdir='\${prefix}/share/servicetypes'
 
477
  fi
 
478
  if test -z "$kde_moduledir"; then
 
479
    if test "$kde_qtver" = "2"; then
 
480
      kde_moduledir='\${libdir}/kde2'
 
481
    else
 
482
      kde_moduledir='\${libdir}/kde3'
 
483
    fi
 
484
  fi
 
485
  if test -z "$kde_styledir"; then
 
486
    kde_styledir='\${libdir}/kde3/plugins/styles'
 
487
  fi
 
488
  if test -z "$kde_widgetdir"; then
 
489
    kde_widgetdir='\${libdir}/kde3/plugins/designer'
 
490
  fi
 
491
 
 
492
  KDE_SET_PATHS(defaults)
 
493
 
 
494
else
 
495
 
 
496
  if test $kde_qtver = 1; then
 
497
     AC_MSG_RESULT([compiling])
 
498
     KDE_1_CHECK_PATHS
 
499
  else
 
500
     AC_MSG_ERROR([path checking not yet supported for KDE 2])
 
501
  fi
 
502
 
 
503
fi
 
504
])
 
505
 
 
506
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
 
507
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
 
508
   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
 
509
   test -z "$kde_datadir" || test -z "$kde_locale"  ||
 
510
   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
 
511
   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
 
512
   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
 
513
   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
 
514
   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
 
515
   test -z "$kde_styledir" || test -z "kde_widgetdir" 
 
516
   test "x$kde_have_all_paths" != "xyes"; then
 
517
     kde_have_all_paths=no
 
518
  fi
 
519
])
 
520
 
 
521
AC_DEFUN(KDE_MISSING_PROG_ERROR,
 
522
[
 
523
    AC_MSG_ERROR([The important program $1 was not found!
 
524
Please check whether you installed KDE correctly.
 
525
])
 
526
])
 
527
 
 
528
AC_DEFUN(KDE_MISSING_ARTS_ERROR,
 
529
[
 
530
    AC_MSG_ERROR([The important program $1 was not found!
 
531
Please check whether you installed aRts correctly.
 
532
])
 
533
])
 
534
 
 
535
AC_DEFUN(KDE_SUBST_PROGRAMS,
 
536
[
 
537
 
 
538
        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"
 
539
        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
 
540
        if test -n "$KDEDIRS"; then
 
541
           kde_save_IFS=$IFS
 
542
           IFS=:
 
543
           for dir in $KDEDIRS; do
 
544
                kde_default_bindirs="$dir/bin $kde_default_bindirs "
 
545
           done
 
546
           IFS=$kde_save_IFS
 
547
        fi
 
548
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
 
549
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
 
550
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
 
551
        KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
 
552
        KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
 
553
        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
 
554
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
 
555
      
 
556
        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
 
557
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
 
558
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
 
559
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
 
560
            if test "$KDE_XSL_STYLESHEET" = "NO"; then
 
561
                KDE_XSL_STYLESHEET=""
 
562
            else
 
563
                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
 
564
            fi
 
565
        fi
 
566
 
 
567
        DCOP_DEPENDENCIES='$(DCOPIDL)'
 
568
        AC_SUBST(DCOPIDL)
 
569
        AC_SUBST(DCOPIDL2CPP)
 
570
        AC_SUBST(DCOP_DEPENDENCIES)
 
571
        AC_SUBST(MCOPIDL)
 
572
        AC_SUBST(ARTSCCONFIG)
 
573
        AC_SUBST(KDECONFIG)
 
574
        AC_SUBST(MEINPROC)
 
575
        AC_SUBST(KDE_XSL_STYLESHEET)
 
576
 
 
577
        if test -x "$KDECONFIG"; then # it can be "compiled"
 
578
          kde_libs_prefix=`$KDECONFIG --prefix`
 
579
          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
 
580
               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
 
581
                          This means it has been moved since you installed it.
 
582
                          This won't work. Please recompile kdelibs for the new prefix.
 
583
                          ])
 
584
           fi
 
585
           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
 
586
        else
 
587
           kde_libs_prefix='$(prefix)'
 
588
           kde_libs_htmldir='$(kde_htmldir)'
 
589
        fi
 
590
        AC_SUBST(kde_libs_prefix)
 
591
        AC_SUBST(kde_libs_htmldir)
 
592
])dnl
 
593
 
 
594
AC_DEFUN(AC_CREATE_KFSSTND,
 
595
[
 
596
AC_REQUIRE([AC_CHECK_RPATH])
 
597
 
 
598
AC_MSG_CHECKING([for KDE paths])
 
599
kde_result=""
 
600
kde_cached_paths=yes
 
601
AC_CACHE_VAL(kde_cv_all_paths,
 
602
[
 
603
  KDE_SET_DEFAULT_PATHS($1)
 
604
  kde_cached_paths=no
 
605
])
 
606
eval "$kde_cv_all_paths"
 
607
KDE_CHECK_PATHS_FOR_COMPLETENESS
 
608
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
 
609
  # wrong values were cached, may be, we can set better ones
 
610
  kde_result=
 
611
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
 
612
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir=
 
613
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
 
614
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
 
615
  kde_have_all_paths=
 
616
  kde_styledir=
 
617
  kde_widgetdir=
 
618
  KDE_SET_DEFAULT_PATHS($1)
 
619
  eval "$kde_cv_all_paths"
 
620
  KDE_CHECK_PATHS_FOR_COMPLETENESS
 
621
  kde_result="$kde_result (cache overridden)"
 
622
fi
 
623
if test "$kde_have_all_paths" = "no"; then
 
624
  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
 
625
Since it had compiled and linked before, it must be a strange problem on your system.
 
626
Look at config.log for details. If you are not able to fix this, look at
 
627
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
 
628
(If you're using an egcs version on Linux, you may update binutils!)
 
629
])
 
630
else
 
631
  rm -f conftest*
 
632
  AC_MSG_RESULT($kde_result)
 
633
fi
 
634
 
 
635
bindir=$kde_bindir
 
636
 
 
637
KDE_SUBST_PROGRAMS
 
638
 
 
639
])
 
640
 
 
641
AC_DEFUN(AC_SUBST_KFSSTND,
 
642
[
 
643
AC_SUBST(kde_htmldir)
 
644
AC_SUBST(kde_appsdir)
 
645
AC_SUBST(kde_icondir)
 
646
AC_SUBST(kde_sounddir)
 
647
AC_SUBST(kde_datadir)
 
648
AC_SUBST(kde_locale)
 
649
AC_SUBST(kde_confdir)
 
650
AC_SUBST(kde_mimedir)
 
651
AC_SUBST(kde_wallpaperdir)
 
652
AC_SUBST(kde_bindir)
 
653
dnl for KDE 2
 
654
AC_SUBST(kde_templatesdir)
 
655
AC_SUBST(kde_servicesdir)
 
656
AC_SUBST(kde_servicetypesdir)
 
657
AC_SUBST(kde_moduledir)
 
658
AC_SUBST(kde_styledir)
 
659
AC_SUBST(kde_widgetdir)
 
660
if test "$kde_qtver" = 1; then
 
661
  kde_minidir="$kde_icondir/mini"
 
662
else
 
663
# for KDE 1 - this breaks KDE2 apps using minidir, but
 
664
# that's the plan ;-/
 
665
  kde_minidir="/dev/null"
 
666
fi
 
667
dnl AC_SUBST(kde_minidir)
 
668
dnl AC_SUBST(kde_cgidir)
 
669
dnl AC_SUBST(kde_toolbardir)
 
670
])
 
671
 
 
672
AC_DEFUN(KDE_MISC_TESTS,
 
673
[
 
674
   AC_LANG_C
 
675
   dnl Checks for libraries.
 
676
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
 
677
   AC_SUBST(LIBUTIL)
 
678
   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
 
679
   AC_SUBST(LIBCOMPAT)
 
680
   kde_have_crypt=
 
681
   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
 
682
      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
 
683
        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
 
684
You should install libcrypt from another source or configure with PAM
 
685
support])
 
686
        kde_have_crypt=no
 
687
      ]))
 
688
   AC_SUBST(LIBCRYPT)
 
689
   if test $kde_have_crypt = yes; then
 
690
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
 
691
   fi
 
692
   AC_CHECK_SOCKLEN_T
 
693
   AC_LANG_C
 
694
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
 
695
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
 
696
      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
 
697
        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
 
698
   fi
 
699
   AC_CHECK_FUNC(inet_ntoa)
 
700
   if test $ac_cv_func_inet_ntoa = no; then
 
701
     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
 
702
   fi
 
703
   AC_CHECK_FUNC(connect)
 
704
   if test $ac_cv_func_connect = no; then
 
705
      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
 
706
        $X_EXTRA_LIBS)
 
707
   fi
 
708
 
 
709
   AC_CHECK_FUNC(remove)
 
710
   if test $ac_cv_func_remove = no; then
 
711
      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
 
712
   fi
 
713
 
 
714
   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
 
715
   AC_CHECK_FUNC(shmat, ,
 
716
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
 
717
   
 
718
   # darwin needs this to initialize the environment
 
719
   AC_CHECK_HEADERS(crt_externs.h)
 
720
   AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
 
721
 
 
722
   # more headers that need to be explicitly included on darwin
 
723
   AC_CHECK_HEADERS(sys/types.h stdint.h)
 
724
 
 
725
   # darwin requires a poll emulation library
 
726
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
 
727
 
 
728
   # CoreAudio framework
 
729
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
 
730
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
 
731
     FRAMEWORK_COREAUDIO="-framework CoreAudio"
 
732
   ])
 
733
 
 
734
   AC_CHECK_RES_INIT
 
735
   AC_SUBST(LIB_POLL)
 
736
   AC_SUBST(FRAMEWORK_COREAUDIO)
 
737
   LIBSOCKET="$X_EXTRA_LIBS"
 
738
   AC_SUBST(LIBSOCKET)
 
739
   AC_SUBST(X_EXTRA_LIBS)
 
740
   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
 
741
   AC_SUBST(LIBUCB)
 
742
 
 
743
   case $host in  dnl this *is* LynxOS specific
 
744
   *-*-lynxos* )
 
745
        AC_MSG_CHECKING([LynxOS header file wrappers])
 
746
        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
 
747
        AC_MSG_RESULT(disabled)
 
748
        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
 
749
         ;;
 
750
    esac
 
751
 
 
752
   KDE_CHECK_TYPES
 
753
   KDE_CHECK_LIBDL
 
754
 
 
755
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
 
756
[
 
757
/*
 
758
 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
 
759
 * that defines bzero.
 
760
 */
 
761
 
 
762
#if defined(_AIX)
 
763
#include <strings.h>
 
764
#endif
 
765
])
 
766
 
 
767
AC_CHECK_FUNCS([vsnprintf snprintf])
 
768
 
 
769
AH_VERBATIM(_TRU64,[
 
770
/*
 
771
 * On HP-UX, the declaration of vsnprintf() is needed every time !
 
772
 */
 
773
 
 
774
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
 
775
#if __STDC__
 
776
#include <stdarg.h>
 
777
#include <stdlib.h>
 
778
#else
 
779
#include <varargs.h>
 
780
#endif
 
781
#ifdef __cplusplus
 
782
extern "C"
 
783
#endif
 
784
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
 
785
#ifdef __cplusplus
 
786
extern "C"
 
787
#endif
 
788
int snprintf(char *str, size_t n, char const *fmt, ...);
 
789
#endif
 
790
])
 
791
 
 
792
])
 
793
 
 
794
dnl ------------------------------------------------------------------------
 
795
dnl Find the header files and libraries for X-Windows. Extended the
 
796
dnl macro AC_PATH_X
 
797
dnl ------------------------------------------------------------------------
 
798
dnl
 
799
AC_DEFUN(K_PATH_X,
 
800
[
 
801
AC_REQUIRE([KDE_MISC_TESTS])dnl
 
802
AC_REQUIRE([KDE_CHECK_LIB64])
 
803
 
 
804
AC_ARG_ENABLE(
 
805
  embedded,
 
806
  [  --enable-embedded       link to Qt-embedded, don't use X],
 
807
  kde_use_qt_emb=$enableval,
 
808
  kde_use_qt_emb=no
 
809
)
 
810
 
 
811
AC_ARG_ENABLE(
 
812
  qtopia,
 
813
  [  --enable-qtopia         link to Qt-embedded, link to the Qtopia Environment],
 
814
  kde_use_qt_emb_palm=$enableval,
 
815
  kde_use_qt_emb_palm=no
 
816
)
 
817
 
 
818
if test "$kde_use_qt_emb" = "no"; then
 
819
 
 
820
AC_MSG_CHECKING(for X)
 
821
AC_LANG_SAVE
 
822
AC_LANG_C
 
823
AC_CACHE_VAL(kde_cv_have_x,
 
824
[# One or both of the vars are not set, and there is no cached value.
 
825
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
 
826
   kde_x_includes=NO
 
827
else
 
828
   kde_x_includes=$x_includes
 
829
fi
 
830
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
 
831
   kde_x_libraries=NO
 
832
else
 
833
   kde_x_libraries=$x_libraries
 
834
fi
 
835
 
 
836
# below we use the standard autoconf calls
 
837
ac_x_libraries=$kde_x_libraries
 
838
ac_x_includes=$kde_x_includes
 
839
 
 
840
KDE_PATH_X_DIRECT
 
841
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
 
842
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
 
843
dnl location. The correct location is /usr/lib32 or an undefined value
 
844
dnl (the linker is smart enough to pick the correct default library).
 
845
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
 
846
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
 
847
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
 
848
dnl x_includes should be left alone.
 
849
case "$host" in
 
850
mips-sgi-irix6*)
 
851
  ;;
 
852
*-*-solaris*)
 
853
  ;;
 
854
*)
 
855
  _AC_PATH_X_XMKMF
 
856
  if test -z "$ac_x_includes"; then
 
857
    ac_x_includes="."
 
858
  fi
 
859
  if test -z "$ac_x_libraries"; then
 
860
    ac_x_libraries="/usr/lib${kdelibsuff}"
 
861
  fi
 
862
esac
 
863
#from now on we use our own again
 
864
 
 
865
# when the user already gave --x-includes, we ignore
 
866
# what the standard autoconf macros told us.
 
867
if test "$kde_x_includes" = NO; then
 
868
  kde_x_includes=$ac_x_includes
 
869
fi
 
870
 
 
871
# for --x-libraries too
 
872
if test "$kde_x_libraries" = NO; then
 
873
  kde_x_libraries=$ac_x_libraries
 
874
fi
 
875
 
 
876
if test "$kde_x_includes" = NO; then
 
877
  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
 
878
fi
 
879
 
 
880
if test "$kde_x_libraries" = NO; then
 
881
  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
 
882
fi
 
883
 
 
884
# Record where we found X for the cache.
 
885
kde_cv_have_x="have_x=yes \
 
886
         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
 
887
])dnl
 
888
 
 
889
eval "$kde_cv_have_x"
 
890
 
 
891
if test "$have_x" != yes; then
 
892
  AC_MSG_RESULT($have_x)
 
893
  no_x=yes
 
894
else
 
895
  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
 
896
fi
 
897
 
 
898
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
 
899
  X_INCLUDES=""
 
900
  x_includes="."; dnl better than nothing :-
 
901
 else
 
902
  x_includes=$kde_x_includes
 
903
  X_INCLUDES="-I$x_includes"
 
904
fi
 
905
 
 
906
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
 
907
  X_LDFLAGS=""
 
908
  x_libraries="/usr/lib"; dnl better than nothing :-
 
909
 else
 
910
  x_libraries=$kde_x_libraries
 
911
  X_LDFLAGS="-L$x_libraries"
 
912
fi
 
913
all_includes="$X_INCLUDES"
 
914
all_libraries="$X_LDFLAGS"
 
915
 
 
916
AC_SUBST(X_INCLUDES)
 
917
AC_SUBST(X_LDFLAGS)
 
918
AC_SUBST(x_libraries)
 
919
AC_SUBST(x_includes)
 
920
 
 
921
# Check for libraries that X11R6 Xt/Xaw programs need.
 
922
ac_save_LDFLAGS="$LDFLAGS"
 
923
LDFLAGS="$LDFLAGS $X_LDFLAGS"
 
924
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
 
925
# check for ICE first), but we must link in the order -lSM -lICE or
 
926
# we get undefined symbols.  So assume we have SM if we have ICE.
 
927
# These have to be linked with before -lX11, unlike the other
 
928
# libraries we check for below, so use a different variable.
 
929
#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
 
930
AC_CHECK_LIB(ICE, IceConnectionNumber,
 
931
  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
 
932
AC_SUBST(LIBSM)
 
933
LDFLAGS="$ac_save_LDFLAGS"
 
934
 
 
935
AC_SUBST(X_PRE_LIBS)
 
936
 
 
937
LIB_X11='-lX11 $(LIBSOCKET)'
 
938
AC_SUBST(LIB_X11)
 
939
 
 
940
AC_MSG_CHECKING(for libXext)
 
941
AC_CACHE_VAL(kde_cv_have_libXext,
 
942
[
 
943
kde_ldflags_safe="$LDFLAGS"
 
944
kde_libs_safe="$LIBS"
 
945
 
 
946
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
 
947
LIBS="-lXext -lX11 $LIBSOCKET"
 
948
 
 
949
AC_TRY_LINK([
 
950
#include <stdio.h>
 
951
#ifdef STDC_HEADERS
 
952
# include <stdlib.h>
 
953
#endif
 
954
],
 
955
[
 
956
printf("hello Xext\n");
 
957
],
 
958
kde_cv_have_libXext=yes,
 
959
kde_cv_have_libXext=no
 
960
   )
 
961
 
 
962
LDFLAGS=$kde_ldflags_safe
 
963
LIBS=$kde_libs_safe
 
964
 ])
 
965
 
 
966
AC_MSG_RESULT($kde_cv_have_libXext)
 
967
 
 
968
if test "$kde_cv_have_libXext" = "no"; then
 
969
  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
 
970
can't find it itself, we stop here assuming that make wouldn't find
 
971
them either.])
 
972
fi
 
973
 
 
974
AC_MSG_CHECKING(for Xinerama)
 
975
 
 
976
 AC_ARG_WITH(xinerama,
 
977
  [  --with-xinerama         enable support for Xinerama ],
 
978
  [
 
979
    no_xinerama=no
 
980
  ], [
 
981
    no_xinerama=yes
 
982
  ]
 
983
)
 
984
 
 
985
kde_save_LDFLAGS="$LDFLAGS"
 
986
kde_save_CFLAGS="$CFLAGS"
 
987
kde_save_LIBS="$LIBS"
 
988
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
 
989
CFLAGS="$CFLAGS -I$x_includes"
 
990
LIBS="-lXinerama -lXext"
 
991
 
 
992
if test "x$no_xinerama" = "xno"; then
 
993
 
 
994
  AC_CACHE_VAL(ac_cv_have_xinerama,
 
995
  [
 
996
          AC_TRY_LINK([#include <X11/Xlib.h>
 
997
                        #include <X11/extensions/Xinerama.h>],
 
998
                  [XineramaIsActive(NULL);],
 
999
                  [ac_cv_have_xinerama="yes"],
 
1000
                  [ac_cv_have_xinerama="no"])
 
1001
  ])
 
1002
else
 
1003
  ac_cv_have_xinerama=no;
 
1004
fi
 
1005
 
 
1006
AC_MSG_RESULT($ac_cv_have_xinerama)
 
1007
 
 
1008
LIBXINERAMA=""
 
1009
 
 
1010
if test "$ac_cv_have_xinerama" = "yes"; then
 
1011
  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
 
1012
  LIBXINERAMA="-lXinerama"
 
1013
fi
 
1014
 
 
1015
AC_SUBST(LIBXINERAMA)
 
1016
 
 
1017
LDFLAGS="$kde_save_LDFLAGS"
 
1018
CFLAGS="$kde_save_CFLAGS"
 
1019
LIBS="$kde_save_LIBS"
 
1020
 
 
1021
LIB_XEXT="-lXext"
 
1022
QTE_NORTTI=""
 
1023
 
 
1024
else
 
1025
  dnl We're using QT Embedded
 
1026
  CPPFLAGS=-DQWS
 
1027
  CXXFLAGS="$CXXFLAGS -fno-rtti"
 
1028
  QTE_NORTTI="-fno-rtti -DQWS"
 
1029
  X_PRE_LIBS=""
 
1030
  LIB_X11=""
 
1031
  LIB_XEXT=""
 
1032
  LIBSM=""
 
1033
  X_INCLUDES=""
 
1034
  X_LDFLAGS=""
 
1035
  x_includes=""
 
1036
  x_libraries=""
 
1037
  AC_SUBST(X_PRE_LIBS)
 
1038
  AC_SUBST(LIB_X11)
 
1039
  AC_SUBST(LIBSM)
 
1040
  AC_SUBST(X_INCLUDES)
 
1041
  AC_SUBST(X_LDFLAGS)
 
1042
  AC_SUBST(x_includes)
 
1043
  AC_SUBST(x_libraries)
 
1044
fi
 
1045
AC_SUBST(QTE_NORTTI)
 
1046
AC_SUBST(LIB_XEXT)
 
1047
 
 
1048
 
 
1049
AC_LANG_RESTORE
 
1050
 
 
1051
])
 
1052
 
 
1053
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
 
1054
[
 
1055
AC_REQUIRE([KDE_USE_QT])
 
1056
cat > conftest.$ac_ext <<EOF
 
1057
#include "confdefs.h"
 
1058
#include <qglobal.h>
 
1059
#include <qapplication.h>
 
1060
EOF
 
1061
if test "$kde_qtver" = "2"; then
 
1062
cat >> conftest.$ac_ext <<EOF
 
1063
#include <qevent.h>
 
1064
#include <qstring.h>
 
1065
#include <qstyle.h>
 
1066
EOF
 
1067
 
 
1068
if test $kde_qtsubver -gt 0; then
 
1069
cat >> conftest.$ac_ext <<EOF
 
1070
#if QT_VERSION < 210
 
1071
#error 1
 
1072
#endif
 
1073
EOF
 
1074
fi
 
1075
fi
 
1076
 
 
1077
if test "$kde_qtver" = "3"; then
 
1078
cat >> conftest.$ac_ext <<EOF
 
1079
#include <qcursor.h>
 
1080
#include <qstylefactory.h>
 
1081
#include <private/qucomextra_p.h>
 
1082
EOF
 
1083
fi
 
1084
 
 
1085
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
 
1086
cat >> conftest.$ac_ext <<EOF
 
1087
#error 1
 
1088
#endif
 
1089
 
 
1090
int main() {
 
1091
EOF
 
1092
if test "$kde_qtver" = "2"; then
 
1093
cat >> conftest.$ac_ext <<EOF
 
1094
    QStringList *t = new QStringList();
 
1095
    Q_UNUSED(t);
 
1096
EOF
 
1097
if test $kde_qtsubver -gt 0; then
 
1098
cat >> conftest.$ac_ext <<EOF
 
1099
    QString s;
 
1100
    s.setLatin1("Elvis is alive", 14);
 
1101
EOF
 
1102
fi
 
1103
fi
 
1104
if test "$kde_qtver" = "3"; then
 
1105
cat >> conftest.$ac_ext <<EOF
 
1106
    (void)QStyleFactory::create(QString::null);
 
1107
    QCursor c(Qt::WhatsThisCursor);
 
1108
EOF
 
1109
fi
 
1110
cat >> conftest.$ac_ext <<EOF
 
1111
    return 0;
 
1112
}
 
1113
EOF
 
1114
])
 
1115
 
 
1116
AC_DEFUN(KDE_USE_QT,
 
1117
[
 
1118
if test -z "$1"; then
 
1119
  # Current default Qt version: 3.1
 
1120
  kde_qtver=3
 
1121
  kde_qtsubver=1
 
1122
else
 
1123
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
 
1124
  # following is the check if subversion isnt found in passed argument
 
1125
  if test "$kde_qtsubver" = "$1"; then
 
1126
    kde_qtsubver=1
 
1127
  fi
 
1128
  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
 
1129
  if test "$kde_qtver" = "1"; then
 
1130
    kde_qtsubver=42
 
1131
  fi
 
1132
fi
 
1133
 
 
1134
if test -z "$2"; then
 
1135
  if test "$kde_qtver" = "2"; then
 
1136
    if test $kde_qtsubver -gt 0; then
 
1137
      kde_qt_minversion=">= Qt 2.2.2"
 
1138
    else
 
1139
      kde_qt_minversion=">= Qt 2.0.2"
 
1140
    fi
 
1141
  fi
 
1142
  if test "$kde_qtver" = "3"; then
 
1143
    if test $kde_qtsubver -gt 0; then
 
1144
      kde_qt_minversion=">= Qt 3.1.0"
 
1145
    else
 
1146
      kde_qt_minversion=">= Qt 3.0"
 
1147
    fi
 
1148
  fi
 
1149
  if test "$kde_qtver" = "1"; then
 
1150
    kde_qt_minversion=">= 1.42 and < 2.0"
 
1151
  fi
 
1152
else
 
1153
   kde_qt_minversion=$2
 
1154
fi
 
1155
 
 
1156
if test -z "$3"; then
 
1157
   if test $kde_qtver = 3; then
 
1158
     if test $kde_qtsubver -gt 0; then
 
1159
       kde_qt_verstring="QT_VERSION >= 0x030100"
 
1160
     else
 
1161
       kde_qt_verstring="QT_VERSION >= 300"
 
1162
     fi
 
1163
   fi
 
1164
   if test $kde_qtver = 2; then
 
1165
     if test $kde_qtsubver -gt 0; then
 
1166
       kde_qt_verstring="QT_VERSION >= 222"
 
1167
     else
 
1168
       kde_qt_verstring="QT_VERSION >= 200"
 
1169
     fi
 
1170
   fi
 
1171
   if test $kde_qtver = 1; then
 
1172
    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
 
1173
   fi
 
1174
else
 
1175
   kde_qt_verstring=$3
 
1176
fi
 
1177
 
 
1178
if test $kde_qtver = 3; then
 
1179
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
 
1180
fi
 
1181
if test $kde_qtver = 2; then
 
1182
   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
 
1183
fi
 
1184
if test $kde_qtver = 1; then
 
1185
   kde_qt_dirs="$QTDIR /usr/lib/qt"
 
1186
fi
 
1187
])
 
1188
 
 
1189
AC_DEFUN(KDE_CHECK_QT_DIRECT,
 
1190
[
 
1191
AC_REQUIRE([KDE_USE_QT])
 
1192
AC_MSG_CHECKING([if Qt compiles without flags])
 
1193
AC_CACHE_VAL(kde_cv_qt_direct,
 
1194
[
 
1195
AC_LANG_SAVE
 
1196
AC_LANG_CPLUSPLUS
 
1197
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
 
1198
ac_LIBRARY_PATH="$LIBRARY_PATH"
 
1199
ac_cxxflags_safe="$CXXFLAGS"
 
1200
ac_ldflags_safe="$LDFLAGS"
 
1201
ac_libs_safe="$LIBS"
 
1202
 
 
1203
CXXFLAGS="$CXXFLAGS -I$qt_includes"
 
1204
LDFLAGS="$LDFLAGS $X_LDFLAGS"
 
1205
if test "x$kde_use_qt_emb" != "xyes"; then
 
1206
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
 
1207
else
 
1208
LIBS="$LIBQT $LIBSOCKET"
 
1209
fi
 
1210
LD_LIBRARY_PATH=
 
1211
export LD_LIBRARY_PATH
 
1212
LIBRARY_PATH=
 
1213
export LIBRARY_PATH
 
1214
 
 
1215
KDE_PRINT_QT_PROGRAM
 
1216
 
 
1217
if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
1218
  kde_cv_qt_direct="yes"
 
1219
else
 
1220
  kde_cv_qt_direct="no"
 
1221
  echo "configure: failed program was:" >&AC_FD_CC
 
1222
  cat conftest.$ac_ext >&AC_FD_CC
 
1223
fi
 
1224
 
 
1225
rm -f conftest*
 
1226
CXXFLAGS="$ac_cxxflags_safe"
 
1227
LDFLAGS="$ac_ldflags_safe"
 
1228
LIBS="$ac_libs_safe"
 
1229
 
 
1230
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
 
1231
export LD_LIBRARY_PATH
 
1232
LIBRARY_PATH="$ac_LIBRARY_PATH"
 
1233
export LIBRARY_PATH
 
1234
AC_LANG_RESTORE
 
1235
])
 
1236
 
 
1237
if test "$kde_cv_qt_direct" = "yes"; then
 
1238
  AC_MSG_RESULT(yes)
 
1239
  $1
 
1240
else
 
1241
  AC_MSG_RESULT(no)
 
1242
  $2
 
1243
fi
 
1244
])
 
1245
 
 
1246
dnl ------------------------------------------------------------------------
 
1247
dnl Try to find the Qt headers and libraries.
 
1248
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
 
1249
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
 
1250
dnl ------------------------------------------------------------------------
 
1251
dnl
 
1252
AC_DEFUN(AC_PATH_QT_1_3,
 
1253
[
 
1254
AC_REQUIRE([K_PATH_X])
 
1255
AC_REQUIRE([KDE_USE_QT])
 
1256
AC_REQUIRE([KDE_CHECK_LIB64])
 
1257
 
 
1258
dnl ------------------------------------------------------------------------
 
1259
dnl Add configure flag to enable linking to MT version of Qt library.
 
1260
dnl ------------------------------------------------------------------------
 
1261
 
 
1262
AC_ARG_ENABLE(
 
1263
  mt,
 
1264
  [  --disable-mt            link to non-threaded Qt (deprecated)],
 
1265
  kde_use_qt_mt=$enableval,
 
1266
  [
 
1267
    if test $kde_qtver = 3; then
 
1268
      kde_use_qt_mt=yes
 
1269
    else
 
1270
      kde_use_qt_mt=no
 
1271
    fi
 
1272
  ]
 
1273
)
 
1274
 
 
1275
USING_QT_MT=""
 
1276
 
 
1277
dnl ------------------------------------------------------------------------
 
1278
dnl If we not get --disable-qt-mt then adjust some vars for the host.
 
1279
dnl ------------------------------------------------------------------------
 
1280
 
 
1281
KDE_MT_LDFLAGS=
 
1282
KDE_MT_LIBS=
 
1283
if test "x$kde_use_qt_mt" = "xyes"; then
 
1284
  KDE_CHECK_THREADING
 
1285
  if test "x$kde_use_threading" = "xyes"; then
 
1286
    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
 
1287
    KDE_MT_LDFLAGS="$USE_THREADS"
 
1288
    KDE_MT_LIBS="$LIBPTHREAD"
 
1289
  else
 
1290
    kde_use_qt_mt=no
 
1291
  fi
 
1292
fi
 
1293
AC_SUBST(KDE_MT_LDFLAGS)
 
1294
AC_SUBST(KDE_MT_LIBS)
 
1295
 
 
1296
kde_qt_was_given=yes
 
1297
 
 
1298
dnl ------------------------------------------------------------------------
 
1299
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
 
1300
dnl ------------------------------------------------------------------------
 
1301
if test -z "$LIBQT_GLOB"; then
 
1302
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1303
    LIBQT_GLOB="libqte.*"
 
1304
  else
 
1305
    LIBQT_GLOB="libqt.*"
 
1306
  fi
 
1307
fi
 
1308
 
 
1309
if test -z "$LIBQT"; then
 
1310
dnl ------------------------------------------------------------
 
1311
dnl If we got --enable-embedded then adjust the Qt library name.
 
1312
dnl ------------------------------------------------------------
 
1313
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1314
    qtlib="qte"
 
1315
  else
 
1316
    qtlib="qt"
 
1317
  fi
 
1318
 
 
1319
  kde_int_qt="-l$qtlib"
 
1320
else
 
1321
  kde_int_qt="$LIBQT"
 
1322
  kde_lib_qt_set=yes
 
1323
fi
 
1324
 
 
1325
if test -z "$LIBQPE"; then
 
1326
dnl ------------------------------------------------------------
 
1327
dnl If we got --enable-palmtop then add -lqpe to the link line
 
1328
dnl ------------------------------------------------------------
 
1329
  if test "x$kde_use_qt_emb" = "xyes"; then
 
1330
    if test "x$kde_use_qt_emb_palm" = "xyes"; then
 
1331
      LIB_QPE="-lqpe"
 
1332
    else
 
1333
      LIB_QPE=""
 
1334
    fi
 
1335
  else
 
1336
    LIB_QPE=""
 
1337
  fi
 
1338
fi
 
1339
 
 
1340
dnl ------------------------------------------------------------------------
 
1341
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
 
1342
dnl ------------------------------------------------------------------------
 
1343
 
 
1344
if test "x$kde_use_qt_mt" = "xyes"; then
 
1345
  if test -z "$LIBQT"; then
 
1346
    LIBQT="-l$qtlib-mt"
 
1347
    kde_int_qt="-l$qtlib-mt"
 
1348
  else
 
1349
    LIBQT="$qtlib-mt"
 
1350
    kde_int_qt="$qtlib-mt"
 
1351
  fi
 
1352
  LIBQT_GLOB="lib$qtlib-mt.*"
 
1353
  USING_QT_MT="using -mt"
 
1354
else
 
1355
  LIBQT="-l$qtlib"
 
1356
fi
 
1357
 
 
1358
if test $kde_qtver != 1; then
 
1359
 
 
1360
  AC_REQUIRE([AC_FIND_PNG])
 
1361
  AC_REQUIRE([AC_FIND_JPEG])
 
1362
  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
 
1363
fi
 
1364
 
 
1365
if test $kde_qtver = 3; then
 
1366
  AC_REQUIRE([KDE_CHECK_LIBDL])
 
1367
  LIBQT="$LIBQT $LIBDL"
 
1368
fi
 
1369
 
 
1370
AC_MSG_CHECKING([for Qt])
 
1371
 
 
1372
if test "x$kde_use_qt_emb" != "xyes"; then
 
1373
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
 
1374
fi
 
1375
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
 
1376
qt_libraries=""
 
1377
qt_includes=""
 
1378
AC_ARG_WITH(qt-dir,
 
1379
    [  --with-qt-dir=DIR       where the root of Qt is installed ],
 
1380
    [  ac_qt_includes="$withval"/include
 
1381
       ac_qt_libraries="$withval"/lib${kdelibsuff}
 
1382
       ac_qt_bindir="$withval"/bin
 
1383
    ])
 
1384
 
 
1385
AC_ARG_WITH(qt-includes,
 
1386
    [  --with-qt-includes=DIR  where the Qt includes are. ],
 
1387
    [
 
1388
       ac_qt_includes="$withval"
 
1389
    ])
 
1390
 
 
1391
kde_qt_libs_given=no
 
1392
 
 
1393
AC_ARG_WITH(qt-libraries,
 
1394
    [  --with-qt-libraries=DIR where the Qt library is installed.],
 
1395
    [  ac_qt_libraries="$withval"
 
1396
       kde_qt_libs_given=yes
 
1397
    ])
 
1398
 
 
1399
AC_CACHE_VAL(ac_cv_have_qt,
 
1400
[#try to guess Qt locations
 
1401
 
 
1402
qt_incdirs=""
 
1403
for dir in $kde_qt_dirs; do
 
1404
   qt_incdirs="$qt_incdirs $dir/include $dir"
 
1405
done
 
1406
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
 
1407
if test ! "$ac_qt_includes" = "NO"; then
 
1408
   qt_incdirs="$ac_qt_includes $qt_incdirs"
 
1409
fi
 
1410
 
 
1411
if test "$kde_qtver" != "1"; then
 
1412
  kde_qt_header=qstyle.h
 
1413
else
 
1414
  kde_qt_header=qglobal.h
 
1415
fi
 
1416
 
 
1417
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
 
1418
ac_qt_includes="$qt_incdir"
 
1419
 
 
1420
qt_libdirs=""
 
1421
for dir in $kde_qt_dirs; do
 
1422
   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
 
1423
done
 
1424
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
 
1425
if test ! "$ac_qt_libraries" = "NO"; then
 
1426
  qt_libdir=$ac_qt_libraries
 
1427
else
 
1428
  qt_libdirs="$ac_qt_libraries $qt_libdirs"
 
1429
  # if the Qt was given, the chance is too big that libqt.* doesn't exist
 
1430
  qt_libdir=NONE
 
1431
  for dir in $qt_libdirs; do
 
1432
    try="ls -1 $dir/${LIBQT_GLOB}"
 
1433
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
 
1434
  done
 
1435
fi
 
1436
 
 
1437
ac_qt_libraries="$qt_libdir"
 
1438
 
 
1439
AC_LANG_SAVE
 
1440
AC_LANG_CPLUSPLUS
 
1441
 
 
1442
ac_cxxflags_safe="$CXXFLAGS"
 
1443
ac_ldflags_safe="$LDFLAGS"
 
1444
ac_libs_safe="$LIBS"
 
1445
 
 
1446
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
 
1447
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
 
1448
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
 
1449
 
 
1450
KDE_PRINT_QT_PROGRAM
 
1451
 
 
1452
if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
1453
  rm -f conftest*
 
1454
else
 
1455
  echo "configure: failed program was:" >&AC_FD_CC
 
1456
  cat conftest.$ac_ext >&AC_FD_CC
 
1457
  ac_qt_libraries="NO"
 
1458
fi
 
1459
rm -f conftest*
 
1460
CXXFLAGS="$ac_cxxflags_safe"
 
1461
LDFLAGS="$ac_ldflags_safe"
 
1462
LIBS="$ac_libs_safe"
 
1463
 
 
1464
AC_LANG_RESTORE
 
1465
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
 
1466
  ac_cv_have_qt="have_qt=no"
 
1467
  ac_qt_notfound=""
 
1468
  missing_qt_mt=""
 
1469
  if test "$ac_qt_includes" = NO; then
 
1470
    if test "$ac_qt_libraries" = NO; then
 
1471
      ac_qt_notfound="(headers and libraries)";
 
1472
    else
 
1473
      ac_qt_notfound="(headers)";
 
1474
    fi
 
1475
  else
 
1476
    if test "x$kde_use_qt_mt" = "xyes"; then
 
1477
       missing_qt_mt="
 
1478
Make sure that you have compiled Qt with thread support!"
 
1479
       ac_qt_notfound="(library $qtlib-mt)";
 
1480
    else
 
1481
       ac_qt_notfound="(library $qtlib)";
 
1482
    fi
 
1483
  fi
 
1484
 
 
1485
  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
 
1486
For more details about this problem, look at the end of config.log.$missing_qt_mt])
 
1487
else
 
1488
  have_qt="yes"
 
1489
fi
 
1490
])
 
1491
 
 
1492
eval "$ac_cv_have_qt"
 
1493
 
 
1494
if test "$have_qt" != yes; then
 
1495
  AC_MSG_RESULT([$have_qt]);
 
1496
else
 
1497
  ac_cv_have_qt="have_qt=yes \
 
1498
    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
 
1499
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
 
1500
 
 
1501
  qt_libraries="$ac_qt_libraries"
 
1502
  qt_includes="$ac_qt_includes"
 
1503
fi
 
1504
 
 
1505
if test ! "$kde_qt_libs_given" = "yes"; then
 
1506
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
 
1507
fi
 
1508
 
 
1509
AC_SUBST(qt_libraries)
 
1510
AC_SUBST(qt_includes)
 
1511
 
 
1512
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
 
1513
 QT_INCLUDES=""
 
1514
else
 
1515
 QT_INCLUDES="-I$qt_includes"
 
1516
 all_includes="$QT_INCLUDES $all_includes"
 
1517
fi
 
1518
 
 
1519
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
 
1520
 QT_LDFLAGS=""
 
1521
else
 
1522
 QT_LDFLAGS="-L$qt_libraries"
 
1523
 all_libraries="$all_libraries $QT_LDFLAGS"
 
1524
fi
 
1525
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
 
1526
 
 
1527
AC_SUBST(QT_INCLUDES)
 
1528
AC_SUBST(QT_LDFLAGS)
 
1529
AC_PATH_QT_MOC_UIC
 
1530
 
 
1531
KDE_CHECK_QT_JPEG
 
1532
 
 
1533
if test "x$kde_use_qt_emb" != "xyes"; then
 
1534
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
 
1535
else
 
1536
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
 
1537
fi
 
1538
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
 
1539
 
 
1540
AC_SUBST(LIB_QT)
 
1541
AC_SUBST(LIB_QPE)
 
1542
 
 
1543
AC_SUBST(kde_qtver)
 
1544
])
 
1545
 
 
1546
AC_DEFUN(AC_PATH_QT,
 
1547
[
 
1548
AC_PATH_QT_1_3
 
1549
])
 
1550
 
 
1551
AC_DEFUN(KDE_CHECK_UIC_PLUGINS,
 
1552
[
 
1553
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
 
1554
 
 
1555
if test x$ac_uic_supports_libpath = xyes; then
 
1556
 
 
1557
AC_MSG_CHECKING([if UIC has KDE plugins available])
 
1558
AC_CACHE_VAL(kde_cv_uic_plugins,
 
1559
[
 
1560
cat > actest.ui << EOF
 
1561
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
 
1562
<class>NewConnectionDialog</class>
 
1563
<widget class="QDialog">
 
1564
   <widget class="KLineEdit">
 
1565
        <property name="name">
 
1566
           <cstring>testInput</cstring>
 
1567
        </property>
 
1568
   </widget>
 
1569
</widget>
 
1570
</UI>
 
1571
EOF
 
1572
       
 
1573
 
 
1574
 
 
1575
kde_cv_uic_plugins=no
 
1576
kde_line="$UIC_PATH -L $kde_widgetdir"
 
1577
if test x$ac_uic_supports_nounload = xyes; then
 
1578
   kde_line="$kde_line -nounload"
 
1579
fi
 
1580
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
 
1581
if AC_TRY_EVAL(kde_line); then
 
1582
        if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
 
1583
                kde_cv_uic_plugins=yes
 
1584
        fi
 
1585
fi
 
1586
rm -f actest.ui actest.cpp
 
1587
])
 
1588
 
 
1589
if test "$kde_cv_uic_plugins" = yes; then
 
1590
        AC_MSG_RESULT([yes])
 
1591
else
 
1592
        AC_MSG_ERROR([not found - you need to install kdelibs first.])
 
1593
fi
 
1594
fi
 
1595
])
 
1596
 
 
1597
AC_DEFUN(KDE_CHECK_FINAL,
 
1598
[
 
1599
  AC_ARG_ENABLE(final, [  --enable-final          build size optimized apps (experimental - needs lots of memory)],
 
1600
        kde_use_final=$enableval, kde_use_final=no)
 
1601
 
 
1602
  KDE_COMPILER_REPO
 
1603
  if test "x$kde_use_final" = "xyes"; then
 
1604
      KDE_USE_FINAL_TRUE=""
 
1605
      KDE_USE_FINAL_FALSE="#"
 
1606
   else
 
1607
      KDE_USE_FINAL_TRUE="#"
 
1608
      KDE_USE_FINAL_FALSE=""
 
1609
  fi
 
1610
  AC_SUBST(KDE_USE_FINAL_TRUE)
 
1611
  AC_SUBST(KDE_USE_FINAL_FALSE)
 
1612
 
 
1613
  AC_ARG_ENABLE(closure, [  --disable-closure       don't delay template instantiation],
 
1614
        kde_use_closure=$enableval, kde_use_closure=yes)
 
1615
 
 
1616
  if test "x$kde_use_closure" = "xyes"; then
 
1617
       KDE_USE_CLOSURE_TRUE=""
 
1618
       KDE_USE_CLOSURE_FALSE="#"
 
1619
#       CXXFLAGS="$CXXFLAGS $REPO"
 
1620
  else
 
1621
       KDE_USE_CLOSURE_TRUE="#"
 
1622
       KDE_USE_CLOSURE_FALSE=""
 
1623
  fi
 
1624
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
 
1625
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
 
1626
])
 
1627
 
 
1628
dnl ------------------------------------------------------------------------
 
1629
dnl Now, the same with KDE
 
1630
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
 
1631
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
 
1632
dnl ------------------------------------------------------------------------
 
1633
dnl
 
1634
AC_DEFUN(AC_BASE_PATH_KDE,
 
1635
[
 
1636
AC_PREREQ([2.13])
 
1637
AC_REQUIRE([AC_PATH_QT])dnl
 
1638
AC_REQUIRE([KDE_CHECK_LIB64])
 
1639
 
 
1640
AC_CHECK_RPATH
 
1641
AC_MSG_CHECKING([for KDE])
 
1642
 
 
1643
if test "${prefix}" != NONE; then
 
1644
  kde_includes=${prefix}/include
 
1645
  ac_kde_includes=$prefix/include
 
1646
 
 
1647
  if test "${exec_prefix}" != NONE; then
 
1648
     kde_libraries=${libdir}
 
1649
     ac_kde_libraries=$libdir
 
1650
     if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
 
1651
        ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
 
1652
     fi
 
1653
  else
 
1654
     kde_libraries=${prefix}/lib${kdelibsuff}
 
1655
     ac_kde_libraries=$prefix/lib${kdelibsuff}
 
1656
  fi
 
1657
else
 
1658
  ac_kde_includes=
 
1659
  ac_kde_libraries=
 
1660
  kde_libraries=""
 
1661
  kde_includes=""
 
1662
fi
 
1663
 
 
1664
AC_CACHE_VAL(ac_cv_have_kde,
 
1665
[#try to guess kde locations
 
1666
 
 
1667
if test "$kde_qtver" = 1; then
 
1668
  kde_check_header="ksock.h"
 
1669
  kde_check_lib="libkdecore.la"
 
1670
else
 
1671
  kde_check_header="ksharedptr.h"
 
1672
  kde_check_lib="libkio.la"
 
1673
fi
 
1674
 
 
1675
if test -z "$1"; then
 
1676
 
 
1677
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
 
1678
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
 
1679
kde_incdirs="$ac_kde_includes $kde_incdirs"
 
1680
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
 
1681
ac_kde_includes="$kde_incdir"
 
1682
 
 
1683
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
 
1684
  AC_MSG_ERROR([
 
1685
in the prefix, you've chosen, are no KDE headers installed. This will fail.
 
1686
So, check this please and use another prefix!])
 
1687
fi
 
1688
 
 
1689
kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
 
1690
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
 
1691
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
 
1692
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
 
1693
ac_kde_libraries="$kde_libdir"
 
1694
 
 
1695
kde_widgetdir=NO
 
1696
dnl this might be somewhere else
 
1697
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
 
1698
 
 
1699
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
 
1700
AC_MSG_ERROR([
 
1701
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
 
1702
So, check this please and use another prefix!])
 
1703
fi
 
1704
 
 
1705
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
 
1706
AC_MSG_ERROR([
 
1707
I can't find the designer plugins. These are required and should have been installed
 
1708
by kdelibs])
 
1709
fi
 
1710
 
 
1711
if test -n "$kde_widgetdir"; then
 
1712
    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
 
1713
fi
 
1714
 
 
1715
 
 
1716
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
 
1717
  ac_cv_have_kde="have_kde=no"
 
1718
else
 
1719
  ac_cv_have_kde="have_kde=yes \
 
1720
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
 
1721
fi
 
1722
 
 
1723
else dnl test -z $1
 
1724
 
 
1725
  ac_cv_have_kde="have_kde=no"
 
1726
 
 
1727
fi
 
1728
])dnl
 
1729
 
 
1730
eval "$ac_cv_have_kde"
 
1731
 
 
1732
if test "$have_kde" != "yes"; then
 
1733
 if test "${prefix}" = NONE; then
 
1734
  ac_kde_prefix="$ac_default_prefix"
 
1735
 else
 
1736
  ac_kde_prefix="$prefix"
 
1737
 fi
 
1738
 if test "$exec_prefix" = NONE; then
 
1739
  ac_kde_exec_prefix="$ac_kde_prefix"
 
1740
  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
 
1741
 else
 
1742
  ac_kde_exec_prefix="$exec_prefix"
 
1743
  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
 
1744
 fi
 
1745
 
 
1746
 kde_libraries="${libdir}"
 
1747
 kde_includes=${ac_kde_prefix}/include
 
1748
 
 
1749
else
 
1750
  ac_cv_have_kde="have_kde=yes \
 
1751
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
 
1752
  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
 
1753
 
 
1754
  kde_libraries="$ac_kde_libraries"
 
1755
  kde_includes="$ac_kde_includes"
 
1756
fi
 
1757
AC_SUBST(kde_libraries)
 
1758
AC_SUBST(kde_includes)
 
1759
 
 
1760
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
 
1761
 KDE_INCLUDES=""
 
1762
else
 
1763
 KDE_INCLUDES="-I$kde_includes"
 
1764
 all_includes="$KDE_INCLUDES $all_includes"
 
1765
fi
 
1766
 
 
1767
KDE_LDFLAGS="-L$kde_libraries"
 
1768
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
 
1769
 all_libraries="$all_libraries $KDE_LDFLAGS"
 
1770
fi
 
1771
 
 
1772
AC_SUBST(KDE_LDFLAGS)
 
1773
AC_SUBST(KDE_INCLUDES)
 
1774
 
 
1775
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
1776
 
 
1777
all_libraries="$all_libraries $USER_LDFLAGS"
 
1778
all_includes="$all_includes $USER_INCLUDES"
 
1779
AC_SUBST(all_includes)
 
1780
AC_SUBST(all_libraries)
 
1781
 
 
1782
if test -z "$1"; then
 
1783
KDE_CHECK_UIC_PLUGINS
 
1784
fi
 
1785
 
 
1786
ac_kde_libraries="$kde_libdir"
 
1787
 
 
1788
AC_SUBST(AUTODIRS)
 
1789
 
 
1790
 
 
1791
])
 
1792
 
 
1793
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
 
1794
[
 
1795
AC_MSG_CHECKING(for extra includes)
 
1796
AC_ARG_WITH(extra-includes, [  --with-extra-includes=DIR
 
1797
                          adds non standard include paths],
 
1798
  kde_use_extra_includes="$withval",
 
1799
  kde_use_extra_includes=NONE
 
1800
)
 
1801
kde_extra_includes=
 
1802
if test -n "$kde_use_extra_includes" && \
 
1803
   test "$kde_use_extra_includes" != "NONE"; then
 
1804
 
 
1805
   ac_save_ifs=$IFS
 
1806
   IFS=':'
 
1807
   for dir in $kde_use_extra_includes; do
 
1808
     kde_extra_includes="$kde_extra_includes $dir"
 
1809
     USER_INCLUDES="$USER_INCLUDES -I$dir"
 
1810
   done
 
1811
   IFS=$ac_save_ifs
 
1812
   kde_use_extra_includes="added"
 
1813
else
 
1814
   kde_use_extra_includes="no"
 
1815
fi
 
1816
AC_SUBST(USER_INCLUDES)
 
1817
 
 
1818
AC_MSG_RESULT($kde_use_extra_includes)
 
1819
 
 
1820
kde_extra_libs=
 
1821
AC_MSG_CHECKING(for extra libs)
 
1822
AC_ARG_WITH(extra-libs, [  --with-extra-libs=DIR   adds non standard library paths],
 
1823
  kde_use_extra_libs=$withval,
 
1824
  kde_use_extra_libs=NONE
 
1825
)
 
1826
if test -n "$kde_use_extra_libs" && \
 
1827
   test "$kde_use_extra_libs" != "NONE"; then
 
1828
 
 
1829
   ac_save_ifs=$IFS
 
1830
   IFS=':'
 
1831
   for dir in $kde_use_extra_libs; do
 
1832
     kde_extra_libs="$kde_extra_libs $dir"
 
1833
     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
 
1834
     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
 
1835
   done
 
1836
   IFS=$ac_save_ifs
 
1837
   kde_use_extra_libs="added"
 
1838
else
 
1839
   kde_use_extra_libs="no"
 
1840
fi
 
1841
 
 
1842
AC_SUBST(USER_LDFLAGS)
 
1843
 
 
1844
AC_MSG_RESULT($kde_use_extra_libs)
 
1845
 
 
1846
])
 
1847
 
 
1848
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
 
1849
[
 
1850
    AC_MSG_CHECKING([for KDE headers installed])
 
1851
    AC_LANG_SAVE
 
1852
    AC_LANG_CPLUSPLUS
 
1853
cat > conftest.$ac_ext <<EOF
 
1854
#ifdef STDC_HEADERS
 
1855
# include <stdlib.h>
 
1856
#endif
 
1857
#include <stdio.h>
 
1858
#include "confdefs.h"
 
1859
#include <kapp.h>
 
1860
 
 
1861
int main() {
 
1862
    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
 
1863
    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
 
1864
    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
 
1865
    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
 
1866
    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
 
1867
    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
 
1868
    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
 
1869
    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
 
1870
    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
 
1871
    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
 
1872
    printf("kde_wallpaperdir=\\"%s\\"\n",
 
1873
        KApplication::kde_wallpaperdir().data());
 
1874
    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
 
1875
    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
 
1876
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
 
1877
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
 
1878
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
 
1879
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
 
1880
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
 
1881
    return 0;
 
1882
    }
 
1883
EOF
 
1884
 
 
1885
 ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
 
1886
 if AC_TRY_EVAL(ac_compile); then
 
1887
   AC_MSG_RESULT(yes)
 
1888
 else
 
1889
   AC_MSG_ERROR([your system is not able to compile a small KDE application!
 
1890
Check, if you installed the KDE header files correctly.
 
1891
For more details about this problem, look at the end of config.log.])
 
1892
  fi
 
1893
 
 
1894
  AC_LANG_RESTORE
 
1895
])
 
1896
 
 
1897
AC_DEFUN(KDE_CHECK_KDEQTADDON,
 
1898
[
 
1899
AC_MSG_CHECKING(for kde-qt-addon)
 
1900
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
 
1901
[
 
1902
 kde_ldflags_safe="$LDFLAGS"
 
1903
 kde_libs_safe="$LIBS"
 
1904
 kde_cxxflags_safe="$CXXFLAGS"
 
1905
 
 
1906
 LIBS="-lkde-qt-addon $LIBQT $LIBS"
 
1907
 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
 
1908
 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
 
1909
 
 
1910
 AC_TRY_LINK([
 
1911
   #include <qdom.h>
 
1912
 ],
 
1913
 [
 
1914
   QDomDocument doc;
 
1915
 ],
 
1916
  kde_cv_have_kdeqtaddon=yes,
 
1917
  kde_cv_have_kdeqtaddon=no
 
1918
 )
 
1919
 
 
1920
 LDFLAGS=$kde_ldflags_safe
 
1921
 LIBS=$kde_libs_safe
 
1922
 CXXFLAGS=$kde_cxxflags_safe
 
1923
])
 
1924
 
 
1925
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
 
1926
 
 
1927
if test "$kde_cv_have_kdeqtaddon" = "no"; then
 
1928
  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
 
1929
It is a separate package (and CVS module) named kde-qt-addon.])
 
1930
fi
 
1931
])
 
1932
 
 
1933
AC_DEFUN(KDE_CHECK_KIMGIO,
 
1934
[
 
1935
   AC_REQUIRE([AC_BASE_PATH_KDE])
 
1936
   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
1937
   AC_REQUIRE([AC_FIND_TIFF])
 
1938
   AC_REQUIRE([AC_FIND_JPEG])
 
1939
   AC_REQUIRE([AC_FIND_PNG])
 
1940
   AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
 
1941
 
 
1942
   if test "$1" = "existance"; then
 
1943
     AC_LANG_SAVE
 
1944
     AC_LANG_CPLUSPLUS
 
1945
     kde_save_LIBS="$LIBS"
 
1946
     LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
 
1947
     AC_CHECK_LIB(kimgio, kimgioRegister, [
 
1948
      LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
 
1949
     LIBS="$kde_save_LIBS"
 
1950
     AC_LANG_RESTORE
 
1951
   else
 
1952
     LIBKIMGIO_EXISTS=yes
 
1953
   fi
 
1954
 
 
1955
   if test "$LIBKIMGIO_EXISTS" = "yes"; then
 
1956
     LIB_KIMGIO='-lkimgio'
 
1957
   else
 
1958
     LIB_KIMGIO=''
 
1959
   fi
 
1960
   AC_SUBST(LIB_KIMGIO)
 
1961
])
 
1962
 
 
1963
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
 
1964
[
 
1965
   AC_REQUIRE([KDE_MISC_TESTS])
 
1966
   AC_REQUIRE([KDE_CHECK_LIBDL])
 
1967
   AC_REQUIRE([K_PATH_X])
 
1968
 
 
1969
if test $kde_qtver = 3; then
 
1970
   AC_SUBST(LIB_KDECORE, "-lkdecore")
 
1971
   AC_SUBST(LIB_KDEUI, "-lkdeui")
 
1972
   AC_SUBST(LIB_KIO, "-lkio")
 
1973
   AC_SUBST(LIB_SMB, "-lsmb")
 
1974
   AC_SUBST(LIB_KAB, "-lkab")
 
1975
   AC_SUBST(LIB_KABC, "-lkabc")
 
1976
   AC_SUBST(LIB_KHTML, "-lkhtml")
 
1977
   AC_SUBST(LIB_KSPELL, "-lkspell")
 
1978
   AC_SUBST(LIB_KPARTS, "-lkparts")
 
1979
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
 
1980
# these are for backward compatibility
 
1981
   AC_SUBST(LIB_KSYCOCA, "-lkio")
 
1982
   AC_SUBST(LIB_KFILE, "-lkio")
 
1983
elif test $kde_qtver = 2; then
 
1984
   AC_SUBST(LIB_KDECORE, "-lkdecore")
 
1985
   AC_SUBST(LIB_KDEUI, "-lkdeui")
 
1986
   AC_SUBST(LIB_KIO, "-lkio")
 
1987
   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
 
1988
   AC_SUBST(LIB_SMB, "-lsmb")
 
1989
   AC_SUBST(LIB_KFILE, "-lkfile")
 
1990
   AC_SUBST(LIB_KAB, "-lkab")
 
1991
   AC_SUBST(LIB_KHTML, "-lkhtml")
 
1992
   AC_SUBST(LIB_KSPELL, "-lkspell")
 
1993
   AC_SUBST(LIB_KPARTS, "-lkparts")
 
1994
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
 
1995
else
 
1996
   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
 
1997
   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
 
1998
   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
 
1999
   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
 
2000
   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
 
2001
fi
 
2002
])
 
2003
 
 
2004
AC_DEFUN(AC_PATH_KDE,
 
2005
[
 
2006
  AC_BASE_PATH_KDE
 
2007
  AC_ARG_ENABLE(path-check, [  --disable-path-check    don't try to find out, where to install],
 
2008
  [
 
2009
  if test "$enableval" = "no";
 
2010
    then ac_use_path_checking="default"
 
2011
    else ac_use_path_checking=""
 
2012
  fi
 
2013
  ],
 
2014
  [
 
2015
  if test "$kde_qtver" = 1;
 
2016
    then ac_use_path_checking=""
 
2017
    else ac_use_path_checking="default"
 
2018
  fi
 
2019
  ]
 
2020
  )
 
2021
 
 
2022
  AC_CREATE_KFSSTND($ac_use_path_checking)
 
2023
 
 
2024
  AC_SUBST_KFSSTND
 
2025
  KDE_CREATE_LIBS_ALIASES
 
2026
])
 
2027
 
 
2028
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
 
2029
AC_DEFUN(KDE_CHECK_FUNC_EXT,
 
2030
[
 
2031
AC_MSG_CHECKING(for $1)
 
2032
AC_CACHE_VAL(kde_cv_func_$1,
 
2033
[
 
2034
AC_LANG_SAVE
 
2035
AC_LANG_CPLUSPLUS
 
2036
save_CXXFLAGS="$CXXFLAGS"
 
2037
kde_safe_LIBS="$LIBS"
 
2038
LIBS="$LIBS $X_EXTRA_LIBS"
 
2039
if test "$GXX" = "yes"; then
 
2040
  CXXFLAGS="$CXXFLAGS -pedantic-errors"
 
2041
fi
 
2042
AC_TRY_COMPILE([
 
2043
$2
 
2044
],
 
2045
[
 
2046
$3
 
2047
],
 
2048
kde_cv_func_$1=yes,
 
2049
kde_cv_func_$1=no)
 
2050
CXXFLAGS="$save_CXXFLAGS"
 
2051
LIBS=$kde_safe_LIBS
 
2052
AC_LANG_RESTORE
 
2053
])
 
2054
 
 
2055
AC_MSG_RESULT($kde_cv_func_$1)
 
2056
 
 
2057
AC_MSG_CHECKING([if $1 needs custom prototype])
 
2058
AC_CACHE_VAL(kde_cv_proto_$1,
 
2059
[
 
2060
if test "x$kde_cv_func_$1" = xyes; then
 
2061
  kde_cv_proto_$1=no
 
2062
else
 
2063
  case "$1" in
 
2064
        setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
 
2065
                kde_cv_proto_$1="yes - in libkdefakes"
 
2066
                ;;
 
2067
        *)
 
2068
                kde_cv_proto_$1=unknown
 
2069
                ;;
 
2070
  esac
 
2071
fi
 
2072
 
 
2073
if test "x$kde_cv_proto_$1" = xunknown; then
 
2074
 
 
2075
AC_LANG_SAVE
 
2076
AC_LANG_CPLUSPLUS
 
2077
  kde_safe_libs=$LIBS
 
2078
  LIBS="$LIBS $X_EXTRA_LIBS"
 
2079
  AC_TRY_LINK([
 
2080
$2
 
2081
 
 
2082
extern "C" $4;
 
2083
],
 
2084
[
 
2085
$3
 
2086
],
 
2087
[ kde_cv_func_$1=yes
 
2088
  kde_cv_proto_$1=yes ],
 
2089
  [kde_cv_proto_$1="$1 unavailable"]
 
2090
)
 
2091
LIBS=$kde_safe_libs
 
2092
AC_LANG_RESTORE
 
2093
fi
 
2094
])
 
2095
AC_MSG_RESULT($kde_cv_proto_$1)
 
2096
 
 
2097
if test "x$kde_cv_func_$1" = xyes; then
 
2098
  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
 
2099
  $6
 
2100
fi
 
2101
if test "x$kde_cv_proto_$1" = xno; then
 
2102
  AC_DEFINE(HAVE_$5_PROTO, 1,
 
2103
  [Define if you have the $1 prototype])
 
2104
fi
 
2105
 
 
2106
AH_VERBATIM([_HAVE_$5_PROTO],
 
2107
[
 
2108
#if !defined(HAVE_$5_PROTO)
 
2109
#ifdef __cplusplus
 
2110
extern "C"
 
2111
#endif
 
2112
$4;
 
2113
#endif
 
2114
])
 
2115
])
 
2116
 
 
2117
AC_DEFUN(AC_CHECK_SETENV,
 
2118
[
 
2119
        KDE_CHECK_FUNC_EXT(setenv, [
 
2120
#include <stdlib.h>
 
2121
], 
 
2122
                [setenv("VAR", "VALUE", 1);],
 
2123
                [int setenv (const char *, const char *, int)],
 
2124
                [SETENV])
 
2125
])
 
2126
 
 
2127
AC_DEFUN(AC_CHECK_UNSETENV,
 
2128
[
 
2129
        KDE_CHECK_FUNC_EXT(unsetenv, [
 
2130
#include <stdlib.h>
 
2131
], 
 
2132
                [unsetenv("VAR");],
 
2133
                [void unsetenv (const char *)],
 
2134
                [UNSETENV])
 
2135
])
 
2136
 
 
2137
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
 
2138
[
 
2139
        KDE_CHECK_FUNC_EXT(getdomainname, [
 
2140
#include <stdlib.h>
 
2141
#include <unistd.h>
 
2142
], 
 
2143
                [
 
2144
char buffer[200];
 
2145
getdomainname(buffer, 200);
 
2146
],      
 
2147
                [int getdomainname (char *, unsigned int)],
 
2148
                [GETDOMAINNAME])
 
2149
])
 
2150
 
 
2151
AC_DEFUN(AC_CHECK_GETHOSTNAME,
 
2152
[
 
2153
        KDE_CHECK_FUNC_EXT(gethostname, [
 
2154
#include <stdlib.h>
 
2155
#include <unistd.h>
 
2156
], 
 
2157
                [
 
2158
char buffer[200];
 
2159
gethostname(buffer, 200);
 
2160
],      
 
2161
                [int gethostname (char *, unsigned int)],
 
2162
                [GETHOSTNAME])
 
2163
])
 
2164
 
 
2165
AC_DEFUN(AC_CHECK_USLEEP,
 
2166
[
 
2167
        KDE_CHECK_FUNC_EXT(usleep, [
 
2168
#include <unistd.h>
 
2169
], 
 
2170
                [
 
2171
usleep(200);
 
2172
],      
 
2173
                [int usleep (unsigned int)],
 
2174
                [USLEEP])
 
2175
])
 
2176
 
 
2177
 
 
2178
AC_DEFUN(AC_CHECK_RANDOM,
 
2179
[
 
2180
        KDE_CHECK_FUNC_EXT(random, [
 
2181
#include <stdlib.h>
 
2182
], 
 
2183
                [
 
2184
random();
 
2185
],      
 
2186
                [long int random(void)],
 
2187
                [RANDOM])
 
2188
 
 
2189
        KDE_CHECK_FUNC_EXT(srandom, [
 
2190
#include <stdlib.h>
 
2191
], 
 
2192
                [
 
2193
srandom(27);
 
2194
],      
 
2195
                [void srandom(unsigned int)],
 
2196
                [SRANDOM])
 
2197
 
 
2198
])
 
2199
 
 
2200
AC_DEFUN(AC_CHECK_INITGROUPS,
 
2201
[
 
2202
        KDE_CHECK_FUNC_EXT(initgroups, [
 
2203
#include <sys/types.h>
 
2204
#include <unistd.h>
 
2205
#include <grp.h>
 
2206
],
 
2207
        [
 
2208
char buffer[200];
 
2209
initgroups(buffer, 27);
 
2210
],
 
2211
        [int initgroups(const char *, gid_t)],
 
2212
        [INITGROUPS])
 
2213
])
 
2214
 
 
2215
AC_DEFUN(AC_CHECK_MKSTEMP,
 
2216
[
 
2217
        KDE_CHECK_FUNC_EXT(mkstemp, [
 
2218
#include <stdlib.h>
 
2219
],
 
2220
        [
 
2221
mkstemp("/tmp/aaaXXXXXX");
 
2222
],
 
2223
        [int mkstemp(char *)],
 
2224
        [MKSTEMP])
 
2225
])
 
2226
 
 
2227
AC_DEFUN(AC_CHECK_MKSTEMPS,
 
2228
[
 
2229
        KDE_CHECK_FUNC_EXT(mkstemps, [
 
2230
#include <stdlib.h>
 
2231
#include <unistd.h>
 
2232
],
 
2233
        [
 
2234
mkstemps("/tmp/aaaXXXXXX", 6);
 
2235
],
 
2236
        [int mkstemps(char *, int)],
 
2237
        [MKSTEMPS])
 
2238
])
 
2239
 
 
2240
AC_DEFUN(AC_CHECK_RES_INIT,
 
2241
[
 
2242
  AC_MSG_CHECKING([if res_init needs -lresolv])
 
2243
  kde_libs_safe="$LIBS"
 
2244
  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
 
2245
  AC_TRY_LINK(
 
2246
    [
 
2247
#include <sys/types.h>
 
2248
#include <netinet/in.h>
 
2249
#include <arpa/nameser.h>
 
2250
#include <resolv.h>
 
2251
    ],
 
2252
    [
 
2253
      res_init(); 
 
2254
    ],
 
2255
    [
 
2256
      LIBRESOLV="-lresolv"
 
2257
      AC_MSG_RESULT(yes)
 
2258
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
 
2259
    ],
 
2260
    [ AC_MSG_RESULT(no) ]
 
2261
  )
 
2262
  LIBS="$kde_libs_safe"
 
2263
  AC_SUBST(LIBRESOLV)
 
2264
 
 
2265
  AC_MSG_CHECKING([if res_init is available])
 
2266
  AC_TRY_COMPILE(
 
2267
    [
 
2268
#include <sys/types.h>
 
2269
#include <netinet/in.h>
 
2270
#include <arpa/nameser.h>
 
2271
#include <resolv.h>
 
2272
    ],
 
2273
    [
 
2274
      res_init();
 
2275
    ],
 
2276
    [
 
2277
      AC_MSG_RESULT(yes)
 
2278
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
 
2279
    ],
 
2280
    [ AC_MSG_RESULT(no) ]
 
2281
  )
 
2282
])
 
2283
 
 
2284
AC_DEFUN(AC_CHECK_STRLCPY,
 
2285
[
 
2286
        KDE_CHECK_FUNC_EXT(strlcpy, [
 
2287
#include <string.h>
 
2288
],
 
2289
[ char buf[20];
 
2290
  strlcpy(buf, "KDE function test", sizeof(buf));
 
2291
],
 
2292
        [unsigned long strlcpy(char*, const char*, unsigned long)],
 
2293
        [STRLCPY])
 
2294
])
 
2295
 
 
2296
AC_DEFUN(AC_CHECK_STRLCAT,
 
2297
[
 
2298
        KDE_CHECK_FUNC_EXT(strlcat, [
 
2299
#include <string.h>
 
2300
],
 
2301
[ char buf[20];
 
2302
  buf[0]='\0';
 
2303
  strlcat(buf, "KDE function test", sizeof(buf));
 
2304
],
 
2305
        [unsigned long strlcat(char*, const char*, unsigned long)],
 
2306
        [STRLCAT])
 
2307
])
 
2308
 
 
2309
AC_DEFUN(AC_FIND_GIF,
 
2310
   [AC_MSG_CHECKING([for giflib])
 
2311
AC_CACHE_VAL(ac_cv_lib_gif,
 
2312
[ac_save_LIBS="$LIBS"
 
2313
if test "x$kde_use_qt_emb" != "xyes"; then
 
2314
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
 
2315
else
 
2316
LIBS="$all_libraries -lgif"
 
2317
fi
 
2318
AC_TRY_LINK(dnl
 
2319
[
 
2320
#ifdef __cplusplus
 
2321
extern "C" {
 
2322
#endif
 
2323
int GifLastError(void);
 
2324
#ifdef __cplusplus
 
2325
}
 
2326
#endif
 
2327
/* We use char because int might match the return type of a gcc2
 
2328
    builtin and then its argument prototype would still apply.  */
 
2329
],
 
2330
            [return GifLastError();],
 
2331
            eval "ac_cv_lib_gif=yes",
 
2332
            eval "ac_cv_lib_gif=no")
 
2333
LIBS="$ac_save_LIBS"
 
2334
])dnl
 
2335
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
 
2336
  AC_MSG_RESULT(yes)
 
2337
  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
 
2338
else
 
2339
  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
 
2340
fi
 
2341
])
 
2342
 
 
2343
AC_DEFUN(KDE_FIND_JPEG_HELPER,
 
2344
[
 
2345
AC_MSG_CHECKING([for libjpeg$2])
 
2346
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
 
2347
[
 
2348
AC_LANG_C
 
2349
ac_save_LIBS="$LIBS"
 
2350
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
 
2351
ac_save_CFLAGS="$CFLAGS"
 
2352
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2353
AC_TRY_LINK(
 
2354
[/* Override any gcc2 internal prototype to avoid an error.  */
 
2355
struct jpeg_decompress_struct;
 
2356
typedef struct jpeg_decompress_struct * j_decompress_ptr;
 
2357
typedef int size_t;
 
2358
#ifdef __cplusplus
 
2359
extern "C" {
 
2360
#endif
 
2361
    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
 
2362
                                    int version, size_t structsize);
 
2363
#ifdef __cplusplus
 
2364
}
 
2365
#endif
 
2366
/* We use char because int might match the return type of a gcc2
 
2367
    builtin and then its argument prototype would still apply.  */
 
2368
],
 
2369
            [jpeg_CreateDecompress(0L, 0, 0);],
 
2370
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
 
2371
            eval "ac_cv_lib_jpeg_$1=no")
 
2372
LIBS="$ac_save_LIBS"
 
2373
CFLAGS="$ac_save_CFLAGS"
 
2374
])
 
2375
 
 
2376
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
 
2377
  LIBJPEG="$ac_cv_lib_jpeg_$1"
 
2378
  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
 
2379
else
 
2380
  AC_MSG_RESULT(no)
 
2381
  $3
 
2382
fi
 
2383
 
 
2384
])
 
2385
 
 
2386
AC_DEFUN(AC_FIND_JPEG,
 
2387
[
 
2388
dnl first look for libraries
 
2389
KDE_FIND_JPEG_HELPER(6b, 6b,
 
2390
   KDE_FIND_JPEG_HELPER(normal, [],
 
2391
    [
 
2392
       LIBJPEG=
 
2393
    ]
 
2394
   )
 
2395
)
 
2396
 
 
2397
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
 
2398
dnl requires system dependent includes loaded before it)
 
2399
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
 
2400
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
 
2401
test "x$jpeg_incdir" = xNO && jpeg_incdir=
 
2402
 
 
2403
dnl if headers _and_ libraries are missing, this is no error, and we
 
2404
dnl continue with a warning (the user will get no jpeg support in khtml)
 
2405
dnl if only one is missing, it means a configuration error, but we still
 
2406
dnl only warn
 
2407
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
 
2408
  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
 
2409
else
 
2410
  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
 
2411
    AC_MSG_WARN([
 
2412
There is an installation error in jpeg support. You seem to have only one
 
2413
of either the headers _or_ the libraries installed. You may need to either
 
2414
provide correct --with-extra-... options, or the development package of
 
2415
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
 
2416
Disabling JPEG support.
 
2417
])
 
2418
  else
 
2419
    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
 
2420
  fi
 
2421
  jpeg_incdir=
 
2422
  LIBJPEG=
 
2423
fi
 
2424
 
 
2425
AC_SUBST(LIBJPEG)
 
2426
AH_VERBATIM(_AC_CHECK_JPEG,
 
2427
[/*
 
2428
 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
 
2429
 * headers and I'm too lazy to write a configure test as long as only
 
2430
 * unixware is related
 
2431
 */
 
2432
#ifdef _UNIXWARE
 
2433
#define HAVE_BOOLEAN
 
2434
#endif
 
2435
])
 
2436
])
 
2437
 
 
2438
AC_DEFUN(KDE_CHECK_QT_JPEG,
 
2439
[
 
2440
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
 
2441
AC_CACHE_VAL(kde_cv_qt_jpeg,
 
2442
[
 
2443
AC_LANG_SAVE
 
2444
AC_LANG_CPLUSPLUS
 
2445
ac_save_LIBS="$LIBS"
 
2446
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
 
2447
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
 
2448
ac_save_CXXFLAGS="$CXXFLAGS"
 
2449
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
2450
AC_TRY_LINK(
 
2451
[#include <qapplication.h>],
 
2452
            [
 
2453
            int argc;
 
2454
            char** argv;
 
2455
            QApplication app(argc, argv);],
 
2456
            eval "kde_cv_qt_jpeg=no",
 
2457
            eval "kde_cv_qt_jpeg=yes")
 
2458
LIBS="$ac_save_LIBS"
 
2459
CXXFLAGS="$ac_save_CXXFLAGS"
 
2460
AC_LANG_RESTORE
 
2461
])
 
2462
 
 
2463
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
 
2464
  AC_MSG_RESULT(yes)
 
2465
  LIBJPEG_QT='$(LIBJPEG)'
 
2466
else
 
2467
  AC_MSG_RESULT(no)
 
2468
  LIBJPEG_QT=
 
2469
fi
 
2470
 
 
2471
])
 
2472
 
 
2473
AC_DEFUN(AC_FIND_ZLIB,
 
2474
[
 
2475
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2476
AC_MSG_CHECKING([for libz])
 
2477
AC_CACHE_VAL(ac_cv_lib_z,
 
2478
[
 
2479
AC_LANG_C
 
2480
kde_save_LIBS="$LIBS"
 
2481
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
 
2482
kde_save_CFLAGS="$CFLAGS"
 
2483
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2484
AC_TRY_LINK(dnl
 
2485
[
 
2486
#include<zlib.h>
 
2487
],
 
2488
            [return (zlibVersion() == ZLIB_VERSION); ],
 
2489
            eval "ac_cv_lib_z='-lz'",
 
2490
            eval "ac_cv_lib_z=no")
 
2491
LIBS="$kde_save_LIBS"
 
2492
CFLAGS="$kde_save_CFLAGS"
 
2493
])dnl
 
2494
if test ! "$ac_cv_lib_z" = no; then
 
2495
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
 
2496
  LIBZ="$ac_cv_lib_z"
 
2497
  AC_SUBST(LIBZ)
 
2498
  AC_MSG_RESULT($ac_cv_lib_z)
 
2499
else
 
2500
  AC_MSG_ERROR(not found. Check your installation and look into config.log)
 
2501
  LIBZ=""
 
2502
  AC_SUBST(LIBZ)
 
2503
fi
 
2504
])
 
2505
 
 
2506
AC_DEFUN(KDE_TRY_TIFFLIB,
 
2507
[
 
2508
AC_MSG_CHECKING([for libtiff $1])
 
2509
 
 
2510
AC_CACHE_VAL(kde_cv_libtiff_$1,
 
2511
[
 
2512
AC_LANG_SAVE
 
2513
AC_LANG_CPLUSPLUS
 
2514
kde_save_LIBS="$LIBS"
 
2515
if test "x$kde_use_qt_emb" != "xyes"; then
 
2516
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
 
2517
else
 
2518
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
 
2519
fi
 
2520
kde_save_CXXFLAGS="$CXXFLAGS"
 
2521
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
 
2522
 
 
2523
AC_TRY_LINK(dnl
 
2524
[
 
2525
#include<tiffio.h>
 
2526
],
 
2527
    [return (TIFFOpen( "", "r") == 0); ],
 
2528
[
 
2529
    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
 
2530
], [
 
2531
    kde_cv_libtiff_$1=no
 
2532
])
 
2533
 
 
2534
LIBS="$kde_save_LIBS"
 
2535
CXXFLAGS="$kde_save_CXXFLAGS"
 
2536
AC_LANG_RESTORE
 
2537
])
 
2538
 
 
2539
if test "$kde_cv_libtiff_$1" = "no"; then
 
2540
    AC_MSG_RESULT(no)
 
2541
    LIBTIFF=""
 
2542
    $3
 
2543
else
 
2544
    LIBTIFF="$kde_cv_libtiff_$1"
 
2545
    AC_MSG_RESULT(yes)
 
2546
    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
 
2547
    $2
 
2548
fi
 
2549
 
 
2550
])
 
2551
 
 
2552
AC_DEFUN(AC_FIND_TIFF,
 
2553
[
 
2554
AC_REQUIRE([K_PATH_X])
 
2555
AC_REQUIRE([AC_FIND_ZLIB])
 
2556
AC_REQUIRE([AC_FIND_JPEG])
 
2557
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2558
 
 
2559
KDE_TRY_TIFFLIB(tiff, [],
 
2560
   KDE_TRY_TIFFLIB(tiff34))
 
2561
 
 
2562
AC_SUBST(LIBTIFF)
 
2563
])
 
2564
 
 
2565
 
 
2566
AC_DEFUN(AC_FIND_PNG,
 
2567
[
 
2568
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2569
AC_REQUIRE([AC_FIND_ZLIB])
 
2570
AC_MSG_CHECKING([for libpng])
 
2571
AC_CACHE_VAL(ac_cv_lib_png,
 
2572
[
 
2573
kde_save_LIBS="$LIBS"
 
2574
if test "x$kde_use_qt_emb" != "xyes"; then
 
2575
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
 
2576
else
 
2577
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
 
2578
fi
 
2579
kde_save_CFLAGS="$CFLAGS"
 
2580
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
2581
AC_LANG_C
 
2582
AC_TRY_LINK(dnl
 
2583
    [
 
2584
    #include<png.h>
 
2585
    ],
 
2586
    [
 
2587
    png_structp png_ptr = png_create_read_struct(  /* image ptr */
 
2588
                PNG_LIBPNG_VER_STRING, 0, 0, 0 );
 
2589
    return( png_ptr != 0 );
 
2590
    ],
 
2591
    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
 
2592
    eval "ac_cv_lib_png=no"
 
2593
)
 
2594
LIBS="$kde_save_LIBS"
 
2595
CFLAGS="$kde_save_CFLAGS"
 
2596
])dnl
 
2597
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
 
2598
  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
 
2599
  LIBPNG="$ac_cv_lib_png"
 
2600
  AC_SUBST(LIBPNG)
 
2601
  AC_MSG_RESULT($ac_cv_lib_png)
 
2602
else
 
2603
  AC_MSG_RESULT(no)
 
2604
  LIBPNG=""
 
2605
  AC_SUBST(LIBPNG)
 
2606
fi
 
2607
])
 
2608
 
 
2609
AC_DEFUN(AC_CHECK_BOOL,
 
2610
[
 
2611
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
 
2612
])
 
2613
 
 
2614
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
 
2615
[
 
2616
AC_MSG_CHECKING(if you need GNU extensions)
 
2617
AC_CACHE_VAL(ac_cv_gnu_extensions,
 
2618
[
 
2619
cat > conftest.c << EOF
 
2620
#include <features.h>
 
2621
 
 
2622
#ifdef __GNU_LIBRARY__
 
2623
yes
 
2624
#endif
 
2625
EOF
 
2626
 
 
2627
if (eval "$ac_cpp conftest.c") 2>&5 |
 
2628
  egrep "yes" >/dev/null 2>&1; then
 
2629
  rm -rf conftest*
 
2630
  ac_cv_gnu_extensions=yes
 
2631
else
 
2632
  ac_cv_gnu_extensions=no
 
2633
fi
 
2634
])
 
2635
 
 
2636
AC_MSG_RESULT($ac_cv_gnu_extensions)
 
2637
if test "$ac_cv_gnu_extensions" = "yes"; then
 
2638
  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
 
2639
fi
 
2640
])
 
2641
 
 
2642
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
 
2643
[
 
2644
AC_MSG_CHECKING(whether $CXX supports -$1)
 
2645
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
 
2646
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
 
2647
[
 
2648
  AC_LANG_SAVE
 
2649
  AC_LANG_CPLUSPLUS
 
2650
  save_CXXFLAGS="$CXXFLAGS"
 
2651
  CXXFLAGS="$CXXFLAGS -$1"
 
2652
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
 
2653
  CXXFLAGS="$save_CXXFLAGS"
 
2654
  AC_LANG_RESTORE
 
2655
])
 
2656
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
 
2657
 AC_MSG_RESULT(yes)
 
2658
 :
 
2659
 $2
 
2660
else
 
2661
 AC_MSG_RESULT(no)
 
2662
 :
 
2663
 $3
 
2664
fi
 
2665
])
 
2666
 
 
2667
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
 
2668
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
 
2669
dnl it's all white-space separated
 
2670
AC_DEFUN(AC_REMOVE_FORBIDDEN,
 
2671
[ __val=$$1
 
2672
  __forbid=" $2 "
 
2673
  if test -n "$__val"; then
 
2674
    __new=""
 
2675
    ac_save_IFS=$IFS
 
2676
    IFS="       "
 
2677
    for i in $__val; do
 
2678
      case "$__forbid" in
 
2679
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
 
2680
        *) # Careful to not add spaces, where there were none, because otherwise
 
2681
           # libtool gets confused, if we change e.g. CXX
 
2682
           if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
 
2683
      esac
 
2684
    done
 
2685
    IFS=$ac_save_IFS
 
2686
    $1=$__new
 
2687
  fi
 
2688
])
 
2689
 
 
2690
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
 
2691
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
 
2692
[dnl
 
2693
if test "x$kde_use_qt_emb" != "xyes"; then
 
2694
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
 
2695
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
 
2696
else
 
2697
 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
 
2698
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
 
2699
fi
 
2700
])
 
2701
 
 
2702
AC_DEFUN(AC_CHECK_COMPILERS,
 
2703
[
 
2704
  AC_ARG_ENABLE(debug,[  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]],
 
2705
  [
 
2706
    case $enableval in
 
2707
      yes)
 
2708
        kde_use_debug_code="yes"
 
2709
        kde_use_debug_define=no
 
2710
        ;;
 
2711
      full)
 
2712
        kde_use_debug_code="full"
 
2713
        kde_use_debug_define=no
 
2714
        ;;
 
2715
      *)
 
2716
        kde_use_debug_code="no"
 
2717
        kde_use_debug_define=yes
 
2718
        ;;
 
2719
    esac
 
2720
  ], 
 
2721
    [kde_use_debug_code="no"
 
2722
      kde_use_debug_define=no
 
2723
  ])
 
2724
 
 
2725
  dnl Just for configure --help
 
2726
  AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
 
2727
 
 
2728
  AC_ARG_ENABLE(strict,[  --enable-strict         compiles with strict compiler options (may not work!)],
 
2729
   [
 
2730
    if test $enableval = "no"; then
 
2731
         kde_use_strict_options="no"
 
2732
       else
 
2733
         kde_use_strict_options="yes"
 
2734
    fi
 
2735
   ], [kde_use_strict_options="no"])
 
2736
 
 
2737
  AC_ARG_ENABLE(warnings,[  --disable-warnings      disables compilation with -Wall and similiar],
 
2738
   [
 
2739
    if test $enableval = "no"; then
 
2740
         kde_use_warnings="no"
 
2741
       else
 
2742
         kde_use_warnings="yes"
 
2743
    fi
 
2744
   ], [kde_use_warnings="yes"])
 
2745
 
 
2746
  dnl enable warnings for debug build
 
2747
  if test "$kde_use_debug_code" != "no"; then
 
2748
    kde_use_warnings=yes
 
2749
  fi
 
2750
 
 
2751
  AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
 
2752
    [kde_use_profiling=$enableval],
 
2753
    [kde_use_profiling="no"]
 
2754
  )
 
2755
 
 
2756
  AC_ARG_ENABLE(gcov,[  --enable-gcov           enables gcov test coverage support [default=no]],
 
2757
    [kde_use_gcov=$enableval],
 
2758
    [kde_use_gcov=no]
 
2759
  )
 
2760
 
 
2761
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
 
2762
  CFLAGS=" $CFLAGS"
 
2763
 
 
2764
  AC_PROG_CC 
 
2765
 
 
2766
  AC_PROG_CPP
 
2767
 
 
2768
  if test "$GCC" = "yes"; then
 
2769
    if test "$kde_use_debug_code" != "no"; then
 
2770
      if test $kde_use_debug_code = "full" || test $kde_use_gcov = "yes"; then
 
2771
        CFLAGS="-g3 $CFLAGS"
 
2772
      else
 
2773
        CFLAGS="-g -O2 $CFLAGS"
 
2774
      fi
 
2775
    else
 
2776
      CFLAGS="-O2 $CFLAGS"
 
2777
    fi
 
2778
  fi
 
2779
 
 
2780
  if test "$kde_use_debug_define" = "yes"; then
 
2781
    CFLAGS="-DNDEBUG $CFLAGS"
 
2782
  fi
 
2783
 
 
2784
 
 
2785
  case "$host" in
 
2786
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
 
2787
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
 
2788
  esac
 
2789
 
 
2790
  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
 
2791
     LDFLAGS=""
 
2792
  fi
 
2793
 
 
2794
  CXXFLAGS=" $CXXFLAGS"
 
2795
 
 
2796
  AC_PROG_CXX
 
2797
 
 
2798
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
 
2799
    if test "$kde_use_debug_code" != "no"; then
 
2800
      if test "$CXX" = "KCC"; then
 
2801
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
 
2802
      else
 
2803
        if test "$kde_use_debug_code" = "full"; then
 
2804
          CXXFLAGS="-g3 $CXXFLAGS"
 
2805
        else
 
2806
          CXXFLAGS="-g -O2 $CXXFLAGS"
 
2807
        fi
 
2808
      fi
 
2809
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
 
2810
 
 
2811
      dnl convenience compiler flags
 
2812
      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
 
2813
      AC_SUBST(WOVERLOADED_VIRTUAL)
 
2814
    else
 
2815
      if test "$CXX" = "KCC"; then
 
2816
        CXXFLAGS="+K3 $CXXFLAGS"
 
2817
      else
 
2818
        CXXFLAGS="-O2 $CXXFLAGS"
 
2819
      fi  
 
2820
    fi
 
2821
  fi
 
2822
 
 
2823
  if test "$kde_use_debug_define" = "yes"; then
 
2824
    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
 
2825
  fi  
 
2826
 
 
2827
  if test "$kde_use_profiling" = "yes"; then
 
2828
    KDE_CHECK_COMPILER_FLAG(pg,
 
2829
    [
 
2830
      CFLAGS="-pg $CFLAGS"
 
2831
      CXXFLAGS="-pg $CXXFLAGS"
 
2832
    ])
 
2833
  fi
 
2834
 
 
2835
  if test "$kde_use_gcov" = "yes"; then
 
2836
    KDE_CHECK_COMPILER_FLAG(fprofile-arcs,
 
2837
    [
 
2838
      CFLAGS="-fprofile-arcs -ftest-coverage $CFLAGS"
 
2839
      CXXFLAGS="-fprofile-arcs -ftest-coverage $CXXFLAGS"
 
2840
    ])
 
2841
  fi
 
2842
 
 
2843
  if test "$kde_use_warnings" = "yes"; then
 
2844
      if test "$GCC" = "yes"; then
 
2845
        case $host in
 
2846
          *-*-linux-gnu)        
 
2847
            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
 
2848
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
 
2849
          ;;
 
2850
        esac
 
2851
        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
 
2852
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
 
2853
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
 
2854
        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
 
2855
     fi
 
2856
  fi
 
2857
 
 
2858
  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
 
2859
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
 
2860
  fi
 
2861
    
 
2862
  if test "$GXX" = "yes"; then
 
2863
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
 
2864
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
 
2865
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
 
2866
  fi
 
2867
  if test "$CXX" = "KCC"; then
 
2868
    dnl unfortunately we currently cannot disable exception support in KCC
 
2869
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
 
2870
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
 
2871
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
 
2872
 
 
2873
    AC_ARG_ENABLE(pch,[  --enable-pch            enables precompiled header support (currently only KCC) [default=no]],
 
2874
    [
 
2875
      kde_use_pch=$enableval
 
2876
    ],[kde_use_pch=no])
 
2877
 
 
2878
    if test "$kde_use_pch" = "yes"; then
 
2879
      dnl TODO: support --pch-dir!
 
2880
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
 
2881
      dnl the below works (but the dir must exist), but it's
 
2882
      dnl useless for a whole package.
 
2883
      dnl The are precompiled headers for each source file, so when compiling
 
2884
      dnl from scratch, it doesn't make a difference, and they take up
 
2885
      dnl around ~5Mb _per_ sourcefile.
 
2886
      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
 
2887
      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
 
2888
    fi
 
2889
    dnl this flag controls inlining. by default KCC inlines in optimisation mode
 
2890
    dnl all implementations that are defined inside the class {} declaration. 
 
2891
    dnl because of templates-compatibility with broken gcc compilers, this
 
2892
    dnl can cause excessive inlining. This flag limits it to a sane level
 
2893
    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
 
2894
    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
 
2895
    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
 
2896
    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
 
2897
    dnl Some source files are shared between multiple executables
 
2898
    dnl (or libraries) and some of those need template instantiations.
 
2899
    dnl In that case KCC needs to compile those sources with
 
2900
    dnl --one_instantiation_per_object.  To make it easy for us we compile
 
2901
    dnl _all_ objects with that flag (--one_per is a shorthand).
 
2902
    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
 
2903
  fi
 
2904
  AC_SUBST(USE_EXCEPTIONS)
 
2905
  dnl obsolete macro - provided to keep things going
 
2906
  USE_RTTI=
 
2907
  AC_SUBST(USE_RTTI)
 
2908
 
 
2909
  case "$host" in
 
2910
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
 
2911
      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
 
2912
      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
 
2913
      *-*-solaris*) 
 
2914
        if test "$GXX" = yes; then
 
2915
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
 
2916
          if test ! -f $libstdcpp; then
 
2917
             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])
 
2918
          fi
 
2919
        fi
 
2920
        ;;
 
2921
  esac
 
2922
 
 
2923
  AC_VALIDIFY_CXXFLAGS
 
2924
 
 
2925
  AC_PROG_CXXCPP
 
2926
 
 
2927
  if test "$GCC" = yes; then
 
2928
     NOOPT_CXXFLAGS=-O0
 
2929
     NOOPT_CFLAGS=-O0
 
2930
  fi
 
2931
 
 
2932
  AC_SUBST(NOOPT_CXXFLAGS)
 
2933
  AC_SUBST(NOOPT_CFLAGS)
 
2934
 
 
2935
  KDE_CHECK_FINAL
 
2936
 
 
2937
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
 
2938
])
 
2939
 
 
2940
AC_DEFUN(KDE_ADD_DEPENDENCIES,
 
2941
[
 
2942
   [A]M_DEPENDENCIES(CC)
 
2943
   [A]M_DEPENDENCIES(CXX)
 
2944
])
 
2945
 
 
2946
dnl just a wrapper to clean up configure.in
 
2947
AC_DEFUN(KDE_PROG_LIBTOOL,
 
2948
[
 
2949
AC_REQUIRE([AC_CHECK_COMPILERS])
 
2950
AC_REQUIRE([AC_ENABLE_SHARED])
 
2951
AC_REQUIRE([AC_ENABLE_STATIC])
 
2952
 
 
2953
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
 
2954
AC_REQUIRE([KDE_CHECK_LIB64])
 
2955
 
 
2956
AC_LANG_SAVE
 
2957
AC_LANG_C
 
2958
AC_OBJEXT
 
2959
AC_EXEEXT
 
2960
AC_LANG_RESTORE
 
2961
 
 
2962
AM_PROG_LIBTOOL
 
2963
AC_LIBTOOL_CXX
 
2964
 
 
2965
LIBTOOL_SHELL="/bin/sh ./libtool"
 
2966
#  LIBTOOL="$LIBTOOL --silent"
 
2967
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
 
2968
AC_SUBST(KDE_PLUGIN)
 
2969
 
 
2970
AC_ARG_ENABLE(objprelink, [  --enable-objprelink     prelink apps using objprelink (obsolete)],
 
2971
       kde_use_objprelink=$enableval, kde_use_objprelink=no)
 
2972
  if test "x$kde_use_objprelink" = "xyes"; then 
 
2973
        AC_MSG_WARN([
 
2974
------------------------------------------------------------
 
2975
Configuration option --enable-objprelink is no longer useful.
 
2976
See http:://objprelink.sourceforge.net for details:
 
2977
1- Recent binutils are fast enough to do without objprelink.
 
2978
2- Newer versions of objprelink do not need this option.
 
2979
------------------------------------------------------------
 
2980
])
 
2981
  fi
 
2982
])
 
2983
 
 
2984
AC_DEFUN(KDE_CHECK_LIB64,
 
2985
[
 
2986
    kdelibsuff=none
 
2987
    AC_ARG_ENABLE(libsuffix,
 
2988
        AC_HELP_STRING([--enable-libsuffix],
 
2989
            [/lib directory suffix (64,32,none[=default])]),
 
2990
            kdelibsuff=$enableval)
 
2991
    # TODO: add an auto case that compiles a little C app to check
 
2992
    # where the glibc is
 
2993
    if test "$kdelibsuff" = "none"; then
 
2994
       kdelibsuff=
 
2995
    fi
 
2996
    if test -z "$kdelibsuff"; then
 
2997
        AC_MSG_RESULT([not using lib directory suffix])
 
2998
        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
 
2999
    else
 
3000
        if test "$libdir" = '${exec_prefix}/lib'; then
 
3001
            libdir="$libdir${kdelibsuff}"
 
3002
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
 
3003
        fi
 
3004
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
 
3005
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
 
3006
    fi
 
3007
])
 
3008
 
 
3009
AC_DEFUN(KDE_CHECK_TYPES,
 
3010
[  AC_CHECK_SIZEOF(int, 4)dnl
 
3011
  AC_CHECK_SIZEOF(long, 4)dnl
 
3012
  AC_CHECK_SIZEOF(char *, 4)dnl
 
3013
  AC_CHECK_SIZEOF(char, 1)dnl
 
3014
])dnl
 
3015
 
 
3016
AC_DEFUN(KDE_DO_IT_ALL,
 
3017
[
 
3018
AC_CANONICAL_SYSTEM
 
3019
AC_ARG_PROGRAM
 
3020
AM_INIT_AUTOMAKE($1, $2)
 
3021
AM_DISABLE_LIBRARIES
 
3022
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
 
3023
AC_CHECK_COMPILERS
 
3024
KDE_PROG_LIBTOOL
 
3025
AM_KDE_WITH_NLS
 
3026
AC_PATH_KDE
 
3027
])
 
3028
 
 
3029
AC_DEFUN(AC_CHECK_RPATH,
 
3030
[
 
3031
AC_MSG_CHECKING(for rpath)
 
3032
AC_ARG_ENABLE(rpath,
 
3033
      [  --disable-rpath         do not use the rpath feature of ld],
 
3034
      USE_RPATH=$enableval, USE_RPATH=yes)
 
3035
 
 
3036
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
 
3037
 
 
3038
  KDE_RPATH="-R \$(kde_libraries)"
 
3039
 
 
3040
  if test -n "$qt_libraries"; then
 
3041
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
 
3042
  fi
 
3043
  dnl $x_libraries is set to /usr/lib in case
 
3044
  if test -n "$X_LDFLAGS"; then
 
3045
    X_RPATH="-R \$(x_libraries)" 
 
3046
    KDE_RPATH="$KDE_RPATH $X_RPATH"
 
3047
  fi
 
3048
  if test -n "$KDE_EXTRA_RPATH"; then
 
3049
    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
 
3050
  fi
 
3051
fi
 
3052
AC_SUBST(KDE_EXTRA_RPATH)
 
3053
AC_SUBST(KDE_RPATH)
 
3054
AC_SUBST(X_RPATH)
 
3055
AC_MSG_RESULT($USE_RPATH)
 
3056
])
 
3057
 
 
3058
dnl Check for the type of the third argument of getsockname
 
3059
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
 
3060
  AC_MSG_CHECKING(for socklen_t)
 
3061
  AC_CACHE_VAL(ac_cv_socklen_t, [
 
3062
    AC_LANG_SAVE
 
3063
    AC_LANG_CPLUSPLUS
 
3064
    AC_TRY_COMPILE([
 
3065
#include <sys/types.h>
 
3066
#include <sys/socket.h>
 
3067
      ],[
 
3068
socklen_t a=0;
 
3069
getsockname(0,(struct sockaddr*)0, &a);
 
3070
      ],
 
3071
      ac_cv_socklen_t=socklen_t,
 
3072
      AC_TRY_COMPILE([
 
3073
#include <sys/types.h>
 
3074
#include <sys/socket.h>
 
3075
        ],[
 
3076
int a=0;
 
3077
getsockname(0,(struct sockaddr*)0, &a);
 
3078
        ],
 
3079
        ac_cv_socklen_t=int,
 
3080
        ac_cv_socklen_t=size_t
 
3081
      )
 
3082
    )
 
3083
    AC_LANG_RESTORE
 
3084
  ])
 
3085
 
 
3086
  AC_MSG_RESULT($ac_cv_socklen_t)
 
3087
  if test "$ac_cv_socklen_t" != "socklen_t"; then
 
3088
    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
 
3089
        [Define the real type of socklen_t])
 
3090
  fi
 
3091
  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
 
3092
 
 
3093
])
 
3094
 
 
3095
dnl This is a merge of some macros out of the gettext aclocal.m4
 
3096
dnl since we don't need anything, I took the things we need
 
3097
dnl the copyright for them is:
 
3098
dnl >
 
3099
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
3100
dnl This Makefile.in is free software; the Free Software Foundation
 
3101
dnl gives unlimited permission to copy and/or distribute it,
 
3102
dnl with or without modifications, as long as this notice is preserved.
 
3103
 
 
3104
dnl This program is distributed in the hope that it will be useful,
 
3105
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
3106
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
3107
dnl PARTICULAR PURPOSE.
 
3108
dnl >
 
3109
dnl for this file it is relicensed under LGPL
 
3110
 
 
3111
AC_DEFUN(AM_KDE_WITH_NLS,
 
3112
  [
 
3113
    dnl If we use NLS figure out what method
 
3114
 
 
3115
    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
 
3116
        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
 
3117
    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
3118
 
 
3119
     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
 
3120
        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
 
3121
        GMSGFMT=":"
 
3122
      fi
 
3123
      MSGFMT=$GMSGFMT
 
3124
      AC_SUBST(GMSGFMT)
 
3125
      AC_SUBST(MSGFMT)
 
3126
 
 
3127
      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
 
3128
        [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
3129
 
 
3130
      dnl Test whether we really found GNU xgettext.
 
3131
      if test "$XGETTEXT" != ":"; then
 
3132
        dnl If it is no GNU xgettext we define it as : so that the
 
3133
        dnl Makefiles still can work.
 
3134
        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
3135
          : ;
 
3136
        else
 
3137
          AC_MSG_RESULT(
 
3138
            [found xgettext programs is not GNU xgettext; ignore it])
 
3139
          XGETTEXT=":"
 
3140
        fi
 
3141
      fi
 
3142
     AC_SUBST(XGETTEXT)
 
3143
 
 
3144
  ])
 
3145
 
 
3146
# Search path for a program which passes the given test.
 
3147
# Ulrich Drepper <drepper@cygnus.com>, 1996.
 
3148
 
 
3149
# serial 1
 
3150
# Stephan Kulow: I appended a _KDE against name conflicts
 
3151
 
 
3152
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
 
3153
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
3154
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
 
3155
[# Extract the first word of "$2", so it can be a program name with args.
 
3156
set dummy $2; ac_word=[$]2
 
3157
AC_MSG_CHECKING([for $ac_word])
 
3158
AC_CACHE_VAL(ac_cv_path_$1,
 
3159
[case "[$]$1" in
 
3160
  /*)
 
3161
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
3162
  ;;
 
3163
  *)
 
3164
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
3165
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
3166
    test -z "$ac_dir" && ac_dir=.
 
3167
    if test -f $ac_dir/$ac_word; then
 
3168
      if [$3]; then
 
3169
        ac_cv_path_$1="$ac_dir/$ac_word"
 
3170
        break
 
3171
      fi
 
3172
    fi
 
3173
  done
 
3174
  IFS="$ac_save_ifs"
 
3175
dnl If no 4th arg is given, leave the cache variable unset,
 
3176
dnl so AC_PATH_PROGS will keep looking.
 
3177
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
3178
])dnl
 
3179
  ;;
 
3180
esac])dnl
 
3181
$1="$ac_cv_path_$1"
 
3182
if test -n "[$]$1"; then
 
3183
  AC_MSG_RESULT([$]$1)
 
3184
else
 
3185
  AC_MSG_RESULT(no)
 
3186
fi
 
3187
AC_SUBST($1)dnl
 
3188
])
 
3189
 
 
3190
 
 
3191
# Check whether LC_MESSAGES is available in <locale.h>.
 
3192
# Ulrich Drepper <drepper@cygnus.com>, 1995.
 
3193
 
 
3194
# serial 1
 
3195
 
 
3196
AC_DEFUN(AM_LC_MESSAGES,
 
3197
  [if test $ac_cv_header_locale_h = yes; then
 
3198
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
3199
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
3200
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
3201
    if test $am_cv_val_LC_MESSAGES = yes; then
 
3202
      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
 
3203
    fi
 
3204
  fi])
 
3205
 
 
3206
dnl From Jim Meyering.
 
3207
dnl FIXME: migrate into libit.
 
3208
 
 
3209
AC_DEFUN([AM_FUNC_OBSTACK],
 
3210
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
 
3211
 [AC_TRY_LINK([#include "obstack.h"],
 
3212
              [struct obstack *mem;obstack_free(mem,(char *) 0)],
 
3213
              am_cv_func_obstack=yes,
 
3214
              am_cv_func_obstack=no)])
 
3215
 if test $am_cv_func_obstack = yes; then
 
3216
   AC_DEFINE(HAVE_OBSTACK)
 
3217
 else
 
3218
   LIBOBJS="$LIBOBJS obstack.o"
 
3219
 fi
 
3220
])
 
3221
 
 
3222
dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
 
3223
dnl FIXME: Migrate into libit
 
3224
 
 
3225
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
 
3226
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
 
3227
 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
 
3228
              am_cv_lib_error_at_line=yes,
 
3229
              am_cv_lib_error_at_line=no)])
 
3230
 if test $am_cv_lib_error_at_line = no; then
 
3231
   LIBOBJS="$LIBOBJS error.o"
 
3232
 fi
 
3233
 AC_SUBST(LIBOBJS)dnl
 
3234
])
 
3235
 
 
3236
# Macro to add for using GNU gettext.
 
3237
# Ulrich Drepper <drepper@cygnus.com>, 1995.
 
3238
 
 
3239
# serial 1
 
3240
# Stephan Kulow: I put a KDE in it to avoid name conflicts
 
3241
 
 
3242
AC_DEFUN(AM_KDE_GNU_GETTEXT,
 
3243
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
3244
   AC_REQUIRE([AC_PROG_RANLIB])dnl
 
3245
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
3246
   AC_REQUIRE([AC_TYPE_OFF_T])dnl
 
3247
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 
3248
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 
3249
   AC_REQUIRE([AC_FUNC_MMAP])dnl
 
3250
   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
 
3251
   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
 
3252
   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
 
3253
__argz_count __argz_stringify __argz_next])
 
3254
 
 
3255
   AC_MSG_CHECKING(for stpcpy)
 
3256
   AC_CACHE_VAL(kde_cv_func_stpcpy,
 
3257
   [
 
3258
   kde_safe_cxxflags=$CXXFLAGS
 
3259
   CXXFLAGS="-Werror"
 
3260
   AC_LANG_SAVE
 
3261
   AC_LANG_CPLUSPLUS
 
3262
   AC_TRY_COMPILE([
 
3263
   #include <string.h>
 
3264
   ],
 
3265
   [
 
3266
   char buffer[200];
 
3267
   stpcpy(buffer, buffer);
 
3268
   ],
 
3269
   kde_cv_func_stpcpy=yes,
 
3270
   kde_cv_func_stpcpy=no)
 
3271
   AC_LANG_RESTORE
 
3272
   CXXFLAGS=$kde_safe_cxxflags
 
3273
   ])
 
3274
   AC_MSG_RESULT($kde_cv_func_stpcpy)
 
3275
   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
 
3276
     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
 
3277
   fi
 
3278
 
 
3279
   AM_LC_MESSAGES
 
3280
 
 
3281
   if test "x$CATOBJEXT" != "x"; then
 
3282
     if test "x$ALL_LINGUAS" = "x"; then
 
3283
       LINGUAS=
 
3284
     else
 
3285
       AC_MSG_CHECKING(for catalogs to be installed)
 
3286
       NEW_LINGUAS=
 
3287
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
 
3288
         case "$ALL_LINGUAS" in
 
3289
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
 
3290
         esac
 
3291
       done
 
3292
       LINGUAS=$NEW_LINGUAS
 
3293
       AC_MSG_RESULT($LINGUAS)
 
3294
     fi
 
3295
 
 
3296
     dnl Construct list of names of catalog files to be constructed.
 
3297
     if test -n "$LINGUAS"; then
 
3298
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
3299
     fi
 
3300
   fi
 
3301
 
 
3302
  ])
 
3303
 
 
3304
AC_DEFUN(AC_HAVE_XPM,
 
3305
 [AC_REQUIRE_CPP()dnl
 
3306
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
3307
 
 
3308
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
 
3309
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
 
3310
 
 
3311
 AC_ARG_WITH(xpm, [  --without-xpm           disable color pixmap XPM tests],
 
3312
        xpm_test=$withval, xpm_test="yes")
 
3313
 if test "x$xpm_test" = xno; then
 
3314
   ac_cv_have_xpm=no
 
3315
 else
 
3316
   AC_MSG_CHECKING(for XPM)
 
3317
   AC_CACHE_VAL(ac_cv_have_xpm,
 
3318
   [
 
3319
    AC_LANG_C
 
3320
    ac_save_ldflags="$LDFLAGS"
 
3321
    ac_save_cflags="$CFLAGS"
 
3322
    if test "x$kde_use_qt_emb" != "xyes"; then
 
3323
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
 
3324
    else
 
3325
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
 
3326
    fi
 
3327
    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
 
3328
    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
 
3329
    AC_TRY_LINK([#include <X11/xpm.h>],[],
 
3330
        ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
 
3331
    LDFLAGS="$ac_save_ldflags"
 
3332
    CFLAGS="$ac_save_cflags"
 
3333
   ])dnl
 
3334
 
 
3335
  if test "$ac_cv_have_xpm" = no; then
 
3336
    AC_MSG_RESULT(no)
 
3337
    XPM_LDFLAGS=""
 
3338
    XPMINC=""
 
3339
    $2
 
3340
  else
 
3341
    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
 
3342
    if test "$XPM_LDFLAGS" = ""; then
 
3343
       XPMLIB='-lXpm $(LIB_X11)'
 
3344
    else
 
3345
       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
 
3346
    fi
 
3347
    if test "$XPM_INCLUDE" = ""; then
 
3348
       XPMINC=""
 
3349
    else
 
3350
       XPMINC="-I$XPM_INCLUDE"
 
3351
    fi
 
3352
    AC_MSG_RESULT(yes)
 
3353
    $1
 
3354
  fi
 
3355
 fi
 
3356
 AC_SUBST(XPMINC)
 
3357
 AC_SUBST(XPMLIB)
 
3358
])
 
3359
 
 
3360
AC_DEFUN(AC_HAVE_DPMS,
 
3361
 [AC_REQUIRE_CPP()dnl
 
3362
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
3363
 
 
3364
 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
 
3365
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
 
3366
 DPMS_LIB=
 
3367
 
 
3368
 AC_ARG_WITH(dpms, [  --without-dpms          disable DPMS power saving],
 
3369
        dpms_test=$withval, dpms_test="yes")
 
3370
 if test "x$dpms_test" = xno; then
 
3371
   ac_cv_have_dpms=no
 
3372
 else
 
3373
   AC_MSG_CHECKING(for DPMS)
 
3374
   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
 
3375
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
 
3376
   AC_CACHE_VAL(ac_cv_have_dpms,
 
3377
   [
 
3378
    if test "x$kde_use_qt_emb" = "xyes"; then
 
3379
      AC_MSG_RESULT(no)
 
3380
      ac_cv_have_dpms="no"
 
3381
    else
 
3382
      AC_LANG_C
 
3383
      ac_save_ldflags="$LDFLAGS"
 
3384
      ac_save_cflags="$CFLAGS"
 
3385
      ac_save_libs="$LIBS"
 
3386
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
 
3387
      CFLAGS="$CFLAGS $X_INCLUDES"
 
3388
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3389
      AC_TRY_LINK([
 
3390
          #include <X11/Xproto.h>
 
3391
          #include <X11/X.h>
 
3392
          #include <X11/Xlib.h>
 
3393
          #include <X11/extensions/dpms.h>
 
3394
          int foo_test_dpms()
 
3395
          { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
 
3396
          ac_cv_have_dpms="yes", [
 
3397
              LDFLAGS="$ac_save_ldflags"
 
3398
              CFLAGS="$ac_save_cflags"
 
3399
              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
 
3400
              LIBS="$LIBS -lXdpms"
 
3401
              CFLAGS="$CFLAGS $X_INCLUDES"
 
3402
              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3403
              AC_TRY_LINK([
 
3404
                  #include <X11/Xproto.h>
 
3405
                  #include <X11/X.h>
 
3406
                  #include <X11/Xlib.h>
 
3407
                  #include <X11/extensions/dpms.h>
 
3408
                  int foo_test_dpms()
 
3409
                  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
 
3410
                  [
 
3411
                  ac_cv_have_dpms="-lXdpms"
 
3412
                  ],ac_cv_have_dpms="no")
 
3413
              ])
 
3414
      LDFLAGS="$ac_save_ldflags"
 
3415
      CFLAGS="$ac_save_cflags"
 
3416
      LIBS="$ac_save_libs"
 
3417
    fi
 
3418
   ])dnl
 
3419
 
 
3420
  if test "$ac_cv_have_dpms" = no; then
 
3421
    AC_MSG_RESULT(no)
 
3422
    DPMS_LDFLAGS=""
 
3423
    DPMSINC=""
 
3424
    $2
 
3425
  else
 
3426
    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
 
3427
    if test "$ac_cv_have_dpms" = "-lXdpms"; then
 
3428
       DPMS_LIB="-lXdpms"
 
3429
    fi
 
3430
    if test "$DPMS_LDFLAGS" = ""; then
 
3431
       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
 
3432
    else
 
3433
       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
 
3434
    fi
 
3435
    if test "$DPMS_INCLUDE" = ""; then
 
3436
       DPMSINC=""
 
3437
    else
 
3438
       DPMSINC="-I$DPMS_INCLUDE"
 
3439
    fi
 
3440
    AC_MSG_RESULT(yes)
 
3441
    $1
 
3442
  fi
 
3443
 fi
 
3444
 AC_SUBST(DPMSINC)
 
3445
 AC_SUBST(DPMSLIB)
 
3446
])
 
3447
 
 
3448
AC_DEFUN(AC_HAVE_GL,
 
3449
 [AC_REQUIRE_CPP()dnl
 
3450
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
3451
 
 
3452
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
 
3453
 test -z "$GL_INCLUDE" && GL_INCLUDE=
 
3454
 
 
3455
 AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
 
3456
        gl_test=$withval, gl_test="yes")
 
3457
 if test "x$kde_use_qt_emb" = "xyes"; then
 
3458
   # GL and Qt Embedded is a no-go for now.
 
3459
   ac_cv_have_gl=no
 
3460
 elif test "x$gl_test" = xno; then
 
3461
   ac_cv_have_gl=no
 
3462
 else
 
3463
   AC_MSG_CHECKING(for GL)
 
3464
   AC_CACHE_VAL(ac_cv_have_gl,
 
3465
   [
 
3466
    AC_LANG_SAVE
 
3467
    AC_LANG_CPLUSPLUS
 
3468
    ac_save_ldflags="$LDFLAGS"
 
3469
    ac_save_cxxflags="$CXXFLAGS"
 
3470
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
 
3471
    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
 
3472
    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
 
3473
    CXXFLAGS="$CFLAGS $X_INCLUDES"
 
3474
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
 
3475
    AC_TRY_LINK([#include <GL/gl.h>
 
3476
#include <GL/glu.h>
 
3477
], [],
 
3478
        ac_cv_have_gl="mesa", ac_cv_have_gl="no")
 
3479
    if test "x$ac_cv_have_gl" = "xno"; then
 
3480
      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
 
3481
      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
 
3482
      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
 
3483
      CXXFLAGS="$ac_save_cflags $X_INCLUDES"
 
3484
      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
 
3485
      AC_TRY_LINK([#include <GL/gl.h>
 
3486
#include <GL/glu.h>
 
3487
], [],
 
3488
          ac_cv_have_gl="yes", ac_cv_have_gl="no")
 
3489
    fi
 
3490
    AC_LANG_RESTORE
 
3491
    LDFLAGS="$ac_save_ldflags"
 
3492
    CXXFLAGS="$ac_save_cxxflags"
 
3493
   ])dnl
 
3494
 
 
3495
  if test "$ac_cv_have_gl" = "no"; then
 
3496
    AC_MSG_RESULT(no)
 
3497
    GL_LDFLAGS=""
 
3498
    GLINC=""
 
3499
    $2
 
3500
  else
 
3501
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
 
3502
    if test "$GL_LDFLAGS" = ""; then
 
3503
       if test "$ac_cv_have_gl" = "mesa"; then
 
3504
          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
 
3505
       else
 
3506
          GLLIB='-lGLU -lGL $(LIB_X11)'
 
3507
       fi
 
3508
    else
 
3509
       if test "$ac_cv_have_gl" = "mesa"; then
 
3510
          GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
 
3511
       else
 
3512
          GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
 
3513
       fi
 
3514
    fi
 
3515
    if test "$GL_INCLUDE" = ""; then
 
3516
       GLINC=""
 
3517
    else
 
3518
       GLINC="-I$GL_INCLUDE"
 
3519
    fi
 
3520
    AC_MSG_RESULT($ac_cv_have_gl)
 
3521
    $1
 
3522
  fi
 
3523
 fi
 
3524
 AC_SUBST(GLINC)
 
3525
 AC_SUBST(GLLIB)
 
3526
])
 
3527
 
 
3528
 
 
3529
 dnl shadow password and PAM magic - maintained by ossi@kde.org
 
3530
 
 
3531
AC_DEFUN(KDE_PAM, [
 
3532
  AC_REQUIRE([KDE_CHECK_LIBDL])
 
3533
 
 
3534
  AC_ARG_WITH(pam,
 
3535
    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
 
3536
    [ if test "x$withval" = "xyes"; then
 
3537
        use_pam=yes
 
3538
        pam_service=kde
 
3539
      elif test "x$withval" = "xno"; then
 
3540
        use_pam=no
 
3541
      else
 
3542
        use_pam=yes
 
3543
        pam_service=$withval
 
3544
      fi
 
3545
      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
 
3546
    ], [
 
3547
      AC_CACHE_VAL(ac_cv_path_pam,
 
3548
        [ use_pam=no
 
3549
          AC_CHECK_LIB(pam, pam_start,
 
3550
            [ AC_CHECK_HEADER(security/pam_appl.h,
 
3551
                [ use_pam=yes
 
3552
                  pam_service=kde ]) 
 
3553
            ], , $LIBDL)
 
3554
          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
 
3555
        ])
 
3556
    ])
 
3557
  eval "$ac_cv_path_pam"
 
3558
 
 
3559
  AC_MSG_CHECKING(for PAM)
 
3560
  if test "x$use_pam" = xno; then
 
3561
    AC_MSG_RESULT(no)
 
3562
    PAMLIBS=""
 
3563
  else
 
3564
    AC_MSG_RESULT(yes)
 
3565
    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
 
3566
    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
 
3567
 
 
3568
    dnl test whether struct pam_message is const (Linux) or not (Sun)
 
3569
    AC_MSG_CHECKING(for const pam_message)
 
3570
    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
 
3571
      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
 
3572
                        [AC_MSG_RESULT([const: Linux-type PAM])],
 
3573
                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
 
3574
                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
 
3575
                        )],
 
3576
      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
 
3577
  fi
 
3578
 
 
3579
  AC_SUBST(PAMLIBS)
 
3580
])
 
3581
 
 
3582
dnl DEF_PAM_SERVICE(arg name, full name, define name)
 
3583
AC_DEFUN(DEF_PAM_SERVICE, [
 
3584
  AC_ARG_WITH($1-pam,
 
3585
    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
 
3586
    [ if test "x$use_pam" = xyes; then
 
3587
        $3_PAM_SERVICE="$withval"
 
3588
      else
 
3589
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
 
3590
You may want to enforce it by using --with-pam.])
 
3591
      fi
 
3592
    ], 
 
3593
    [ if test "x$use_pam" = xyes; then
 
3594
        $3_PAM_SERVICE="$pam_service"
 
3595
      fi
 
3596
    ])
 
3597
    if test -n "$$3_PAM_SERVICE"; then
 
3598
      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
 
3599
      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
 
3600
    fi
 
3601
    AC_SUBST($3_PAM_SERVICE)
 
3602
])
 
3603
 
 
3604
AC_DEFUN(KDE_SHADOWPASSWD, [
 
3605
  AC_REQUIRE([KDE_PAM])
 
3606
 
 
3607
  AC_CHECK_LIB(shadow, getspent,
 
3608
    [ LIBSHADOW="-lshadow"
 
3609
      ac_use_shadow=yes
 
3610
    ],
 
3611
    [ dnl for UnixWare
 
3612
      AC_CHECK_LIB(gen, getspent, 
 
3613
        [ LIBGEN="-lgen"
 
3614
          ac_use_shadow=yes
 
3615
        ], 
 
3616
        [ AC_CHECK_FUNC(getspent, 
 
3617
            [ ac_use_shadow=yes ],
 
3618
            [ ac_use_shadow=no ])
 
3619
        ])
 
3620
    ])
 
3621
  AC_SUBST(LIBSHADOW)
 
3622
  AC_SUBST(LIBGEN)
 
3623
  
 
3624
  AC_MSG_CHECKING([for shadow passwords])
 
3625
 
 
3626
  AC_ARG_WITH(shadow,
 
3627
    [  --with-shadow              If you want shadow password support ],
 
3628
    [ if test "x$withval" != "xno"; then
 
3629
        use_shadow=yes
 
3630
      else
 
3631
        use_shadow=no
 
3632
      fi
 
3633
    ], [
 
3634
      use_shadow="$ac_use_shadow"
 
3635
    ])
 
3636
 
 
3637
  if test "x$use_shadow" = xyes; then
 
3638
    AC_MSG_RESULT(yes)
 
3639
    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
 
3640
  else
 
3641
    AC_MSG_RESULT(no)
 
3642
    LIBSHADOW=
 
3643
    LIBGEN=
 
3644
  fi
 
3645
 
 
3646
  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
 
3647
  dnl this still applies, if we could use it indirectly through pam.
 
3648
  if test "x$use_shadow" = xyes || 
 
3649
     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
 
3650
      case $host in
 
3651
      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
 
3652
        SETUIDFLAGS="-m 4755 -o root";;
 
3653
      *)
 
3654
        SETUIDFLAGS="-m 4755";;
 
3655
      esac
 
3656
  fi
 
3657
  AC_SUBST(SETUIDFLAGS)
 
3658
 
 
3659
])
 
3660
 
 
3661
AC_DEFUN(KDE_PASSWDLIBS, [
 
3662
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
 
3663
  AC_REQUIRE([KDE_PAM])
 
3664
  AC_REQUIRE([KDE_SHADOWPASSWD])
 
3665
 
 
3666
  if test "x$use_pam" = "xyes"; then 
 
3667
    PASSWDLIBS="$PAMLIBS"
 
3668
  else
 
3669
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
 
3670
  fi
 
3671
 
 
3672
  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
 
3673
  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
 
3674
  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
 
3675
  dnl may need to read /etc/master.passwd).
 
3676
  case $host in
 
3677
  *-*-freebsd*)
 
3678
    SETUIDFLAGS="-m 4755 -o root"
 
3679
    ;;
 
3680
  *)
 
3681
    ;;
 
3682
  esac
 
3683
 
 
3684
  AC_SUBST(PASSWDLIBS)
 
3685
])
 
3686
 
 
3687
AC_DEFUN(KDE_CHECK_LIBDL,
 
3688
[
 
3689
AC_CHECK_LIB(dl, dlopen, [
 
3690
LIBDL="-ldl"
 
3691
ac_cv_have_dlfcn=yes
 
3692
])
 
3693
 
 
3694
AC_CHECK_LIB(dld, shl_unload, [
 
3695
LIBDL="-ldld"
 
3696
ac_cv_have_shload=yes
 
3697
])
 
3698
 
 
3699
AC_SUBST(LIBDL)
 
3700
])
 
3701
 
 
3702
AC_DEFUN(KDE_CHECK_DLOPEN,
 
3703
[
 
3704
KDE_CHECK_LIBDL
 
3705
AC_CHECK_HEADERS(dlfcn.h dl.h)
 
3706
if test "$ac_cv_header_dlfcn_h" = "no"; then
 
3707
  ac_cv_have_dlfcn=no
 
3708
fi
 
3709
 
 
3710
if test "$ac_cv_header_dl_h" = "no"; then
 
3711
  ac_cv_have_shload=no
 
3712
fi
 
3713
 
 
3714
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
 
3715
dnl (MM)
 
3716
AC_ARG_ENABLE(dlopen,
 
3717
[  --disable-dlopen        link statically [default=no]] ,
 
3718
enable_dlopen=$enableval,
 
3719
enable_dlopen=yes)
 
3720
 
 
3721
# override the user's opinion, if we know it better ;)
 
3722
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
 
3723
  enable_dlopen=no
 
3724
fi
 
3725
 
 
3726
if test "$ac_cv_have_dlfcn" = "yes"; then
 
3727
  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
 
3728
fi
 
3729
 
 
3730
if test "$ac_cv_have_shload" = "yes"; then
 
3731
  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
 
3732
fi
 
3733
 
 
3734
if test "$enable_dlopen" = no ; then
 
3735
  test -n "$1" && eval $1
 
3736
else
 
3737
  test -n "$2" && eval $2
 
3738
fi
 
3739
 
 
3740
])
 
3741
 
 
3742
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
 
3743
[
 
3744
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
 
3745
KDE_PROG_LIBTOOL
 
3746
AC_MSG_CHECKING([dynamic loading])
 
3747
eval "`egrep '^build_libtool_libs=' libtool`"
 
3748
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
 
3749
  dynamic_loading=yes
 
3750
  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
 
3751
else
 
3752
  dynamic_loading=no
 
3753
fi
 
3754
AC_MSG_RESULT($dynamic_loading)
 
3755
if test "$dynamic_loading" = "yes"; then
 
3756
  $1
 
3757
else
 
3758
  $2
 
3759
fi
 
3760
])
 
3761
 
 
3762
AC_DEFUN(KDE_ADD_INCLUDES,
 
3763
[
 
3764
if test -z "$1"; then
 
3765
  test_include="Pix.h"
 
3766
else
 
3767
  test_include="$1"
 
3768
fi
 
3769
 
 
3770
AC_MSG_CHECKING([for libg++ ($test_include)])
 
3771
 
 
3772
AC_CACHE_VAL(kde_cv_libgpp_includes,
 
3773
[
 
3774
kde_cv_libgpp_includes=no
 
3775
 
 
3776
   for ac_dir in               \
 
3777
                               \
 
3778
     /usr/include/g++          \
 
3779
     /usr/include              \
 
3780
     /usr/unsupported/include  \
 
3781
     /opt/include              \
 
3782
     $extra_include            \
 
3783
     ; \
 
3784
   do
 
3785
     if test -r "$ac_dir/$test_include"; then
 
3786
       kde_cv_libgpp_includes=$ac_dir
 
3787
       break
 
3788
     fi
 
3789
   done
 
3790
])
 
3791
 
 
3792
AC_MSG_RESULT($kde_cv_libgpp_includes)
 
3793
if test "$kde_cv_libgpp_includes" != "no"; then
 
3794
  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
 
3795
fi
 
3796
])
 
3797
])
 
3798
 
 
3799
 
 
3800
AC_DEFUN(KDE_CHECK_MICO,
 
3801
[
 
3802
AC_REQUIRE([KDE_CHECK_LIBDL])
 
3803
AC_REQUIRE([KDE_MISC_TESTS])
 
3804
AC_MSG_CHECKING(for MICO)
 
3805
 
 
3806
if test -z "$MICODIR"; then
 
3807
    kde_micodir=/usr/local
 
3808
 else
 
3809
    kde_micodir="$MICODIR"
 
3810
fi
 
3811
 
 
3812
AC_ARG_WITH(micodir,
 
3813
  [  --with-micodir=micodir  where mico is installed ],
 
3814
  kde_micodir=$withval,
 
3815
  kde_micodir=$kde_micodir
 
3816
)
 
3817
 
 
3818
AC_CACHE_VAL(kde_cv_mico_incdir,
 
3819
[
 
3820
  mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
 
3821
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
 
3822
 
 
3823
])
 
3824
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
 
3825
 
 
3826
if test ! -r  $kde_micodir/include/CORBA.h; then
 
3827
  AC_MSG_ERROR([No CORBA.h found, specify another micodir])
 
3828
fi
 
3829
 
 
3830
AC_MSG_RESULT($kde_micodir)
 
3831
 
 
3832
MICO_INCLUDES=-I$kde_micodir/include
 
3833
AC_SUBST(MICO_INCLUDES)
 
3834
MICO_LDFLAGS=-L$kde_micodir/lib
 
3835
AC_SUBST(MICO_LDFLAGS)
 
3836
micodir=$kde_micodir
 
3837
AC_SUBST(micodir)
 
3838
 
 
3839
AC_MSG_CHECKING([for MICO version])
 
3840
AC_CACHE_VAL(kde_cv_mico_version,
 
3841
[
 
3842
AC_LANG_C
 
3843
cat >conftest.$ac_ext <<EOF
 
3844
#include <stdio.h>
 
3845
#include <mico/version.h>
 
3846
int main() {
 
3847
 
 
3848
   printf("MICO_VERSION=%s\n",MICO_VERSION);
 
3849
   return (0);
 
3850
}
 
3851
EOF
 
3852
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
 
3853
if AC_TRY_EVAL(ac_compile); then
 
3854
  if eval `./conftest 2>&5`; then
 
3855
    kde_cv_mico_version=$MICO_VERSION
 
3856
  else
 
3857
    AC_MSG_ERROR([your system is not able to execute a small application to
 
3858
    find MICO version! Check $kde_micodir/include/mico/version.h])
 
3859
  fi
 
3860
else
 
3861
  AC_MSG_ERROR([your system is not able to compile a small application to
 
3862
  find MICO version! Check $kde_micodir/include/mico/version.h])
 
3863
fi
 
3864
])
 
3865
 
 
3866
dnl installed MICO version
 
3867
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
 
3868
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
 
3869
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
 
3870
 
 
3871
if test "x$1" = "x"; then
 
3872
 req_version="2.3.0"
 
3873
else
 
3874
 req_version=$1
 
3875
fi
 
3876
 
 
3877
dnl required MICO version
 
3878
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
 
3879
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
 
3880
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
 
3881
 
 
3882
if test "$mico_v_maj" -lt "$req_v_maj" || \
 
3883
   ( test "$mico_v_maj" -eq "$req_v_maj" && \
 
3884
        test "$mico_v_mid" -lt "$req_v_mid" ) || \
 
3885
   ( test "$mico_v_mid" -eq "$req_v_mid" && \
 
3886
        test "$mico_v_min" -lt "$req_v_min" )
 
3887
 
 
3888
then
 
3889
  AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
 
3890
at least is required. You should upgrade MICO.])
 
3891
else
 
3892
  AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
 
3893
fi
 
3894
 
 
3895
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
 
3896
AC_SUBST(LIBMICO)
 
3897
if test -z "$IDL"; then
 
3898
  IDL='$(kde_bindir)/cuteidl'
 
3899
fi
 
3900
AC_SUBST(IDL)
 
3901
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
 
3902
AC_SUBST(IDL_DEPENDENCIES)
 
3903
 
 
3904
idldir="\$(includedir)/idl"
 
3905
AC_SUBST(idldir)
 
3906
 
 
3907
])
 
3908
 
 
3909
AC_DEFUN(KDE_CHECK_MINI_STL,
 
3910
[
 
3911
AC_REQUIRE([KDE_CHECK_MICO])
 
3912
 
 
3913
AC_MSG_CHECKING(if we use mico's mini-STL)
 
3914
AC_CACHE_VAL(kde_cv_have_mini_stl,
 
3915
[
 
3916
AC_LANG_SAVE
 
3917
AC_LANG_CPLUSPLUS
 
3918
kde_save_cxxflags="$CXXFLAGS"
 
3919
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
 
3920
AC_TRY_COMPILE(
 
3921
[
 
3922
#include <mico/config.h>
 
3923
],
 
3924
[
 
3925
#ifdef HAVE_MINI_STL
 
3926
#error "nothing"
 
3927
#endif
 
3928
],
 
3929
kde_cv_have_mini_stl=no,
 
3930
kde_cv_have_mini_stl=yes)
 
3931
CXXFLAGS="$kde_save_cxxflags"
 
3932
AC_LANG_RESTORE
 
3933
])
 
3934
 
 
3935
if test "x$kde_cv_have_mini_stl" = "xyes"; then
 
3936
   AC_MSG_RESULT(yes)
 
3937
   $1
 
3938
else
 
3939
   AC_MSG_RESULT(no)
 
3940
   $2
 
3941
fi
 
3942
])
 
3943
 
 
3944
])
 
3945
 
 
3946
 
 
3947
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
 
3948
[
 
3949
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
 
3950
AC_SUBST(LIBPTHREAD)
 
3951
])
 
3952
 
 
3953
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
 
3954
[
 
3955
    AC_ARG_ENABLE(kernel-threads, [  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
 
3956
        kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
 
3957
 
 
3958
    if test "$kde_use_kernthreads" = "yes"; then
 
3959
      ac_save_CXXFLAGS="$CXXFLAGS"
 
3960
      ac_save_CFLAGS="$CFLAGS"
 
3961
      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
 
3962
      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
 
3963
      AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
 
3964
      CXXFLAGS="$ac_save_CXXFLAGS"
 
3965
      CFLAGS="$ac_save_CFLAGS"
 
3966
      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
 
3967
        kde_use_kernthreads=no
 
3968
      else
 
3969
        dnl Add proper -I and -l statements
 
3970
        AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
 
3971
        if test "x$LIBPTHREAD" = "x"; then
 
3972
          kde_use_kernthreads=no
 
3973
        else
 
3974
          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
 
3975
        fi
 
3976
      fi
 
3977
    else 
 
3978
      USE_THREADS=""
 
3979
      if test -z "$LIBPTHREAD"; then
 
3980
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
 
3981
      fi
 
3982
    fi
 
3983
 
 
3984
    AH_VERBATIM(__svr_define, [
 
3985
#if defined(__SVR4) && !defined(__svr4__)
 
3986
#define __svr4__ 1
 
3987
#endif
 
3988
])
 
3989
    case $host_os in
 
3990
        solaris*)
 
3991
                KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
 
3992
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
 
3993
                ;;
 
3994
        freebsd*)
 
3995
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
 
3996
                ;;
 
3997
        aix*)
 
3998
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
 
3999
                LIBPTHREAD="$LIBPTHREAD -lc_r"
 
4000
                ;;
 
4001
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
 
4002
                if test "$CXX" = "KCC"; then
 
4003
                  CXXFLAGS="$CXXFLAGS --thread_safe"
 
4004
                  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
 
4005
                fi
 
4006
                ;;
 
4007
        *)
 
4008
                ;;
 
4009
    esac
 
4010
    AC_SUBST(USE_THREADS)
 
4011
    AC_SUBST(LIBPTHREAD)
 
4012
])
 
4013
 
 
4014
AC_DEFUN(KDE_CHECK_THREADING,
 
4015
[
 
4016
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
 
4017
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
 
4018
  dnl default is yes if libpthread is found and no if no libpthread is available
 
4019
  if test -z "$LIBPTHREAD"; then
 
4020
    if test -z "$USE_THREADS"; then
 
4021
      kde_check_threading_default=no
 
4022
    else
 
4023
      kde_check_threading_default=yes
 
4024
    fi
 
4025
  else
 
4026
    kde_check_threading_default=yes
 
4027
  fi
 
4028
  AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
 
4029
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
 
4030
  if test "x$kde_use_threading" = "xyes"; then
 
4031
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
 
4032
  fi
 
4033
])
 
4034
 
 
4035
AC_DEFUN(KDE_TRY_LINK_PYTHON,
 
4036
[
 
4037
if test "$kde_python_link_found" = no; then
 
4038
 
 
4039
if test "$1" = normal; then
 
4040
  AC_MSG_CHECKING(if a Python application links)
 
4041
else
 
4042
  AC_MSG_CHECKING(if Python depends on $2)
 
4043
fi
 
4044
 
 
4045
AC_CACHE_VAL(kde_cv_try_link_python_$1,
 
4046
[
 
4047
AC_LANG_SAVE
 
4048
AC_LANG_C
 
4049
kde_save_cflags="$CFLAGS"
 
4050
CFLAGS="$CFLAGS $PYTHONINC"
 
4051
kde_save_libs="$LIBS"
 
4052
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
 
4053
kde_save_ldflags="$LDFLAGS"
 
4054
LDFLAGS="$LDFLAGS $PYTHONLIB"
 
4055
 
 
4056
AC_TRY_LINK(
 
4057
[
 
4058
#include <Python.h>
 
4059
],[
 
4060
        PySys_SetArgv(1, 0);
 
4061
],
 
4062
        [kde_cv_try_link_python_$1=yes],
 
4063
        [kde_cv_try_link_python_$1=no]
 
4064
)
 
4065
CFLAGS="$kde_save_cflags"
 
4066
LIBS="$kde_save_libs"
 
4067
LDFLAGS="$kde_save_ldflags"
 
4068
])
 
4069
 
 
4070
if test "$kde_cv_try_link_python_$1" = "yes"; then
 
4071
  AC_MSG_RESULT(yes)
 
4072
  kde_python_link_found=yes
 
4073
  if test ! "$1" = normal; then
 
4074
    LIBPYTHON="$LIBPYTHON $2"
 
4075
  fi
 
4076
  $3
 
4077
else
 
4078
  AC_MSG_RESULT(no)
 
4079
  $4
 
4080
fi
 
4081
AC_LANG_RESTORE
 
4082
 
 
4083
fi
 
4084
 
 
4085
])
 
4086
 
 
4087
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
 
4088
[
 
4089
AC_MSG_CHECKING([for Python directory])
 
4090
 
 
4091
AC_CACHE_VAL(kde_cv_pythondir,
 
4092
[
 
4093
  if test -z "$PYTHONDIR"; then
 
4094
    kde_cv_pythondir=/usr/local
 
4095
  else
 
4096
    kde_cv_pythondir="$PYTHONDIR"
 
4097
  fi
 
4098
])
 
4099
 
 
4100
AC_ARG_WITH(pythondir,
 
4101
[  --with-pythondir=pythondir   use python installed in pythondir ],
 
4102
[
 
4103
  ac_python_dir=$withval
 
4104
], ac_python_dir=$kde_cv_pythondir
 
4105
)
 
4106
 
 
4107
AC_MSG_RESULT($ac_python_dir)
 
4108
])
 
4109
 
 
4110
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
 
4111
[
 
4112
AC_REQUIRE([KDE_CHECK_LIBDL])
 
4113
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
 
4114
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
 
4115
 
 
4116
if test -z "$1"; then
 
4117
  version="1.5"
 
4118
else
 
4119
  version="$1"
 
4120
fi
 
4121
 
 
4122
AC_MSG_CHECKING([for Python$version])
 
4123
 
 
4124
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
 
4125
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
 
4126
if test ! -r $python_incdir/Python.h; then
 
4127
  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
 
4128
  python_incdir=$python_incdir/python$version
 
4129
  if test ! -r $python_incdir/Python.h; then
 
4130
    python_incdir=no
 
4131
  fi
 
4132
fi
 
4133
 
 
4134
PYTHONINC=-I$python_incdir
 
4135
 
 
4136
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
 
4137
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
 
4138
if test ! -r $python_libdir/libpython$version.a; then
 
4139
  AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
 
4140
  python_libdir=$python_libdir/python$version/config
 
4141
  if test ! -r $python_libdir/libpython$version.a; then
 
4142
    python_libdir=no
 
4143
  fi
 
4144
fi
 
4145
 
 
4146
PYTHONLIB=-L$python_libdir
 
4147
kde_orig_LIBPYTHON=$LIBPYTHON
 
4148
if test -z "$LIBPYTHON"; then
 
4149
  LIBPYTHON=-lpython$version
 
4150
fi
 
4151
 
 
4152
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
 
4153
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
 
4154
python_moddir=$python_moddir/python$version
 
4155
if test ! -r $python_moddir/copy.py; then
 
4156
  python_moddir=no
 
4157
fi
 
4158
 
 
4159
PYTHONMODDIR=$python_moddir
 
4160
 
 
4161
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
 
4162
 
 
4163
if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
 
4164
   LIBPYTHON=$kde_orig_LIBPYTHON
 
4165
   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
 
4166
   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
 
4167
   $2
 
4168
else 
 
4169
  dnl Note: this test is very weak
 
4170
  kde_python_link_found=no
 
4171
  KDE_TRY_LINK_PYTHON(normal)
 
4172
  KDE_TRY_LINK_PYTHON(m, -lm)
 
4173
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
 
4174
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
 
4175
  KDE_TRY_LINK_PYTHON(db2, -ldb2)
 
4176
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
 
4177
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
 
4178
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
 
4179
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
 
4180
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
 
4181
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
 
4182
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
 
4183
        [AC_MSG_WARN([it seems, Python depends on another library.
 
4184
    Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
 
4185
    and contact the authors to let them know about this problem])
 
4186
        ])
 
4187
 
 
4188
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
 
4189
  AC_SUBST(PYTHONINC)
 
4190
  AC_SUBST(PYTHONLIB)
 
4191
  AC_SUBST(LIBPYTHON)
 
4192
  AC_SUBST(PYTHONMODDIR)
 
4193
  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
 
4194
fi
 
4195
 
 
4196
])
 
4197
 
 
4198
 
 
4199
AC_DEFUN(KDE_CHECK_PYTHON,
 
4200
[
 
4201
  KDE_CHECK_PYTHON_INTERN("2.3", 
 
4202
    [KDE_CHECK_PYTHON_INTERN("2.2", 
 
4203
      [KDE_CHECK_PYTHON_INTERN("2.1", 
 
4204
        [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
 
4205
  ])])])
 
4206
])
 
4207
 
 
4208
AC_DEFUN(KDE_CHECK_STL_SGI,
 
4209
[
 
4210
    AC_MSG_CHECKING([if STL implementation is SGI like])
 
4211
    AC_CACHE_VAL(kde_cv_stl_type_sgi,
 
4212
    [
 
4213
      AC_TRY_COMPILE([
 
4214
#include <string>
 
4215
using namespace std;
 
4216
],[
 
4217
  string astring="Hallo Welt.";
 
4218
  astring.erase(0, 6); // now astring is "Welt"
 
4219
  return 0;
 
4220
], kde_cv_stl_type_sgi=yes,
 
4221
   kde_cv_stl_type_sgi=no)
 
4222
])
 
4223
 
 
4224
   AC_MSG_RESULT($kde_cv_stl_type_sgi)
 
4225
 
 
4226
   if test "$kde_cv_stl_type_sgi" = "yes"; then
 
4227
        AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
 
4228
   fi
 
4229
])
 
4230
 
 
4231
AC_DEFUN(KDE_CHECK_STL_HP,
 
4232
[
 
4233
    AC_MSG_CHECKING([if STL implementation is HP like])
 
4234
    AC_CACHE_VAL(kde_cv_stl_type_hp,
 
4235
    [
 
4236
      AC_TRY_COMPILE([
 
4237
#include <string>
 
4238
using namespace std;
 
4239
],[
 
4240
  string astring="Hello World";
 
4241
  astring.remove(0, 6); // now astring is "World"
 
4242
  return 0;
 
4243
], kde_cv_stl_type_hp=yes,
 
4244
   kde_cv_stl_type_hp=no)
 
4245
])
 
4246
   AC_MSG_RESULT($kde_cv_stl_type_hp)
 
4247
 
 
4248
   if test "$kde_cv_stl_type_hp" = "yes"; then
 
4249
        AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
 
4250
   fi
 
4251
])
 
4252
 
 
4253
AC_DEFUN(KDE_CHECK_STL,
 
4254
[
 
4255
    AC_LANG_SAVE
 
4256
    AC_LANG_CPLUSPLUS
 
4257
    ac_save_CXXFLAGS="$CXXFLAGS"
 
4258
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
 
4259
    KDE_CHECK_STL_SGI
 
4260
 
 
4261
    if test "$kde_cv_stl_type_sgi" = "no"; then
 
4262
       KDE_CHECK_STL_HP
 
4263
 
 
4264
       if test "$kde_cv_stl_type_hp" = "no"; then
 
4265
         AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
 
4266
       fi
 
4267
    fi
 
4268
 
 
4269
    CXXFLAGS="$ac_save_CXXFLAGS"
 
4270
    AC_LANG_RESTORE
 
4271
])
 
4272
 
 
4273
AC_DEFUN(AC_FIND_QIMGIO,
 
4274
   [AC_REQUIRE([AC_FIND_JPEG])
 
4275
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
4276
AC_MSG_CHECKING([for qimgio])
 
4277
AC_CACHE_VAL(ac_cv_lib_qimgio,
 
4278
[
 
4279
AC_LANG_SAVE
 
4280
AC_LANG_CPLUSPLUS
 
4281
ac_save_LIBS="$LIBS"
 
4282
ac_save_CXXFLAGS="$CXXFLAGS"
 
4283
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
 
4284
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
 
4285
AC_TRY_RUN(dnl
 
4286
[
 
4287
#include <qimageio.h>
 
4288
#include <qstring.h>
 
4289
int main() {
 
4290
                QString t = "hallo";
 
4291
                t.fill('t');
 
4292
                qInitImageIO();
 
4293
}
 
4294
],
 
4295
            ac_cv_lib_qimgio=yes,
 
4296
            ac_cv_lib_qimgio=no,
 
4297
            ac_cv_lib_qimgio=no)
 
4298
LIBS="$ac_save_LIBS"
 
4299
CXXFLAGS="$ac_save_CXXFLAGS"
 
4300
AC_LANG_RESTORE
 
4301
])dnl
 
4302
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
 
4303
  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
 
4304
  AC_MSG_RESULT(yes)
 
4305
  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
 
4306
  AC_SUBST(LIBQIMGIO)
 
4307
else
 
4308
  AC_MSG_RESULT(not found)
 
4309
fi
 
4310
])
 
4311
 
 
4312
AC_DEFUN(KDE_CHECK_ANSI,
 
4313
[
 
4314
])
 
4315
 
 
4316
AC_DEFUN(KDE_CHECK_INSURE,
 
4317
[
 
4318
  AC_ARG_ENABLE(insure, [  --enable-insure             use insure++ for debugging [default=no]],
 
4319
  [
 
4320
  if test $enableval = "no"; dnl
 
4321
        then ac_use_insure="no"
 
4322
        else ac_use_insure="yes"
 
4323
   fi
 
4324
  ], [ac_use_insure="no"])
 
4325
 
 
4326
  AC_MSG_CHECKING(if we will use Insure++ to debug)
 
4327
  AC_MSG_RESULT($ac_use_insure)
 
4328
  if test "$ac_use_insure" = "yes"; dnl
 
4329
       then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
 
4330
   fi
 
4331
])
 
4332
 
 
4333
AC_DEFUN(AM_DISABLE_LIBRARIES,
 
4334
[
 
4335
    AC_PROVIDE([AM_ENABLE_STATIC])
 
4336
    AC_PROVIDE([AM_ENABLE_SHARED])
 
4337
    enable_static=no
 
4338
    enable_shared=yes
 
4339
])
 
4340
 
 
4341
 
 
4342
AC_DEFUN(AC_CHECK_UTMP_FILE,
 
4343
[
 
4344
    AC_MSG_CHECKING([for utmp file])
 
4345
 
 
4346
    AC_CACHE_VAL(kde_cv_utmp_file,
 
4347
    [
 
4348
    kde_cv_utmp_file=no
 
4349
 
 
4350
    for ac_file in    \
 
4351
                      \
 
4352
        /var/run/utmp \
 
4353
        /var/adm/utmp \
 
4354
        /etc/utmp     \
 
4355
     ; \
 
4356
    do
 
4357
     if test -r "$ac_file"; then
 
4358
       kde_cv_utmp_file=$ac_file
 
4359
       break
 
4360
     fi
 
4361
    done
 
4362
    ])
 
4363
 
 
4364
    if test "$kde_cv_utmp_file" != "no"; then
 
4365
        AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
 
4366
        $1
 
4367
        AC_MSG_RESULT($kde_cv_utmp_file)
 
4368
    else
 
4369
        $2
 
4370
        AC_MSG_RESULT([non found])
 
4371
    fi
 
4372
])
 
4373
 
 
4374
 
 
4375
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
 
4376
[
 
4377
 
 
4378
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
 
4379
 
 
4380
if test ! -s $srcdir/subdirs; then
 
4381
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
 
4382
  TOPSUBDIRS=""
 
4383
  files=`cd $srcdir && ls -1`
 
4384
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
 
4385
  for i in $dirs; do
 
4386
    echo $i >> $srcdir/subdirs
 
4387
  done
 
4388
fi
 
4389
 
 
4390
if test -s $srcdir/inst-apps; then
 
4391
  ac_topsubdirs="`cat $srcdir/inst-apps`"
 
4392
else
 
4393
  ac_topsubdirs="`cat $srcdir/subdirs`"
 
4394
fi
 
4395
 
 
4396
for i in $ac_topsubdirs; do
 
4397
  AC_MSG_CHECKING([if $i should be compiled])
 
4398
  if test -d $srcdir/$i; then
 
4399
    install_it="yes"
 
4400
    for j in $DO_NOT_COMPILE; do
 
4401
      if test $i = $j; then
 
4402
        install_it="no"
 
4403
      fi
 
4404
    done
 
4405
  else
 
4406
    install_it="no"
 
4407
  fi
 
4408
  AC_MSG_RESULT($install_it)
 
4409
  vari=`echo $i | sed -e 's,[[-+.]],_,g'`
 
4410
  if test $install_it = "yes"; then
 
4411
    TOPSUBDIRS="$TOPSUBDIRS $i"
 
4412
    eval "$vari""_SUBDIR_included=yes"
 
4413
  else
 
4414
    eval "$vari""_SUBDIR_included=no"
 
4415
  fi
 
4416
done
 
4417
 
 
4418
AC_SUBST(TOPSUBDIRS)
 
4419
])
 
4420
 
 
4421
AC_DEFUN(KDE_CHECK_NAMESPACES,
 
4422
[
 
4423
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
 
4424
AC_LANG_SAVE
 
4425
AC_LANG_CPLUSPLUS
 
4426
AC_TRY_COMPILE([
 
4427
],
 
4428
[
 
4429
namespace Foo {
 
4430
  extern int i;
 
4431
  namespace Bar {
 
4432
    extern int i;
 
4433
  }
 
4434
}
 
4435
 
 
4436
int Foo::i = 0;
 
4437
int Foo::Bar::i = 1;
 
4438
],[
 
4439
  AC_MSG_RESULT(yes)
 
4440
  AC_DEFINE(HAVE_NAMESPACES)
 
4441
], [
 
4442
AC_MSG_RESULT(no)
 
4443
])
 
4444
AC_LANG_RESTORE
 
4445
])
 
4446
 
 
4447
AC_DEFUN(KDE_CHECK_NEWLIBS,
 
4448
[
 
4449
 
 
4450
])
 
4451
 
 
4452
dnl ------------------------------------------------------------------------
 
4453
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
 
4454
dnl ------------------------------------------------------------------------
 
4455
dnl
 
4456
AC_DEFUN(AC_CHECK_S_ISSOCK,
 
4457
[
 
4458
AC_MSG_CHECKING(for S_ISSOCK)
 
4459
AC_CACHE_VAL(ac_cv_have_s_issock,
 
4460
[
 
4461
AC_LANG_SAVE
 
4462
AC_LANG_C
 
4463
AC_TRY_LINK(
 
4464
[
 
4465
#include <sys/stat.h>
 
4466
],
 
4467
[
 
4468
struct stat buff;
 
4469
int b = S_ISSOCK( buff.st_mode );
 
4470
],
 
4471
ac_cv_have_s_issock=yes,
 
4472
ac_cv_have_s_issock=no)
 
4473
AC_LANG_RESTORE
 
4474
])
 
4475
AC_MSG_RESULT($ac_cv_have_s_issock)
 
4476
if test "$ac_cv_have_s_issock" = "yes"; then
 
4477
  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
 
4478
fi
 
4479
 
 
4480
AH_VERBATIM(_ISSOCK,
 
4481
[
 
4482
#ifndef HAVE_S_ISSOCK
 
4483
#define HAVE_S_ISSOCK
 
4484
#define S_ISSOCK(mode) (1==0)
 
4485
#endif
 
4486
])
 
4487
 
 
4488
])
 
4489
 
 
4490
dnl ------------------------------------------------------------------------
 
4491
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
 
4492
dnl ------------------------------------------------------------------------
 
4493
dnl
 
4494
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
 
4495
[
 
4496
AC_MSG_CHECKING(for MAXPATHLEN)
 
4497
AC_CACHE_VAL(ac_cv_maxpathlen,
 
4498
[
 
4499
AC_LANG_C
 
4500
cat > conftest.$ac_ext <<EOF
 
4501
#ifdef STDC_HEADERS
 
4502
# include <stdlib.h>
 
4503
#endif
 
4504
#include <stdio.h>
 
4505
#include <sys/param.h>
 
4506
#ifndef MAXPATHLEN
 
4507
#define MAXPATHLEN 1024
 
4508
#endif
 
4509
 
 
4510
KDE_HELLO MAXPATHLEN
 
4511
 
 
4512
EOF
 
4513
 
 
4514
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
 
4515
 
 
4516
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
 
4517
    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
 
4518
else
 
4519
    ac_cv_maxpathlen=1024
 
4520
fi
 
4521
 
 
4522
rm conftest.*
 
4523
 
 
4524
])
 
4525
AC_MSG_RESULT($ac_cv_maxpathlen)
 
4526
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
 
4527
])
 
4528
 
 
4529
dnl -------------------------------------------------------------------------
 
4530
dnl See if the compiler supports a template repository         bero@redhat.de
 
4531
dnl -------------------------------------------------------------------------
 
4532
AC_DEFUN(KDE_COMPILER_REPO,
 
4533
[
 
4534
  REPO=""
 
4535
  NOREPO=""
 
4536
 
 
4537
  KDE_CHECK_COMPILER_FLAG(frepo,
 
4538
   [
 
4539
     REPO="-frepo"
 
4540
     NOREPO="-fno-repo"
 
4541
   ])
 
4542
 
 
4543
  if test -z "$REPO"; then
 
4544
  KDE_CHECK_COMPILER_FLAG(instances=explicit,
 
4545
  [
 
4546
     REPO="-instances=explicit"
 
4547
     NOREPO="-instances=extern"
 
4548
  ])
 
4549
  fi
 
4550
 
 
4551
  if test -n "$REPO"; then
 
4552
     AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
 
4553
                [C++ compiler supports template repository])
 
4554
     $1
 
4555
  fi
 
4556
 
 
4557
  AC_SUBST(REPO)
 
4558
  AC_SUBST(NOREPO)
 
4559
])
 
4560
 
 
4561
AC_DEFUN(KDE_CHECK_HEADER,
 
4562
[
 
4563
   AC_LANG_SAVE
 
4564
   kde_safe_cppflags=$CPPFLAGS
 
4565
   CPPFLAGS="$CPPFLAGS $all_includes"
 
4566
   AC_LANG_CPLUSPLUS
 
4567
   AC_CHECK_HEADER($1, $2, $3, $4)
 
4568
   CPPFLAGS=$kde_safe_cppflags
 
4569
   AC_LANG_RESTORE
 
4570
])
 
4571
 
 
4572
AC_DEFUN(KDE_CHECK_HEADERS,
 
4573
[
 
4574
   AH_CHECK_HEADERS([$1])
 
4575
   AC_LANG_SAVE
 
4576
   kde_safe_cppflags=$CPPFLAGS
 
4577
   CPPFLAGS="$CPPFLAGS $all_includes"
 
4578
   AC_LANG_CPLUSPLUS
 
4579
   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
 
4580
   CPPFLAGS=$kde_safe_cppflags
 
4581
   AC_LANG_RESTORE
 
4582
])
 
4583
 
 
4584
AC_DEFUN(KDE_FAST_CONFIGURE,
 
4585
[
 
4586
  dnl makes configure fast (needs perl)
 
4587
  AC_ARG_ENABLE(fast-perl, [  --disable-fast-perl     disable fast Makefile generation (needs perl)],
 
4588
      with_fast_perl=$enableval, with_fast_perl=yes)
 
4589
])
 
4590
 
 
4591
AC_DEFUN(KDE_CONF_FILES,
 
4592
[
 
4593
  val=
 
4594
  if test -f $srcdir/configure.files ; then
 
4595
    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
 
4596
  fi
 
4597
  CONF_FILES=
 
4598
  if test -n "$val" ; then
 
4599
    for i in $val ; do
 
4600
      CONF_FILES="$CONF_FILES $i"
 
4601
    done
 
4602
  fi
 
4603
  AC_SUBST(CONF_FILES)
 
4604
])dnl
 
4605
 
 
4606
AC_DEFUN(KDE_SET_PREFIX,
 
4607
[
 
4608
  unset CDPATH
 
4609
  dnl make $KDEDIR the default for the installation
 
4610
  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
 
4611
 
 
4612
  if test "x$prefix" = "xNONE"; then
 
4613
    prefix=$ac_default_prefix
 
4614
    ac_configure_args="$ac_configure_args --prefix=$prefix"
 
4615
  fi
 
4616
  # And delete superflous '/' to make compares easier
 
4617
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4618
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4619
  KDE_FAST_CONFIGURE
 
4620
  KDE_CONF_FILES
 
4621
])
 
4622
 
 
4623
pushdef([AC_PROG_INSTALL],
 
4624
[
 
4625
  dnl our own version, testing for a -p flag
 
4626
  popdef([AC_PROG_INSTALL])
 
4627
  dnl as AC_PROG_INSTALL works as it works we first have
 
4628
  dnl to save if the user didn't specify INSTALL, as the
 
4629
  dnl autoconf one overwrites INSTALL and we have no chance to find
 
4630
  dnl out afterwards
 
4631
  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
 
4632
  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
 
4633
  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
 
4634
  AC_PROG_INSTALL
 
4635
 
 
4636
  if test -z "$kde_save_INSTALL_given" ; then
 
4637
    # OK, user hasn't given any INSTALL, autoconf found one for us
 
4638
    # now we test, if it supports the -p flag
 
4639
    AC_MSG_CHECKING(for -p flag to install)
 
4640
    rm -f confinst.$$.* > /dev/null 2>&1
 
4641
    echo "Testtest" > confinst.$$.orig
 
4642
    ac_res=no
 
4643
    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
 
4644
      if test -f confinst.$$.new ; then
 
4645
        # OK, -p seems to do no harm to install
 
4646
        INSTALL="${INSTALL} -p"
 
4647
        ac_res=yes
 
4648
      fi
 
4649
    fi
 
4650
    rm -f confinst.$$.*
 
4651
    AC_MSG_RESULT($ac_res)
 
4652
  fi
 
4653
  dnl the following tries to resolve some signs and wonders coming up
 
4654
  dnl with different autoconf/automake versions
 
4655
  dnl e.g.:
 
4656
  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
 
4657
  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
 
4658
  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
 
4659
  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
 
4660
  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
 
4661
  dnl   install-@DIR@PROGRAMS targets to explicitly use that flag
 
4662
  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
 
4663
  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
 
4664
  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
 
4665
  dnl  *sometimes KDE does not use the install-@DIR@PROGRAM targets from
 
4666
  dnl   automake (due to broken Makefile.am or whatever) to install programs,
 
4667
  dnl   and so does not see the -s flag in automake > 1.4
 
4668
  dnl to clean up that mess we:
 
4669
  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
 
4670
  dnl   which cleans KDE's program with automake > 1.4;
 
4671
  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
 
4672
  dnl   with automake<=1.4
 
4673
  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
 
4674
  dnl   properly uses install-@DIR@PROGRAMS, but I don't care
 
4675
  dnl
 
4676
  dnl And to all this comes, that I even can't write in comments variable
 
4677
  dnl  names used by automake, because it is so stupid to think I wanted to
 
4678
  dnl  _use_ them, therefor I have written A_M_... instead of AM_
 
4679
  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
 
4680
 
 
4681
  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
 
4682
    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
 
4683
  fi
 
4684
  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
 
4685
    INSTALL_SCRIPT='${INSTALL}'
 
4686
  fi
 
4687
])dnl
 
4688
 
 
4689
AC_DEFUN(KDE_LANG_CPLUSPLUS,
 
4690
[AC_LANG_CPLUSPLUS
 
4691
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
 
4692
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
 
4693
])
 
4694
 
 
4695
pushdef([AC_LANG_CPLUSPLUS],
 
4696
[popdef([AC_LANG_CPLUSPLUS])
 
4697
KDE_LANG_CPLUSPLUS
 
4698
])
 
4699
 
 
4700
AC_DEFUN(KDE_CHECK_LONG_LONG,
 
4701
[
 
4702
AC_MSG_CHECKING(for long long)
 
4703
AC_CACHE_VAL(kde_cv_c_long_long,
 
4704
[
 
4705
  AC_LANG_SAVE
 
4706
  AC_LANG_CPLUSPLUS
 
4707
  AC_TRY_LINK([], [
 
4708
  long long foo = 0;
 
4709
  foo = foo+1;
 
4710
  ],
 
4711
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
 
4712
  AC_LANG_RESTORE
 
4713
])
 
4714
AC_MSG_RESULT($kde_cv_c_long_long)
 
4715
if test "$kde_cv_c_long_long" = yes; then
 
4716
   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
 
4717
fi
 
4718
])
 
4719
 
 
4720
AC_DEFUN(KDE_CHECK_LIB,
 
4721
[
 
4722
     kde_save_LDFLAGS="$LDFLAGS"
 
4723
     dnl AC_CHECK_LIB modifies LIBS, so save it here
 
4724
     kde_save_LIBS="$LIBS"
 
4725
     LDFLAGS="$LDFLAGS $all_libraries"
 
4726
     case $host_os in
 
4727
      aix*) LDFLAGS="-brtl $LDFLAGS"
 
4728
        test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
 
4729
        ;;
 
4730
     esac
 
4731
     AC_CHECK_LIB($1, $2, $3, $4, $5)
 
4732
     LDFLAGS="$kde_save_LDFLAGS"
 
4733
     LIBS="$kde_save_LIBS"
 
4734
])
 
4735
 
 
4736
AC_DEFUN(KDE_JAVA_PREFIX,
 
4737
[
 
4738
        dir=`dirname "$1"`
 
4739
        base=`basename "$1"`
 
4740
        list=`ls -1 $dir 2> /dev/null`
 
4741
        for entry in $list; do 
 
4742
                if test -d $dir/$entry/bin; then
 
4743
                        case $entry in
 
4744
                           $base)
 
4745
                                javadirs="$javadirs $dir/$entry/bin"
 
4746
                                ;;
 
4747
                        esac
 
4748
                elif test -d $dir/$entry/jre/bin; then
 
4749
                        case $entry in
 
4750
                           $base)
 
4751
                                javadirs="$javadirs $dir/$entry/jre/bin"
 
4752
                                ;;
 
4753
                        esac
 
4754
                fi
 
4755
        done
 
4756
])
 
4757
 
 
4758
dnl KDE_CHEC_JAVA_DIR(onlyjre)
 
4759
AC_DEFUN(KDE_CHECK_JAVA_DIR,
 
4760
[
 
4761
 
 
4762
AC_ARG_WITH(java,
 
4763
[  --with-java=javadir     use java installed in javadir, --without-java disables ],
 
4764
[  ac_java_dir=$withval
 
4765
], ac_java_dir=""
 
4766
)
 
4767
 
 
4768
AC_MSG_CHECKING([for Java])
 
4769
 
 
4770
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
 
4771
if test "x$ac_java_dir" = "xno"; then
 
4772
   kde_java_bindir=no
 
4773
   kde_java_includedir=no
 
4774
   kde_java_libjvmdir=no
 
4775
   kde_java_libhpidir=no
 
4776
else
 
4777
  if test "x$ac_java_dir" = "x"; then
 
4778
     
 
4779
     
 
4780
      dnl No option set -> look in $PATH
 
4781
      KDE_JAVA_PREFIX(/usr/j2se)
 
4782
      KDE_JAVA_PREFIX(/usr/j*dk*)
 
4783
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
 
4784
      KDE_JAVA_PREFIX(/opt/j*sdk*)
 
4785
      KDE_JAVA_PREFIX(/usr/lib/java*)
 
4786
      KDE_JAVA_PREFIX(/usr/java*)
 
4787
      KDE_JAVA_PREFIX(/usr/java/j*dk*)
 
4788
      KDE_JAVA_PREFIX(/usr/java/j*re*)
 
4789
      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
 
4790
      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
 
4791
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
 
4792
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
 
4793
      KDE_JAVA_PREFIX(/opt/java*)
 
4794
    
 
4795
      kde_cv_path="NONE"
 
4796
      kde_save_IFS=$IFS
 
4797
      IFS=':'
 
4798
      for dir in $PATH; do
 
4799
          javadirs="$javadirs $dir"
 
4800
      done
 
4801
      IFS=$kde_save_IFS
 
4802
      jredirs=
 
4803
 
 
4804
      for dir in $javadirs; do
 
4805
          if test ! -d $dir; then break; fi
 
4806
          if test -x "$dir/java"; then
 
4807
                libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
4808
                if test ! -f $libjvmdir/libjvm.so; then continue; fi
 
4809
                jredirs="$jredirs $dir"
 
4810
          fi
 
4811
      done
 
4812
 
 
4813
      JAVAC=
 
4814
      JAVA=
 
4815
      kde_java_bindir=no
 
4816
      for dir in $jredirs; do
 
4817
          JAVA="$dir/java"
 
4818
          kde_java_bindir=$dir
 
4819
          if test -x "$dir/javac"; then
 
4820
                JAVAC="$dir/javac"
 
4821
                break
 
4822
          fi
 
4823
      done
 
4824
 
 
4825
      if test -n "$JAVAC"; then
 
4826
          dnl this substitution might not work - well, we test for jni.h below
 
4827
          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
 
4828
      else
 
4829
          kde_java_includedir=no
 
4830
      fi
 
4831
  else
 
4832
    dnl config option set
 
4833
    kde_java_bindir=$ac_java_dir/bin
 
4834
    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
 
4835
        kde_java_includedir=no
 
4836
    else
 
4837
        kde_java_includedir=$ac_java_dir/include
 
4838
    fi
 
4839
  fi
 
4840
fi
 
4841
 
 
4842
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
 
4843
if test "x$kde_java_bindir" != "xno"; then
 
4844
 
 
4845
  dnl Look for libjvm.so
 
4846
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
4847
  dnl Look for libhpi.so and avoid green threads
 
4848
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
 
4849
 
 
4850
  dnl Now check everything's fine under there
 
4851
  dnl the include dir is our flag for having the JDK
 
4852
  if test -d "$kde_java_includedir"; then
 
4853
    if test ! -x "$kde_java_bindir/javac"; then
 
4854
      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
 
4855
    fi
 
4856
    if test ! -x "$kde_java_bindir/javah"; then
 
4857
      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4858
    fi
 
4859
    if test ! -x "$kde_java_bindir/jar"; then
 
4860
      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4861
    fi
 
4862
    if test ! -r "$kde_java_includedir/jni.h"; then
 
4863
      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
 
4864
    fi
 
4865
 
 
4866
    jni_includes="-I$kde_java_includedir"
 
4867
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
 
4868
    dnl and under linux here..
 
4869
    test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
 
4870
    test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
 
4871
    test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
 
4872
 
 
4873
  else
 
4874
    JAVAC=
 
4875
    jni_includes=
 
4876
  fi
 
4877
 
 
4878
  if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
 
4879
     AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
 
4880
  fi 
 
4881
 
 
4882
  if test ! -x "$kde_java_bindir/java"; then
 
4883
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4884
  fi
 
4885
 
 
4886
  if test ! -r "$kde_java_libhpidir/libhpi.so"; then
 
4887
    AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
 
4888
  fi
 
4889
 
 
4890
  if test -n "$jni_includes"; then
 
4891
    dnl Check for JNI version
 
4892
    AC_LANG_SAVE
 
4893
    AC_LANG_CPLUSPLUS
 
4894
    ac_cxxflags_safe="$CXXFLAGS"
 
4895
    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
 
4896
 
 
4897
    AC_TRY_COMPILE([
 
4898
  #include <jni.h>
 
4899
              ],
 
4900
              [
 
4901
  #ifndef JNI_VERSION_1_2
 
4902
  Syntax Error
 
4903
  #endif
 
4904
              ],[ kde_jni_works=yes ],
 
4905
              [ kde_jni_works=no ])
 
4906
 
 
4907
    if test $kde_jni_works = no; then
 
4908
      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
 
4909
                    You need to have Java Development Kit (JDK) version 1.2. 
 
4910
 
 
4911
                    Use --with-java to specify another location.
 
4912
                    Use --without-java to configure without java support.
 
4913
                    Or download a newer JDK and try again. 
 
4914
                    See e.g. http://java.sun.com/products/jdk/1.2 ])
 
4915
    fi
 
4916
 
 
4917
    CXXFLAGS="$ac_cxxflags_safe"    
 
4918
    AC_LANG_RESTORE
 
4919
 
 
4920
    dnl All tests ok, inform and subst the variables
 
4921
 
 
4922
    JAVAC=$kde_java_bindir/javac
 
4923
    JAVAH=$kde_java_bindir/javah
 
4924
    JAR=$kde_java_bindir/jar
 
4925
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
4926
    JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
 
4927
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
 
4928
 
 
4929
  else
 
4930
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
 
4931
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
 
4932
  fi
 
4933
else # no
 
4934
  AC_MSG_RESULT([none found])
 
4935
fi
 
4936
 
 
4937
AC_SUBST(JAVAC)
 
4938
AC_SUBST(JAVAH)
 
4939
AC_SUBST(JAR)
 
4940
AC_SUBST(JVMLIBS)
 
4941
AC_SUBST(jni_includes)
 
4942
 
 
4943
# for backward compat
 
4944
kde_cv_java_includedir=$kde_java_includedir
 
4945
kde_cv_java_bindir=$kde_java_bindir
 
4946
])
 
4947
 
 
4948
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
 
4949
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
 
4950
dnl big packages, m4_foreach is dog-slow.  So use our own version of
 
4951
dnl it.  (matz@kde.org)
 
4952
m4_define([mm_foreach],
 
4953
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
 
4954
m4_define([mm_car], [[$1]])
 
4955
m4_define([mm_car2], [[$@]])
 
4956
m4_define([_mm_foreach],
 
4957
[m4_if(m4_quote($2), [], [],
 
4958
       [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
 
4959
                                                     mm_car2(m4_shift($2)),
 
4960
                                                     [$3])])])
 
4961
m4_define([AC_FOREACH],
 
4962
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
 
4963
 
 
4964
AC_DEFUN(KDE_NEED_FLEX,
 
4965
[
 
4966
kde_libs_safe=$LIBS
 
4967
LIBS="$LIBS $USER_LDFLAGS"
 
4968
AM_PROG_LEX
 
4969
LIBS=$kde_libs_safe
 
4970
if test -z "$LEXLIB"; then
 
4971
    AC_MSG_ERROR([You need to have flex installed.])
 
4972
fi
 
4973
AC_SUBST(LEXLIB)
 
4974
])
 
4975
 
 
4976
AC_DEFUN(AC_PATH_QTOPIA,
 
4977
[
 
4978
  dnl TODO: use AC_CACHE_VAL
 
4979
 
 
4980
  if test -z "$1"; then
 
4981
    qtopia_minver_maj=1
 
4982
    qtopia_minver_min=5
 
4983
    qtopia_minver_pat=0
 
4984
  else
 
4985
    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
 
4986
    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
 
4987
    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
 
4988
  fi
 
4989
 
 
4990
  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
 
4991
  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
 
4992
 
 
4993
  AC_REQUIRE([AC_PATH_QT])
 
4994
 
 
4995
  AC_MSG_CHECKING([for Qtopia])
 
4996
 
 
4997
  LIB_QTOPIA="-lqpe"
 
4998
  AC_SUBST(LIB_QTOPIA)
 
4999
 
 
5000
  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
 
5001
 
 
5002
  ac_qtopia_incdir=NO
 
5003
 
 
5004
  AC_ARG_WITH(qtopia-dir,
 
5005
              [  --with-qtopia-dir=DIR   where the root of Qtopia is installed ],
 
5006
              [  ac_qtopia_incdir="$withval"/include] ) 
 
5007
  
 
5008
  qtopia_incdirs=""
 
5009
  for dir in $kde_qtopia_dirs; do
 
5010
    qtopia_incdirs="$qtopia_incdirs $dir/include"
 
5011
  done
 
5012
 
 
5013
  if test ! "$ac_qtopia_incdir" = "NO"; then
 
5014
    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
 
5015
  fi
 
5016
 
 
5017
  qtopia_incdir=""
 
5018
  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
 
5019
  ac_qtopia_incdir="$qtopia_incdir"
 
5020
 
 
5021
  if test -z "$qtopia_incdir"; then
 
5022
    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
 
5023
  fi
 
5024
 
 
5025
  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
 
5026
  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
 
5027
  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
 
5028
 
 
5029
  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
 
5030
  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
 
5031
  if test "$qtopia_ver" -lt "$qtopia_minver"; then
 
5032
    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
 
5033
is required.])
 
5034
  fi
 
5035
 
 
5036
  AC_LANG_SAVE
 
5037
  AC_LANG_CPLUSPLUS
 
5038
 
 
5039
  ac_cxxflags_safe="$CXXFLAGS"
 
5040
  ac_ldflags_safe="$LDFLAGS"
 
5041
  ac_libs_safe="$LIBS"
 
5042
 
 
5043
  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
 
5044
  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
 
5045
  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
 
5046
 
 
5047
  cat > conftest.$ac_ext <<EOF
 
5048
#include "confdefs.h"
 
5049
#include <qpe/qpeapplication.h>
 
5050
#include <qpe/version.h>
 
5051
 
 
5052
int main( int argc, char **argv )
 
5053
{
 
5054
    QPEApplication app( argc, argv );
 
5055
    return 0;
 
5056
}
 
5057
EOF
 
5058
 
 
5059
  if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
5060
    rm -f conftest*
 
5061
  else
 
5062
    rm -f conftest*
 
5063
    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
 
5064
the end of config.log])
 
5065
  fi
 
5066
 
 
5067
  CXXFLAGS="$ac_cxxflags_safe"
 
5068
  LDFLAGS="$ac_ldflags_safe"
 
5069
  LIBS="$ac_libs_safe"
 
5070
 
 
5071
  AC_LANG_RESTORE
 
5072
 
 
5073
  QTOPIA_INCLUDES="-I$qtopia_incdir"
 
5074
  AC_SUBST(QTOPIA_INCLUDES)
 
5075
 
 
5076
  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
 
5077
])
 
5078
 
 
5079
 
 
5080
AC_DEFUN(KDE_INIT_DOXYGEN,
 
5081
[
 
5082
AC_MSG_CHECKING([for Qt docs])
 
5083
kde_qtdir=
 
5084
if test "${with_qt_dir+set}" = set; then
 
5085
  kde_qtdir="$with_qt_dir"
 
5086
fi
 
5087
 
 
5088
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 ], QTDOCDIR)
 
5089
AC_MSG_RESULT($QTDOCDIR)
 
5090
 
 
5091
AC_SUBST(QTDOCDIR)
 
5092
 
 
5093
KDE_FIND_PATH(dot, DOT, [], [])
 
5094
if test -n "$DOT"; then
 
5095
  KDE_HAVE_DOT="YES"
 
5096
else
 
5097
  KDE_HAVE_DOT="NO"
 
5098
fi
 
5099
AC_SUBST(KDE_HAVE_DOT)
 
5100
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
 
5101
AC_SUBST(DOXYGEN)
 
5102
 
 
5103
DOXYGEN_PROJECT_NAME="$1"
 
5104
DOXYGEN_PROJECT_NUMBER="$2"
 
5105
AC_SUBST(DOXYGEN_PROJECT_NAME)
 
5106
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
 
5107
 
 
5108
KDE_HAS_DOXYGEN=no
 
5109
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
 
5110
  KDE_HAS_DOXYGEN=yes
 
5111
fi
 
5112
AC_SUBST(KDE_HAS_DOXYGEN)
 
5113
 
 
5114
])
 
5115
 
 
5116
 
 
5117
AC_DEFUN(AC_FIND_BZIP2,
 
5118
[
 
5119
AC_MSG_CHECKING([for bzDecompress in libbz2])
 
5120
AC_CACHE_VAL(ac_cv_lib_bzip2,
 
5121
[
 
5122
AC_LANG_C
 
5123
kde_save_LIBS="$LIBS"
 
5124
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
 
5125
kde_save_CFLAGS="$CFLAGS"
 
5126
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
 
5127
AC_TRY_LINK(dnl
 
5128
[
 
5129
#define BZ_NO_STDIO
 
5130
#include<bzlib.h>
 
5131
],
 
5132
            [ bz_stream s; (void) bzDecompress(&s); ],
 
5133
            eval "ac_cv_lib_bzip2='-lbz2'",
 
5134
            eval "ac_cv_lib_bzip2=no")
 
5135
LIBS="$kde_save_LIBS"
 
5136
CFLAGS="$kde_save_CFLAGS"
 
5137
])dnl
 
5138
AC_MSG_RESULT($ac_cv_lib_bzip2)
 
5139
 
 
5140
if test ! "$ac_cv_lib_bzip2" = no; then
 
5141
  BZIP2DIR=bzip2
 
5142
 
 
5143
  LIBBZ2="$ac_cv_lib_bzip2"
 
5144
  AC_SUBST(LIBBZ2)
 
5145
 
 
5146
else
 
5147
 
 
5148
   cxx_shared_flag=
 
5149
   ld_shared_flag=
 
5150
   KDE_CHECK_COMPILER_FLAG(shared, [
 
5151
        ld_shared_flag="-shared"
 
5152
   ])
 
5153
   KDE_CHECK_COMPILER_FLAG(fPIC, [
 
5154
        cxx_shared_flag="-fPIC"
 
5155
   ])
 
5156
 
 
5157
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
 
5158
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
 
5159
   [
 
5160
   AC_LANG_CPLUSPLUS
 
5161
   kde_save_LIBS="$LIBS"
 
5162
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
 
5163
   kde_save_CXXFLAGS="$CXXFLAGS"
 
5164
   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
 
5165
 
 
5166
   AC_TRY_LINK(dnl
 
5167
   [
 
5168
   #define BZ_NO_STDIO
 
5169
   #include<bzlib.h>
 
5170
   ],
 
5171
               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
 
5172
               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
 
5173
               eval "ac_cv_lib_bzip2_prefix=no")
 
5174
   LIBS="$kde_save_LIBS"
 
5175
   CXXFLAGS="$kde_save_CXXFLAGS"
 
5176
   ])dnl
 
5177
 
 
5178
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
 
5179
   
 
5180
 
 
5181
 
 
5182
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
 
5183
     BZIP2DIR=bzip2
 
5184
    
 
5185
     LIBBZ2="$ac_cv_lib_bzip2_prefix"
 
5186
     AC_SUBST(LIBBZ2)
 
5187
 
 
5188
     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
 
5189
   dnl else, we just ignore this
 
5190
   fi
 
5191
 
 
5192
fi
 
5193
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
 
5194
])
 
5195
 
 
5196
dnl ------------------------------------------------------------------------
 
5197
dnl Try to find the SSL headers and libraries.
 
5198
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
 
5199
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
 
5200
dnl ------------------------------------------------------------------------
 
5201
dnl
 
5202
AC_DEFUN(KDE_CHECK_SSL,
 
5203
[
 
5204
LIBSSL="-lssl -lcrypto"
 
5205
AC_REQUIRE([KDE_CHECK_LIB64])
 
5206
 
 
5207
ac_ssl_includes=NO ac_ssl_libraries=NO
 
5208
ssl_libraries=""
 
5209
ssl_includes=""
 
5210
AC_ARG_WITH(ssl-dir,
 
5211
    [  --with-ssl-dir=DIR      where the root of OpenSSL is installed],
 
5212
    [  ac_ssl_includes="$withval"/include
 
5213
       ac_ssl_libraries="$withval"/lib$kdelibsuff
 
5214
    ])
 
5215
 
 
5216
want_ssl=yes
 
5217
AC_ARG_WITH(ssl,
 
5218
    [  --without-ssl           disable SSL checks],
 
5219
    [want_ssl=$withval])
 
5220
 
 
5221
if test $want_ssl = yes; then
 
5222
 
 
5223
AC_MSG_CHECKING(for OpenSSL)
 
5224
 
 
5225
AC_CACHE_VAL(ac_cv_have_ssl,
 
5226
[#try to guess OpenSSL locations
 
5227
  
 
5228
  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
 
5229
  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
 
5230
  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
 
5231
  ac_ssl_includes="$ssl_incdir"
 
5232
 
 
5233
  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"
 
5234
  if test ! "$ac_ssl_libraries" = "NO"; then
 
5235
    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
 
5236
  fi
 
5237
 
 
5238
  test=NONE
 
5239
  ssl_libdir=NONE
 
5240
  for dir in $ssl_libdirs; do
 
5241
    try="ls -1 $dir/libssl*"
 
5242
    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
 
5243
  done
 
5244
 
 
5245
  ac_ssl_libraries="$ssl_libdir"
 
5246
 
 
5247
  AC_LANG_SAVE
 
5248
  AC_LANG_C
 
5249
 
 
5250
  ac_cflags_safe="$CFLAGS"
 
5251
  ac_ldflags_safe="$LDFLAGS"
 
5252
  ac_libs_safe="$LIBS"
 
5253
 
 
5254
  CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
 
5255
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
 
5256
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
 
5257
 
 
5258
  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
 
5259
  ac_ssl_rsaref="yes"
 
5260
  ,
 
5261
  ac_ssl_rsaref="no"
 
5262
  )
 
5263
 
 
5264
  CFLAGS="$ac_cflags_safe"
 
5265
  LDFLAGS="$ac_ldflags_safe"
 
5266
  LIBS="$ac_libs_safe"
 
5267
 
 
5268
  AC_LANG_RESTORE
 
5269
 
 
5270
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
 
5271
    have_ssl=no
 
5272
  else
 
5273
    have_ssl=yes;
 
5274
  fi
 
5275
 
 
5276
  ])
 
5277
 
 
5278
  eval "$ac_cv_have_ssl"
 
5279
 
 
5280
  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
 
5281
 
 
5282
  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
 
5283
  AC_MSG_RESULT($ac_ssl_rsaref)
 
5284
 
 
5285
  AC_MSG_CHECKING([for easter eggs])
 
5286
  AC_MSG_RESULT([none found])
 
5287
 
 
5288
else
 
5289
  have_ssl=no
 
5290
fi
 
5291
 
 
5292
if test "$have_ssl" = yes; then
 
5293
  AC_MSG_CHECKING(for OpenSSL version)
 
5294
  dnl Check for SSL version
 
5295
  AC_CACHE_VAL(ac_cv_ssl_version,
 
5296
  [
 
5297
    AC_LANG_SAVE
 
5298
    AC_LANG_C 
 
5299
 
 
5300
    cat >conftest.$ac_ext <<EOF
 
5301
#include <openssl/opensslv.h>
 
5302
#include <stdio.h>
 
5303
    int main() {
 
5304
 
 
5305
#ifndef OPENSSL_VERSION_NUMBER
 
5306
      printf("ssl_version=\\"error\\"\n");
 
5307
#else
 
5308
      if (OPENSSL_VERSION_NUMBER < 0x00906000)
 
5309
        printf("ssl_version=\\"old\\"\n");
 
5310
      else
 
5311
        printf("ssl_version=\\"ok\\"\n");
 
5312
#endif
 
5313
     return (0);
 
5314
    }
 
5315
EOF
 
5316
 
 
5317
    ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
 
5318
    if AC_TRY_EVAL(ac_compile); then 
 
5319
 
 
5320
      if eval `./conftest 2>&5`; then
 
5321
        if test $ssl_version = error; then
 
5322
          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
 
5323
        else
 
5324
          if test $ssl_version = old; then
 
5325
            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
 
5326
            have_ssl=no
 
5327
          fi
 
5328
        fi
 
5329
        ac_cv_ssl_version="ssl_version=$ssl_version"
 
5330
      else
 
5331
        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
 
5332
        Check config.log, and if you can't figure it out, send a mail to 
 
5333
        David Faure <faure@kde.org>, attaching your config.log])
 
5334
      fi
 
5335
 
 
5336
    else
 
5337
      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
 
5338
      Check config.log, and if you can't figure it out, send a mail to 
 
5339
      David Faure <faure@kde.org>, attaching your config.log])
 
5340
    fi 
 
5341
 
 
5342
    AC_LANG_RESTORE
 
5343
 
 
5344
  ])
 
5345
 
 
5346
  eval "$ac_cv_ssl_version"
 
5347
  AC_MSG_RESULT($ssl_version)
 
5348
fi
 
5349
 
 
5350
if test "$have_ssl" != yes; then
 
5351
  LIBSSL="";
 
5352
else
 
5353
  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
 
5354
  ac_cv_have_ssl="have_ssl=yes \
 
5355
    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
 
5356
  
 
5357
  
 
5358
  ssl_libraries="$ac_ssl_libraries"
 
5359
  ssl_includes="$ac_ssl_includes"
 
5360
 
 
5361
  if test "$ac_ssl_rsaref" = yes; then
 
5362
    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
 
5363
  fi
 
5364
 
 
5365
  if test $ssl_version = "old"; then
 
5366
    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
 
5367
  fi
 
5368
fi
 
5369
 
 
5370
if test "$ssl_includes" = "/usr/include" || test  "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
 
5371
 SSL_INCLUDES="";
 
5372
else
 
5373
 SSL_INCLUDES="-I$ssl_includes"
 
5374
fi
 
5375
 
 
5376
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
 
5377
 SSL_LDFLAGS=""
 
5378
else
 
5379
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
 
5380
fi
 
5381
 
 
5382
AC_SUBST(SSL_INCLUDES)
 
5383
AC_SUBST(SSL_LDFLAGS)
 
5384
AC_SUBST(LIBSSL)
 
5385
])
 
5386
 
 
5387
AC_DEFUN(KDE_CHECK_STRLCPY,
 
5388
[
 
5389
  AC_CHECK_STRLCPY
 
5390
  AC_CHECK_STRLCAT
 
5391
  AC_CHECK_SIZEOF(size_t)
 
5392
  AC_CHECK_SIZEOF(unsigned long)
 
5393
 
 
5394
  AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)])
 
5395
  AC_TRY_COMPILE(,[
 
5396
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
 
5397
       choke me
 
5398
    #endif
 
5399
    ],[AC_MSG_RESULT([yes])],[
 
5400
      AC_MSG_RESULT([no])
 
5401
      AC_MSG_ERROR([
 
5402
       Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long)
 
5403
       does not apply. Please mail kde-devel@kde.org with a description of your system!
 
5404
      ])
 
5405
  ])
 
5406
])
 
5407
 
 
5408
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
5409
 
 
5410
# serial 47 AC_PROG_LIBTOOL
 
5411
 
 
5412
# AC_PROG_LIBTOOL
 
5413
# ---------------
 
5414
AC_DEFUN([AC_PROG_LIBTOOL],
 
5415
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
 
5416
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
 
5417
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
 
5418
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
5419
    [AC_LIBTOOL_CXX],
 
5420
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
 
5421
  ])])
 
5422
 
 
5423
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
 
5424
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
 
5425
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
 
5426
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
5427
    [AC_LIBTOOL_GCJ],
 
5428
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
5429
      [AC_LIBTOOL_GCJ],
 
5430
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
5431
        [AC_LIBTOOL_GCJ],
 
5432
      [ifdef([AC_PROG_GCJ],
 
5433
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
5434
       ifdef([A][M_PROG_GCJ],
 
5435
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
5436
       ifdef([LT_AC_PROG_GCJ],
 
5437
             [define([LT_AC_PROG_GCJ],
 
5438
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
5439
])])# AC_PROG_LIBTOOL
 
5440
 
 
5441
 
 
5442
# _AC_PROG_LIBTOOL
 
5443
# ----------------
 
5444
AC_DEFUN([_AC_PROG_LIBTOOL],
 
5445
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
5446
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
5447
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
 
5448
 
 
5449
# This can be used to rebuild libtool when needed
 
5450
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
5451
 
 
5452
# Always use our own libtool.
 
5453
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
 
5454
AC_SUBST(LIBTOOL)dnl
 
5455
 
 
5456
# Prevent multiple expansion
 
5457
define([AC_PROG_LIBTOOL], [])
 
5458
])# _AC_PROG_LIBTOOL
 
5459
 
 
5460
 
 
5461
# AC_LIBTOOL_SETUP
 
5462
# ----------------
 
5463
AC_DEFUN([AC_LIBTOOL_SETUP],
 
5464
[AC_PREREQ(2.50)dnl
 
5465
AC_REQUIRE([AC_ENABLE_SHARED])dnl
 
5466
AC_REQUIRE([AC_ENABLE_STATIC])dnl
 
5467
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
 
5468
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
5469
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
5470
AC_REQUIRE([AC_PROG_CC])dnl
 
5471
AC_REQUIRE([AC_PROG_LD])dnl
 
5472
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
 
5473
AC_REQUIRE([AC_PROG_NM])dnl
 
5474
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
5475
 
 
5476
AC_REQUIRE([AC_PROG_LN_S])dnl
 
5477
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
5478
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
 
5479
AC_REQUIRE([AC_OBJEXT])dnl
 
5480
AC_REQUIRE([AC_EXEEXT])dnl
 
5481
dnl
 
5482
 
 
5483
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
5484
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
5485
AC_LIBTOOL_OBJDIR
 
5486
 
 
5487
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
5488
_LT_AC_PROG_ECHO_BACKSLASH
 
5489
 
 
5490
case $host_os in
 
5491
aix3*)
 
5492
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
5493
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
5494
  # vanish in a puff of smoke.
 
5495
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
5496
    COLLECT_NAMES=
 
5497
    export COLLECT_NAMES
 
5498
  fi
 
5499
  ;;
 
5500
esac
 
5501
 
 
5502
# Sed substitution that helps us do robust quoting.  It backslashifies
 
5503
# metacharacters that are still active within double-quoted strings.
 
5504
Xsed='sed -e s/^X//'
 
5505
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
5506
 
 
5507
# Same as above, but do not quote variable references.
 
5508
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
5509
 
 
5510
# Sed substitution to delay expansion of an escaped shell variable in a
 
5511
# double_quote_subst'ed string.
 
5512
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
5513
 
 
5514
# Sed substitution to avoid accidental globbing in evaled expressions
 
5515
no_glob_subst='s/\*/\\\*/g'
 
5516
 
 
5517
# Constants:
 
5518
rm="rm -f"
 
5519
 
 
5520
# Global variables:
 
5521
default_ofile=libtool
 
5522
can_build_shared=yes
 
5523
 
 
5524
# All known linkers require a `.a' archive for static linking (except M$VC,
 
5525
# which needs '.lib').
 
5526
libext=a
 
5527
ltmain="$ac_aux_dir/ltmain.sh"
 
5528
ofile="$default_ofile"
 
5529
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
5530
 
 
5531
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
5532
AC_CHECK_TOOL(STRIP, strip, :)
 
5533
 
 
5534
old_CC="$CC"
 
5535
old_CFLAGS="$CFLAGS"
 
5536
 
 
5537
# Set sane defaults for various variables
 
5538
test -z "$AR" && AR=ar
 
5539
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
5540
test -z "$AS" && AS=as
 
5541
test -z "$CC" && CC=cc
 
5542
test -z "$LTCC" && LTCC=$CC
 
5543
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
5544
test -z "$LD" && LD=ld
 
5545
test -z "$LN_S" && LN_S="ln -s"
 
5546
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
5547
test -z "$NM" && NM=nm
 
5548
test -z "$SED" && SED=sed
 
5549
test -z "$OBJDUMP" && OBJDUMP=objdump
 
5550
test -z "$RANLIB" && RANLIB=:
 
5551
test -z "$STRIP" && STRIP=:
 
5552
test -z "$ac_objext" && ac_objext=o
 
5553
 
 
5554
# Determine commands to create old-style static archives.
 
5555
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
5556
old_postinstall_cmds='chmod 644 $oldlib'
 
5557
old_postuninstall_cmds=
 
5558
 
 
5559
if test -n "$RANLIB"; then
 
5560
  case $host_os in
 
5561
  openbsd*)
 
5562
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
5563
    ;;
 
5564
  *)
 
5565
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
5566
    ;;
 
5567
  esac
 
5568
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
5569
fi
 
5570
 
 
5571
# Only perform the check for file, if the check method requires it
 
5572
case $deplibs_check_method in
 
5573
file_magic*)
 
5574
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
5575
    AC_PATH_MAGIC
 
5576
  fi
 
5577
  ;;
 
5578
esac
 
5579
 
 
5580
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
5581
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
5582
enable_win32_dll=yes, enable_win32_dll=no)
 
5583
 
 
5584
AC_ARG_ENABLE([libtool-lock],
 
5585
    [AC_HELP_STRING([--disable-libtool-lock],
 
5586
        [avoid locking (might break parallel builds)])])
 
5587
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
5588
 
 
5589
AC_ARG_WITH([pic],
 
5590
    [AC_HELP_STRING([--with-pic],
 
5591
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
5592
    [pic_mode="$withval"],
 
5593
    [pic_mode=default])
 
5594
test -z "$pic_mode" && pic_mode=default
 
5595
 
 
5596
# Use C for the default configuration in the libtool script
 
5597
tagname=
 
5598
AC_LIBTOOL_LANG_C_CONFIG
 
5599
_LT_AC_TAGCONFIG
 
5600
])# AC_LIBTOOL_SETUP
 
5601
 
 
5602
 
 
5603
# _LT_AC_SYS_COMPILER
 
5604
# -------------------
 
5605
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
5606
[AC_REQUIRE([AC_PROG_CC])dnl
 
5607
 
 
5608
# If no C compiler was specified, use CC.
 
5609
LTCC=${LTCC-"$CC"}
 
5610
 
 
5611
# Allow CC to be a program name with arguments.
 
5612
set dummy $CC
 
5613
compiler="[$]2"
 
5614
])# _LT_AC_SYS_COMPILER
 
5615
 
 
5616
 
 
5617
# _LT_AC_SYS_LIBPATH_AIX
 
5618
# ----------------------
 
5619
# Links a minimal program and checks the executable
 
5620
# for the system default hardcoded library path. In most cases,
 
5621
# this is /usr/lib:/lib, but when the MPI compilers are used
 
5622
# the location of the communication and MPI libs are included too.
 
5623
# If we don't find anything, use the default library path according
 
5624
# to the aix ld manual.
 
5625
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
5626
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
5627
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
5628
}'`
 
5629
# Check for a 64-bit object if we didn't find anything.
 
5630
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; }
 
5631
}'`; fi],[])
 
5632
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
5633
])# _LT_AC_SYS_LIBPATH_AIX
 
5634
 
 
5635
 
 
5636
# _LT_AC_PROG_ECHO_BACKSLASH
 
5637
# --------------------------
 
5638
# Add some code to the start of the generated configure script which
 
5639
# will find an echo command which doesn't interpret backslashes.
 
5640
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
 
5641
[ifdef([AC_DIVERSION_NOTICE],
 
5642
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
5643
         [AC_DIVERT_PUSH(NOTICE)])
 
5644
 
 
5645
# Check that we are running under the correct shell.
 
5646
SHELL=${CONFIG_SHELL-/bin/sh}
 
5647
 
 
5648
case X$ECHO in
 
5649
X*--fallback-echo)
 
5650
  # Remove one level of quotation (which was required for Make).
 
5651
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
5652
  ;;
 
5653
esac
 
5654
 
 
5655
echo=${ECHO-echo}
 
5656
if test "X[$]1" = X--no-reexec; then
 
5657
  # Discard the --no-reexec flag, and continue.
 
5658
  shift
 
5659
elif test "X[$]1" = X--fallback-echo; then
 
5660
  # Avoid inline document here, it may be left over
 
5661
  :
 
5662
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
 
5663
  # Yippee, $echo works!
 
5664
  :
 
5665
else
 
5666
  # Restart under the correct shell.
 
5667
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
5668
fi
 
5669
 
 
5670
if test "X[$]1" = X--fallback-echo; then
 
5671
  # used as fallback echo
 
5672
  shift
 
5673
  cat <<EOF
 
5674
[$]*
 
5675
EOF
 
5676
  exit 0
 
5677
fi
 
5678
 
 
5679
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
5680
# if CDPATH is set.
 
5681
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
5682
 
 
5683
if test -z "$ECHO"; then
 
5684
if test "X${echo_test_string+set}" != Xset; then
 
5685
# find a string as large as possible, as long as the shell can cope with it
 
5686
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
5687
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
5688
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
 
5689
       echo_test_string="`eval $cmd`" &&
 
5690
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
 
5691
    then
 
5692
      break
 
5693
    fi
 
5694
  done
 
5695
fi
 
5696
 
 
5697
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
5698
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
5699
   test "X$echo_testing_string" = "X$echo_test_string"; then
 
5700
  :
 
5701
else
 
5702
  # The Solaris, AIX, and Digital Unix default echo programs unquote
 
5703
  # backslashes.  This makes it impossible to quote backslashes using
 
5704
  #   echo "$something" | sed 's/\\/\\\\/g'
 
5705
  #
 
5706
  # So, first we look for a working echo in the user's PATH.
 
5707
 
 
5708
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
5709
  for dir in $PATH /usr/ucb; do
 
5710
    IFS="$lt_save_ifs"
 
5711
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
5712
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
5713
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
5714
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
5715
      echo="$dir/echo"
 
5716
      break
 
5717
    fi
 
5718
  done
 
5719
  IFS="$lt_save_ifs"
 
5720
 
 
5721
  if test "X$echo" = Xecho; then
 
5722
    # We didn't find a better echo, so look for alternatives.
 
5723
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
 
5724
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
 
5725
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
5726
      # This shell has a builtin print -r that does the trick.
 
5727
      echo='print -r'
 
5728
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
 
5729
         test "X$CONFIG_SHELL" != X/bin/ksh; then
 
5730
      # If we have ksh, try running configure again with it.
 
5731
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
5732
      export ORIGINAL_CONFIG_SHELL
 
5733
      CONFIG_SHELL=/bin/ksh
 
5734
      export CONFIG_SHELL
 
5735
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
5736
    else
 
5737
      # Try using printf.
 
5738
      echo='printf %s\n'
 
5739
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
5740
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
5741
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
5742
        # Cool, printf works
 
5743
        :
 
5744
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
5745
           test "X$echo_testing_string" = 'X\t' &&
 
5746
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
5747
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
5748
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
5749
        export CONFIG_SHELL
 
5750
        SHELL="$CONFIG_SHELL"
 
5751
        export SHELL
 
5752
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
5753
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
5754
           test "X$echo_testing_string" = 'X\t' &&
 
5755
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
5756
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
5757
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
5758
      else
 
5759
        # maybe with a smaller string...
 
5760
        prev=:
 
5761
 
 
5762
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
5763
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
 
5764
          then
 
5765
            break
 
5766
          fi
 
5767
          prev="$cmd"
 
5768
        done
 
5769
 
 
5770
        if test "$prev" != 'sed 50q "[$]0"'; then
 
5771
          echo_test_string=`eval $prev`
 
5772
          export echo_test_string
 
5773
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
5774
        else
 
5775
          # Oops.  We lost completely, so just stick with echo.
 
5776
          echo=echo
 
5777
        fi
 
5778
      fi
 
5779
    fi
 
5780
  fi
 
5781
fi
 
5782
fi
 
5783
 
 
5784
# Copy echo and quote the copy suitably for passing to libtool from
 
5785
# the Makefile, instead of quoting the original, which is used later.
 
5786
ECHO=$echo
 
5787
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
5788
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
5789
fi
 
5790
 
 
5791
AC_SUBST(ECHO)
 
5792
AC_DIVERT_POP
 
5793
])# _LT_AC_PROG_ECHO_BACKSLASH
 
5794
 
 
5795
 
 
5796
# _LT_AC_LOCK
 
5797
# -----------
 
5798
AC_DEFUN([_LT_AC_LOCK],
 
5799
[AC_ARG_ENABLE([libtool-lock],
 
5800
    [AC_HELP_STRING([--disable-libtool-lock],
 
5801
        [avoid locking (might break parallel builds)])])
 
5802
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
5803
 
 
5804
# Some flags need to be propagated to the compiler or linker for good
 
5805
# libtool support.
 
5806
case $host in
 
5807
ia64-*-hpux*)
 
5808
  # Find out which ABI we are using.
 
5809
  echo 'int i;' > conftest.$ac_ext
 
5810
  if AC_TRY_EVAL(ac_compile); then
 
5811
    case `/usr/bin/file conftest.$ac_objext` in
 
5812
    *ELF-32*)
 
5813
      HPUX_IA64_MODE="32"
 
5814
      ;;
 
5815
    *ELF-64*)
 
5816
      HPUX_IA64_MODE="64"
 
5817
      ;;
 
5818
    esac
 
5819
  fi
 
5820
  rm -rf conftest*
 
5821
  ;;
 
5822
*-*-irix6*)
 
5823
  # Find out which ABI we are using.
 
5824
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
5825
  if AC_TRY_EVAL(ac_compile); then
 
5826
    case `/usr/bin/file conftest.$ac_objext` in
 
5827
    *32-bit*)
 
5828
      LD="${LD-ld} -32"
 
5829
      ;;
 
5830
    *N32*)
 
5831
      LD="${LD-ld} -n32"
 
5832
      ;;
 
5833
    *64-bit*)
 
5834
      LD="${LD-ld} -64"
 
5835
      ;;
 
5836
    esac
 
5837
  fi
 
5838
  rm -rf conftest*
 
5839
  ;;
 
5840
 
 
5841
*-*-linux*)
 
5842
  # Test if the compiler is 64bit
 
5843
  echo 'int i;' > conftest.$ac_ext
 
5844
  if AC_TRY_EVAL(ac_compile); then
 
5845
    case `/usr/bin/file conftest.$ac_objext` in
 
5846
    *"ELF 32"*)
 
5847
      LINUX_64_MODE="32"
 
5848
      ;;
 
5849
    *"ELF 64"*)
 
5850
      LINUX_64_MODE="64"
 
5851
      ;;
 
5852
    esac
 
5853
  fi
 
5854
  rm -rf conftest*
 
5855
  ;;
 
5856
  
 
5857
*-*-sco3.2v5*)
 
5858
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
5859
  SAVE_CFLAGS="$CFLAGS"
 
5860
  CFLAGS="$CFLAGS -belf"
 
5861
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
5862
    [AC_LANG_PUSH(C)
 
5863
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
5864
     AC_LANG_POP])
 
5865
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
5866
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
5867
    CFLAGS="$SAVE_CFLAGS"
 
5868
  fi
 
5869
  ;;
 
5870
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
5871
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
 
5872
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
5873
  AC_CHECK_TOOL(AS, as, false)
 
5874
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
5875
 
 
5876
  # recent cygwin and mingw systems supply a stub DllMain which the user
 
5877
  # can override, but on older systems we have to supply one
 
5878
  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
 
5879
    [AC_TRY_LINK([],
 
5880
      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
 
5881
      DllMain (0, 0, 0);],
 
5882
      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
 
5883
 
 
5884
  case $host/$CC in
 
5885
  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
 
5886
    # old mingw systems require "-dll" to link a DLL, while more recent ones
 
5887
    # require "-mdll"
 
5888
    SAVE_CFLAGS="$CFLAGS"
 
5889
    CFLAGS="$CFLAGS -mdll"
 
5890
    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
 
5891
      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
 
5892
    CFLAGS="$SAVE_CFLAGS" ;;
 
5893
  *-*-cygwin* | *-*-pw32*)
 
5894
    # cygwin systems need to pass --dll to the linker, and not link
 
5895
    # crt.o which will require a WinMain@16 definition.
 
5896
    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
 
5897
  esac
 
5898
  ;;
 
5899
  ])
 
5900
esac
 
5901
 
 
5902
need_locks="$enable_libtool_lock"
 
5903
 
 
5904
])# _LT_AC_LOCK
 
5905
 
 
5906
 
 
5907
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
5908
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
5909
# ----------------------------------------------------------------
 
5910
# Check whether the given compiler option works
 
5911
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
5912
[AC_CACHE_CHECK([$1], [$2],
 
5913
  [$2=no
 
5914
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
5915
   save_CFLAGS="$CFLAGS"
 
5916
   CFLAGS="$CFLAGS $3"
 
5917
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
5918
   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
 
5919
     # The compiler can only warn and ignore the option if not recognized
 
5920
     # So say no if there are warnings
 
5921
     if test -s conftest.err; then
 
5922
       # Append any errors to the config.log.
 
5923
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
5924
     else
 
5925
       $2=yes
 
5926
     fi
 
5927
   fi
 
5928
   $rm conftest*
 
5929
   CFLAGS="$save_CFLAGS"
 
5930
])
 
5931
 
 
5932
if test x"[$]$2" = xyes; then
 
5933
    ifelse([$5], , :, [$5])
 
5934
else
 
5935
    ifelse([$6], , :, [$6])
 
5936
fi
 
5937
])# AC_LIBTOOL_COMPILER_OPTION
 
5938
 
 
5939
 
 
5940
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
5941
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
5942
# ------------------------------------------------------------
 
5943
# Check whether the given compiler option works
 
5944
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
5945
[AC_CACHE_CHECK([$1], [$2],
 
5946
  [$2=no
 
5947
   save_LDFLAGS="$LDFLAGS"
 
5948
   LDFLAGS="$LDFLAGS $3"
 
5949
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
 
5950
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
5951
     # The compiler can only warn and ignore the option if not recognized
 
5952
     # So say no if there are warnings
 
5953
     if test -s conftest.err; then
 
5954
       # Append any errors to the config.log.
 
5955
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
5956
     else
 
5957
       $2=yes
 
5958
     fi
 
5959
   fi
 
5960
   $rm conftest*
 
5961
   LDFLAGS="$save_LDFLAGS"
 
5962
])
 
5963
 
 
5964
if test x"[$]$2" = xyes; then
 
5965
    ifelse([$4], , :, [$4])
 
5966
else
 
5967
    ifelse([$5], , :, [$5])
 
5968
fi
 
5969
])# AC_LIBTOOL_LINKER_OPTION
 
5970
 
 
5971
 
 
5972
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
5973
# --------------------------
 
5974
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
5975
[# find the maximum length of command line arguments
 
5976
AC_MSG_CHECKING([the maximum length of command line arguments])
 
5977
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
5978
  i=0
 
5979
  testring="ABCD"
 
5980
 
 
5981
  case $host_os in
 
5982
  msdosdjgpp*)
 
5983
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
5984
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
5985
    # during glob expansion).  Even if it were fixed, the result of this
 
5986
    # check would be larger than it should be.
 
5987
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
5988
    ;;
 
5989
 
 
5990
  gnu*)
 
5991
    # Under GNU Hurd, this test is not required because there is
 
5992
    # no limit to the length of command line arguments.
 
5993
    # Libtool will interpret -1 as no limit whatsoever
 
5994
    lt_cv_sys_max_cmd_len=-1;
 
5995
    ;;
 
5996
 
 
5997
  *)
 
5998
    # If test is not a shell built-in, we'll probably end up computing a
 
5999
    # maximum length that is only half of the actual maximum length, but
 
6000
    # we can't tell.
 
6001
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
 
6002
               = "XX$testring") >/dev/null 2>&1 &&
 
6003
            new_result=`expr "X$testring" : ".*" 2>&1` &&
 
6004
            lt_cv_sys_max_cmd_len=$new_result &&
 
6005
            test $i != 17 # 1/2 MB should be enough
 
6006
    do
 
6007
      i=`expr $i + 1`
 
6008
      testring=$testring$testring
 
6009
    done
 
6010
    testring=
 
6011
    # Add a significant safety factor because C++ compilers can tack on massive
 
6012
    # amounts of additional arguments before passing them to the linker.
 
6013
    # It appears as though 1/2 is a usable value.
 
6014
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
6015
    ;;
 
6016
  esac
 
6017
])
 
6018
if test -n $lt_cv_sys_max_cmd_len ; then
 
6019
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
6020
else
 
6021
  AC_MSG_RESULT(none)
 
6022
fi
 
6023
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
6024
 
 
6025
 
 
6026
# _LT_AC_CHECK_DLFCN
 
6027
# --------------------
 
6028
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
6029
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
6030
])# _LT_AC_CHECK_DLFCN
 
6031
 
 
6032
 
 
6033
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
6034
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
6035
# ------------------------------------------------------------------
 
6036
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 
6037
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6038
if test "$cross_compiling" = yes; then :
 
6039
  [$4]
 
6040
else
 
6041
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
6042
  lt_status=$lt_dlunknown
 
6043
  cat > conftest.$ac_ext <<EOF
 
6044
[#line __oline__ "configure"
 
6045
#include "confdefs.h"
 
6046
 
 
6047
#if HAVE_DLFCN_H
 
6048
#include <dlfcn.h>
 
6049
#endif
 
6050
 
 
6051
#include <stdio.h>
 
6052
 
 
6053
#ifdef RTLD_GLOBAL
 
6054
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
6055
#else
 
6056
#  ifdef DL_GLOBAL
 
6057
#    define LT_DLGLOBAL         DL_GLOBAL
 
6058
#  else
 
6059
#    define LT_DLGLOBAL         0
 
6060
#  endif
 
6061
#endif
 
6062
 
 
6063
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
6064
   find out it does not work in some platform. */
 
6065
#ifndef LT_DLLAZY_OR_NOW
 
6066
#  ifdef RTLD_LAZY
 
6067
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
6068
#  else
 
6069
#    ifdef DL_LAZY
 
6070
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
6071
#    else
 
6072
#      ifdef RTLD_NOW
 
6073
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
6074
#      else
 
6075
#        ifdef DL_NOW
 
6076
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
6077
#        else
 
6078
#          define LT_DLLAZY_OR_NOW      0
 
6079
#        endif
 
6080
#      endif
 
6081
#    endif
 
6082
#  endif
 
6083
#endif
 
6084
 
 
6085
#ifdef __cplusplus
 
6086
extern "C" void exit (int);
 
6087
#endif
 
6088
 
 
6089
void fnord() { int i=42;}
 
6090
int main ()
 
6091
{
 
6092
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
6093
  int status = $lt_dlunknown;
 
6094
 
 
6095
  if (self)
 
6096
    {
 
6097
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
6098
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
6099
      /* dlclose (self); */
 
6100
    }
 
6101
 
 
6102
    exit (status);
 
6103
}]
 
6104
EOF
 
6105
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
6106
    (./conftest; exit; ) 2>/dev/null
 
6107
    lt_status=$?
 
6108
    case x$lt_status in
 
6109
      x$lt_dlno_uscore) $1 ;;
 
6110
      x$lt_dlneed_uscore) $2 ;;
 
6111
      x$lt_unknown|x*) $3 ;;
 
6112
    esac
 
6113
  else :
 
6114
    # compilation failed
 
6115
    $3
 
6116
  fi
 
6117
fi
 
6118
rm -fr conftest*
 
6119
])# _LT_AC_TRY_DLOPEN_SELF
 
6120
 
 
6121
 
 
6122
# AC_LIBTOOL_DLOPEN_SELF
 
6123
# -------------------
 
6124
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 
6125
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
6126
if test "x$enable_dlopen" != xyes; then
 
6127
  enable_dlopen=unknown
 
6128
  enable_dlopen_self=unknown
 
6129
  enable_dlopen_self_static=unknown
 
6130
else
 
6131
  lt_cv_dlopen=no
 
6132
  lt_cv_dlopen_libs=
 
6133
 
 
6134
  case $host_os in
 
6135
  beos*)
 
6136
    lt_cv_dlopen="load_add_on"
 
6137
    lt_cv_dlopen_libs=
 
6138
    lt_cv_dlopen_self=yes
 
6139
    ;;
 
6140
 
 
6141
  cygwin* | mingw* | pw32*)
 
6142
    lt_cv_dlopen="LoadLibrary"
 
6143
    lt_cv_dlopen_libs=
 
6144
   ;;
 
6145
 
 
6146
  *)
 
6147
    AC_CHECK_FUNC([shl_load],
 
6148
          [lt_cv_dlopen="shl_load"],
 
6149
      [AC_CHECK_LIB([dld], [shl_load],
 
6150
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
6151
        [AC_CHECK_FUNC([dlopen],
 
6152
              [lt_cv_dlopen="dlopen"],
 
6153
          [AC_CHECK_LIB([dl], [dlopen],
 
6154
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
6155
            [AC_CHECK_LIB([svld], [dlopen],
 
6156
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
6157
              [AC_CHECK_LIB([dld], [dld_link],
 
6158
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
6159
              ])
 
6160
            ])
 
6161
          ])
 
6162
        ])
 
6163
      ])
 
6164
    ;;
 
6165
  esac
 
6166
 
 
6167
  if test "x$lt_cv_dlopen" != xno; then
 
6168
    enable_dlopen=yes
 
6169
  else
 
6170
    enable_dlopen=no
 
6171
  fi
 
6172
 
 
6173
  case $lt_cv_dlopen in
 
6174
  dlopen)
 
6175
    save_CPPFLAGS="$CPPFLAGS"
 
6176
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
6177
 
 
6178
    save_LDFLAGS="$LDFLAGS"
 
6179
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
6180
 
 
6181
    save_LIBS="$LIBS"
 
6182
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
6183
 
 
6184
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
6185
          lt_cv_dlopen_self, [dnl
 
6186
          _LT_AC_TRY_DLOPEN_SELF(
 
6187
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
6188
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
6189
    ])
 
6190
 
 
6191
    if test "x$lt_cv_dlopen_self" = xyes; then
 
6192
      LDFLAGS="$LDFLAGS $link_static_flag"
 
6193
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
6194
          lt_cv_dlopen_self_static, [dnl
 
6195
          _LT_AC_TRY_DLOPEN_SELF(
 
6196
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
6197
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
6198
      ])
 
6199
    fi
 
6200
 
 
6201
    CPPFLAGS="$save_CPPFLAGS"
 
6202
    LDFLAGS="$save_LDFLAGS"
 
6203
    LIBS="$save_LIBS"
 
6204
    ;;
 
6205
  esac
 
6206
 
 
6207
  case $lt_cv_dlopen_self in
 
6208
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
6209
  *) enable_dlopen_self=unknown ;;
 
6210
  esac
 
6211
 
 
6212
  case $lt_cv_dlopen_self_static in
 
6213
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
6214
  *) enable_dlopen_self_static=unknown ;;
 
6215
  esac
 
6216
fi
 
6217
])# AC_LIBTOOL_DLOPEN_SELF
 
6218
 
 
6219
 
 
6220
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
6221
# ---------------------------------
 
6222
# Check to see if options -c and -o are simultaneously supported by compiler
 
6223
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
6224
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
6225
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
6226
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
6227
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
6228
   $rm -r conftest 2>/dev/null
 
6229
   mkdir conftest
 
6230
   cd conftest
 
6231
   mkdir out
 
6232
   ifelse([$1],[],[save_CFLAGS="$CFLAGS"
 
6233
                   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
 
6234
          [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
 
6235
                   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
 
6236
          [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
 
6237
                   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
 
6238
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6239
 
 
6240
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
 
6241
   # that will create temporary files in the current directory regardless of
 
6242
   # the output directory.  Thus, making CWD read-only will cause this test
 
6243
   # to fail, enabling locking or at least warning the user not to do parallel
 
6244
   # builds.
 
6245
   chmod -w .
 
6246
 
 
6247
   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
 
6248
   then
 
6249
     # The compiler can only warn and ignore the option if not recognized
 
6250
     # So say no if there are warnings
 
6251
     if test -s out/conftest.err; then
 
6252
       # Append any errors to the config.log.
 
6253
       cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
 
6254
     else
 
6255
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
6256
     fi
 
6257
   fi
 
6258
   ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
 
6259
          [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
 
6260
          [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
 
6261
   chmod u+w .
 
6262
   $rm conftest* out/*
 
6263
   rmdir out
 
6264
   cd ..
 
6265
   rmdir conftest
 
6266
   $rm conftest*
 
6267
])
 
6268
])# AC_LIBTOOL_PROG_CC_C_O
 
6269
 
 
6270
 
 
6271
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
6272
# -----------------------------------------
 
6273
# Check to see if we can do hard links to lock some files if needed
 
6274
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
6275
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
6276
 
 
6277
hard_links="nottested"
 
6278
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
6279
  # do not overwrite the value of need_locks provided by the user
 
6280
  AC_MSG_CHECKING([if we can lock with hard links])
 
6281
  hard_links=yes
 
6282
  $rm conftest*
 
6283
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
6284
  touch conftest.a
 
6285
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
6286
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
6287
  AC_MSG_RESULT([$hard_links])
 
6288
  if test "$hard_links" = no; then
 
6289
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
6290
    need_locks=warn
 
6291
  fi
 
6292
else
 
6293
  need_locks=no
 
6294
fi
 
6295
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
6296
 
 
6297
 
 
6298
# AC_LIBTOOL_OBJDIR
 
6299
# -----------------
 
6300
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
6301
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
6302
[rm -f .libs 2>/dev/null
 
6303
mkdir .libs 2>/dev/null
 
6304
if test -d .libs; then
 
6305
  lt_cv_objdir=.libs
 
6306
else
 
6307
  # MS-DOS does not allow filenames that begin with a dot.
 
6308
  lt_cv_objdir=_libs
 
6309
fi
 
6310
rmdir .libs 2>/dev/null])
 
6311
objdir=$lt_cv_objdir
 
6312
])# AC_LIBTOOL_OBJDIR
 
6313
 
 
6314
 
 
6315
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
6316
# ----------------------------------------------
 
6317
# Check hardcoding attributes.
 
6318
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
6319
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
6320
_LT_AC_TAGVAR(hardcode_action, $1)=
 
6321
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
6322
   test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
 
6323
 
 
6324
  # We can hardcode non-existant directories.
 
6325
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
 
6326
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
6327
     # have to relink, otherwise we might link with an installed library
 
6328
     # when we should be linking with a yet-to-be-installed one
 
6329
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
6330
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
 
6331
    # Linking always hardcodes the temporary library directory.
 
6332
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
 
6333
  else
 
6334
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
6335
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
 
6336
  fi
 
6337
else
 
6338
  # We cannot hardcode anything, or else we can only hardcode existing
 
6339
  # directories.
 
6340
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
6341
fi
 
6342
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
6343
 
 
6344
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
6345
  # Fast installation is not supported
 
6346
  enable_fast_install=no
 
6347
elif test "$shlibpath_overrides_runpath" = yes ||
 
6348
     test "$enable_shared" = no; then
 
6349
  # Fast installation is not necessary
 
6350
  enable_fast_install=needless
 
6351
fi
 
6352
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
6353
 
 
6354
 
 
6355
# AC_LIBTOOL_SYS_LIB_STRIP
 
6356
# ------------------------
 
6357
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
6358
[striplib=
 
6359
old_striplib=
 
6360
AC_MSG_CHECKING([whether stripping libraries is possible])
 
6361
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 
6362
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
6363
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
6364
  AC_MSG_RESULT([yes])
 
6365
else
 
6366
  AC_MSG_RESULT([no])
 
6367
fi
 
6368
])# AC_LIBTOOL_SYS_LIB_STRIP
 
6369
 
 
6370
 
 
6371
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
6372
# -----------------------------
 
6373
# PORTME Fill in your ld.so characteristics
 
6374
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
6375
[AC_MSG_CHECKING([dynamic linker characteristics])
 
6376
library_names_spec=
 
6377
libname_spec='lib$name'
 
6378
soname_spec=
 
6379
postinstall_cmds=
 
6380
postuninstall_cmds=
 
6381
finish_cmds=
 
6382
finish_eval=
 
6383
shlibpath_var=
 
6384
shlibpath_overrides_runpath=unknown
 
6385
version_type=none
 
6386
dynamic_linker="$host_os ld.so"
 
6387
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
6388
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
6389
need_lib_prefix=unknown
 
6390
hardcode_into_libs=no
 
6391
 
 
6392
# when you set need_version to no, make sure it does not cause -set_version
 
6393
# flags to be left without arguments
 
6394
need_version=unknown
 
6395
 
 
6396
case $host_os in
 
6397
aix3*)
 
6398
  version_type=linux
 
6399
  library_names_spec='${libname}${release}.so$versuffix $libname.a'
 
6400
  shlibpath_var=LIBPATH
 
6401
 
 
6402
  # AIX 3 has no versioning support, so we append a major version to the name.
 
6403
  soname_spec='${libname}${release}.so$major'
 
6404
  ;;
 
6405
 
 
6406
aix4* | aix5*)
 
6407
  version_type=linux
 
6408
  if test "$host_cpu" = ia64; then
 
6409
    # AIX 5 supports IA64
 
6410
    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
 
6411
    shlibpath_var=LD_LIBRARY_PATH
 
6412
  else
 
6413
    # With GCC up to 2.95.x, collect2 would create an import file
 
6414
    # for dependence libraries.  The import file would start with
 
6415
    # the line `#! .'.  This would cause the generated library to
 
6416
    # depend on `.', always an invalid library.  This was fixed in
 
6417
    # development snapshots of GCC prior to 3.0.
 
6418
    case $host_os in
 
6419
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
6420
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
6421
           echo ' yes '
 
6422
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
6423
        :
 
6424
      else
 
6425
        can_build_shared=no
 
6426
      fi
 
6427
      ;;
 
6428
    esac
 
6429
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
6430
    # soname into executable. Probably we can add versioning support to
 
6431
    # collect2, so additional links can be useful in future.
 
6432
    if test "$aix_use_runtimelinking" = yes; then
 
6433
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
6434
      # instead of lib<name>.a to let people know that these are not
 
6435
      # typical AIX shared libraries.
 
6436
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6437
    else
 
6438
      # We preserve .a as extension for shared libraries through AIX4.2
 
6439
      # and later when we are not doing run time linking.
 
6440
      library_names_spec='${libname}${release}.a $libname.a'
 
6441
      soname_spec='${libname}${release}.so$major'
 
6442
    fi
 
6443
    shlibpath_var=LIBPATH
 
6444
  fi
 
6445
  ;;
 
6446
 
 
6447
amigaos*)
 
6448
  library_names_spec='$libname.ixlibrary $libname.a'
 
6449
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
6450
  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'
 
6451
  ;;
 
6452
 
 
6453
beos*)
 
6454
  library_names_spec='${libname}.so'
 
6455
  dynamic_linker="$host_os ld.so"
 
6456
  shlibpath_var=LIBRARY_PATH
 
6457
  ;;
 
6458
 
 
6459
bsdi4*)
 
6460
  version_type=linux
 
6461
  need_version=no
 
6462
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6463
  soname_spec='${libname}${release}.so$major'
 
6464
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
6465
  shlibpath_var=LD_LIBRARY_PATH
 
6466
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
6467
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
6468
  # the default ld.so.conf also contains /usr/contrib/lib and
 
6469
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
6470
  # libtool to hard-code these into programs
 
6471
  ;;
 
6472
 
 
6473
cygwin* | mingw* | pw32*)
 
6474
  version_type=windows
 
6475
  need_version=no
 
6476
  need_lib_prefix=no
 
6477
  case $GCC,$host_os in
 
6478
  yes,cygwin*)
 
6479
    library_names_spec='$libname.dll.a'
 
6480
    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
 
6481
    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
 
6482
    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
 
6483
      dldir=$destdir/`dirname \$dlpath`~
 
6484
      test -d \$dldir || mkdir -p \$dldir~
 
6485
      $install_prog .libs/$dlname \$dldir/$dlname'
 
6486
    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
6487
      dlpath=$dir/\$dldll~
 
6488
       $rm \$dlpath'
 
6489
    ;;
 
6490
  yes,mingw*)
 
6491
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
 
6492
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
 
6493
    if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
 
6494
      # It is most probably a Windows format PATH printed by
 
6495
      # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
6496
      # path with ; separators, and with drive letters. We can handle the
 
6497
      # drive letters (cygwin fileutils understands them), so leave them,
 
6498
      # especially as we might pass files found there to a mingw objdump,
 
6499
      # which wouldn't understand a cygwinified path. Ahh.
 
6500
      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
 
6501
    else
 
6502
      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
 
6503
    fi
 
6504
    ;;
 
6505
  yes,pw32*)
 
6506
    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
 
6507
    ;;
 
6508
  *)
 
6509
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
 
6510
    ;;
 
6511
  esac
 
6512
  dynamic_linker='Win32 ld.exe'
 
6513
  # FIXME: first we should search . and the directory the executable is in
 
6514
  shlibpath_var=PATH
 
6515
  ;;
 
6516
 
 
6517
darwin* | rhapsody*)
 
6518
  dynamic_linker="$host_os dyld"
 
6519
  version_type=darwin
 
6520
  need_lib_prefix=no
 
6521
  need_version=no
 
6522
  # FIXME: Relying on posixy $() will cause problems for
 
6523
  #        cross-compilation, but unfortunately the echo tests do not
 
6524
  #        yet detect zsh echo's removal of \ escapes.
 
6525
  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
 
6526
  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
 
6527
  shlibpath_overrides_runpath=yes
 
6528
  shlibpath_var=DYLD_LIBRARY_PATH
 
6529
  ;;
 
6530
 
 
6531
dgux*)
 
6532
  version_type=linux
 
6533
  need_lib_prefix=no
 
6534
  need_version=no
 
6535
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6536
  soname_spec='${libname}${release}.so$major'
 
6537
  shlibpath_var=LD_LIBRARY_PATH
 
6538
  ;;
 
6539
 
 
6540
freebsd1*)
 
6541
  dynamic_linker=no
 
6542
  ;;
 
6543
 
 
6544
freebsd*)
 
6545
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
6546
  version_type=freebsd-$objformat
 
6547
  case $version_type in
 
6548
    freebsd-elf*)
 
6549
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
6550
      need_version=no
 
6551
      need_lib_prefix=no
 
6552
      ;;
 
6553
    freebsd-*)
 
6554
      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
 
6555
      need_version=yes
 
6556
      ;;
 
6557
  esac
 
6558
  shlibpath_var=LD_LIBRARY_PATH
 
6559
  case $host_os in
 
6560
  freebsd2*)
 
6561
    shlibpath_overrides_runpath=yes
 
6562
    ;;
 
6563
  freebsd3.[01]* | freebsdelf3.[01]*)
 
6564
    shlibpath_overrides_runpath=yes
 
6565
    hardcode_into_libs=yes
 
6566
    ;;
 
6567
  *) # from 3.2 on
 
6568
    shlibpath_overrides_runpath=no
 
6569
    hardcode_into_libs=yes
 
6570
    ;;
 
6571
  esac
 
6572
  ;;
 
6573
 
 
6574
gnu*)
 
6575
  version_type=linux
 
6576
  need_lib_prefix=no
 
6577
  need_version=no
 
6578
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
 
6579
  soname_spec='${libname}${release}.so$major'
 
6580
  shlibpath_var=LD_LIBRARY_PATH
 
6581
  hardcode_into_libs=yes
 
6582
  ;;
 
6583
 
 
6584
hpux9* | hpux10* | hpux11*)
 
6585
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
6586
  # link against other versions.
 
6587
  version_type=sunos
 
6588
  need_lib_prefix=no
 
6589
  need_version=no
 
6590
  if test "$host_cpu" = ia64; then
 
6591
    hardcode_into_libs=yes
 
6592
    dynamic_linker="$host_os dld.so"
 
6593
    shlibpath_var=LD_LIBRARY_PATH
 
6594
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
6595
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6596
    soname_spec='${libname}${release}.so$major'
 
6597
    if test "X$HPUX_IA64_MODE" = X32; then
 
6598
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
6599
    else
 
6600
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
6601
    fi
 
6602
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
6603
  else
 
6604
    dynamic_linker="$host_os dld.sl"
 
6605
    shlibpath_var=SHLIB_PATH
 
6606
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
6607
    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
 
6608
    soname_spec='${libname}${release}.sl$major'
 
6609
  fi
 
6610
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
6611
  postinstall_cmds='chmod 555 $lib'
 
6612
  ;;
 
6613
 
 
6614
irix5* | irix6* | nonstopux*)
 
6615
  case $host_os in
 
6616
    nonstopux*) version_type=nonstopux ;;
 
6617
    *)          version_type=irix ;;
 
6618
  esac
 
6619
  need_lib_prefix=no
 
6620
  need_version=no
 
6621
  soname_spec='${libname}${release}.so$major'
 
6622
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
 
6623
  case $host_os in
 
6624
  irix5* | nonstopux*)
 
6625
    libsuff= shlibsuff=
 
6626
    ;;
 
6627
  *)
 
6628
    case $LD in # libtool.m4 will add one of these switches to LD
 
6629
    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
 
6630
    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
 
6631
    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
6632
    *) libsuff= shlibsuff= libmagic=never-match;;
 
6633
    esac
 
6634
    ;;
 
6635
  esac
 
6636
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
6637
  shlibpath_overrides_runpath=no
 
6638
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
6639
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
6640
  ;;
 
6641
 
 
6642
# No shared lib support for Linux oldld, aout, or coff.
 
6643
linux*oldld* | linux*aout* | linux*coff*)
 
6644
  dynamic_linker=no
 
6645
  ;;
 
6646
 
 
6647
# This must be Linux ELF.
 
6648
linux*)
 
6649
  version_type=linux
 
6650
  need_lib_prefix=no
 
6651
  need_version=no
 
6652
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6653
  soname_spec='${libname}${release}.so$major'
 
6654
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
6655
  libsuff=
 
6656
  if test "x$LINUX_64_MODE" = x64; then
 
6657
    # Some platforms are per default 64-bit, so there's no /lib64
 
6658
    if test -d /lib64; then
 
6659
      libsuff=64
 
6660
    fi
 
6661
  fi
 
6662
  shlibpath_var=LD_LIBRARY_PATH
 
6663
  shlibpath_overrides_runpath=no
 
6664
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
 
6665
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
 
6666
  # This implies no fast_install, which is unacceptable.
 
6667
  # Some rework will be needed to allow for fast_install
 
6668
  # before this can be enabled.
 
6669
  hardcode_into_libs=yes
 
6670
 
 
6671
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
6672
  # powerpc, because MkLinux only supported shared libraries with the
 
6673
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
6674
  # most powerpc-linux boxes support dynamic linking these days and
 
6675
  # people can always --disable-shared, the test was removed, and we
 
6676
  # assume the GNU/Linux dynamic linker is in use.
 
6677
  dynamic_linker='GNU/Linux ld.so'
 
6678
  ;;
 
6679
 
 
6680
netbsd*)
 
6681
  version_type=sunos
 
6682
  need_lib_prefix=no
 
6683
  need_version=no
 
6684
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
6685
    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
6686
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
6687
    dynamic_linker='NetBSD (a.out) ld.so'
 
6688
  else
 
6689
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
 
6690
    soname_spec='${libname}${release}.so$major'
 
6691
    dynamic_linker='NetBSD ld.elf_so'
 
6692
  fi
 
6693
  shlibpath_var=LD_LIBRARY_PATH
 
6694
  shlibpath_overrides_runpath=yes
 
6695
  hardcode_into_libs=yes
 
6696
  ;;
 
6697
 
 
6698
newsos6)
 
6699
  version_type=linux
 
6700
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6701
  shlibpath_var=LD_LIBRARY_PATH
 
6702
  shlibpath_overrides_runpath=yes
 
6703
  ;;
 
6704
 
 
6705
nto-qnx)
 
6706
  version_type=linux
 
6707
  need_lib_prefix=no
 
6708
  need_version=no
 
6709
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6710
  soname_spec='${libname}${release}.so$major'
 
6711
  shlibpath_var=LD_LIBRARY_PATH
 
6712
  shlibpath_overrides_runpath=yes
 
6713
  ;;
 
6714
 
 
6715
openbsd*)
 
6716
  version_type=sunos
 
6717
  need_lib_prefix=no
 
6718
  need_version=no
 
6719
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
6720
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
6721
  shlibpath_var=LD_LIBRARY_PATH
 
6722
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6723
    case $host_os in
 
6724
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
6725
        shlibpath_overrides_runpath=no
 
6726
        ;;
 
6727
      *)
 
6728
        shlibpath_overrides_runpath=yes
 
6729
        ;;
 
6730
      esac
 
6731
  else
 
6732
    shlibpath_overrides_runpath=yes
 
6733
  fi
 
6734
  ;;
 
6735
 
 
6736
os2*)
 
6737
  libname_spec='$name'
 
6738
  need_lib_prefix=no
 
6739
  library_names_spec='$libname.dll $libname.a'
 
6740
  dynamic_linker='OS/2 ld.exe'
 
6741
  shlibpath_var=LIBPATH
 
6742
  ;;
 
6743
 
 
6744
osf3* | osf4* | osf5*)
 
6745
  version_type=osf
 
6746
  need_lib_prefix=no
 
6747
  need_version=no
 
6748
  soname_spec='${libname}${release}.so'
 
6749
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
6750
  shlibpath_var=LD_LIBRARY_PATH
 
6751
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
6752
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
6753
  ;;
 
6754
 
 
6755
sco3.2v5*)
 
6756
  version_type=osf
 
6757
  soname_spec='${libname}${release}.so$major'
 
6758
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6759
  shlibpath_var=LD_LIBRARY_PATH
 
6760
  ;;
 
6761
 
 
6762
solaris*)
 
6763
  version_type=linux
 
6764
  need_lib_prefix=no
 
6765
  need_version=no
 
6766
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6767
  soname_spec='${libname}${release}.so$major'
 
6768
  shlibpath_var=LD_LIBRARY_PATH
 
6769
  shlibpath_overrides_runpath=yes
 
6770
  hardcode_into_libs=yes
 
6771
  # ldd complains unless libraries are executable
 
6772
  postinstall_cmds='chmod +x $lib'
 
6773
  ;;
 
6774
 
 
6775
sunos4*)
 
6776
  version_type=sunos
 
6777
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
6778
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
6779
  shlibpath_var=LD_LIBRARY_PATH
 
6780
  shlibpath_overrides_runpath=yes
 
6781
  if test "$with_gnu_ld" = yes; then
 
6782
    need_lib_prefix=no
 
6783
  fi
 
6784
  need_version=yes
 
6785
  ;;
 
6786
 
 
6787
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
6788
  version_type=linux
 
6789
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6790
  soname_spec='${libname}${release}.so$major'
 
6791
  shlibpath_var=LD_LIBRARY_PATH
 
6792
  case $host_vendor in
 
6793
    sni)
 
6794
      shlibpath_overrides_runpath=no
 
6795
      ;;
 
6796
    motorola)
 
6797
      need_lib_prefix=no
 
6798
      need_version=no
 
6799
      shlibpath_overrides_runpath=no
 
6800
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
6801
      ;;
 
6802
  esac
 
6803
  ;;
 
6804
 
 
6805
sysv4*MP*)
 
6806
  if test -d /usr/nec ;then
 
6807
    version_type=linux
 
6808
    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
 
6809
    soname_spec='$libname.so.$major'
 
6810
    shlibpath_var=LD_LIBRARY_PATH
 
6811
  fi
 
6812
  ;;
 
6813
 
 
6814
uts4*)
 
6815
  version_type=linux
 
6816
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
6817
  soname_spec='${libname}${release}.so$major'
 
6818
  shlibpath_var=LD_LIBRARY_PATH
 
6819
  ;;
 
6820
 
 
6821
*)
 
6822
  dynamic_linker=no
 
6823
  ;;
 
6824
esac
 
6825
AC_MSG_RESULT([$dynamic_linker])
 
6826
test "$dynamic_linker" = no && can_build_shared=no
 
6827
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
6828
 
 
6829
 
 
6830
# _LT_AC_TAGCONFIG
 
6831
# ----------------
 
6832
AC_DEFUN([_LT_AC_TAGCONFIG],
 
6833
[AC_ARG_WITH([tags],
 
6834
    [AC_HELP_STRING([--with-tags=TAGS],
 
6835
        [include additional configurations @<:@CXX,GCJ@:>@])],
 
6836
    [tagnames="$withval"],
 
6837
    [tagnames="CXX,GCJ"
 
6838
    case $host_os in
 
6839
      mingw*|cygwin*) tagnames="$tagnames,RC" ;;
 
6840
    esac])
 
6841
 
 
6842
if test -f "$ltmain" && test -n "$tagnames"; then
 
6843
  if test ! -f "${ofile}"; then
 
6844
    AC_MSG_WARN([output file `$ofile' does not exist])
 
6845
  fi
 
6846
 
 
6847
  if test -z "$LTCC"; then
 
6848
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
6849
    if test -z "$LTCC"; then
 
6850
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
 
6851
    else
 
6852
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
6853
    fi
 
6854
  fi
 
6855
 
 
6856
  # Extract list of available tagged configurations in $ofile.
 
6857
  # Note that this assumes the entire list is on one line.
 
6858
  available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
6859
 
 
6860
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
6861
  for tagname in $tagnames; do
 
6862
    IFS="$lt_save_ifs"
 
6863
    # Check whether tagname contains only valid characters
 
6864
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
6865
    "") ;;
 
6866
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
6867
        ;;
 
6868
    esac
 
6869
 
 
6870
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
6871
    then
 
6872
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
6873
    fi
 
6874
 
 
6875
    # Update the list of available tags.
 
6876
    if test -n "$tagname"; then
 
6877
      echo appending configuration tag \"$tagname\" to $ofile
 
6878
 
 
6879
      case $tagname in
 
6880
      CXX)
 
6881
        AC_LIBTOOL_LANG_CXX_CONFIG
 
6882
        ;;
 
6883
 
 
6884
      GCJ)
 
6885
        AC_LIBTOOL_LANG_GCJ_CONFIG
 
6886
        ;;
 
6887
 
 
6888
      RC)
 
6889
        AC_LIBTOOL_LANG_RC_CONFIG
 
6890
        ;;
 
6891
 
 
6892
      *)
 
6893
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
6894
        ;;
 
6895
      esac
 
6896
 
 
6897
      # Append the new tag name to the list of available tags.
 
6898
      available_tags="$available_tags $tagname"
 
6899
    fi
 
6900
  done
 
6901
  IFS="$lt_save_ifs"
 
6902
 
 
6903
  # Now substitute the updated list of available tags.
 
6904
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
6905
    mv "${ofile}T" "$ofile"
 
6906
    chmod +x "$ofile"
 
6907
  else
 
6908
    rm -f "${ofile}T"
 
6909
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
6910
  fi
 
6911
fi
 
6912
])# _LT_AC_TAGCONFIG
 
6913
 
 
6914
 
 
6915
# AC_LIBTOOL_DLOPEN
 
6916
# -----------------
 
6917
# enable checks for dlopen support
 
6918
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
6919
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
6920
])# AC_LIBTOOL_DLOPEN
 
6921
 
 
6922
 
 
6923
# AC_LIBTOOL_WIN32_DLL
 
6924
# --------------------
 
6925
# declare package support for building win32 dll's
 
6926
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
6927
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
6928
])# AC_LIBTOOL_WIN32_DLL
 
6929
 
 
6930
 
 
6931
# AC_ENABLE_SHARED([DEFAULT])
 
6932
# ---------------------------
 
6933
# implement the --enable-shared flag
 
6934
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
6935
AC_DEFUN([AC_ENABLE_SHARED],
 
6936
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
6937
AC_ARG_ENABLE([shared],
 
6938
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
6939
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
6940
    [p=${PACKAGE-default}
 
6941
    case $enableval in
 
6942
    yes) enable_shared=yes ;;
 
6943
    no) enable_shared=no ;;
 
6944
    *)
 
6945
      enable_shared=no
 
6946
      # Look at the argument we got.  We use all the common list separators.
 
6947
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
6948
      for pkg in $enableval; do
 
6949
        IFS="$lt_save_ifs"
 
6950
        if test "X$pkg" = "X$p"; then
 
6951
          enable_shared=yes
 
6952
        fi
 
6953
      done
 
6954
      IFS="$lt_save_ifs"
 
6955
      ;;
 
6956
    esac],
 
6957
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
6958
])# AC_ENABLE_SHARED
 
6959
 
 
6960
 
 
6961
# AC_DISABLE_SHARED
 
6962
# -----------------
 
6963
#- set the default shared flag to --disable-shared
 
6964
AC_DEFUN([AC_DISABLE_SHARED],
 
6965
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
6966
AC_ENABLE_SHARED(no)
 
6967
])# AC_DISABLE_SHARED
 
6968
 
 
6969
 
 
6970
# AC_ENABLE_STATIC([DEFAULT])
 
6971
# ---------------------------
 
6972
# implement the --enable-static flag
 
6973
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
6974
AC_DEFUN([AC_ENABLE_STATIC],
 
6975
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
6976
AC_ARG_ENABLE([static],
 
6977
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
6978
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
6979
    [p=${PACKAGE-default}
 
6980
    case $enableval in
 
6981
    yes) enable_static=yes ;;
 
6982
    no) enable_static=no ;;
 
6983
    *)
 
6984
     enable_static=no
 
6985
      # Look at the argument we got.  We use all the common list separators.
 
6986
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
6987
      for pkg in $enableval; do
 
6988
        IFS="$lt_save_ifs"
 
6989
        if test "X$pkg" = "X$p"; then
 
6990
          enable_static=yes
 
6991
        fi
 
6992
      done
 
6993
      IFS="$lt_save_ifs"
 
6994
      ;;
 
6995
    esac],
 
6996
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
6997
])# AC_ENABLE_STATIC
 
6998
 
 
6999
 
 
7000
# AC_DISABLE_STATIC
 
7001
# -----------------
 
7002
# set the default static flag to --disable-static
 
7003
AC_DEFUN([AC_DISABLE_STATIC],
 
7004
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7005
AC_ENABLE_STATIC(no)
 
7006
])# AC_DISABLE_STATIC
 
7007
 
 
7008
 
 
7009
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
7010
# ---------------------------------
 
7011
# implement the --enable-fast-install flag
 
7012
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
7013
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
7014
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
7015
AC_ARG_ENABLE([fast-install],
 
7016
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
7017
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
7018
    [p=${PACKAGE-default}
 
7019
    case $enableval in
 
7020
    yes) enable_fast_install=yes ;;
 
7021
    no) enable_fast_install=no ;;
 
7022
    *)
 
7023
      enable_fast_install=no
 
7024
      # Look at the argument we got.  We use all the common list separators.
 
7025
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
7026
      for pkg in $enableval; do
 
7027
        IFS="$lt_save_ifs"
 
7028
        if test "X$pkg" = "X$p"; then
 
7029
          enable_fast_install=yes
 
7030
        fi
 
7031
      done
 
7032
      IFS="$lt_save_ifs"
 
7033
      ;;
 
7034
    esac],
 
7035
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
7036
])# AC_ENABLE_FAST_INSTALL
 
7037
 
 
7038
 
 
7039
# AC_DISABLE_FAST_INSTALL
 
7040
# -----------------------
 
7041
# set the default to --disable-fast-install
 
7042
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
7043
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7044
AC_ENABLE_FAST_INSTALL(no)
 
7045
])# AC_DISABLE_FAST_INSTALL
 
7046
 
 
7047
 
 
7048
# AC_LIBTOOL_PICMODE([MODE])
 
7049
# --------------------------
 
7050
# implement the --with-pic flag
 
7051
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
7052
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
7053
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7054
pic_mode=ifelse($#,1,$1,default)
 
7055
])# AC_LIBTOOL_PICMODE
 
7056
 
 
7057
 
 
7058
# AC_PATH_TOOL_PREFIX
 
7059
# -------------------
 
7060
# find a file program which can recognise shared library
 
7061
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
7062
[AC_MSG_CHECKING([for $1])
 
7063
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
7064
[case $MAGIC_CMD in
 
7065
[[\\/*] |  ?:[\\/]*])
 
7066
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
7067
  ;;
 
7068
*)
 
7069
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
7070
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
7071
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
7072
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
7073
dnl not every word.  This closes a longstanding sh security hole.
 
7074
  ac_dummy="ifelse([$2], , $PATH, [$2])"
 
7075
  for ac_dir in $ac_dummy; do
 
7076
    IFS="$lt_save_ifs"
 
7077
    test -z "$ac_dir" && ac_dir=.
 
7078
    if test -f $ac_dir/$1; then
 
7079
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
7080
      if test -n "$file_magic_test_file"; then
 
7081
        case $deplibs_check_method in
 
7082
        "file_magic "*)
 
7083
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
 
7084
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
7085
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
7086
            egrep "$file_magic_regex" > /dev/null; then
 
7087
            :
 
7088
          else
 
7089
            cat <<EOF 1>&2
 
7090
 
 
7091
*** Warning: the command libtool uses to detect shared libraries,
 
7092
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
7093
*** The result is that libtool may fail to recognize shared libraries
 
7094
*** as such.  This will affect the creation of libtool libraries that
 
7095
*** depend on shared libraries, but programs linked with such libtool
 
7096
*** libraries will work regardless of this problem.  Nevertheless, you
 
7097
*** may want to report the problem to your system manager and/or to
 
7098
*** bug-libtool@gnu.org
 
7099
 
 
7100
EOF
 
7101
          fi ;;
 
7102
        esac
 
7103
      fi
 
7104
      break
 
7105
    fi
 
7106
  done
 
7107
  IFS="$lt_save_ifs"
 
7108
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
7109
  ;;
 
7110
esac])
 
7111
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
7112
if test -n "$MAGIC_CMD"; then
 
7113
  AC_MSG_RESULT($MAGIC_CMD)
 
7114
else
 
7115
  AC_MSG_RESULT(no)
 
7116
fi
 
7117
])# AC_PATH_TOOL_PREFIX
 
7118
 
 
7119
 
 
7120
# AC_PATH_MAGIC
 
7121
# -------------
 
7122
# find a file program which can recognise a shared library
 
7123
AC_DEFUN([AC_PATH_MAGIC],
 
7124
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
7125
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
7126
  if test -n "$ac_tool_prefix"; then
 
7127
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
7128
  else
 
7129
    MAGIC_CMD=:
 
7130
  fi
 
7131
fi
 
7132
])# AC_PATH_MAGIC
 
7133
 
 
7134
 
 
7135
# AC_PROG_LD
 
7136
# ----------
 
7137
# find the path to the GNU or non-GNU linker
 
7138
AC_DEFUN([AC_PROG_LD],
 
7139
[AC_ARG_WITH([gnu-ld],
 
7140
    [AC_HELP_STRING([--with-gnu-ld],
 
7141
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
7142
    [test "$withval" = no || with_gnu_ld=yes],
 
7143
    [with_gnu_ld=no])
 
7144
AC_REQUIRE([AC_PROG_CC])dnl
 
7145
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
7146
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
7147
ac_prog=ld
 
7148
if test "$GCC" = yes; then
 
7149
  # Check if gcc -print-prog-name=ld gives a path.
 
7150
  AC_MSG_CHECKING([for ld used by GCC])
 
7151
  case $host in
 
7152
  *-*-mingw*)
 
7153
    # gcc leaves a trailing carriage return which upsets mingw
 
7154
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
7155
  *)
 
7156
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
7157
  esac
 
7158
  case $ac_prog in
 
7159
    # Accept absolute paths.
 
7160
    [[\\/]]* | ?:[[\\/]]*)
 
7161
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
7162
      # Canonicalize the path of ld
 
7163
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
7164
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
7165
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
7166
      done
 
7167
      test -z "$LD" && LD="$ac_prog"
 
7168
      ;;
 
7169
  "")
 
7170
    # If it fails, then pretend we aren't using GCC.
 
7171
    ac_prog=ld
 
7172
    ;;
 
7173
  *)
 
7174
    # If it is relative, then search for the first ld in PATH.
 
7175
    with_gnu_ld=unknown
 
7176
    ;;
 
7177
  esac
 
7178
elif test "$with_gnu_ld" = yes; then
 
7179
  AC_MSG_CHECKING([for GNU ld])
 
7180
else
 
7181
  AC_MSG_CHECKING([for non-GNU ld])
 
7182
fi
 
7183
AC_CACHE_VAL(lt_cv_path_LD,
 
7184
[if test -z "$LD"; then
 
7185
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
7186
  for ac_dir in $PATH; do
 
7187
    IFS="$lt_save_ifs"
 
7188
    test -z "$ac_dir" && ac_dir=.
 
7189
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
7190
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
7191
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
7192
      # but apparently some GNU ld's only accept -v.
 
7193
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
7194
      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
 
7195
        test "$with_gnu_ld" != no && break
 
7196
      else
 
7197
        test "$with_gnu_ld" != yes && break
 
7198
      fi
 
7199
    fi
 
7200
  done
 
7201
  IFS="$lt_save_ifs"
 
7202
else
 
7203
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
7204
fi])
 
7205
LD="$lt_cv_path_LD"
 
7206
if test -n "$LD"; then
 
7207
  AC_MSG_RESULT($LD)
 
7208
else
 
7209
  AC_MSG_RESULT(no)
 
7210
fi
 
7211
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
7212
AC_PROG_LD_GNU
 
7213
])# AC_PROG_LD
 
7214
 
 
7215
 
 
7216
# AC_PROG_LD_GNU
 
7217
# --------------
 
7218
AC_DEFUN([AC_PROG_LD_GNU],
 
7219
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
7220
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
7221
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
 
7222
  lt_cv_prog_gnu_ld=yes
 
7223
else
 
7224
  lt_cv_prog_gnu_ld=no
 
7225
fi])
 
7226
with_gnu_ld=$lt_cv_prog_gnu_ld
 
7227
])# AC_PROG_LD_GNU
 
7228
 
 
7229
 
 
7230
# AC_PROG_LD_RELOAD_FLAG
 
7231
# ----------------------
 
7232
# find reload flag for linker
 
7233
#   -- PORTME Some linkers may need a different reload flag.
 
7234
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
7235
[AC_CACHE_CHECK([for $LD option to reload object files],
 
7236
  lt_cv_ld_reload_flag,
 
7237
  [lt_cv_ld_reload_flag='-r'])
 
7238
reload_flag=$lt_cv_ld_reload_flag
 
7239
case $reload_flag in
 
7240
"" | " "*) ;;
 
7241
*) reload_flag=" $reload_flag" ;;
 
7242
esac
 
7243
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
7244
])# AC_PROG_LD_RELOAD_FLAG
 
7245
 
 
7246
 
 
7247
# AC_DEPLIBS_CHECK_METHOD
 
7248
# -----------------------
 
7249
# how to check for library dependencies
 
7250
#  -- PORTME fill in with the dynamic library characteristics
 
7251
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
7252
[AC_CACHE_CHECK([how to recognise dependant libraries],
 
7253
lt_cv_deplibs_check_method,
 
7254
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
7255
lt_cv_file_magic_test_file=
 
7256
lt_cv_deplibs_check_method='unknown'
 
7257
# Need to set the preceding variable on all platforms that support
 
7258
# interlibrary dependencies.
 
7259
# 'none' -- dependencies not supported.
 
7260
# `unknown' -- same as none, but documents that we really don't know.
 
7261
# 'pass_all' -- all dependencies passed with no checks.
 
7262
# 'test_compile' -- check by making test program.
 
7263
# 'file_magic [[regex]]' -- check by looking for files in library path
 
7264
# which responds to the $file_magic_cmd with a given egrep regex.
 
7265
# If you have `file' or equivalent on your system and you're not sure
 
7266
# whether `pass_all' will *always* work, you probably want this one.
 
7267
 
 
7268
case $host_os in
 
7269
aix4* | aix5*)
 
7270
  lt_cv_deplibs_check_method=pass_all
 
7271
  ;;
 
7272
 
 
7273
beos*)
 
7274
  lt_cv_deplibs_check_method=pass_all
 
7275
  ;;
 
7276
 
 
7277
bsdi4*)
 
7278
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
7279
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
7280
  lt_cv_file_magic_test_file=/shlib/libc.so
 
7281
  ;;
 
7282
 
 
7283
cygwin* | mingw* | pw32*)
 
7284
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
7285
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
7286
  ;;
 
7287
 
 
7288
darwin* | rhapsody*)
 
7289
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
 
7290
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
7291
  case "$host_os" in
 
7292
  rhapsody* | darwin1.[[012]])
 
7293
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
 
7294
    ;;
 
7295
  *) # Darwin 1.3 on
 
7296
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
 
7297
    ;;
 
7298
  esac
 
7299
  ;;
 
7300
 
 
7301
freebsd*)
 
7302
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
7303
    case $host_cpu in
 
7304
    i*86 )
 
7305
      # Not sure whether the presence of OpenBSD here was a mistake.
 
7306
      # Let's accept both of them until this is cleared up.
 
7307
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
 
7308
      lt_cv_file_magic_cmd=/usr/bin/file
 
7309
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
7310
      ;;
 
7311
    esac
 
7312
  else
 
7313
    lt_cv_deplibs_check_method=pass_all
 
7314
  fi
 
7315
  ;;
 
7316
 
 
7317
gnu*)
 
7318
  lt_cv_deplibs_check_method=pass_all
 
7319
  ;;
 
7320
 
 
7321
hpux10.20* | hpux11*)
 
7322
  lt_cv_file_magic_cmd=/usr/bin/file
 
7323
  if test "$host_cpu" = ia64; then
 
7324
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
7325
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
7326
  else
 
7327
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
7328
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
7329
  fi
 
7330
  ;;
 
7331
 
 
7332
irix5* | irix6* | nonstopux*)
 
7333
  case $host_os in
 
7334
  irix5* | nonstopux*)
 
7335
    # this will be overridden with pass_all, but let us keep it just in case
 
7336
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
 
7337
    ;;
 
7338
  *)
 
7339
    case $LD in
 
7340
    *-32|*"-32 ") libmagic=32-bit;;
 
7341
    *-n32|*"-n32 ") libmagic=N32;;
 
7342
    *-64|*"-64 ") libmagic=64-bit;;
 
7343
    *) libmagic=never-match;;
 
7344
    esac
 
7345
    # this will be overridden with pass_all, but let us keep it just in case
 
7346
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
 
7347
    ;;
 
7348
  esac
 
7349
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
 
7350
  lt_cv_deplibs_check_method=pass_all
 
7351
  ;;
 
7352
 
 
7353
# This must be Linux ELF.
 
7354
linux*)
 
7355
  case $host_cpu in
 
7356
  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
 
7357
    lt_cv_deplibs_check_method=pass_all ;;
 
7358
  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
 
7359
  arm* )
 
7360
    lt_cv_deplibs_check_method=pass_all ;;
 
7361
  *)
 
7362
    # glibc up to 2.1.1 does not perform some relocations on ARM
 
7363
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
 
7364
  esac
 
7365
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
 
7366
  ;;
 
7367
 
 
7368
netbsd*)
 
7369
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
7370
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
 
7371
  else
 
7372
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
 
7373
  fi
 
7374
  ;;
 
7375
 
 
7376
newos6*)
 
7377
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
7378
  lt_cv_file_magic_cmd=/usr/bin/file
 
7379
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
7380
  ;;
 
7381
 
 
7382
nto-qnx)
 
7383
  lt_cv_deplibs_check_method=unknown
 
7384
  ;;
 
7385
 
 
7386
openbsd*)
 
7387
  lt_cv_file_magic_cmd=/usr/bin/file
 
7388
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
7389
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
7390
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
 
7391
  else
 
7392
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
 
7393
  fi
 
7394
  ;;
 
7395
 
 
7396
osf3* | osf4* | osf5*)
 
7397
  # this will be overridden with pass_all, but let us keep it just in case
 
7398
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
 
7399
  lt_cv_file_magic_test_file=/shlib/libc.so
 
7400
  lt_cv_deplibs_check_method=pass_all
 
7401
  ;;
 
7402
 
 
7403
sco3.2v5*)
 
7404
  lt_cv_deplibs_check_method=pass_all
 
7405
  ;;
 
7406
 
 
7407
solaris*)
 
7408
  lt_cv_deplibs_check_method=pass_all
 
7409
  lt_cv_file_magic_test_file=/lib/libc.so
 
7410
  ;;
 
7411
 
 
7412
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
7413
  case $host_vendor in
 
7414
  motorola)
 
7415
    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]]'
 
7416
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
7417
    ;;
 
7418
  ncr)
 
7419
    lt_cv_deplibs_check_method=pass_all
 
7420
    ;;
 
7421
  sequent)
 
7422
    lt_cv_file_magic_cmd='/bin/file'
 
7423
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
7424
    ;;
 
7425
  sni)
 
7426
    lt_cv_file_magic_cmd='/bin/file'
 
7427
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
7428
    lt_cv_file_magic_test_file=/lib/libc.so
 
7429
    ;;
 
7430
  esac
 
7431
  ;;
 
7432
 
 
7433
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
7434
  lt_cv_deplibs_check_method=pass_all
 
7435
  ;;
 
7436
esac
 
7437
])
 
7438
file_magic_cmd=$lt_cv_file_magic_cmd
 
7439
deplibs_check_method=$lt_cv_deplibs_check_method
 
7440
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
7441
])# AC_DEPLIBS_CHECK_METHOD
 
7442
 
 
7443
 
 
7444
# AC_PROG_NM
 
7445
# ----------
 
7446
# find the path to a BSD-compatible name lister
 
7447
AC_DEFUN([AC_PROG_NM],
 
7448
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
 
7449
[if test -n "$NM"; then
 
7450
  # Let the user override the test.
 
7451
  lt_cv_path_NM="$NM"
 
7452
else
 
7453
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
7454
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
7455
    IFS="$lt_save_ifs"
 
7456
    test -z "$ac_dir" && ac_dir=.
 
7457
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
 
7458
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
7459
      # Check to see if the nm accepts a BSD-compat flag.
 
7460
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
7461
      #   nm: unknown option "B" ignored
 
7462
      # Tru64's nm complains that /dev/null is an invalid object file
 
7463
      if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
 
7464
        lt_cv_path_NM="$tmp_nm -B"
 
7465
        break
 
7466
      elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
 
7467
        lt_cv_path_NM="$tmp_nm -p"
 
7468
        break
 
7469
      else
 
7470
        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
7471
        continue # so that we can try to find one that supports BSD flags
 
7472
      fi
 
7473
    fi
 
7474
  done
 
7475
  IFS="$lt_save_ifs"
 
7476
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
7477
fi])
 
7478
NM="$lt_cv_path_NM"
 
7479
])# AC_PROG_NM
 
7480
 
 
7481
 
 
7482
# AC_CHECK_LIBM
 
7483
# -------------
 
7484
# check for math library
 
7485
AC_DEFUN([AC_CHECK_LIBM],
 
7486
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
7487
LIBM=
 
7488
case $host in
 
7489
*-*-beos* | *-*-cygwin* | *-*-pw32*)
 
7490
  # These system don't have libm
 
7491
  ;;
 
7492
*-ncr-sysv4.3*)
 
7493
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
7494
  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
 
7495
  ;;
 
7496
*)
 
7497
  AC_CHECK_LIB(m, main, LIBM="-lm")
 
7498
  ;;
 
7499
esac
 
7500
])# AC_CHECK_LIBM
 
7501
 
 
7502
 
 
7503
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
7504
# -----------------------------------
 
7505
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
7506
# LTDLINCL to the include flags for the libltdl header and adds
 
7507
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
 
7508
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
7509
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
 
7510
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
 
7511
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
7512
# flat and you're not using automake, define top_builddir and
 
7513
# top_srcdir appropriately in the Makefiles.
 
7514
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
7515
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7516
  case $enable_ltdl_convenience in
 
7517
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 
7518
  "") enable_ltdl_convenience=yes
 
7519
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 
7520
  esac
 
7521
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 
7522
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
7523
  # For backwards non-gettext consistent compatibility...
 
7524
  INCLTDL="$LTDLINCL"
 
7525
])# AC_LIBLTDL_CONVENIENCE
 
7526
 
 
7527
 
 
7528
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
7529
# -----------------------------------
 
7530
# sets LIBLTDL to the link flags for the libltdl installable library and
 
7531
# LTDLINCL to the include flags for the libltdl header and adds
 
7532
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
 
7533
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
7534
# DIRECTORY is not provided and an installed libltdl is not found, it is
 
7535
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
 
7536
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
 
7537
# quotes!).  If your package is not flat and you're not using automake,
 
7538
# define top_builddir and top_srcdir appropriately in the Makefiles.
 
7539
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 
7540
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
7541
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
7542
  AC_CHECK_LIB(ltdl, main,
 
7543
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 
7544
  [if test x"$enable_ltdl_install" = xno; then
 
7545
     AC_MSG_WARN([libltdl not installed, but installation disabled])
 
7546
   else
 
7547
     enable_ltdl_install=yes
 
7548
   fi
 
7549
  ])
 
7550
  if test x"$enable_ltdl_install" = x"yes"; then
 
7551
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
 
7552
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 
7553
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
7554
  else
 
7555
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
7556
    LIBLTDL="-lltdl"
 
7557
    LTDLINCL=
 
7558
  fi
 
7559
  # For backwards non-gettext consistent compatibility...
 
7560
  INCLTDL="$LTDLINCL"
 
7561
])# AC_LIBLTDL_INSTALLABLE
 
7562
 
 
7563
 
 
7564
# If this macro is not defined by Autoconf, define it here.
 
7565
ifdef([AC_PROVIDE_IFELSE],
 
7566
      [],
 
7567
      [define([AC_PROVIDE_IFELSE],
 
7568
              [ifdef([AC_PROVIDE_$1],
 
7569
                     [$2], [$3])])])
 
7570
 
 
7571
 
 
7572
# AC_LIBTOOL_CXX
 
7573
# --------------
 
7574
# enable support for C++ libraries
 
7575
AC_DEFUN([AC_LIBTOOL_CXX],
 
7576
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
7577
])# AC_LIBTOOL_CXX
 
7578
 
 
7579
 
 
7580
# _LT_AC_LANG_CXX
 
7581
# ---------------
 
7582
AC_DEFUN([_LT_AC_LANG_CXX],
 
7583
[AC_REQUIRE([AC_PROG_CXX])
 
7584
AC_REQUIRE([AC_PROG_CXXCPP])
 
7585
])# _LT_AC_LANG_CXX
 
7586
 
 
7587
 
 
7588
# AC_LIBTOOL_GCJ
 
7589
# --------------
 
7590
# enable support for GCJ libraries
 
7591
AC_DEFUN([AC_LIBTOOL_GCJ],
 
7592
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
7593
])# AC_LIBTOOL_GCJ
 
7594
 
 
7595
 
 
7596
# _LT_AC_LANG_GCJ
 
7597
# ---------------
 
7598
AC_DEFUN([_LT_AC_LANG_GCJ],
 
7599
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
7600
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
 
7601
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
 
7602
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
 
7603
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
7604
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
7605
])# _LT_AC_LANG_GCJ
 
7606
 
 
7607
 
 
7608
# AC_LIBTOOL_RC
 
7609
# --------------
 
7610
# enable support for Windows resource files
 
7611
AC_DEFUN([AC_LIBTOOL_RC],
 
7612
[AC_REQUIRE([AC_PROG_RC])
 
7613
])# AC_LIBTOOL_RC
 
7614
 
 
7615
 
 
7616
# AC_LIBTOOL_LANG_C_CONFIG
 
7617
# ------------------------
 
7618
# Ensure that the configuration vars for the C compiler are
 
7619
# suitably defined.  Those variables are subsequently used by
 
7620
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
7621
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
7622
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
7623
[lt_save_CC="$CC"
 
7624
AC_LANG_PUSH(C)
 
7625
 
 
7626
# Source file extension for C test sources.
 
7627
ac_ext=c
 
7628
 
 
7629
# Object file extension for compiled C test sources.
 
7630
objext=o
 
7631
_LT_AC_TAGVAR(objext, $1)=$objext
 
7632
 
 
7633
# Code to be used in simple compile tests
 
7634
lt_simple_compile_test_code="int some_variable = 0;"
 
7635
 
 
7636
# Code to be used in simple link tests
 
7637
lt_simple_link_test_code='main(){return(0);}'
 
7638
 
 
7639
_LT_AC_SYS_COMPILER
 
7640
 
 
7641
#
 
7642
# Check for any special shared library compilation flags.
 
7643
#
 
7644
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
 
7645
if test "$GCC" = no; then
 
7646
  case $host_os in
 
7647
  sco3.2v5*)
 
7648
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
 
7649
    ;;
 
7650
  esac
 
7651
fi
 
7652
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
 
7653
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
 
7654
  if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
 
7655
  else
 
7656
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
 
7657
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
 
7658
  fi
 
7659
fi
 
7660
 
 
7661
 
 
7662
#
 
7663
# Check to make sure the static flag actually works.
 
7664
#
 
7665
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
 
7666
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
7667
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
 
7668
  [],
 
7669
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
7670
 
 
7671
 
 
7672
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
7673
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
7674
AC_LIBTOOL_PROG_CC_C_O($1)
 
7675
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
7676
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
7677
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
7678
AC_LIBTOOL_SYS_LIB_STRIP
 
7679
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
7680
AC_LIBTOOL_DLOPEN_SELF($1)
 
7681
 
 
7682
# Report which librarie types wil actually be built
 
7683
AC_MSG_CHECKING([if libtool supports shared libraries])
 
7684
AC_MSG_RESULT([$can_build_shared])
 
7685
 
 
7686
AC_MSG_CHECKING([whether to build shared libraries])
 
7687
test "$can_build_shared" = "no" && enable_shared=no
 
7688
 
 
7689
# On AIX, shared libraries and static libraries use the same namespace, and
 
7690
# are all built from PIC.
 
7691
case "$host_os" in
 
7692
aix3*)
 
7693
  test "$enable_shared" = yes && enable_static=no
 
7694
  if test -n "$RANLIB"; then
 
7695
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
7696
    postinstall_cmds='$RANLIB $lib'
 
7697
  fi
 
7698
  ;;
 
7699
 
 
7700
aix4*)
 
7701
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
7702
    test "$enable_shared" = yes && enable_static=no
 
7703
  fi
 
7704
  ;;
 
7705
esac
 
7706
AC_MSG_RESULT([$enable_shared])
 
7707
 
 
7708
AC_MSG_CHECKING([whether to build static libraries])
 
7709
# Make sure either enable_shared or enable_static is yes.
 
7710
test "$enable_shared" = yes || enable_static=yes
 
7711
AC_MSG_RESULT([$enable_static])
 
7712
 
 
7713
AC_LIBTOOL_CONFIG($1)
 
7714
 
 
7715
AC_LANG_POP
 
7716
CC="$lt_save_CC"
 
7717
])# AC_LIBTOOL_LANG_C_CONFIG
 
7718
 
 
7719
 
 
7720
# AC_LIBTOOL_LANG_CXX_CONFIG
 
7721
# --------------------------
 
7722
# Ensure that the configuration vars for the C compiler are
 
7723
# suitably defined.  Those variables are subsequently used by
 
7724
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
7725
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
7726
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
7727
[AC_LANG_PUSH(C++)
 
7728
AC_REQUIRE([AC_PROG_CXX])
 
7729
AC_REQUIRE([AC_PROG_CXXCPP])
 
7730
 
 
7731
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
7732
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
7733
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
7734
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
7735
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
7736
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7737
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7738
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
7739
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
7740
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
7741
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7742
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
7743
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
7744
 
 
7745
# Dependencies to place before and after the object being linked:
 
7746
_LT_AC_TAGVAR(predep_objects, $1)=
 
7747
_LT_AC_TAGVAR(postdep_objects, $1)=
 
7748
_LT_AC_TAGVAR(predeps, $1)=
 
7749
_LT_AC_TAGVAR(postdeps, $1)=
 
7750
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
7751
 
 
7752
# Source file extension for C test sources.
 
7753
ac_ext=cc
 
7754
 
 
7755
# Object file extension for compiled C test sources.
 
7756
objext=o
 
7757
_LT_AC_TAGVAR(objext, $1)=$objext
 
7758
 
 
7759
# Code to be used in simple compile tests
 
7760
lt_simple_compile_test_code="int some_variable = 0;"
 
7761
 
 
7762
# Code to be used in simple link tests
 
7763
lt_simple_link_test_code='int main(int char *[]) { return(0); }'
 
7764
 
 
7765
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7766
_LT_AC_SYS_COMPILER
 
7767
 
 
7768
# Allow CC to be a program name with arguments.
 
7769
lt_save_CC="$CC"
 
7770
CC=${CXX-"c++"}
 
7771
set dummy $CC
 
7772
compiler="[$]2"
 
7773
_LT_AC_TAGVAR(compiler, $1)=$CC
 
7774
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
7775
 
 
7776
# We don't want -fno-exception wen compiling C++ code, so set the
 
7777
# no_builtin_flag separately
 
7778
if test "$GXX" = yes; then
 
7779
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
7780
else
 
7781
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
7782
fi
 
7783
 
 
7784
if test "$GXX" = yes; then
 
7785
  # Set up default GNU C++ configuration
 
7786
 
 
7787
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
7788
  # archiving commands below assume that GNU ld is being used.
 
7789
  if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
 
7790
      egrep 'GNU ld' > /dev/null; then
 
7791
    with_gnu_ld=yes
 
7792
 
 
7793
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7794
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
7795
 
 
7796
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
7797
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7798
 
 
7799
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
7800
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
7801
    #     investigate it a little bit more. (MM)
 
7802
    wlarc='${wl}'
 
7803
 
 
7804
    # ancient GNU ld didn't support --whole-archive et. al.
 
7805
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
7806
        egrep 'no-whole-archive' > /dev/null; then
 
7807
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
7808
    else
 
7809
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
7810
    fi
 
7811
  else
 
7812
    with_gnu_ld=no
 
7813
    wlarc=
 
7814
 
 
7815
    # A generic and very simple default shared library creation
 
7816
    # command for GNU C++ for the case where it uses the native
 
7817
    # linker, instead of GNU ld.  If possible, this setting should
 
7818
    # overridden to take advantage of the native linker features on
 
7819
    # the platform it is being used on.
 
7820
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
7821
  fi
 
7822
 
 
7823
  # Commands to make compiler produce verbose output that lists
 
7824
  # what "hidden" libraries, object files and flags are used when
 
7825
  # linking a shared library.
 
7826
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
 
7827
 
 
7828
else
 
7829
  GXX=no
 
7830
  with_gnu_ld=no
 
7831
  wlarc=
 
7832
fi
 
7833
 
 
7834
# PORTME: fill in a description of your system's C++ link characteristics
 
7835
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
7836
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
7837
case $host_os in
 
7838
  aix3*)
 
7839
    # FIXME: insert proper C++ library support
 
7840
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7841
    ;;
 
7842
  aix4* | aix5*)
 
7843
    if test "$host_cpu" = ia64; then
 
7844
      # On IA64, the linker does run time linking by default, so we don't
 
7845
      # have to do anything special.
 
7846
      aix_use_runtimelinking=no
 
7847
      exp_sym_flag='-Bexport'
 
7848
      no_entry_flag=""
 
7849
    else
 
7850
      # KDE requires run time linking.  Make it the default.
 
7851
      aix_use_runtimelinking=yes
 
7852
      exp_sym_flag='-bexport'
 
7853
      no_entry_flag='-bnoentry'
 
7854
    fi
 
7855
 
 
7856
    # When large executables or shared objects are built, AIX ld can
 
7857
    # have problems creating the table of contents.  If linking a library
 
7858
    # or program results in "error TOC overflow" add -mminimal-toc to
 
7859
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
7860
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
7861
 
 
7862
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
7863
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7864
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7865
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
7866
 
 
7867
    if test "$GXX" = yes; then
 
7868
      case $host_os in aix4.[012]|aix4.[012].*)
 
7869
      # We only want to do this on AIX 4.2 and lower, the check
 
7870
      # below for broken collect2 doesn't work under 4.3+
 
7871
        collect2name=`${CC} -print-prog-name=collect2`
 
7872
        if test -f "$collect2name" && \
 
7873
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
7874
        then
 
7875
          # We have reworked collect2
 
7876
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7877
        else
 
7878
          # We have old collect2
 
7879
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
7880
          # It fails to find uninstalled libraries when the uninstalled
 
7881
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
7882
          # to unsupported forces relinking
 
7883
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7884
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7885
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
7886
        fi
 
7887
      esac
 
7888
      shared_flag='-shared'
 
7889
    else
 
7890
      # not using gcc
 
7891
      if test "$host_cpu" = ia64; then
 
7892
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
7893
        # chokes on -Wl,-G. The following line is correct:
 
7894
        shared_flag='-G'
 
7895
      else
 
7896
        if test "$aix_use_runtimelinking" = yes; then
 
7897
          shared_flag='-qmkshrobj ${wl}-G'
 
7898
        else
 
7899
          shared_flag='-qmkshrobj'
 
7900
        fi
 
7901
      fi
 
7902
    fi
 
7903
 
 
7904
    # Let the compiler handle the export list.
 
7905
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
7906
    if test "$aix_use_runtimelinking" = yes; then
 
7907
      # Warning - without using the other runtime loading flags (-brtl),
 
7908
      # -berok will link without error, but may produce a broken library.
 
7909
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
7910
      # Determine the default libpath from the value encoded in an empty executable.
 
7911
      _LT_AC_SYS_LIBPATH_AIX
 
7912
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7913
 
 
7914
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
 
7915
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
7916
     else
 
7917
      if test "$host_cpu" = ia64; then
 
7918
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
7919
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
7920
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
7921
      else
 
7922
        # Determine the default libpath from the value encoded in an empty executable.
 
7923
        _LT_AC_SYS_LIBPATH_AIX
 
7924
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7925
        # Warning - without using the other run time loading flags,
 
7926
        # -berok will link without error, but may produce a broken library.
 
7927
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
7928
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
7929
        # -bexpall does not export symbols beginning with underscore (_)
 
7930
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
7931
        # Exported symbols can be pulled into shared objects from archives
 
7932
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
7933
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7934
        # This is similar to how AIX traditionally builds it's shared libraries.
 
7935
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
7936
      fi
 
7937
    fi
 
7938
    ;;
 
7939
  chorus*)
 
7940
    case $cc_basename in
 
7941
      *)
 
7942
        # FIXME: insert proper C++ library support
 
7943
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7944
        ;;
 
7945
    esac
 
7946
    ;;
 
7947
  dgux*)
 
7948
    case $cc_basename in
 
7949
      ec++)
 
7950
        # FIXME: insert proper C++ library support
 
7951
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7952
        ;;
 
7953
      ghcx)
 
7954
        # Green Hills C++ Compiler
 
7955
        # FIXME: insert proper C++ library support
 
7956
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7957
        ;;
 
7958
      *)
 
7959
        # FIXME: insert proper C++ library support
 
7960
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7961
        ;;
 
7962
    esac
 
7963
    ;;
 
7964
  freebsd[12]*)
 
7965
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
7966
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7967
    ;;
 
7968
  freebsd-elf*)
 
7969
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
7970
    ;;
 
7971
  freebsd*)
 
7972
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
7973
    # conventions
 
7974
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
7975
    ;;
 
7976
  gnu*)
 
7977
    ;;
 
7978
  hpux*)
 
7979
    if test $with_gnu_ld = no; then
 
7980
      if test "$host_cpu" = ia64; then
 
7981
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7982
      else
 
7983
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
7984
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
7985
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7986
      fi
 
7987
    fi
 
7988
    if test "$host_cpu" = ia64; then
 
7989
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7990
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7991
    else
 
7992
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7993
    fi
 
7994
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
7995
                                            # but as the default
 
7996
                                            # location of the library.
 
7997
 
 
7998
    case $cc_basename in
 
7999
      CC)
 
8000
        # FIXME: insert proper C++ library support
 
8001
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8002
        ;;
 
8003
      aCC)
 
8004
        case $host_os in
 
8005
        hpux9*)
 
8006
          _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
8007
          ;;
 
8008
        *)
 
8009
          if test "$host_cpu" = ia64; then
 
8010
            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
8011
          else
 
8012
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8013
          fi
 
8014
          ;;
 
8015
        esac
 
8016
        # Commands to make compiler produce verbose output that lists
 
8017
        # what "hidden" libraries, object files and flags are used when
 
8018
        # linking a shared library.
 
8019
        #
 
8020
        # There doesn't appear to be a way to prevent this compiler from
 
8021
        # explicitly linking system object files so we need to strip them
 
8022
        # from the output so that they don't get included in the library
 
8023
        # dependencies.
 
8024
        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'
 
8025
        ;;
 
8026
      *)
 
8027
        if test "$GXX" = yes; then
 
8028
          if test $with_gnu_ld = no; then
 
8029
            case $host_os in
 
8030
            hpux9*)
 
8031
              _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
8032
              ;;
 
8033
            *)
 
8034
              if test "$host_cpu" = ia64; then
 
8035
                _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
8036
              else
 
8037
                _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8038
              fi
 
8039
              ;;
 
8040
            esac
 
8041
          fi
 
8042
        else
 
8043
          # FIXME: insert proper C++ library support
 
8044
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8045
        fi
 
8046
        ;;
 
8047
    esac
 
8048
    ;;
 
8049
  irix5* | irix6*)
 
8050
    case $cc_basename in
 
8051
      CC)
 
8052
        # SGI C++
 
8053
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
8054
 
 
8055
        # Archives containing C++ object files must be created using
 
8056
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
8057
        # necessary to make sure instantiated templates are included
 
8058
        # in the archive.
 
8059
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
8060
        ;;
 
8061
      *)
 
8062
        if test "$GXX" = yes; then
 
8063
          if test "$with_gnu_ld" = no; then
 
8064
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
8065
          else
 
8066
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
 
8067
          fi
 
8068
        fi
 
8069
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8070
        ;;
 
8071
    esac
 
8072
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8073
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8074
    ;;
 
8075
  linux*)
 
8076
    case $cc_basename in
 
8077
      KCC)
 
8078
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8079
 
 
8080
        # KCC will only create a shared library if the output file
 
8081
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8082
        # to its proper name (with version) after linking.
 
8083
        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
8084
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
8085
 
 
8086
        # Commands to make compiler produce verbose output that lists
 
8087
        # what "hidden" libraries, object files and flags are used when
 
8088
        # linking a shared library.
 
8089
        #
 
8090
        # There doesn't appear to be a way to prevent this compiler from
 
8091
        # explicitly linking system object files so we need to strip them
 
8092
        # from the output so that they don't get included in the library
 
8093
        # dependencies.
 
8094
        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8095
 
 
8096
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
8097
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
8098
 
 
8099
        # Archives containing C++ object files must be created using
 
8100
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
8101
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
8102
        ;;
 
8103
      cxx)
 
8104
        # Compaq C++
 
8105
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
8106
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
8107
 
 
8108
        runpath_var=LD_RUN_PATH
 
8109
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8110
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8111
 
 
8112
        # Commands to make compiler produce verbose output that lists
 
8113
        # what "hidden" libraries, object files and flags are used when
 
8114
        # linking a shared library.
 
8115
        #
 
8116
        # There doesn't appear to be a way to prevent this compiler from
 
8117
        # explicitly linking system object files so we need to strip them
 
8118
        # from the output so that they don't get included in the library
 
8119
        # dependencies.
 
8120
        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'
 
8121
        ;;
 
8122
    esac
 
8123
    ;;
 
8124
  lynxos*)
 
8125
    # FIXME: insert proper C++ library support
 
8126
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8127
    ;;
 
8128
  m88k*)
 
8129
    # FIXME: insert proper C++ library support
 
8130
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8131
    ;;
 
8132
  mvs*)
 
8133
    case $cc_basename in
 
8134
      cxx)
 
8135
        # FIXME: insert proper C++ library support
 
8136
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8137
        ;;
 
8138
      *)
 
8139
        # FIXME: insert proper C++ library support
 
8140
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8141
        ;;
 
8142
    esac
 
8143
    ;;
 
8144
  netbsd*)
 
8145
    # NetBSD uses g++ - do we need to do anything?
 
8146
    ;;
 
8147
  osf3*)
 
8148
    case $cc_basename in
 
8149
      KCC)
 
8150
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8151
 
 
8152
        # KCC will only create a shared library if the output file
 
8153
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8154
        # to its proper name (with version) after linking.
 
8155
        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
8156
 
 
8157
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8158
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8159
 
 
8160
        # Archives containing C++ object files must be created using
 
8161
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
8162
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
8163
 
 
8164
        ;;
 
8165
      RCC)
 
8166
        # Rational C++ 2.4.1
 
8167
        # FIXME: insert proper C++ library support
 
8168
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8169
        ;;
 
8170
      cxx)
 
8171
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8172
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
8173
 
 
8174
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8175
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8176
 
 
8177
        # Commands to make compiler produce verbose output that lists
 
8178
        # what "hidden" libraries, object files and flags are used when
 
8179
        # linking a shared library.
 
8180
        #
 
8181
        # There doesn't appear to be a way to prevent this compiler from
 
8182
        # explicitly linking system object files so we need to strip them
 
8183
        # from the output so that they don't get included in the library
 
8184
        # dependencies.
 
8185
        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'
 
8186
        ;;
 
8187
      *)
 
8188
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8189
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8190
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
8191
 
 
8192
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8193
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8194
 
 
8195
          # Commands to make compiler produce verbose output that lists
 
8196
          # what "hidden" libraries, object files and flags are used when
 
8197
          # linking a shared library.
 
8198
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
 
8199
 
 
8200
        else
 
8201
          # FIXME: insert proper C++ library support
 
8202
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8203
        fi
 
8204
        ;;
 
8205
    esac
 
8206
    ;;
 
8207
  osf4* | osf5*)
 
8208
    case $cc_basename in
 
8209
      KCC)
 
8210
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8211
 
 
8212
        # KCC will only create a shared library if the output file
 
8213
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8214
        # to its proper name (with version) after linking.
 
8215
        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
8216
 
 
8217
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8218
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8219
 
 
8220
        # Archives containing C++ object files must be created using
 
8221
        # the KAI C++ compiler.
 
8222
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
8223
        ;;
 
8224
      RCC)
 
8225
        # Rational C++ 2.4.1
 
8226
        # FIXME: insert proper C++ library support
 
8227
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8228
        ;;
 
8229
      cxx)
 
8230
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
8231
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
8232
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
 
8233
          echo "-hidden">> $lib.exp~
 
8234
          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
 
8235
          $rm $lib.exp'
 
8236
 
 
8237
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8238
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8239
 
 
8240
        # Commands to make compiler produce verbose output that lists
 
8241
        # what "hidden" libraries, object files and flags are used when
 
8242
        # linking a shared library.
 
8243
        #
 
8244
        # There doesn't appear to be a way to prevent this compiler from
 
8245
        # explicitly linking system object files so we need to strip them
 
8246
        # from the output so that they don't get included in the library
 
8247
        # dependencies.
 
8248
        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'
 
8249
        ;;
 
8250
      *)
 
8251
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8252
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8253
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
8254
 
 
8255
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8256
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
8257
 
 
8258
          # Commands to make compiler produce verbose output that lists
 
8259
          # what "hidden" libraries, object files and flags are used when
 
8260
          # linking a shared library.
 
8261
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
 
8262
 
 
8263
        else
 
8264
          # FIXME: insert proper C++ library support
 
8265
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8266
        fi
 
8267
        ;;
 
8268
    esac
 
8269
    ;;
 
8270
  psos*)
 
8271
    # FIXME: insert proper C++ library support
 
8272
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8273
    ;;
 
8274
  sco*)
 
8275
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8276
    case $cc_basename in
 
8277
      CC)
 
8278
        # FIXME: insert proper C++ library support
 
8279
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8280
        ;;
 
8281
      *)
 
8282
        # FIXME: insert proper C++ library support
 
8283
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8284
        ;;
 
8285
    esac
 
8286
    ;;
 
8287
  sunos4*)
 
8288
    case $cc_basename in
 
8289
      CC)
 
8290
        # Sun C++ 4.x
 
8291
        # FIXME: insert proper C++ library support
 
8292
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8293
        ;;
 
8294
      lcc)
 
8295
        # Lucid
 
8296
        # FIXME: insert proper C++ library support
 
8297
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8298
        ;;
 
8299
      *)
 
8300
        # FIXME: insert proper C++ library support
 
8301
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8302
        ;;
 
8303
    esac
 
8304
    ;;
 
8305
  solaris*)
 
8306
    case $cc_basename in
 
8307
      CC)
 
8308
        # Sun C++ 4.2, 5.x and Centerline C++
 
8309
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
8310
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8311
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8312
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
8313
 
 
8314
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
8315
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8316
        case $host_os in
 
8317
          solaris2.[0-5] | solaris2.[0-5].*) ;;
 
8318
          *)
 
8319
            # The C++ compiler is used as linker so we must use $wl
 
8320
            # flag to pass the commands to the underlying system
 
8321
            # linker.
 
8322
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
8323
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
8324
            ;;
 
8325
        esac
 
8326
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
8327
 
 
8328
        # Commands to make compiler produce verbose output that lists
 
8329
        # what "hidden" libraries, object files and flags are used when
 
8330
        # linking a shared library.
 
8331
        #
 
8332
        # There doesn't appear to be a way to prevent this compiler from
 
8333
        # explicitly linking system object files so we need to strip them
 
8334
        # from the output so that they don't get included in the library
 
8335
        # dependencies.
 
8336
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
8337
 
 
8338
        # Archives containing C++ object files must be created using
 
8339
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
8340
        # necessary to make sure instantiated templates are included
 
8341
        # in the archive.
 
8342
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
8343
        ;;
 
8344
      gcx)
 
8345
        # Green Hills C++ Compiler
 
8346
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8347
 
 
8348
        # The C++ compiler must be used to create the archive.
 
8349
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
8350
        ;;
 
8351
      *)
 
8352
        # GNU C++ compiler with Solaris linker
 
8353
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8354
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
8355
          if $CC --version | egrep -v '^2\.7' > /dev/null; then
 
8356
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
 
8357
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8358
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
 
8359
 
 
8360
            # Commands to make compiler produce verbose output that lists
 
8361
            # what "hidden" libraries, object files and flags are used when
 
8362
            # linking a shared library.
 
8363
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
 
8364
          else
 
8365
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
8366
            # platform.
 
8367
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
 
8368
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
8369
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
 
8370
 
 
8371
            # Commands to make compiler produce verbose output that lists
 
8372
            # what "hidden" libraries, object files and flags are used when
 
8373
            # linking a shared library.
 
8374
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
 
8375
          fi
 
8376
 
 
8377
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
8378
        fi
 
8379
        ;;
 
8380
    esac
 
8381
    ;;
 
8382
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
 
8383
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8384
    ;;
 
8385
  tandem*)
 
8386
    case $cc_basename in
 
8387
      NCC)
 
8388
        # NonStop-UX NCC 3.20
 
8389
        # FIXME: insert proper C++ library support
 
8390
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8391
        ;;
 
8392
      *)
 
8393
        # FIXME: insert proper C++ library support
 
8394
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8395
        ;;
 
8396
    esac
 
8397
    ;;
 
8398
  vxworks*)
 
8399
    # FIXME: insert proper C++ library support
 
8400
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8401
    ;;
 
8402
  *)
 
8403
    # FIXME: insert proper C++ library support
 
8404
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
8405
    ;;
 
8406
esac
 
8407
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
8408
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
8409
 
 
8410
# Figure out "hidden" C++ library dependencies from verbose
 
8411
# compiler output whening linking a shared library.
 
8412
cat > conftest.$ac_ext <<EOF
 
8413
class Foo
 
8414
{
 
8415
public:
 
8416
  Foo (void) { a = 0; }
 
8417
private:
 
8418
  int a;
 
8419
};
 
8420
EOF
 
8421
 
 
8422
 
 
8423
if AC_TRY_EVAL(ac_compile); then
 
8424
  # Parse the compiler output and extract the necessary
 
8425
  # objects, libraries and library flags.
 
8426
 
 
8427
  # Sentinel used to keep track of whether or not we are before
 
8428
  # the conftest object file.
 
8429
  pre_test_object_deps_done=no
 
8430
 
 
8431
  # The `*' in the case matches for architectures that use `case' in
 
8432
  # $output_verbose_cmd can trigger glob expansion during the loop
 
8433
  # eval without this substitution.
 
8434
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
8435
 
 
8436
  for p in `eval $output_verbose_link_cmd`; do
 
8437
    case $p in
 
8438
 
 
8439
    -L* | -R* | -l*)
 
8440
       # Some compilers place space between "-{L,R}" and the path.
 
8441
       # Remove the space.
 
8442
       if test $p = "-L" \
 
8443
          || test $p = "-R"; then
 
8444
         prev=$p
 
8445
         continue
 
8446
       else
 
8447
         prev=
 
8448
       fi
 
8449
 
 
8450
       if test "$pre_test_object_deps_done" = no; then
 
8451
         case $p in
 
8452
         -L* | -R*)
 
8453
           # Internal compiler library paths should come after those
 
8454
           # provided the user.  The postdeps already come after the
 
8455
           # user supplied libs so there is no need to process them.
 
8456
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
8457
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
8458
           else
 
8459
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
8460
           fi
 
8461
           ;;
 
8462
         # The "-l" case would never come before the object being
 
8463
         # linked, so don't bother handling this case.
 
8464
         esac
 
8465
       else
 
8466
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
8467
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
8468
         else
 
8469
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
8470
         fi
 
8471
       fi
 
8472
       ;;
 
8473
 
 
8474
    *.$objext|*.$libext)
 
8475
       # This assumes that the test object file only shows up
 
8476
       # once in the compiler output.
 
8477
       if test "$p" = "conftest.$objext"; then
 
8478
         pre_test_object_deps_done=yes
 
8479
         continue
 
8480
       fi
 
8481
 
 
8482
       if test "$pre_test_object_deps_done" = no; then
 
8483
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
8484
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
8485
         else
 
8486
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
8487
         fi
 
8488
       else
 
8489
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
8490
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
8491
         else
 
8492
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
8493
         fi
 
8494
       fi
 
8495
       ;;
 
8496
 
 
8497
    *) ;; # Ignore the rest.
 
8498
 
 
8499
    esac
 
8500
  done
 
8501
 
 
8502
  # Clean up.
 
8503
  rm -f a.out
 
8504
else
 
8505
  echo "libtool.m4: error: problem compiling C++ test program"
 
8506
fi
 
8507
 
 
8508
$rm -f confest.$objext
 
8509
 
 
8510
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
8511
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
8512
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
 
8513
esac
 
8514
 
 
8515
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
8516
_LT_AC_TAGVAR(LD, $1)="$LD"
 
8517
 
 
8518
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
8519
AC_LIBTOOL_PROG_CC_C_O($1)
 
8520
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
8521
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
8522
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
8523
AC_LIBTOOL_SYS_LIB_STRIP
 
8524
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
8525
AC_LIBTOOL_DLOPEN_SELF($1)
 
8526
 
 
8527
AC_LIBTOOL_CONFIG($1)
 
8528
 
 
8529
AC_LANG_POP
 
8530
CC="$lt_save_CC"
 
8531
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
8532
 
 
8533
 
 
8534
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
8535
# --------------------------
 
8536
# Ensure that the configuration vars for the C compiler are
 
8537
# suitably defined.  Those variables are subsequently used by
 
8538
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
8539
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
8540
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
8541
[AC_LANG_SAVE
 
8542
 
 
8543
# Source file extension for C test sources.
 
8544
ac_ext=java
 
8545
 
 
8546
# Object file extension for compiled C test sources.
 
8547
objext=o
 
8548
_LT_AC_TAGVAR(objext, $1)=$objext
 
8549
 
 
8550
# Code to be used in simple compile tests
 
8551
lt_simple_compile_test_code="class foo {}"
 
8552
 
 
8553
# Code to be used in simple link tests
 
8554
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
 
8555
 
 
8556
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8557
_LT_AC_SYS_COMPILER
 
8558
 
 
8559
# Allow CC to be a program name with arguments.
 
8560
lt_save_CC="$CC"
 
8561
CC=${GCJ-"gcj"}
 
8562
set dummy $CC
 
8563
compiler="[$]2"
 
8564
_LT_AC_TAGVAR(compiler, $1)=$CC
 
8565
 
 
8566
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
8567
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
8568
 
 
8569
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
8570
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
8571
AC_LIBTOOL_PROG_CC_C_O($1)
 
8572
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
8573
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
8574
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
8575
AC_LIBTOOL_SYS_LIB_STRIP
 
8576
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
8577
AC_LIBTOOL_DLOPEN_SELF($1)
 
8578
 
 
8579
AC_LIBTOOL_CONFIG($1)
 
8580
 
 
8581
AC_LANG_RESTORE
 
8582
CC="$lt_save_CC"
 
8583
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
8584
 
 
8585
 
 
8586
# AC_LIBTOOL_LANG_RC_CONFIG
 
8587
# --------------------------
 
8588
# Ensure that the configuration vars for the Windows resource compiler are
 
8589
# suitably defined.  Those variables are subsequently used by
 
8590
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
8591
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
8592
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
8593
[AC_LANG_SAVE
 
8594
 
 
8595
# Source file extension for RC test sources.
 
8596
ac_ext=rc
 
8597
 
 
8598
# Object file extension for compiled RC test sources.
 
8599
objext=o
 
8600
_LT_AC_TAGVAR(objext, $1)=$objext
 
8601
 
 
8602
# Code to be used in simple compile tests
 
8603
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
8604
 
 
8605
# Code to be used in simple link tests
 
8606
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
8607
 
 
8608
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8609
_LT_AC_SYS_COMPILER
 
8610
 
 
8611
# Allow CC to be a program name with arguments.
 
8612
lt_save_CC="$CC"
 
8613
CC=${RC-"windres"}
 
8614
set dummy $CC
 
8615
compiler="[$]2"
 
8616
_LT_AC_TAGVAR(compiler, $1)=$CC
 
8617
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
8618
 
 
8619
AC_LIBTOOL_CONFIG($1)
 
8620
 
 
8621
AC_LANG_RESTORE
 
8622
CC="$lt_save_CC"
 
8623
])# AC_LIBTOOL_LANG_RC_CONFIG
 
8624
 
 
8625
 
 
8626
# AC_LIBTOOL_CONFIG([TAGNAME])
 
8627
# ----------------------------
 
8628
# If TAGNAME is not passed, then create an initial libtool script
 
8629
# with a default configuration from the untagged config vars.  Otherwise
 
8630
# add code to config.status for appending the configuration named by
 
8631
# TAGNAME from the matching tagged config vars.
 
8632
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
8633
[# The else clause should only fire when bootstrapping the
 
8634
# libtool distribution, otherwise you forgot to ship ltmain.sh
 
8635
# with your package, and you will get complaints that there are
 
8636
# no rules to generate ltmain.sh.
 
8637
if test -f "$ltmain"; then
 
8638
  # Now quote all the things that may contain metacharacters while being
 
8639
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 
8640
  # variables and quote the copies for generation of the libtool script.
 
8641
  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
 
8642
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
8643
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
8644
    deplibs_check_method reload_flag reload_cmds need_locks \
 
8645
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
8646
    lt_cv_sys_global_symbol_to_c_name_address \
 
8647
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 
8648
    old_postinstall_cmds old_postuninstall_cmds \
 
8649
    _LT_AC_TAGVAR(compiler, $1) \
 
8650
    _LT_AC_TAGVAR(CC, $1) \
 
8651
    _LT_AC_TAGVAR(LD, $1) \
 
8652
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
8653
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
8654
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
8655
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
8656
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
8657
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
8658
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
8659
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
8660
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
8661
    _LT_AC_TAGVAR(predep_objects, $1) \
 
8662
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
8663
    _LT_AC_TAGVAR(predeps, $1) \
 
8664
    _LT_AC_TAGVAR(postdeps, $1) \
 
8665
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
8666
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
8667
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
8668
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
8669
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
8670
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
8671
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
8672
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
8673
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
8674
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
8675
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
8676
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
8677
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
8678
    _LT_AC_TAGVAR(include_expsyms, $1); do
 
8679
 
 
8680
    case $var in
 
8681
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
8682
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
8683
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
8684
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
8685
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
8686
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
8687
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
8688
    postinstall_cmds | postuninstall_cmds | \
 
8689
    old_postinstall_cmds | old_postuninstall_cmds | \
 
8690
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
8691
      # Double-quote double-evaled strings.
 
8692
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 
8693
      ;;
 
8694
    *)
 
8695
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 
8696
      ;;
 
8697
    esac
 
8698
  done
 
8699
 
 
8700
  case $lt_echo in
 
8701
  *'\[$]0 --fallback-echo"')
 
8702
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
8703
    ;;
 
8704
  esac
 
8705
 
 
8706
ifelse([$1], [],
 
8707
  [cfgfile="${ofile}T"
 
8708
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
8709
  $rm -f "$cfgfile"
 
8710
  AC_MSG_NOTICE([creating $ofile])],
 
8711
  [cfgfile="$ofile"])
 
8712
 
 
8713
  cat <<__EOF__ >> "$cfgfile"
 
8714
ifelse([$1], [],
 
8715
[#! $SHELL
 
8716
 
 
8717
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
8718
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 
8719
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
8720
#
 
8721
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
8722
# Free Software Foundation, Inc.
 
8723
#
 
8724
# This file is part of GNU Libtool:
 
8725
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
8726
#
 
8727
# This program is free software; you can redistribute it and/or modify
 
8728
# it under the terms of the GNU General Public License as published by
 
8729
# the Free Software Foundation; either version 2 of the License, or
 
8730
# (at your option) any later version.
 
8731
#
 
8732
# This program is distributed in the hope that it will be useful, but
 
8733
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
8734
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
8735
# General Public License for more details.
 
8736
#
 
8737
# You should have received a copy of the GNU General Public License
 
8738
# along with this program; if not, write to the Free Software
 
8739
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
8740
#
 
8741
# As a special exception to the GNU General Public License, if you
 
8742
# distribute this file as part of a program that contains a
 
8743
# configuration script generated by Autoconf, you may include it under
 
8744
# the same distribution terms that you use for the rest of that program.
 
8745
 
 
8746
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
 
8747
Xsed="sed -e s/^X//"
 
8748
 
 
8749
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
8750
# if CDPATH is set.
 
8751
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
8752
 
 
8753
# The names of the tagged configurations supported by this script.
 
8754
available_tags=
 
8755
 
 
8756
# ### BEGIN LIBTOOL CONFIG],
 
8757
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
 
8758
 
 
8759
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
8760
 
 
8761
# Shell to use when invoking shell scripts.
 
8762
SHELL=$lt_SHELL
 
8763
 
 
8764
# Whether or not to build shared libraries.
 
8765
build_libtool_libs=$enable_shared
 
8766
 
 
8767
# Whether or not to build static libraries.
 
8768
build_old_libs=$enable_static
 
8769
 
 
8770
# Whether or not to add -lc for building shared libraries.
 
8771
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
8772
 
 
8773
# Whether or not to optimize for fast installation.
 
8774
fast_install=$enable_fast_install
 
8775
 
 
8776
# The host system.
 
8777
host_alias=$host_alias
 
8778
host=$host
 
8779
 
 
8780
# An echo program that does not interpret backslashes.
 
8781
echo=$lt_echo
 
8782
 
 
8783
# The archiver.
 
8784
AR=$lt_AR
 
8785
AR_FLAGS=$lt_AR_FLAGS
 
8786
 
 
8787
# A C compiler.
 
8788
LTCC=$lt_LTCC
 
8789
 
 
8790
# A language-specific compiler.
 
8791
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 
8792
 
 
8793
# Is the compiler the GNU C compiler?
 
8794
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
8795
 
 
8796
# The linker used to build libraries.
 
8797
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
 
8798
 
 
8799
# Whether we need hard or soft links.
 
8800
LN_S=$lt_LN_S
 
8801
 
 
8802
# A BSD-compatible nm program.
 
8803
NM=$lt_NM
 
8804
 
 
8805
# A sed program that does not truncate output.
 
8806
SED=$lt_SED
 
8807
 
 
8808
# A symbol stripping program
 
8809
STRIP=$STRIP
 
8810
 
 
8811
# Used to examine libraries when file_magic_cmd begins "file"
 
8812
MAGIC_CMD=$MAGIC_CMD
 
8813
 
 
8814
# Used on cygwin: DLL creation program.
 
8815
DLLTOOL="$DLLTOOL"
 
8816
 
 
8817
# Used on cygwin: object dumper.
 
8818
OBJDUMP="$OBJDUMP"
 
8819
 
 
8820
# Used on cygwin: assembler.
 
8821
AS="$AS"
 
8822
 
 
8823
# The name of the directory that contains temporary libtool files.
 
8824
objdir=$objdir
 
8825
 
 
8826
# How to create reloadable object files.
 
8827
reload_flag=$lt_reload_flag
 
8828
reload_cmds=$lt_reload_cmds
 
8829
 
 
8830
# How to pass a linker flag through the compiler.
 
8831
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
8832
 
 
8833
# Object file suffix (normally "o").
 
8834
objext="$ac_objext"
 
8835
 
 
8836
# Old archive suffix (normally "a").
 
8837
libext="$libext"
 
8838
 
 
8839
# Executable file suffix (normally "").
 
8840
exeext="$exeext"
 
8841
 
 
8842
# Additional compiler flags for building library objects.
 
8843
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
 
8844
pic_mode=$pic_mode
 
8845
 
 
8846
# What is the maximum length of a command?
 
8847
max_cmd_len=$lt_cv_sys_max_cmd_len
 
8848
 
 
8849
# Does compiler simultaneously support -c and -o options?
 
8850
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
8851
 
 
8852
# Must we lock files when doing compilation ?
 
8853
need_locks=$lt_need_locks
 
8854
 
 
8855
# Do we need the lib prefix for modules?
 
8856
need_lib_prefix=$need_lib_prefix
 
8857
 
 
8858
# Do we need a version for libraries?
 
8859
need_version=$need_version
 
8860
 
 
8861
# Whether dlopen is supported.
 
8862
dlopen_support=$enable_dlopen
 
8863
 
 
8864
# Whether dlopen of programs is supported.
 
8865
dlopen_self=$enable_dlopen_self
 
8866
 
 
8867
# Whether dlopen of statically linked programs is supported.
 
8868
dlopen_self_static=$enable_dlopen_self_static
 
8869
 
 
8870
# Compiler flag to prevent dynamic linking.
 
8871
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
 
8872
 
 
8873
# Compiler flag to turn off builtin functions.
 
8874
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
 
8875
 
 
8876
# Compiler flag to allow reflexive dlopens.
 
8877
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
 
8878
 
 
8879
# Compiler flag to generate shared objects directly from archives.
 
8880
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
 
8881
 
 
8882
# Compiler flag to generate thread-safe objects.
 
8883
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
 
8884
 
 
8885
# Library versioning type.
 
8886
version_type=$version_type
 
8887
 
 
8888
# Format of library name prefix.
 
8889
libname_spec=$lt_libname_spec
 
8890
 
 
8891
# List of archive names.  First name is the real one, the rest are links.
 
8892
# The last name is the one that the linker finds with -lNAME.
 
8893
library_names_spec=$lt_library_names_spec
 
8894
 
 
8895
# The coded name of the library, if different from the real name.
 
8896
soname_spec=$lt_soname_spec
 
8897
 
 
8898
# Commands used to build and install an old-style archive.
 
8899
RANLIB=$lt_RANLIB
 
8900
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
 
8901
old_postinstall_cmds=$lt_old_postinstall_cmds
 
8902
old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
8903
 
 
8904
# Create an old-style archive from a shared archive.
 
8905
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
 
8906
 
 
8907
# Create a temporary old-style archive to link instead of a shared archive.
 
8908
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
 
8909
 
 
8910
# Commands used to build and install a shared archive.
 
8911
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
8912
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
 
8913
postinstall_cmds=$lt_postinstall_cmds
 
8914
postuninstall_cmds=$lt_postuninstall_cmds
 
8915
 
 
8916
# Commands to strip libraries.
 
8917
old_striplib=$lt_old_striplib
 
8918
striplib=$lt_striplib
 
8919
 
 
8920
# Dependencies to place before the objects being linked to create a
 
8921
# shared library.
 
8922
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
8923
 
 
8924
# Dependencies to place after the objects being linked to create a
 
8925
# shared library.
 
8926
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
8927
 
 
8928
# Dependencies to place before the objects being linked to create a
 
8929
# shared library.
 
8930
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
8931
 
 
8932
# Dependencies to place after the objects being linked to create a
 
8933
# shared library.
 
8934
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
8935
 
 
8936
# The library search path used internally by the compiler when linking
 
8937
# a shared library.
 
8938
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
8939
 
 
8940
# Method to check whether dependent libraries are shared objects.
 
8941
deplibs_check_method=$lt_deplibs_check_method
 
8942
 
 
8943
# Command to use when deplibs_check_method == file_magic.
 
8944
file_magic_cmd=$lt_file_magic_cmd
 
8945
 
 
8946
# Flag that allows shared libraries with undefined symbols to be built.
 
8947
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
8948
 
 
8949
# Flag that forces no undefined symbols.
 
8950
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
 
8951
 
 
8952
# Commands used to finish a libtool library installation in a directory.
 
8953
finish_cmds=$lt_finish_cmds
 
8954
 
 
8955
# Same as above, but a single script fragment to be evaled but not shown.
 
8956
finish_eval=$lt_finish_eval
 
8957
 
 
8958
# Take the output of nm and produce a listing of raw symbols and C names.
 
8959
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
8960
 
 
8961
# Transform the output of nm in a proper C declaration
 
8962
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
8963
 
 
8964
# Transform the output of nm in a C name address pair
 
8965
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
8966
 
 
8967
# This is the shared library runtime path variable.
 
8968
runpath_var=$runpath_var
 
8969
 
 
8970
# This is the shared library path variable.
 
8971
shlibpath_var=$shlibpath_var
 
8972
 
 
8973
# Is shlibpath searched before the hard-coded library search path?
 
8974
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
8975
 
 
8976
# How to hardcode a shared library path into an executable.
 
8977
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
 
8978
 
 
8979
# Whether we should hardcode library paths into libraries.
 
8980
hardcode_into_libs=$hardcode_into_libs
 
8981
 
 
8982
# Flag to hardcode \$libdir into a binary during linking.
 
8983
# This must work even if \$libdir does not exist.
 
8984
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
8985
 
 
8986
# Whether we need a single -rpath flag with a separated argument.
 
8987
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
 
8988
 
 
8989
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 
8990
# resulting binary.
 
8991
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
 
8992
 
 
8993
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 
8994
# resulting binary.
 
8995
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
 
8996
 
 
8997
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 
8998
# the resulting binary.
 
8999
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
9000
 
 
9001
# Variables whose values should be saved in libtool wrapper scripts and
 
9002
# restored at relink time.
 
9003
variables_saved_for_relink="$variables_saved_for_relink"
 
9004
 
 
9005
# Whether libtool must link a program against all its dependency libraries.
 
9006
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
 
9007
 
 
9008
# Compile-time system search path for libraries
 
9009
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
9010
 
 
9011
# Run-time system search path for libraries
 
9012
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
9013
 
 
9014
# Fix the shell variable \$srcfile for the compiler.
 
9015
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
 
9016
 
 
9017
# Set to yes if exported symbols are required.
 
9018
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
 
9019
 
 
9020
# The commands to list exported symbols.
 
9021
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
 
9022
 
 
9023
# The commands to extract the exported symbol list from a shared archive.
 
9024
extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
9025
 
 
9026
# Symbols that should not be listed in the preloaded symbols.
 
9027
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
 
9028
 
 
9029
# Symbols that must always be exported.
 
9030
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
 
9031
 
 
9032
ifelse([$1],[],
 
9033
[# ### END LIBTOOL CONFIG],
 
9034
[# ### END LIBTOOL TAG CONFIG: $tagname])
 
9035
 
 
9036
__EOF__
 
9037
 
 
9038
ifelse([$1],[], [
 
9039
  case $host_os in
 
9040
  aix3*)
 
9041
    cat <<\EOF >> "$cfgfile"
 
9042
 
 
9043
# AIX sometimes has problems with the GCC collect2 program.  For some
 
9044
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
9045
# vanish in a puff of smoke.
 
9046
if test "X${COLLECT_NAMES+set}" != Xset; then
 
9047
  COLLECT_NAMES=
 
9048
  export COLLECT_NAMES
 
9049
fi
 
9050
EOF
 
9051
    ;;
 
9052
 
 
9053
  cygwin* | mingw* | pw32* | os2*)
 
9054
    cat <<'EOF' >> "$cfgfile"
 
9055
    # This is a source program that is used to create dlls on Windows
 
9056
    # Don't remove nor modify the starting and closing comments
 
9057
    _LT_AC_FILE_LTDLL_C
 
9058
    # This is a source program that is used to create import libraries
 
9059
    # on Windows for dlls which lack them. Don't remove nor modify the
 
9060
    # starting and closing comments
 
9061
    _LT_AC_FILE_IMPGEN_C
 
9062
EOF
 
9063
    ;;
 
9064
  esac
 
9065
 
 
9066
  # We use sed instead of cat because bash on DJGPP gets confused if
 
9067
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
9068
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
9069
  # is reportedly fixed, but why not run on old versions too?
 
9070
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
9071
 
 
9072
  mv -f "$cfgfile" "$ofile" || \
 
9073
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
9074
  chmod +x "$ofile"
 
9075
])
 
9076
else
 
9077
  # If there is no Makefile yet, we rely on a make rule to execute
 
9078
  # `config.status --recheck' to rerun these tests and create the
 
9079
  # libtool script then.
 
9080
  test -f Makefile && make "$ltmain"
 
9081
fi
 
9082
])# AC_LIBTOOL_CONFIG
 
9083
 
 
9084
 
 
9085
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
9086
# -------------------------------------------
 
9087
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
9088
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
9089
 
 
9090
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
9091
 
 
9092
if test "$GCC" = yes; then
 
9093
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
9094
 
 
9095
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
9096
    lt_cv_prog_compiler_rtti_exceptions,
 
9097
    [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
 
9098
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
9099
fi
 
9100
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
9101
 
 
9102
 
 
9103
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
9104
# ---------------------------------
 
9105
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
9106
[AC_REQUIRE([AC_CANONICAL_HOST])
 
9107
AC_REQUIRE([AC_PROG_NM])
 
9108
AC_REQUIRE([AC_OBJEXT])
 
9109
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
9110
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
9111
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
9112
[
 
9113
# These are sane defaults that work on at least a few old systems.
 
9114
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
9115
 
 
9116
# Character class describing NM global symbol codes.
 
9117
symcode='[[BCDEGRST]]'
 
9118
 
 
9119
# Regexp to match symbols that can be accessed directly from C.
 
9120
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
9121
 
 
9122
# Transform the above into a raw symbol and a C symbol.
 
9123
symxfrm='\1 \2\3 \3'
 
9124
 
 
9125
# Transform an extracted symbol line into a proper C declaration
 
9126
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
9127
 
 
9128
# Transform an extracted symbol line into symbol name and symbol address
 
9129
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'"
 
9130
 
 
9131
# Define system-specific variables.
 
9132
case $host_os in
 
9133
aix*)
 
9134
  symcode='[[BCDT]]'
 
9135
  ;;
 
9136
cygwin* | mingw* | pw32*)
 
9137
  symcode='[[ABCDGISTW]]'
 
9138
  ;;
 
9139
hpux*) # Its linker distinguishes data from code symbols
 
9140
  if test "$host_cpu" = ia64; then
 
9141
    symcode='[[ABCDEGRST]]'
 
9142
  fi
 
9143
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
9144
  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'"
 
9145
  ;;
 
9146
irix* | nonstopux*)
 
9147
  symcode='[[BCDEGRST]]'
 
9148
  ;;
 
9149
solaris* | sysv5*)
 
9150
  symcode='[[BDT]]'
 
9151
  ;;
 
9152
sysv4)
 
9153
  symcode='[[DFNSTU]]'
 
9154
  ;;
 
9155
esac
 
9156
 
 
9157
# Handle CRLF in mingw tool chain
 
9158
opt_cr=
 
9159
case $host_os in
 
9160
mingw*)
 
9161
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
9162
  ;;
 
9163
esac
 
9164
 
 
9165
# If we're using GNU nm, then use its standard symbol codes.
 
9166
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
 
9167
  symcode='[[ABCDGISTW]]'
 
9168
fi
 
9169
 
 
9170
# Try without a prefix undercore, then with it.
 
9171
for ac_symprfx in "" "_"; do
 
9172
 
 
9173
  # Write the raw and C identifiers.
 
9174
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
9175
 
 
9176
  # Check to see that the pipe works correctly.
 
9177
  pipe_works=no
 
9178
 
 
9179
  rm -f conftest*
 
9180
  cat > conftest.$ac_ext <<EOF
 
9181
#ifdef __cplusplus
 
9182
extern "C" {
 
9183
#endif
 
9184
char nm_test_var;
 
9185
void nm_test_func(){}
 
9186
#ifdef __cplusplus
 
9187
}
 
9188
#endif
 
9189
int main(){nm_test_var='a';nm_test_func();return(0);}
 
9190
EOF
 
9191
 
 
9192
  if AC_TRY_EVAL(ac_compile); then
 
9193
    # Now try to grab the symbols.
 
9194
    nlist=conftest.nm
 
9195
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
9196
      # Try sorting and uniquifying the output.
 
9197
      if sort "$nlist" | uniq > "$nlist"T; then
 
9198
        mv -f "$nlist"T "$nlist"
 
9199
      else
 
9200
        rm -f "$nlist"T
 
9201
      fi
 
9202
 
 
9203
      # Make sure that we snagged all the symbols we need.
 
9204
      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
 
9205
        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
 
9206
          cat <<EOF > conftest.$ac_ext
 
9207
#ifdef __cplusplus
 
9208
extern "C" {
 
9209
#endif
 
9210
 
 
9211
EOF
 
9212
          # Now generate the symbol file.
 
9213
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
9214
 
 
9215
          cat <<EOF >> conftest.$ac_ext
 
9216
#if defined (__STDC__) && __STDC__
 
9217
# define lt_ptr_t void *
 
9218
#else
 
9219
# define lt_ptr_t char *
 
9220
# define const
 
9221
#endif
 
9222
 
 
9223
/* The mapping between symbol names and symbols. */
 
9224
const struct {
 
9225
  const char *name;
 
9226
  lt_ptr_t address;
 
9227
}
 
9228
lt_preloaded_symbols[[]] =
 
9229
{
 
9230
EOF
 
9231
          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
9232
          cat <<\EOF >> conftest.$ac_ext
 
9233
  {0, (lt_ptr_t) 0}
 
9234
};
 
9235
 
 
9236
#ifdef __cplusplus
 
9237
}
 
9238
#endif
 
9239
EOF
 
9240
          # Now try linking the two files.
 
9241
          mv conftest.$ac_objext conftstm.$ac_objext
 
9242
          lt_save_LIBS="$LIBS"
 
9243
          lt_save_CFLAGS="$CFLAGS"
 
9244
          LIBS="conftstm.$ac_objext"
 
9245
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
9246
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
9247
            pipe_works=yes
 
9248
          fi
 
9249
          LIBS="$lt_save_LIBS"
 
9250
          CFLAGS="$lt_save_CFLAGS"
 
9251
        else
 
9252
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
9253
        fi
 
9254
      else
 
9255
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
9256
      fi
 
9257
    else
 
9258
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
9259
    fi
 
9260
  else
 
9261
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
9262
    cat conftest.$ac_ext >&5
 
9263
  fi
 
9264
  rm -f conftest* conftst*
 
9265
 
 
9266
  # Do not use the global_symbol_pipe unless it works.
 
9267
  if test "$pipe_works" = yes; then
 
9268
    break
 
9269
  else
 
9270
    lt_cv_sys_global_symbol_pipe=
 
9271
  fi
 
9272
done
 
9273
])
 
9274
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
9275
  lt_cv_sys_global_symbol_to_cdecl=
 
9276
fi
 
9277
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
9278
  AC_MSG_RESULT(failed)
 
9279
else
 
9280
  AC_MSG_RESULT(ok)
 
9281
fi
 
9282
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
9283
 
 
9284
 
 
9285
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
9286
# ---------------------------------------
 
9287
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
9288
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
9289
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9290
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
9291
 
 
9292
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
9293
 ifelse([$1],[CXX],[
 
9294
  # C++ specific cases for pic, static, wl, etc.
 
9295
  if test "$GXX" = yes; then
 
9296
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9297
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
9298
 
 
9299
    case $host_os in
 
9300
    aix*)
 
9301
      # All AIX code is PIC.
 
9302
      if test "$host_cpu" = ia64; then
 
9303
        # AIX 5 now supports IA64 processor
 
9304
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9305
      fi
 
9306
      ;;
 
9307
    amigaos*)
 
9308
      # FIXME: we need at least 68020 code to build shared libraries, but
 
9309
      # adding the `-m68020' flag to GCC prevents building anything better,
 
9310
      # like `-m68040'.
 
9311
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
9312
      ;;
 
9313
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
9314
      # PIC is the default for these OSes.
 
9315
      ;;
 
9316
    cygwin* | mingw* | os2*)
 
9317
      # This hack is so that the source file can tell whether it is being
 
9318
      # built for inclusion in a dll (and should export symbols for example).
 
9319
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
9320
      ;;
 
9321
    darwin* | rhapsody*)
 
9322
      # PIC is the default on this platform
 
9323
      # Common symbols not allowed in MH_DYLIB files
 
9324
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
9325
      ;;
 
9326
    *djgpp*)
 
9327
      # DJGPP does not support shared libraries at all
 
9328
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9329
      ;;
 
9330
    sysv4*MP*)
 
9331
      if test -d /usr/nec; then
 
9332
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
9333
      fi
 
9334
      ;;
 
9335
    hpux*)
 
9336
      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
 
9337
      if test "$host_cpu" != ia64; then
 
9338
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9339
      fi
 
9340
      ;;
 
9341
    *)
 
9342
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9343
      ;;
 
9344
    esac
 
9345
  else
 
9346
    case $host_os in
 
9347
      aix4* | aix5*)
 
9348
        # All AIX code is PIC.
 
9349
        if test "$host_cpu" = ia64; then
 
9350
          # AIX 5 now supports IA64 processor
 
9351
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9352
        else
 
9353
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
9354
        fi
 
9355
        ;;
 
9356
      chorus*)
 
9357
        case $cc_basename in
 
9358
        cxch68)
 
9359
          # Green Hills C++ Compiler
 
9360
          # _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"
 
9361
          ;;
 
9362
        esac
 
9363
        ;;
 
9364
      dgux*)
 
9365
        case $cc_basename in
 
9366
          ec++)
 
9367
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9368
            ;;
 
9369
          ghcx)
 
9370
            # Green Hills C++ Compiler
 
9371
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9372
            ;;
 
9373
          *)
 
9374
            ;;
 
9375
        esac
 
9376
        ;;
 
9377
      freebsd*)
 
9378
        # FreeBSD uses GNU C++
 
9379
        ;;
 
9380
      hpux9* | hpux10* | hpux11*)
 
9381
        case $cc_basename in
 
9382
          CC)
 
9383
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9384
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
9385
            if test "$host_cpu" != ia64; then
 
9386
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
9387
            fi
 
9388
            ;;
 
9389
          aCC)
 
9390
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9391
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
9392
            if test "$host_cpu" != ia64; then
 
9393
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
9394
            fi
 
9395
            ;;
 
9396
          *)
 
9397
            ;;
 
9398
        esac
 
9399
        ;;
 
9400
      irix5* | irix6* | nonstopux*)
 
9401
        case $cc_basename in
 
9402
          CC)
 
9403
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9404
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9405
            # CC pic flag -KPIC is the default.
 
9406
            ;;
 
9407
          *)
 
9408
            ;;
 
9409
        esac
 
9410
        ;;
 
9411
      linux*)
 
9412
        case $cc_basename in
 
9413
          KCC)
 
9414
            # KAI C++ Compiler
 
9415
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
9416
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9417
            ;;
 
9418
          cxx)
 
9419
            # Compaq C++
 
9420
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
9421
            # Linux and Compaq Tru64 Unix objects are PIC.
 
9422
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9423
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9424
            ;;
 
9425
          *)
 
9426
            ;;
 
9427
        esac
 
9428
        ;;
 
9429
      lynxos*)
 
9430
        ;;
 
9431
      m88k*)
 
9432
        ;;
 
9433
      mvs*)
 
9434
        case $cc_basename in
 
9435
          cxx)
 
9436
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
9437
            ;;
 
9438
          *)
 
9439
            ;;
 
9440
        esac
 
9441
        ;;
 
9442
      netbsd*)
 
9443
        ;;
 
9444
      osf3* | osf4* | osf5*)
 
9445
        case $cc_basename in
 
9446
          KCC)
 
9447
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
9448
            ;;
 
9449
          RCC)
 
9450
            # Rational C++ 2.4.1
 
9451
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9452
            ;;
 
9453
          cxx)
 
9454
            # Digital/Compaq C++
 
9455
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9456
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
9457
            # Linux and Compaq Tru64 Unix objects are PIC.
 
9458
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9459
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9460
            ;;
 
9461
          *)
 
9462
            ;;
 
9463
        esac
 
9464
        ;;
 
9465
      psos*)
 
9466
        ;;
 
9467
      sco*)
 
9468
        case $cc_basename in
 
9469
          CC)
 
9470
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9471
            ;;
 
9472
          *)
 
9473
            ;;
 
9474
        esac
 
9475
        ;;
 
9476
      solaris*)
 
9477
        case $cc_basename in
 
9478
          CC)
 
9479
            # Sun C++ 4.2, 5.x and Centerline C++
 
9480
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9481
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9482
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
9483
            ;;
 
9484
          gcx)
 
9485
            # Green Hills C++ Compiler
 
9486
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
9487
            ;;
 
9488
          *)
 
9489
            ;;
 
9490
        esac
 
9491
        ;;
 
9492
      sunos4*)
 
9493
        case $cc_basename in
 
9494
          CC)
 
9495
            # Sun C++ 4.x
 
9496
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9497
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9498
            ;;
 
9499
          lcc)
 
9500
            # Lucid
 
9501
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9502
            ;;
 
9503
          *)
 
9504
            ;;
 
9505
        esac
 
9506
        ;;
 
9507
      tandem*)
 
9508
        case $cc_basename in
 
9509
          NCC)
 
9510
            # NonStop-UX NCC 3.20
 
9511
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9512
            ;;
 
9513
          *)
 
9514
            ;;
 
9515
        esac
 
9516
        ;;
 
9517
      unixware*)
 
9518
        ;;
 
9519
      vxworks*)
 
9520
        ;;
 
9521
      *)
 
9522
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
9523
        ;;
 
9524
    esac
 
9525
  fi
 
9526
],
 
9527
[
 
9528
  if test "$GCC" = yes; then
 
9529
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9530
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
9531
 
 
9532
    case $host_os in
 
9533
      aix*)
 
9534
      # All AIX code is PIC.
 
9535
      if test "$host_cpu" = ia64; then
 
9536
        # AIX 5 now supports IA64 processor
 
9537
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9538
      fi
 
9539
      ;;
 
9540
 
 
9541
    amigaos*)
 
9542
      # FIXME: we need at least 68020 code to build shared libraries, but
 
9543
      # adding the `-m68020' flag to GCC prevents building anything better,
 
9544
      # like `-m68040'.
 
9545
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
9546
      ;;
 
9547
 
 
9548
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
9549
      # PIC is the default for these OSes.
 
9550
      ;;
 
9551
 
 
9552
    cygwin* | mingw* | pw32* | os2*)
 
9553
      # This hack is so that the source file can tell whether it is being
 
9554
      # built for inclusion in a dll (and should export symbols for example).
 
9555
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
9556
      ;;
 
9557
 
 
9558
    darwin* | rhapsody*)
 
9559
      # PIC is the default on this platform
 
9560
      # Common symbols not allowed in MH_DYLIB files
 
9561
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
9562
      ;;
 
9563
 
 
9564
    msdosdjgpp*)
 
9565
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
9566
      # on systems that don't support them.
 
9567
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
9568
      enable_shared=no
 
9569
      ;;
 
9570
 
 
9571
    sysv4*MP*)
 
9572
      if test -d /usr/nec; then
 
9573
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
9574
      fi
 
9575
      ;;
 
9576
 
 
9577
    hpux*)
 
9578
      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
 
9579
      if test "$host_cpu" != ia64; then
 
9580
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9581
      fi
 
9582
      ;;
 
9583
 
 
9584
    *)
 
9585
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
9586
      ;;
 
9587
    esac
 
9588
  else
 
9589
    # PORTME Check for flag to pass linker flags through the system compiler.
 
9590
    case $host_os in
 
9591
    aix*)
 
9592
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9593
      if test "$host_cpu" = ia64; then
 
9594
        # AIX 5 now supports IA64 processor
 
9595
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9596
      else
 
9597
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
9598
      fi
 
9599
      ;;
 
9600
 
 
9601
    cygwin* | mingw* | pw32* | os2*)
 
9602
      # This hack is so that the source file can tell whether it is being
 
9603
      # built for inclusion in a dll (and should export symbols for example).
 
9604
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
9605
      ;;
 
9606
 
 
9607
    hpux9* | hpux10* | hpux11*)
 
9608
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9609
      if test "$host_cpu" != ia64; then
 
9610
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
9611
      fi
 
9612
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
9613
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
9614
      ;;
 
9615
 
 
9616
    irix5* | irix6* | nonstopux*)
 
9617
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9618
      # PIC (with -KPIC) is the default.
 
9619
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9620
      ;;
 
9621
 
 
9622
    newsos6)
 
9623
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9624
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9625
      ;;
 
9626
 
 
9627
    osf3* | osf4* | osf5*)
 
9628
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9629
      # All OSF/1 code is PIC.
 
9630
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
9631
      ;;
 
9632
 
 
9633
    sco3.2v5*)
 
9634
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
 
9635
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
 
9636
      ;;
 
9637
 
 
9638
    solaris*)
 
9639
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9640
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9641
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9642
      ;;
 
9643
 
 
9644
    sunos4*)
 
9645
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
9646
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
9647
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9648
      ;;
 
9649
 
 
9650
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
9651
      if test "x$host_vendor" = xsni; then
 
9652
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
 
9653
      else
 
9654
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
9655
      fi
 
9656
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
9657
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9658
      ;;
 
9659
 
 
9660
    sysv4*MP*)
 
9661
      if test -d /usr/nec ;then
 
9662
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
9663
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9664
      fi
 
9665
      ;;
 
9666
 
 
9667
    uts4*)
 
9668
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
9669
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
9670
      ;;
 
9671
 
 
9672
    *)
 
9673
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
9674
      ;;
 
9675
    esac
 
9676
  fi
 
9677
])
 
9678
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
9679
 
 
9680
#
 
9681
# Check to make sure the PIC flag actually works.
 
9682
#
 
9683
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
9684
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
9685
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
9686
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
 
9687
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
9688
     "" | " "*) ;;
 
9689
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
9690
     esac],
 
9691
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9692
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
9693
fi
 
9694
case "$host_os" in
 
9695
  # For platforms which do not support PIC, -DPIC is meaningless:
 
9696
  *djgpp*)
 
9697
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
9698
    ;;
 
9699
  *)
 
9700
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
 
9701
    ;;
 
9702
esac
 
9703
])
 
9704
 
 
9705
 
 
9706
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
9707
# ------------------------------------
 
9708
# See if the linker supports building shared libraries.
 
9709
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
9710
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
9711
ifelse([$1],[CXX],[
 
9712
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
9713
  case $host_os in
 
9714
  aix4* | aix5*)
 
9715
    # If we're using GNU nm, then we don't want the "-C" option.
 
9716
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
9717
    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
 
9718
      _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'
 
9719
    else
 
9720
      _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'
 
9721
    fi
 
9722
    ;;
 
9723
  cygwin* | mingw* | pw32*)
 
9724
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
9725
  ;;
 
9726
  *)
 
9727
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
9728
  ;;
 
9729
  esac
 
9730
],[
 
9731
  runpath_var=
 
9732
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
9733
 
 
9734
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
9735
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
 
9736
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
9737
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
9738
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
9739
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
9740
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
9741
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
9742
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
9743
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
9744
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
9745
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
9746
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
9747
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
9748
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
9749
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
9750
  # include_expsyms should be a list of space-separated symbols to be *always*
 
9751
  # included in the symbol list
 
9752
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
9753
  # exclude_expsyms can be an egrep regular expression of symbols to exclude
 
9754
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
9755
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
9756
  # as well as any symbol that contains `d'.
 
9757
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
9758
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
9759
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
9760
  # the symbol is explicitly referenced.  Since portable code cannot
 
9761
  # rely on this symbol name, it's probably fine to never include it in
 
9762
  # preloaded symbol tables.
 
9763
  extract_expsyms_cmds=
 
9764
 
 
9765
  case $host_os in
 
9766
  cygwin* | mingw* | pw32*)
 
9767
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
9768
    # When not using gcc, we currently assume that we are using
 
9769
    # Microsoft Visual C++.
 
9770
    if test "$GCC" != yes; then
 
9771
      with_gnu_ld=no
 
9772
    fi
 
9773
    ;;
 
9774
  openbsd*)
 
9775
    with_gnu_ld=no
 
9776
    ;;
 
9777
  esac
 
9778
 
 
9779
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
9780
  if test "$with_gnu_ld" = yes; then
 
9781
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
9782
    wlarc='${wl}'
 
9783
 
 
9784
    # See if GNU ld supports shared libraries.
 
9785
    case $host_os in
 
9786
    aix3* | aix4* | aix5*)
 
9787
      # On AIX/PPC, the GNU linker is very broken
 
9788
      if test "$host_cpu" != ia64; then
 
9789
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9790
        cat <<EOF 1>&2
 
9791
 
 
9792
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
9793
*** to be unable to reliably create shared libraries on AIX.
 
9794
*** Therefore, libtool is disabling shared libraries support.  If you
 
9795
*** really care for shared libraries, you may want to modify your PATH
 
9796
*** so that a non-GNU linker is found, and then restart.
 
9797
 
 
9798
EOF
 
9799
      fi
 
9800
      ;;
 
9801
 
 
9802
    amigaos*)
 
9803
      _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)'
 
9804
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
9805
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
9806
 
 
9807
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
9808
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
9809
      # to version 4, is to share data among multiple programs linked
 
9810
      # with the same dynamic library.  Since this doesn't match the
 
9811
      # behavior of shared libraries on other platforms, we can't use
 
9812
      # them.
 
9813
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9814
      ;;
 
9815
 
 
9816
    beos*)
 
9817
      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
9818
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
9819
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
9820
        # support --undefined.  This deserves some investigation.  FIXME
 
9821
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9822
      else
 
9823
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9824
      fi
 
9825
      ;;
 
9826
 
 
9827
    cygwin* | mingw* | pw32*)
 
9828
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
 
9829
      # no search path for DLLs.
 
9830
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
9831
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
9832
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
9833
 
 
9834
      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
 
9835
        sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
 
9836
        test -f $output_objdir/impgen.exe || (cd $output_objdir && \
 
9837
        if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
 
9838
        else $CC -o impgen impgen.c ; fi)~
 
9839
        $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
 
9840
 
 
9841
      _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
 
9842
 
 
9843
      # cygwin and mingw dlls have different entry points and sets of symbols
 
9844
      # to exclude.
 
9845
      # FIXME: what about values for MSVC?
 
9846
      dll_entry=__cygwin_dll_entry@12
 
9847
      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
 
9848
      case $host_os in
 
9849
      mingw*)
 
9850
        # mingw values
 
9851
        dll_entry=_DllMainCRTStartup@12
 
9852
        dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
 
9853
        ;;
 
9854
      esac
 
9855
 
 
9856
      # mingw and cygwin differ, and it's simplest to just exclude the union
 
9857
      # of the two symbol sets.
 
9858
      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
 
9859
 
 
9860
      # recent cygwin and mingw systems supply a stub DllMain which the user
 
9861
      # can override, but on older systems we have to supply one (in ltdll.c)
 
9862
      if test "x$lt_cv_need_dllmain" = "xyes"; then
 
9863
        ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
 
9864
        ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
 
9865
        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
 
9866
      else
 
9867
        ltdll_obj=
 
9868
        ltdll_cmds=
 
9869
      fi
 
9870
 
 
9871
      # Extract the symbol export list from an `--export-all' def file,
 
9872
      # then regenerate the def file from the symbol export list, so that
 
9873
      # the compiled dll only exports the symbol export list.
 
9874
      # Be careful not to strip the DATA tag left by newer dlltools.
 
9875
      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
 
9876
        $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
 
9877
        sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
 
9878
 
 
9879
      # If the export-symbols file already is a .def file (1st line
 
9880
      # is EXPORTS), use it as is.
 
9881
      # If DATA tags from a recent dlltool are present, honour them!
 
9882
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
 
9883
          cp $export_symbols $output_objdir/$soname-def;
 
9884
        else
 
9885
          echo EXPORTS > $output_objdir/$soname-def;
 
9886
          _lt_hint=1;
 
9887
          cat $export_symbols | while read symbol; do
 
9888
           set dummy \$symbol;
 
9889
           case \[$]# in
 
9890
             2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
 
9891
             *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
 
9892
           esac;
 
9893
           _lt_hint=`expr 1 + \$_lt_hint`;
 
9894
          done;
 
9895
        fi~
 
9896
        '"$ltdll_cmds"'
 
9897
        $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
 
9898
        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
 
9899
        $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
 
9900
        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
 
9901
        $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
 
9902
      ;;
 
9903
 
 
9904
    netbsd*)
 
9905
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
9906
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
9907
        wlarc=
 
9908
      else
 
9909
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9910
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
9911
      fi
 
9912
      ;;
 
9913
 
 
9914
    solaris* | sysv5*)
 
9915
      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
 
9916
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9917
        cat <<EOF 1>&2
 
9918
 
 
9919
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
9920
*** create shared libraries on Solaris systems.  Therefore, libtool
 
9921
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
9922
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
9923
*** your PATH or compiler configuration so that the native linker is
 
9924
*** used, and then restart.
 
9925
 
 
9926
EOF
 
9927
      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
9928
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9929
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
9930
      else
 
9931
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9932
      fi
 
9933
      ;;
 
9934
 
 
9935
    sunos4*)
 
9936
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
9937
      wlarc=
 
9938
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
9939
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
9940
      ;;
 
9941
 
 
9942
    *)
 
9943
      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
9944
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
9945
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
9946
      else
 
9947
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
9948
      fi
 
9949
      ;;
 
9950
    esac
 
9951
 
 
9952
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
 
9953
      runpath_var=LD_RUN_PATH
 
9954
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
9955
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
9956
      case $host_os in
 
9957
      cygwin* | mingw* | pw32*)
 
9958
        # dlltool doesn't understand --whole-archive et. al.
 
9959
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
9960
        ;;
 
9961
      *)
 
9962
        # ancient GNU ld didn't support --whole-archive et. al.
 
9963
        if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
 
9964
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
9965
        else
 
9966
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
9967
        fi
 
9968
        ;;
 
9969
      esac
 
9970
    fi
 
9971
  else
 
9972
    # PORTME fill in a description of your system's linker (not GNU ld)
 
9973
    case $host_os in
 
9974
    aix3*)
 
9975
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
9976
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
9977
      _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'
 
9978
      # Note: this linker hardcodes the directories in LIBPATH if there
 
9979
      # are no directories specified by -L.
 
9980
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
9981
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
9982
        # Neither direct hardcoding nor static linking is supported with a
 
9983
        # broken collect2.
 
9984
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
9985
      fi
 
9986
      ;;
 
9987
 
 
9988
    aix4* | aix5*)
 
9989
      if test "$host_cpu" = ia64; then
 
9990
        # On IA64, the linker does run time linking by default, so we don't
 
9991
        # have to do anything special.
 
9992
        aix_use_runtimelinking=no
 
9993
        exp_sym_flag='-Bexport'
 
9994
        no_entry_flag=""
 
9995
      else
 
9996
        # If we're using GNU nm, then we don't want the "-C" option.
 
9997
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
9998
        if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
 
9999
          _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'
 
10000
        else
 
10001
          _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'
 
10002
        fi
 
10003
 
 
10004
        # KDE requires run time linking.  Make it the default.
 
10005
        aix_use_runtimelinking=yes
 
10006
        exp_sym_flag='-bexport'
 
10007
        no_entry_flag='-bnoentry'
 
10008
      fi
 
10009
 
 
10010
      # When large executables or shared objects are built, AIX ld can
 
10011
      # have problems creating the table of contents.  If linking a library
 
10012
      # or program results in "error TOC overflow" add -mminimal-toc to
 
10013
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
10014
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
10015
 
 
10016
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
10017
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10018
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
10019
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10020
 
 
10021
      if test "$GCC" = yes; then
 
10022
        case $host_os in aix4.[012]|aix4.[012].*)
 
10023
        # We only want to do this on AIX 4.2 and lower, the check
 
10024
        # below for broken collect2 doesn't work under 4.3+
 
10025
          collect2name=`${CC} -print-prog-name=collect2`
 
10026
          if test -f "$collect2name" && \
 
10027
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
10028
          then
 
10029
          # We have reworked collect2
 
10030
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10031
          else
 
10032
          # We have old collect2
 
10033
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
10034
          # It fails to find uninstalled libraries when the uninstalled
 
10035
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
10036
          # to unsupported forces relinking
 
10037
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10038
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10039
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
10040
          fi
 
10041
        esac
 
10042
        shared_flag='-shared'
 
10043
      else
 
10044
        # not using gcc
 
10045
        if test "$host_cpu" = ia64; then
 
10046
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
10047
        # chokes on -Wl,-G. The following line is correct:
 
10048
          shared_flag='-G'
 
10049
        else
 
10050
        if test "$aix_use_runtimelinking" = yes; then
 
10051
            shared_flag='-qmkshrobj ${wl}-G'
 
10052
          else
 
10053
            shared_flag='-qmkshrobj'
 
10054
        fi
 
10055
        fi
 
10056
      fi
 
10057
 
 
10058
      # Let the compiler handle the export list.
 
10059
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
10060
      if test "$aix_use_runtimelinking" = yes; then
 
10061
        # Warning - without using the other runtime loading flags (-brtl),
 
10062
        # -berok will link without error, but may produce a broken library.
 
10063
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
10064
       # Determine the default libpath from the value encoded in an empty executable.
 
10065
        _LT_AC_SYS_LIBPATH_AIX
 
10066
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
10067
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
 
10068
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
10069
       else
 
10070
        if test "$host_cpu" = ia64; then
 
10071
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
10072
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
10073
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
10074
        else
 
10075
         # Determine the default libpath from the value encoded in an empty executable.
 
10076
         _LT_AC_SYS_LIBPATH_AIX
 
10077
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
10078
          # Warning - without using the other run time loading flags,
 
10079
          # -berok will link without error, but may produce a broken library.
 
10080
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
10081
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
10082
          # -bexpall does not export symbols beginning with underscore (_)
 
10083
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
10084
          # Exported symbols can be pulled into shared objects from archives
 
10085
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
10086
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
10087
          # This is similar to how AIX traditionally builds it's shared libraries.
 
10088
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
10089
        fi
 
10090
      fi
 
10091
      ;;
 
10092
 
 
10093
    amigaos*)
 
10094
      _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)'
 
10095
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10096
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10097
      # see comment about different semantics on the GNU ld section
 
10098
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10099
      ;;
 
10100
 
 
10101
    bsdi4*)
 
10102
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
10103
      ;;
 
10104
 
 
10105
    cygwin* | mingw* | pw32*)
 
10106
      # When not using gcc, we currently assume that we are using
 
10107
      # Microsoft Visual C++.
 
10108
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
10109
      # no search path for DLLs.
 
10110
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
10111
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10112
      # Tell ltmain to make .lib files, not .a files.
 
10113
      libext=lib
 
10114
      # FIXME: Setting linknames here is a bad hack.
 
10115
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
10116
      # The linker will automatically build a .lib file if we build a DLL.
 
10117
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
10118
      # FIXME: Should let the user specify the lib program.
 
10119
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
10120
      fix_srcfile_path='`cygpath -w "$srcfile"`'
 
10121
      ;;
 
10122
 
 
10123
    darwin* | rhapsody*)
 
10124
      case "$host_os" in
 
10125
      rhapsody* | darwin1.[[012]])
 
10126
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
10127
        ;;
 
10128
      *) # Darwin 1.3 on
 
10129
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
10130
        ;;
 
10131
      esac
 
10132
 
 
10133
      # FIXME: Relying on posixy $() will cause problems for
 
10134
      #        cross-compilation, but unfortunately the echo tests do not
 
10135
      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
 
10136
      #        `"' quotes if we put them in here... so don't!
 
10137
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
 
10138
      # We need to add '_' to the symbols in $export_symbols first
 
10139
      #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
 
10140
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10141
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10142
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
10143
      ;;
 
10144
 
 
10145
    dgux*)
 
10146
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10147
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10148
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10149
      ;;
 
10150
 
 
10151
    freebsd1*)
 
10152
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10153
      ;;
 
10154
 
 
10155
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
10156
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
10157
    # does not break anything, and helps significantly (at the cost of a little
 
10158
    # extra space).
 
10159
    freebsd2.2*)
 
10160
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
10161
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10162
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10163
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10164
      ;;
 
10165
 
 
10166
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
10167
    freebsd2*)
 
10168
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10169
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10170
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10171
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10172
      ;;
 
10173
 
 
10174
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
10175
    freebsd*)
 
10176
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
10177
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10178
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10179
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10180
      ;;
 
10181
 
 
10182
    hpux9* | hpux10* | hpux11*)
 
10183
      if test "$GCC" = yes; then
 
10184
        case $host_os in
 
10185
          hpux9*)
 
10186
            _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
10187
            ;;
 
10188
          *)
 
10189
            if test "$host_cpu" = ia64; then
 
10190
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10191
            else
 
10192
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
10193
            fi
 
10194
            ;;
 
10195
        esac
 
10196
      else
 
10197
        case $host_os in
 
10198
          hpux9*)
 
10199
            _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'
 
10200
            ;;
 
10201
          *)
 
10202
            if test "$host_cpu" = ia64; then
 
10203
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10204
            else
 
10205
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
10206
            fi
 
10207
            ;;
 
10208
        esac
 
10209
      fi
 
10210
      if test "$host_cpu" = ia64; then
 
10211
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10212
        _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
10213
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10214
      else
 
10215
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
10216
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10217
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10218
      fi
 
10219
      # hardcode_minus_L: Not really in the search PATH,
 
10220
      # but as the default location of the library.
 
10221
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10222
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10223
      ;;
 
10224
 
 
10225
    irix5* | irix6* | nonstopux*)
 
10226
      if test "$GCC" = yes; then
 
10227
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
10228
      else
 
10229
        _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'
 
10230
      fi
 
10231
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10232
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10233
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10234
      ;;
 
10235
 
 
10236
    netbsd*)
 
10237
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
10238
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
10239
      else
 
10240
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
10241
      fi
 
10242
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10243
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10244
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10245
      ;;
 
10246
 
 
10247
    newsos6)
 
10248
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10249
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10250
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10251
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10252
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10253
      ;;
 
10254
 
 
10255
    openbsd*)
 
10256
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10257
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10258
 
 
10259
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
10260
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
10261
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
10262
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
10263
      else
 
10264
       case $host_os in
 
10265
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
10266
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
10267
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10268
           ;;
 
10269
         *)
 
10270
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
10271
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
10272
           ;;
 
10273
       esac
 
10274
      fi
 
10275
      ;;
 
10276
 
 
10277
    os2*)
 
10278
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10279
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10280
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
10281
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
10282
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
10283
      ;;
 
10284
 
 
10285
    osf3*)
 
10286
      if test "$GCC" = yes; then
 
10287
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
10288
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
10289
      else
 
10290
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
10291
        _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'
 
10292
      fi
 
10293
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10294
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10295
      ;;
 
10296
 
 
10297
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
10298
      if test "$GCC" = yes; then
 
10299
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
10300
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
10301
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
10302
      else
 
10303
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
10304
        _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'
 
10305
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 
10306
        $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'
 
10307
 
 
10308
        # Both c and cxx compiler support -rpath directly
 
10309
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
10310
      fi
 
10311
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
10312
      ;;
 
10313
 
 
10314
    sco3.2v5*)
 
10315
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10316
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10317
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
10318
      runpath_var=LD_RUN_PATH
 
10319
      hardcode_runpath_var=yes
 
10320
      ;;
 
10321
 
 
10322
    solaris*)
 
10323
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
10324
      if test "$GCC" = yes; then
 
10325
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10326
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10327
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
10328
      else
 
10329
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10330
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10331
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
10332
      fi
 
10333
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
10334
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10335
      case $host_os in
 
10336
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
10337
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
 
10338
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
10339
      esac
 
10340
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
10341
      ;;
 
10342
 
 
10343
    sunos4*)
 
10344
      if test "x$host_vendor" = xsequent; then
 
10345
        # Use $CC to link under sequent, because it throws in some extra .o
 
10346
        # files that make .init and .fini sections work.
 
10347
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
10348
      else
 
10349
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
10350
      fi
 
10351
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10352
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10353
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
10354
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10355
      ;;
 
10356
 
 
10357
    sysv4)
 
10358
      if test "x$host_vendor" = xsni; then
 
10359
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10360
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
10361
      else
 
10362
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10363
        _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
10364
      fi
 
10365
      runpath_var='LD_RUN_PATH'
 
10366
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10367
      ;;
 
10368
 
 
10369
    sysv4.3*)
 
10370
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10371
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10372
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
10373
      ;;
 
10374
 
 
10375
    sysv4*MP*)
 
10376
      if test -d /usr/nec; then
 
10377
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10378
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10379
        runpath_var=LD_RUN_PATH
 
10380
        hardcode_runpath_var=yes
 
10381
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
10382
      fi
 
10383
      ;;
 
10384
 
 
10385
    sysv4.2uw2*)
 
10386
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
10387
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
10388
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
10389
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10390
      hardcode_runpath_var=yes
 
10391
      runpath_var=LD_RUN_PATH
 
10392
      ;;
 
10393
 
 
10394
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
 
10395
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
 
10396
      if test "$GCC" = yes; then
 
10397
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10398
      else
 
10399
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
10400
      fi
 
10401
      runpath_var='LD_RUN_PATH'
 
10402
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10403
      ;;
 
10404
 
 
10405
    sysv5*)
 
10406
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
10407
      # $CC -shared without GNU ld will not create a library from C++
 
10408
      # object files and a static libstdc++, better avoid it by now
 
10409
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10410
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
10411
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
10412
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
10413
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10414
      runpath_var='LD_RUN_PATH'
 
10415
      ;;
 
10416
 
 
10417
    uts4*)
 
10418
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
10419
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
10420
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
10421
      ;;
 
10422
 
 
10423
    *)
 
10424
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
10425
      ;;
 
10426
    esac
 
10427
  fi
 
10428
])
 
10429
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
10430
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
10431
 
 
10432
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
10433
if test "$GCC" = yes; then
 
10434
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
10435
fi
 
10436
 
 
10437
#
 
10438
# Do we need to explicitly link libc?
 
10439
#
 
10440
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
10441
if test "$enable_shared" = yes && test "$GCC" = yes; then
 
10442
  case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
10443
  *'~'*)
 
10444
    # FIXME: we may have to deal with multi-command sequences.
 
10445
    ;;
 
10446
  '$CC '*)
 
10447
    # Test whether the compiler implicitly links with -lc since on some
 
10448
    # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
10449
    # to ld, don't add -lc before -lgcc.
 
10450
    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
10451
    $rm conftest*
 
10452
    echo 'static int dummy;' > conftest.$ac_ext
 
10453
 
 
10454
    if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
10455
      soname=conftest
 
10456
      lib=conftest
 
10457
      libobjs=conftest.$ac_objext
 
10458
      deplibs=
 
10459
      wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
10460
      compiler_flags=-v
 
10461
      linker_flags=-v
 
10462
      verstring=
 
10463
      output_objdir=.
 
10464
      libname=conftest
 
10465
      lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
10466
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
10467
      if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
10468
      then
 
10469
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
10470
      else
 
10471
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
10472
      fi
 
10473
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
10474
    else
 
10475
      cat conftest.err 1>&5
 
10476
    fi
 
10477
    $rm conftest*
 
10478
    AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
10479
    ;;
 
10480
  esac
 
10481
fi
 
10482
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
10483
 
 
10484
 
 
10485
# _LT_AC_FILE_LTDLL_C
 
10486
# -------------------
 
10487
# Be careful that the start marker always follows a newline.
 
10488
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
 
10489
# /* ltdll.c starts here */
 
10490
# #define WIN32_LEAN_AND_MEAN
 
10491
# #include <windows.h>
 
10492
# #undef WIN32_LEAN_AND_MEAN
 
10493
# #include <stdio.h>
 
10494
#
 
10495
# #ifndef __CYGWIN__
 
10496
# #  ifdef __CYGWIN32__
 
10497
# #    define __CYGWIN__ __CYGWIN32__
 
10498
# #  endif
 
10499
# #endif
 
10500
#
 
10501
# #ifdef __cplusplus
 
10502
# extern "C" {
 
10503
# #endif
 
10504
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
 
10505
# #ifdef __cplusplus
 
10506
# }
 
10507
# #endif
 
10508
#
 
10509
# #ifdef __CYGWIN__
 
10510
# #include <cygwin/cygwin_dll.h>
 
10511
# DECLARE_CYGWIN_DLL( DllMain );
 
10512
# #endif
 
10513
# HINSTANCE __hDllInstance_base;
 
10514
#
 
10515
# BOOL APIENTRY
 
10516
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
 
10517
# {
 
10518
#   __hDllInstance_base = hInst;
 
10519
#   return TRUE;
 
10520
# }
 
10521
# /* ltdll.c ends here */
 
10522
])# _LT_AC_FILE_LTDLL_C
 
10523
 
 
10524
 
 
10525
# _LT_AC_FILE_IMPGEN_C
 
10526
# --------------------
 
10527
# Be careful that the start marker always follows a newline.
 
10528
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
 
10529
# /* impgen.c starts here */
 
10530
# /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
 
10531
#
 
10532
#  This file is part of GNU libtool.
 
10533
#
 
10534
#  This program is free software; you can redistribute it and/or modify
 
10535
#  it under the terms of the GNU General Public License as published by
 
10536
#  the Free Software Foundation; either version 2 of the License, or
 
10537
#  (at your option) any later version.
 
10538
#
 
10539
#  This program is distributed in the hope that it will be useful,
 
10540
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10541
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10542
#  GNU General Public License for more details.
 
10543
#
 
10544
#  You should have received a copy of the GNU General Public License
 
10545
#  along with this program; if not, write to the Free Software
 
10546
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
10547
#  */
 
10548
#
 
10549
# #include <stdio.h>            /* for printf() */
 
10550
# #include <unistd.h>           /* for open(), lseek(), read() */
 
10551
# #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
 
10552
# #include <string.h>           /* for strdup() */
 
10553
#
 
10554
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
 
10555
# #ifndef O_BINARY
 
10556
# #define O_BINARY 0
 
10557
# #endif
 
10558
#
 
10559
# static unsigned int
 
10560
# pe_get16 (fd, offset)
 
10561
#      int fd;
 
10562
#      int offset;
 
10563
# {
 
10564
#   unsigned char b[2];
 
10565
#   lseek (fd, offset, SEEK_SET);
 
10566
#   read (fd, b, 2);
 
10567
#   return b[0] + (b[1]<<8);
 
10568
# }
 
10569
#
 
10570
# static unsigned int
 
10571
# pe_get32 (fd, offset)
 
10572
#     int fd;
 
10573
#     int offset;
 
10574
# {
 
10575
#   unsigned char b[4];
 
10576
#   lseek (fd, offset, SEEK_SET);
 
10577
#   read (fd, b, 4);
 
10578
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
 
10579
# }
 
10580
#
 
10581
# static unsigned int
 
10582
# pe_as32 (ptr)
 
10583
#      void *ptr;
 
10584
# {
 
10585
#   unsigned char *b = ptr;
 
10586
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
 
10587
# }
 
10588
#
 
10589
# int
 
10590
# main (argc, argv)
 
10591
#     int argc;
 
10592
#     char *argv[];
 
10593
# {
 
10594
#     int dll;
 
10595
#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
 
10596
#     unsigned long export_rva, export_size, nsections, secptr, expptr;
 
10597
#     unsigned long name_rvas, nexp;
 
10598
#     unsigned char *expdata, *erva;
 
10599
#     char *filename, *dll_name;
 
10600
#
 
10601
#     filename = argv[1];
 
10602
#
 
10603
#     dll = open(filename, O_RDONLY|O_BINARY);
 
10604
#     if (dll < 1)
 
10605
#       return 1;
 
10606
#
 
10607
#     dll_name = filename;
 
10608
#
 
10609
#     for (i=0; filename[i]; i++)
 
10610
#       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
 
10611
#           dll_name = filename + i +1;
 
10612
#
 
10613
#     pe_header_offset = pe_get32 (dll, 0x3c);
 
10614
#     opthdr_ofs = pe_header_offset + 4 + 20;
 
10615
#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
 
10616
#
 
10617
#     if (num_entries < 1) /* no exports */
 
10618
#       return 1;
 
10619
#
 
10620
#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
 
10621
#     export_size = pe_get32 (dll, opthdr_ofs + 100);
 
10622
#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
 
10623
#     secptr = (pe_header_offset + 4 + 20 +
 
10624
#             pe_get16 (dll, pe_header_offset + 4 + 16));
 
10625
#
 
10626
#     expptr = 0;
 
10627
#     for (i = 0; i < nsections; i++)
 
10628
#     {
 
10629
#       char sname[8];
 
10630
#       unsigned long secptr1 = secptr + 40 * i;
 
10631
#       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
 
10632
#       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
 
10633
#       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
 
10634
#       lseek(dll, secptr1, SEEK_SET);
 
10635
#       read(dll, sname, 8);
 
10636
#       if (vaddr <= export_rva && vaddr+vsize > export_rva)
 
10637
#       {
 
10638
#           expptr = fptr + (export_rva - vaddr);
 
10639
#           if (export_rva + export_size > vaddr + vsize)
 
10640
#               export_size = vsize - (export_rva - vaddr);
 
10641
#           break;
 
10642
#       }
 
10643
#     }
 
10644
#
 
10645
#     expdata = (unsigned char*)malloc(export_size);
 
10646
#     lseek (dll, expptr, SEEK_SET);
 
10647
#     read (dll, expdata, export_size);
 
10648
#     erva = expdata - export_rva;
 
10649
#
 
10650
#     nexp = pe_as32 (expdata+24);
 
10651
#     name_rvas = pe_as32 (expdata+32);
 
10652
#
 
10653
#     printf ("EXPORTS\n");
 
10654
#     for (i = 0; i<nexp; i++)
 
10655
#     {
 
10656
#       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
 
10657
#       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
 
10658
#     }
 
10659
#
 
10660
#     return 0;
 
10661
# }
 
10662
# /* impgen.c ends here */
 
10663
])# _LT_AC_FILE_IMPGEN_C
 
10664
 
 
10665
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
10666
# ---------------------------------
 
10667
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
10668
 
 
10669
 
 
10670
# old names
 
10671
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
 
10672
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
 
10673
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
 
10674
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
10675
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
10676
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
 
10677
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
 
10678
 
 
10679
# This is just to silence aclocal about the macro not being used
 
10680
ifelse([AC_DISABLE_FAST_INSTALL])
 
10681
 
 
10682
AC_DEFUN([LT_AC_PROG_GCJ],
 
10683
[AC_CHECK_TOOL(GCJ, gcj, no)
 
10684
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
10685
  AC_SUBST(GCJFLAGS)
 
10686
])
 
10687
 
 
10688
AC_DEFUN([LT_AC_PROG_RC],
 
10689
[AC_CHECK_TOOL(RC, windres, no)
 
10690
])
 
10691
 
 
10692
# NOTE: This macro has been submitted for inclusion into   #
 
10693
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
10694
#  a released version of Autoconf we should remove this    #
 
10695
#  macro and use it instead.                               #
 
10696
# LT_AC_PROG_SED
 
10697
# --------------
 
10698
# Check for a fully-functional sed program, that truncates
 
10699
# as few characters as possible.  Prefer GNU sed if found.
 
10700
AC_DEFUN([LT_AC_PROG_SED],
 
10701
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
10702
AC_CACHE_VAL(lt_cv_path_SED,
 
10703
[# Loop through the user's path and test for sed and gsed.
 
10704
# Then use that list of sed's as ones to test for truncation.
 
10705
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
10706
for as_dir in $PATH
 
10707
do
 
10708
  IFS=$as_save_IFS
 
10709
  test -z "$as_dir" && as_dir=.
 
10710
  for ac_prog in sed gsed; do
 
10711
    for ac_exec_ext in '' $ac_executable_extensions; do
 
10712
      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 
10713
        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
 
10714
      fi
 
10715
    done
 
10716
  done
 
10717
done
 
10718
 
 
10719
  # Create a temporary directory, and hook for its removal unless debugging.
 
10720
$debug ||
 
10721
{
 
10722
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
 
10723
  trap '{ (exit 1); exit 1; }' 1 2 13 15
 
10724
}
 
10725
 
 
10726
# Create a (secure) tmp directory for tmp files.
 
10727
: ${TMPDIR=/tmp}
 
10728
{
 
10729
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
 
10730
  test -n "$tmp" && test -d "$tmp"
 
10731
}  ||
 
10732
{
 
10733
  tmp=$TMPDIR/sed$$-$RANDOM
 
10734
  (umask 077 && mkdir $tmp)
 
10735
} ||
 
10736
{
 
10737
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
 
10738
   { (exit 1); exit 1; }
 
10739
}
 
10740
  _max=0
 
10741
  _count=0
 
10742
  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
10743
  # along with /bin/sed that truncates output.
 
10744
  for _sed in $_sed_list /usr/xpg4/bin/sed; do
 
10745
    test ! -f ${_sed} && break
 
10746
    cat /dev/null > "$tmp/sed.in"
 
10747
    _count=0
 
10748
    echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
 
10749
    # Check for GNU sed and select it if it is found.
 
10750
    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
 
10751
      lt_cv_path_SED=${_sed}
 
10752
      break;
 
10753
    fi
 
10754
    while true; do
 
10755
      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
 
10756
      mv "$tmp/sed.tmp" "$tmp/sed.in"
 
10757
      cp "$tmp/sed.in" "$tmp/sed.nl"
 
10758
      echo >>"$tmp/sed.nl"
 
10759
      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
 
10760
      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
 
10761
      # 10000 chars as input seems more than enough
 
10762
      test $_count -gt 10 && break
 
10763
      _count=`expr $_count + 1`
 
10764
      if test $_count -gt $_max; then
 
10765
        _max=$_count
 
10766
        lt_cv_path_SED=$_sed
 
10767
      fi
 
10768
    done
 
10769
  done
 
10770
  rm -rf "$tmp"
 
10771
])
 
10772
AC_MSG_RESULT([$SED])
 
10773
])
 
10774
 
 
10775
# Do all the work for Automake.                            -*- Autoconf -*-
 
10776
 
 
10777
# This macro actually does too much some checks are only needed if
 
10778
# your package does certain things.  But this isn't really a big deal.
 
10779
 
 
10780
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
 
10781
# Free Software Foundation, Inc.
 
10782
 
 
10783
# This program is free software; you can redistribute it and/or modify
 
10784
# it under the terms of the GNU General Public License as published by
 
10785
# the Free Software Foundation; either version 2, or (at your option)
 
10786
# any later version.
 
10787
 
 
10788
# This program is distributed in the hope that it will be useful,
 
10789
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10790
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10791
# GNU General Public License for more details.
 
10792
 
 
10793
# You should have received a copy of the GNU General Public License
 
10794
# along with this program; if not, write to the Free Software
 
10795
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
10796
# 02111-1307, USA.
 
10797
 
 
10798
# serial 10
 
10799
 
 
10800
AC_PREREQ([2.54])
 
10801
 
 
10802
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
 
10803
# the ones we care about.
 
10804
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
10805
 
 
10806
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
10807
# AM_INIT_AUTOMAKE([OPTIONS])
 
10808
# -----------------------------------------------
 
10809
# The call with PACKAGE and VERSION arguments is the old style
 
10810
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
10811
# and VERSION should now be passed to AC_INIT and removed from
 
10812
# the call to AM_INIT_AUTOMAKE.
 
10813
# We support both call styles for the transition.  After
 
10814
# the next Automake release, Autoconf can make the AC_INIT
 
10815
# arguments mandatory, and then we can depend on a new Autoconf
 
10816
# release and drop the old call support.
 
10817
AC_DEFUN([AM_INIT_AUTOMAKE],
 
10818
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
10819
 AC_REQUIRE([AC_PROG_INSTALL])dnl
 
10820
# test to see if srcdir already configured
 
10821
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
10822
   test -f $srcdir/config.status; then
 
10823
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
10824
fi
 
10825
 
 
10826
# test whether we have cygpath
 
10827
if test -z "$CYGPATH_W"; then
 
10828
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
10829
    CYGPATH_W='cygpath -w'
 
10830
  else
 
10831
    CYGPATH_W=echo
 
10832
  fi
 
10833
fi
 
10834
AC_SUBST([CYGPATH_W])
 
10835
 
 
10836
# Define the identity of the package.
 
10837
dnl Distinguish between old-style and new-style calls.
 
10838
m4_ifval([$2],
 
10839
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
10840
 AC_SUBST([PACKAGE], [$1])dnl
 
10841
 AC_SUBST([VERSION], [$2])],
 
10842
[_AM_SET_OPTIONS([$1])dnl
 
10843
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
10844
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
10845
 
 
10846
_AM_IF_OPTION([no-define],,
 
10847
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
10848
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
10849
 
 
10850
# Some tools Automake needs.
 
10851
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
10852
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
10853
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
10854
AM_MISSING_PROG(AUTOCONF, autoconf)
 
10855
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
10856
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
10857
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
10858
AM_MISSING_PROG(AMTAR, tar)
 
10859
AM_PROG_INSTALL_SH
 
10860
AM_PROG_INSTALL_STRIP
 
10861
# We need awk for the "check" target.  The system "awk" is bad on
 
10862
# some platforms.
 
10863
AC_REQUIRE([AC_PROG_AWK])dnl
 
10864
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
10865
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
10866
 
 
10867
_AM_IF_OPTION([no-dependencies],,
 
10868
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
10869
                  [_AM_DEPENDENCIES(CC)],
 
10870
                  [define([AC_PROG_CC],
 
10871
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
10872
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
10873
                  [_AM_DEPENDENCIES(CXX)],
 
10874
                  [define([AC_PROG_CXX],
 
10875
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
10876
])
 
10877
])
 
10878
 
 
10879
 
 
10880
# When config.status generates a header, we must update the stamp-h file.
 
10881
# This file resides in the same directory as the config header
 
10882
# that is generated.  The stamp files are numbered to have different names.
 
10883
 
 
10884
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
10885
# loop where config.status creates the headers, so we can generate
 
10886
# our stamp files there.
 
10887
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
10888
[# Compute $1's index in $config_headers.
 
10889
_am_stamp_count=1
 
10890
for _am_header in $config_headers :; do
 
10891
  case $_am_header in
 
10892
    $1 | $1:* )
 
10893
      break ;;
 
10894
    * )
 
10895
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
10896
  esac
 
10897
done
 
10898
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
10899
 
 
10900
# Copyright 2002  Free Software Foundation, Inc.
 
10901
 
 
10902
# This program is free software; you can redistribute it and/or modify
 
10903
# it under the terms of the GNU General Public License as published by
 
10904
# the Free Software Foundation; either version 2, or (at your option)
 
10905
# any later version.
 
10906
 
 
10907
# This program is distributed in the hope that it will be useful,
 
10908
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10909
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10910
# GNU General Public License for more details.
 
10911
 
 
10912
# You should have received a copy of the GNU General Public License
 
10913
# along with this program; if not, write to the Free Software
 
10914
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19
10915
 
20
10916
# AM_AUTOMAKE_VERSION(VERSION)
21
10917
# ----------------------------
22
10918
# Automake X.Y traces this macro to ensure aclocal.m4 has been
23
10919
# generated from the m4 files accompanying Automake X.Y.
24
 
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
10920
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
25
10921
 
26
10922
# AM_SET_CURRENT_AUTOMAKE_VERSION
27
10923
# -------------------------------
28
10924
# Call AM_AUTOMAKE_VERSION so it can be traced.
29
10925
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
30
10926
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
31
 
         [AM_AUTOMAKE_VERSION([1.9.6])])
32
 
 
33
 
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
34
 
 
35
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
36
 
#
37
 
# This file is free software; the Free Software Foundation
38
 
# gives unlimited permission to copy and/or distribute it,
39
 
# with or without modifications, as long as this notice is preserved.
 
10927
         [AM_AUTOMAKE_VERSION([1.7.6])])
 
10928
 
 
10929
# Helper functions for option handling.                    -*- Autoconf -*-
 
10930
 
 
10931
# Copyright 2001, 2002  Free Software Foundation, Inc.
 
10932
 
 
10933
# This program is free software; you can redistribute it and/or modify
 
10934
# it under the terms of the GNU General Public License as published by
 
10935
# the Free Software Foundation; either version 2, or (at your option)
 
10936
# any later version.
 
10937
 
 
10938
# This program is distributed in the hope that it will be useful,
 
10939
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10940
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10941
# GNU General Public License for more details.
 
10942
 
 
10943
# You should have received a copy of the GNU General Public License
 
10944
# along with this program; if not, write to the Free Software
 
10945
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
10946
# 02111-1307, USA.
 
10947
 
 
10948
# serial 2
 
10949
 
 
10950
# _AM_MANGLE_OPTION(NAME)
 
10951
# -----------------------
 
10952
AC_DEFUN([_AM_MANGLE_OPTION],
 
10953
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
10954
 
 
10955
# _AM_SET_OPTION(NAME)
 
10956
# ------------------------------
 
10957
# Set option NAME.  Presently that only means defining a flag for this option.
 
10958
AC_DEFUN([_AM_SET_OPTION],
 
10959
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
10960
 
 
10961
# _AM_SET_OPTIONS(OPTIONS)
 
10962
# ----------------------------------
 
10963
# OPTIONS is a space-separated list of Automake options.
 
10964
AC_DEFUN([_AM_SET_OPTIONS],
 
10965
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
10966
 
 
10967
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
10968
# -------------------------------------------
 
10969
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
10970
AC_DEFUN([_AM_IF_OPTION],
 
10971
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
10972
 
 
10973
#
 
10974
# Check to make sure that the build environment is sane.
 
10975
#
 
10976
 
 
10977
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
10978
 
 
10979
# This program is free software; you can redistribute it and/or modify
 
10980
# it under the terms of the GNU General Public License as published by
 
10981
# the Free Software Foundation; either version 2, or (at your option)
 
10982
# any later version.
 
10983
 
 
10984
# This program is distributed in the hope that it will be useful,
 
10985
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10986
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10987
# GNU General Public License for more details.
 
10988
 
 
10989
# You should have received a copy of the GNU General Public License
 
10990
# along with this program; if not, write to the Free Software
 
10991
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
10992
# 02111-1307, USA.
 
10993
 
 
10994
# serial 3
 
10995
 
 
10996
# AM_SANITY_CHECK
 
10997
# ---------------
 
10998
AC_DEFUN([AM_SANITY_CHECK],
 
10999
[AC_MSG_CHECKING([whether build environment is sane])
 
11000
# Just in case
 
11001
sleep 1
 
11002
echo timestamp > conftest.file
 
11003
# Do `set' in a subshell so we don't clobber the current shell's
 
11004
# arguments.  Must try -L first in case configure is actually a
 
11005
# symlink; some systems play weird games with the mod time of symlinks
 
11006
# (eg FreeBSD returns the mod time of the symlink's containing
 
11007
# directory).
 
11008
if (
 
11009
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
11010
   if test "$[*]" = "X"; then
 
11011
      # -L didn't work.
 
11012
      set X `ls -t $srcdir/configure conftest.file`
 
11013
   fi
 
11014
   rm -f conftest.file
 
11015
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
11016
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
11017
 
 
11018
      # If neither matched, then we have a broken ls.  This can happen
 
11019
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
11020
      # broken ls alias from the environment.  This has actually
 
11021
      # happened.  Such a system could not be considered "sane".
 
11022
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
11023
alias in your environment])
 
11024
   fi
 
11025
 
 
11026
   test "$[2]" = conftest.file
 
11027
   )
 
11028
then
 
11029
   # Ok.
 
11030
   :
 
11031
else
 
11032
   AC_MSG_ERROR([newly created file is older than distributed files!
 
11033
Check your system clock])
 
11034
fi
 
11035
AC_MSG_RESULT(yes)])
 
11036
 
 
11037
#  -*- Autoconf -*-
 
11038
 
 
11039
 
 
11040
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
11041
 
 
11042
# This program is free software; you can redistribute it and/or modify
 
11043
# it under the terms of the GNU General Public License as published by
 
11044
# the Free Software Foundation; either version 2, or (at your option)
 
11045
# any later version.
 
11046
 
 
11047
# This program is distributed in the hope that it will be useful,
 
11048
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11049
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11050
# GNU General Public License for more details.
 
11051
 
 
11052
# You should have received a copy of the GNU General Public License
 
11053
# along with this program; if not, write to the Free Software
 
11054
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11055
# 02111-1307, USA.
 
11056
 
 
11057
# serial 3
 
11058
 
 
11059
# AM_MISSING_PROG(NAME, PROGRAM)
 
11060
# ------------------------------
 
11061
AC_DEFUN([AM_MISSING_PROG],
 
11062
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
11063
$1=${$1-"${am_missing_run}$2"}
 
11064
AC_SUBST($1)])
 
11065
 
 
11066
 
 
11067
# AM_MISSING_HAS_RUN
 
11068
# ------------------
 
11069
# Define MISSING if not defined so far and test if it supports --run.
 
11070
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
11071
AC_DEFUN([AM_MISSING_HAS_RUN],
 
11072
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
11073
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
11074
# Use eval to expand $SHELL
 
11075
if eval "$MISSING --run true"; then
 
11076
  am_missing_run="$MISSING --run "
 
11077
else
 
11078
  am_missing_run=
 
11079
  AC_MSG_WARN([`missing' script is too old or missing])
 
11080
fi
 
11081
])
 
11082
 
 
11083
# AM_AUX_DIR_EXPAND
 
11084
 
 
11085
# Copyright 2001 Free Software Foundation, Inc.
 
11086
 
 
11087
# This program is free software; you can redistribute it and/or modify
 
11088
# it under the terms of the GNU General Public License as published by
 
11089
# the Free Software Foundation; either version 2, or (at your option)
 
11090
# any later version.
 
11091
 
 
11092
# This program is distributed in the hope that it will be useful,
 
11093
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11094
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11095
# GNU General Public License for more details.
 
11096
 
 
11097
# You should have received a copy of the GNU General Public License
 
11098
# along with this program; if not, write to the Free Software
 
11099
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11100
# 02111-1307, USA.
40
11101
 
41
11102
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42
11103
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
76
11137
# absolute PATH.  The drawback is that using absolute paths prevent a
77
11138
# configured tree to be moved without reconfiguration.
78
11139
 
79
 
AC_DEFUN([AM_AUX_DIR_EXPAND],
80
 
[dnl Rely on autoconf to set up CDPATH properly.
81
 
AC_PREREQ([2.50])dnl
 
11140
# Rely on autoconf to set up CDPATH properly.
 
11141
AC_PREREQ([2.50])
 
11142
 
 
11143
AC_DEFUN([AM_AUX_DIR_EXPAND], [
82
11144
# expand $ac_aux_dir to an absolute path
83
11145
am_aux_dir=`cd $ac_aux_dir && pwd`
84
11146
])
85
11147
 
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='#'
 
11148
# AM_PROG_INSTALL_SH
 
11149
# ------------------
 
11150
# Define $install_sh.
 
11151
 
 
11152
# Copyright 2001 Free Software Foundation, Inc.
 
11153
 
 
11154
# This program is free software; you can redistribute it and/or modify
 
11155
# it under the terms of the GNU General Public License as published by
 
11156
# the Free Software Foundation; either version 2, or (at your option)
 
11157
# any later version.
 
11158
 
 
11159
# This program is distributed in the hope that it will be useful,
 
11160
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11161
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11162
# GNU General Public License for more details.
 
11163
 
 
11164
# You should have received a copy of the GNU General Public License
 
11165
# along with this program; if not, write to the Free Software
 
11166
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11167
# 02111-1307, USA.
 
11168
 
 
11169
AC_DEFUN([AM_PROG_INSTALL_SH],
 
11170
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
11171
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
11172
AC_SUBST(install_sh)])
 
11173
 
 
11174
# AM_PROG_INSTALL_STRIP
 
11175
 
 
11176
# Copyright 2001 Free Software Foundation, Inc.
 
11177
 
 
11178
# This program is free software; you can redistribute it and/or modify
 
11179
# it under the terms of the GNU General Public License as published by
 
11180
# the Free Software Foundation; either version 2, or (at your option)
 
11181
# any later version.
 
11182
 
 
11183
# This program is distributed in the hope that it will be useful,
 
11184
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11185
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11186
# GNU General Public License for more details.
 
11187
 
 
11188
# You should have received a copy of the GNU General Public License
 
11189
# along with this program; if not, write to the Free Software
 
11190
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11191
# 02111-1307, USA.
 
11192
 
 
11193
# One issue with vendor `install' (even GNU) is that you can't
 
11194
# specify the program used to strip binaries.  This is especially
 
11195
# annoying in cross-compiling environments, where the build's strip
 
11196
# is unlikely to handle the host's binaries.
 
11197
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
11198
# always use install-sh in `make install-strip', and initialize
 
11199
# STRIPPROG with the value of the STRIP variable (set by the user).
 
11200
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
11201
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
11202
# Installed binaries are usually stripped using `strip' when the user
 
11203
# run `make install-strip'.  However `strip' might not be the right
 
11204
# tool to use in cross-compilation environments, therefore Automake
 
11205
# will honor the `STRIP' environment variable to overrule this program.
 
11206
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
11207
if test "$cross_compiling" != no; then
 
11208
  AC_CHECK_TOOL([STRIP], [strip], :)
 
11209
fi
 
11210
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
11211
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
11212
 
 
11213
#                                                          -*- Autoconf -*-
 
11214
# Copyright (C) 2003  Free Software Foundation, Inc.
 
11215
 
 
11216
# This program is free software; you can redistribute it and/or modify
 
11217
# it under the terms of the GNU General Public License as published by
 
11218
# the Free Software Foundation; either version 2, or (at your option)
 
11219
# any later version.
 
11220
 
 
11221
# This program is distributed in the hope that it will be useful,
 
11222
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11223
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11224
# GNU General Public License for more details.
 
11225
 
 
11226
# You should have received a copy of the GNU General Public License
 
11227
# along with this program; if not, write to the Free Software
 
11228
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11229
# 02111-1307, USA.
 
11230
 
 
11231
# serial 1
 
11232
 
 
11233
# Check whether the underlying file-system supports filenames
 
11234
# with a leading dot.  For instance MS-DOS doesn't.
 
11235
AC_DEFUN([AM_SET_LEADING_DOT],
 
11236
[rm -rf .tst 2>/dev/null
 
11237
mkdir .tst 2>/dev/null
 
11238
if test -d .tst; then
 
11239
  am__leading_dot=.
109
11240
else
110
 
  $1_TRUE='#'
111
 
  $1_FALSE=
 
11241
  am__leading_dot=_
112
11242
fi
113
 
AC_CONFIG_COMMANDS_PRE(
114
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
115
 
  AC_MSG_ERROR([[conditional "$1" was never defined.
116
 
Usually this means the macro was only invoked conditionally.]])
117
 
fi])])
118
 
 
119
 
 
120
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
121
 
# Free Software Foundation, Inc.
122
 
#
123
 
# This file is free software; the Free Software Foundation
124
 
# gives unlimited permission to copy and/or distribute it,
125
 
# with or without modifications, as long as this notice is preserved.
126
 
 
127
 
# serial 8
 
11243
rmdir .tst 2>/dev/null
 
11244
AC_SUBST([am__leading_dot])])
 
11245
 
 
11246
# serial 5                                              -*- Autoconf -*-
 
11247
 
 
11248
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 
11249
 
 
11250
# This program is free software; you can redistribute it and/or modify
 
11251
# it under the terms of the GNU General Public License as published by
 
11252
# the Free Software Foundation; either version 2, or (at your option)
 
11253
# any later version.
 
11254
 
 
11255
# This program is distributed in the hope that it will be useful,
 
11256
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11257
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11258
# GNU General Public License for more details.
 
11259
 
 
11260
# You should have received a copy of the GNU General Public License
 
11261
# along with this program; if not, write to the Free Software
 
11262
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11263
# 02111-1307, USA.
 
11264
 
128
11265
 
129
11266
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
130
11267
# written in clear, in which case automake, when reading aclocal.m4,
133
11270
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
134
11271
 
135
11272
 
 
11273
 
136
11274
# _AM_DEPENDENCIES(NAME)
137
11275
# ----------------------
138
11276
# See how the compiler implements dependency checking.
191
11329
    : > sub/conftest.c
192
11330
    for i in 1 2 3 4 5 6; do
193
11331
      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
 
11332
      : > sub/conftst$i.h
197
11333
    done
198
11334
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
199
11335
 
221
11357
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
222
11358
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
223
11359
      # 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
 
11360
      # (even with -Werror).  So we grep stderr for any message
 
11361
      # that says an option was ignored.
 
11362
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
232
11363
        am_cv_$1_dependencies_compiler_type=$depmode
233
11364
        break
234
11365
      fi
262
11393
# ------------
263
11394
AC_DEFUN([AM_DEP_TRACK],
264
11395
[AC_ARG_ENABLE(dependency-tracking,
265
 
[  --disable-dependency-tracking  speeds up one-time build
266
 
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
11396
[  --disable-dependency-tracking Speeds up one-time builds
 
11397
  --enable-dependency-tracking  Do not reject slow dependency extractors])
267
11398
if test "x$enable_dependency_tracking" != xno; then
268
11399
  am_depcomp="$ac_aux_dir/depcomp"
269
11400
  AMDEPBACKSLASH='\'
272
11403
AC_SUBST([AMDEPBACKSLASH])
273
11404
])
274
11405
 
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
 
11406
# Generate code to set up dependency tracking.   -*- Autoconf -*-
 
11407
 
 
11408
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
11409
 
 
11410
# This program is free software; you can redistribute it and/or modify
 
11411
# it under the terms of the GNU General Public License as published by
 
11412
# the Free Software Foundation; either version 2, or (at your option)
 
11413
# any later version.
 
11414
 
 
11415
# This program is distributed in the hope that it will be useful,
 
11416
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11417
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11418
# GNU General Public License for more details.
 
11419
 
 
11420
# You should have received a copy of the GNU General Public License
 
11421
# along with this program; if not, write to the Free Software
 
11422
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11423
# 02111-1307, USA.
 
11424
 
 
11425
#serial 2
285
11426
 
286
11427
# _AM_OUTPUT_DEPENDENCY_COMMANDS
287
11428
# ------------------------------
300
11441
  else
301
11442
    continue
302
11443
  fi
303
 
  # Extract the definition of DEPDIR, am__include, and am__quote
304
 
  # from the Makefile without running `make'.
305
 
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
11444
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
 
11445
  # Extract the definition of DEP_FILES from the Makefile without
 
11446
  # running `make'.
 
11447
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
306
11448
  test -z "$DEPDIR" && continue
307
 
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
308
 
  test -z "am__include" && continue
309
 
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
310
11449
  # When using ansi2knr, U may be empty or an underscore; expand it
311
 
  U=`sed -n 's/^U = //p' < "$mf"`
312
 
  # Find all dependency output files, they are included files with
313
 
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
314
 
  # simplest approach to changing $(DEPDIR) to its actual value in the
315
 
  # expansion.
316
 
  for file in `sed -n "
317
 
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
11450
  U=`sed -n -e '/^U = / s///p' < "$mf"`
 
11451
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
 
11452
  # We invoke sed twice because it is the simplest approach to
 
11453
  # changing $(DEPDIR) to its actual value in the expansion.
 
11454
  for file in `sed -n -e '
 
11455
    /^DEP_FILES = .*\\\\$/ {
 
11456
      s/^DEP_FILES = //
 
11457
      :loop
 
11458
        s/\\\\$//
 
11459
        p
 
11460
        n
 
11461
        /\\\\$/ b loop
 
11462
      p
 
11463
    }
 
11464
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
318
11465
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
319
11466
    # Make sure the directory exists.
320
11467
    test -f "$dirpart/$file" && continue
340
11487
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
341
11488
])
342
11489
 
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.
 
11490
# Check to see how 'make' treats includes.      -*- Autoconf -*-
 
11491
 
 
11492
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 
11493
 
 
11494
# This program is free software; you can redistribute it and/or modify
 
11495
# it under the terms of the GNU General Public License as published by
 
11496
# the Free Software Foundation; either version 2, or (at your option)
 
11497
# any later version.
 
11498
 
 
11499
# This program is distributed in the hope that it will be useful,
 
11500
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11501
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11502
# GNU General Public License for more details.
 
11503
 
 
11504
# You should have received a copy of the GNU General Public License
 
11505
# along with this program; if not, write to the Free Software
 
11506
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11507
# 02111-1307, USA.
488
11508
 
489
11509
# serial 2
490
11510
 
491
 
# Check whether the underlying file-system supports filenames
492
 
# with a leading dot.  For instance MS-DOS doesn't.
493
 
AC_DEFUN([AM_SET_LEADING_DOT],
494
 
[rm -rf .tst 2>/dev/null
495
 
mkdir .tst 2>/dev/null
496
 
if test -d .tst; then
497
 
  am__leading_dot=.
498
 
else
499
 
  am__leading_dot=_
500
 
fi
501
 
rmdir .tst 2>/dev/null
502
 
AC_SUBST([am__leading_dot])])
503
 
 
504
 
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
505
 
# Free Software Foundation, Inc.
506
 
#
507
 
# This file is free software; the Free Software Foundation
508
 
# gives unlimited permission to copy and/or distribute it,
509
 
# with or without modifications, as long as this notice is preserved.
510
 
 
511
 
# serial 5
512
 
 
513
 
# AM_PROG_LEX
514
 
# -----------
515
 
# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
516
 
# "missing" invocation, for better error output.
517
 
AC_DEFUN([AM_PROG_LEX],
518
 
[AC_PREREQ(2.50)dnl
519
 
AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
520
 
AC_REQUIRE([AC_PROG_LEX])dnl
521
 
if test "$LEX" = :; then
522
 
  LEX=${am_missing_run}flex
523
 
fi])
524
 
 
525
 
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
526
 
 
527
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
528
 
#
529
 
# This file is free software; the Free Software Foundation
530
 
# gives unlimited permission to copy and/or distribute it,
531
 
# with or without modifications, as long as this notice is preserved.
532
 
 
533
 
# serial 3
534
 
 
535
11511
# AM_MAKE_INCLUDE()
536
11512
# -----------------
537
11513
# Check to see how make treats includes.
574
11550
rm -f confinc confmf
575
11551
])
576
11552
 
577
 
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
578
 
 
579
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
580
 
# Free Software Foundation, Inc.
581
 
#
582
 
# This file is free software; the Free Software Foundation
583
 
# gives unlimited permission to copy and/or distribute it,
584
 
# with or without modifications, as long as this notice is preserved.
585
 
 
586
 
# serial 4
587
 
 
588
 
# AM_MISSING_PROG(NAME, PROGRAM)
589
 
# ------------------------------
590
 
AC_DEFUN([AM_MISSING_PROG],
591
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
592
 
$1=${$1-"${am_missing_run}$2"}
593
 
AC_SUBST($1)])
594
 
 
595
 
 
596
 
# AM_MISSING_HAS_RUN
597
 
# ------------------
598
 
# Define MISSING if not defined so far and test if it supports --run.
599
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
600
 
AC_DEFUN([AM_MISSING_HAS_RUN],
601
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
602
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
603
 
# Use eval to expand $SHELL
604
 
if eval "$MISSING --run true"; then
605
 
  am_missing_run="$MISSING --run "
606
 
else
607
 
  am_missing_run=
608
 
  AC_MSG_WARN([`missing' script is too old or missing])
609
 
fi
610
 
])
611
 
 
612
 
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
613
 
#
614
 
# This file is free software; the Free Software Foundation
615
 
# gives unlimited permission to copy and/or distribute it,
616
 
# with or without modifications, as long as this notice is preserved.
617
 
 
618
 
# AM_PROG_MKDIR_P
619
 
# ---------------
620
 
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
621
 
#
622
 
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
623
 
# created by `make install' are always world readable, even if the
624
 
# installer happens to have an overly restrictive umask (e.g. 077).
625
 
# This was a mistake.  There are at least two reasons why we must not
626
 
# use `-m 0755':
627
 
#   - it causes special bits like SGID to be ignored,
628
 
#   - it may be too restrictive (some setups expect 775 directories).
629
 
#
630
 
# Do not use -m 0755 and let people choose whatever they expect by
631
 
# setting umask.
632
 
#
633
 
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
634
 
# Some implementations (such as Solaris 8's) are not thread-safe: if a
635
 
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
636
 
# concurrently, both version can detect that a/ is missing, but only
637
 
# one can create it and the other will error out.  Consequently we
638
 
# restrict ourselves to GNU make (using the --version option ensures
639
 
# this.)
640
 
AC_DEFUN([AM_PROG_MKDIR_P],
641
 
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
642
 
  # We used to keeping the `.' as first argument, in order to
643
 
  # allow $(mkdir_p) to be used without argument.  As in
644
 
  #   $(mkdir_p) $(somedir)
645
 
  # where $(somedir) is conditionally defined.  However this is wrong
646
 
  # for two reasons:
647
 
  #  1. if the package is installed by a user who cannot write `.'
648
 
  #     make install will fail,
649
 
  #  2. the above comment should most certainly read
650
 
  #     $(mkdir_p) $(DESTDIR)$(somedir)
651
 
  #     so it does not work when $(somedir) is undefined and
652
 
  #     $(DESTDIR) is not.
653
 
  #  To support the latter case, we have to write
654
 
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
655
 
  #  so the `.' trick is pointless.
656
 
  mkdir_p='mkdir -p --'
657
 
else
658
 
  # On NextStep and OpenStep, the `mkdir' command does not
659
 
  # recognize any option.  It will interpret all options as
660
 
  # directories to create, and then abort because `.' already
661
 
  # exists.
662
 
  for d in ./-p ./--version;
663
 
  do
664
 
    test -d $d && rmdir $d
665
 
  done
666
 
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
667
 
  if test -f "$ac_aux_dir/mkinstalldirs"; then
668
 
    mkdir_p='$(mkinstalldirs)'
669
 
  else
670
 
    mkdir_p='$(install_sh) -d'
671
 
  fi
672
 
fi
673
 
AC_SUBST([mkdir_p])])
674
 
 
675
 
# Helper functions for option handling.                     -*- Autoconf -*-
676
 
 
677
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
678
 
#
679
 
# This file is free software; the Free Software Foundation
680
 
# gives unlimited permission to copy and/or distribute it,
681
 
# with or without modifications, as long as this notice is preserved.
 
11553
# AM_CONDITIONAL                                              -*- Autoconf -*-
 
11554
 
 
11555
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
 
11556
 
 
11557
# This program is free software; you can redistribute it and/or modify
 
11558
# it under the terms of the GNU General Public License as published by
 
11559
# the Free Software Foundation; either version 2, or (at your option)
 
11560
# any later version.
 
11561
 
 
11562
# This program is distributed in the hope that it will be useful,
 
11563
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11564
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11565
# GNU General Public License for more details.
 
11566
 
 
11567
# You should have received a copy of the GNU General Public License
 
11568
# along with this program; if not, write to the Free Software
 
11569
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11570
# 02111-1307, USA.
 
11571
 
 
11572
# serial 5
 
11573
 
 
11574
AC_PREREQ(2.52)
 
11575
 
 
11576
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
11577
# -------------------------------------
 
11578
# Define a conditional.
 
11579
AC_DEFUN([AM_CONDITIONAL],
 
11580
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
11581
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
11582
AC_SUBST([$1_TRUE])
 
11583
AC_SUBST([$1_FALSE])
 
11584
if $2; then
 
11585
  $1_TRUE=
 
11586
  $1_FALSE='#'
 
11587
else
 
11588
  $1_TRUE='#'
 
11589
  $1_FALSE=
 
11590
fi
 
11591
AC_CONFIG_COMMANDS_PRE(
 
11592
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
11593
  AC_MSG_ERROR([conditional "$1" was never defined.
 
11594
Usually this means the macro was only invoked conditionally.])
 
11595
fi])])
 
11596
 
 
11597
 
 
11598
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
11599
 
 
11600
# This program is free software; you can redistribute it and/or modify
 
11601
# it under the terms of the GNU General Public License as published by
 
11602
# the Free Software Foundation; either version 2, or (at your option)
 
11603
# any later version.
 
11604
 
 
11605
# This program is distributed in the hope that it will be useful,
 
11606
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11607
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11608
# GNU General Public License for more details.
 
11609
 
 
11610
# You should have received a copy of the GNU General Public License
 
11611
# along with this program; if not, write to the Free Software
 
11612
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11613
# 02111-1307, USA.
682
11614
 
683
11615
# serial 3
684
11616
 
685
 
# _AM_MANGLE_OPTION(NAME)
686
 
# -----------------------
687
 
AC_DEFUN([_AM_MANGLE_OPTION],
688
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
689
 
 
690
 
# _AM_SET_OPTION(NAME)
691
 
# ------------------------------
692
 
# Set option NAME.  Presently that only means defining a flag for this option.
693
 
AC_DEFUN([_AM_SET_OPTION],
694
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
695
 
 
696
 
# _AM_SET_OPTIONS(OPTIONS)
697
 
# ----------------------------------
698
 
# OPTIONS is a space-separated list of Automake options.
699
 
AC_DEFUN([_AM_SET_OPTIONS],
700
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
701
 
 
702
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
703
 
# -------------------------------------------
704
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
705
 
AC_DEFUN([_AM_IF_OPTION],
706
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
707
 
 
708
 
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
709
 
 
710
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
711
 
# Free Software Foundation, Inc.
712
 
#
713
 
# This file is free software; the Free Software Foundation
714
 
# gives unlimited permission to copy and/or distribute it,
715
 
# with or without modifications, as long as this notice is preserved.
716
 
 
717
 
# serial 4
718
 
 
719
 
# AM_SANITY_CHECK
720
 
# ---------------
721
 
AC_DEFUN([AM_SANITY_CHECK],
722
 
[AC_MSG_CHECKING([whether build environment is sane])
723
 
# Just in case
724
 
sleep 1
725
 
echo timestamp > conftest.file
726
 
# Do `set' in a subshell so we don't clobber the current shell's
727
 
# arguments.  Must try -L first in case configure is actually a
728
 
# symlink; some systems play weird games with the mod time of symlinks
729
 
# (eg FreeBSD returns the mod time of the symlink's containing
730
 
# directory).
731
 
if (
732
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
733
 
   if test "$[*]" = "X"; then
734
 
      # -L didn't work.
735
 
      set X `ls -t $srcdir/configure conftest.file`
736
 
   fi
737
 
   rm -f conftest.file
738
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
739
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
740
 
 
741
 
      # If neither matched, then we have a broken ls.  This can happen
742
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
743
 
      # broken ls alias from the environment.  This has actually
744
 
      # happened.  Such a system could not be considered "sane".
745
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
746
 
alias in your environment])
747
 
   fi
748
 
 
749
 
   test "$[2]" = conftest.file
750
 
   )
751
 
then
752
 
   # Ok.
753
 
   :
754
 
else
755
 
   AC_MSG_ERROR([newly created file is older than distributed files!
756
 
Check your system clock])
757
 
fi
758
 
AC_MSG_RESULT(yes)])
759
 
 
760
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
761
 
#
762
 
# This file is free software; the Free Software Foundation
763
 
# gives unlimited permission to copy and/or distribute it,
764
 
# with or without modifications, as long as this notice is preserved.
765
 
 
766
 
# AM_PROG_INSTALL_STRIP
767
 
# ---------------------
768
 
# One issue with vendor `install' (even GNU) is that you can't
769
 
# specify the program used to strip binaries.  This is especially
770
 
# annoying in cross-compiling environments, where the build's strip
771
 
# is unlikely to handle the host's binaries.
772
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
773
 
# always use install-sh in `make install-strip', and initialize
774
 
# STRIPPROG with the value of the STRIP variable (set by the user).
775
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
776
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
777
 
# Installed binaries are usually stripped using `strip' when the user
778
 
# run `make install-strip'.  However `strip' might not be the right
779
 
# tool to use in cross-compilation environments, therefore Automake
780
 
# will honor the `STRIP' environment variable to overrule this program.
781
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
782
 
if test "$cross_compiling" != no; then
783
 
  AC_CHECK_TOOL([STRIP], [strip], :)
784
 
fi
785
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
786
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
787
 
 
788
 
# Check how to create a tarball.                            -*- Autoconf -*-
789
 
 
790
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
791
 
#
792
 
# This file is free software; the Free Software Foundation
793
 
# gives unlimited permission to copy and/or distribute it,
794
 
# with or without modifications, as long as this notice is preserved.
795
 
 
796
 
# serial 2
797
 
 
798
 
# _AM_PROG_TAR(FORMAT)
799
 
# --------------------
800
 
# Check how to create a tarball in format FORMAT.
801
 
# FORMAT should be one of `v7', `ustar', or `pax'.
802
 
#
803
 
# Substitute a variable $(am__tar) that is a command
804
 
# writing to stdout a FORMAT-tarball containing the directory
805
 
# $tardir.
806
 
#     tardir=directory && $(am__tar) > result.tar
807
 
#
808
 
# Substitute a variable $(am__untar) that extract such
809
 
# a tarball read from stdin.
810
 
#     $(am__untar) < result.tar
811
 
AC_DEFUN([_AM_PROG_TAR],
812
 
[# Always define AMTAR for backward compatibility.
813
 
AM_MISSING_PROG([AMTAR], [tar])
814
 
m4_if([$1], [v7],
815
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
816
 
     [m4_case([$1], [ustar],, [pax],,
817
 
              [m4_fatal([Unknown tar format])])
818
 
AC_MSG_CHECKING([how to create a $1 tar archive])
819
 
# Loop over all known methods to create a tar archive until one works.
820
 
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
821
 
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
822
 
# Do not fold the above two line into one, because Tru64 sh and
823
 
# Solaris sh will not grok spaces in the rhs of `-'.
824
 
for _am_tool in $_am_tools
825
 
do
826
 
  case $_am_tool in
827
 
  gnutar)
828
 
    for _am_tar in tar gnutar gtar;
829
 
    do
830
 
      AM_RUN_LOG([$_am_tar --version]) && break
831
 
    done
832
 
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
833
 
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
834
 
    am__untar="$_am_tar -xf -"
835
 
    ;;
836
 
  plaintar)
837
 
    # Must skip GNU tar: if it does not support --format= it doesn't create
838
 
    # ustar tarball either.
839
 
    (tar --version) >/dev/null 2>&1 && continue
840
 
    am__tar='tar chf - "$$tardir"'
841
 
    am__tar_='tar chf - "$tardir"'
842
 
    am__untar='tar xf -'
843
 
    ;;
844
 
  pax)
845
 
    am__tar='pax -L -x $1 -w "$$tardir"'
846
 
    am__tar_='pax -L -x $1 -w "$tardir"'
847
 
    am__untar='pax -r'
848
 
    ;;
849
 
  cpio)
850
 
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
851
 
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
852
 
    am__untar='cpio -i -H $1 -d'
853
 
    ;;
854
 
  none)
855
 
    am__tar=false
856
 
    am__tar_=false
857
 
    am__untar=false
858
 
    ;;
859
 
  esac
860
 
 
861
 
  # If the value was cached, stop now.  We just wanted to have am__tar
862
 
  # and am__untar set.
863
 
  test -n "${am_cv_prog_tar_$1}" && break
864
 
 
865
 
  # tar/untar a dummy directory, and stop if the command works
866
 
  rm -rf conftest.dir
867
 
  mkdir conftest.dir
868
 
  echo GrepMe > conftest.dir/file
869
 
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
870
 
  rm -rf conftest.dir
871
 
  if test -s conftest.tar; then
872
 
    AM_RUN_LOG([$am__untar <conftest.tar])
873
 
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
874
 
  fi
875
 
done
876
 
rm -rf conftest.dir
877
 
 
878
 
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
879
 
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
880
 
AC_SUBST([am__tar])
881
 
AC_SUBST([am__untar])
882
 
]) # _AM_PROG_TAR
883
 
 
884
 
m4_include([acinclude.m4])
 
11617
AC_PREREQ(2.50)
 
11618
 
 
11619
# AM_PROG_LEX
 
11620
# -----------
 
11621
# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
 
11622
# "missing" invocation, for better error output.
 
11623
AC_DEFUN([AM_PROG_LEX],
 
11624
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
 
11625
AC_REQUIRE([AC_PROG_LEX])dnl
 
11626
if test "$LEX" = :; then
 
11627
  LEX=${am_missing_run}flex
 
11628
fi])
 
11629
 
 
11630
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
 
11631
 
 
11632
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
11633
 
 
11634
# This program is free software; you can redistribute it and/or modify
 
11635
# it under the terms of the GNU General Public License as published by
 
11636
# the Free Software Foundation; either version 2, or (at your option)
 
11637
# any later version.
 
11638
 
 
11639
# This program is distributed in the hope that it will be useful,
 
11640
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11641
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11642
# GNU General Public License for more details.
 
11643
 
 
11644
# You should have received a copy of the GNU General Public License
 
11645
# along with this program; if not, write to the Free Software
 
11646
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
11647
# 02111-1307, USA.
 
11648
 
 
11649
AC_PREREQ([2.52])
 
11650
 
 
11651
# serial 6
 
11652
 
 
11653
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
11654
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
11655