~ubuntu-branches/ubuntu/karmic/kwavecontrol/karmic

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Morten Hustveit
  • Date: 2003-08-24 20:06:36 UTC
  • Revision ID: james.westby@ubuntu.com-20030824200636-ig5sxx7pcn0muhde
Tags: upstream-0.3
ImportĀ upstreamĀ versionĀ 0.3

Show diffs side-by-side

added added

removed removed

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