~ubuntu-branches/ubuntu/karmic/basket/karmic

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Tallon
  • Date: 2004-10-23 02:21:16 UTC
  • Revision ID: james.westby@ubuntu.com-20041023022116-i8hjksw6mn85ideq
Tags: upstream-0.4.0d
ImportĀ upstreamĀ versionĀ 0.4.0d

Show diffs side-by-side

added added

removed removed

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