~ubuntu-branches/ubuntu/vivid/kvpnc/vivid-proposed

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-04-23 09:18:50 UTC
  • mfrom: (1.1.10 upstream) (8.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090423091850-hweeg0jo64t0jx52
Tags: 0.9.1-1
* New upstream release (KDE4 is here)
* Add Build-Depends cmake and pkg-kde-tools
* Remove obsolete debian/patches
* Refresh debian/patches:
  - 10_su-to-root_usage.diff
  - 13_add_kuser_issuperuser.diff
* Cleanup debian/rules - simple under KDE4
* Update debian/watch for KDE4 version
* Update debian/copyright - use versionned licenses
* Update Section field - move to utils
* Remove obsolete dependencies: kdebase-bin, gksu, sux and modutils
* Update debian/kvpnc.{manpages,1}

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., 51 Franklin Street, Fifth Floor,
20
 
dnl    Boston, MA 02110-1301, 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([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
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(program-name, variable-name, list-of-dirs,
177
 
dnl     if-not-found, test-parameter, prepend-path)
178
 
dnl
179
 
dnl Look for program-name in list-of-dirs+$PATH.
180
 
dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
181
 
dnl If found, $variable-name is set. If not, if-not-found is evaluated.
182
 
dnl test-parameter: if set, the program is executed with this arg,
183
 
dnl                 and only a successful exit code is required.
184
 
AC_DEFUN([KDE_FIND_PATH],
185
 
[
186
 
   AC_MSG_CHECKING([for $1])
187
 
   if test -n "$$2"; then
188
 
        kde_cv_path="$$2";
189
 
   else
190
 
        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
191
 
 
192
 
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
193
 
        [
194
 
        kde_cv_path="NONE"
195
 
        kde_save_IFS=$IFS
196
 
        IFS=':'
197
 
        dirs=""
198
 
        for dir in $PATH; do
199
 
          dirs="$dirs $dir"
200
 
        done
201
 
        if test -z "$6"; then  dnl Append dirs in PATH (default)
202
 
          dirs="$3 $dirs"
203
 
        else  dnl Prepend dirs in PATH (if 6th arg is set)
204
 
          dirs="$dirs $3"
205
 
        fi
206
 
        IFS=$kde_save_IFS
207
 
 
208
 
        for dir in $dirs; do
209
 
          if test -x "$dir/$1"; then
210
 
            if test -n "$5"
211
 
            then
212
 
              evalstr="$dir/$1 $5 2>&1 "
213
 
              if eval $evalstr; then
214
 
                kde_cv_path="$dir/$1"
215
 
                break
216
 
              fi
217
 
            else
218
 
                kde_cv_path="$dir/$1"
219
 
                break
220
 
            fi
221
 
          fi
222
 
        done
223
 
 
224
 
        eval "kde_cv_path_$kde_cache=$kde_cv_path"
225
 
 
226
 
        ])
227
 
 
228
 
      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
229
 
 
230
 
   fi
231
 
 
232
 
   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
233
 
      AC_MSG_RESULT(not found)
234
 
      $4
235
 
   else
236
 
      AC_MSG_RESULT($kde_cv_path)
237
 
      $2=$kde_cv_path
238
 
 
239
 
   fi
240
 
])
241
 
 
242
 
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
243
 
[
244
 
    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
245
 
Please check whether you installed Qt correctly.
246
 
You need to have a running moc binary.
247
 
configure tried to run $ac_cv_path_moc and the test didn't
248
 
succeed. If configure shouldn't have tried this one, set
249
 
the environment variable MOC to the right one before running
250
 
configure.
251
 
])
252
 
])
253
 
 
254
 
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
255
 
[
256
 
    AC_MSG_WARN([No Qt ui compiler (uic) found!
257
 
Please check whether you installed Qt correctly.
258
 
You need to have a running uic binary.
259
 
configure tried to run $ac_cv_path_uic and the test didn't
260
 
succeed. If configure shouldn't have tried this one, set
261
 
the environment variable UIC to the right one before running
262
 
configure.
263
 
])
264
 
])
265
 
 
266
 
 
267
 
AC_DEFUN([KDE_CHECK_UIC_FLAG],
268
 
[
269
 
    AC_MSG_CHECKING([whether uic supports -$1 ])
270
 
    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
271
 
    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
272
 
    [
273
 
        cat >conftest.ui <<EOT
274
 
        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
275
 
EOT
276
 
        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
277
 
        if AC_TRY_EVAL(ac_uic_testrun); then
278
 
            eval "kde_cv_prog_uic_$kde_cache=yes"
279
 
        else
280
 
            eval "kde_cv_prog_uic_$kde_cache=no"
281
 
        fi
282
 
        rm -f conftest*
283
 
    ])
284
 
 
285
 
    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
286
 
        AC_MSG_RESULT([yes])
287
 
        :
288
 
        $3
289
 
    else
290
 
        AC_MSG_RESULT([no])
291
 
        :
292
 
        $4
293
 
    fi
294
 
])
295
 
 
296
 
 
297
 
dnl ------------------------------------------------------------------------
298
 
dnl Find the meta object compiler and the ui compiler in the PATH,
299
 
dnl in $QTDIR/bin, and some more usual places
300
 
dnl ------------------------------------------------------------------------
301
 
dnl
302
 
AC_DEFUN([AC_PATH_QT_MOC_UIC],
303
 
[
304
 
   AC_REQUIRE([KDE_CHECK_PERL])
305
 
   qt_bindirs=""
306
 
   for dir in $kde_qt_dirs; do
307
 
      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
308
 
   done
309
 
   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
310
 
   if test ! "$ac_qt_bindir" = "NO"; then
311
 
      qt_bindirs="$ac_qt_bindir $qt_bindirs"
312
 
   fi
313
 
 
314
 
   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
315
 
   if test -z "$UIC_NOT_NEEDED"; then
316
 
     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
317
 
     if test -z "$UIC_PATH" ; then
318
 
       KDE_UIC_ERROR_MESSAGE
319
 
       exit 1
320
 
     else
321
 
       UIC=$UIC_PATH
322
 
 
323
 
       if test $kde_qtver = 3; then
324
 
         KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
325
 
         KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
326
 
 
327
 
         if test x$ac_uic_supports_libpath = xyes; then
328
 
             UIC="$UIC -L \$(kde_widgetdir)"
329
 
         fi
330
 
         if test x$ac_uic_supports_nounload = xyes; then
331
 
             UIC="$UIC -nounload"
332
 
         fi
333
 
       fi
334
 
     fi
335
 
   else
336
 
     UIC="echo uic not available: "
337
 
   fi
338
 
 
339
 
   AC_SUBST(MOC)
340
 
   AC_SUBST(UIC)
341
 
 
342
 
   UIC_TR="i18n"
343
 
   if test $kde_qtver = 3; then
344
 
     UIC_TR="tr2i18n"
345
 
   fi
346
 
 
347
 
   AC_SUBST(UIC_TR)
348
 
])
349
 
 
350
 
AC_DEFUN([KDE_1_CHECK_PATHS],
351
 
[
352
 
  KDE_1_CHECK_PATH_HEADERS
353
 
 
354
 
  KDE_TEST_RPATH=
355
 
 
356
 
  if test -n "$USE_RPATH"; then
357
 
 
358
 
     if test -n "$kde_libraries"; then
359
 
       KDE_TEST_RPATH="-R $kde_libraries"
360
 
     fi
361
 
 
362
 
     if test -n "$qt_libraries"; then
363
 
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
364
 
     fi
365
 
 
366
 
     if test -n "$x_libraries"; then
367
 
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
368
 
     fi
369
 
 
370
 
     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
371
 
  fi
372
 
 
373
 
AC_MSG_CHECKING([for KDE libraries installed])
374
 
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'
375
 
 
376
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
377
 
  AC_MSG_RESULT(yes)
378
 
else
379
 
  AC_MSG_ERROR([your system fails at linking a small KDE application!
380
 
Check, if your compiler is installed correctly and if you have used the
381
 
same compiler to compile Qt and kdelibs as you did use now.
382
 
For more details about this problem, look at the end of config.log.])
383
 
fi
384
 
 
385
 
if eval `KDEDIR= ./conftest 2>&5`; then
386
 
  kde_result=done
387
 
else
388
 
  kde_result=problems
389
 
fi
390
 
 
391
 
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
392
 
kde_have_all_paths=yes
393
 
 
394
 
KDE_SET_PATHS($kde_result)
395
 
 
396
 
])
397
 
 
398
 
AC_DEFUN([KDE_SET_PATHS],
399
 
[
400
 
  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
401
 
        kde_htmldir=\"$kde_htmldir\" \
402
 
        kde_appsdir=\"$kde_appsdir\" \
403
 
        kde_icondir=\"$kde_icondir\" \
404
 
        kde_sounddir=\"$kde_sounddir\" \
405
 
        kde_datadir=\"$kde_datadir\" \
406
 
        kde_locale=\"$kde_locale\" \
407
 
        kde_cgidir=\"$kde_cgidir\" \
408
 
        kde_confdir=\"$kde_confdir\" \
409
 
        kde_kcfgdir=\"$kde_kcfgdir\" \
410
 
        kde_mimedir=\"$kde_mimedir\" \
411
 
        kde_toolbardir=\"$kde_toolbardir\" \
412
 
        kde_wallpaperdir=\"$kde_wallpaperdir\" \
413
 
        kde_templatesdir=\"$kde_templatesdir\" \
414
 
        kde_bindir=\"$kde_bindir\" \
415
 
        kde_servicesdir=\"$kde_servicesdir\" \
416
 
        kde_servicetypesdir=\"$kde_servicetypesdir\" \
417
 
        kde_moduledir=\"$kde_moduledir\" \
418
 
        kde_styledir=\"$kde_styledir\" \
419
 
        kde_widgetdir=\"$kde_widgetdir\" \
420
 
        xdg_appsdir=\"$xdg_appsdir\" \
421
 
        xdg_menudir=\"$xdg_menudir\" \
422
 
        xdg_directorydir=\"$xdg_directorydir\" \
423
 
        kde_result=$1"
424
 
])
425
 
 
426
 
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
427
 
[
428
 
if test "$1" = "default"; then
429
 
 
430
 
  if test -z "$kde_htmldir"; then
431
 
    kde_htmldir='\${datadir}/doc/HTML'
432
 
  fi
433
 
  if test -z "$kde_appsdir"; then
434
 
    kde_appsdir='\${datadir}/applnk'
435
 
  fi
436
 
  if test -z "$kde_icondir"; then
437
 
    kde_icondir='\${datadir}/icons'
438
 
  fi
439
 
  if test -z "$kde_sounddir"; then
440
 
    kde_sounddir='\${datadir}/sounds'
441
 
  fi
442
 
  if test -z "$kde_datadir"; then
443
 
    kde_datadir='\${datadir}/apps'
444
 
  fi
445
 
  if test -z "$kde_locale"; then
446
 
    kde_locale='\${datadir}/locale'
447
 
  fi
448
 
  if test -z "$kde_cgidir"; then
449
 
    kde_cgidir='\${exec_prefix}/cgi-bin'
450
 
  fi
451
 
  if test -z "$kde_confdir"; then
452
 
    kde_confdir='\${datadir}/config'
453
 
  fi
454
 
  if test -z "$kde_kcfgdir"; then
455
 
    kde_kcfgdir='\${datadir}/config.kcfg'
456
 
  fi
457
 
  if test -z "$kde_mimedir"; then
458
 
    kde_mimedir='\${datadir}/mimelnk'
459
 
  fi
460
 
  if test -z "$kde_toolbardir"; then
461
 
    kde_toolbardir='\${datadir}/toolbar'
462
 
  fi
463
 
  if test -z "$kde_wallpaperdir"; then
464
 
    kde_wallpaperdir='\${datadir}/wallpapers'
465
 
  fi
466
 
  if test -z "$kde_templatesdir"; then
467
 
    kde_templatesdir='\${datadir}/templates'
468
 
  fi
469
 
  if test -z "$kde_bindir"; then
470
 
    kde_bindir='\${exec_prefix}/bin'
471
 
  fi
472
 
  if test -z "$kde_servicesdir"; then
473
 
    kde_servicesdir='\${datadir}/services'
474
 
  fi
475
 
  if test -z "$kde_servicetypesdir"; then
476
 
    kde_servicetypesdir='\${datadir}/servicetypes'
477
 
  fi
478
 
  if test -z "$kde_moduledir"; then
479
 
    if test "$kde_qtver" = "2"; then
480
 
      kde_moduledir='\${libdir}/kde2'
481
 
    else
482
 
      kde_moduledir='\${libdir}/kde3'
483
 
    fi
484
 
  fi
485
 
  if test -z "$kde_styledir"; then
486
 
    kde_styledir='\${libdir}/kde3/plugins/styles'
487
 
  fi
488
 
  if test -z "$kde_widgetdir"; then
489
 
    kde_widgetdir='\${libdir}/kde3/plugins/designer'
490
 
  fi
491
 
  if test -z "$xdg_appsdir"; then
492
 
    xdg_appsdir='\${datadir}/applications/kde'
493
 
  fi
494
 
  if test -z "$xdg_menudir"; then
495
 
    xdg_menudir='\${sysconfdir}/xdg/menus'
496
 
  fi
497
 
  if test -z "$xdg_directorydir"; then
498
 
    xdg_directorydir='\${datadir}/desktop-directories'
499
 
  fi
500
 
 
501
 
  KDE_SET_PATHS(defaults)
502
 
 
503
 
else
504
 
 
505
 
  if test $kde_qtver = 1; then
506
 
     AC_MSG_RESULT([compiling])
507
 
     KDE_1_CHECK_PATHS
508
 
  else
509
 
     AC_MSG_ERROR([path checking not yet supported for KDE 2])
510
 
  fi
511
 
 
512
 
fi
513
 
])
514
 
 
515
 
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
516
 
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
517
 
   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
518
 
   test -z "$kde_datadir" || test -z "$kde_locale"  ||
519
 
   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
520
 
   test -z "$kde_kcfgdir" ||
521
 
   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
522
 
   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
523
 
   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
524
 
   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
525
 
   test -z "$kde_styledir" || test -z "kde_widgetdir" ||
526
 
   test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
527
 
   test "x$kde_have_all_paths" != "xyes"; then
528
 
     kde_have_all_paths=no
529
 
  fi
530
 
])
531
 
 
532
 
AC_DEFUN([KDE_MISSING_PROG_ERROR],
533
 
[
534
 
    AC_MSG_ERROR([The important program $1 was not found!
535
 
Please check whether you installed KDE correctly.
536
 
])
537
 
])
538
 
 
539
 
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
540
 
[
541
 
    AC_MSG_ERROR([The important program $1 was not found!
542
 
Please check whether you installed aRts correctly or use
543
 
--without-arts to compile without aRts support (this will remove functionality).
544
 
])
545
 
])
546
 
 
547
 
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
548
 
[
549
 
    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"
550
 
    test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
551
 
    if test -n "$KDEDIRS"; then
552
 
       kde_save_IFS=$IFS
553
 
       IFS=:
554
 
       for dir in $KDEDIRS; do
555
 
            kde_default_bindirs="$dir/bin $kde_default_bindirs "
556
 
       done
557
 
       IFS=$kde_save_IFS
558
 
    fi
559
 
])
560
 
 
561
 
AC_DEFUN([KDE_SUBST_PROGRAMS],
562
 
[
563
 
    AC_ARG_WITH(arts,
564
 
        AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
565
 
        [build_arts=$withval],
566
 
        [build_arts=yes]
567
 
    )
568
 
    AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
569
 
    if test "$build_arts" = "no"; then
570
 
        AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
571
 
    fi
572
 
 
573
 
        KDE_SET_DEFAULT_BINDIRS
574
 
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
575
 
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
576
 
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
577
 
        if test "$build_arts" '!=' "no"; then
578
 
          KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
579
 
          KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
580
 
        fi
581
 
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
582
 
 
583
 
        kde32ornewer=1
584
 
        kde33ornewer=1
585
 
        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
586
 
            kde32ornewer=
587
 
            kde33ornewer=
588
 
        else
589
 
            if test "$kde_qtver" = "3"; then
590
 
              if test "$kde_qtsubver" -le 1; then
591
 
                kde32ornewer=
592
 
              fi
593
 
              if test "$kde_qtsubver" -le 2; then
594
 
                kde33ornewer=
595
 
              fi
596
 
              if test "$KDECONFIG" != "compiled"; then
597
 
                if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
598
 
                  kde33ornewer=
599
 
                fi
600
 
              fi
601
 
            fi
602
 
        fi
603
 
 
604
 
        if test -n "$kde32ornewer"; then
605
 
            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
606
 
            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
607
 
        fi
608
 
        if test -n "$kde33ornewer"; then
609
 
            KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
610
 
            AC_SUBST(MAKEKDEWIDGETS)
611
 
        fi
612
 
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
613
 
 
614
 
        if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
615
 
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
616
 
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
617
 
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
618
 
            if test "$KDE_XSL_STYLESHEET" = "NO"; then
619
 
                KDE_XSL_STYLESHEET=""
620
 
            else
621
 
                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
622
 
            fi
623
 
        fi
624
 
 
625
 
        DCOP_DEPENDENCIES='$(DCOPIDL)'
626
 
        if test -n "$kde32ornewer"; then
627
 
            KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
628
 
            DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
629
 
            AC_SUBST(KCONFIG_COMPILER)
630
 
            AC_SUBST(KCFG_DEPENDENCIES)
631
 
            AC_SUBST(DCOPIDLNG)
632
 
        fi
633
 
        AC_SUBST(DCOPIDL)
634
 
        AC_SUBST(DCOPIDL2CPP)
635
 
        AC_SUBST(DCOP_DEPENDENCIES)
636
 
        AC_SUBST(MCOPIDL)
637
 
        AC_SUBST(ARTSCCONFIG)
638
 
        AC_SUBST(MEINPROC)
639
 
        AC_SUBST(KDE_XSL_STYLESHEET)
640
 
        AC_SUBST(XMLLINT)
641
 
])dnl
642
 
 
643
 
AC_DEFUN([AC_CREATE_KFSSTND],
644
 
[
645
 
AC_REQUIRE([AC_CHECK_RPATH])
646
 
 
647
 
AC_MSG_CHECKING([for KDE paths])
648
 
kde_result=""
649
 
kde_cached_paths=yes
650
 
AC_CACHE_VAL(kde_cv_all_paths,
651
 
[
652
 
  KDE_SET_DEFAULT_PATHS($1)
653
 
  kde_cached_paths=no
654
 
])
655
 
eval "$kde_cv_all_paths"
656
 
KDE_CHECK_PATHS_FOR_COMPLETENESS
657
 
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
658
 
  # wrong values were cached, may be, we can set better ones
659
 
  kde_result=
660
 
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
661
 
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
662
 
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
663
 
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
664
 
  kde_have_all_paths=
665
 
  kde_styledir=
666
 
  kde_widgetdir=
667
 
  xdg_appsdir = xdg_menudir= xdg_directorydir= 
668
 
  KDE_SET_DEFAULT_PATHS($1)
669
 
  eval "$kde_cv_all_paths"
670
 
  KDE_CHECK_PATHS_FOR_COMPLETENESS
671
 
  kde_result="$kde_result (cache overridden)"
672
 
fi
673
 
if test "$kde_have_all_paths" = "no"; then
674
 
  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
675
 
Since it had compiled and linked before, it must be a strange problem on your system.
676
 
Look at config.log for details. If you are not able to fix this, look at
677
 
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
678
 
(If you're using an egcs version on Linux, you may update binutils!)
679
 
])
680
 
else
681
 
  rm -f conftest*
682
 
  AC_MSG_RESULT($kde_result)
683
 
fi
684
 
 
685
 
bindir=$kde_bindir
686
 
 
687
 
KDE_SUBST_PROGRAMS
688
 
 
689
 
])
690
 
 
691
 
AC_DEFUN([AC_SUBST_KFSSTND],
692
 
[
693
 
AC_SUBST(kde_htmldir)
694
 
AC_SUBST(kde_appsdir)
695
 
AC_SUBST(kde_icondir)
696
 
AC_SUBST(kde_sounddir)
697
 
AC_SUBST(kde_datadir)
698
 
AC_SUBST(kde_locale)
699
 
AC_SUBST(kde_confdir)
700
 
AC_SUBST(kde_kcfgdir)
701
 
AC_SUBST(kde_mimedir)
702
 
AC_SUBST(kde_wallpaperdir)
703
 
AC_SUBST(kde_bindir)
704
 
dnl X Desktop Group standards
705
 
AC_SUBST(xdg_appsdir)
706
 
AC_SUBST(xdg_menudir)
707
 
AC_SUBST(xdg_directorydir)
708
 
dnl for KDE 2
709
 
AC_SUBST(kde_templatesdir)
710
 
AC_SUBST(kde_servicesdir)
711
 
AC_SUBST(kde_servicetypesdir)
712
 
AC_SUBST(kde_moduledir)
713
 
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
714
 
AC_SUBST(kde_styledir)
715
 
AC_SUBST(kde_widgetdir)
716
 
if test "$kde_qtver" = 1; then
717
 
  kde_minidir="$kde_icondir/mini"
718
 
else
719
 
# for KDE 1 - this breaks KDE2 apps using minidir, but
720
 
# that's the plan ;-/
721
 
  kde_minidir="/dev/null"
722
 
fi
723
 
dnl AC_SUBST(kde_minidir)
724
 
dnl AC_SUBST(kde_cgidir)
725
 
dnl AC_SUBST(kde_toolbardir)
726
 
])
727
 
 
728
 
AC_DEFUN([KDE_MISC_TESTS],
729
 
[
730
 
   dnl Checks for libraries.
731
 
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
732
 
   AC_SUBST(LIBUTIL)
733
 
   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
734
 
   AC_SUBST(LIBCOMPAT)
735
 
   kde_have_crypt=
736
 
   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
737
 
      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
738
 
        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
739
 
You should install libcrypt from another source or configure with PAM
740
 
support])
741
 
        kde_have_crypt=no
742
 
      ]))
743
 
   AC_SUBST(LIBCRYPT)
744
 
   if test $kde_have_crypt = yes; then
745
 
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
746
 
   fi
747
 
   AC_CHECK_SOCKLEN_T
748
 
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
749
 
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
750
 
      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
751
 
        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
752
 
   fi
753
 
   AC_CHECK_FUNC(inet_ntoa)
754
 
   if test $ac_cv_func_inet_ntoa = no; then
755
 
     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
756
 
   fi
757
 
   AC_CHECK_FUNC(connect)
758
 
   if test $ac_cv_func_connect = no; then
759
 
      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
760
 
        $X_EXTRA_LIBS)
761
 
   fi
762
 
 
763
 
   AC_CHECK_FUNC(remove)
764
 
   if test $ac_cv_func_remove = no; then
765
 
      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
766
 
   fi
767
 
 
768
 
   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
769
 
   AC_CHECK_FUNC(shmat, ,
770
 
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
771
 
   
772
 
   # more headers that need to be explicitly included on darwin
773
 
   AC_CHECK_HEADERS(sys/types.h stdint.h)
774
 
 
775
 
   # sys/bitypes.h is needed for uint32_t and friends on Tru64
776
 
   AC_CHECK_HEADERS(sys/bitypes.h)
777
 
 
778
 
   # darwin requires a poll emulation library
779
 
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
780
 
 
781
 
   # for some image handling on Mac OS X
782
 
   AC_CHECK_HEADERS(Carbon/Carbon.h)
783
 
 
784
 
   # CoreAudio framework
785
 
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
786
 
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
787
 
     FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio"
788
 
   ])
789
 
 
790
 
   AC_CHECK_RES_INIT
791
 
   AC_SUBST(LIB_POLL)
792
 
   AC_SUBST(FRAMEWORK_COREAUDIO)
793
 
   LIBSOCKET="$X_EXTRA_LIBS"
794
 
   AC_SUBST(LIBSOCKET)
795
 
   AC_SUBST(X_EXTRA_LIBS)
796
 
   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
797
 
   AC_SUBST(LIBUCB)
798
 
 
799
 
   case $host in  dnl this *is* LynxOS specific
800
 
   *-*-lynxos* )
801
 
        AC_MSG_CHECKING([LynxOS header file wrappers])
802
 
        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
803
 
        AC_MSG_RESULT(disabled)
804
 
        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
805
 
         ;;
806
 
    esac
807
 
 
808
 
   KDE_CHECK_TYPES
809
 
   KDE_CHECK_LIBDL
810
 
   KDE_CHECK_STRLCPY
811
 
   KDE_CHECK_PIE_SUPPORT
812
 
 
813
 
# darwin needs this to initialize the environment
814
 
AC_CHECK_HEADERS(crt_externs.h)
815
 
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
816
 
 
817
 
AH_VERBATIM(_DARWIN_ENVIRON,
818
 
[
819
 
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
820
 
# include <sys/time.h>
821
 
# include <crt_externs.h>
822
 
# define environ (*_NSGetEnviron())
823
 
#endif
824
 
])
825
 
 
826
 
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
827
 
[
828
 
/*
829
 
 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
830
 
 * that defines bzero.
831
 
 */
832
 
 
833
 
#if defined(_AIX)
834
 
#include <strings.h>
835
 
#endif
836
 
])
837
 
 
838
 
AC_CHECK_FUNCS([vsnprintf snprintf])
839
 
 
840
 
AH_VERBATIM(_TRU64,[
841
 
/*
842
 
 * On HP-UX, the declaration of vsnprintf() is needed every time !
843
 
 */
844
 
 
845
 
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
846
 
#if __STDC__
847
 
#include <stdarg.h>
848
 
#include <stdlib.h>
849
 
#else
850
 
#include <varargs.h>
851
 
#endif
852
 
#ifdef __cplusplus
853
 
extern "C"
854
 
#endif
855
 
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
856
 
#ifdef __cplusplus
857
 
extern "C"
858
 
#endif
859
 
int snprintf(char *str, size_t n, char const *fmt, ...);
860
 
#endif
861
 
])
862
 
 
863
 
])
864
 
 
865
 
dnl ------------------------------------------------------------------------
866
 
dnl Find the header files and libraries for X-Windows. Extended the
867
 
dnl macro AC_PATH_X
868
 
dnl ------------------------------------------------------------------------
869
 
dnl
870
 
AC_DEFUN([K_PATH_X],
871
 
[
872
 
AC_REQUIRE([KDE_MISC_TESTS])dnl
873
 
AC_REQUIRE([KDE_CHECK_LIB64])
874
 
 
875
 
AC_ARG_ENABLE(
876
 
  embedded,
877
 
  AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
878
 
  kde_use_qt_emb=$enableval,
879
 
  kde_use_qt_emb=no
880
 
)
881
 
 
882
 
AC_ARG_ENABLE(
883
 
  qtopia,
884
 
  AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
885
 
  kde_use_qt_emb_palm=$enableval,
886
 
  kde_use_qt_emb_palm=no
887
 
)
888
 
 
889
 
AC_ARG_ENABLE(
890
 
  mac,
891
 
  AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
892
 
  kde_use_qt_mac=$enableval,
893
 
  kde_use_qt_mac=no
894
 
)
895
 
 
896
 
# used to disable x11-specific stuff on special platforms
897
 
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
898
 
 
899
 
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
900
 
 
901
 
AC_MSG_CHECKING(for X)
902
 
 
903
 
AC_CACHE_VAL(kde_cv_have_x,
904
 
[# One or both of the vars are not set, and there is no cached value.
905
 
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
906
 
   kde_x_includes=NO
907
 
else
908
 
   kde_x_includes=$x_includes
909
 
fi
910
 
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
911
 
   kde_x_libraries=NO
912
 
else
913
 
   kde_x_libraries=$x_libraries
914
 
fi
915
 
 
916
 
# below we use the standard autoconf calls
917
 
ac_x_libraries=$kde_x_libraries
918
 
ac_x_includes=$kde_x_includes
919
 
 
920
 
KDE_PATH_X_DIRECT
921
 
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
922
 
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
923
 
dnl location. The correct location is /usr/lib32 or an undefined value
924
 
dnl (the linker is smart enough to pick the correct default library).
925
 
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
926
 
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
927
 
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
928
 
dnl x_includes should be left alone.
929
 
case "$host" in
930
 
mips-sgi-irix6*)
931
 
  ;;
932
 
*-*-solaris*)
933
 
  ;;
934
 
*)
935
 
  _AC_PATH_X_XMKMF
936
 
  if test -z "$ac_x_includes"; then
937
 
    ac_x_includes="."
938
 
  fi
939
 
  if test -z "$ac_x_libraries"; then
940
 
    ac_x_libraries="/usr/lib${kdelibsuff}"
941
 
  fi
942
 
esac
943
 
#from now on we use our own again
944
 
 
945
 
# when the user already gave --x-includes, we ignore
946
 
# what the standard autoconf macros told us.
947
 
if test "$kde_x_includes" = NO; then
948
 
  kde_x_includes=$ac_x_includes
949
 
fi
950
 
 
951
 
# for --x-libraries too
952
 
if test "$kde_x_libraries" = NO; then
953
 
  kde_x_libraries=$ac_x_libraries
954
 
fi
955
 
 
956
 
if test "$kde_x_includes" = NO; then
957
 
  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
958
 
fi
959
 
 
960
 
if test "$kde_x_libraries" = NO; then
961
 
  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
962
 
fi
963
 
 
964
 
# Record where we found X for the cache.
965
 
kde_cv_have_x="have_x=yes \
966
 
         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
967
 
])dnl
968
 
 
969
 
eval "$kde_cv_have_x"
970
 
 
971
 
if test "$have_x" != yes; then
972
 
  AC_MSG_RESULT($have_x)
973
 
  no_x=yes
974
 
else
975
 
  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
976
 
fi
977
 
 
978
 
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
979
 
  X_INCLUDES=""
980
 
  x_includes="."; dnl better than nothing :-
981
 
 else
982
 
  x_includes=$kde_x_includes
983
 
  X_INCLUDES="-I$x_includes"
984
 
fi
985
 
 
986
 
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
987
 
  X_LDFLAGS=""
988
 
  x_libraries="/usr/lib"; dnl better than nothing :-
989
 
 else
990
 
  x_libraries=$kde_x_libraries
991
 
  X_LDFLAGS="-L$x_libraries"
992
 
fi
993
 
all_includes="$X_INCLUDES"
994
 
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
995
 
 
996
 
# Check for libraries that X11R6 Xt/Xaw programs need.
997
 
ac_save_LDFLAGS="$LDFLAGS"
998
 
LDFLAGS="$LDFLAGS $X_LDFLAGS"
999
 
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1000
 
# check for ICE first), but we must link in the order -lSM -lICE or
1001
 
# we get undefined symbols.  So assume we have SM if we have ICE.
1002
 
# These have to be linked with before -lX11, unlike the other
1003
 
# libraries we check for below, so use a different variable.
1004
 
#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1005
 
AC_CHECK_LIB(ICE, IceConnectionNumber,
1006
 
  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
1007
 
LDFLAGS="$ac_save_LDFLAGS"
1008
 
 
1009
 
LIB_X11='-lX11 $(LIBSOCKET)'
1010
 
 
1011
 
AC_MSG_CHECKING(for libXext)
1012
 
AC_CACHE_VAL(kde_cv_have_libXext,
1013
 
[
1014
 
kde_ldflags_safe="$LDFLAGS"
1015
 
kde_libs_safe="$LIBS"
1016
 
 
1017
 
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
1018
 
LIBS="-lXext -lX11 $LIBSOCKET"
1019
 
 
1020
 
AC_TRY_LINK([
1021
 
#include <stdio.h>
1022
 
#ifdef STDC_HEADERS
1023
 
# include <stdlib.h>
1024
 
#endif
1025
 
],
1026
 
[
1027
 
printf("hello Xext\n");
1028
 
],
1029
 
kde_cv_have_libXext=yes,
1030
 
kde_cv_have_libXext=no
1031
 
)
1032
 
 
1033
 
LDFLAGS=$kde_ldflags_safe
1034
 
LIBS=$kde_libs_safe
1035
 
])
1036
 
 
1037
 
AC_MSG_RESULT($kde_cv_have_libXext)
1038
 
 
1039
 
if test "$kde_cv_have_libXext" = "no"; then
1040
 
  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1041
 
can't find it itself, we stop here assuming that make wouldn't find
1042
 
them either.])
1043
 
fi
1044
 
 
1045
 
LIB_XEXT="-lXext"
1046
 
QTE_NORTTI=""
1047
 
 
1048
 
elif test "$kde_use_qt_emb" = "yes"; then
1049
 
  dnl We're using QT Embedded
1050
 
  CPPFLAGS=-DQWS
1051
 
  CXXFLAGS="$CXXFLAGS -fno-rtti"
1052
 
  QTE_NORTTI="-fno-rtti -DQWS"
1053
 
  X_PRE_LIBS=""
1054
 
  LIB_X11=""
1055
 
  LIB_XEXT=""
1056
 
  LIB_XRENDER=""
1057
 
  LIBSM=""
1058
 
  X_INCLUDES=""
1059
 
  X_LDFLAGS=""
1060
 
  x_includes=""
1061
 
  x_libraries=""
1062
 
elif test "$kde_use_qt_mac" = "yes"; then
1063
 
  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1064
 
  dnl be included to get the information) --Sam
1065
 
  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1066
 
  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1067
 
  X_PRE_LIBS=""
1068
 
  LIB_X11=""
1069
 
  LIB_XEXT=""
1070
 
  LIB_XRENDER=""
1071
 
  LIBSM=""
1072
 
  X_INCLUDES=""
1073
 
  X_LDFLAGS=""
1074
 
  x_includes=""
1075
 
  x_libraries=""
1076
 
fi
1077
 
AC_SUBST(X_PRE_LIBS)
1078
 
AC_SUBST(LIB_X11)
1079
 
AC_SUBST(LIB_XRENDER)
1080
 
AC_SUBST(LIBSM)
1081
 
AC_SUBST(X_INCLUDES)
1082
 
AC_SUBST(X_LDFLAGS)
1083
 
AC_SUBST(x_includes)
1084
 
AC_SUBST(x_libraries)
1085
 
AC_SUBST(QTE_NORTTI)
1086
 
AC_SUBST(LIB_XEXT)
1087
 
 
1088
 
])
1089
 
 
1090
 
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1091
 
[
1092
 
AC_REQUIRE([KDE_USE_QT])
1093
 
cat > conftest.$ac_ext <<EOF
1094
 
#include "confdefs.h"
1095
 
#include <qglobal.h>
1096
 
#include <qapplication.h>
1097
 
EOF
1098
 
if test "$kde_qtver" = "2"; then
1099
 
cat >> conftest.$ac_ext <<EOF
1100
 
#include <qevent.h>
1101
 
#include <qstring.h>
1102
 
#include <qstyle.h>
1103
 
EOF
1104
 
 
1105
 
if test $kde_qtsubver -gt 0; then
1106
 
cat >> conftest.$ac_ext <<EOF
1107
 
#if QT_VERSION < 210
1108
 
#error 1
1109
 
#endif
1110
 
EOF
1111
 
fi
1112
 
fi
1113
 
 
1114
 
if test "$kde_qtver" = "3"; then
1115
 
cat >> conftest.$ac_ext <<EOF
1116
 
#include <qcursor.h>
1117
 
#include <qstylefactory.h>
1118
 
#include <private/qucomextra_p.h>
1119
 
EOF
1120
 
fi
1121
 
 
1122
 
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1123
 
cat >> conftest.$ac_ext <<EOF
1124
 
#error 1
1125
 
#endif
1126
 
 
1127
 
int main() {
1128
 
EOF
1129
 
if test "$kde_qtver" = "2"; then
1130
 
cat >> conftest.$ac_ext <<EOF
1131
 
    QStringList *t = new QStringList();
1132
 
    Q_UNUSED(t);
1133
 
EOF
1134
 
if test $kde_qtsubver -gt 0; then
1135
 
cat >> conftest.$ac_ext <<EOF
1136
 
    QString s;
1137
 
    s.setLatin1("Elvis is alive", 14);
1138
 
EOF
1139
 
fi
1140
 
fi
1141
 
if test "$kde_qtver" = "3"; then
1142
 
cat >> conftest.$ac_ext <<EOF
1143
 
    (void)QStyleFactory::create(QString::null);
1144
 
    QCursor c(Qt::WhatsThisCursor);
1145
 
EOF
1146
 
fi
1147
 
cat >> conftest.$ac_ext <<EOF
1148
 
    return 0;
1149
 
}
1150
 
EOF
1151
 
])
1152
 
 
1153
 
AC_DEFUN([KDE_USE_QT],
1154
 
[
1155
 
if test -z "$1"; then
1156
 
  # Current default Qt version: 3.3
1157
 
  kde_qtver=3
1158
 
  kde_qtsubver=3
1159
 
else
1160
 
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1161
 
  # following is the check if subversion isnt found in passed argument
1162
 
  if test "$kde_qtsubver" = "$1"; then
1163
 
    kde_qtsubver=1
1164
 
  fi
1165
 
  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1166
 
  if test "$kde_qtver" = "1"; then
1167
 
    kde_qtsubver=42
1168
 
  fi
1169
 
fi
1170
 
 
1171
 
if test -z "$2"; then
1172
 
  if test "$kde_qtver" = "2"; then
1173
 
    if test $kde_qtsubver -gt 0; then
1174
 
      kde_qt_minversion=">= Qt 2.2.2"
1175
 
    else
1176
 
      kde_qt_minversion=">= Qt 2.0.2"
1177
 
    fi
1178
 
  fi
1179
 
  if test "$kde_qtver" = "3"; then
1180
 
    if test $kde_qtsubver -gt 0; then
1181
 
         if test $kde_qtsubver -gt 1; then
1182
 
            if test $kde_qtsubver -gt 2; then
1183
 
                kde_qt_minversion=">= Qt 3.3 and < 4.0"
1184
 
            else
1185
 
                kde_qt_minversion=">= Qt 3.2 and < 4.0"
1186
 
            fi
1187
 
         else
1188
 
            kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
1189
 
         fi
1190
 
    else
1191
 
      kde_qt_minversion=">= Qt 3.0 and < 4.0"
1192
 
    fi
1193
 
  fi
1194
 
  if test "$kde_qtver" = "1"; then
1195
 
    kde_qt_minversion=">= 1.42 and < 2.0"
1196
 
  fi
1197
 
else
1198
 
   kde_qt_minversion="$2"
1199
 
fi
1200
 
 
1201
 
if test -z "$3"; then
1202
 
   if test $kde_qtver = 3; then
1203
 
     if test $kde_qtsubver -gt 0; then
1204
 
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1205
 
       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1206
 
       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1207
 
     else
1208
 
       kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
1209
 
     fi
1210
 
   fi
1211
 
   if test $kde_qtver = 2; then
1212
 
     if test $kde_qtsubver -gt 0; then
1213
 
       kde_qt_verstring="QT_VERSION >= 222"
1214
 
     else
1215
 
       kde_qt_verstring="QT_VERSION >= 200"
1216
 
     fi
1217
 
   fi
1218
 
   if test $kde_qtver = 1; then
1219
 
    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1220
 
   fi
1221
 
else
1222
 
   kde_qt_verstring="$3"
1223
 
fi
1224
 
 
1225
 
if test $kde_qtver = 4; then
1226
 
  kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
1227
 
fi
1228
 
if test $kde_qtver = 3; then
1229
 
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1230
 
fi
1231
 
if test $kde_qtver = 2; then
1232
 
   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1233
 
fi
1234
 
if test $kde_qtver = 1; then
1235
 
   kde_qt_dirs="$QTDIR /usr/lib/qt"
1236
 
fi
1237
 
])
1238
 
 
1239
 
AC_DEFUN([KDE_CHECK_QT_DIRECT],
1240
 
[
1241
 
AC_REQUIRE([KDE_USE_QT])
1242
 
AC_MSG_CHECKING([if Qt compiles without flags])
1243
 
AC_CACHE_VAL(kde_cv_qt_direct,
1244
 
[
1245
 
AC_LANG_SAVE
1246
 
AC_LANG_CPLUSPLUS
1247
 
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1248
 
ac_LIBRARY_PATH="$LIBRARY_PATH"
1249
 
ac_cxxflags_safe="$CXXFLAGS"
1250
 
ac_ldflags_safe="$LDFLAGS"
1251
 
ac_libs_safe="$LIBS"
1252
 
 
1253
 
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1254
 
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1255
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1256
 
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1257
 
else
1258
 
LIBS="$LIBQT $LIBSOCKET"
1259
 
fi
1260
 
LD_LIBRARY_PATH=
1261
 
export LD_LIBRARY_PATH
1262
 
LIBRARY_PATH=
1263
 
export LIBRARY_PATH
1264
 
 
1265
 
KDE_PRINT_QT_PROGRAM
1266
 
 
1267
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1268
 
  kde_cv_qt_direct="yes"
1269
 
else
1270
 
  kde_cv_qt_direct="no"
1271
 
  echo "configure: failed program was:" >&AC_FD_CC
1272
 
  cat conftest.$ac_ext >&AC_FD_CC
1273
 
fi
1274
 
 
1275
 
rm -f conftest*
1276
 
CXXFLAGS="$ac_cxxflags_safe"
1277
 
LDFLAGS="$ac_ldflags_safe"
1278
 
LIBS="$ac_libs_safe"
1279
 
 
1280
 
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1281
 
export LD_LIBRARY_PATH
1282
 
LIBRARY_PATH="$ac_LIBRARY_PATH"
1283
 
export LIBRARY_PATH
1284
 
AC_LANG_RESTORE
1285
 
])
1286
 
 
1287
 
if test "$kde_cv_qt_direct" = "yes"; then
1288
 
  AC_MSG_RESULT(yes)
1289
 
  $1
1290
 
else
1291
 
  AC_MSG_RESULT(no)
1292
 
  $2
1293
 
fi
1294
 
])
1295
 
 
1296
 
dnl ------------------------------------------------------------------------
1297
 
dnl Try to find the Qt headers and libraries.
1298
 
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1299
 
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1300
 
dnl ------------------------------------------------------------------------
1301
 
dnl
1302
 
AC_DEFUN([AC_PATH_QT_1_3],
1303
 
[
1304
 
AC_REQUIRE([K_PATH_X])
1305
 
AC_REQUIRE([KDE_USE_QT])
1306
 
AC_REQUIRE([KDE_CHECK_LIB64])
1307
 
 
1308
 
dnl ------------------------------------------------------------------------
1309
 
dnl Add configure flag to enable linking to MT version of Qt library.
1310
 
dnl ------------------------------------------------------------------------
1311
 
 
1312
 
AC_ARG_ENABLE(
1313
 
  mt,
1314
 
  AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1315
 
  kde_use_qt_mt=$enableval,
1316
 
  [
1317
 
    if test $kde_qtver = 3; then
1318
 
      kde_use_qt_mt=yes
1319
 
    else
1320
 
      kde_use_qt_mt=no
1321
 
    fi
1322
 
  ]
1323
 
)
1324
 
 
1325
 
USING_QT_MT=""
1326
 
 
1327
 
dnl ------------------------------------------------------------------------
1328
 
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1329
 
dnl ------------------------------------------------------------------------
1330
 
 
1331
 
KDE_MT_LDFLAGS=
1332
 
KDE_MT_LIBS=
1333
 
if test "x$kde_use_qt_mt" = "xyes"; then
1334
 
  KDE_CHECK_THREADING
1335
 
  if test "x$kde_use_threading" = "xyes"; then
1336
 
    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1337
 
    KDE_MT_LDFLAGS="$USE_THREADS"
1338
 
    KDE_MT_LIBS="$LIBPTHREAD"
1339
 
  else
1340
 
    kde_use_qt_mt=no
1341
 
  fi
1342
 
fi
1343
 
AC_SUBST(KDE_MT_LDFLAGS)
1344
 
AC_SUBST(KDE_MT_LIBS)
1345
 
 
1346
 
kde_qt_was_given=yes
1347
 
 
1348
 
dnl ------------------------------------------------------------------------
1349
 
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1350
 
dnl ------------------------------------------------------------------------
1351
 
if test -z "$LIBQT_GLOB"; then
1352
 
  if test "x$kde_use_qt_emb" = "xyes"; then
1353
 
    LIBQT_GLOB="libqte.*"
1354
 
  else
1355
 
    LIBQT_GLOB="libqt.*"
1356
 
  fi
1357
 
fi
1358
 
 
1359
 
dnl ------------------------------------------------------------
1360
 
dnl If we got --enable-embedded then adjust the Qt library name.
1361
 
dnl ------------------------------------------------------------
1362
 
if test "x$kde_use_qt_emb" = "xyes"; then
1363
 
  qtlib="qte"
1364
 
else
1365
 
  qtlib="qt"
1366
 
fi
1367
 
 
1368
 
kde_int_qt="-l$qtlib"
1369
 
 
1370
 
if test -z "$LIBQPE"; then
1371
 
dnl ------------------------------------------------------------
1372
 
dnl If we got --enable-palmtop then add -lqpe to the link line
1373
 
dnl ------------------------------------------------------------
1374
 
  if test "x$kde_use_qt_emb" = "xyes"; then
1375
 
    if test "x$kde_use_qt_emb_palm" = "xyes"; then
1376
 
      LIB_QPE="-lqpe"
1377
 
    else
1378
 
      LIB_QPE=""
1379
 
    fi
1380
 
  else
1381
 
    LIB_QPE=""
1382
 
  fi
1383
 
fi
1384
 
 
1385
 
dnl ------------------------------------------------------------------------
1386
 
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1387
 
dnl ------------------------------------------------------------------------
1388
 
 
1389
 
if test "x$kde_use_qt_mt" = "xyes"; then
1390
 
  LIBQT="-l$qtlib-mt"
1391
 
  kde_int_qt="-l$qtlib-mt"
1392
 
  LIBQT_GLOB="lib$qtlib-mt.*"
1393
 
  USING_QT_MT="using -mt"
1394
 
else
1395
 
  LIBQT="-l$qtlib"
1396
 
fi
1397
 
 
1398
 
if test $kde_qtver != 1; then
1399
 
 
1400
 
  AC_REQUIRE([AC_FIND_PNG])
1401
 
  AC_REQUIRE([AC_FIND_JPEG])
1402
 
  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1403
 
fi
1404
 
 
1405
 
if test $kde_qtver = 3; then
1406
 
  AC_REQUIRE([KDE_CHECK_LIBDL])
1407
 
  LIBQT="$LIBQT $LIBDL"
1408
 
fi
1409
 
 
1410
 
AC_MSG_CHECKING([for Qt])
1411
 
 
1412
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1413
 
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1414
 
fi
1415
 
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1416
 
qt_libraries=""
1417
 
qt_includes=""
1418
 
AC_ARG_WITH(qt-dir,
1419
 
    AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1420
 
    [  ac_qt_includes="$withval"/include
1421
 
       ac_qt_libraries="$withval"/lib${kdelibsuff}
1422
 
       ac_qt_bindir="$withval"/bin
1423
 
    ])
1424
 
 
1425
 
AC_ARG_WITH(qt-includes,
1426
 
    AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1427
 
    [
1428
 
       ac_qt_includes="$withval"
1429
 
    ])
1430
 
 
1431
 
kde_qt_libs_given=no
1432
 
 
1433
 
AC_ARG_WITH(qt-libraries,
1434
 
    AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1435
 
    [  ac_qt_libraries="$withval"
1436
 
       kde_qt_libs_given=yes
1437
 
    ])
1438
 
 
1439
 
AC_CACHE_VAL(ac_cv_have_qt,
1440
 
[#try to guess Qt locations
1441
 
 
1442
 
qt_incdirs=""
1443
 
for dir in $kde_qt_dirs; do
1444
 
   qt_incdirs="$qt_incdirs $dir/include $dir"
1445
 
done
1446
 
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"
1447
 
if test ! "$ac_qt_includes" = "NO"; then
1448
 
   qt_incdirs="$ac_qt_includes $qt_incdirs"
1449
 
fi
1450
 
 
1451
 
if test "$kde_qtver" != "1"; then
1452
 
  kde_qt_header=qstyle.h
1453
 
else
1454
 
  kde_qt_header=qglobal.h
1455
 
fi
1456
 
 
1457
 
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1458
 
ac_qt_includes="$qt_incdir"
1459
 
 
1460
 
qt_libdirs=""
1461
 
for dir in $kde_qt_dirs; do
1462
 
   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1463
 
done
1464
 
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1465
 
if test ! "$ac_qt_libraries" = "NO"; then
1466
 
  qt_libdir=$ac_qt_libraries
1467
 
else
1468
 
  qt_libdirs="$ac_qt_libraries $qt_libdirs"
1469
 
  # if the Qt was given, the chance is too big that libqt.* doesn't exist
1470
 
  qt_libdir=NONE
1471
 
  for dir in $qt_libdirs; do
1472
 
    try="ls -1 $dir/${LIBQT_GLOB}"
1473
 
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1474
 
  done
1475
 
fi
1476
 
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1477
 
  if test -e "$a"; then
1478
 
    LIBQT="$LIBQT ${kde_int_qt}_incremental"
1479
 
    break
1480
 
  fi
1481
 
done
1482
 
 
1483
 
ac_qt_libraries="$qt_libdir"
1484
 
 
1485
 
AC_LANG_SAVE
1486
 
AC_LANG_CPLUSPLUS
1487
 
 
1488
 
ac_cxxflags_safe="$CXXFLAGS"
1489
 
ac_ldflags_safe="$LDFLAGS"
1490
 
ac_libs_safe="$LIBS"
1491
 
 
1492
 
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1493
 
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1494
 
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1495
 
 
1496
 
KDE_PRINT_QT_PROGRAM
1497
 
 
1498
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1499
 
  rm -f conftest*
1500
 
else
1501
 
  echo "configure: failed program was:" >&AC_FD_CC
1502
 
  cat conftest.$ac_ext >&AC_FD_CC
1503
 
  ac_qt_libraries="NO"
1504
 
fi
1505
 
rm -f conftest*
1506
 
CXXFLAGS="$ac_cxxflags_safe"
1507
 
LDFLAGS="$ac_ldflags_safe"
1508
 
LIBS="$ac_libs_safe"
1509
 
 
1510
 
AC_LANG_RESTORE
1511
 
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1512
 
  ac_cv_have_qt="have_qt=no"
1513
 
  ac_qt_notfound=""
1514
 
  missing_qt_mt=""
1515
 
  if test "$ac_qt_includes" = NO; then
1516
 
    if test "$ac_qt_libraries" = NO; then
1517
 
      ac_qt_notfound="(headers and libraries)";
1518
 
    else
1519
 
      ac_qt_notfound="(headers)";
1520
 
    fi
1521
 
  else
1522
 
    if test "x$kde_use_qt_mt" = "xyes"; then
1523
 
       missing_qt_mt="
1524
 
Make sure that you have compiled Qt with thread support!"
1525
 
       ac_qt_notfound="(library $qtlib-mt)";
1526
 
    else
1527
 
       ac_qt_notfound="(library $qtlib)";
1528
 
    fi
1529
 
  fi
1530
 
 
1531
 
  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1532
 
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1533
 
else
1534
 
  have_qt="yes"
1535
 
fi
1536
 
])
1537
 
 
1538
 
eval "$ac_cv_have_qt"
1539
 
 
1540
 
if test "$have_qt" != yes; then
1541
 
  AC_MSG_RESULT([$have_qt]);
1542
 
else
1543
 
  ac_cv_have_qt="have_qt=yes \
1544
 
    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1545
 
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1546
 
 
1547
 
  qt_libraries="$ac_qt_libraries"
1548
 
  qt_includes="$ac_qt_includes"
1549
 
fi
1550
 
 
1551
 
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1552
 
     KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1553
 
fi
1554
 
 
1555
 
AC_SUBST(qt_libraries)
1556
 
AC_SUBST(qt_includes)
1557
 
 
1558
 
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1559
 
 QT_INCLUDES=""
1560
 
else
1561
 
 QT_INCLUDES="-I$qt_includes"
1562
 
 all_includes="$QT_INCLUDES $all_includes"
1563
 
fi
1564
 
 
1565
 
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1566
 
 QT_LDFLAGS=""
1567
 
else
1568
 
 QT_LDFLAGS="-L$qt_libraries"
1569
 
 all_libraries="$QT_LDFLAGS $all_libraries"
1570
 
fi
1571
 
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1572
 
 
1573
 
AC_SUBST(QT_INCLUDES)
1574
 
AC_SUBST(QT_LDFLAGS)
1575
 
AC_PATH_QT_MOC_UIC
1576
 
 
1577
 
KDE_CHECK_QT_JPEG
1578
 
 
1579
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1580
 
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1581
 
else
1582
 
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1583
 
fi
1584
 
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1585
 
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1586
 
  if test -e "$a"; then
1587
 
     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1588
 
     break
1589
 
  fi
1590
 
done
1591
 
 
1592
 
AC_SUBST(LIB_QT)
1593
 
AC_SUBST(LIB_QPE)
1594
 
 
1595
 
AC_SUBST(kde_qtver)
1596
 
])
1597
 
 
1598
 
AC_DEFUN([AC_PATH_QT],
1599
 
[
1600
 
AC_PATH_QT_1_3
1601
 
])
1602
 
 
1603
 
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1604
 
[
1605
 
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1606
 
 
1607
 
if test x$ac_uic_supports_libpath = xyes; then
1608
 
 
1609
 
AC_MSG_CHECKING([if UIC has KDE plugins available])
1610
 
AC_CACHE_VAL(kde_cv_uic_plugins,
1611
 
[
1612
 
cat > actest.ui << EOF
1613
 
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1614
 
<class>NewConnectionDialog</class>
1615
 
<widget class="QDialog">
1616
 
   <widget class="KLineEdit">
1617
 
        <property name="name">
1618
 
           <cstring>testInput</cstring>
1619
 
        </property>
1620
 
   </widget>
1621
 
</widget>
1622
 
</UI>
1623
 
EOF
1624
 
       
1625
 
 
1626
 
 
1627
 
kde_cv_uic_plugins=no
1628
 
kde_line="$UIC_PATH -L $kde_widgetdir"
1629
 
if test x$ac_uic_supports_nounload = xyes; then
1630
 
   kde_line="$kde_line -nounload"
1631
 
fi
1632
 
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1633
 
if AC_TRY_EVAL(kde_line); then
1634
 
        # if you're trying to debug this check and think it's incorrect,
1635
 
        # better check your installation. The check _is_ correct - your
1636
 
        # installation is not.
1637
 
        if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1638
 
                kde_cv_uic_plugins=yes
1639
 
        fi
1640
 
fi
1641
 
rm -f actest.ui actest.cpp
1642
 
])
1643
 
 
1644
 
AC_MSG_RESULT([$kde_cv_uic_plugins])
1645
 
if test "$kde_cv_uic_plugins" != yes; then
1646
 
        AC_MSG_ERROR([
1647
 
you need to install kdelibs first.
1648
 
 
1649
 
If you did install kdelibs, then the Qt version that is picked up by
1650
 
this configure is not the same version you used to compile kdelibs. 
1651
 
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the 
1652
 
_same Qt version_, compiled with the _same compiler_ and the same Qt
1653
 
configuration settings.
1654
 
])
1655
 
fi
1656
 
fi
1657
 
])
1658
 
 
1659
 
AC_DEFUN([KDE_CHECK_FINAL],
1660
 
[
1661
 
  AC_ARG_ENABLE(final,
1662
 
        AC_HELP_STRING([--enable-final],
1663
 
                       [build size optimized apps (experimental - needs lots of memory)]),
1664
 
        kde_use_final=$enableval, kde_use_final=no)
1665
 
 
1666
 
  if test "x$kde_use_final" = "xyes"; then
1667
 
      KDE_USE_FINAL_TRUE=""
1668
 
      KDE_USE_FINAL_FALSE="#"
1669
 
   else
1670
 
      KDE_USE_FINAL_TRUE="#"
1671
 
      KDE_USE_FINAL_FALSE=""
1672
 
  fi
1673
 
  AC_SUBST(KDE_USE_FINAL_TRUE)
1674
 
  AC_SUBST(KDE_USE_FINAL_FALSE)
1675
 
])
1676
 
 
1677
 
AC_DEFUN([KDE_CHECK_CLOSURE],
1678
 
[
1679
 
  AC_ARG_ENABLE(closure,
1680
 
                AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1681
 
        kde_use_closure=$enableval, kde_use_closure=no)
1682
 
 
1683
 
  KDE_NO_UNDEFINED=""
1684
 
  if test "x$kde_use_closure" = "xyes"; then
1685
 
       KDE_USE_CLOSURE_TRUE=""
1686
 
       KDE_USE_CLOSURE_FALSE="#"
1687
 
#       CXXFLAGS="$CXXFLAGS $REPO"
1688
 
  else
1689
 
       KDE_USE_CLOSURE_TRUE="#"
1690
 
       KDE_USE_CLOSURE_FALSE=""
1691
 
       KDE_NO_UNDEFINED=""
1692
 
       case $host in 
1693
 
         *-*-linux-gnu)
1694
 
           KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1695
 
                [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1696
 
                [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1697
 
                [KDE_NO_UNDEFINED=""])],
1698
 
            [KDE_NO_UNDEFINED=""])
1699
 
           ;;
1700
 
       esac
1701
 
  fi
1702
 
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
1703
 
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
1704
 
  AC_SUBST(KDE_NO_UNDEFINED)
1705
 
])
1706
 
 
1707
 
dnl Check if the linker supports --enable-new-dtags and --as-needed
1708
 
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
1709
 
[
1710
 
  AC_ARG_ENABLE(new_ldflags,
1711
 
                AC_HELP_STRING([--enable-new-ldflags],
1712
 
                [enable the new linker flags]),
1713
 
        kde_use_new_ldflags=$enableval, 
1714
 
        kde_use_new_ldflags=no)
1715
 
 
1716
 
  LDFLAGS_AS_NEEDED=""
1717
 
  LDFLAGS_NEW_DTAGS=""
1718
 
  if test "x$kde_use_new_ldflags" = "xyes"; then
1719
 
       LDFLAGS_NEW_DTAGS=""
1720
 
       KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
1721
 
                [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
1722
 
 
1723
 
       KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
1724
 
                [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
1725
 
  fi
1726
 
  AC_SUBST(LDFLAGS_AS_NEEDED)
1727
 
  AC_SUBST(LDFLAGS_NEW_DTAGS)
1728
 
])
1729
 
 
1730
 
AC_DEFUN([KDE_CHECK_NMCHECK],
1731
 
[
1732
 
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1733
 
        kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1734
 
 
1735
 
  if test "$kde_use_nmcheck" = "yes"; then
1736
 
      KDE_USE_NMCHECK_TRUE=""
1737
 
      KDE_USE_NMCHECK_FALSE="#"
1738
 
   else
1739
 
      KDE_USE_NMCHECK_TRUE="#"
1740
 
      KDE_USE_NMCHECK_FALSE=""
1741
 
  fi
1742
 
  AC_SUBST(KDE_USE_NMCHECK_TRUE)
1743
 
  AC_SUBST(KDE_USE_NMCHECK_FALSE)
1744
 
])
1745
 
 
1746
 
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1747
 
savex=$exec_prefix
1748
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1749
 
tmp=$$2
1750
 
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1751
 
exec_prefix=$savex
1752
 
])
1753
 
 
1754
 
dnl ------------------------------------------------------------------------
1755
 
dnl Now, the same with KDE
1756
 
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1757
 
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1758
 
dnl ------------------------------------------------------------------------
1759
 
dnl
1760
 
AC_DEFUN([AC_BASE_PATH_KDE],
1761
 
[
1762
 
AC_REQUIRE([KDE_CHECK_STL])
1763
 
AC_REQUIRE([AC_PATH_QT])dnl
1764
 
AC_REQUIRE([KDE_CHECK_LIB64])
1765
 
 
1766
 
AC_CHECK_RPATH
1767
 
AC_MSG_CHECKING([for KDE])
1768
 
 
1769
 
if test "${prefix}" != NONE; then
1770
 
  kde_includes=${includedir}
1771
 
  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1772
 
 
1773
 
  kde_libraries=${libdir}
1774
 
  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1775
 
 
1776
 
else
1777
 
  ac_kde_includes=
1778
 
  ac_kde_libraries=
1779
 
  kde_libraries=""
1780
 
  kde_includes=""
1781
 
fi
1782
 
 
1783
 
AC_CACHE_VAL(ac_cv_have_kde,
1784
 
[#try to guess kde locations
1785
 
 
1786
 
if test "$kde_qtver" = 1; then
1787
 
  kde_check_header="ksock.h"
1788
 
  kde_check_lib="libkdecore.la"
1789
 
else
1790
 
  kde_check_header="ksharedptr.h"
1791
 
  kde_check_lib="libkio.la"
1792
 
fi
1793
 
 
1794
 
if test -z "$1"; then
1795
 
 
1796
 
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1797
 
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1798
 
kde_incdirs="$ac_kde_includes $kde_incdirs"
1799
 
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1800
 
ac_kde_includes="$kde_incdir"
1801
 
 
1802
 
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1803
 
  AC_MSG_ERROR([
1804
 
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1805
 
So, check this please and use another prefix!])
1806
 
fi
1807
 
 
1808
 
kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1809
 
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1810
 
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1811
 
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1812
 
ac_kde_libraries="$kde_libdir"
1813
 
 
1814
 
kde_widgetdir=NO
1815
 
dnl this might be somewhere else
1816
 
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1817
 
 
1818
 
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1819
 
AC_MSG_ERROR([
1820
 
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1821
 
So, check this please and use another prefix!])
1822
 
fi
1823
 
 
1824
 
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1825
 
AC_MSG_ERROR([
1826
 
I can't find the designer plugins. These are required and should have been installed
1827
 
by kdelibs])
1828
 
fi
1829
 
 
1830
 
if test -n "$kde_widgetdir"; then
1831
 
    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1832
 
fi
1833
 
 
1834
 
 
1835
 
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1836
 
  ac_cv_have_kde="have_kde=no"
1837
 
else
1838
 
  ac_cv_have_kde="have_kde=yes \
1839
 
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1840
 
fi
1841
 
 
1842
 
else dnl test -z $1, e.g. from kdelibs
1843
 
 
1844
 
  ac_cv_have_kde="have_kde=no"
1845
 
 
1846
 
fi
1847
 
])dnl
1848
 
 
1849
 
eval "$ac_cv_have_kde"
1850
 
 
1851
 
if test "$have_kde" != "yes"; then
1852
 
 if test "${prefix}" = NONE; then
1853
 
  ac_kde_prefix="$ac_default_prefix"
1854
 
 else
1855
 
  ac_kde_prefix="$prefix"
1856
 
 fi
1857
 
 if test "$exec_prefix" = NONE; then
1858
 
  ac_kde_exec_prefix="$ac_kde_prefix"
1859
 
  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1860
 
 else
1861
 
  ac_kde_exec_prefix="$exec_prefix"
1862
 
  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1863
 
 fi
1864
 
 
1865
 
 kde_libraries="${libdir}"
1866
 
 kde_includes="${includedir}"
1867
 
 
1868
 
else
1869
 
  ac_cv_have_kde="have_kde=yes \
1870
 
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1871
 
  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1872
 
 
1873
 
  kde_libraries="$ac_kde_libraries"
1874
 
  kde_includes="$ac_kde_includes"
1875
 
fi
1876
 
AC_SUBST(kde_libraries)
1877
 
AC_SUBST(kde_includes)
1878
 
 
1879
 
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
1880
 
 KDE_INCLUDES=""
1881
 
else
1882
 
 KDE_INCLUDES="-I$kde_includes"
1883
 
 all_includes="$KDE_INCLUDES $all_includes"
1884
 
fi
1885
 
 
1886
 
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1887
 
 
1888
 
KDE_LDFLAGS="-L$kde_libraries"
1889
 
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
1890
 
 all_libraries="$KDE_LDFLAGS $all_libraries"
1891
 
fi
1892
 
 
1893
 
AC_SUBST(KDE_LDFLAGS)
1894
 
AC_SUBST(KDE_INCLUDES)
1895
 
 
1896
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1897
 
 
1898
 
all_libraries="$all_libraries $USER_LDFLAGS"
1899
 
all_includes="$all_includes $USER_INCLUDES"
1900
 
AC_SUBST(all_includes)
1901
 
AC_SUBST(all_libraries)
1902
 
 
1903
 
if test -z "$1"; then
1904
 
KDE_CHECK_UIC_PLUGINS
1905
 
fi
1906
 
 
1907
 
ac_kde_libraries="$kde_libdir"
1908
 
 
1909
 
AC_SUBST(AUTODIRS)
1910
 
 
1911
 
 
1912
 
])
1913
 
 
1914
 
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1915
 
[
1916
 
AC_MSG_CHECKING(for extra includes)
1917
 
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1918
 
  kde_use_extra_includes="$withval",
1919
 
  kde_use_extra_includes=NONE
1920
 
)
1921
 
kde_extra_includes=
1922
 
if test -n "$kde_use_extra_includes" && \
1923
 
   test "$kde_use_extra_includes" != "NONE"; then
1924
 
 
1925
 
   ac_save_ifs=$IFS
1926
 
   IFS=':'
1927
 
   for dir in $kde_use_extra_includes; do
1928
 
     kde_extra_includes="$kde_extra_includes $dir"
1929
 
     USER_INCLUDES="$USER_INCLUDES -I$dir"
1930
 
   done
1931
 
   IFS=$ac_save_ifs
1932
 
   kde_use_extra_includes="added"
1933
 
else
1934
 
   kde_use_extra_includes="no"
1935
 
fi
1936
 
AC_SUBST(USER_INCLUDES)
1937
 
 
1938
 
AC_MSG_RESULT($kde_use_extra_includes)
1939
 
 
1940
 
kde_extra_libs=
1941
 
AC_MSG_CHECKING(for extra libs)
1942
 
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1943
 
  kde_use_extra_libs=$withval,
1944
 
  kde_use_extra_libs=NONE
1945
 
)
1946
 
if test -n "$kde_use_extra_libs" && \
1947
 
   test "$kde_use_extra_libs" != "NONE"; then
1948
 
 
1949
 
   ac_save_ifs=$IFS
1950
 
   IFS=':'
1951
 
   for dir in $kde_use_extra_libs; do
1952
 
     kde_extra_libs="$kde_extra_libs $dir"
1953
 
     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1954
 
     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1955
 
   done
1956
 
   IFS=$ac_save_ifs
1957
 
   kde_use_extra_libs="added"
1958
 
else
1959
 
   kde_use_extra_libs="no"
1960
 
fi
1961
 
 
1962
 
AC_SUBST(USER_LDFLAGS)
1963
 
 
1964
 
AC_MSG_RESULT($kde_use_extra_libs)
1965
 
 
1966
 
])
1967
 
 
1968
 
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1969
 
[
1970
 
    AC_MSG_CHECKING([for KDE headers installed])
1971
 
    AC_LANG_SAVE
1972
 
    AC_LANG_CPLUSPLUS
1973
 
cat > conftest.$ac_ext <<EOF
1974
 
#ifdef STDC_HEADERS
1975
 
# include <stdlib.h>
1976
 
#endif
1977
 
#include <stdio.h>
1978
 
#include "confdefs.h"
1979
 
#include <kapp.h>
1980
 
 
1981
 
int main() {
1982
 
    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1983
 
    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1984
 
    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1985
 
    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1986
 
    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1987
 
    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1988
 
    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1989
 
    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1990
 
    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1991
 
    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1992
 
    printf("kde_wallpaperdir=\\"%s\\"\n",
1993
 
        KApplication::kde_wallpaperdir().data());
1994
 
    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1995
 
    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1996
 
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1997
 
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1998
 
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1999
 
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
2000
 
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
2001
 
    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
2002
 
    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
2003
 
    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
2004
 
    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
2005
 
    return 0;
2006
 
    }
2007
 
EOF
2008
 
 
2009
 
 ac_save_CPPFLAGS=$CPPFLAGS
2010
 
 CPPFLAGS="$all_includes $CPPFLAGS"
2011
 
 if AC_TRY_EVAL(ac_compile); then
2012
 
   AC_MSG_RESULT(yes)
2013
 
 else
2014
 
   AC_MSG_ERROR([your system is not able to compile a small KDE application!
2015
 
Check, if you installed the KDE header files correctly.
2016
 
For more details about this problem, look at the end of config.log.])
2017
 
  fi
2018
 
  CPPFLAGS=$ac_save_CPPFLAGS
2019
 
 
2020
 
  AC_LANG_RESTORE
2021
 
])
2022
 
 
2023
 
AC_DEFUN([KDE_CHECK_KDEQTADDON],
2024
 
[
2025
 
AC_MSG_CHECKING(for kde-qt-addon)
2026
 
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2027
 
[
2028
 
 kde_ldflags_safe="$LDFLAGS"
2029
 
 kde_libs_safe="$LIBS"
2030
 
 kde_cxxflags_safe="$CXXFLAGS"
2031
 
 
2032
 
 LIBS="-lkde-qt-addon $LIBQT $LIBS"
2033
 
 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
2034
 
 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
2035
 
 
2036
 
 AC_TRY_LINK([
2037
 
   #include <qdom.h>
2038
 
 ],
2039
 
 [
2040
 
   QDomDocument doc;
2041
 
 ],
2042
 
  kde_cv_have_kdeqtaddon=yes,
2043
 
  kde_cv_have_kdeqtaddon=no
2044
 
 )
2045
 
 
2046
 
 LDFLAGS=$kde_ldflags_safe
2047
 
 LIBS=$kde_libs_safe
2048
 
 CXXFLAGS=$kde_cxxflags_safe
2049
 
])
2050
 
 
2051
 
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2052
 
 
2053
 
if test "$kde_cv_have_kdeqtaddon" = "no"; then
2054
 
  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2055
 
It is a separate package (and CVS module) named kde-qt-addon.])
2056
 
fi
2057
 
])
2058
 
 
2059
 
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2060
 
[
2061
 
   AC_REQUIRE([KDE_MISC_TESTS])
2062
 
   AC_REQUIRE([KDE_CHECK_LIBDL])
2063
 
   AC_REQUIRE([K_PATH_X])
2064
 
 
2065
 
if test $kde_qtver = 3; then
2066
 
   case $host in 
2067
 
               *cygwin*) lib_kded="-lkdeinit_kded" ;;
2068
 
               *) lib_kded="" ;;
2069
 
       esac
2070
 
   AC_SUBST(LIB_KDED, $lib_kded)
2071
 
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2072
 
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2073
 
   AC_SUBST(LIB_KIO, "-lkio")
2074
 
   AC_SUBST(LIB_KJS, "-lkjs")
2075
 
   AC_SUBST(LIB_SMB, "-lsmb")
2076
 
   AC_SUBST(LIB_KAB, "-lkab")
2077
 
   AC_SUBST(LIB_KABC, "-lkabc")
2078
 
   AC_SUBST(LIB_KHTML, "-lkhtml")
2079
 
   AC_SUBST(LIB_KSPELL, "-lkspell")
2080
 
   AC_SUBST(LIB_KPARTS, "-lkparts")
2081
 
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2082
 
   AC_SUBST(LIB_KUTILS, "-lkutils")
2083
 
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
2084
 
   AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2085
 
   AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2086
 
   AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2087
 
   AC_SUBST(LIB_KUNITTEST, "-lkunittest")
2088
 
# these are for backward compatibility
2089
 
   AC_SUBST(LIB_KSYCOCA, "-lkio")
2090
 
   AC_SUBST(LIB_KFILE, "-lkio")
2091
 
elif test $kde_qtver = 2; then
2092
 
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2093
 
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2094
 
   AC_SUBST(LIB_KIO, "-lkio")
2095
 
   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2096
 
   AC_SUBST(LIB_SMB, "-lsmb")
2097
 
   AC_SUBST(LIB_KFILE, "-lkfile")
2098
 
   AC_SUBST(LIB_KAB, "-lkab")
2099
 
   AC_SUBST(LIB_KHTML, "-lkhtml")
2100
 
   AC_SUBST(LIB_KSPELL, "-lkspell")
2101
 
   AC_SUBST(LIB_KPARTS, "-lkparts")
2102
 
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2103
 
else
2104
 
   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2105
 
   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2106
 
   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2107
 
   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2108
 
   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2109
 
fi
2110
 
])
2111
 
 
2112
 
AC_DEFUN([AC_PATH_KDE],
2113
 
[
2114
 
  AC_BASE_PATH_KDE
2115
 
  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2116
 
  [
2117
 
  if test "$enableval" = "no";
2118
 
    then ac_use_path_checking="default"
2119
 
    else ac_use_path_checking=""
2120
 
  fi
2121
 
  ],
2122
 
  [
2123
 
  if test "$kde_qtver" = 1;
2124
 
    then ac_use_path_checking=""
2125
 
    else ac_use_path_checking="default"
2126
 
  fi
2127
 
  ]
2128
 
  )
2129
 
 
2130
 
  AC_CREATE_KFSSTND($ac_use_path_checking)
2131
 
 
2132
 
  AC_SUBST_KFSSTND
2133
 
  KDE_CREATE_LIBS_ALIASES
2134
 
])
2135
 
 
2136
 
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2137
 
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2138
 
[
2139
 
AC_MSG_CHECKING(for $1)
2140
 
AC_CACHE_VAL(kde_cv_func_$1,
2141
 
[
2142
 
AC_LANG_SAVE
2143
 
AC_LANG_CPLUSPLUS
2144
 
save_CXXFLAGS="$CXXFLAGS"
2145
 
kde_safe_LIBS="$LIBS"
2146
 
LIBS="$LIBS $X_EXTRA_LIBS"
2147
 
if test "$GXX" = "yes"; then
2148
 
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2149
 
fi
2150
 
AC_TRY_COMPILE([
2151
 
$2
2152
 
],
2153
 
[
2154
 
$3
2155
 
],
2156
 
kde_cv_func_$1=yes,
2157
 
kde_cv_func_$1=no)
2158
 
CXXFLAGS="$save_CXXFLAGS"
2159
 
LIBS="$kde_safe_LIBS"
2160
 
AC_LANG_RESTORE
2161
 
])
2162
 
 
2163
 
AC_MSG_RESULT($kde_cv_func_$1)
2164
 
 
2165
 
AC_MSG_CHECKING([if $1 needs custom prototype])
2166
 
AC_CACHE_VAL(kde_cv_proto_$1,
2167
 
[
2168
 
if test "x$kde_cv_func_$1" = xyes; then
2169
 
  kde_cv_proto_$1=no
2170
 
else
2171
 
  case "$1" in
2172
 
        setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2173
 
                kde_cv_proto_$1="yes - in libkdefakes"
2174
 
                ;;
2175
 
        *)
2176
 
                kde_cv_proto_$1=unknown
2177
 
                ;;
2178
 
  esac
2179
 
fi
2180
 
 
2181
 
if test "x$kde_cv_proto_$1" = xunknown; then
2182
 
 
2183
 
AC_LANG_SAVE
2184
 
AC_LANG_CPLUSPLUS
2185
 
  kde_safe_libs=$LIBS
2186
 
  LIBS="$LIBS $X_EXTRA_LIBS"
2187
 
  AC_TRY_LINK([
2188
 
$2
2189
 
 
2190
 
extern "C" $4;
2191
 
],
2192
 
[
2193
 
$3
2194
 
],
2195
 
[ kde_cv_func_$1=yes
2196
 
  kde_cv_proto_$1=yes ],
2197
 
  [kde_cv_proto_$1="$1 unavailable"]
2198
 
)
2199
 
LIBS=$kde_safe_libs
2200
 
AC_LANG_RESTORE
2201
 
fi
2202
 
])
2203
 
AC_MSG_RESULT($kde_cv_proto_$1)
2204
 
 
2205
 
if test "x$kde_cv_func_$1" = xyes; then
2206
 
  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2207
 
  $6
2208
 
fi
2209
 
if test "x$kde_cv_proto_$1" = xno; then
2210
 
  AC_DEFINE(HAVE_$5_PROTO, 1,
2211
 
  [Define if you have the $1 prototype])
2212
 
fi
2213
 
 
2214
 
AH_VERBATIM([_HAVE_$5_PROTO],
2215
 
[
2216
 
#if !defined(HAVE_$5_PROTO)
2217
 
#ifdef __cplusplus
2218
 
extern "C" {
2219
 
#endif
2220
 
$4;
2221
 
#ifdef __cplusplus
2222
 
}
2223
 
#endif
2224
 
#endif
2225
 
])
2226
 
])
2227
 
 
2228
 
AC_DEFUN([AC_CHECK_SETENV],
2229
 
[
2230
 
        KDE_CHECK_FUNC_EXT(setenv, [
2231
 
#include <stdlib.h>
2232
 
], 
2233
 
                [setenv("VAR", "VALUE", 1);],
2234
 
                [int setenv (const char *, const char *, int)],
2235
 
                [SETENV])
2236
 
])
2237
 
 
2238
 
AC_DEFUN([AC_CHECK_UNSETENV],
2239
 
[
2240
 
        KDE_CHECK_FUNC_EXT(unsetenv, [
2241
 
#include <stdlib.h>
2242
 
], 
2243
 
                [unsetenv("VAR");],
2244
 
                [void unsetenv (const char *)],
2245
 
                [UNSETENV])
2246
 
])
2247
 
 
2248
 
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2249
 
[
2250
 
        KDE_CHECK_FUNC_EXT(getdomainname, [
2251
 
#include <stdlib.h>
2252
 
#include <unistd.h>
2253
 
#include <netdb.h>
2254
 
], 
2255
 
                [
2256
 
char buffer[200];
2257
 
getdomainname(buffer, 200);
2258
 
],      
2259
 
                [#include <sys/types.h>
2260
 
                int getdomainname (char *, size_t)],
2261
 
                [GETDOMAINNAME])
2262
 
])
2263
 
 
2264
 
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2265
 
[
2266
 
        KDE_CHECK_FUNC_EXT(gethostname, [
2267
 
#include <stdlib.h>
2268
 
#include <unistd.h>
2269
 
], 
2270
 
                [
2271
 
char buffer[200];
2272
 
gethostname(buffer, 200);
2273
 
],      
2274
 
                [int gethostname (char *, unsigned int)],
2275
 
                [GETHOSTNAME])
2276
 
])
2277
 
 
2278
 
AC_DEFUN([AC_CHECK_USLEEP],
2279
 
[
2280
 
        KDE_CHECK_FUNC_EXT(usleep, [
2281
 
#include <unistd.h>
2282
 
], 
2283
 
                [
2284
 
usleep(200);
2285
 
],      
2286
 
                [int usleep (unsigned int)],
2287
 
                [USLEEP])
2288
 
])
2289
 
 
2290
 
 
2291
 
AC_DEFUN([AC_CHECK_RANDOM],
2292
 
[
2293
 
        KDE_CHECK_FUNC_EXT(random, [
2294
 
#include <stdlib.h>
2295
 
], 
2296
 
                [
2297
 
random();
2298
 
],      
2299
 
                [long int random(void)],
2300
 
                [RANDOM])
2301
 
 
2302
 
        KDE_CHECK_FUNC_EXT(srandom, [
2303
 
#include <stdlib.h>
2304
 
], 
2305
 
                [
2306
 
srandom(27);
2307
 
],      
2308
 
                [void srandom(unsigned int)],
2309
 
                [SRANDOM])
2310
 
 
2311
 
])
2312
 
 
2313
 
AC_DEFUN([AC_CHECK_INITGROUPS],
2314
 
[
2315
 
        KDE_CHECK_FUNC_EXT(initgroups, [
2316
 
#include <sys/types.h>
2317
 
#include <unistd.h>
2318
 
#include <grp.h>
2319
 
],
2320
 
        [
2321
 
char buffer[200];
2322
 
initgroups(buffer, 27);
2323
 
],
2324
 
        [int initgroups(const char *, gid_t)],
2325
 
        [INITGROUPS])
2326
 
])
2327
 
 
2328
 
AC_DEFUN([AC_CHECK_MKSTEMPS],
2329
 
[
2330
 
        KDE_CHECK_FUNC_EXT(mkstemps, [
2331
 
#include <stdlib.h>
2332
 
#include <unistd.h>
2333
 
],
2334
 
        [
2335
 
mkstemps("/tmp/aaaXXXXXX", 6);
2336
 
],
2337
 
        [int mkstemps(char *, int)],
2338
 
        [MKSTEMPS])
2339
 
])
2340
 
 
2341
 
AC_DEFUN([AC_CHECK_MKSTEMP],
2342
 
[
2343
 
        KDE_CHECK_FUNC_EXT(mkstemp, [
2344
 
#include <stdlib.h>
2345
 
#include <unistd.h>
2346
 
],
2347
 
        [
2348
 
mkstemp("/tmp/aaaXXXXXX");
2349
 
],
2350
 
        [int mkstemp(char *)],
2351
 
        [MKSTEMP])
2352
 
])
2353
 
 
2354
 
AC_DEFUN([AC_CHECK_MKDTEMP],
2355
 
[
2356
 
        KDE_CHECK_FUNC_EXT(mkdtemp, [
2357
 
#include <stdlib.h>
2358
 
#include <unistd.h>
2359
 
],
2360
 
        [
2361
 
mkdtemp("/tmp/aaaXXXXXX");
2362
 
],
2363
 
        [char *mkdtemp(char *)],
2364
 
        [MKDTEMP])
2365
 
])
2366
 
 
2367
 
 
2368
 
AC_DEFUN([AC_CHECK_RES_INIT],
2369
 
[
2370
 
  AC_MSG_CHECKING([if res_init needs -lresolv])
2371
 
  kde_libs_safe="$LIBS"
2372
 
  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2373
 
  AC_TRY_LINK(
2374
 
    [
2375
 
#include <sys/types.h>
2376
 
#include <netinet/in.h>
2377
 
#include <arpa/nameser.h>
2378
 
#include <resolv.h>
2379
 
    ],
2380
 
    [
2381
 
      res_init(); 
2382
 
    ],
2383
 
    [
2384
 
      LIBRESOLV="-lresolv"
2385
 
      AC_MSG_RESULT(yes)
2386
 
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2387
 
    ],
2388
 
    [ AC_MSG_RESULT(no) ]
2389
 
  )
2390
 
  LIBS=$kde_libs_safe
2391
 
  AC_SUBST(LIBRESOLV)
2392
 
 
2393
 
  KDE_CHECK_FUNC_EXT(res_init,
2394
 
    [
2395
 
#include <sys/types.h>
2396
 
#include <netinet/in.h>
2397
 
#include <arpa/nameser.h>
2398
 
#include <resolv.h>
2399
 
    ],
2400
 
    [res_init()],
2401
 
    [int res_init(void)],
2402
 
    [RES_INIT])
2403
 
])
2404
 
 
2405
 
AC_DEFUN([AC_CHECK_STRLCPY],
2406
 
[
2407
 
        KDE_CHECK_FUNC_EXT(strlcpy, [
2408
 
#include <string.h>
2409
 
],
2410
 
[ char buf[20];
2411
 
  strlcpy(buf, "KDE function test", sizeof(buf));
2412
 
],
2413
 
        [unsigned long strlcpy(char*, const char*, unsigned long)],
2414
 
        [STRLCPY])
2415
 
])
2416
 
 
2417
 
AC_DEFUN([AC_CHECK_STRLCAT],
2418
 
[
2419
 
        KDE_CHECK_FUNC_EXT(strlcat, [
2420
 
#include <string.h>
2421
 
],
2422
 
[ char buf[20];
2423
 
  buf[0]='\0';
2424
 
  strlcat(buf, "KDE function test", sizeof(buf));
2425
 
],
2426
 
        [unsigned long strlcat(char*, const char*, unsigned long)],
2427
 
        [STRLCAT])
2428
 
])
2429
 
 
2430
 
AC_DEFUN([AC_CHECK_RES_QUERY],
2431
 
[
2432
 
        KDE_CHECK_FUNC_EXT(res_query, [
2433
 
#include <sys/types.h>
2434
 
#include <netinet/in.h>
2435
 
#include <arpa/nameser.h>
2436
 
#include <resolv.h>
2437
 
#include <netdb.h>
2438
 
],
2439
 
[
2440
 
res_query(NULL, 0, 0, NULL, 0);
2441
 
],
2442
 
        [int res_query(const char *, int, int, unsigned char *, int)],
2443
 
        [RES_QUERY])
2444
 
])
2445
 
 
2446
 
AC_DEFUN([AC_CHECK_DN_SKIPNAME],
2447
 
[
2448
 
        KDE_CHECK_FUNC_EXT(dn_skipname, [
2449
 
#include <sys/types.h>
2450
 
#include <netinet/in.h>
2451
 
#include <arpa/nameser.h>
2452
 
#include <resolv.h>
2453
 
],
2454
 
[
2455
 
dn_skipname (NULL, NULL);
2456
 
],
2457
 
        [int dn_skipname (unsigned char *, unsigned char *)],
2458
 
        [DN_SKIPNAME])
2459
 
])
2460
 
 
2461
 
 
2462
 
AC_DEFUN([AC_FIND_GIF],
2463
 
   [AC_MSG_CHECKING([for giflib])
2464
 
AC_CACHE_VAL(ac_cv_lib_gif,
2465
 
[ac_save_LIBS="$LIBS"
2466
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2467
 
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2468
 
else
2469
 
LIBS="$all_libraries -lgif"
2470
 
fi
2471
 
AC_TRY_LINK(dnl
2472
 
[
2473
 
#ifdef __cplusplus
2474
 
extern "C" {
2475
 
#endif
2476
 
int GifLastError(void);
2477
 
#ifdef __cplusplus
2478
 
}
2479
 
#endif
2480
 
/* We use char because int might match the return type of a gcc2
2481
 
    builtin and then its argument prototype would still apply.  */
2482
 
],
2483
 
            [return GifLastError();],
2484
 
            eval "ac_cv_lib_gif=yes",
2485
 
            eval "ac_cv_lib_gif=no")
2486
 
LIBS="$ac_save_LIBS"
2487
 
])dnl
2488
 
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2489
 
  AC_MSG_RESULT(yes)
2490
 
  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2491
 
else
2492
 
  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2493
 
fi
2494
 
])
2495
 
 
2496
 
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2497
 
[
2498
 
AC_MSG_CHECKING([for libjpeg$2])
2499
 
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2500
 
[
2501
 
ac_save_LIBS="$LIBS"
2502
 
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2503
 
ac_save_CFLAGS="$CFLAGS"
2504
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2505
 
AC_TRY_LINK(
2506
 
[
2507
 
#ifdef __cplusplus
2508
 
extern "C" {
2509
 
#endif
2510
 
void jpeg_CreateDecompress();
2511
 
#ifdef __cplusplus
2512
 
}
2513
 
#endif
2514
 
],
2515
 
[jpeg_CreateDecompress();],
2516
 
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2517
 
            eval "ac_cv_lib_jpeg_$1=no")
2518
 
LIBS="$ac_save_LIBS"
2519
 
CFLAGS="$ac_save_CFLAGS"
2520
 
])
2521
 
 
2522
 
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2523
 
  LIBJPEG="$ac_cv_lib_jpeg_$1"
2524
 
  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2525
 
else
2526
 
  AC_MSG_RESULT(no)
2527
 
  $3
2528
 
fi
2529
 
 
2530
 
])
2531
 
 
2532
 
AC_DEFUN([AC_FIND_JPEG],
2533
 
[
2534
 
dnl first look for libraries
2535
 
KDE_FIND_JPEG_HELPER(6b, 6b,
2536
 
   KDE_FIND_JPEG_HELPER(normal, [],
2537
 
    [
2538
 
       LIBJPEG=
2539
 
    ]
2540
 
   )
2541
 
)
2542
 
 
2543
 
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2544
 
dnl requires system dependent includes loaded before it)
2545
 
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2546
 
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2547
 
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2548
 
 
2549
 
dnl if headers _and_ libraries are missing, this is no error, and we
2550
 
dnl continue with a warning (the user will get no jpeg support in khtml)
2551
 
dnl if only one is missing, it means a configuration error, but we still
2552
 
dnl only warn
2553
 
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2554
 
  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2555
 
else
2556
 
  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2557
 
    AC_MSG_WARN([
2558
 
There is an installation error in jpeg support. You seem to have only one
2559
 
of either the headers _or_ the libraries installed. You may need to either
2560
 
provide correct --with-extra-... options, or the development package of
2561
 
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2562
 
Disabling JPEG support.
2563
 
])
2564
 
  else
2565
 
    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2566
 
  fi
2567
 
  jpeg_incdir=
2568
 
  LIBJPEG=
2569
 
fi
2570
 
 
2571
 
AC_SUBST(LIBJPEG)
2572
 
AH_VERBATIM(_AC_CHECK_JPEG,
2573
 
[/*
2574
 
 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2575
 
 * headers and I'm too lazy to write a configure test as long as only
2576
 
 * unixware is related
2577
 
 */
2578
 
#ifdef _UNIXWARE
2579
 
#define HAVE_BOOLEAN
2580
 
#endif
2581
 
])
2582
 
])
2583
 
 
2584
 
AC_DEFUN([KDE_CHECK_QT_JPEG],
2585
 
[
2586
 
if test -n "$LIBJPEG"; then
2587
 
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2588
 
AC_CACHE_VAL(kde_cv_qt_jpeg,
2589
 
[
2590
 
AC_LANG_SAVE
2591
 
AC_LANG_CPLUSPLUS
2592
 
ac_save_LIBS="$LIBS"
2593
 
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2594
 
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2595
 
ac_save_CXXFLAGS="$CXXFLAGS"
2596
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2597
 
AC_TRY_LINK(
2598
 
[#include <qapplication.h>],
2599
 
            [
2600
 
            int argc;
2601
 
            char** argv;
2602
 
            QApplication app(argc, argv);],
2603
 
            eval "kde_cv_qt_jpeg=no",
2604
 
            eval "kde_cv_qt_jpeg=yes")
2605
 
LIBS="$ac_save_LIBS"
2606
 
CXXFLAGS="$ac_save_CXXFLAGS"
2607
 
AC_LANG_RESTORE
2608
 
fi
2609
 
])
2610
 
 
2611
 
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2612
 
  AC_MSG_RESULT(yes)
2613
 
  LIBJPEG_QT='$(LIBJPEG)'
2614
 
else
2615
 
  AC_MSG_RESULT(no)
2616
 
  LIBJPEG_QT=
2617
 
fi
2618
 
 
2619
 
])
2620
 
 
2621
 
AC_DEFUN([AC_FIND_ZLIB],
2622
 
[
2623
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2624
 
AC_MSG_CHECKING([for libz])
2625
 
AC_CACHE_VAL(ac_cv_lib_z,
2626
 
[
2627
 
kde_save_LIBS="$LIBS"
2628
 
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2629
 
kde_save_CFLAGS="$CFLAGS"
2630
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2631
 
AC_TRY_LINK(dnl
2632
 
[
2633
 
#include<zlib.h>
2634
 
],
2635
 
[
2636
 
  char buf[42];
2637
 
  gzFile f = (gzFile) 0;
2638
 
  /* this would segfault.. but we only link, don't run */
2639
 
  (void) gzgets(f, buf, sizeof(buf));
2640
 
 
2641
 
  return (zlibVersion() == ZLIB_VERSION); 
2642
 
],
2643
 
            eval "ac_cv_lib_z='-lz'",
2644
 
            eval "ac_cv_lib_z=no")
2645
 
LIBS="$kde_save_LIBS"
2646
 
CFLAGS="$kde_save_CFLAGS"
2647
 
])dnl
2648
 
if test ! "$ac_cv_lib_z" = no; then
2649
 
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2650
 
  LIBZ="$ac_cv_lib_z"
2651
 
  AC_MSG_RESULT($ac_cv_lib_z)
2652
 
else
2653
 
  AC_MSG_ERROR(not found. 
2654
 
          Possibly configure picks up an outdated version
2655
 
          installed by XFree86. Remove it from your system.
2656
 
 
2657
 
          Check your installation and look into config.log)
2658
 
  LIBZ=""
2659
 
fi
2660
 
AC_SUBST(LIBZ)
2661
 
])
2662
 
 
2663
 
AC_DEFUN([KDE_TRY_TIFFLIB],
2664
 
[
2665
 
AC_MSG_CHECKING([for libtiff $1])
2666
 
 
2667
 
AC_CACHE_VAL(kde_cv_libtiff_$1,
2668
 
[
2669
 
AC_LANG_SAVE
2670
 
AC_LANG_CPLUSPLUS
2671
 
kde_save_LIBS="$LIBS"
2672
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2673
 
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2674
 
else
2675
 
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2676
 
fi
2677
 
kde_save_CXXFLAGS="$CXXFLAGS"
2678
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2679
 
 
2680
 
AC_TRY_LINK(dnl
2681
 
[
2682
 
#include<tiffio.h>
2683
 
],
2684
 
    [return (TIFFOpen( "", "r") == 0); ],
2685
 
[
2686
 
    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2687
 
], [
2688
 
    kde_cv_libtiff_$1=no
2689
 
])
2690
 
 
2691
 
LIBS="$kde_save_LIBS"
2692
 
CXXFLAGS="$kde_save_CXXFLAGS"
2693
 
AC_LANG_RESTORE
2694
 
])
2695
 
 
2696
 
if test "$kde_cv_libtiff_$1" = "no"; then
2697
 
    AC_MSG_RESULT(no)
2698
 
    LIBTIFF=""
2699
 
    $3
2700
 
else
2701
 
    LIBTIFF="$kde_cv_libtiff_$1"
2702
 
    AC_MSG_RESULT(yes)
2703
 
    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2704
 
    $2
2705
 
fi
2706
 
 
2707
 
])
2708
 
 
2709
 
AC_DEFUN([AC_FIND_TIFF],
2710
 
[
2711
 
AC_REQUIRE([K_PATH_X])
2712
 
AC_REQUIRE([AC_FIND_ZLIB])
2713
 
AC_REQUIRE([AC_FIND_JPEG])
2714
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2715
 
 
2716
 
KDE_TRY_TIFFLIB(tiff, [],
2717
 
   KDE_TRY_TIFFLIB(tiff34))
2718
 
 
2719
 
AC_SUBST(LIBTIFF)
2720
 
])
2721
 
 
2722
 
AC_DEFUN([KDE_FIND_LIBEXR],
2723
 
[
2724
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2725
 
AC_REQUIRE([AC_FIND_ZLIB])
2726
 
AC_CACHE_VAL(ac_cv_libexr,
2727
 
[
2728
 
  if test -z "$PKG_CONFIG"; then
2729
 
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2730
 
  fi
2731
 
 
2732
 
  AC_MSG_CHECKING([for OpenEXR libraries])
2733
 
 
2734
 
  if test "$PKG_CONFIG" = "no" ; then
2735
 
     AC_MSG_RESULT(no)
2736
 
     echo "*** The pkg-config script could not be found. Make sure it is"
2737
 
     echo "*** in your path, or set the PKG_CONFIG environment variable"
2738
 
     echo "*** to the full path to pkg-config."
2739
 
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
2740
 
  else
2741
 
     if !(`$PKG_CONFIG --exists OpenEXR`) ; then
2742
 
        AC_MSG_RESULT(no)
2743
 
        EXRSTATUS=no
2744
 
     else
2745
 
        if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then
2746
 
           AC_MSG_RESULT(no)
2747
 
           EXRSTATUS=old
2748
 
        else
2749
 
           kde_save_LIBS="$LIBS"
2750
 
           LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ"
2751
 
           AC_LANG_SAVE
2752
 
           AC_LANG_CPLUSPLUS
2753
 
           kde_save_CXXFLAGS="$CXXFLAGS"
2754
 
           EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
2755
 
           CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS"
2756
 
 
2757
 
           AC_TRY_LINK(dnl
2758
 
               [
2759
 
               #include <ImfRgbaFile.h>
2760
 
               ],
2761
 
               [
2762
 
               using namespace Imf;
2763
 
               RgbaInputFile file ("dummy");
2764
 
               return 0;
2765
 
               ],
2766
 
               eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'",
2767
 
               eval "ac_cv_libexr=no"
2768
 
           )
2769
 
           LIBS="$kde_save_LIBS"
2770
 
           CXXFLAGS="$kde_save_CXXFLAGS"
2771
 
           AC_LANG_RESTORE
2772
 
           ])dnl
2773
 
           if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then
2774
 
               AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
2775
 
               LIB_EXR="$ac_cv_libexr"
2776
 
               AC_MSG_RESULT($ac_cv_libexr)
2777
 
           else
2778
 
               AC_MSG_RESULT(no)
2779
 
               LIB_EXR=""
2780
 
           fi
2781
 
        fi
2782
 
     fi
2783
 
  fi
2784
 
  AC_SUBST(LIB_EXR)
2785
 
  AC_SUBST(EXR_FLAGS)
2786
 
])
2787
 
 
2788
 
 
2789
 
 
2790
 
AC_DEFUN([AC_FIND_PNG],
2791
 
[
2792
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2793
 
AC_REQUIRE([AC_FIND_ZLIB])
2794
 
AC_MSG_CHECKING([for libpng])
2795
 
AC_CACHE_VAL(ac_cv_lib_png,
2796
 
[
2797
 
kde_save_LIBS="$LIBS"
2798
 
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2799
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2800
 
else
2801
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2802
 
fi
2803
 
kde_save_CFLAGS="$CFLAGS"
2804
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2805
 
 
2806
 
AC_TRY_LINK(dnl
2807
 
    [
2808
 
    #include<png.h>
2809
 
    ],
2810
 
    [
2811
 
    png_structp png_ptr = png_create_read_struct(  /* image ptr */
2812
 
                PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2813
 
    return( png_ptr != 0 );
2814
 
    ],
2815
 
    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2816
 
    eval "ac_cv_lib_png=no"
2817
 
)
2818
 
LIBS="$kde_save_LIBS"
2819
 
CFLAGS="$kde_save_CFLAGS"
2820
 
])dnl
2821
 
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2822
 
  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2823
 
  LIBPNG="$ac_cv_lib_png"
2824
 
  AC_SUBST(LIBPNG)
2825
 
  AC_MSG_RESULT($ac_cv_lib_png)
2826
 
else
2827
 
  AC_MSG_RESULT(no)
2828
 
  LIBPNG=""
2829
 
  AC_SUBST(LIBPNG)
2830
 
fi
2831
 
])
2832
 
 
2833
 
 
2834
 
AC_DEFUN([AC_FIND_JASPER],
2835
 
[
2836
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2837
 
AC_REQUIRE([AC_FIND_JPEG])
2838
 
AC_MSG_CHECKING([for jasper])
2839
 
AC_CACHE_VAL(ac_cv_jasper,
2840
 
[
2841
 
kde_save_LIBS="$LIBS"
2842
 
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2843
 
kde_save_CFLAGS="$CFLAGS"
2844
 
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2845
 
 
2846
 
AC_TRY_LINK(dnl
2847
 
    [
2848
 
    #include<jasper/jasper.h>
2849
 
    ],
2850
 
    [
2851
 
    return( jas_init() );
2852
 
    ],
2853
 
    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2854
 
    eval "ac_cv_jasper=no"
2855
 
)
2856
 
LIBS="$kde_save_LIBS"
2857
 
CFLAGS="$kde_save_CFLAGS"
2858
 
])dnl
2859
 
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2860
 
  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2861
 
  LIB_JASPER="$ac_cv_jasper"
2862
 
  AC_MSG_RESULT($ac_cv_jasper)
2863
 
else
2864
 
  AC_MSG_RESULT(no)
2865
 
  LIB_JASPER=""
2866
 
fi
2867
 
AC_SUBST(LIB_JASPER)
2868
 
])
2869
 
 
2870
 
AC_DEFUN([AC_CHECK_BOOL],
2871
 
[
2872
 
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2873
 
])
2874
 
 
2875
 
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2876
 
[
2877
 
AC_MSG_CHECKING(if you need GNU extensions)
2878
 
AC_CACHE_VAL(ac_cv_gnu_extensions,
2879
 
[
2880
 
cat > conftest.c << EOF
2881
 
#include <features.h>
2882
 
 
2883
 
#ifdef __GNU_LIBRARY__
2884
 
yes
2885
 
#endif
2886
 
EOF
2887
 
 
2888
 
if (eval "$ac_cpp conftest.c") 2>&5 |
2889
 
  egrep "yes" >/dev/null 2>&1; then
2890
 
  rm -rf conftest*
2891
 
  ac_cv_gnu_extensions=yes
2892
 
else
2893
 
  ac_cv_gnu_extensions=no
2894
 
fi
2895
 
])
2896
 
 
2897
 
AC_MSG_RESULT($ac_cv_gnu_extensions)
2898
 
if test "$ac_cv_gnu_extensions" = "yes"; then
2899
 
  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2900
 
fi
2901
 
])
2902
 
 
2903
 
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2904
 
[
2905
 
AC_MSG_CHECKING([whether $CXX supports -$1])
2906
 
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2907
 
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2908
 
[
2909
 
  AC_LANG_SAVE
2910
 
  AC_LANG_CPLUSPLUS
2911
 
  save_CXXFLAGS="$CXXFLAGS"
2912
 
  CXXFLAGS="$CXXFLAGS -$1"
2913
 
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2914
 
  CXXFLAGS="$save_CXXFLAGS"
2915
 
  AC_LANG_RESTORE
2916
 
])
2917
 
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2918
 
 AC_MSG_RESULT(yes)
2919
 
 :
2920
 
 $2
2921
 
else
2922
 
 AC_MSG_RESULT(no)
2923
 
 :
2924
 
 $3
2925
 
fi
2926
 
])
2927
 
 
2928
 
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
2929
 
[
2930
 
AC_MSG_CHECKING([whether $CC supports -$1])
2931
 
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2932
 
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
2933
 
[
2934
 
  AC_LANG_SAVE
2935
 
  AC_LANG_C
2936
 
  save_CFLAGS="$CFLAGS"
2937
 
  CFLAGS="$CFLAGS -$1"
2938
 
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
2939
 
  CFLAGS="$save_CFLAGS"
2940
 
  AC_LANG_RESTORE
2941
 
])
2942
 
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
2943
 
 AC_MSG_RESULT(yes)
2944
 
 :
2945
 
 $2
2946
 
else
2947
 
 AC_MSG_RESULT(no)
2948
 
 :
2949
 
 $3
2950
 
fi
2951
 
])
2952
 
 
2953
 
 
2954
 
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2955
 
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2956
 
dnl it's all white-space separated
2957
 
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2958
 
[ __val=$$1
2959
 
  __forbid=" $2 "
2960
 
  if test -n "$__val"; then
2961
 
    __new=""
2962
 
    ac_save_IFS=$IFS
2963
 
    IFS="       "
2964
 
    for i in $__val; do
2965
 
      case "$__forbid" in
2966
 
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2967
 
        *) # Careful to not add spaces, where there were none, because otherwise
2968
 
           # libtool gets confused, if we change e.g. CXX
2969
 
           if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2970
 
      esac
2971
 
    done
2972
 
    IFS=$ac_save_IFS
2973
 
    $1=$__new
2974
 
  fi
2975
 
])
2976
 
 
2977
 
 
2978
 
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
2979
 
[
2980
 
  AC_MSG_CHECKING([whether $CC is blacklisted])
2981
 
 
2982
 
  dnl In theory we have tu run this test against $CC and $CXX
2983
 
  dnl in C and in C++ mode, because its perfectly legal for
2984
 
  dnl the user to mix compiler versions, since C has a defined
2985
 
  dnl ABI. 
2986
 
  dnl 
2987
 
  dnl For now, we assume the user is not on crack.
2988
 
 
2989
 
  AC_TRY_COMPILE([
2990
 
#ifdef __GNUC__
2991
 
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
2992
 
choke me
2993
 
#endif
2994
 
#endif
2995
 
], ,
2996
 
  kde_bad_compiler=no, 
2997
 
  kde_bad_compiler=yes
2998
 
)
2999
 
 
3000
 
  AC_MSG_RESULT($kde_bad_compiler)
3001
 
 
3002
 
if test "$kde_bad_compiler" = "yes"; then
3003
 
  AC_MSG_ERROR([
3004
 
 
3005
 
This particular compiler version is blacklisted because it
3006
 
is known to miscompile KDE. Please use a newer version, or
3007
 
if that is not yet available, choose an older version. 
3008
 
 
3009
 
Please do not report a bug or bother us reporting this
3010
 
configure error. We know about it, and we introduced
3011
 
it by intention to avoid untraceable bugs or crashes in KDE.
3012
 
 
3013
 
])
3014
 
fi
3015
 
 
3016
 
])
3017
 
 
3018
 
 
3019
 
AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH],
3020
 
[
3021
 
  AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline],
3022
 
    kde_cv_opt_noinline_match,
3023
 
  [
3024
 
  kde_cv_opt_noinline_match=irrelevant
3025
 
  dnl if we don't use both -O2 and -fno-inline, this check is moot
3026
 
  if echo "$CFLAGS" | grep -e -O2 >/dev/null 2>/dev/null \
3027
 
     && echo "$CFLAGS" | grep -e -fno-inline >/dev/null 2>/dev/null ; then
3028
 
 
3029
 
    ac_cflags_save="$CFLAGS"
3030
 
    CFLAGS="$CFLAGS -D_USE_GNU"
3031
 
 
3032
 
    AC_TRY_LINK([
3033
 
  #include <string.h>
3034
 
], [  const char *pt, *et;
3035
 
  et = __extension__      ({ char __a0, __a1, __a2;       (__builtin_constant_p (  ";,"  ) && ((size_t)(const void *)((   ";,"   )+ 1) - (size_t)(const void *)(   ";,"   ) == 1)        ? ((__a0 =((__const char  *) (  ";,"  ))[0], __a0 == '\0')     ? ((void) (  pt ),((void *)0) )        : ((__a1 = ((__const char *) (  ";,"  ))[1], __a1== '\0')      ? (__extension__ (__builtin_constant_p (  __a0 ) && ( __a0 ) == '\0'   ? (char *) __rawmemchr (   pt  ,   __a0)       : strchr(   pt  ,   __a0 )))   : ((__a2 = ((__const char *) (  ";,"  ))[2], __a2 == '\0')      ? __strpbrk_c2 (  pt , __a0, __a1)      :(((__const char *) (  ";,"  ))[3] == '\0'     ? __strpbrk_c3 (  pt ,__a0, __a1, __a2): strpbrk (  pt ,   ";,"  ))))) : strpbrk (  pt ,  ";,"  )); }) ;
3036
 
],
3037
 
    kde_cv_opt_noinline_match=yes,
3038
 
    kde_cv_opt_noinline_match=no
3039
 
    )
3040
 
 
3041
 
    CFLAGS="$ac_cflags_save"
3042
 
  fi
3043
 
  ])
3044
 
])
3045
 
 
3046
 
 
3047
 
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
3048
 
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
3049
 
[dnl
3050
 
if test "x$kde_use_qt_emb" != "xyes"; then
3051
 
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
3052
 
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
3053
 
else
3054
 
 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
3055
 
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
3056
 
fi
3057
 
])
3058
 
 
3059
 
AC_DEFUN([AC_CHECK_COMPILERS],
3060
 
[
3061
 
  AC_ARG_ENABLE(debug,
3062
 
                AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
3063
 
  [
3064
 
    case $enableval in
3065
 
      yes)
3066
 
        kde_use_debug_code="yes"
3067
 
        kde_use_debug_define=no
3068
 
        ;;
3069
 
      full)
3070
 
        kde_use_debug_code="full"
3071
 
        kde_use_debug_define=no
3072
 
        ;;
3073
 
      *)
3074
 
        kde_use_debug_code="no"
3075
 
        kde_use_debug_define=yes
3076
 
        ;;
3077
 
    esac
3078
 
  ], 
3079
 
    [kde_use_debug_code="no"
3080
 
      kde_use_debug_define=no
3081
 
  ])
3082
 
 
3083
 
  dnl Just for configure --help
3084
 
  AC_ARG_ENABLE(dummyoption,
3085
 
                AC_HELP_STRING([--disable-debug],
3086
 
                               [disables debug output and debug symbols [default=no]]),
3087
 
                [],[])
3088
 
 
3089
 
  AC_ARG_ENABLE(strict,
3090
 
                AC_HELP_STRING([--enable-strict],
3091
 
                              [compiles with strict compiler options (may not work!)]),
3092
 
   [
3093
 
    if test $enableval = "no"; then
3094
 
         kde_use_strict_options="no"
3095
 
       else
3096
 
         kde_use_strict_options="yes"
3097
 
    fi
3098
 
   ], [kde_use_strict_options="no"])
3099
 
 
3100
 
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
3101
 
   [
3102
 
    if test $enableval = "no"; then
3103
 
         kde_use_warnings="no"
3104
 
       else
3105
 
         kde_use_warnings="yes"
3106
 
    fi
3107
 
   ], [kde_use_warnings="yes"])
3108
 
 
3109
 
  dnl enable warnings for debug build
3110
 
  if test "$kde_use_debug_code" != "no"; then
3111
 
    kde_use_warnings=yes
3112
 
  fi
3113
 
 
3114
 
  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
3115
 
    [kde_use_profiling=$enableval],
3116
 
    [kde_use_profiling="no"]
3117
 
  )
3118
 
 
3119
 
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
3120
 
  CFLAGS=" $CFLAGS"
3121
 
 
3122
 
  AC_PROG_CC 
3123
 
 
3124
 
  AC_PROG_CPP
3125
 
 
3126
 
  if test "$GCC" = "yes"; then
3127
 
    if test "$kde_use_debug_code" != "no"; then
3128
 
      if test $kde_use_debug_code = "full"; then
3129
 
        CFLAGS="-g3 -fno-inline $CFLAGS"
3130
 
      else
3131
 
        CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS"
3132
 
      fi
3133
 
    else
3134
 
      CFLAGS="-O2 $CFLAGS"
3135
 
    fi
3136
 
  fi
3137
 
 
3138
 
  if test "$kde_use_debug_define" = "yes"; then
3139
 
    CFLAGS="-DNDEBUG $CFLAGS"
3140
 
  fi
3141
 
 
3142
 
 
3143
 
  case "$host" in
3144
 
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
3145
 
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
3146
 
  esac
3147
 
 
3148
 
  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
3149
 
     LDFLAGS=""
3150
 
  fi
3151
 
 
3152
 
  CXXFLAGS=" $CXXFLAGS"
3153
 
 
3154
 
  AC_PROG_CXX
3155
 
 
3156
 
  KDE_CHECK_FOR_BAD_COMPILER
3157
 
 
3158
 
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3159
 
    if test "$kde_use_debug_code" != "no"; then
3160
 
      if test "$CXX" = "KCC"; then
3161
 
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3162
 
      else
3163
 
        if test "$kde_use_debug_code" = "full"; then
3164
 
          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
3165
 
        else
3166
 
          CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS"
3167
 
        fi
3168
 
      fi
3169
 
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
3170
 
 
3171
 
      dnl convenience compiler flags
3172
 
      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
3173
 
      AC_SUBST(WOVERLOADED_VIRTUAL)
3174
 
    else
3175
 
      if test "$CXX" = "KCC"; then
3176
 
        CXXFLAGS="+K3 $CXXFLAGS"
3177
 
      else
3178
 
        CXXFLAGS="-O2 $CXXFLAGS"
3179
 
      fi
3180
 
    fi
3181
 
  fi
3182
 
 
3183
 
  if test "$kde_use_debug_define" = "yes"; then
3184
 
    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
3185
 
  fi  
3186
 
 
3187
 
  if test "$kde_use_profiling" = "yes"; then
3188
 
    KDE_CHECK_COMPILER_FLAG(pg,
3189
 
    [
3190
 
      CFLAGS="-pg $CFLAGS"
3191
 
      CXXFLAGS="-pg $CXXFLAGS"
3192
 
    ])
3193
 
  fi
3194
 
 
3195
 
  if test "$kde_use_warnings" = "yes"; then
3196
 
      if test "$GCC" = "yes"; then
3197
 
        CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
3198
 
        case $host in
3199
 
          *-*-linux-gnu)        
3200
 
            CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3201
 
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
3202
 
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3203
 
            KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
3204
 
          ;;
3205
 
        esac
3206
 
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3207
 
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3208
 
        dnl ### FIXME: revert for KDE 4
3209
 
        KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
3210
 
     fi
3211
 
  fi
3212
 
 
3213
 
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
3214
 
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3215
 
  fi
3216
 
 
3217
 
  AC_ARG_ENABLE(pch,
3218
 
     AC_HELP_STRING([--enable-pch],
3219
 
                    [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3220
 
    [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3221
 
 
3222
 
  HAVE_GCC_VISIBILITY=0
3223
 
  AC_SUBST([HAVE_GCC_VISIBILITY])
3224
 
 
3225
 
  if test "$GXX" = "yes"; then
3226
 
    gcc_no_reorder_blocks=NO
3227
 
    KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES])
3228
 
    if test $kde_use_debug_code != "no" && \
3229
 
       test $kde_use_debug_code != "full" && \
3230
 
       test "YES" = "$gcc_no_reorder_blocks" ; then
3231
 
          CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
3232
 
          CFLAGS="$CFLAGS -fno-reorder-blocks"
3233
 
    fi
3234
 
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3235
 
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3236
 
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3237
 
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
3238
 
    ENABLE_PERMISSIVE_FLAG="-fpermissive"
3239
 
 
3240
 
    if test "$kde_use_pch" = "yes"; then
3241
 
        AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3242
 
        echo >conftest.h
3243
 
        if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3244
 
            kde_gcc_supports_pch=yes
3245
 
            AC_MSG_RESULT(yes)
3246
 
        else
3247
 
            kde_gcc_supports_pch=no
3248
 
            AC_MSG_RESULT(no)
3249
 
        fi
3250
 
        if test "$kde_gcc_supports_pch" = "yes"; then
3251
 
            AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3252
 
            if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3253
 
                kde_gcc_supports_pch=yes
3254
 
                AC_MSG_RESULT(yes)
3255
 
            else
3256
 
                kde_gcc_supports_pch=no
3257
 
                AC_MSG_RESULT(no)
3258
 
            fi
3259
 
        fi
3260
 
        rm -f conftest.h conftest.h.gch
3261
 
    fi
3262
 
 
3263
 
    KDE_CHECK_FOR_OPT_NOINLINE_MATCH
3264
 
    if test "x$kde_cv_opt_noinline_match" = "xno" ; then
3265
 
       CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`"
3266
 
    fi
3267
 
  fi
3268
 
  AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3269
 
  if test "$CXX" = "KCC"; then
3270
 
    dnl unfortunately we currently cannot disable exception support in KCC
3271
 
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3272
 
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3273
 
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
3274
 
 
3275
 
    if test "$kde_use_pch" = "yes"; then
3276
 
      dnl TODO: support --pch-dir!
3277
 
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3278
 
      dnl the below works (but the dir must exist), but it's
3279
 
      dnl useless for a whole package.
3280
 
      dnl The are precompiled headers for each source file, so when compiling
3281
 
      dnl from scratch, it doesn't make a difference, and they take up
3282
 
      dnl around ~5Mb _per_ sourcefile.
3283
 
      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3284
 
      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3285
 
    fi
3286
 
    dnl this flag controls inlining. by default KCC inlines in optimisation mode
3287
 
    dnl all implementations that are defined inside the class {} declaration. 
3288
 
    dnl because of templates-compatibility with broken gcc compilers, this
3289
 
    dnl can cause excessive inlining. This flag limits it to a sane level
3290
 
    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3291
 
    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3292
 
    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3293
 
    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3294
 
    dnl Some source files are shared between multiple executables
3295
 
    dnl (or libraries) and some of those need template instantiations.
3296
 
    dnl In that case KCC needs to compile those sources with
3297
 
    dnl --one_instantiation_per_object.  To make it easy for us we compile
3298
 
    dnl _all_ objects with that flag (--one_per is a shorthand).
3299
 
    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3300
 
  fi
3301
 
  AC_SUBST(USE_EXCEPTIONS)
3302
 
  dnl obsolete macro - provided to keep things going
3303
 
  USE_RTTI=
3304
 
  AC_SUBST(USE_RTTI)
3305
 
 
3306
 
  case "$host" in
3307
 
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3308
 
      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3309
 
      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3310
 
      *-*-solaris*) 
3311
 
        if test "$GXX" = yes; then
3312
 
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
3313
 
          if test ! -f $libstdcpp; then
3314
 
             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])
3315
 
          fi
3316
 
        fi
3317
 
        ;;
3318
 
  esac
3319
 
 
3320
 
  AC_VALIDIFY_CXXFLAGS
3321
 
 
3322
 
  AC_PROG_CXXCPP
3323
 
 
3324
 
  if test "$GCC" = yes; then
3325
 
     NOOPT_CFLAGS=-O0
3326
 
  fi
3327
 
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3328
 
 
3329
 
  AC_ARG_ENABLE(coverage,
3330
 
    AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3331
 
      if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3332
 
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3333
 
        ac_coverage_linker="-lgcc"
3334
 
      elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3335
 
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3336
 
        ac_coverage_linker=""
3337
 
      else
3338
 
        AC_MSG_ERROR([coverage with your compiler is not supported])
3339
 
      fi
3340
 
      CFLAGS="$CFLAGS $ac_coverage_compiler"
3341
 
      CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3342
 
      LDFLAGS="$LDFLAGS $ac_coverage_linker"
3343
 
    ])
3344
 
 
3345
 
  AC_SUBST(NOOPT_CXXFLAGS)
3346
 
  AC_SUBST(NOOPT_CFLAGS)
3347
 
  AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3348
 
 
3349
 
  KDE_CHECK_NEW_LDFLAGS
3350
 
  KDE_CHECK_FINAL
3351
 
  KDE_CHECK_CLOSURE
3352
 
  KDE_CHECK_NMCHECK
3353
 
 
3354
 
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3355
 
])
3356
 
 
3357
 
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
3358
 
  [
3359
 
    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
3360
 
      [
3361
 
        AC_LANG_SAVE
3362
 
        AC_LANG_CPLUSPLUS
3363
 
 
3364
 
        safe_CXXFLAGS=$CXXFLAGS
3365
 
        safe_LDFLAGS=$LDFLAGS
3366
 
        CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
3367
 
        LDFLAGS="$LDFLAGS -shared -fPIC"
3368
 
 
3369
 
        AC_TRY_LINK(
3370
 
        [
3371
 
          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
3372
 
          #include <string>
3373
 
          int some_function( void ) __attribute__ ((visibility("default")));
3374
 
          int some_function( void )
3375
 
          {
3376
 
            std::string s("blafasel");
3377
 
            return 0;
3378
 
          }
3379
 
        ], [/* elvis is alive */],
3380
 
        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
3381
 
 
3382
 
        CXXFLAGS=$safe_CXXFLAGS
3383
 
        LDFLAGS=$safe_LDFLAGS
3384
 
        AC_LANG_RESTORE
3385
 
      ]
3386
 
    )
3387
 
 
3388
 
    if test x$kde_cv_val_gcc_visibility_bug = xno; then
3389
 
      CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
3390
 
    fi
3391
 
  ]
3392
 
)
3393
 
 
3394
 
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
3395
 
[
3396
 
  AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
3397
 
 
3398
 
  AC_MSG_CHECKING([grepping for visibility push/pop in headers])
3399
 
 
3400
 
  if test "x$GXX" = "xyes"; then
3401
 
    AC_LANG_SAVE
3402
 
    AC_LANG_CPLUSPLUS
3403
 
    AC_EGREP_CPP(
3404
 
       [GCC visibility push],
3405
 
       [ #include <exception> 
3406
 
       ], 
3407
 
    [
3408
 
      AC_MSG_RESULT(yes)
3409
 
      kde_stdc_visibility_patched=yes ],
3410
 
    [ 
3411
 
      AC_MSG_RESULT(no)
3412
 
      AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for 
3413
 
                   visibility support. Disabling -fvisibility=hidden])
3414
 
 
3415
 
      kde_stdc_visibility_patched=no ])
3416
 
 
3417
 
    AC_LANG_RESTORE
3418
 
 
3419
 
    kde_have_gcc_visibility=no
3420
 
    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
3421
 
    [
3422
 
      kde_have_gcc_visibility=yes
3423
 
      dnl the whole toolchain is just a mess, gcc is just too buggy
3424
 
      dnl to handle STL with visibility enabled. Lets reconsider 
3425
 
      dnl when gcc 4.2 is out or when things get fixed in the compiler.
3426
 
      dnl Contact mueller@kde.org for details.
3427
 
      AC_ARG_ENABLE(gcc-hidden-visibility,
3428
 
        AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
3429
 
          [kde_have_gcc_visibility=$enableval],
3430
 
          [kde_have_gcc_visibility=no])
3431
 
 
3432
 
      AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
3433
 
        [
3434
 
          AC_LANG_SAVE
3435
 
          AC_LANG_CPLUSPLUS
3436
 
 
3437
 
          safe_CXXFLAGS=$CXXFLAGS
3438
 
          CXXFLAGS="$CXXFLAGS $all_includes"
3439
 
 
3440
 
          AC_TRY_COMPILE(
3441
 
          [
3442
 
#include <qglobal.h>
3443
 
#if Q_EXPORT - 0 != 0
3444
 
/* if this compiles, then Q_EXPORT is undefined */
3445
 
/* if Q_EXPORT is nonempty, this will break compilation */
3446
 
#endif
3447
 
          ], [/* elvis is alive */],
3448
 
          kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
3449
 
 
3450
 
          CXXFLAGS=$safe_CXXFLAGS
3451
 
          AC_LANG_RESTORE
3452
 
        ]
3453
 
      )
3454
 
 
3455
 
      if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then
3456
 
        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
3457
 
        KDE_CHECK_VISIBILITY_GCC_BUG
3458
 
        HAVE_GCC_VISIBILITY=1
3459
 
        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3460
 
      fi
3461
 
    ])
3462
 
  fi
3463
 
])
3464
 
 
3465
 
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3466
 
[
3467
 
   [A]M_DEPENDENCIES(CC)
3468
 
   [A]M_DEPENDENCIES(CXX)
3469
 
])
3470
 
 
3471
 
dnl just a wrapper to clean up configure.in
3472
 
AC_DEFUN([KDE_PROG_LIBTOOL],
3473
 
[
3474
 
AC_REQUIRE([AC_CHECK_COMPILERS])
3475
 
AC_REQUIRE([AC_ENABLE_SHARED])
3476
 
AC_REQUIRE([AC_ENABLE_STATIC])
3477
 
 
3478
 
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3479
 
AC_REQUIRE([KDE_CHECK_LIB64])
3480
 
 
3481
 
AC_OBJEXT
3482
 
AC_EXEEXT
3483
 
 
3484
 
AM_PROG_LIBTOOL
3485
 
AC_LIBTOOL_CXX
3486
 
 
3487
 
LIBTOOL_SHELL="/bin/sh ./libtool"
3488
 
#  LIBTOOL="$LIBTOOL --silent"
3489
 
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3490
 
AC_SUBST(KDE_PLUGIN)
3491
 
 
3492
 
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
3493
 
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
3494
 
AC_SUBST(KDE_CHECK_PLUGIN)
3495
 
 
3496
 
# we patch configure quite some so we better keep that consistent for incremental runs 
3497
 
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3498
 
])
3499
 
 
3500
 
AC_DEFUN([KDE_CHECK_LIB64],
3501
 
[
3502
 
    AC_ARG_ENABLE(libsuffix,
3503
 
        AC_HELP_STRING([--enable-libsuffix],
3504
 
            [/lib directory suffix (64,32,none,auto[=default])]),
3505
 
            kdelibsuff=$enableval, kdelibsuff="auto")
3506
 
    
3507
 
    if test "$kdelibsuff" = "auto"; then
3508
 
    
3509
 
cat > conftest.c << EOF
3510
 
#include <stdio.h>
3511
 
int main() {
3512
 
 return 0;
3513
 
}
3514
 
EOF
3515
 
        kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
3516
 
    s,.*/lib\([[^\/]]*\)/.*,\1, 
3517
 
    p 
3518
 
}'`
3519
 
        rm -rf conftest.*
3520
 
    fi  
3521
 
        
3522
 
    if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
3523
 
       kdelibsuff=
3524
 
    fi
3525
 
    if test -z "$kdelibsuff"; then
3526
 
        AC_MSG_RESULT([not using lib directory suffix])
3527
 
        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3528
 
    else
3529
 
        if test "$libdir" = '${exec_prefix}/lib'; then
3530
 
            libdir="$libdir${kdelibsuff}"
3531
 
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
3532
 
        fi
3533
 
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3534
 
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3535
 
    fi
3536
 
])
3537
 
 
3538
 
AC_DEFUN([KDE_CHECK_TYPES],
3539
 
[  AC_CHECK_SIZEOF(int, 4)dnl
3540
 
   AC_CHECK_SIZEOF(short)dnl
3541
 
  AC_CHECK_SIZEOF(long, 4)dnl
3542
 
  AC_CHECK_SIZEOF(char *, 4)dnl
3543
 
])dnl
3544
 
 
3545
 
dnl Not used - kept for compat only?
3546
 
AC_DEFUN([KDE_DO_IT_ALL],
3547
 
[
3548
 
AC_CANONICAL_SYSTEM
3549
 
AC_ARG_PROGRAM
3550
 
AM_INIT_AUTOMAKE($1, $2)
3551
 
AM_DISABLE_LIBRARIES
3552
 
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3553
 
AC_CHECK_COMPILERS
3554
 
KDE_PROG_LIBTOOL
3555
 
AM_KDE_WITH_NLS
3556
 
AC_PATH_KDE
3557
 
])
3558
 
 
3559
 
AC_DEFUN([AC_CHECK_RPATH],
3560
 
[
3561
 
AC_MSG_CHECKING(for rpath)
3562
 
AC_ARG_ENABLE(rpath,
3563
 
      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3564
 
      USE_RPATH=$enableval, USE_RPATH=yes)
3565
 
 
3566
 
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3567
 
 
3568
 
  KDE_RPATH="-R \$(libdir)"
3569
 
 
3570
 
  if test "$kde_libraries" != "$libdir"; then
3571
 
      KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3572
 
  fi
3573
 
 
3574
 
  if test -n "$qt_libraries"; then
3575
 
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3576
 
  fi
3577
 
  dnl $x_libraries is set to /usr/lib in case
3578
 
  if test -n "$X_LDFLAGS"; then
3579
 
    X_RPATH="-R \$(x_libraries)"
3580
 
    KDE_RPATH="$KDE_RPATH $X_RPATH"
3581
 
  fi
3582
 
  if test -n "$KDE_EXTRA_RPATH"; then
3583
 
    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3584
 
  fi
3585
 
fi
3586
 
AC_SUBST(KDE_EXTRA_RPATH)
3587
 
AC_SUBST(KDE_RPATH)
3588
 
AC_SUBST(X_RPATH)
3589
 
AC_MSG_RESULT($USE_RPATH)
3590
 
])
3591
 
 
3592
 
dnl Check for the type of the third argument of getsockname
3593
 
AC_DEFUN([AC_CHECK_SOCKLEN_T],
3594
 
[
3595
 
   AC_MSG_CHECKING(for socklen_t)
3596
 
   AC_CACHE_VAL(kde_cv_socklen_t,
3597
 
   [
3598
 
      AC_LANG_PUSH(C++)
3599
 
      kde_cv_socklen_t=no
3600
 
      AC_TRY_COMPILE([
3601
 
         #include <sys/types.h>
3602
 
         #include <sys/socket.h>
3603
 
      ],
3604
 
      [
3605
 
         socklen_t len;
3606
 
         getpeername(0,0,&len);
3607
 
      ],
3608
 
      [
3609
 
         kde_cv_socklen_t=yes
3610
 
         kde_cv_socklen_t_equiv=socklen_t
3611
 
      ])
3612
 
      AC_LANG_POP(C++)
3613
 
   ])
3614
 
   AC_MSG_RESULT($kde_cv_socklen_t)
3615
 
   if test $kde_cv_socklen_t = no; then
3616
 
      AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3617
 
      AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3618
 
      [
3619
 
         kde_cv_socklen_t_equiv=int
3620
 
         AC_LANG_PUSH(C++)
3621
 
         for t in int size_t unsigned long "unsigned long"; do
3622
 
            AC_TRY_COMPILE([
3623
 
               #include <sys/types.h>
3624
 
               #include <sys/socket.h>
3625
 
            ],
3626
 
            [
3627
 
               $t len;
3628
 
               getpeername(0,0,&len);
3629
 
            ],
3630
 
            [
3631
 
               kde_cv_socklen_t_equiv="$t"
3632
 
               break
3633
 
            ])
3634
 
         done
3635
 
         AC_LANG_POP(C++)
3636
 
      ])
3637
 
      AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3638
 
   fi
3639
 
   AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3640
 
                     [type to use in place of socklen_t if not defined])
3641
 
   AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3642
 
                     [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3643
 
])
3644
 
 
3645
 
dnl This is a merge of some macros out of the gettext aclocal.m4
3646
 
dnl since we don't need anything, I took the things we need
3647
 
dnl the copyright for them is:
3648
 
dnl >
3649
 
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3650
 
dnl This Makefile.in is free software; the Free Software Foundation
3651
 
dnl gives unlimited permission to copy and/or distribute it,
3652
 
dnl with or without modifications, as long as this notice is preserved.
3653
 
 
3654
 
dnl This program is distributed in the hope that it will be useful,
3655
 
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3656
 
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3657
 
dnl PARTICULAR PURPOSE.
3658
 
dnl >
3659
 
dnl for this file it is relicensed under LGPL
3660
 
 
3661
 
AC_DEFUN([AM_KDE_WITH_NLS],
3662
 
  [
3663
 
    dnl If we use NLS figure out what method
3664
 
 
3665
 
    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3666
 
        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3667
 
    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3668
 
 
3669
 
     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3670
 
        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3671
 
        GMSGFMT=":"
3672
 
      fi
3673
 
      MSGFMT=$GMSGFMT
3674
 
      AC_SUBST(GMSGFMT)
3675
 
      AC_SUBST(MSGFMT)
3676
 
 
3677
 
      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3678
 
        [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3679
 
 
3680
 
      dnl Test whether we really found GNU xgettext.
3681
 
      if test "$XGETTEXT" != ":"; then
3682
 
        dnl If it is no GNU xgettext we define it as : so that the
3683
 
        dnl Makefiles still can work.
3684
 
        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3685
 
          : ;
3686
 
        else
3687
 
          AC_MSG_RESULT(
3688
 
            [found xgettext programs is not GNU xgettext; ignore it])
3689
 
          XGETTEXT=":"
3690
 
        fi
3691
 
      fi
3692
 
     AC_SUBST(XGETTEXT)
3693
 
 
3694
 
  ])
3695
 
 
3696
 
# Search path for a program which passes the given test.
3697
 
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3698
 
 
3699
 
# serial 1
3700
 
# Stephan Kulow: I appended a _KDE against name conflicts
3701
 
 
3702
 
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3703
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3704
 
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3705
 
[# Extract the first word of "$2", so it can be a program name with args.
3706
 
set dummy $2; ac_word=[$]2
3707
 
AC_MSG_CHECKING([for $ac_word])
3708
 
AC_CACHE_VAL(ac_cv_path_$1,
3709
 
[case "[$]$1" in
3710
 
  /*)
3711
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3712
 
  ;;
3713
 
  *)
3714
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3715
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
3716
 
    test -z "$ac_dir" && ac_dir=.
3717
 
    if test -f $ac_dir/$ac_word; then
3718
 
      if [$3]; then
3719
 
        ac_cv_path_$1="$ac_dir/$ac_word"
3720
 
        break
3721
 
      fi
3722
 
    fi
3723
 
  done
3724
 
  IFS="$ac_save_ifs"
3725
 
dnl If no 4th arg is given, leave the cache variable unset,
3726
 
dnl so AC_PATH_PROGS will keep looking.
3727
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3728
 
])dnl
3729
 
  ;;
3730
 
esac])dnl
3731
 
$1="$ac_cv_path_$1"
3732
 
if test -n "[$]$1"; then
3733
 
  AC_MSG_RESULT([$]$1)
3734
 
else
3735
 
  AC_MSG_RESULT(no)
3736
 
fi
3737
 
AC_SUBST($1)dnl
3738
 
])
3739
 
 
3740
 
 
3741
 
# Check whether LC_MESSAGES is available in <locale.h>.
3742
 
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3743
 
 
3744
 
# serial 1
3745
 
 
3746
 
AC_DEFUN([AM_LC_MESSAGES],
3747
 
  [if test $ac_cv_header_locale_h = yes; then
3748
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3749
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3750
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3751
 
    if test $am_cv_val_LC_MESSAGES = yes; then
3752
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3753
 
    fi
3754
 
  fi])
3755
 
 
3756
 
dnl From Jim Meyering.
3757
 
dnl FIXME: migrate into libit.
3758
 
 
3759
 
AC_DEFUN([AM_FUNC_OBSTACK],
3760
 
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3761
 
 [AC_TRY_LINK([#include "obstack.h"],
3762
 
              [struct obstack *mem;obstack_free(mem,(char *) 0)],
3763
 
              am_cv_func_obstack=yes,
3764
 
              am_cv_func_obstack=no)])
3765
 
 if test $am_cv_func_obstack = yes; then
3766
 
   AC_DEFINE(HAVE_OBSTACK)
3767
 
 else
3768
 
   LIBOBJS="$LIBOBJS obstack.o"
3769
 
 fi
3770
 
])
3771
 
 
3772
 
dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
3773
 
dnl FIXME: Migrate into libit
3774
 
 
3775
 
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3776
 
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3777
 
 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3778
 
              am_cv_lib_error_at_line=yes,
3779
 
              am_cv_lib_error_at_line=no)])
3780
 
 if test $am_cv_lib_error_at_line = no; then
3781
 
   LIBOBJS="$LIBOBJS error.o"
3782
 
 fi
3783
 
 AC_SUBST(LIBOBJS)dnl
3784
 
])
3785
 
 
3786
 
# Macro to add for using GNU gettext.
3787
 
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3788
 
 
3789
 
# serial 1
3790
 
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3791
 
 
3792
 
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3793
 
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3794
 
   AC_REQUIRE([AC_PROG_RANLIB])dnl
3795
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
3796
 
   AC_REQUIRE([AC_TYPE_OFF_T])dnl
3797
 
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3798
 
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3799
 
   AC_REQUIRE([AC_FUNC_MMAP])dnl
3800
 
   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3801
 
   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3802
 
   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3803
 
__argz_count __argz_stringify __argz_next])
3804
 
 
3805
 
   AC_MSG_CHECKING(for stpcpy)
3806
 
   AC_CACHE_VAL(kde_cv_func_stpcpy,
3807
 
   [
3808
 
   kde_safe_cxxflags=$CXXFLAGS
3809
 
   CXXFLAGS="-Werror"
3810
 
   AC_LANG_SAVE
3811
 
   AC_LANG_CPLUSPLUS
3812
 
   AC_TRY_COMPILE([
3813
 
   #include <string.h>
3814
 
   ],
3815
 
   [
3816
 
   char buffer[200];
3817
 
   stpcpy(buffer, buffer);
3818
 
   ],
3819
 
   kde_cv_func_stpcpy=yes,
3820
 
   kde_cv_func_stpcpy=no)
3821
 
   AC_LANG_RESTORE
3822
 
   CXXFLAGS=$kde_safe_cxxflags
3823
 
   ])
3824
 
   AC_MSG_RESULT($kde_cv_func_stpcpy)
3825
 
   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3826
 
     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3827
 
   fi
3828
 
 
3829
 
   AM_LC_MESSAGES
3830
 
 
3831
 
   if test "x$CATOBJEXT" != "x"; then
3832
 
     if test "x$ALL_LINGUAS" = "x"; then
3833
 
       LINGUAS=
3834
 
     else
3835
 
       AC_MSG_CHECKING(for catalogs to be installed)
3836
 
       NEW_LINGUAS=
3837
 
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
3838
 
         case "$ALL_LINGUAS" in
3839
 
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3840
 
         esac
3841
 
       done
3842
 
       LINGUAS=$NEW_LINGUAS
3843
 
       AC_MSG_RESULT($LINGUAS)
3844
 
     fi
3845
 
 
3846
 
     dnl Construct list of names of catalog files to be constructed.
3847
 
     if test -n "$LINGUAS"; then
3848
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3849
 
     fi
3850
 
   fi
3851
 
 
3852
 
  ])
3853
 
 
3854
 
AC_DEFUN([AC_HAVE_XPM],
3855
 
 [AC_REQUIRE_CPP()dnl
3856
 
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3857
 
 
3858
 
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3859
 
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3860
 
 
3861
 
 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3862
 
        xpm_test=$withval, xpm_test="yes")
3863
 
 if test "x$xpm_test" = xno; then
3864
 
   ac_cv_have_xpm=no
3865
 
 else
3866
 
   AC_MSG_CHECKING(for XPM)
3867
 
   AC_CACHE_VAL(ac_cv_have_xpm,
3868
 
   [
3869
 
    ac_save_ldflags="$LDFLAGS"
3870
 
    ac_save_cflags="$CFLAGS"
3871
 
    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3872
 
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3873
 
    else
3874
 
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3875
 
    fi
3876
 
    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3877
 
    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3878
 
    AC_TRY_LINK([#include <X11/xpm.h>],[],
3879
 
        ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3880
 
    LDFLAGS="$ac_save_ldflags"
3881
 
    CFLAGS="$ac_save_cflags"
3882
 
   ])dnl
3883
 
 
3884
 
  if test "$ac_cv_have_xpm" = no; then
3885
 
    AC_MSG_RESULT(no)
3886
 
    XPM_LDFLAGS=""
3887
 
    XPMINC=""
3888
 
    $2
3889
 
  else
3890
 
    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3891
 
    if test "$XPM_LDFLAGS" = ""; then
3892
 
       XPMLIB='-lXpm $(LIB_X11)'
3893
 
    else
3894
 
       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3895
 
    fi
3896
 
    if test "$XPM_INCLUDE" = ""; then
3897
 
       XPMINC=""
3898
 
    else
3899
 
       XPMINC="-I$XPM_INCLUDE"
3900
 
    fi
3901
 
    AC_MSG_RESULT(yes)
3902
 
    $1
3903
 
  fi
3904
 
 fi
3905
 
 AC_SUBST(XPMINC)
3906
 
 AC_SUBST(XPMLIB)
3907
 
])
3908
 
 
3909
 
AC_DEFUN([AC_HAVE_DPMS],
3910
 
 [AC_REQUIRE_CPP()dnl
3911
 
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3912
 
 
3913
 
 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3914
 
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3915
 
 DPMS_LIB=
3916
 
 
3917
 
 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3918
 
        dpms_test=$withval, dpms_test="yes")
3919
 
 if test "x$dpms_test" = xno; then
3920
 
   ac_cv_have_dpms=no
3921
 
 else
3922
 
   AC_MSG_CHECKING(for DPMS)
3923
 
   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3924
 
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3925
 
   AC_CACHE_VAL(ac_cv_have_dpms,
3926
 
   [
3927
 
    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3928
 
      AC_MSG_RESULT(no)
3929
 
      ac_cv_have_dpms="no"
3930
 
    else
3931
 
      ac_save_ldflags="$LDFLAGS"
3932
 
      ac_save_cflags="$CFLAGS"
3933
 
      ac_save_libs="$LIBS"
3934
 
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
3935
 
      LIBS="-lX11 -lXext $LIBSOCKET"
3936
 
      CFLAGS="$CFLAGS $X_INCLUDES"
3937
 
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3938
 
      AC_TRY_LINK([
3939
 
          #include <X11/Xproto.h>
3940
 
          #include <X11/X.h>
3941
 
          #include <X11/Xlib.h>
3942
 
          #include <X11/extensions/dpms.h>
3943
 
          int foo_test_dpms()
3944
 
          { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3945
 
          ac_cv_have_dpms="yes", [
3946
 
              LIBS="-lXdpms $LIBS"
3947
 
              AC_TRY_LINK([
3948
 
                  #include <X11/Xproto.h>
3949
 
                  #include <X11/X.h>
3950
 
                  #include <X11/Xlib.h>
3951
 
                  #include <X11/extensions/dpms.h>
3952
 
                  int foo_test_dpms()
3953
 
                  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3954
 
                  [
3955
 
                  ac_cv_have_dpms="-lXdpms"
3956
 
                  ],ac_cv_have_dpms="no")
3957
 
              ])
3958
 
      LDFLAGS="$ac_save_ldflags"
3959
 
      CFLAGS="$ac_save_cflags"
3960
 
      LIBS="$ac_save_libs"
3961
 
    fi
3962
 
   ])dnl
3963
 
 
3964
 
  if test "$ac_cv_have_dpms" = no; then
3965
 
    AC_MSG_RESULT(no)
3966
 
    DPMS_LDFLAGS=""
3967
 
    DPMSINC=""
3968
 
    $2
3969
 
  else
3970
 
    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3971
 
    if test "$ac_cv_have_dpms" = "-lXdpms"; then
3972
 
       DPMS_LIB="-lXdpms"
3973
 
    fi
3974
 
    if test "$DPMS_LDFLAGS" = ""; then
3975
 
       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3976
 
    else
3977
 
       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3978
 
    fi
3979
 
    if test "$DPMS_INCLUDE" = ""; then
3980
 
       DPMSINC=""
3981
 
    else
3982
 
       DPMSINC="-I$DPMS_INCLUDE"
3983
 
    fi
3984
 
    AC_MSG_RESULT(yes)
3985
 
    $1
3986
 
  fi
3987
 
 fi
3988
 
 ac_save_cflags="$CFLAGS"
3989
 
 CFLAGS="$CFLAGS $X_INCLUDES"
3990
 
 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3991
 
 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3992
 
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3993
 
 AC_CHECK_DECL(DPMSCapable,
3994
 
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3995
 
   [#include <X11/Xlib.h>
3996
 
   #include <X11/extensions/dpms.h>])
3997
 
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3998
 
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3999
 
 AC_CHECK_DECL(DPMSInfo,
4000
 
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
4001
 
   [#include <X11/Xlib.h>
4002
 
   #include <X11/extensions/dpms.h>])
4003
 
 CFLAGS="$ac_save_cflags"
4004
 
 AC_SUBST(DPMSINC)
4005
 
 AC_SUBST(DPMSLIB)
4006
 
])
4007
 
 
4008
 
AC_DEFUN([AC_HAVE_GL],
4009
 
 [AC_REQUIRE_CPP()dnl
4010
 
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4011
 
 
4012
 
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
4013
 
 test -z "$GL_INCLUDE" && GL_INCLUDE=
4014
 
 
4015
 
 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
4016
 
        gl_test=$withval, gl_test="yes")
4017
 
 if test "x$kde_use_qt_emb" = "xyes"; then
4018
 
   # GL and Qt Embedded is a no-go for now.
4019
 
   ac_cv_have_gl=no
4020
 
 elif test "x$gl_test" = xno; then
4021
 
   ac_cv_have_gl=no
4022
 
 else
4023
 
   AC_MSG_CHECKING(for GL)
4024
 
   AC_CACHE_VAL(ac_cv_have_gl,
4025
 
   [
4026
 
    AC_LANG_SAVE
4027
 
    AC_LANG_CPLUSPLUS
4028
 
    ac_save_ldflags=$LDFLAGS
4029
 
    ac_save_cxxflags=$CXXFLAGS
4030
 
    ac_save_libs=$LIBS
4031
 
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
4032
 
    LIBS="$LIBS -lGL -lGLU"
4033
 
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
4034
 
    LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
4035
 
    CXXFLAGS="$CFLAGS $X_INCLUDES"
4036
 
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
4037
 
    AC_TRY_LINK([#include <GL/gl.h>
4038
 
#include <GL/glu.h>
4039
 
], [],
4040
 
        ac_cv_have_gl="yes", ac_cv_have_gl="no")
4041
 
    AC_LANG_RESTORE
4042
 
    LDFLAGS=$ac_save_ldflags
4043
 
    CXXFLAGS=$ac_save_cxxflags
4044
 
    LIBS=$ac_save_libs
4045
 
   ])dnl
4046
 
 
4047
 
  if test "$ac_cv_have_gl" = "no"; then
4048
 
    AC_MSG_RESULT(no)
4049
 
    GL_LDFLAGS=""
4050
 
    GLINC=""
4051
 
    $2
4052
 
  else
4053
 
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
4054
 
    if test "$GL_LDFLAGS" = ""; then
4055
 
       GLLIB='-lGLU -lGL $(LIB_X11)'
4056
 
    else
4057
 
       GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
4058
 
    fi
4059
 
    if test "$GL_INCLUDE" = ""; then
4060
 
       GLINC=""
4061
 
    else
4062
 
       GLINC="-I$GL_INCLUDE"
4063
 
    fi
4064
 
    AC_MSG_RESULT($ac_cv_have_gl)
4065
 
    $1
4066
 
  fi
4067
 
 fi
4068
 
 AC_SUBST(GLINC)
4069
 
 AC_SUBST(GLLIB)
4070
 
])
4071
 
 
4072
 
 
4073
 
 dnl shadow password and PAM magic - maintained by ossi@kde.org
4074
 
 
4075
 
AC_DEFUN([KDE_PAM], [
4076
 
  AC_REQUIRE([KDE_CHECK_LIBDL])
4077
 
 
4078
 
  want_pam=
4079
 
  AC_ARG_WITH(pam,
4080
 
    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
4081
 
    [ if test "x$withval" = "xyes"; then
4082
 
        want_pam=yes
4083
 
        pam_service=kde
4084
 
      elif test "x$withval" = "xno"; then
4085
 
        want_pam=no
4086
 
      else
4087
 
        want_pam=yes
4088
 
        pam_service=$withval
4089
 
      fi
4090
 
    ], [ pam_service=kde ])
4091
 
 
4092
 
  use_pam=
4093
 
  PAMLIBS=
4094
 
  if test "x$want_pam" != xno; then
4095
 
    AC_CHECK_LIB(pam, pam_start, [
4096
 
      AC_CHECK_HEADER(security/pam_appl.h,
4097
 
        [ pam_header=security/pam_appl.h ],
4098
 
        [ AC_CHECK_HEADER(pam/pam_appl.h,
4099
 
            [ pam_header=pam/pam_appl.h ],
4100
 
            [
4101
 
    AC_MSG_WARN([PAM detected, but no headers found!
4102
 
Make sure you have the necessary development packages installed.])
4103
 
            ]
4104
 
          )
4105
 
        ]
4106
 
      )
4107
 
    ], , $LIBDL)
4108
 
    if test -z "$pam_header"; then
4109
 
      if test "x$want_pam" = xyes; then
4110
 
        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
4111
 
      fi
4112
 
    else
4113
 
      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
4114
 
      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
4115
 
      use_pam=yes
4116
 
 
4117
 
      dnl darwin claims to be something special
4118
 
      if test "$pam_header" = "pam/pam_appl.h"; then
4119
 
        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
4120
 
      fi
4121
 
 
4122
 
      dnl test whether struct pam_message is const (Linux) or not (Sun)
4123
 
      AC_MSG_CHECKING(for const pam_message)
4124
 
      AC_EGREP_HEADER([struct pam_message], $pam_header,
4125
 
        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
4126
 
                          [AC_MSG_RESULT([const: Linux-type PAM])],
4127
 
                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
4128
 
                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
4129
 
                          )],
4130
 
        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
4131
 
    fi
4132
 
  fi
4133
 
 
4134
 
  AC_SUBST(PAMLIBS)
4135
 
])
4136
 
 
4137
 
dnl DEF_PAM_SERVICE(arg name, full name, define name)
4138
 
AC_DEFUN([DEF_PAM_SERVICE], [
4139
 
  AC_ARG_WITH($1-pam,
4140
 
    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
4141
 
    [ if test "x$use_pam" = xyes; then
4142
 
        $3_PAM_SERVICE=$withval
4143
 
      else
4144
 
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
4145
 
You may want to enforce it by using --with-pam.])
4146
 
      fi
4147
 
    ], 
4148
 
    [ if test "x$use_pam" = xyes; then
4149
 
        $3_PAM_SERVICE="$pam_service"
4150
 
      fi
4151
 
    ])
4152
 
    if test -n "$$3_PAM_SERVICE"; then
4153
 
      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
4154
 
      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
4155
 
    fi
4156
 
    AC_SUBST($3_PAM_SERVICE)
4157
 
])
4158
 
 
4159
 
AC_DEFUN([KDE_SHADOWPASSWD], [
4160
 
  AC_REQUIRE([KDE_PAM])
4161
 
 
4162
 
  AC_CHECK_LIB(shadow, getspent,
4163
 
    [ LIBSHADOW="-lshadow"
4164
 
      ac_use_shadow=yes
4165
 
    ],
4166
 
    [ dnl for UnixWare
4167
 
      AC_CHECK_LIB(gen, getspent, 
4168
 
        [ LIBGEN="-lgen"
4169
 
          ac_use_shadow=yes
4170
 
        ], 
4171
 
        [ AC_CHECK_FUNC(getspent, 
4172
 
            [ ac_use_shadow=yes ],
4173
 
            [ ac_use_shadow=no ])
4174
 
        ])
4175
 
    ])
4176
 
  AC_SUBST(LIBSHADOW)
4177
 
  AC_SUBST(LIBGEN)
4178
 
  
4179
 
  AC_MSG_CHECKING([for shadow passwords])
4180
 
 
4181
 
  AC_ARG_WITH(shadow,
4182
 
    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
4183
 
    [ if test "x$withval" != "xno"; then
4184
 
        use_shadow=yes
4185
 
      else
4186
 
        use_shadow=no
4187
 
      fi
4188
 
    ], [
4189
 
      use_shadow="$ac_use_shadow"
4190
 
    ])
4191
 
 
4192
 
  if test "x$use_shadow" = xyes; then
4193
 
    AC_MSG_RESULT(yes)
4194
 
    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
4195
 
  else
4196
 
    AC_MSG_RESULT(no)
4197
 
    LIBSHADOW=
4198
 
    LIBGEN=
4199
 
  fi
4200
 
 
4201
 
  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
4202
 
  dnl this still applies, if we could use it indirectly through pam.
4203
 
  if test "x$use_shadow" = xyes || 
4204
 
     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
4205
 
      case $host in
4206
 
      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
4207
 
        SETUIDFLAGS="-m 4755 -o root";;
4208
 
      *)
4209
 
        SETUIDFLAGS="-m 4755";;
4210
 
      esac
4211
 
  fi
4212
 
  AC_SUBST(SETUIDFLAGS)
4213
 
 
4214
 
])
4215
 
 
4216
 
AC_DEFUN([KDE_PASSWDLIBS], [
4217
 
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
4218
 
  AC_REQUIRE([KDE_PAM])
4219
 
  AC_REQUIRE([KDE_SHADOWPASSWD])
4220
 
 
4221
 
  if test "x$use_pam" = "xyes"; then 
4222
 
    PASSWDLIBS="$PAMLIBS"
4223
 
  else
4224
 
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
4225
 
  fi
4226
 
 
4227
 
  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
4228
 
  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
4229
 
  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
4230
 
  dnl may need to read /etc/master.passwd).
4231
 
  case $host in
4232
 
  *-*-freebsd*)
4233
 
    SETUIDFLAGS="-m 4755 -o root"
4234
 
    ;;
4235
 
  *)
4236
 
    ;;
4237
 
  esac
4238
 
 
4239
 
  AC_SUBST(PASSWDLIBS)
4240
 
])
4241
 
 
4242
 
AC_DEFUN([KDE_CHECK_LIBDL],
4243
 
[
4244
 
AC_CHECK_LIB(dl, dlopen, [
4245
 
LIBDL="-ldl"
4246
 
ac_cv_have_dlfcn=yes
4247
 
])
4248
 
 
4249
 
AC_CHECK_LIB(dld, shl_unload, [
4250
 
LIBDL="-ldld"
4251
 
ac_cv_have_shload=yes
4252
 
])
4253
 
 
4254
 
AC_SUBST(LIBDL)
4255
 
])
4256
 
 
4257
 
AC_DEFUN([KDE_CHECK_DLOPEN],
4258
 
[
4259
 
KDE_CHECK_LIBDL
4260
 
AC_CHECK_HEADERS(dlfcn.h dl.h)
4261
 
if test "$ac_cv_header_dlfcn_h" = "no"; then
4262
 
  ac_cv_have_dlfcn=no
4263
 
fi
4264
 
 
4265
 
if test "$ac_cv_header_dl_h" = "no"; then
4266
 
  ac_cv_have_shload=no
4267
 
fi
4268
 
 
4269
 
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4270
 
dnl (MM)
4271
 
AC_ARG_ENABLE(dlopen,
4272
 
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
4273
 
enable_dlopen=$enableval,
4274
 
enable_dlopen=yes)
4275
 
 
4276
 
# override the user's opinion, if we know it better ;)
4277
 
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
4278
 
  enable_dlopen=no
4279
 
fi
4280
 
 
4281
 
if test "$ac_cv_have_dlfcn" = "yes"; then
4282
 
  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
4283
 
fi
4284
 
 
4285
 
if test "$ac_cv_have_shload" = "yes"; then
4286
 
  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
4287
 
fi
4288
 
 
4289
 
if test "$enable_dlopen" = no ; then
4290
 
  test -n "$1" && eval $1
4291
 
else
4292
 
  test -n "$2" && eval $2
4293
 
fi
4294
 
 
4295
 
])
4296
 
 
4297
 
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
4298
 
[
4299
 
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4300
 
KDE_PROG_LIBTOOL
4301
 
AC_MSG_CHECKING([dynamic loading])
4302
 
eval "`egrep '^build_libtool_libs=' libtool`"
4303
 
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
4304
 
  dynamic_loading=yes
4305
 
  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
4306
 
else
4307
 
  dynamic_loading=no
4308
 
fi
4309
 
AC_MSG_RESULT($dynamic_loading)
4310
 
if test "$dynamic_loading" = "yes"; then
4311
 
  $1
4312
 
else
4313
 
  $2
4314
 
fi
4315
 
])
4316
 
 
4317
 
AC_DEFUN([KDE_ADD_INCLUDES],
4318
 
[
4319
 
if test -z "$1"; then
4320
 
  test_include="Pix.h"
4321
 
else
4322
 
  test_include="$1"
4323
 
fi
4324
 
 
4325
 
AC_MSG_CHECKING([for libg++ ($test_include)])
4326
 
 
4327
 
AC_CACHE_VAL(kde_cv_libgpp_includes,
4328
 
[
4329
 
kde_cv_libgpp_includes=no
4330
 
 
4331
 
   for ac_dir in               \
4332
 
                               \
4333
 
     /usr/include/g++          \
4334
 
     /usr/include              \
4335
 
     /usr/unsupported/include  \
4336
 
     /opt/include              \
4337
 
     $extra_include            \
4338
 
     ; \
4339
 
   do
4340
 
     if test -r "$ac_dir/$test_include"; then
4341
 
       kde_cv_libgpp_includes=$ac_dir
4342
 
       break
4343
 
     fi
4344
 
   done
4345
 
])
4346
 
 
4347
 
AC_MSG_RESULT($kde_cv_libgpp_includes)
4348
 
if test "$kde_cv_libgpp_includes" != "no"; then
4349
 
  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
4350
 
fi
4351
 
])
4352
 
])
4353
 
 
4354
 
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
4355
 
[
4356
 
  dnl This code is here specifically to handle the
4357
 
  dnl various flavors of threading library on FreeBSD
4358
 
  dnl 4-, 5-, and 6-, and the (weird) rules around it.
4359
 
  dnl There may be an environment PTHREAD_LIBS that 
4360
 
  dnl specifies what to use; otherwise, search for it.
4361
 
  dnl -pthread is special cased and unsets LIBPTHREAD
4362
 
  dnl below if found.
4363
 
  LIBPTHREAD=""
4364
 
 
4365
 
  if test -n "$PTHREAD_LIBS"; then
4366
 
    if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4367
 
      LIBPTHREAD="PTHREAD"
4368
 
    else
4369
 
      PTHREAD_LIBS_save="$PTHREAD_LIBS"
4370
 
      PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4371
 
      AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4372
 
      KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4373
 
          LIBPTHREAD="$PTHREAD_LIBS_save"])
4374
 
      PTHREAD_LIBS="$PTHREAD_LIBS_save"
4375
 
    fi
4376
 
  fi
4377
 
 
4378
 
  dnl Is this test really needed, in the face of the Tru64 test below?
4379
 
  if test -z "$LIBPTHREAD"; then
4380
 
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4381
 
  fi
4382
 
 
4383
 
  dnl This is a special Tru64 check, see BR 76171 issue #18.
4384
 
  if test -z "$LIBPTHREAD" ; then
4385
 
    AC_MSG_CHECKING([for pthread_create in -lpthread])
4386
 
    kde_safe_libs=$LIBS
4387
 
    LIBS="$LIBS -lpthread"
4388
 
    AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4389
 
        AC_MSG_RESULT(yes)
4390
 
        LIBPTHREAD="-lpthread"],[
4391
 
        AC_MSG_RESULT(no)])
4392
 
    LIBS=$kde_safe_libs
4393
 
  fi
4394
 
 
4395
 
  dnl Un-special-case for FreeBSD.
4396
 
  if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4397
 
    LIBPTHREAD=""
4398
 
  fi
4399
 
 
4400
 
  AC_SUBST(LIBPTHREAD)
4401
 
])
4402
 
 
4403
 
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
4404
 
[
4405
 
      USE_THREADS=""
4406
 
      if test -z "$LIBPTHREAD"; then
4407
 
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
4408
 
      fi
4409
 
 
4410
 
    AH_VERBATIM(__svr_define, [
4411
 
#if defined(__SVR4) && !defined(__svr4__)
4412
 
#define __svr4__ 1
4413
 
#endif
4414
 
])
4415
 
    case $host_os in
4416
 
        solaris*)
4417
 
                KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4418
 
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4419
 
                ;;
4420
 
        freebsd*)
4421
 
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
4422
 
                ;;
4423
 
        aix*)
4424
 
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4425
 
                LIBPTHREAD="$LIBPTHREAD -lc_r"
4426
 
                ;;
4427
 
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4428
 
                if test "$CXX" = "KCC"; then
4429
 
                  CXXFLAGS="$CXXFLAGS --thread_safe"
4430
 
                  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4431
 
                fi
4432
 
                ;;
4433
 
        *)
4434
 
                ;;
4435
 
    esac
4436
 
    AC_SUBST(USE_THREADS)
4437
 
    AC_SUBST(LIBPTHREAD)
4438
 
])
4439
 
 
4440
 
AC_DEFUN([KDE_CHECK_THREADING],
4441
 
[
4442
 
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4443
 
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4444
 
  dnl default is yes if libpthread is found and no if no libpthread is available
4445
 
  if test -z "$LIBPTHREAD"; then
4446
 
    if test -z "$USE_THREADS"; then
4447
 
      kde_check_threading_default=no
4448
 
    else
4449
 
      kde_check_threading_default=yes
4450
 
    fi
4451
 
  else
4452
 
    kde_check_threading_default=yes
4453
 
  fi
4454
 
  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
4455
 
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4456
 
  if test "x$kde_use_threading" = "xyes"; then
4457
 
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4458
 
  fi
4459
 
])
4460
 
 
4461
 
AC_DEFUN([KDE_TRY_LINK_PYTHON],
4462
 
[
4463
 
if test "$kde_python_link_found" = no; then
4464
 
 
4465
 
if test "$1" = normal; then
4466
 
  AC_MSG_CHECKING(if a Python application links)
4467
 
else
4468
 
  AC_MSG_CHECKING(if Python depends on $2)
4469
 
fi
4470
 
 
4471
 
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4472
 
[
4473
 
kde_save_cflags="$CFLAGS"
4474
 
CFLAGS="$CFLAGS $PYTHONINC"
4475
 
kde_save_libs="$LIBS"
4476
 
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4477
 
kde_save_ldflags="$LDFLAGS"
4478
 
LDFLAGS="$LDFLAGS $PYTHONLIB"
4479
 
 
4480
 
AC_TRY_LINK(
4481
 
[
4482
 
#include <Python.h>
4483
 
],[
4484
 
        PySys_SetArgv(1, 0);
4485
 
],
4486
 
        [kde_cv_try_link_python_$1=yes],
4487
 
        [kde_cv_try_link_python_$1=no]
4488
 
)
4489
 
CFLAGS="$kde_save_cflags"
4490
 
LIBS="$kde_save_libs"
4491
 
LDFLAGS="$kde_save_ldflags"
4492
 
])
4493
 
 
4494
 
if test "$kde_cv_try_link_python_$1" = "yes"; then
4495
 
  AC_MSG_RESULT(yes)
4496
 
  kde_python_link_found=yes
4497
 
  if test ! "$1" = normal; then
4498
 
    LIBPYTHON="$LIBPYTHON $2"
4499
 
  fi
4500
 
  $3
4501
 
else
4502
 
  AC_MSG_RESULT(no)
4503
 
  $4
4504
 
fi
4505
 
 
4506
 
fi
4507
 
 
4508
 
])
4509
 
 
4510
 
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4511
 
[
4512
 
AC_MSG_CHECKING([for Python directory])
4513
 
 
4514
 
AC_CACHE_VAL(kde_cv_pythondir,
4515
 
[
4516
 
  if test -z "$PYTHONDIR"; then
4517
 
    kde_cv_pythondir=/usr/local
4518
 
  else
4519
 
    kde_cv_pythondir="$PYTHONDIR"
4520
 
  fi
4521
 
])
4522
 
 
4523
 
AC_ARG_WITH(pythondir,
4524
 
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4525
 
[
4526
 
  ac_python_dir=$withval
4527
 
], ac_python_dir=$kde_cv_pythondir
4528
 
)
4529
 
 
4530
 
AC_MSG_RESULT($ac_python_dir)
4531
 
])
4532
 
 
4533
 
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4534
 
[
4535
 
AC_REQUIRE([KDE_CHECK_LIBDL])
4536
 
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4537
 
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4538
 
 
4539
 
if test -z "$1"; then
4540
 
  version="1.5"
4541
 
else
4542
 
  version="$1"
4543
 
fi
4544
 
 
4545
 
AC_MSG_CHECKING([for Python$version])
4546
 
 
4547
 
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4548
 
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4549
 
if test ! -r $python_incdir/Python.h; then
4550
 
  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4551
 
  python_incdir=$python_incdir/python$version
4552
 
  if test ! -r $python_incdir/Python.h; then
4553
 
    python_incdir=no
4554
 
  fi
4555
 
fi
4556
 
 
4557
 
PYTHONINC=-I$python_incdir
4558
 
 
4559
 
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4560
 
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4561
 
if test ! -r $python_libdir/libpython$version.so; then
4562
 
  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4563
 
  if test ! -r $python_libdir/libpython$version.a; then
4564
 
    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4565
 
    python_libdir=$python_libdir/python$version/config
4566
 
    if test ! -r $python_libdir/libpython$version.a; then
4567
 
      python_libdir=no
4568
 
    fi
4569
 
  fi
4570
 
fi
4571
 
 
4572
 
PYTHONLIB=-L$python_libdir
4573
 
kde_orig_LIBPYTHON=$LIBPYTHON
4574
 
if test -z "$LIBPYTHON"; then
4575
 
  LIBPYTHON=-lpython$version
4576
 
fi
4577
 
 
4578
 
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4579
 
python_moddir=$python_moddir/python$version
4580
 
if test ! -r $python_moddir/copy.py; then
4581
 
  python_moddir=no
4582
 
fi
4583
 
 
4584
 
PYTHONMODDIR=$python_moddir
4585
 
 
4586
 
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4587
 
 
4588
 
if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
4589
 
   LIBPYTHON=$kde_orig_LIBPYTHON
4590
 
   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4591
 
   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4592
 
   $2
4593
 
else 
4594
 
  dnl Note: this test is very weak
4595
 
  kde_python_link_found=no
4596
 
  KDE_TRY_LINK_PYTHON(normal)
4597
 
  KDE_TRY_LINK_PYTHON(m, -lm)
4598
 
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4599
 
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4600
 
  KDE_TRY_LINK_PYTHON(db2, -ldb2)
4601
 
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4602
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4603
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4604
 
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4605
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4606
 
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4607
 
  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4608
 
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4609
 
        [AC_MSG_WARN([it seems, Python depends on another library.
4610
 
    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4611
 
    and contact the authors to let them know about this problem])
4612
 
        ])
4613
 
 
4614
 
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4615
 
  AC_SUBST(PYTHONINC)
4616
 
  AC_SUBST(PYTHONLIB)
4617
 
  AC_SUBST(LIBPYTHON)
4618
 
  AC_SUBST(PYTHONMODDIR)
4619
 
  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4620
 
fi
4621
 
 
4622
 
])
4623
 
 
4624
 
 
4625
 
AC_DEFUN([KDE_CHECK_PYTHON],
4626
 
[
4627
 
  KDE_CHECK_PYTHON_INTERN("2.4",
4628
 
   [KDE_CHECK_PYTHON_INTERN("2.3", 
4629
 
     [KDE_CHECK_PYTHON_INTERN("2.2", 
4630
 
       [KDE_CHECK_PYTHON_INTERN("2.1", 
4631
 
         [KDE_CHECK_PYTHON_INTERN("2.0", 
4632
 
           [KDE_CHECK_PYTHON_INTERN($1, $2) ])
4633
 
         ])
4634
 
       ])
4635
 
     ])
4636
 
  ])
4637
 
])
4638
 
 
4639
 
AC_DEFUN([KDE_CHECK_STL],
4640
 
[
4641
 
    AC_LANG_SAVE
4642
 
    AC_LANG_CPLUSPLUS
4643
 
    ac_save_CXXFLAGS="$CXXFLAGS"
4644
 
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4645
 
 
4646
 
    AC_MSG_CHECKING([if C++ programs can be compiled])
4647
 
    AC_CACHE_VAL(kde_cv_stl_works,
4648
 
    [
4649
 
      AC_TRY_COMPILE([
4650
 
#include <string>
4651
 
using namespace std;
4652
 
],[
4653
 
  string astring="Hallo Welt.";
4654
 
  astring.erase(0, 6); // now astring is "Welt"
4655
 
  return 0;
4656
 
], kde_cv_stl_works=yes,
4657
 
   kde_cv_stl_works=no)
4658
 
])
4659
 
 
4660
 
   AC_MSG_RESULT($kde_cv_stl_works)
4661
 
 
4662
 
   if test "$kde_cv_stl_works" = "yes"; then
4663
 
     # back compatible
4664
 
         AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4665
 
   else
4666
 
         AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4667
 
Check config.log for details - if you're using a Linux distribution you might miss
4668
 
a package named similar to libstdc++-dev.])
4669
 
   fi
4670
 
 
4671
 
   CXXFLAGS="$ac_save_CXXFLAGS"
4672
 
   AC_LANG_RESTORE
4673
 
])
4674
 
 
4675
 
AC_DEFUN([AC_FIND_QIMGIO],
4676
 
   [AC_REQUIRE([AC_FIND_JPEG])
4677
 
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4678
 
AC_MSG_CHECKING([for qimgio])
4679
 
AC_CACHE_VAL(ac_cv_lib_qimgio,
4680
 
[
4681
 
AC_LANG_SAVE
4682
 
AC_LANG_CPLUSPLUS
4683
 
ac_save_LIBS="$LIBS"
4684
 
ac_save_CXXFLAGS="$CXXFLAGS"
4685
 
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4686
 
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4687
 
AC_TRY_RUN(dnl
4688
 
[
4689
 
#include <qimageio.h>
4690
 
#include <qstring.h>
4691
 
int main() {
4692
 
                QString t = "hallo";
4693
 
                t.fill('t');
4694
 
                qInitImageIO();
4695
 
}
4696
 
],
4697
 
            ac_cv_lib_qimgio=yes,
4698
 
            ac_cv_lib_qimgio=no,
4699
 
            ac_cv_lib_qimgio=no)
4700
 
LIBS="$ac_save_LIBS"
4701
 
CXXFLAGS="$ac_save_CXXFLAGS"
4702
 
AC_LANG_RESTORE
4703
 
])dnl
4704
 
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4705
 
  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4706
 
  AC_MSG_RESULT(yes)
4707
 
  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4708
 
  AC_SUBST(LIBQIMGIO)
4709
 
else
4710
 
  AC_MSG_RESULT(not found)
4711
 
fi
4712
 
])
4713
 
 
4714
 
AC_DEFUN([AM_DISABLE_LIBRARIES],
4715
 
[
4716
 
    AC_PROVIDE([AM_ENABLE_STATIC])
4717
 
    AC_PROVIDE([AM_ENABLE_SHARED])
4718
 
    enable_static=no
4719
 
    enable_shared=yes
4720
 
])
4721
 
 
4722
 
 
4723
 
AC_DEFUN([AC_CHECK_UTMP_FILE],
4724
 
[
4725
 
    AC_MSG_CHECKING([for utmp file])
4726
 
 
4727
 
    AC_CACHE_VAL(kde_cv_utmp_file,
4728
 
    [
4729
 
    kde_cv_utmp_file=no
4730
 
 
4731
 
    for ac_file in    \
4732
 
                      \
4733
 
        /var/run/utmp \
4734
 
        /var/adm/utmp \
4735
 
        /etc/utmp     \
4736
 
     ; \
4737
 
    do
4738
 
     if test -r "$ac_file"; then
4739
 
       kde_cv_utmp_file=$ac_file
4740
 
       break
4741
 
     fi
4742
 
    done
4743
 
    ])
4744
 
 
4745
 
    if test "$kde_cv_utmp_file" != "no"; then
4746
 
        AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4747
 
        $1
4748
 
        AC_MSG_RESULT($kde_cv_utmp_file)
4749
 
    else
4750
 
        $2
4751
 
        AC_MSG_RESULT([non found])
4752
 
    fi
4753
 
])
4754
 
 
4755
 
 
4756
 
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4757
 
[
4758
 
 
4759
 
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4760
 
TOPSUBDIRS=""
4761
 
 
4762
 
if test ! -s $srcdir/subdirs; then
4763
 
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
4764
 
  files=`cd $srcdir && ls -1`
4765
 
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4766
 
  for i in $dirs; do
4767
 
    echo $i >> $srcdir/subdirs
4768
 
  done
4769
 
fi
4770
 
 
4771
 
ac_topsubdirs=
4772
 
if test -s $srcdir/inst-apps; then
4773
 
  ac_topsubdirs="`cat $srcdir/inst-apps`"
4774
 
elif test -s $srcdir/subdirs; then
4775
 
  ac_topsubdirs="`cat $srcdir/subdirs`"
4776
 
fi
4777
 
 
4778
 
for i in $ac_topsubdirs; do
4779
 
  AC_MSG_CHECKING([if $i should be compiled])
4780
 
  if test -d $srcdir/$i; then
4781
 
    install_it="yes"
4782
 
    for j in $DO_NOT_COMPILE; do
4783
 
      if test $i = $j; then
4784
 
        install_it="no"
4785
 
      fi
4786
 
    done
4787
 
  else
4788
 
    install_it="no"
4789
 
  fi
4790
 
  AC_MSG_RESULT($install_it)
4791
 
  vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
4792
 
  if test $install_it = "yes"; then
4793
 
    TOPSUBDIRS="$TOPSUBDIRS $i"
4794
 
    eval "$vari""_SUBDIR_included=yes"
4795
 
  else
4796
 
    eval "$vari""_SUBDIR_included=no"
4797
 
  fi
4798
 
done
4799
 
 
4800
 
AC_SUBST(TOPSUBDIRS)
4801
 
])
4802
 
 
4803
 
AC_DEFUN([KDE_CHECK_NAMESPACES],
4804
 
[
4805
 
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4806
 
AC_LANG_SAVE
4807
 
AC_LANG_CPLUSPLUS
4808
 
AC_TRY_COMPILE([
4809
 
],
4810
 
[
4811
 
namespace Foo {
4812
 
  extern int i;
4813
 
  namespace Bar {
4814
 
    extern int i;
4815
 
  }
4816
 
}
4817
 
 
4818
 
int Foo::i = 0;
4819
 
int Foo::Bar::i = 1;
4820
 
],[
4821
 
  AC_MSG_RESULT(yes)
4822
 
  AC_DEFINE(HAVE_NAMESPACES)
4823
 
], [
4824
 
AC_MSG_RESULT(no)
4825
 
])
4826
 
AC_LANG_RESTORE
4827
 
])
4828
 
 
4829
 
dnl ------------------------------------------------------------------------
4830
 
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4831
 
dnl ------------------------------------------------------------------------
4832
 
dnl
4833
 
AC_DEFUN([AC_CHECK_S_ISSOCK],
4834
 
[
4835
 
AC_MSG_CHECKING(for S_ISSOCK)
4836
 
AC_CACHE_VAL(ac_cv_have_s_issock,
4837
 
[
4838
 
AC_TRY_LINK(
4839
 
[
4840
 
#include <sys/stat.h>
4841
 
],
4842
 
[
4843
 
struct stat buff;
4844
 
int b = S_ISSOCK( buff.st_mode );
4845
 
],
4846
 
ac_cv_have_s_issock=yes,
4847
 
ac_cv_have_s_issock=no)
4848
 
])
4849
 
AC_MSG_RESULT($ac_cv_have_s_issock)
4850
 
if test "$ac_cv_have_s_issock" = "yes"; then
4851
 
  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4852
 
fi
4853
 
 
4854
 
AH_VERBATIM(_ISSOCK,
4855
 
[
4856
 
#ifndef HAVE_S_ISSOCK
4857
 
#define HAVE_S_ISSOCK
4858
 
#define S_ISSOCK(mode) (1==0)
4859
 
#endif
4860
 
])
4861
 
 
4862
 
])
4863
 
 
4864
 
dnl ------------------------------------------------------------------------
4865
 
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4866
 
dnl ------------------------------------------------------------------------
4867
 
dnl
4868
 
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4869
 
[
4870
 
AC_MSG_CHECKING(for MAXPATHLEN)
4871
 
AC_CACHE_VAL(ac_cv_maxpathlen,
4872
 
[
4873
 
cat > conftest.$ac_ext <<EOF
4874
 
#ifdef STDC_HEADERS
4875
 
# include <stdlib.h>
4876
 
#endif
4877
 
#include <stdio.h>
4878
 
#include <sys/param.h>
4879
 
#ifndef MAXPATHLEN
4880
 
#define MAXPATHLEN 1024
4881
 
#endif
4882
 
 
4883
 
KDE_HELLO MAXPATHLEN
4884
 
 
4885
 
EOF
4886
 
 
4887
 
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4888
 
 
4889
 
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4890
 
    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4891
 
else
4892
 
    ac_cv_maxpathlen=1024
4893
 
fi
4894
 
 
4895
 
rm conftest.*
4896
 
 
4897
 
])
4898
 
AC_MSG_RESULT($ac_cv_maxpathlen)
4899
 
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4900
 
])
4901
 
 
4902
 
AC_DEFUN([KDE_CHECK_HEADER],
4903
 
[
4904
 
   kde_safe_cppflags=$CPPFLAGS
4905
 
   CPPFLAGS="$CPPFLAGS $all_includes"
4906
 
   AC_LANG_SAVE
4907
 
   AC_LANG_CPLUSPLUS
4908
 
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4909
 
   AC_LANG_RESTORE
4910
 
   CPPFLAGS=$kde_safe_cppflags
4911
 
])
4912
 
 
4913
 
AC_DEFUN([KDE_CHECK_HEADERS],
4914
 
[
4915
 
   AH_CHECK_HEADERS([$1])
4916
 
   AC_LANG_SAVE
4917
 
   kde_safe_cppflags=$CPPFLAGS
4918
 
   CPPFLAGS="$CPPFLAGS $all_includes"
4919
 
   AC_LANG_CPLUSPLUS
4920
 
   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4921
 
   CPPFLAGS=$kde_safe_cppflags
4922
 
   AC_LANG_RESTORE
4923
 
])
4924
 
 
4925
 
AC_DEFUN([KDE_FAST_CONFIGURE],
4926
 
[
4927
 
  dnl makes configure fast (needs perl)
4928
 
  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4929
 
      with_fast_perl=$enableval, with_fast_perl=yes)
4930
 
])
4931
 
 
4932
 
AC_DEFUN([KDE_CONF_FILES],
4933
 
[
4934
 
  val=
4935
 
  if test -f $srcdir/configure.files ; then
4936
 
    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4937
 
  fi
4938
 
  CONF_FILES=
4939
 
  if test -n "$val" ; then
4940
 
    for i in $val ; do
4941
 
      CONF_FILES="$CONF_FILES $i"
4942
 
    done
4943
 
  fi
4944
 
  AC_SUBST(CONF_FILES)
4945
 
])dnl
4946
 
 
4947
 
dnl This sets the prefix, for arts and kdelibs
4948
 
dnl Do NOT use in any other module.
4949
 
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
4950
 
AC_DEFUN([KDE_SET_PREFIX_CORE],
4951
 
[
4952
 
  unset CDPATH
4953
 
  dnl make $KDEDIR the default for the installation
4954
 
  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4955
 
 
4956
 
  if test "x$prefix" = "xNONE"; then
4957
 
    prefix=$ac_default_prefix
4958
 
    ac_configure_args="$ac_configure_args --prefix=$prefix"
4959
 
  fi
4960
 
  # And delete superfluous '/' to make compares easier
4961
 
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4962
 
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4963
 
 
4964
 
  kde_libs_prefix='$(prefix)'
4965
 
  kde_libs_htmldir='$(kde_htmldir)'
4966
 
  AC_SUBST(kde_libs_prefix)
4967
 
  AC_SUBST(kde_libs_htmldir)
4968
 
  KDE_FAST_CONFIGURE
4969
 
  KDE_CONF_FILES
4970
 
])
4971
 
 
4972
 
 
4973
 
AC_DEFUN([KDE_SET_PREFIX],
4974
 
[
4975
 
  unset CDPATH
4976
 
  dnl We can't give real code to that macro, only a value.
4977
 
  dnl It only matters for --help, since we set the prefix in this function anyway.
4978
 
  AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
4979
 
 
4980
 
  KDE_SET_DEFAULT_BINDIRS
4981
 
  if test "x$prefix" = "xNONE"; then
4982
 
    dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
4983
 
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4984
 
  else
4985
 
    dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
4986
 
    kde_save_PATH="$PATH"
4987
 
    PATH="$exec_prefix/bin:$prefix/bin:$PATH"
4988
 
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4989
 
    PATH="$kde_save_PATH"
4990
 
  fi
4991
 
 
4992
 
  kde_libs_prefix=`$KDECONFIG --prefix`
4993
 
  if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
4994
 
       AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
4995
 
                    This means it has been moved since you installed it.
4996
 
                    This won't work. Please recompile kdelibs for the new prefix.
4997
 
                    ])
4998
 
  fi
4999
 
  kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
5000
 
 
5001
 
  AC_MSG_CHECKING([where to install])
5002
 
  if test "x$prefix" = "xNONE"; then
5003
 
    prefix=$kde_libs_prefix
5004
 
    AC_MSG_RESULT([$prefix (as returned by kde-config)])
5005
 
  else
5006
 
    dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
5007
 
    given_prefix=$prefix
5008
 
    AC_MSG_RESULT([$prefix (as requested)])
5009
 
  fi
5010
 
 
5011
 
  # And delete superfluous '/' to make compares easier
5012
 
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5013
 
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5014
 
  given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5015
 
 
5016
 
  AC_SUBST(KDECONFIG)
5017
 
  AC_SUBST(kde_libs_prefix)
5018
 
  AC_SUBST(kde_libs_htmldir)
5019
 
 
5020
 
  KDE_FAST_CONFIGURE
5021
 
  KDE_CONF_FILES
5022
 
])
5023
 
 
5024
 
pushdef([AC_PROG_INSTALL],
5025
 
[
5026
 
  dnl our own version, testing for a -p flag
5027
 
  popdef([AC_PROG_INSTALL])
5028
 
  dnl as AC_PROG_INSTALL works as it works we first have
5029
 
  dnl to save if the user didn't specify INSTALL, as the
5030
 
  dnl autoconf one overwrites INSTALL and we have no chance to find
5031
 
  dnl out afterwards
5032
 
  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
5033
 
  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
5034
 
  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
5035
 
  AC_PROG_INSTALL
5036
 
 
5037
 
  if test -z "$kde_save_INSTALL_given" ; then
5038
 
    # OK, user hasn't given any INSTALL, autoconf found one for us
5039
 
    # now we test, if it supports the -p flag
5040
 
    AC_MSG_CHECKING(for -p flag to install)
5041
 
    rm -f confinst.$$.* > /dev/null 2>&1
5042
 
    echo "Testtest" > confinst.$$.orig
5043
 
    ac_res=no
5044
 
    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
5045
 
      if test -f confinst.$$.new ; then
5046
 
        # OK, -p seems to do no harm to install
5047
 
        INSTALL="${INSTALL} -p"
5048
 
        ac_res=yes
5049
 
      fi
5050
 
    fi
5051
 
    rm -f confinst.$$.*
5052
 
    AC_MSG_RESULT($ac_res)
5053
 
  fi
5054
 
  dnl the following tries to resolve some signs and wonders coming up
5055
 
  dnl with different autoconf/automake versions
5056
 
  dnl e.g.:
5057
 
  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
5058
 
  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
5059
 
  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
5060
 
  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
5061
 
  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
5062
 
  dnl   install-@DIR@PROGRAMS targets to explicitly use that flag
5063
 
  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
5064
 
  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
5065
 
  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
5066
 
  dnl  *sometimes KDE does not use the install-@DIR@PROGRAM targets from
5067
 
  dnl   automake (due to broken Makefile.am or whatever) to install programs,
5068
 
  dnl   and so does not see the -s flag in automake > 1.4
5069
 
  dnl to clean up that mess we:
5070
 
  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
5071
 
  dnl   which cleans KDE's program with automake > 1.4;
5072
 
  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
5073
 
  dnl   with automake<=1.4
5074
 
  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
5075
 
  dnl   properly uses install-@DIR@PROGRAMS, but I don't care
5076
 
  dnl
5077
 
  dnl And to all this comes, that I even can't write in comments variable
5078
 
  dnl  names used by automake, because it is so stupid to think I wanted to
5079
 
  dnl  _use_ them, therefor I have written A_M_... instead of AM_
5080
 
  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
5081
 
 
5082
 
  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
5083
 
    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
5084
 
  fi
5085
 
  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
5086
 
    INSTALL_SCRIPT='${INSTALL}'
5087
 
  fi
5088
 
])dnl
5089
 
 
5090
 
AC_DEFUN([KDE_LANG_CPLUSPLUS],
5091
 
[AC_LANG_CPLUSPLUS
5092
 
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
5093
 
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
5094
 
])
5095
 
 
5096
 
pushdef([AC_LANG_CPLUSPLUS],
5097
 
[popdef([AC_LANG_CPLUSPLUS])
5098
 
KDE_LANG_CPLUSPLUS
5099
 
])
5100
 
 
5101
 
AC_DEFUN([KDE_CHECK_LONG_LONG],
5102
 
[
5103
 
AC_MSG_CHECKING(for long long)
5104
 
AC_CACHE_VAL(kde_cv_c_long_long,
5105
 
[
5106
 
  AC_LANG_SAVE
5107
 
  AC_LANG_CPLUSPLUS
5108
 
  AC_TRY_LINK([], [
5109
 
  long long foo = 0;
5110
 
  foo = foo+1;
5111
 
  ],
5112
 
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
5113
 
  AC_LANG_RESTORE
5114
 
])
5115
 
AC_MSG_RESULT($kde_cv_c_long_long)
5116
 
if test "$kde_cv_c_long_long" = yes; then
5117
 
   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
5118
 
fi
5119
 
])
5120
 
 
5121
 
AC_DEFUN([KDE_CHECK_LIB],
5122
 
[
5123
 
     kde_save_LDFLAGS="$LDFLAGS"
5124
 
     dnl AC_CHECK_LIB modifies LIBS, so save it here
5125
 
     kde_save_LIBS="$LIBS"
5126
 
     LDFLAGS="$LDFLAGS $all_libraries"
5127
 
     case $host_os in
5128
 
      aix*) LDFLAGS="-brtl $LDFLAGS"
5129
 
        test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
5130
 
        ;;
5131
 
     esac
5132
 
     AC_CHECK_LIB($1, $2, $3, $4, $5)
5133
 
     LDFLAGS="$kde_save_LDFLAGS"
5134
 
     LIBS="$kde_save_LIBS"
5135
 
])
5136
 
 
5137
 
AC_DEFUN([KDE_JAVA_PREFIX],
5138
 
[
5139
 
        dir=`dirname "$1"`
5140
 
        base=`basename "$1"`
5141
 
        list=`ls -1 $dir 2> /dev/null`
5142
 
        for entry in $list; do 
5143
 
                if test -d $dir/$entry/bin; then
5144
 
                        case $entry in
5145
 
                           $base)
5146
 
                                javadirs="$javadirs $dir/$entry/bin"
5147
 
                                ;;
5148
 
                        esac
5149
 
                elif test -d $dir/$entry/jre/bin; then
5150
 
                        case $entry in
5151
 
                           $base)
5152
 
                                javadirs="$javadirs $dir/$entry/jre/bin"
5153
 
                                ;;
5154
 
                        esac
5155
 
                fi
5156
 
        done
5157
 
])
5158
 
 
5159
 
dnl KDE_CHEC_JAVA_DIR(onlyjre)
5160
 
AC_DEFUN([KDE_CHECK_JAVA_DIR],
5161
 
[
5162
 
 
5163
 
AC_ARG_WITH(java,
5164
 
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
5165
 
[  ac_java_dir=$withval
5166
 
], ac_java_dir=""
5167
 
)
5168
 
 
5169
 
AC_MSG_CHECKING([for Java])
5170
 
 
5171
 
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
5172
 
if test "x$ac_java_dir" = "xno"; then
5173
 
   kde_java_bindir=no
5174
 
   kde_java_includedir=no
5175
 
   kde_java_libjvmdir=no
5176
 
   kde_java_libgcjdir=no
5177
 
   kde_java_libhpidir=no
5178
 
else
5179
 
  if test "x$ac_java_dir" = "x"; then
5180
 
     
5181
 
     
5182
 
      dnl No option set -> collect list of candidate paths
5183
 
      if test -n "$JAVA_HOME"; then
5184
 
        KDE_JAVA_PREFIX($JAVA_HOME)
5185
 
      fi
5186
 
      KDE_JAVA_PREFIX(/usr/j2se)
5187
 
      KDE_JAVA_PREFIX(/usr/lib/j2se)
5188
 
      KDE_JAVA_PREFIX(/usr/j*dk*)
5189
 
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
5190
 
      KDE_JAVA_PREFIX(/opt/j*sdk*)
5191
 
      KDE_JAVA_PREFIX(/usr/lib/java*)
5192
 
      KDE_JAVA_PREFIX(/usr/java*)
5193
 
      KDE_JAVA_PREFIX(/usr/java/j*dk*)
5194
 
      KDE_JAVA_PREFIX(/usr/java/j*re*)
5195
 
      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
5196
 
      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
5197
 
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
5198
 
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
5199
 
      KDE_JAVA_PREFIX(/opt/java*)
5200
 
 
5201
 
      kde_cv_path="NONE"
5202
 
      kde_save_IFS=$IFS
5203
 
      IFS=':'
5204
 
      for dir in $PATH; do
5205
 
          if test -d "$dir"; then
5206
 
              javadirs="$javadirs $dir"
5207
 
          fi
5208
 
      done
5209
 
      IFS=$kde_save_IFS
5210
 
      jredirs=
5211
 
 
5212
 
      dnl Now javadirs contains a list of paths that exist, all ending with bin/
5213
 
      for dir in $javadirs; do
5214
 
          dnl Check for the java executable
5215
 
          if test -x "$dir/java"; then
5216
 
              dnl And also check for a libjvm.so somewhere under there
5217
 
              dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
5218
 
              if test "$dir" != "/usr/bin"; then
5219
 
                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5220
 
                  if test ! -f $libjvmdir/libjvm.so; then continue; fi
5221
 
                  jredirs="$jredirs $dir"
5222
 
              fi
5223
 
          fi
5224
 
      done
5225
 
 
5226
 
      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
5227
 
      JAVAC=
5228
 
      JAVA=
5229
 
      kde_java_bindir=no
5230
 
      for dir in $jredirs; do
5231
 
          JAVA="$dir/java"
5232
 
          kde_java_bindir=$dir
5233
 
          if test -x "$dir/javac"; then
5234
 
                JAVAC="$dir/javac"
5235
 
                break
5236
 
          fi
5237
 
      done
5238
 
 
5239
 
      if test -n "$JAVAC"; then
5240
 
          dnl this substitution might not work - well, we test for jni.h below
5241
 
          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
5242
 
      else
5243
 
          kde_java_includedir=no
5244
 
      fi
5245
 
  else
5246
 
    dnl config option set
5247
 
    kde_java_bindir=$ac_java_dir/bin
5248
 
    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
5249
 
        kde_java_includedir=no
5250
 
    else
5251
 
        kde_java_includedir=$ac_java_dir/include
5252
 
    fi
5253
 
  fi
5254
 
fi
5255
 
 
5256
 
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
5257
 
if test "x$kde_java_bindir" != "xno"; then
5258
 
 
5259
 
  dnl Look for libjvm.so
5260
 
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5261
 
  dnl Look for libgcj.so
5262
 
  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5263
 
  dnl Look for libhpi.so and avoid green threads
5264
 
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5265
 
 
5266
 
  dnl Now check everything's fine under there
5267
 
  dnl the include dir is our flag for having the JDK
5268
 
  if test -d "$kde_java_includedir"; then
5269
 
    if test ! -x "$kde_java_bindir/javac"; then
5270
 
      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
5271
 
    fi
5272
 
    if test ! -x "$kde_java_bindir/javah"; then
5273
 
      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5274
 
    fi
5275
 
    if test ! -x "$kde_java_bindir/jar"; then
5276
 
      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5277
 
    fi
5278
 
    if test ! -r "$kde_java_includedir/jni.h"; then
5279
 
      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
5280
 
    fi
5281
 
 
5282
 
    jni_includes="-I$kde_java_includedir"
5283
 
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5284
 
    dnl and under linux here.. 
5285
 
    
5286
 
    dnl not needed for gcj
5287
 
 
5288
 
    if test "x$kde_java_libgcjdir" = "x"; then 
5289
 
      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5290
 
      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5291
 
      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5292
 
    fi
5293
 
 
5294
 
  else
5295
 
    JAVAC=
5296
 
    jni_includes=
5297
 
  fi
5298
 
 
5299
 
  if test "x$kde_java_libgcjdir" = "x"; then 
5300
 
     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5301
 
        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5302
 
     fi 
5303
 
  else
5304
 
     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5305
 
        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5306
 
     fi 
5307
 
  fi
5308
 
 
5309
 
  if test ! -x "$kde_java_bindir/java"; then
5310
 
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5311
 
  fi
5312
 
 
5313
 
  dnl not needed for gcj compile
5314
 
 
5315
 
  if test "x$kde_java_libgcjdir" = "x"; then 
5316
 
      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5317
 
        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5318
 
      fi
5319
 
  fi
5320
 
 
5321
 
  if test -n "$jni_includes"; then
5322
 
    dnl Check for JNI version
5323
 
    AC_LANG_SAVE
5324
 
    AC_LANG_CPLUSPLUS
5325
 
    ac_cxxflags_safe="$CXXFLAGS"
5326
 
    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
5327
 
 
5328
 
    AC_TRY_COMPILE([
5329
 
  #include <jni.h>
5330
 
              ],
5331
 
              [
5332
 
  #ifndef JNI_VERSION_1_2
5333
 
  Syntax Error
5334
 
  #endif
5335
 
              ],[ kde_jni_works=yes ],
5336
 
              [ kde_jni_works=no ])
5337
 
 
5338
 
    if test $kde_jni_works = no; then
5339
 
      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
5340
 
                    You need to have Java Development Kit (JDK) version 1.2. 
5341
 
 
5342
 
                    Use --with-java to specify another location.
5343
 
                    Use --without-java to configure without java support.
5344
 
                    Or download a newer JDK and try again. 
5345
 
                    See e.g. http://java.sun.com/products/jdk/1.2 ])
5346
 
    fi
5347
 
 
5348
 
    CXXFLAGS="$ac_cxxflags_safe"    
5349
 
    AC_LANG_RESTORE
5350
 
 
5351
 
    dnl All tests ok, inform and subst the variables
5352
 
 
5353
 
    JAVAC=$kde_java_bindir/javac
5354
 
    JAVAH=$kde_java_bindir/javah
5355
 
    JAR=$kde_java_bindir/jar
5356
 
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5357
 
    if test "x$kde_java_libgcjdir" = "x"; then 
5358
 
      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5359
 
    else
5360
 
      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5361
 
    fi
5362
 
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
5363
 
 
5364
 
  else
5365
 
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5366
 
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
5367
 
  fi
5368
 
elif test -d "/Library/Java/Home"; then
5369
 
  kde_java_bindir="/Library/Java/Home/bin"
5370
 
  jni_includes="-I/Library/Java/Home/include"
5371
 
 
5372
 
  JAVAC=$kde_java_bindir/javac
5373
 
  JAVAH=$kde_java_bindir/javah
5374
 
  JAR=$kde_java_bindir/jar
5375
 
  JVMLIBS="-Wl,-framework,JavaVM"
5376
 
 
5377
 
  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5378
 
  AC_MSG_RESULT([Apple Java Framework])
5379
 
else
5380
 
  AC_MSG_RESULT([none found])
5381
 
fi
5382
 
 
5383
 
AC_SUBST(JAVAC)
5384
 
AC_SUBST(JAVAH)
5385
 
AC_SUBST(JAR)
5386
 
AC_SUBST(JVMLIBS)
5387
 
AC_SUBST(jni_includes)
5388
 
 
5389
 
# for backward compat
5390
 
kde_cv_java_includedir=$kde_java_includedir
5391
 
kde_cv_java_bindir=$kde_java_bindir
5392
 
])
5393
 
 
5394
 
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
5395
 
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
5396
 
dnl big packages, m4_foreach is dog-slow.  So use our own version of
5397
 
dnl it.  (matz@kde.org)
5398
 
m4_define([mm_foreach],
5399
 
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
5400
 
m4_define([mm_car], [[$1]])
5401
 
m4_define([mm_car2], [[$@]])
5402
 
m4_define([_mm_foreach],
5403
 
[m4_if(m4_quote($2), [], [],
5404
 
       [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5405
 
                                                   mm_car2(m4_shift($2)),
5406
 
                                                   [$3])])])
5407
 
m4_define([AC_FOREACH],
5408
 
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5409
 
 
5410
 
AC_DEFUN([KDE_NEED_FLEX],
5411
 
[
5412
 
kde_libs_safe=$LIBS
5413
 
LIBS="$LIBS $USER_LDFLAGS"
5414
 
AM_PROG_LEX
5415
 
LIBS=$kde_libs_safe
5416
 
if test -z "$LEXLIB"; then
5417
 
    AC_MSG_ERROR([You need to have flex installed.])
5418
 
fi
5419
 
AC_SUBST(LEXLIB)
5420
 
])
5421
 
 
5422
 
AC_DEFUN([AC_PATH_QTOPIA],
5423
 
[
5424
 
  dnl TODO: use AC_CACHE_VAL
5425
 
 
5426
 
  if test -z "$1"; then
5427
 
    qtopia_minver_maj=1
5428
 
    qtopia_minver_min=5
5429
 
    qtopia_minver_pat=0
5430
 
  else
5431
 
    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5432
 
    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5433
 
    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5434
 
  fi
5435
 
 
5436
 
  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5437
 
  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5438
 
 
5439
 
  AC_REQUIRE([AC_PATH_QT])
5440
 
 
5441
 
  AC_MSG_CHECKING([for Qtopia])
5442
 
 
5443
 
  LIB_QTOPIA="-lqpe"
5444
 
  AC_SUBST(LIB_QTOPIA)
5445
 
 
5446
 
  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5447
 
 
5448
 
  ac_qtopia_incdir=NO
5449
 
 
5450
 
  AC_ARG_WITH(qtopia-dir,
5451
 
              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
5452
 
              [  ac_qtopia_incdir="$withval"/include] ) 
5453
 
  
5454
 
  qtopia_incdirs=""
5455
 
  for dir in $kde_qtopia_dirs; do
5456
 
    qtopia_incdirs="$qtopia_incdirs $dir/include"
5457
 
  done
5458
 
 
5459
 
  if test ! "$ac_qtopia_incdir" = "NO"; then
5460
 
    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5461
 
  fi
5462
 
 
5463
 
  qtopia_incdir=""
5464
 
  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5465
 
  ac_qtopia_incdir="$qtopia_incdir"
5466
 
 
5467
 
  if test -z "$qtopia_incdir"; then
5468
 
    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5469
 
  fi
5470
 
 
5471
 
  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5472
 
  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5473
 
  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5474
 
 
5475
 
  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5476
 
  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5477
 
  if test "$qtopia_ver" -lt "$qtopia_minver"; then
5478
 
    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5479
 
is required.])
5480
 
  fi
5481
 
 
5482
 
  AC_LANG_SAVE
5483
 
  AC_LANG_CPLUSPLUS
5484
 
 
5485
 
  ac_cxxflags_safe="$CXXFLAGS"
5486
 
  ac_ldflags_safe="$LDFLAGS"
5487
 
  ac_libs_safe="$LIBS"
5488
 
 
5489
 
  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5490
 
  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5491
 
  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5492
 
 
5493
 
  cat > conftest.$ac_ext <<EOF
5494
 
#include "confdefs.h"
5495
 
#include <qpe/qpeapplication.h>
5496
 
#include <qpe/version.h>
5497
 
 
5498
 
int main( int argc, char **argv )
5499
 
{
5500
 
    QPEApplication app( argc, argv );
5501
 
    return 0;
5502
 
}
5503
 
EOF
5504
 
 
5505
 
  if AC_TRY_EVAL(ac_link) && test -s conftest; then
5506
 
    rm -f conftest*
5507
 
  else
5508
 
    rm -f conftest*
5509
 
    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5510
 
the end of config.log])
5511
 
  fi
5512
 
 
5513
 
  CXXFLAGS="$ac_cxxflags_safe"
5514
 
  LDFLAGS="$ac_ldflags_safe"
5515
 
  LIBS="$ac_libs_safe"
5516
 
 
5517
 
  AC_LANG_RESTORE
5518
 
 
5519
 
  QTOPIA_INCLUDES="-I$qtopia_incdir"
5520
 
  AC_SUBST(QTOPIA_INCLUDES)
5521
 
 
5522
 
  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5523
 
])
5524
 
 
5525
 
 
5526
 
AC_DEFUN([KDE_INIT_DOXYGEN],
5527
 
[
5528
 
AC_MSG_CHECKING([for Qt docs])
5529
 
kde_qtdir=
5530
 
if test "${with_qt_dir+set}" = set; then
5531
 
  kde_qtdir="$with_qt_dir"
5532
 
fi
5533
 
 
5534
 
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)
5535
 
AC_MSG_RESULT($QTDOCDIR)
5536
 
 
5537
 
AC_SUBST(QTDOCDIR)
5538
 
 
5539
 
KDE_FIND_PATH(dot, DOT, [], [])
5540
 
if test -n "$DOT"; then
5541
 
  KDE_HAVE_DOT="YES"
5542
 
else
5543
 
  KDE_HAVE_DOT="NO"
5544
 
fi
5545
 
AC_SUBST(KDE_HAVE_DOT)
5546
 
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5547
 
AC_SUBST(DOXYGEN)
5548
 
 
5549
 
DOXYGEN_PROJECT_NAME="$1"
5550
 
DOXYGEN_PROJECT_NUMBER="$2"
5551
 
AC_SUBST(DOXYGEN_PROJECT_NAME)
5552
 
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5553
 
 
5554
 
KDE_HAS_DOXYGEN=no
5555
 
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5556
 
  KDE_HAS_DOXYGEN=yes
5557
 
fi
5558
 
AC_SUBST(KDE_HAS_DOXYGEN)
5559
 
 
5560
 
])
5561
 
 
5562
 
 
5563
 
AC_DEFUN([AC_FIND_BZIP2],
5564
 
[
5565
 
AC_MSG_CHECKING([for bzDecompress in libbz2])
5566
 
AC_CACHE_VAL(ac_cv_lib_bzip2,
5567
 
[
5568
 
AC_LANG_SAVE
5569
 
AC_LANG_CPLUSPLUS
5570
 
kde_save_LIBS="$LIBS"
5571
 
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5572
 
kde_save_CXXFLAGS="$CXXFLAGS"
5573
 
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5574
 
AC_TRY_LINK(dnl
5575
 
[
5576
 
#define BZ_NO_STDIO
5577
 
#include<bzlib.h>
5578
 
],
5579
 
            [ bz_stream s; (void) bzDecompress(&s); ],
5580
 
            eval "ac_cv_lib_bzip2='-lbz2'",
5581
 
            eval "ac_cv_lib_bzip2=no")
5582
 
LIBS="$kde_save_LIBS"
5583
 
CXXFLAGS="$kde_save_CXXFLAGS"
5584
 
AC_LANG_RESTORE
5585
 
])dnl
5586
 
AC_MSG_RESULT($ac_cv_lib_bzip2)
5587
 
 
5588
 
if test ! "$ac_cv_lib_bzip2" = no; then
5589
 
  BZIP2DIR=bzip2
5590
 
 
5591
 
  LIBBZ2="$ac_cv_lib_bzip2"
5592
 
  AC_SUBST(LIBBZ2)
5593
 
 
5594
 
else
5595
 
 
5596
 
   cxx_shared_flag=
5597
 
   ld_shared_flag=
5598
 
   KDE_CHECK_COMPILER_FLAG(shared, [
5599
 
        ld_shared_flag="-shared"
5600
 
   ])
5601
 
   KDE_CHECK_COMPILER_FLAG(fPIC, [
5602
 
        cxx_shared_flag="-fPIC"
5603
 
   ])
5604
 
 
5605
 
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5606
 
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5607
 
   [
5608
 
   AC_LANG_SAVE
5609
 
   AC_LANG_CPLUSPLUS
5610
 
   kde_save_LIBS="$LIBS"
5611
 
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5612
 
   kde_save_CXXFLAGS="$CXXFLAGS"
5613
 
   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5614
 
 
5615
 
   AC_TRY_LINK(dnl
5616
 
   [
5617
 
   #define BZ_NO_STDIO
5618
 
   #include<bzlib.h>
5619
 
   ],
5620
 
               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5621
 
               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5622
 
               eval "ac_cv_lib_bzip2_prefix=no")
5623
 
   LIBS="$kde_save_LIBS"
5624
 
   CXXFLAGS="$kde_save_CXXFLAGS"
5625
 
   AC_LANG_RESTORE
5626
 
   ])dnl
5627
 
 
5628
 
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5629
 
   
5630
 
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5631
 
     BZIP2DIR=bzip2
5632
 
    
5633
 
     LIBBZ2="$ac_cv_lib_bzip2_prefix"
5634
 
     AC_SUBST(LIBBZ2)
5635
 
 
5636
 
     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5637
 
   dnl else, we just ignore this
5638
 
   fi
5639
 
 
5640
 
fi
5641
 
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5642
 
])
5643
 
 
5644
 
dnl ------------------------------------------------------------------------
5645
 
dnl Try to find the SSL headers and libraries.
5646
 
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5647
 
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5648
 
dnl ------------------------------------------------------------------------
5649
 
dnl
5650
 
AC_DEFUN([KDE_CHECK_SSL],
5651
 
[
5652
 
LIBSSL="-lssl -lcrypto"
5653
 
AC_REQUIRE([KDE_CHECK_LIB64])
5654
 
 
5655
 
ac_ssl_includes=NO ac_ssl_libraries=NO
5656
 
ssl_libraries=""
5657
 
ssl_includes=""
5658
 
AC_ARG_WITH(ssl-dir,
5659
 
    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5660
 
    [  ac_ssl_includes="$withval"/include
5661
 
       ac_ssl_libraries="$withval"/lib$kdelibsuff
5662
 
    ])
5663
 
 
5664
 
want_ssl=yes
5665
 
AC_ARG_WITH(ssl,
5666
 
    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5667
 
    [want_ssl=$withval])
5668
 
 
5669
 
if test $want_ssl = yes; then
5670
 
 
5671
 
AC_MSG_CHECKING(for OpenSSL)
5672
 
 
5673
 
AC_CACHE_VAL(ac_cv_have_ssl,
5674
 
[#try to guess OpenSSL locations
5675
 
  
5676
 
  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5677
 
  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5678
 
  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5679
 
  ac_ssl_includes="$ssl_incdir"
5680
 
 
5681
 
  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"
5682
 
  if test ! "$ac_ssl_libraries" = "NO"; then
5683
 
    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5684
 
  fi
5685
 
 
5686
 
  test=NONE
5687
 
  ssl_libdir=NONE
5688
 
  for dir in $ssl_libdirs; do
5689
 
    try="ls -1 $dir/libssl*"
5690
 
    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5691
 
  done
5692
 
 
5693
 
  ac_ssl_libraries="$ssl_libdir"
5694
 
 
5695
 
  ac_ldflags_safe="$LDFLAGS"
5696
 
  ac_libs_safe="$LIBS"
5697
 
 
5698
 
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5699
 
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5700
 
 
5701
 
  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5702
 
  ac_ssl_rsaref="yes"
5703
 
  ,
5704
 
  ac_ssl_rsaref="no"
5705
 
  )
5706
 
 
5707
 
  LDFLAGS="$ac_ldflags_safe"
5708
 
  LIBS="$ac_libs_safe"
5709
 
 
5710
 
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5711
 
    have_ssl=no
5712
 
  else
5713
 
    have_ssl=yes;
5714
 
  fi
5715
 
 
5716
 
  ])
5717
 
 
5718
 
  eval "$ac_cv_have_ssl"
5719
 
 
5720
 
  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5721
 
 
5722
 
  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5723
 
  AC_MSG_RESULT($ac_ssl_rsaref)
5724
 
 
5725
 
  AC_MSG_CHECKING([for easter eggs])
5726
 
  AC_MSG_RESULT([none found])
5727
 
 
5728
 
else
5729
 
  have_ssl=no
5730
 
fi
5731
 
 
5732
 
if test "$have_ssl" = yes; then
5733
 
  AC_MSG_CHECKING(for OpenSSL version)
5734
 
  dnl Check for SSL version
5735
 
  AC_CACHE_VAL(ac_cv_ssl_version,
5736
 
  [
5737
 
 
5738
 
    cat >conftest.$ac_ext <<EOF
5739
 
#include <openssl/opensslv.h>
5740
 
#include <stdio.h>
5741
 
    int main() {
5742
 
 
5743
 
#ifndef OPENSSL_VERSION_NUMBER
5744
 
      printf("ssl_version=\\"error\\"\n");
5745
 
#else
5746
 
      if (OPENSSL_VERSION_NUMBER < 0x00906000)
5747
 
        printf("ssl_version=\\"old\\"\n");
5748
 
      else
5749
 
        printf("ssl_version=\\"ok\\"\n");
5750
 
#endif
5751
 
     return (0);
5752
 
    }
5753
 
EOF
5754
 
 
5755
 
    ac_save_CPPFLAGS=$CPPFLAGS
5756
 
    if test "$ac_ssl_includes" != "/usr/include"; then
5757
 
        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5758
 
    fi
5759
 
 
5760
 
    if AC_TRY_EVAL(ac_link); then 
5761
 
 
5762
 
      if eval `./conftest 2>&5`; then
5763
 
        if test $ssl_version = error; then
5764
 
          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5765
 
        else
5766
 
          if test $ssl_version = old; then
5767
 
            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5768
 
            have_ssl=no
5769
 
          fi
5770
 
        fi
5771
 
        ac_cv_ssl_version="ssl_version=$ssl_version"
5772
 
      else
5773
 
        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5774
 
        Check config.log, and if you can't figure it out, send a mail to 
5775
 
        David Faure <faure@kde.org>, attaching your config.log])
5776
 
      fi
5777
 
 
5778
 
    else
5779
 
      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5780
 
      Check config.log, and if you can't figure it out, send a mail to 
5781
 
      David Faure <faure@kde.org>, attaching your config.log])
5782
 
    fi 
5783
 
    CPPFLAGS=$ac_save_CPPFLAGS
5784
 
 
5785
 
  ])
5786
 
 
5787
 
  eval "$ac_cv_ssl_version"
5788
 
  AC_MSG_RESULT($ssl_version)
5789
 
fi
5790
 
 
5791
 
if test "$have_ssl" != yes; then
5792
 
  LIBSSL="";
5793
 
else
5794
 
  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5795
 
  ac_cv_have_ssl="have_ssl=yes \
5796
 
    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5797
 
  
5798
 
  
5799
 
  ssl_libraries="$ac_ssl_libraries"
5800
 
  ssl_includes="$ac_ssl_includes"
5801
 
 
5802
 
  if test "$ac_ssl_rsaref" = yes; then
5803
 
    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
5804
 
  fi
5805
 
 
5806
 
  if test $ssl_version = "old"; then
5807
 
    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5808
 
  fi
5809
 
fi
5810
 
 
5811
 
SSL_INCLUDES=
5812
 
 
5813
 
if test "$ssl_includes" = "/usr/include"; then
5814
 
  if test -f /usr/kerberos/include/krb5.h; then
5815
 
        SSL_INCLUDES="-I/usr/kerberos/include"
5816
 
  fi
5817
 
elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5818
 
  SSL_INCLUDES="-I$ssl_includes"
5819
 
fi
5820
 
 
5821
 
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5822
 
 SSL_LDFLAGS=""
5823
 
else
5824
 
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5825
 
fi
5826
 
 
5827
 
AC_SUBST(SSL_INCLUDES)
5828
 
AC_SUBST(SSL_LDFLAGS)
5829
 
AC_SUBST(LIBSSL)
5830
 
])
5831
 
 
5832
 
AC_DEFUN([KDE_CHECK_STRLCPY],
5833
 
[
5834
 
  AC_REQUIRE([AC_CHECK_STRLCAT])
5835
 
  AC_REQUIRE([AC_CHECK_STRLCPY])
5836
 
  AC_CHECK_SIZEOF(size_t)
5837
 
  AC_CHECK_SIZEOF(unsigned long)
5838
 
 
5839
 
  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5840
 
  AC_TRY_COMPILE(,[
5841
 
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5842
 
       choke me
5843
 
    #endif
5844
 
    ],AC_MSG_RESULT([yes]),[
5845
 
      AC_MSG_RESULT(no)
5846
 
      AC_MSG_ERROR([
5847
 
       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
5848
 
       does not apply. Please mail kde-devel@kde.org with a description of your system!
5849
 
      ])
5850
 
  ])
5851
 
])
5852
 
 
5853
 
AC_DEFUN([KDE_CHECK_BINUTILS],
5854
 
[
5855
 
  AC_MSG_CHECKING([if ld supports unversioned version maps])
5856
 
 
5857
 
  kde_save_LDFLAGS="$LDFLAGS"
5858
 
  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5859
 
  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5860
 
  AC_TRY_LINK([int foo;],
5861
 
[
5862
 
#ifdef __INTEL_COMPILER
5863
 
icc apparently does not support libtools version-info and version-script
5864
 
at the same time. Dunno where the bug is, but until somebody figured out,
5865
 
better disable the optional version scripts.
5866
 
#endif
5867
 
 
5868
 
  foo = 42;
5869
 
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5870
 
  LDFLAGS="$kde_save_LDFLAGS"
5871
 
  rm -f conftest.map
5872
 
  AM_CONDITIONAL(include_VERSION_SCRIPT, 
5873
 
    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5874
 
 
5875
 
  AC_MSG_RESULT($kde_supports_versionmaps)
5876
 
])
5877
 
 
5878
 
AC_DEFUN([AM_PROG_OBJC],[
5879
 
AC_CHECK_PROGS(OBJC, gcc, gcc)
5880
 
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5881
 
if test "x${OBJCFLAGS-unset}" = xunset; then
5882
 
   OBJCFLAGS="-g -O2"
5883
 
fi
5884
 
AC_SUBST(OBJCFLAGS)
5885
 
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5886
 
])
5887
 
 
5888
 
AC_DEFUN([KDE_CHECK_PERL],
5889
 
[
5890
 
        KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5891
 
                    AC_MSG_ERROR([No Perl found in your $PATH.
5892
 
We need perl to generate some code.])
5893
 
        ])
5894
 
    AC_SUBST(PERL)
5895
 
])
5896
 
 
5897
 
AC_DEFUN([KDE_CHECK_LARGEFILE],
5898
 
[
5899
 
AC_SYS_LARGEFILE
5900
 
if test "$ac_cv_sys_file_offset_bits" != no; then
5901
 
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5902
 
fi
5903
 
 
5904
 
if test "x$ac_cv_sys_large_files" != "xno"; then
5905
 
  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5906
 
fi
5907
 
 
5908
 
])
5909
 
 
5910
 
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
5911
 
dnl which allows to search for libs that get installed into the KDE prefix.
5912
 
dnl
5913
 
dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
5914
 
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
5915
 
dnl also defines KSTUFF_PKG_ERRORS on error
5916
 
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5917
 
 
5918
 
   PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5919
 
   if test "$prefix" != "$kde_libs_prefix"; then
5920
 
       PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5921
 
   fi
5922
 
   export PKG_CONFIG_PATH
5923
 
   PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
5924
 
])
5925
 
 
5926
 
 
5927
 
dnl Check for PIE support in the compiler and linker
5928
 
AC_DEFUN([KDE_CHECK_PIE_SUPPORT],
5929
 
[
5930
 
  AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
5931
 
  [
5932
 
    AC_LANG_SAVE
5933
 
    AC_LANG_CPLUSPLUS
5934
 
    safe_CXXFLAGS=$CXXFLAGS
5935
 
    safe_LDFLAGS=$LDFLAGS
5936
 
    CXXFLAGS="$CXXFLAGS -fPIE"
5937
 
    LDFLAGS="$LDFLAGS -pie"
5938
 
 
5939
 
    AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
5940
 
 
5941
 
    CXXFLAGS=$safe_CXXFLAGS
5942
 
    LDFLAGS=$safe_LDFLAGS
5943
 
    AC_LANG_RESTORE
5944
 
  ])
5945
 
 
5946
 
  AC_MSG_CHECKING(if enabling -pie/fPIE support)
5947
 
 
5948
 
  AC_ARG_ENABLE(pie,
5949
 
    AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
5950
 
      [kde_has_pie_support=$enableval],
5951
 
      [kde_has_pie_support=detect])
5952
 
 
5953
 
  if test "$kde_has_pie_support" = "detect"; then
5954
 
    kde_has_pie_support=$kde_cv_val_pie_support
5955
 
  fi
5956
 
 
5957
 
  AC_MSG_RESULT([$kde_has_pie_support])
5958
 
 
5959
 
  KDE_USE_FPIE=""
5960
 
  KDE_USE_PIE=""
5961
 
 
5962
 
  AC_SUBST([KDE_USE_FPIE])
5963
 
  AC_SUBST([KDE_USE_PIE])
5964
 
 
5965
 
  if test "$kde_has_pie_support" = "yes"; then
5966
 
    KDE_USE_FPIE="-fPIE"
5967
 
    KDE_USE_PIE="-pie"
5968
 
  fi
5969
 
])
5970
 
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5971
 
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
5972
 
## Free Software Foundation, Inc.
5973
 
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5974
 
##
5975
 
## This file is free software; the Free Software Foundation gives
5976
 
## unlimited permission to copy and/or distribute it, with or without
5977
 
## modifications, as long as this notice is preserved.
5978
 
 
5979
 
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
5980
 
 
5981
 
 
5982
 
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5983
 
# -----------------------------------------------------------
5984
 
# If this macro is not defined by Autoconf, define it here.
5985
 
m4_ifdef([AC_PROVIDE_IFELSE],
5986
 
         [],
5987
 
         [m4_define([AC_PROVIDE_IFELSE],
5988
 
                 [m4_ifdef([AC_PROVIDE_$1],
5989
 
                           [$2], [$3])])])
5990
 
 
5991
 
 
5992
 
# AC_PROG_LIBTOOL
5993
 
# ---------------
5994
 
AC_DEFUN([AC_PROG_LIBTOOL],
5995
 
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5996
 
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5997
 
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5998
 
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
5999
 
    [AC_LIBTOOL_CXX],
6000
 
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
6001
 
  ])])
6002
 
dnl And a similar setup for Fortran 77 support
6003
 
  AC_PROVIDE_IFELSE([AC_PROG_F77],
6004
 
    [AC_LIBTOOL_F77],
6005
 
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
6006
 
])])
6007
 
 
6008
 
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
6009
 
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
6010
 
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
6011
 
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
6012
 
    [AC_LIBTOOL_GCJ],
6013
 
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
6014
 
      [AC_LIBTOOL_GCJ],
6015
 
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
6016
 
        [AC_LIBTOOL_GCJ],
6017
 
      [ifdef([AC_PROG_GCJ],
6018
 
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6019
 
       ifdef([A][M_PROG_GCJ],
6020
 
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6021
 
       ifdef([LT_AC_PROG_GCJ],
6022
 
             [define([LT_AC_PROG_GCJ],
6023
 
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6024
 
])])# AC_PROG_LIBTOOL
6025
 
 
6026
 
 
6027
 
# _AC_PROG_LIBTOOL
6028
 
# ----------------
6029
 
AC_DEFUN([_AC_PROG_LIBTOOL],
6030
 
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
6031
 
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
6032
 
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
6033
 
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
6034
 
 
6035
 
# This can be used to rebuild libtool when needed
6036
 
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
6037
 
 
6038
 
# Always use our own libtool.
6039
 
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
6040
 
AC_SUBST(LIBTOOL)dnl
6041
 
 
6042
 
# Prevent multiple expansion
6043
 
define([AC_PROG_LIBTOOL], [])
6044
 
])# _AC_PROG_LIBTOOL
6045
 
 
6046
 
 
6047
 
# AC_LIBTOOL_SETUP
6048
 
# ----------------
6049
 
AC_DEFUN([AC_LIBTOOL_SETUP],
6050
 
[AC_PREREQ(2.50)dnl
6051
 
AC_REQUIRE([AC_ENABLE_SHARED])dnl
6052
 
AC_REQUIRE([AC_ENABLE_STATIC])dnl
6053
 
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
6054
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
6055
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6056
 
AC_REQUIRE([AC_PROG_CC])dnl
6057
 
AC_REQUIRE([AC_PROG_LD])dnl
6058
 
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
6059
 
AC_REQUIRE([AC_PROG_NM])dnl
6060
 
 
6061
 
AC_REQUIRE([AC_PROG_LN_S])dnl
6062
 
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
6063
 
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6064
 
AC_REQUIRE([AC_OBJEXT])dnl
6065
 
AC_REQUIRE([AC_EXEEXT])dnl
6066
 
dnl
6067
 
 
6068
 
AC_LIBTOOL_SYS_MAX_CMD_LEN
6069
 
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6070
 
AC_LIBTOOL_OBJDIR
6071
 
 
6072
 
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6073
 
_LT_AC_PROG_ECHO_BACKSLASH
6074
 
 
6075
 
case $host_os in
6076
 
aix3*)
6077
 
  # AIX sometimes has problems with the GCC collect2 program.  For some
6078
 
  # reason, if we set the COLLECT_NAMES environment variable, the problems
6079
 
  # vanish in a puff of smoke.
6080
 
  if test "X${COLLECT_NAMES+set}" != Xset; then
6081
 
    COLLECT_NAMES=
6082
 
    export COLLECT_NAMES
6083
 
  fi
6084
 
  ;;
6085
 
esac
6086
 
 
6087
 
# Sed substitution that helps us do robust quoting.  It backslashifies
6088
 
# metacharacters that are still active within double-quoted strings.
6089
 
Xsed='sed -e 1s/^X//'
6090
 
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
6091
 
 
6092
 
# Same as above, but do not quote variable references.
6093
 
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
6094
 
 
6095
 
# Sed substitution to delay expansion of an escaped shell variable in a
6096
 
# double_quote_subst'ed string.
6097
 
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6098
 
 
6099
 
# Sed substitution to avoid accidental globbing in evaled expressions
6100
 
no_glob_subst='s/\*/\\\*/g'
6101
 
 
6102
 
# Constants:
6103
 
rm="rm -f"
6104
 
 
6105
 
# Global variables:
6106
 
default_ofile=libtool
6107
 
can_build_shared=yes
6108
 
 
6109
 
# All known linkers require a `.a' archive for static linking (except MSVC,
6110
 
# which needs '.lib').
6111
 
libext=a
6112
 
ltmain="$ac_aux_dir/ltmain.sh"
6113
 
ofile="$default_ofile"
6114
 
with_gnu_ld="$lt_cv_prog_gnu_ld"
6115
 
 
6116
 
AC_CHECK_TOOL(AR, ar, false)
6117
 
AC_CHECK_TOOL(RANLIB, ranlib, :)
6118
 
AC_CHECK_TOOL(STRIP, strip, :)
6119
 
 
6120
 
old_CC="$CC"
6121
 
old_CFLAGS="$CFLAGS"
6122
 
 
6123
 
# Set sane defaults for various variables
6124
 
test -z "$AR" && AR=ar
6125
 
test -z "$AR_FLAGS" && AR_FLAGS=cru
6126
 
test -z "$AS" && AS=as
6127
 
test -z "$CC" && CC=cc
6128
 
test -z "$LTCC" && LTCC=$CC
6129
 
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
6130
 
test -z "$DLLTOOL" && DLLTOOL=dlltool
6131
 
test -z "$LD" && LD=ld
6132
 
test -z "$LN_S" && LN_S="ln -s"
6133
 
test -z "$MAGIC_CMD" && MAGIC_CMD=file
6134
 
test -z "$NM" && NM=nm
6135
 
test -z "$SED" && SED=sed
6136
 
test -z "$OBJDUMP" && OBJDUMP=objdump
6137
 
test -z "$RANLIB" && RANLIB=:
6138
 
test -z "$STRIP" && STRIP=:
6139
 
test -z "$ac_objext" && ac_objext=o
6140
 
 
6141
 
# Determine commands to create old-style static archives.
6142
 
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6143
 
old_postinstall_cmds='chmod 644 $oldlib'
6144
 
old_postuninstall_cmds=
6145
 
 
6146
 
if test -n "$RANLIB"; then
6147
 
  case $host_os in
6148
 
  openbsd*)
6149
 
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6150
 
    ;;
6151
 
  *)
6152
 
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6153
 
    ;;
6154
 
  esac
6155
 
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6156
 
fi
6157
 
 
6158
 
_LT_CC_BASENAME([$compiler])
6159
 
 
6160
 
# Only perform the check for file, if the check method requires it
6161
 
case $deplibs_check_method in
6162
 
file_magic*)
6163
 
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6164
 
    AC_PATH_MAGIC
6165
 
  fi
6166
 
  ;;
6167
 
esac
6168
 
 
6169
 
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
6170
 
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6171
 
enable_win32_dll=yes, enable_win32_dll=no)
6172
 
 
6173
 
AC_ARG_ENABLE([libtool-lock],
6174
 
    [AC_HELP_STRING([--disable-libtool-lock],
6175
 
        [avoid locking (might break parallel builds)])])
6176
 
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6177
 
 
6178
 
AC_ARG_WITH([pic],
6179
 
    [AC_HELP_STRING([--with-pic],
6180
 
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
6181
 
    [pic_mode="$withval"],
6182
 
    [pic_mode=default])
6183
 
test -z "$pic_mode" && pic_mode=default
6184
 
 
6185
 
# Use C for the default configuration in the libtool script
6186
 
tagname=
6187
 
AC_LIBTOOL_LANG_C_CONFIG
6188
 
_LT_AC_TAGCONFIG
6189
 
])# AC_LIBTOOL_SETUP
6190
 
 
6191
 
 
6192
 
# _LT_AC_SYS_COMPILER
6193
 
# -------------------
6194
 
AC_DEFUN([_LT_AC_SYS_COMPILER],
6195
 
[AC_REQUIRE([AC_PROG_CC])dnl
6196
 
 
6197
 
# If no C compiler was specified, use CC.
6198
 
LTCC=${LTCC-"$CC"}
6199
 
 
6200
 
# If no C compiler flags were specified, use CFLAGS.
6201
 
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
6202
 
 
6203
 
# Allow CC to be a program name with arguments.
6204
 
compiler=$CC
6205
 
])# _LT_AC_SYS_COMPILER
6206
 
 
6207
 
 
6208
 
# _LT_CC_BASENAME(CC)
6209
 
# -------------------
6210
 
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
6211
 
AC_DEFUN([_LT_CC_BASENAME],
6212
 
[for cc_temp in $1""; do
6213
 
  case $cc_temp in
6214
 
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
6215
 
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
6216
 
    \-*) ;;
6217
 
    *) break;;
6218
 
  esac
6219
 
done
6220
 
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
6221
 
])
6222
 
 
6223
 
 
6224
 
# _LT_COMPILER_BOILERPLATE
6225
 
# ------------------------
6226
 
# Check for compiler boilerplate output or warnings with
6227
 
# the simple compiler test code.
6228
 
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
6229
 
[ac_outfile=conftest.$ac_objext
6230
 
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
6231
 
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
6232
 
_lt_compiler_boilerplate=`cat conftest.err`
6233
 
$rm conftest*
6234
 
])# _LT_COMPILER_BOILERPLATE
6235
 
 
6236
 
 
6237
 
# _LT_LINKER_BOILERPLATE
6238
 
# ----------------------
6239
 
# Check for linker boilerplate output or warnings with
6240
 
# the simple link test code.
6241
 
AC_DEFUN([_LT_LINKER_BOILERPLATE],
6242
 
[ac_outfile=conftest.$ac_objext
6243
 
printf "$lt_simple_link_test_code" >conftest.$ac_ext
6244
 
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
6245
 
_lt_linker_boilerplate=`cat conftest.err`
6246
 
$rm conftest*
6247
 
])# _LT_LINKER_BOILERPLATE
6248
 
 
6249
 
 
6250
 
# _LT_AC_SYS_LIBPATH_AIX
6251
 
# ----------------------
6252
 
# Links a minimal program and checks the executable
6253
 
# for the system default hardcoded library path. In most cases,
6254
 
# this is /usr/lib:/lib, but when the MPI compilers are used
6255
 
# the location of the communication and MPI libs are included too.
6256
 
# If we don't find anything, use the default library path according
6257
 
# to the aix ld manual.
6258
 
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
6259
 
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6260
 
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
6261
 
}'`
6262
 
# Check for a 64-bit object if we didn't find anything.
6263
 
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; }
6264
 
}'`; fi],[])
6265
 
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6266
 
])# _LT_AC_SYS_LIBPATH_AIX
6267
 
 
6268
 
 
6269
 
# _LT_AC_SHELL_INIT(ARG)
6270
 
# ----------------------
6271
 
AC_DEFUN([_LT_AC_SHELL_INIT],
6272
 
[ifdef([AC_DIVERSION_NOTICE],
6273
 
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6274
 
         [AC_DIVERT_PUSH(NOTICE)])
6275
 
$1
6276
 
AC_DIVERT_POP
6277
 
])# _LT_AC_SHELL_INIT
6278
 
 
6279
 
 
6280
 
# _LT_AC_PROG_ECHO_BACKSLASH
6281
 
# --------------------------
6282
 
# Add some code to the start of the generated configure script which
6283
 
# will find an echo command which doesn't interpret backslashes.
6284
 
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
6285
 
[_LT_AC_SHELL_INIT([
6286
 
# Check that we are running under the correct shell.
6287
 
SHELL=${CONFIG_SHELL-/bin/sh}
6288
 
 
6289
 
case X$ECHO in
6290
 
X*--fallback-echo)
6291
 
  # Remove one level of quotation (which was required for Make).
6292
 
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6293
 
  ;;
6294
 
esac
6295
 
 
6296
 
echo=${ECHO-echo}
6297
 
if test "X[$]1" = X--no-reexec; then
6298
 
  # Discard the --no-reexec flag, and continue.
6299
 
  shift
6300
 
elif test "X[$]1" = X--fallback-echo; then
6301
 
  # Avoid inline document here, it may be left over
6302
 
  :
6303
 
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
6304
 
  # Yippee, $echo works!
6305
 
  :
6306
 
else
6307
 
  # Restart under the correct shell.
6308
 
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6309
 
fi
6310
 
 
6311
 
if test "X[$]1" = X--fallback-echo; then
6312
 
  # used as fallback echo
6313
 
  shift
6314
 
  cat <<EOF
6315
 
[$]*
6316
 
EOF
6317
 
  exit 0
6318
 
fi
6319
 
 
6320
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
6321
 
# if CDPATH is set.
6322
 
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
6323
 
 
6324
 
if test -z "$ECHO"; then
6325
 
if test "X${echo_test_string+set}" != Xset; then
6326
 
# find a string as large as possible, as long as the shell can cope with it
6327
 
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6328
 
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6329
 
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
6330
 
       echo_test_string=`eval $cmd` &&
6331
 
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6332
 
    then
6333
 
      break
6334
 
    fi
6335
 
  done
6336
 
fi
6337
 
 
6338
 
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6339
 
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6340
 
   test "X$echo_testing_string" = "X$echo_test_string"; then
6341
 
  :
6342
 
else
6343
 
  # The Solaris, AIX, and Digital Unix default echo programs unquote
6344
 
  # backslashes.  This makes it impossible to quote backslashes using
6345
 
  #   echo "$something" | sed 's/\\/\\\\/g'
6346
 
  #
6347
 
  # So, first we look for a working echo in the user's PATH.
6348
 
 
6349
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6350
 
  for dir in $PATH /usr/ucb; do
6351
 
    IFS="$lt_save_ifs"
6352
 
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6353
 
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6354
 
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6355
 
       test "X$echo_testing_string" = "X$echo_test_string"; then
6356
 
      echo="$dir/echo"
6357
 
      break
6358
 
    fi
6359
 
  done
6360
 
  IFS="$lt_save_ifs"
6361
 
 
6362
 
  if test "X$echo" = Xecho; then
6363
 
    # We didn't find a better echo, so look for alternatives.
6364
 
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6365
 
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6366
 
       test "X$echo_testing_string" = "X$echo_test_string"; then
6367
 
      # This shell has a builtin print -r that does the trick.
6368
 
      echo='print -r'
6369
 
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6370
 
         test "X$CONFIG_SHELL" != X/bin/ksh; then
6371
 
      # If we have ksh, try running configure again with it.
6372
 
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6373
 
      export ORIGINAL_CONFIG_SHELL
6374
 
      CONFIG_SHELL=/bin/ksh
6375
 
      export CONFIG_SHELL
6376
 
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6377
 
    else
6378
 
      # Try using printf.
6379
 
      echo='printf %s\n'
6380
 
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6381
 
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6382
 
         test "X$echo_testing_string" = "X$echo_test_string"; then
6383
 
        # Cool, printf works
6384
 
        :
6385
 
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6386
 
           test "X$echo_testing_string" = 'X\t' &&
6387
 
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6388
 
           test "X$echo_testing_string" = "X$echo_test_string"; then
6389
 
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6390
 
        export CONFIG_SHELL
6391
 
        SHELL="$CONFIG_SHELL"
6392
 
        export SHELL
6393
 
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
6394
 
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6395
 
           test "X$echo_testing_string" = 'X\t' &&
6396
 
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6397
 
           test "X$echo_testing_string" = "X$echo_test_string"; then
6398
 
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
6399
 
      else
6400
 
        # maybe with a smaller string...
6401
 
        prev=:
6402
 
 
6403
 
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6404
 
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6405
 
          then
6406
 
            break
6407
 
          fi
6408
 
          prev="$cmd"
6409
 
        done
6410
 
 
6411
 
        if test "$prev" != 'sed 50q "[$]0"'; then
6412
 
          echo_test_string=`eval $prev`
6413
 
          export echo_test_string
6414
 
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6415
 
        else
6416
 
          # Oops.  We lost completely, so just stick with echo.
6417
 
          echo=echo
6418
 
        fi
6419
 
      fi
6420
 
    fi
6421
 
  fi
6422
 
fi
6423
 
fi
6424
 
 
6425
 
# Copy echo and quote the copy suitably for passing to libtool from
6426
 
# the Makefile, instead of quoting the original, which is used later.
6427
 
ECHO=$echo
6428
 
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6429
 
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6430
 
fi
6431
 
 
6432
 
AC_SUBST(ECHO)
6433
 
])])# _LT_AC_PROG_ECHO_BACKSLASH
6434
 
 
6435
 
 
6436
 
# _LT_AC_LOCK
6437
 
# -----------
6438
 
AC_DEFUN([_LT_AC_LOCK],
6439
 
[AC_ARG_ENABLE([libtool-lock],
6440
 
    [AC_HELP_STRING([--disable-libtool-lock],
6441
 
        [avoid locking (might break parallel builds)])])
6442
 
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6443
 
 
6444
 
# Some flags need to be propagated to the compiler or linker for good
6445
 
# libtool support.
6446
 
case $host in
6447
 
ia64-*-hpux*)
6448
 
  # Find out which ABI we are using.
6449
 
  echo 'int i;' > conftest.$ac_ext
6450
 
  if AC_TRY_EVAL(ac_compile); then
6451
 
    case `/usr/bin/file conftest.$ac_objext` in
6452
 
    *ELF-32*)
6453
 
      HPUX_IA64_MODE="32"
6454
 
      ;;
6455
 
    *ELF-64*)
6456
 
      HPUX_IA64_MODE="64"
6457
 
      ;;
6458
 
    esac
6459
 
  fi
6460
 
  rm -rf conftest*
6461
 
  ;;
6462
 
*-*-irix6*)
6463
 
  # Find out which ABI we are using.
6464
 
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6465
 
  if AC_TRY_EVAL(ac_compile); then
6466
 
   if test "$lt_cv_prog_gnu_ld" = yes; then
6467
 
    case `/usr/bin/file conftest.$ac_objext` in
6468
 
    *32-bit*)
6469
 
      LD="${LD-ld} -melf32bsmip"
6470
 
      ;;
6471
 
    *N32*)
6472
 
      LD="${LD-ld} -melf32bmipn32"
6473
 
      ;;
6474
 
    *64-bit*)
6475
 
      LD="${LD-ld} -melf64bmip"
6476
 
      ;;
6477
 
    esac
6478
 
   else
6479
 
    case `/usr/bin/file conftest.$ac_objext` in
6480
 
    *32-bit*)
6481
 
      LD="${LD-ld} -32"
6482
 
      ;;
6483
 
    *N32*)
6484
 
      LD="${LD-ld} -n32"
6485
 
      ;;
6486
 
    *64-bit*)
6487
 
      LD="${LD-ld} -64"
6488
 
      ;;
6489
 
    esac
6490
 
   fi
6491
 
  fi
6492
 
  rm -rf conftest*
6493
 
  ;;
6494
 
 
6495
 
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6496
 
  # Find out which ABI we are using.
6497
 
  echo 'int i;' > conftest.$ac_ext
6498
 
  if AC_TRY_EVAL(ac_compile); then
6499
 
    case `/usr/bin/file conftest.o` in
6500
 
    *32-bit*)
6501
 
      case $host in
6502
 
        x86_64-*linux*)
6503
 
          LD="${LD-ld} -m elf_i386"
6504
 
          ;;
6505
 
        ppc64-*linux*|powerpc64-*linux*)
6506
 
          LD="${LD-ld} -m elf32ppclinux"
6507
 
          ;;
6508
 
        s390x-*linux*)
6509
 
          LD="${LD-ld} -m elf_s390"
6510
 
          ;;
6511
 
        sparc64-*linux*)
6512
 
          LD="${LD-ld} -m elf32_sparc"
6513
 
          ;;
6514
 
      esac
6515
 
      ;;
6516
 
    *64-bit*)
6517
 
      case $host in
6518
 
        x86_64-*linux*)
6519
 
          LD="${LD-ld} -m elf_x86_64"
6520
 
          ;;
6521
 
        ppc*-*linux*|powerpc*-*linux*)
6522
 
          LD="${LD-ld} -m elf64ppc"
6523
 
          ;;
6524
 
        s390*-*linux*)
6525
 
          LD="${LD-ld} -m elf64_s390"
6526
 
          ;;
6527
 
        sparc*-*linux*)
6528
 
          LD="${LD-ld} -m elf64_sparc"
6529
 
          ;;
6530
 
      esac
6531
 
      ;;
6532
 
    esac
6533
 
  fi
6534
 
  rm -rf conftest*
6535
 
  ;;
6536
 
 
6537
 
*-*-sco3.2v5*)
6538
 
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6539
 
  SAVE_CFLAGS="$CFLAGS"
6540
 
  CFLAGS="$CFLAGS -belf"
6541
 
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6542
 
    [AC_LANG_PUSH(C)
6543
 
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6544
 
     AC_LANG_POP])
6545
 
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6546
 
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6547
 
    CFLAGS="$SAVE_CFLAGS"
6548
 
  fi
6549
 
  ;;
6550
 
sparc*-*solaris*)
6551
 
  # Find out which ABI we are using.
6552
 
  echo 'int i;' > conftest.$ac_ext
6553
 
  if AC_TRY_EVAL(ac_compile); then
6554
 
    case `/usr/bin/file conftest.o` in
6555
 
    *64-bit*)
6556
 
      case $lt_cv_prog_gnu_ld in
6557
 
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
6558
 
      *)    LD="${LD-ld} -64" ;;
6559
 
      esac
6560
 
      ;;
6561
 
    esac
6562
 
  fi
6563
 
  rm -rf conftest*
6564
 
  ;;
6565
 
 
6566
 
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6567
 
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6568
 
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6569
 
  AC_CHECK_TOOL(AS, as, false)
6570
 
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
6571
 
  ;;
6572
 
  ])
6573
 
esac
6574
 
 
6575
 
need_locks="$enable_libtool_lock"
6576
 
 
6577
 
])# _LT_AC_LOCK
6578
 
 
6579
 
 
6580
 
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6581
 
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6582
 
# ----------------------------------------------------------------
6583
 
# Check whether the given compiler option works
6584
 
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6585
 
[AC_REQUIRE([LT_AC_PROG_SED])
6586
 
AC_CACHE_CHECK([$1], [$2],
6587
 
  [$2=no
6588
 
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6589
 
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6590
 
   lt_compiler_flag="$3"
6591
 
   # Insert the option either (1) after the last *FLAGS variable, or
6592
 
   # (2) before a word containing "conftest.", or (3) at the end.
6593
 
   # Note that $ac_compile itself does not contain backslashes and begins
6594
 
   # with a dollar sign (not a hyphen), so the echo should work correctly.
6595
 
   # The option is referenced via a variable to avoid confusing sed.
6596
 
   lt_compile=`echo "$ac_compile" | $SED \
6597
 
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6598
 
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6599
 
   -e 's:$: $lt_compiler_flag:'`
6600
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6601
 
   (eval "$lt_compile" 2>conftest.err)
6602
 
   ac_status=$?
6603
 
   cat conftest.err >&AS_MESSAGE_LOG_FD
6604
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6605
 
   if (exit $ac_status) && test -s "$ac_outfile"; then
6606
 
     # The compiler can only warn and ignore the option if not recognized
6607
 
     # So say no if there are warnings other than the usual output.
6608
 
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
6609
 
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6610
 
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
6611
 
       $2=yes
6612
 
     fi
6613
 
   fi
6614
 
   $rm conftest*
6615
 
])
6616
 
 
6617
 
if test x"[$]$2" = xyes; then
6618
 
    ifelse([$5], , :, [$5])
6619
 
else
6620
 
    ifelse([$6], , :, [$6])
6621
 
fi
6622
 
])# AC_LIBTOOL_COMPILER_OPTION
6623
 
 
6624
 
 
6625
 
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6626
 
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
6627
 
# ------------------------------------------------------------
6628
 
# Check whether the given compiler option works
6629
 
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6630
 
[AC_CACHE_CHECK([$1], [$2],
6631
 
  [$2=no
6632
 
   save_LDFLAGS="$LDFLAGS"
6633
 
   LDFLAGS="$LDFLAGS $3"
6634
 
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
6635
 
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6636
 
     # The linker can only warn and ignore the option if not recognized
6637
 
     # So say no if there are warnings
6638
 
     if test -s conftest.err; then
6639
 
       # Append any errors to the config.log.
6640
 
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
6641
 
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
6642
 
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6643
 
       if diff conftest.exp conftest.er2 >/dev/null; then
6644
 
         $2=yes
6645
 
       fi
6646
 
     else
6647
 
       $2=yes
6648
 
     fi
6649
 
   fi
6650
 
   $rm conftest*
6651
 
   LDFLAGS="$save_LDFLAGS"
6652
 
])
6653
 
 
6654
 
if test x"[$]$2" = xyes; then
6655
 
    ifelse([$4], , :, [$4])
6656
 
else
6657
 
    ifelse([$5], , :, [$5])
6658
 
fi
6659
 
])# AC_LIBTOOL_LINKER_OPTION
6660
 
 
6661
 
 
6662
 
# AC_LIBTOOL_SYS_MAX_CMD_LEN
6663
 
# --------------------------
6664
 
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6665
 
[# find the maximum length of command line arguments
6666
 
AC_MSG_CHECKING([the maximum length of command line arguments])
6667
 
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6668
 
  i=0
6669
 
  teststring="ABCD"
6670
 
 
6671
 
  case $build_os in
6672
 
  msdosdjgpp*)
6673
 
    # On DJGPP, this test can blow up pretty badly due to problems in libc
6674
 
    # (any single argument exceeding 2000 bytes causes a buffer overrun
6675
 
    # during glob expansion).  Even if it were fixed, the result of this
6676
 
    # check would be larger than it should be.
6677
 
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6678
 
    ;;
6679
 
 
6680
 
  gnu*)
6681
 
    # Under GNU Hurd, this test is not required because there is
6682
 
    # no limit to the length of command line arguments.
6683
 
    # Libtool will interpret -1 as no limit whatsoever
6684
 
    lt_cv_sys_max_cmd_len=-1;
6685
 
    ;;
6686
 
 
6687
 
  cygwin* | mingw*)
6688
 
    # On Win9x/ME, this test blows up -- it succeeds, but takes
6689
 
    # about 5 minutes as the teststring grows exponentially.
6690
 
    # Worse, since 9x/ME are not pre-emptively multitasking,
6691
 
    # you end up with a "frozen" computer, even though with patience
6692
 
    # the test eventually succeeds (with a max line length of 256k).
6693
 
    # Instead, let's just punt: use the minimum linelength reported by
6694
 
    # all of the supported platforms: 8192 (on NT/2K/XP).
6695
 
    lt_cv_sys_max_cmd_len=8192;
6696
 
    ;;
6697
 
 
6698
 
  amigaos*)
6699
 
    # On AmigaOS with pdksh, this test takes hours, literally.
6700
 
    # So we just punt and use a minimum line length of 8192.
6701
 
    lt_cv_sys_max_cmd_len=8192;
6702
 
    ;;
6703
 
 
6704
 
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6705
 
    # This has been around since 386BSD, at least.  Likely further.
6706
 
    if test -x /sbin/sysctl; then
6707
 
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6708
 
    elif test -x /usr/sbin/sysctl; then
6709
 
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6710
 
    else
6711
 
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
6712
 
    fi
6713
 
    # And add a safety zone
6714
 
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6715
 
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6716
 
    ;;
6717
 
 
6718
 
  interix*)
6719
 
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
6720
 
    lt_cv_sys_max_cmd_len=196608
6721
 
    ;;
6722
 
 
6723
 
  osf*)
6724
 
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6725
 
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6726
 
    # nice to cause kernel panics so lets avoid the loop below.
6727
 
    # First set a reasonable default.
6728
 
    lt_cv_sys_max_cmd_len=16384
6729
 
    #
6730
 
    if test -x /sbin/sysconfig; then
6731
 
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6732
 
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
6733
 
      esac
6734
 
    fi
6735
 
    ;;
6736
 
  sco3.2v5*)
6737
 
    lt_cv_sys_max_cmd_len=102400
6738
 
    ;;
6739
 
  sysv5* | sco5v6* | sysv4.2uw2*)
6740
 
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6741
 
    if test -n "$kargmax"; then
6742
 
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
6743
 
    else
6744
 
      lt_cv_sys_max_cmd_len=32768
6745
 
    fi
6746
 
    ;;
6747
 
  *)
6748
 
    # If test is not a shell built-in, we'll probably end up computing a
6749
 
    # maximum length that is only half of the actual maximum length, but
6750
 
    # we can't tell.
6751
 
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6752
 
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
6753
 
               = "XX$teststring") >/dev/null 2>&1 &&
6754
 
            new_result=`expr "X$teststring" : ".*" 2>&1` &&
6755
 
            lt_cv_sys_max_cmd_len=$new_result &&
6756
 
            test $i != 17 # 1/2 MB should be enough
6757
 
    do
6758
 
      i=`expr $i + 1`
6759
 
      teststring=$teststring$teststring
6760
 
    done
6761
 
    teststring=
6762
 
    # Add a significant safety factor because C++ compilers can tack on massive
6763
 
    # amounts of additional arguments before passing them to the linker.
6764
 
    # It appears as though 1/2 is a usable value.
6765
 
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6766
 
    ;;
6767
 
  esac
6768
 
])
6769
 
if test -n $lt_cv_sys_max_cmd_len ; then
6770
 
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6771
 
else
6772
 
  AC_MSG_RESULT(none)
6773
 
fi
6774
 
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6775
 
 
6776
 
 
6777
 
# _LT_AC_CHECK_DLFCN
6778
 
# ------------------
6779
 
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6780
 
[AC_CHECK_HEADERS(dlfcn.h)dnl
6781
 
])# _LT_AC_CHECK_DLFCN
6782
 
 
6783
 
 
6784
 
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6785
 
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6786
 
# ---------------------------------------------------------------------
6787
 
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6788
 
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6789
 
if test "$cross_compiling" = yes; then :
6790
 
  [$4]
6791
 
else
6792
 
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6793
 
  lt_status=$lt_dlunknown
6794
 
  cat > conftest.$ac_ext <<EOF
6795
 
[#line __oline__ "configure"
6796
 
#include "confdefs.h"
6797
 
 
6798
 
#if HAVE_DLFCN_H
6799
 
#include <dlfcn.h>
6800
 
#endif
6801
 
 
6802
 
#include <stdio.h>
6803
 
 
6804
 
#ifdef RTLD_GLOBAL
6805
 
#  define LT_DLGLOBAL           RTLD_GLOBAL
6806
 
#else
6807
 
#  ifdef DL_GLOBAL
6808
 
#    define LT_DLGLOBAL         DL_GLOBAL
6809
 
#  else
6810
 
#    define LT_DLGLOBAL         0
6811
 
#  endif
6812
 
#endif
6813
 
 
6814
 
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6815
 
   find out it does not work in some platform. */
6816
 
#ifndef LT_DLLAZY_OR_NOW
6817
 
#  ifdef RTLD_LAZY
6818
 
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6819
 
#  else
6820
 
#    ifdef DL_LAZY
6821
 
#      define LT_DLLAZY_OR_NOW          DL_LAZY
6822
 
#    else
6823
 
#      ifdef RTLD_NOW
6824
 
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
6825
 
#      else
6826
 
#        ifdef DL_NOW
6827
 
#          define LT_DLLAZY_OR_NOW      DL_NOW
6828
 
#        else
6829
 
#          define LT_DLLAZY_OR_NOW      0
6830
 
#        endif
6831
 
#      endif
6832
 
#    endif
6833
 
#  endif
6834
 
#endif
6835
 
 
6836
 
#ifdef __cplusplus
6837
 
extern "C" void exit (int);
6838
 
#endif
6839
 
 
6840
 
void fnord() { int i=42;}
6841
 
int main ()
6842
 
{
6843
 
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6844
 
  int status = $lt_dlunknown;
6845
 
 
6846
 
  if (self)
6847
 
    {
6848
 
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6849
 
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6850
 
      /* dlclose (self); */
6851
 
    }
6852
 
  else
6853
 
    puts (dlerror ());
6854
 
 
6855
 
    exit (status);
6856
 
}]
6857
 
EOF
6858
 
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6859
 
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
6860
 
    lt_status=$?
6861
 
    case x$lt_status in
6862
 
      x$lt_dlno_uscore) $1 ;;
6863
 
      x$lt_dlneed_uscore) $2 ;;
6864
 
      x$lt_dlunknown|x*) $3 ;;
6865
 
    esac
6866
 
  else :
6867
 
    # compilation failed
6868
 
    $3
6869
 
  fi
6870
 
fi
6871
 
rm -fr conftest*
6872
 
])# _LT_AC_TRY_DLOPEN_SELF
6873
 
 
6874
 
 
6875
 
# AC_LIBTOOL_DLOPEN_SELF
6876
 
# ----------------------
6877
 
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6878
 
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6879
 
if test "x$enable_dlopen" != xyes; then
6880
 
  enable_dlopen=unknown
6881
 
  enable_dlopen_self=unknown
6882
 
  enable_dlopen_self_static=unknown
6883
 
else
6884
 
  lt_cv_dlopen=no
6885
 
  lt_cv_dlopen_libs=
6886
 
 
6887
 
  case $host_os in
6888
 
  beos*)
6889
 
    lt_cv_dlopen="load_add_on"
6890
 
    lt_cv_dlopen_libs=
6891
 
    lt_cv_dlopen_self=yes
6892
 
    ;;
6893
 
 
6894
 
  mingw* | pw32*)
6895
 
    lt_cv_dlopen="LoadLibrary"
6896
 
    lt_cv_dlopen_libs=
6897
 
   ;;
6898
 
 
6899
 
  cygwin*)
6900
 
    lt_cv_dlopen="dlopen"
6901
 
    lt_cv_dlopen_libs=
6902
 
   ;;
6903
 
 
6904
 
  darwin*)
6905
 
  # if libdl is installed we need to link against it
6906
 
    AC_CHECK_LIB([dl], [dlopen],
6907
 
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6908
 
    lt_cv_dlopen="dyld"
6909
 
    lt_cv_dlopen_libs=
6910
 
    lt_cv_dlopen_self=yes
6911
 
    ])
6912
 
   ;;
6913
 
 
6914
 
  *)
6915
 
    AC_CHECK_FUNC([shl_load],
6916
 
          [lt_cv_dlopen="shl_load"],
6917
 
      [AC_CHECK_LIB([dld], [shl_load],
6918
 
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6919
 
        [AC_CHECK_FUNC([dlopen],
6920
 
              [lt_cv_dlopen="dlopen"],
6921
 
          [AC_CHECK_LIB([dl], [dlopen],
6922
 
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6923
 
            [AC_CHECK_LIB([svld], [dlopen],
6924
 
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6925
 
              [AC_CHECK_LIB([dld], [dld_link],
6926
 
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6927
 
              ])
6928
 
            ])
6929
 
          ])
6930
 
        ])
6931
 
      ])
6932
 
    ;;
6933
 
  esac
6934
 
 
6935
 
  if test "x$lt_cv_dlopen" != xno; then
6936
 
    enable_dlopen=yes
6937
 
  else
6938
 
    enable_dlopen=no
6939
 
  fi
6940
 
 
6941
 
  case $lt_cv_dlopen in
6942
 
  dlopen)
6943
 
    save_CPPFLAGS="$CPPFLAGS"
6944
 
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6945
 
 
6946
 
    save_LDFLAGS="$LDFLAGS"
6947
 
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6948
 
 
6949
 
    save_LIBS="$LIBS"
6950
 
    LIBS="$lt_cv_dlopen_libs $LIBS"
6951
 
 
6952
 
    AC_CACHE_CHECK([whether a program can dlopen itself],
6953
 
          lt_cv_dlopen_self, [dnl
6954
 
          _LT_AC_TRY_DLOPEN_SELF(
6955
 
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6956
 
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6957
 
    ])
6958
 
 
6959
 
    if test "x$lt_cv_dlopen_self" = xyes; then
6960
 
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
6961
 
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6962
 
          lt_cv_dlopen_self_static, [dnl
6963
 
          _LT_AC_TRY_DLOPEN_SELF(
6964
 
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6965
 
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
6966
 
      ])
6967
 
    fi
6968
 
 
6969
 
    CPPFLAGS="$save_CPPFLAGS"
6970
 
    LDFLAGS="$save_LDFLAGS"
6971
 
    LIBS="$save_LIBS"
6972
 
    ;;
6973
 
  esac
6974
 
 
6975
 
  case $lt_cv_dlopen_self in
6976
 
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6977
 
  *) enable_dlopen_self=unknown ;;
6978
 
  esac
6979
 
 
6980
 
  case $lt_cv_dlopen_self_static in
6981
 
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6982
 
  *) enable_dlopen_self_static=unknown ;;
6983
 
  esac
6984
 
fi
6985
 
])# AC_LIBTOOL_DLOPEN_SELF
6986
 
 
6987
 
 
6988
 
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6989
 
# ---------------------------------
6990
 
# Check to see if options -c and -o are simultaneously supported by compiler
6991
 
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6992
 
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6993
 
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6994
 
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6995
 
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6996
 
   $rm -r conftest 2>/dev/null
6997
 
   mkdir conftest
6998
 
   cd conftest
6999
 
   mkdir out
7000
 
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7001
 
 
7002
 
   lt_compiler_flag="-o out/conftest2.$ac_objext"
7003
 
   # Insert the option either (1) after the last *FLAGS variable, or
7004
 
   # (2) before a word containing "conftest.", or (3) at the end.
7005
 
   # Note that $ac_compile itself does not contain backslashes and begins
7006
 
   # with a dollar sign (not a hyphen), so the echo should work correctly.
7007
 
   lt_compile=`echo "$ac_compile" | $SED \
7008
 
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7009
 
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
7010
 
   -e 's:$: $lt_compiler_flag:'`
7011
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
7012
 
   (eval "$lt_compile" 2>out/conftest.err)
7013
 
   ac_status=$?
7014
 
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
7015
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
7016
 
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
7017
 
   then
7018
 
     # The compiler can only warn and ignore the option if not recognized
7019
 
     # So say no if there are warnings
7020
 
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
7021
 
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
7022
 
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7023
 
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7024
 
     fi
7025
 
   fi
7026
 
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
7027
 
   $rm conftest*
7028
 
   # SGI C++ compiler will create directory out/ii_files/ for
7029
 
   # template instantiation
7030
 
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7031
 
   $rm out/* && rmdir out
7032
 
   cd ..
7033
 
   rmdir conftest
7034
 
   $rm conftest*
7035
 
])
7036
 
])# AC_LIBTOOL_PROG_CC_C_O
7037
 
 
7038
 
 
7039
 
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
7040
 
# -----------------------------------------
7041
 
# Check to see if we can do hard links to lock some files if needed
7042
 
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
7043
 
[AC_REQUIRE([_LT_AC_LOCK])dnl
7044
 
 
7045
 
hard_links="nottested"
7046
 
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
7047
 
  # do not overwrite the value of need_locks provided by the user
7048
 
  AC_MSG_CHECKING([if we can lock with hard links])
7049
 
  hard_links=yes
7050
 
  $rm conftest*
7051
 
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
7052
 
  touch conftest.a
7053
 
  ln conftest.a conftest.b 2>&5 || hard_links=no
7054
 
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
7055
 
  AC_MSG_RESULT([$hard_links])
7056
 
  if test "$hard_links" = no; then
7057
 
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
7058
 
    need_locks=warn
7059
 
  fi
7060
 
else
7061
 
  need_locks=no
7062
 
fi
7063
 
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
7064
 
 
7065
 
 
7066
 
# AC_LIBTOOL_OBJDIR
7067
 
# -----------------
7068
 
AC_DEFUN([AC_LIBTOOL_OBJDIR],
7069
 
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
7070
 
[rm -f .libs 2>/dev/null
7071
 
mkdir .libs 2>/dev/null
7072
 
if test -d .libs; then
7073
 
  lt_cv_objdir=.libs
7074
 
else
7075
 
  # MS-DOS does not allow filenames that begin with a dot.
7076
 
  lt_cv_objdir=_libs
7077
 
fi
7078
 
rmdir .libs 2>/dev/null])
7079
 
objdir=$lt_cv_objdir
7080
 
])# AC_LIBTOOL_OBJDIR
7081
 
 
7082
 
 
7083
 
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
7084
 
# ----------------------------------------------
7085
 
# Check hardcoding attributes.
7086
 
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
7087
 
[AC_MSG_CHECKING([how to hardcode library paths into programs])
7088
 
_LT_AC_TAGVAR(hardcode_action, $1)=
7089
 
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
7090
 
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
7091
 
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
7092
 
 
7093
 
  # We can hardcode non-existant directories.
7094
 
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
7095
 
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
7096
 
     # have to relink, otherwise we might link with an installed library
7097
 
     # when we should be linking with a yet-to-be-installed one
7098
 
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
7099
 
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
7100
 
    # Linking always hardcodes the temporary library directory.
7101
 
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
7102
 
  else
7103
 
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
7104
 
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
7105
 
  fi
7106
 
else
7107
 
  # We cannot hardcode anything, or else we can only hardcode existing
7108
 
  # directories.
7109
 
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
7110
 
fi
7111
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
7112
 
 
7113
 
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
7114
 
  # Fast installation is not supported
7115
 
  enable_fast_install=no
7116
 
elif test "$shlibpath_overrides_runpath" = yes ||
7117
 
     test "$enable_shared" = no; then
7118
 
  # Fast installation is not necessary
7119
 
  enable_fast_install=needless
7120
 
fi
7121
 
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
7122
 
 
7123
 
 
7124
 
# AC_LIBTOOL_SYS_LIB_STRIP
7125
 
# ------------------------
7126
 
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
7127
 
[striplib=
7128
 
old_striplib=
7129
 
AC_MSG_CHECKING([whether stripping libraries is possible])
7130
 
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
7131
 
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
7132
 
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
7133
 
  AC_MSG_RESULT([yes])
7134
 
else
7135
 
# FIXME - insert some real tests, host_os isn't really good enough
7136
 
  case $host_os in
7137
 
   darwin*)
7138
 
       if test -n "$STRIP" ; then
7139
 
         striplib="$STRIP -x"
7140
 
         AC_MSG_RESULT([yes])
7141
 
       else
7142
 
  AC_MSG_RESULT([no])
7143
 
fi
7144
 
       ;;
7145
 
   *)
7146
 
  AC_MSG_RESULT([no])
7147
 
    ;;
7148
 
  esac
7149
 
fi
7150
 
])# AC_LIBTOOL_SYS_LIB_STRIP
7151
 
 
7152
 
 
7153
 
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7154
 
# -----------------------------
7155
 
# PORTME Fill in your ld.so characteristics
7156
 
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
7157
 
[AC_MSG_CHECKING([dynamic linker characteristics])
7158
 
library_names_spec=
7159
 
libname_spec='lib$name'
7160
 
soname_spec=
7161
 
shrext_cmds=".so"
7162
 
postinstall_cmds=
7163
 
postuninstall_cmds=
7164
 
finish_cmds=
7165
 
finish_eval=
7166
 
shlibpath_var=
7167
 
shlibpath_overrides_runpath=unknown
7168
 
version_type=none
7169
 
dynamic_linker="$host_os ld.so"
7170
 
sys_lib_dlsearch_path_spec="/lib /usr/lib"
7171
 
if test "$GCC" = yes; then
7172
 
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
7173
 
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
7174
 
    # if the path contains ";" then we assume it to be the separator
7175
 
    # otherwise default to the standard path separator (i.e. ":") - it is
7176
 
    # assumed that no part of a normal pathname contains ";" but that should
7177
 
    # okay in the real world where ";" in dirpaths is itself problematic.
7178
 
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
7179
 
  else
7180
 
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
7181
 
  fi
7182
 
else
7183
 
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
7184
 
fi
7185
 
need_lib_prefix=unknown
7186
 
hardcode_into_libs=no
7187
 
 
7188
 
# when you set need_version to no, make sure it does not cause -set_version
7189
 
# flags to be left without arguments
7190
 
need_version=unknown
7191
 
 
7192
 
case $host_os in
7193
 
aix3*)
7194
 
  version_type=linux
7195
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
7196
 
  shlibpath_var=LIBPATH
7197
 
 
7198
 
  # AIX 3 has no versioning support, so we append a major version to the name.
7199
 
  soname_spec='${libname}${release}${shared_ext}$major'
7200
 
  ;;
7201
 
 
7202
 
aix4* | aix5*)
7203
 
  version_type=linux
7204
 
  need_lib_prefix=no
7205
 
  need_version=no
7206
 
  hardcode_into_libs=yes
7207
 
  if test "$host_cpu" = ia64; then
7208
 
    # AIX 5 supports IA64
7209
 
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
7210
 
    shlibpath_var=LD_LIBRARY_PATH
7211
 
  else
7212
 
    # With GCC up to 2.95.x, collect2 would create an import file
7213
 
    # for dependence libraries.  The import file would start with
7214
 
    # the line `#! .'.  This would cause the generated library to
7215
 
    # depend on `.', always an invalid library.  This was fixed in
7216
 
    # development snapshots of GCC prior to 3.0.
7217
 
    case $host_os in
7218
 
      aix4 | aix4.[[01]] | aix4.[[01]].*)
7219
 
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
7220
 
           echo ' yes '
7221
 
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
7222
 
        :
7223
 
      else
7224
 
        can_build_shared=no
7225
 
      fi
7226
 
      ;;
7227
 
    esac
7228
 
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
7229
 
    # soname into executable. Probably we can add versioning support to
7230
 
    # collect2, so additional links can be useful in future.
7231
 
    if test "$aix_use_runtimelinking" = yes; then
7232
 
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
7233
 
      # instead of lib<name>.a to let people know that these are not
7234
 
      # typical AIX shared libraries.
7235
 
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7236
 
    else
7237
 
      # We preserve .a as extension for shared libraries through AIX4.2
7238
 
      # and later when we are not doing run time linking.
7239
 
      library_names_spec='${libname}${release}.a $libname.a'
7240
 
      soname_spec='${libname}${release}${shared_ext}$major'
7241
 
    fi
7242
 
    shlibpath_var=LIBPATH
7243
 
  fi
7244
 
  ;;
7245
 
 
7246
 
amigaos*)
7247
 
  library_names_spec='$libname.ixlibrary $libname.a'
7248
 
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
7249
 
  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'
7250
 
  ;;
7251
 
 
7252
 
beos*)
7253
 
  library_names_spec='${libname}${shared_ext}'
7254
 
  dynamic_linker="$host_os ld.so"
7255
 
  shlibpath_var=LIBRARY_PATH
7256
 
  ;;
7257
 
 
7258
 
bsdi[[45]]*)
7259
 
  version_type=linux
7260
 
  need_version=no
7261
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7262
 
  soname_spec='${libname}${release}${shared_ext}$major'
7263
 
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
7264
 
  shlibpath_var=LD_LIBRARY_PATH
7265
 
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
7266
 
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
7267
 
  # the default ld.so.conf also contains /usr/contrib/lib and
7268
 
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
7269
 
  # libtool to hard-code these into programs
7270
 
  ;;
7271
 
 
7272
 
cygwin* | mingw* | pw32*)
7273
 
  version_type=windows
7274
 
  shrext_cmds=".dll"
7275
 
  need_version=no
7276
 
  need_lib_prefix=no
7277
 
 
7278
 
  case $GCC,$host_os in
7279
 
  yes,cygwin* | yes,mingw* | yes,pw32*)
7280
 
    library_names_spec='$libname.dll.a'
7281
 
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
7282
 
    postinstall_cmds='base_file=`basename \${file}`~
7283
 
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
7284
 
      dldir=$destdir/`dirname \$dlpath`~
7285
 
      test -d \$dldir || mkdir -p \$dldir~
7286
 
      $install_prog $dir/$dlname \$dldir/$dlname~
7287
 
      chmod a+x \$dldir/$dlname'
7288
 
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
7289
 
      dlpath=$dir/\$dldll~
7290
 
       $rm \$dlpath'
7291
 
    shlibpath_overrides_runpath=yes
7292
 
 
7293
 
    case $host_os in
7294
 
    cygwin*)
7295
 
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
7296
 
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7297
 
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
7298
 
      ;;
7299
 
    mingw*)
7300
 
      # MinGW DLLs use traditional 'lib' prefix
7301
 
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7302
 
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
7303
 
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
7304
 
        # It is most probably a Windows format PATH printed by
7305
 
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
7306
 
        # path with ; separators, and with drive letters. We can handle the
7307
 
        # drive letters (cygwin fileutils understands them), so leave them,
7308
 
        # especially as we might pass files found there to a mingw objdump,
7309
 
        # which wouldn't understand a cygwinified path. Ahh.
7310
 
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
7311
 
      else
7312
 
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
7313
 
      fi
7314
 
      ;;
7315
 
    pw32*)
7316
 
      # pw32 DLLs use 'pw' prefix rather than 'lib'
7317
 
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7318
 
      ;;
7319
 
    esac
7320
 
    ;;
7321
 
 
7322
 
  *)
7323
 
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
7324
 
    ;;
7325
 
  esac
7326
 
  dynamic_linker='Win32 ld.exe'
7327
 
  # FIXME: first we should search . and the directory the executable is in
7328
 
  shlibpath_var=PATH
7329
 
  ;;
7330
 
 
7331
 
darwin* | rhapsody*)
7332
 
  dynamic_linker="$host_os dyld"
7333
 
  version_type=darwin
7334
 
  need_lib_prefix=no
7335
 
  need_version=no
7336
 
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
7337
 
  soname_spec='${libname}${release}${major}$shared_ext'
7338
 
  shlibpath_overrides_runpath=yes
7339
 
  shlibpath_var=DYLD_LIBRARY_PATH
7340
 
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
7341
 
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
7342
 
  if test "$GCC" = yes; then
7343
 
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
7344
 
  else
7345
 
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
7346
 
  fi
7347
 
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
7348
 
  ;;
7349
 
 
7350
 
dgux*)
7351
 
  version_type=linux
7352
 
  need_lib_prefix=no
7353
 
  need_version=no
7354
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
7355
 
  soname_spec='${libname}${release}${shared_ext}$major'
7356
 
  shlibpath_var=LD_LIBRARY_PATH
7357
 
  ;;
7358
 
 
7359
 
freebsd1*)
7360
 
  dynamic_linker=no
7361
 
  ;;
7362
 
 
7363
 
freebsd* | dragonfly*)
7364
 
  # DragonFly does not have aout.  When/if they implement a new
7365
 
  # versioning mechanism, adjust this.
7366
 
  if test -x /usr/bin/objformat; then
7367
 
    objformat=`/usr/bin/objformat`
7368
 
  else
7369
 
    case $host_os in
7370
 
    freebsd[[123]]*) objformat=aout ;;
7371
 
    *) objformat=elf ;;
7372
 
    esac
7373
 
  fi
7374
 
  version_type=freebsd-$objformat
7375
 
  case $version_type in
7376
 
    freebsd-elf*)
7377
 
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7378
 
      need_version=no
7379
 
      need_lib_prefix=no
7380
 
      ;;
7381
 
    freebsd-*)
7382
 
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
7383
 
      need_version=yes
7384
 
      ;;
7385
 
  esac
7386
 
  shlibpath_var=LD_LIBRARY_PATH
7387
 
  case $host_os in
7388
 
  freebsd2*)
7389
 
    shlibpath_overrides_runpath=yes
7390
 
    ;;
7391
 
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
7392
 
    shlibpath_overrides_runpath=yes
7393
 
    hardcode_into_libs=yes
7394
 
    ;;
7395
 
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
7396
 
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
7397
 
    shlibpath_overrides_runpath=no
7398
 
    hardcode_into_libs=yes
7399
 
    ;;
7400
 
  freebsd*) # from 4.6 on
7401
 
    shlibpath_overrides_runpath=yes
7402
 
    hardcode_into_libs=yes
7403
 
    ;;
7404
 
  esac
7405
 
  ;;
7406
 
 
7407
 
gnu*)
7408
 
  version_type=linux
7409
 
  need_lib_prefix=no
7410
 
  need_version=no
7411
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
7412
 
  soname_spec='${libname}${release}${shared_ext}$major'
7413
 
  shlibpath_var=LD_LIBRARY_PATH
7414
 
  hardcode_into_libs=yes
7415
 
  ;;
7416
 
 
7417
 
hpux9* | hpux10* | hpux11*)
7418
 
  # Give a soname corresponding to the major version so that dld.sl refuses to
7419
 
  # link against other versions.
7420
 
  version_type=sunos
7421
 
  need_lib_prefix=no
7422
 
  need_version=no
7423
 
  case $host_cpu in
7424
 
  ia64*)
7425
 
    shrext_cmds='.so'
7426
 
    hardcode_into_libs=yes
7427
 
    dynamic_linker="$host_os dld.so"
7428
 
    shlibpath_var=LD_LIBRARY_PATH
7429
 
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7430
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7431
 
    soname_spec='${libname}${release}${shared_ext}$major'
7432
 
    if test "X$HPUX_IA64_MODE" = X32; then
7433
 
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
7434
 
    else
7435
 
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
7436
 
    fi
7437
 
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7438
 
    ;;
7439
 
   hppa*64*)
7440
 
     shrext_cmds='.sl'
7441
 
     hardcode_into_libs=yes
7442
 
     dynamic_linker="$host_os dld.sl"
7443
 
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
7444
 
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7445
 
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7446
 
     soname_spec='${libname}${release}${shared_ext}$major'
7447
 
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
7448
 
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7449
 
     ;;
7450
 
   *)
7451
 
    shrext_cmds='.sl'
7452
 
    dynamic_linker="$host_os dld.sl"
7453
 
    shlibpath_var=SHLIB_PATH
7454
 
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7455
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7456
 
    soname_spec='${libname}${release}${shared_ext}$major'
7457
 
    ;;
7458
 
  esac
7459
 
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
7460
 
  postinstall_cmds='chmod 555 $lib'
7461
 
  ;;
7462
 
 
7463
 
interix3*)
7464
 
  version_type=linux
7465
 
  need_lib_prefix=no
7466
 
  need_version=no
7467
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7468
 
  soname_spec='${libname}${release}${shared_ext}$major'
7469
 
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
7470
 
  shlibpath_var=LD_LIBRARY_PATH
7471
 
  shlibpath_overrides_runpath=no
7472
 
  hardcode_into_libs=yes
7473
 
  ;;
7474
 
 
7475
 
irix5* | irix6* | nonstopux*)
7476
 
  case $host_os in
7477
 
    nonstopux*) version_type=nonstopux ;;
7478
 
    *)
7479
 
        if test "$lt_cv_prog_gnu_ld" = yes; then
7480
 
                version_type=linux
7481
 
        else
7482
 
                version_type=irix
7483
 
        fi ;;
7484
 
  esac
7485
 
  need_lib_prefix=no
7486
 
  need_version=no
7487
 
  soname_spec='${libname}${release}${shared_ext}$major'
7488
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7489
 
  case $host_os in
7490
 
  irix5* | nonstopux*)
7491
 
    libsuff= shlibsuff=
7492
 
    ;;
7493
 
  *)
7494
 
    case $LD in # libtool.m4 will add one of these switches to LD
7495
 
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7496
 
      libsuff= shlibsuff= libmagic=32-bit;;
7497
 
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7498
 
      libsuff=32 shlibsuff=N32 libmagic=N32;;
7499
 
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7500
 
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
7501
 
    *) libsuff= shlibsuff= libmagic=never-match;;
7502
 
    esac
7503
 
    ;;
7504
 
  esac
7505
 
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7506
 
  shlibpath_overrides_runpath=no
7507
 
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7508
 
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7509
 
  hardcode_into_libs=yes
7510
 
  ;;
7511
 
 
7512
 
# No shared lib support for Linux oldld, aout, or coff.
7513
 
linux*oldld* | linux*aout* | linux*coff*)
7514
 
  dynamic_linker=no
7515
 
  ;;
7516
 
 
7517
 
# This must be Linux ELF.
7518
 
linux* | k*bsd*-gnu)
7519
 
  version_type=linux
7520
 
  need_lib_prefix=no
7521
 
  need_version=no
7522
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7523
 
  soname_spec='${libname}${release}${shared_ext}$major'
7524
 
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7525
 
  shlibpath_var=LD_LIBRARY_PATH
7526
 
  shlibpath_overrides_runpath=no
7527
 
  # This implies no fast_install, which is unacceptable.
7528
 
  # Some rework will be needed to allow for fast_install
7529
 
  # before this can be enabled.
7530
 
  hardcode_into_libs=yes
7531
 
 
7532
 
  # Append ld.so.conf contents to the search path
7533
 
  if test -f /etc/ld.so.conf; then
7534
 
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
7535
 
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
7536
 
  fi
7537
 
 
7538
 
  # We used to test for /lib/ld.so.1 and disable shared libraries on
7539
 
  # powerpc, because MkLinux only supported shared libraries with the
7540
 
  # GNU dynamic linker.  Since this was broken with cross compilers,
7541
 
  # most powerpc-linux boxes support dynamic linking these days and
7542
 
  # people can always --disable-shared, the test was removed, and we
7543
 
  # assume the GNU/Linux dynamic linker is in use.
7544
 
  dynamic_linker='GNU/Linux ld.so'
7545
 
  ;;
7546
 
 
7547
 
netbsdelf*-gnu)
7548
 
  version_type=linux
7549
 
  need_lib_prefix=no
7550
 
  need_version=no
7551
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7552
 
  soname_spec='${libname}${release}${shared_ext}$major'
7553
 
  shlibpath_var=LD_LIBRARY_PATH
7554
 
  shlibpath_overrides_runpath=no
7555
 
  hardcode_into_libs=yes
7556
 
  dynamic_linker='NetBSD ld.elf_so'
7557
 
  ;;
7558
 
 
7559
 
netbsd*)
7560
 
  version_type=sunos
7561
 
  need_lib_prefix=no
7562
 
  need_version=no
7563
 
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7564
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7565
 
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7566
 
    dynamic_linker='NetBSD (a.out) ld.so'
7567
 
  else
7568
 
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7569
 
    soname_spec='${libname}${release}${shared_ext}$major'
7570
 
    dynamic_linker='NetBSD ld.elf_so'
7571
 
  fi
7572
 
  shlibpath_var=LD_LIBRARY_PATH
7573
 
  shlibpath_overrides_runpath=yes
7574
 
  hardcode_into_libs=yes
7575
 
  ;;
7576
 
 
7577
 
newsos6)
7578
 
  version_type=linux
7579
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7580
 
  shlibpath_var=LD_LIBRARY_PATH
7581
 
  shlibpath_overrides_runpath=yes
7582
 
  ;;
7583
 
 
7584
 
nto-qnx*)
7585
 
  version_type=linux
7586
 
  need_lib_prefix=no
7587
 
  need_version=no
7588
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7589
 
  soname_spec='${libname}${release}${shared_ext}$major'
7590
 
  shlibpath_var=LD_LIBRARY_PATH
7591
 
  shlibpath_overrides_runpath=yes
7592
 
  ;;
7593
 
 
7594
 
openbsd*)
7595
 
  version_type=sunos
7596
 
  sys_lib_dlsearch_path_spec="/usr/lib"
7597
 
  need_lib_prefix=no
7598
 
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
7599
 
  case $host_os in
7600
 
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
7601
 
    *)                         need_version=no  ;;
7602
 
  esac
7603
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7604
 
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7605
 
  shlibpath_var=LD_LIBRARY_PATH
7606
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7607
 
    case $host_os in
7608
 
      openbsd2.[[89]] | openbsd2.[[89]].*)
7609
 
        shlibpath_overrides_runpath=no
7610
 
        ;;
7611
 
      *)
7612
 
        shlibpath_overrides_runpath=yes
7613
 
        ;;
7614
 
      esac
7615
 
  else
7616
 
    shlibpath_overrides_runpath=yes
7617
 
  fi
7618
 
  ;;
7619
 
 
7620
 
os2*)
7621
 
  libname_spec='$name'
7622
 
  shrext_cmds=".dll"
7623
 
  need_lib_prefix=no
7624
 
  library_names_spec='$libname${shared_ext} $libname.a'
7625
 
  dynamic_linker='OS/2 ld.exe'
7626
 
  shlibpath_var=LIBPATH
7627
 
  ;;
7628
 
 
7629
 
osf3* | osf4* | osf5*)
7630
 
  version_type=osf
7631
 
  need_lib_prefix=no
7632
 
  need_version=no
7633
 
  soname_spec='${libname}${release}${shared_ext}$major'
7634
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7635
 
  shlibpath_var=LD_LIBRARY_PATH
7636
 
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7637
 
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7638
 
  ;;
7639
 
 
7640
 
solaris*)
7641
 
  version_type=linux
7642
 
  need_lib_prefix=no
7643
 
  need_version=no
7644
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7645
 
  soname_spec='${libname}${release}${shared_ext}$major'
7646
 
  shlibpath_var=LD_LIBRARY_PATH
7647
 
  shlibpath_overrides_runpath=yes
7648
 
  hardcode_into_libs=yes
7649
 
  # ldd complains unless libraries are executable
7650
 
  postinstall_cmds='chmod +x $lib'
7651
 
  ;;
7652
 
 
7653
 
sunos4*)
7654
 
  version_type=sunos
7655
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7656
 
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7657
 
  shlibpath_var=LD_LIBRARY_PATH
7658
 
  shlibpath_overrides_runpath=yes
7659
 
  if test "$with_gnu_ld" = yes; then
7660
 
    need_lib_prefix=no
7661
 
  fi
7662
 
  need_version=yes
7663
 
  ;;
7664
 
 
7665
 
sysv4 | sysv4.3*)
7666
 
  version_type=linux
7667
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7668
 
  soname_spec='${libname}${release}${shared_ext}$major'
7669
 
  shlibpath_var=LD_LIBRARY_PATH
7670
 
  case $host_vendor in
7671
 
    sni)
7672
 
      shlibpath_overrides_runpath=no
7673
 
      need_lib_prefix=no
7674
 
      export_dynamic_flag_spec='${wl}-Blargedynsym'
7675
 
      runpath_var=LD_RUN_PATH
7676
 
      ;;
7677
 
    siemens)
7678
 
      need_lib_prefix=no
7679
 
      ;;
7680
 
    motorola)
7681
 
      need_lib_prefix=no
7682
 
      need_version=no
7683
 
      shlibpath_overrides_runpath=no
7684
 
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7685
 
      ;;
7686
 
  esac
7687
 
  ;;
7688
 
 
7689
 
sysv4*MP*)
7690
 
  if test -d /usr/nec ;then
7691
 
    version_type=linux
7692
 
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7693
 
    soname_spec='$libname${shared_ext}.$major'
7694
 
    shlibpath_var=LD_LIBRARY_PATH
7695
 
  fi
7696
 
  ;;
7697
 
 
7698
 
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7699
 
  version_type=freebsd-elf
7700
 
  need_lib_prefix=no
7701
 
  need_version=no
7702
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7703
 
  soname_spec='${libname}${release}${shared_ext}$major'
7704
 
  shlibpath_var=LD_LIBRARY_PATH
7705
 
  hardcode_into_libs=yes
7706
 
  if test "$with_gnu_ld" = yes; then
7707
 
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
7708
 
    shlibpath_overrides_runpath=no
7709
 
  else
7710
 
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
7711
 
    shlibpath_overrides_runpath=yes
7712
 
    case $host_os in
7713
 
      sco3.2v5*)
7714
 
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
7715
 
        ;;
7716
 
    esac
7717
 
  fi
7718
 
  sys_lib_dlsearch_path_spec='/usr/lib'
7719
 
  ;;
7720
 
 
7721
 
uts4*)
7722
 
  version_type=linux
7723
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7724
 
  soname_spec='${libname}${release}${shared_ext}$major'
7725
 
  shlibpath_var=LD_LIBRARY_PATH
7726
 
  ;;
7727
 
 
7728
 
*)
7729
 
  dynamic_linker=no
7730
 
  ;;
7731
 
esac
7732
 
AC_MSG_RESULT([$dynamic_linker])
7733
 
test "$dynamic_linker" = no && can_build_shared=no
7734
 
 
7735
 
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7736
 
if test "$GCC" = yes; then
7737
 
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7738
 
fi
7739
 
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7740
 
 
7741
 
 
7742
 
# _LT_AC_TAGCONFIG
7743
 
# ----------------
7744
 
AC_DEFUN([_LT_AC_TAGCONFIG],
7745
 
[AC_ARG_WITH([tags],
7746
 
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7747
 
        [include additional configurations @<:@automatic@:>@])],
7748
 
    [tagnames="$withval"])
7749
 
 
7750
 
if test -f "$ltmain" && test -n "$tagnames"; then
7751
 
  if test ! -f "${ofile}"; then
7752
 
    AC_MSG_WARN([output file `$ofile' does not exist])
7753
 
  fi
7754
 
 
7755
 
  if test -z "$LTCC"; then
7756
 
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7757
 
    if test -z "$LTCC"; then
7758
 
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7759
 
    else
7760
 
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7761
 
    fi
7762
 
  fi
7763
 
  if test -z "$LTCFLAGS"; then
7764
 
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
7765
 
  fi
7766
 
 
7767
 
  # Extract list of available tagged configurations in $ofile.
7768
 
  # Note that this assumes the entire list is on one line.
7769
 
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7770
 
 
7771
 
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7772
 
  for tagname in $tagnames; do
7773
 
    IFS="$lt_save_ifs"
7774
 
    # Check whether tagname contains only valid characters
7775
 
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7776
 
    "") ;;
7777
 
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
7778
 
        ;;
7779
 
    esac
7780
 
 
7781
 
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7782
 
    then
7783
 
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
7784
 
    fi
7785
 
 
7786
 
    # Update the list of available tags.
7787
 
    if test -n "$tagname"; then
7788
 
      echo appending configuration tag \"$tagname\" to $ofile
7789
 
 
7790
 
      case $tagname in
7791
 
      CXX)
7792
 
        if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7793
 
            ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7794
 
            (test "X$CXX" != "Xg++"))) ; then
7795
 
          AC_LIBTOOL_LANG_CXX_CONFIG
7796
 
        else
7797
 
          tagname=""
7798
 
        fi
7799
 
        ;;
7800
 
 
7801
 
      F77)
7802
 
        if test -n "$F77" && test "X$F77" != "Xno"; then
7803
 
          AC_LIBTOOL_LANG_F77_CONFIG
7804
 
        else
7805
 
          tagname=""
7806
 
        fi
7807
 
        ;;
7808
 
 
7809
 
      GCJ)
7810
 
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7811
 
          AC_LIBTOOL_LANG_GCJ_CONFIG
7812
 
        else
7813
 
          tagname=""
7814
 
        fi
7815
 
        ;;
7816
 
 
7817
 
      RC)
7818
 
        AC_LIBTOOL_LANG_RC_CONFIG
7819
 
        ;;
7820
 
 
7821
 
      *)
7822
 
        AC_MSG_ERROR([Unsupported tag name: $tagname])
7823
 
        ;;
7824
 
      esac
7825
 
 
7826
 
      # Append the new tag name to the list of available tags.
7827
 
      if test -n "$tagname" ; then
7828
 
      available_tags="$available_tags $tagname"
7829
 
    fi
7830
 
    fi
7831
 
  done
7832
 
  IFS="$lt_save_ifs"
7833
 
 
7834
 
  # Now substitute the updated list of available tags.
7835
 
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7836
 
    mv "${ofile}T" "$ofile"
7837
 
    chmod +x "$ofile"
7838
 
  else
7839
 
    rm -f "${ofile}T"
7840
 
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
7841
 
  fi
7842
 
fi
7843
 
])# _LT_AC_TAGCONFIG
7844
 
 
7845
 
 
7846
 
# AC_LIBTOOL_DLOPEN
7847
 
# -----------------
7848
 
# enable checks for dlopen support
7849
 
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7850
 
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7851
 
])# AC_LIBTOOL_DLOPEN
7852
 
 
7853
 
 
7854
 
# AC_LIBTOOL_WIN32_DLL
7855
 
# --------------------
7856
 
# declare package support for building win32 DLLs
7857
 
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7858
 
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7859
 
])# AC_LIBTOOL_WIN32_DLL
7860
 
 
7861
 
 
7862
 
# AC_ENABLE_SHARED([DEFAULT])
7863
 
# ---------------------------
7864
 
# implement the --enable-shared flag
7865
 
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7866
 
AC_DEFUN([AC_ENABLE_SHARED],
7867
 
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7868
 
AC_ARG_ENABLE([shared],
7869
 
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7870
 
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7871
 
    [p=${PACKAGE-default}
7872
 
    case $enableval in
7873
 
    yes) enable_shared=yes ;;
7874
 
    no) enable_shared=no ;;
7875
 
    *)
7876
 
      enable_shared=no
7877
 
      # Look at the argument we got.  We use all the common list separators.
7878
 
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7879
 
      for pkg in $enableval; do
7880
 
        IFS="$lt_save_ifs"
7881
 
        if test "X$pkg" = "X$p"; then
7882
 
          enable_shared=yes
7883
 
        fi
7884
 
      done
7885
 
      IFS="$lt_save_ifs"
7886
 
      ;;
7887
 
    esac],
7888
 
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7889
 
])# AC_ENABLE_SHARED
7890
 
 
7891
 
 
7892
 
# AC_DISABLE_SHARED
7893
 
# -----------------
7894
 
# set the default shared flag to --disable-shared
7895
 
AC_DEFUN([AC_DISABLE_SHARED],
7896
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7897
 
AC_ENABLE_SHARED(no)
7898
 
])# AC_DISABLE_SHARED
7899
 
 
7900
 
 
7901
 
# AC_ENABLE_STATIC([DEFAULT])
7902
 
# ---------------------------
7903
 
# implement the --enable-static flag
7904
 
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7905
 
AC_DEFUN([AC_ENABLE_STATIC],
7906
 
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7907
 
AC_ARG_ENABLE([static],
7908
 
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7909
 
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7910
 
    [p=${PACKAGE-default}
7911
 
    case $enableval in
7912
 
    yes) enable_static=yes ;;
7913
 
    no) enable_static=no ;;
7914
 
    *)
7915
 
     enable_static=no
7916
 
      # Look at the argument we got.  We use all the common list separators.
7917
 
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7918
 
      for pkg in $enableval; do
7919
 
        IFS="$lt_save_ifs"
7920
 
        if test "X$pkg" = "X$p"; then
7921
 
          enable_static=yes
7922
 
        fi
7923
 
      done
7924
 
      IFS="$lt_save_ifs"
7925
 
      ;;
7926
 
    esac],
7927
 
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7928
 
])# AC_ENABLE_STATIC
7929
 
 
7930
 
 
7931
 
# AC_DISABLE_STATIC
7932
 
# -----------------
7933
 
# set the default static flag to --disable-static
7934
 
AC_DEFUN([AC_DISABLE_STATIC],
7935
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7936
 
AC_ENABLE_STATIC(no)
7937
 
])# AC_DISABLE_STATIC
7938
 
 
7939
 
 
7940
 
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7941
 
# ---------------------------------
7942
 
# implement the --enable-fast-install flag
7943
 
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7944
 
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7945
 
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7946
 
AC_ARG_ENABLE([fast-install],
7947
 
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7948
 
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7949
 
    [p=${PACKAGE-default}
7950
 
    case $enableval in
7951
 
    yes) enable_fast_install=yes ;;
7952
 
    no) enable_fast_install=no ;;
7953
 
    *)
7954
 
      enable_fast_install=no
7955
 
      # Look at the argument we got.  We use all the common list separators.
7956
 
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7957
 
      for pkg in $enableval; do
7958
 
        IFS="$lt_save_ifs"
7959
 
        if test "X$pkg" = "X$p"; then
7960
 
          enable_fast_install=yes
7961
 
        fi
7962
 
      done
7963
 
      IFS="$lt_save_ifs"
7964
 
      ;;
7965
 
    esac],
7966
 
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7967
 
])# AC_ENABLE_FAST_INSTALL
7968
 
 
7969
 
 
7970
 
# AC_DISABLE_FAST_INSTALL
7971
 
# -----------------------
7972
 
# set the default to --disable-fast-install
7973
 
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7974
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7975
 
AC_ENABLE_FAST_INSTALL(no)
7976
 
])# AC_DISABLE_FAST_INSTALL
7977
 
 
7978
 
 
7979
 
# AC_LIBTOOL_PICMODE([MODE])
7980
 
# --------------------------
7981
 
# implement the --with-pic flag
7982
 
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7983
 
AC_DEFUN([AC_LIBTOOL_PICMODE],
7984
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7985
 
pic_mode=ifelse($#,1,$1,default)
7986
 
])# AC_LIBTOOL_PICMODE
7987
 
 
7988
 
 
7989
 
# AC_PROG_EGREP
7990
 
# -------------
7991
 
# This is predefined starting with Autoconf 2.54, so this conditional
7992
 
# definition can be removed once we require Autoconf 2.54 or later.
7993
 
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7994
 
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7995
 
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7996
 
    then ac_cv_prog_egrep='grep -E'
7997
 
    else ac_cv_prog_egrep='egrep'
7998
 
    fi])
7999
 
 EGREP=$ac_cv_prog_egrep
8000
 
 AC_SUBST([EGREP])
8001
 
])])
8002
 
 
8003
 
 
8004
 
# AC_PATH_TOOL_PREFIX
8005
 
# -------------------
8006
 
# find a file program which can recognise shared library
8007
 
AC_DEFUN([AC_PATH_TOOL_PREFIX],
8008
 
[AC_REQUIRE([AC_PROG_EGREP])dnl
8009
 
AC_MSG_CHECKING([for $1])
8010
 
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
8011
 
[case $MAGIC_CMD in
8012
 
[[\\/*] |  ?:[\\/]*])
8013
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8014
 
  ;;
8015
 
*)
8016
 
  lt_save_MAGIC_CMD="$MAGIC_CMD"
8017
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8018
 
dnl $ac_dummy forces splitting on constant user-supplied paths.
8019
 
dnl POSIX.2 word splitting is done only on the output of word expansions,
8020
 
dnl not every word.  This closes a longstanding sh security hole.
8021
 
  ac_dummy="ifelse([$2], , $PATH, [$2])"
8022
 
  for ac_dir in $ac_dummy; do
8023
 
    IFS="$lt_save_ifs"
8024
 
    test -z "$ac_dir" && ac_dir=.
8025
 
    if test -f $ac_dir/$1; then
8026
 
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
8027
 
      if test -n "$file_magic_test_file"; then
8028
 
        case $deplibs_check_method in
8029
 
        "file_magic "*)
8030
 
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8031
 
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8032
 
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8033
 
            $EGREP "$file_magic_regex" > /dev/null; then
8034
 
            :
8035
 
          else
8036
 
            cat <<EOF 1>&2
8037
 
 
8038
 
*** Warning: the command libtool uses to detect shared libraries,
8039
 
*** $file_magic_cmd, produces output that libtool cannot recognize.
8040
 
*** The result is that libtool may fail to recognize shared libraries
8041
 
*** as such.  This will affect the creation of libtool libraries that
8042
 
*** depend on shared libraries, but programs linked with such libtool
8043
 
*** libraries will work regardless of this problem.  Nevertheless, you
8044
 
*** may want to report the problem to your system manager and/or to
8045
 
*** bug-libtool@gnu.org
8046
 
 
8047
 
EOF
8048
 
          fi ;;
8049
 
        esac
8050
 
      fi
8051
 
      break
8052
 
    fi
8053
 
  done
8054
 
  IFS="$lt_save_ifs"
8055
 
  MAGIC_CMD="$lt_save_MAGIC_CMD"
8056
 
  ;;
8057
 
esac])
8058
 
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8059
 
if test -n "$MAGIC_CMD"; then
8060
 
  AC_MSG_RESULT($MAGIC_CMD)
8061
 
else
8062
 
  AC_MSG_RESULT(no)
8063
 
fi
8064
 
])# AC_PATH_TOOL_PREFIX
8065
 
 
8066
 
 
8067
 
# AC_PATH_MAGIC
8068
 
# -------------
8069
 
# find a file program which can recognise a shared library
8070
 
AC_DEFUN([AC_PATH_MAGIC],
8071
 
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
8072
 
if test -z "$lt_cv_path_MAGIC_CMD"; then
8073
 
  if test -n "$ac_tool_prefix"; then
8074
 
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
8075
 
  else
8076
 
    MAGIC_CMD=:
8077
 
  fi
8078
 
fi
8079
 
])# AC_PATH_MAGIC
8080
 
 
8081
 
 
8082
 
# AC_PROG_LD
8083
 
# ----------
8084
 
# find the pathname to the GNU or non-GNU linker
8085
 
AC_DEFUN([AC_PROG_LD],
8086
 
[AC_ARG_WITH([gnu-ld],
8087
 
    [AC_HELP_STRING([--with-gnu-ld],
8088
 
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
8089
 
    [test "$withval" = no || with_gnu_ld=yes],
8090
 
    [with_gnu_ld=no])
8091
 
AC_REQUIRE([LT_AC_PROG_SED])dnl
8092
 
AC_REQUIRE([AC_PROG_CC])dnl
8093
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
8094
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8095
 
ac_prog=ld
8096
 
if test "$GCC" = yes; then
8097
 
  # Check if gcc -print-prog-name=ld gives a path.
8098
 
  AC_MSG_CHECKING([for ld used by $CC])
8099
 
  case $host in
8100
 
  *-*-mingw*)
8101
 
    # gcc leaves a trailing carriage return which upsets mingw
8102
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8103
 
  *)
8104
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8105
 
  esac
8106
 
  case $ac_prog in
8107
 
    # Accept absolute paths.
8108
 
    [[\\/]]* | ?:[[\\/]]*)
8109
 
      re_direlt='/[[^/]][[^/]]*/\.\./'
8110
 
      # Canonicalize the pathname of ld
8111
 
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
8112
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8113
 
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
8114
 
      done
8115
 
      test -z "$LD" && LD="$ac_prog"
8116
 
      ;;
8117
 
  "")
8118
 
    # If it fails, then pretend we aren't using GCC.
8119
 
    ac_prog=ld
8120
 
    ;;
8121
 
  *)
8122
 
    # If it is relative, then search for the first ld in PATH.
8123
 
    with_gnu_ld=unknown
8124
 
    ;;
8125
 
  esac
8126
 
elif test "$with_gnu_ld" = yes; then
8127
 
  AC_MSG_CHECKING([for GNU ld])
8128
 
else
8129
 
  AC_MSG_CHECKING([for non-GNU ld])
8130
 
fi
8131
 
AC_CACHE_VAL(lt_cv_path_LD,
8132
 
[if test -z "$LD"; then
8133
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8134
 
  for ac_dir in $PATH; do
8135
 
    IFS="$lt_save_ifs"
8136
 
    test -z "$ac_dir" && ac_dir=.
8137
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8138
 
      lt_cv_path_LD="$ac_dir/$ac_prog"
8139
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
8140
 
      # but apparently some variants of GNU ld only accept -v.
8141
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
8142
 
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8143
 
      *GNU* | *'with BFD'*)
8144
 
        test "$with_gnu_ld" != no && break
8145
 
        ;;
8146
 
      *)
8147
 
        test "$with_gnu_ld" != yes && break
8148
 
        ;;
8149
 
      esac
8150
 
    fi
8151
 
  done
8152
 
  IFS="$lt_save_ifs"
8153
 
else
8154
 
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
8155
 
fi])
8156
 
LD="$lt_cv_path_LD"
8157
 
if test -n "$LD"; then
8158
 
  AC_MSG_RESULT($LD)
8159
 
else
8160
 
  AC_MSG_RESULT(no)
8161
 
fi
8162
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
8163
 
AC_PROG_LD_GNU
8164
 
])# AC_PROG_LD
8165
 
 
8166
 
 
8167
 
# AC_PROG_LD_GNU
8168
 
# --------------
8169
 
AC_DEFUN([AC_PROG_LD_GNU],
8170
 
[AC_REQUIRE([AC_PROG_EGREP])dnl
8171
 
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
8172
 
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
8173
 
case `$LD -v 2>&1 </dev/null` in
8174
 
*GNU* | *'with BFD'*)
8175
 
  lt_cv_prog_gnu_ld=yes
8176
 
  ;;
8177
 
*)
8178
 
  lt_cv_prog_gnu_ld=no
8179
 
  ;;
8180
 
esac])
8181
 
with_gnu_ld=$lt_cv_prog_gnu_ld
8182
 
])# AC_PROG_LD_GNU
8183
 
 
8184
 
 
8185
 
# AC_PROG_LD_RELOAD_FLAG
8186
 
# ----------------------
8187
 
# find reload flag for linker
8188
 
#   -- PORTME Some linkers may need a different reload flag.
8189
 
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
8190
 
[AC_CACHE_CHECK([for $LD option to reload object files],
8191
 
  lt_cv_ld_reload_flag,
8192
 
  [lt_cv_ld_reload_flag='-r'])
8193
 
reload_flag=$lt_cv_ld_reload_flag
8194
 
case $reload_flag in
8195
 
"" | " "*) ;;
8196
 
*) reload_flag=" $reload_flag" ;;
8197
 
esac
8198
 
reload_cmds='$LD$reload_flag -o $output$reload_objs'
8199
 
case $host_os in
8200
 
  darwin*)
8201
 
    if test "$GCC" = yes; then
8202
 
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
8203
 
    else
8204
 
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8205
 
    fi
8206
 
    ;;
8207
 
esac
8208
 
])# AC_PROG_LD_RELOAD_FLAG
8209
 
 
8210
 
 
8211
 
# AC_DEPLIBS_CHECK_METHOD
8212
 
# -----------------------
8213
 
# how to check for library dependencies
8214
 
#  -- PORTME fill in with the dynamic library characteristics
8215
 
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
8216
 
[AC_CACHE_CHECK([how to recognise dependent libraries],
8217
 
lt_cv_deplibs_check_method,
8218
 
[lt_cv_file_magic_cmd='$MAGIC_CMD'
8219
 
lt_cv_file_magic_test_file=
8220
 
lt_cv_deplibs_check_method='unknown'
8221
 
# Need to set the preceding variable on all platforms that support
8222
 
# interlibrary dependencies.
8223
 
# 'none' -- dependencies not supported.
8224
 
# `unknown' -- same as none, but documents that we really don't know.
8225
 
# 'pass_all' -- all dependencies passed with no checks.
8226
 
# 'test_compile' -- check by making test program.
8227
 
# 'file_magic [[regex]]' -- check by looking for files in library path
8228
 
# which responds to the $file_magic_cmd with a given extended regex.
8229
 
# If you have `file' or equivalent on your system and you're not sure
8230
 
# whether `pass_all' will *always* work, you probably want this one.
8231
 
 
8232
 
case $host_os in
8233
 
aix4* | aix5*)
8234
 
  lt_cv_deplibs_check_method=pass_all
8235
 
  ;;
8236
 
 
8237
 
beos*)
8238
 
  lt_cv_deplibs_check_method=pass_all
8239
 
  ;;
8240
 
 
8241
 
bsdi[[45]]*)
8242
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
8243
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
8244
 
  lt_cv_file_magic_test_file=/shlib/libc.so
8245
 
  ;;
8246
 
 
8247
 
cygwin*)
8248
 
  # func_win32_libid is a shell function defined in ltmain.sh
8249
 
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8250
 
  lt_cv_file_magic_cmd='func_win32_libid'
8251
 
  ;;
8252
 
 
8253
 
mingw* | pw32*)
8254
 
  # Base MSYS/MinGW do not provide the 'file' command needed by
8255
 
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
8256
 
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
8257
 
  lt_cv_file_magic_cmd='$OBJDUMP -f'
8258
 
  ;;
8259
 
 
8260
 
darwin* | rhapsody*)
8261
 
  lt_cv_deplibs_check_method=pass_all
8262
 
  ;;
8263
 
 
8264
 
freebsd* | dragonfly*)
8265
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
8266
 
    case $host_cpu in
8267
 
    i*86 )
8268
 
      # Not sure whether the presence of OpenBSD here was a mistake.
8269
 
      # Let's accept both of them until this is cleared up.
8270
 
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
8271
 
      lt_cv_file_magic_cmd=/usr/bin/file
8272
 
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8273
 
      ;;
8274
 
    esac
8275
 
  else
8276
 
    lt_cv_deplibs_check_method=pass_all
8277
 
  fi
8278
 
  ;;
8279
 
 
8280
 
gnu*)
8281
 
  lt_cv_deplibs_check_method=pass_all
8282
 
  ;;
8283
 
 
8284
 
hpux10.20* | hpux11*)
8285
 
  lt_cv_file_magic_cmd=/usr/bin/file
8286
 
  case $host_cpu in
8287
 
  ia64*)
8288
 
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
8289
 
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8290
 
    ;;
8291
 
  hppa*64*)
8292
 
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
8293
 
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8294
 
    ;;
8295
 
  *)
8296
 
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
8297
 
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8298
 
    ;;
8299
 
  esac
8300
 
  ;;
8301
 
 
8302
 
interix3*)
8303
 
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8304
 
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
8305
 
  ;;
8306
 
 
8307
 
irix5* | irix6* | nonstopux*)
8308
 
  case $LD in
8309
 
  *-32|*"-32 ") libmagic=32-bit;;
8310
 
  *-n32|*"-n32 ") libmagic=N32;;
8311
 
  *-64|*"-64 ") libmagic=64-bit;;
8312
 
  *) libmagic=never-match;;
8313
 
  esac
8314
 
  lt_cv_deplibs_check_method=pass_all
8315
 
  ;;
8316
 
 
8317
 
# This must be Linux ELF.
8318
 
linux* | k*bsd*-gnu)
8319
 
  lt_cv_deplibs_check_method=pass_all
8320
 
  ;;
8321
 
 
8322
 
netbsd* | netbsdelf*-gnu)
8323
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
8324
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
8325
 
  else
8326
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
8327
 
  fi
8328
 
  ;;
8329
 
 
8330
 
newos6*)
8331
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
8332
 
  lt_cv_file_magic_cmd=/usr/bin/file
8333
 
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
8334
 
  ;;
8335
 
 
8336
 
nto-qnx*)
8337
 
  lt_cv_deplibs_check_method=unknown
8338
 
  ;;
8339
 
 
8340
 
openbsd*)
8341
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8342
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
8343
 
  else
8344
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
8345
 
  fi
8346
 
  ;;
8347
 
 
8348
 
osf3* | osf4* | osf5*)
8349
 
  lt_cv_deplibs_check_method=pass_all
8350
 
  ;;
8351
 
 
8352
 
solaris*)
8353
 
  lt_cv_deplibs_check_method=pass_all
8354
 
  ;;
8355
 
 
8356
 
sysv4 | sysv4.3*)
8357
 
  case $host_vendor in
8358
 
  motorola)
8359
 
    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]]'
8360
 
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8361
 
    ;;
8362
 
  ncr)
8363
 
    lt_cv_deplibs_check_method=pass_all
8364
 
    ;;
8365
 
  sequent)
8366
 
    lt_cv_file_magic_cmd='/bin/file'
8367
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
8368
 
    ;;
8369
 
  sni)
8370
 
    lt_cv_file_magic_cmd='/bin/file'
8371
 
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
8372
 
    lt_cv_file_magic_test_file=/lib/libc.so
8373
 
    ;;
8374
 
  siemens)
8375
 
    lt_cv_deplibs_check_method=pass_all
8376
 
    ;;
8377
 
  pc)
8378
 
    lt_cv_deplibs_check_method=pass_all
8379
 
    ;;
8380
 
  esac
8381
 
  ;;
8382
 
 
8383
 
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8384
 
  lt_cv_deplibs_check_method=pass_all
8385
 
  ;;
8386
 
esac
8387
 
])
8388
 
file_magic_cmd=$lt_cv_file_magic_cmd
8389
 
deplibs_check_method=$lt_cv_deplibs_check_method
8390
 
test -z "$deplibs_check_method" && deplibs_check_method=unknown
8391
 
])# AC_DEPLIBS_CHECK_METHOD
8392
 
 
8393
 
 
8394
 
# AC_PROG_NM
8395
 
# ----------
8396
 
# find the pathname to a BSD-compatible name lister
8397
 
AC_DEFUN([AC_PROG_NM],
8398
 
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
8399
 
[if test -n "$NM"; then
8400
 
  # Let the user override the test.
8401
 
  lt_cv_path_NM="$NM"
8402
 
else
8403
 
  lt_nm_to_check="${ac_tool_prefix}nm"
8404
 
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
8405
 
    lt_nm_to_check="$lt_nm_to_check nm"
8406
 
  fi
8407
 
  for lt_tmp_nm in $lt_nm_to_check; do
8408
 
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8409
 
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8410
 
      IFS="$lt_save_ifs"
8411
 
      test -z "$ac_dir" && ac_dir=.
8412
 
      tmp_nm="$ac_dir/$lt_tmp_nm"
8413
 
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
8414
 
        # Check to see if the nm accepts a BSD-compat flag.
8415
 
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
8416
 
        #   nm: unknown option "B" ignored
8417
 
        # Tru64's nm complains that /dev/null is an invalid object file
8418
 
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
8419
 
        */dev/null* | *'Invalid file or object type'*)
8420
 
          lt_cv_path_NM="$tmp_nm -B"
8421
 
          break
8422
 
          ;;
8423
 
        *)
8424
 
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8425
 
          */dev/null*)
8426
 
            lt_cv_path_NM="$tmp_nm -p"
8427
 
            break
8428
 
            ;;
8429
 
          *)
8430
 
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8431
 
            continue # so that we can try to find one that supports BSD flags
8432
 
            ;;
8433
 
          esac
8434
 
          ;;
8435
 
        esac
8436
 
      fi
8437
 
    done
8438
 
    IFS="$lt_save_ifs"
8439
 
  done
8440
 
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
8441
 
fi])
8442
 
NM="$lt_cv_path_NM"
8443
 
])# AC_PROG_NM
8444
 
 
8445
 
 
8446
 
# AC_CHECK_LIBM
8447
 
# -------------
8448
 
# check for math library
8449
 
AC_DEFUN([AC_CHECK_LIBM],
8450
 
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8451
 
LIBM=
8452
 
case $host in
8453
 
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
8454
 
  # These system don't have libm, or don't need it
8455
 
  ;;
8456
 
*-ncr-sysv4.3*)
8457
 
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
8458
 
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
8459
 
  ;;
8460
 
*)
8461
 
  AC_CHECK_LIB(m, cos, LIBM="-lm")
8462
 
  ;;
8463
 
esac
8464
 
])# AC_CHECK_LIBM
8465
 
 
8466
 
 
8467
 
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
8468
 
# -----------------------------------
8469
 
# sets LIBLTDL to the link flags for the libltdl convenience library and
8470
 
# LTDLINCL to the include flags for the libltdl header and adds
8471
 
# --enable-ltdl-convenience to the configure arguments.  Note that
8472
 
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
8473
 
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
8474
 
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
8475
 
# (note the single quotes!).  If your package is not flat and you're not
8476
 
# using automake, define top_builddir and top_srcdir appropriately in
8477
 
# the Makefiles.
8478
 
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
8479
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8480
 
  case $enable_ltdl_convenience in
8481
 
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8482
 
  "") enable_ltdl_convenience=yes
8483
 
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8484
 
  esac
8485
 
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
8486
 
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8487
 
  # For backwards non-gettext consistent compatibility...
8488
 
  INCLTDL="$LTDLINCL"
8489
 
])# AC_LIBLTDL_CONVENIENCE
8490
 
 
8491
 
 
8492
 
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
8493
 
# -----------------------------------
8494
 
# sets LIBLTDL to the link flags for the libltdl installable library and
8495
 
# LTDLINCL to the include flags for the libltdl header and adds
8496
 
# --enable-ltdl-install to the configure arguments.  Note that
8497
 
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
8498
 
# and an installed libltdl is not found, it is assumed to be `libltdl'.
8499
 
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
8500
 
# '${top_srcdir}/' (note the single quotes!).  If your package is not
8501
 
# flat and you're not using automake, define top_builddir and top_srcdir
8502
 
# appropriately in the Makefiles.
8503
 
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
8504
 
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
8505
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8506
 
  AC_CHECK_LIB(ltdl, lt_dlinit,
8507
 
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8508
 
  [if test x"$enable_ltdl_install" = xno; then
8509
 
     AC_MSG_WARN([libltdl not installed, but installation disabled])
8510
 
   else
8511
 
     enable_ltdl_install=yes
8512
 
   fi
8513
 
  ])
8514
 
  if test x"$enable_ltdl_install" = x"yes"; then
8515
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
8516
 
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8517
 
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8518
 
  else
8519
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8520
 
    LIBLTDL="-lltdl"
8521
 
    LTDLINCL=
8522
 
  fi
8523
 
  # For backwards non-gettext consistent compatibility...
8524
 
  INCLTDL="$LTDLINCL"
8525
 
])# AC_LIBLTDL_INSTALLABLE
8526
 
 
8527
 
 
8528
 
# AC_LIBTOOL_CXX
8529
 
# --------------
8530
 
# enable support for C++ libraries
8531
 
AC_DEFUN([AC_LIBTOOL_CXX],
8532
 
[AC_REQUIRE([_LT_AC_LANG_CXX])
8533
 
])# AC_LIBTOOL_CXX
8534
 
 
8535
 
 
8536
 
# _LT_AC_LANG_CXX
8537
 
# ---------------
8538
 
AC_DEFUN([_LT_AC_LANG_CXX],
8539
 
[AC_REQUIRE([AC_PROG_CXX])
8540
 
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
8541
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8542
 
])# _LT_AC_LANG_CXX
8543
 
 
8544
 
# _LT_AC_PROG_CXXCPP
8545
 
# ------------------
8546
 
AC_DEFUN([_LT_AC_PROG_CXXCPP],
8547
 
[
8548
 
AC_REQUIRE([AC_PROG_CXX])
8549
 
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
8550
 
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
8551
 
    (test "X$CXX" != "Xg++"))) ; then
8552
 
  AC_PROG_CXXCPP
8553
 
fi
8554
 
])# _LT_AC_PROG_CXXCPP
8555
 
 
8556
 
# AC_LIBTOOL_F77
8557
 
# --------------
8558
 
# enable support for Fortran 77 libraries
8559
 
AC_DEFUN([AC_LIBTOOL_F77],
8560
 
[AC_REQUIRE([_LT_AC_LANG_F77])
8561
 
])# AC_LIBTOOL_F77
8562
 
 
8563
 
 
8564
 
# _LT_AC_LANG_F77
8565
 
# ---------------
8566
 
AC_DEFUN([_LT_AC_LANG_F77],
8567
 
[AC_REQUIRE([AC_PROG_F77])
8568
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8569
 
])# _LT_AC_LANG_F77
8570
 
 
8571
 
 
8572
 
# AC_LIBTOOL_GCJ
8573
 
# --------------
8574
 
# enable support for GCJ libraries
8575
 
AC_DEFUN([AC_LIBTOOL_GCJ],
8576
 
[AC_REQUIRE([_LT_AC_LANG_GCJ])
8577
 
])# AC_LIBTOOL_GCJ
8578
 
 
8579
 
 
8580
 
# _LT_AC_LANG_GCJ
8581
 
# ---------------
8582
 
AC_DEFUN([_LT_AC_LANG_GCJ],
8583
 
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8584
 
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8585
 
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8586
 
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8587
 
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8588
 
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8589
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8590
 
])# _LT_AC_LANG_GCJ
8591
 
 
8592
 
 
8593
 
# AC_LIBTOOL_RC
8594
 
# -------------
8595
 
# enable support for Windows resource files
8596
 
AC_DEFUN([AC_LIBTOOL_RC],
8597
 
[AC_REQUIRE([LT_AC_PROG_RC])
8598
 
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8599
 
])# AC_LIBTOOL_RC
8600
 
 
8601
 
 
8602
 
# AC_LIBTOOL_LANG_C_CONFIG
8603
 
# ------------------------
8604
 
# Ensure that the configuration vars for the C compiler are
8605
 
# suitably defined.  Those variables are subsequently used by
8606
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8607
 
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8608
 
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
8609
 
[lt_save_CC="$CC"
8610
 
AC_LANG_PUSH(C)
8611
 
 
8612
 
# Source file extension for C test sources.
8613
 
ac_ext=c
8614
 
 
8615
 
# Object file extension for compiled C test sources.
8616
 
objext=o
8617
 
_LT_AC_TAGVAR(objext, $1)=$objext
8618
 
 
8619
 
# Code to be used in simple compile tests
8620
 
lt_simple_compile_test_code="int some_variable = 0;\n"
8621
 
 
8622
 
# Code to be used in simple link tests
8623
 
lt_simple_link_test_code='int main(){return(0);}\n'
8624
 
 
8625
 
_LT_AC_SYS_COMPILER
8626
 
 
8627
 
# save warnings/boilerplate of simple test code
8628
 
_LT_COMPILER_BOILERPLATE
8629
 
_LT_LINKER_BOILERPLATE
8630
 
 
8631
 
## CAVEAT EMPTOR:
8632
 
## There is no encapsulation within the following macros, do not change
8633
 
## the running order or otherwise move them around unless you know exactly
8634
 
## what you are doing...
8635
 
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8636
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8637
 
AC_LIBTOOL_PROG_CC_C_O($1)
8638
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8639
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8640
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8641
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8642
 
AC_LIBTOOL_SYS_LIB_STRIP
8643
 
AC_LIBTOOL_DLOPEN_SELF
8644
 
 
8645
 
# Report which library types will actually be built
8646
 
AC_MSG_CHECKING([if libtool supports shared libraries])
8647
 
AC_MSG_RESULT([$can_build_shared])
8648
 
 
8649
 
AC_MSG_CHECKING([whether to build shared libraries])
8650
 
test "$can_build_shared" = "no" && enable_shared=no
8651
 
 
8652
 
# On AIX, shared libraries and static libraries use the same namespace, and
8653
 
# are all built from PIC.
8654
 
case $host_os in
8655
 
aix3*)
8656
 
  test "$enable_shared" = yes && enable_static=no
8657
 
  if test -n "$RANLIB"; then
8658
 
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
8659
 
    postinstall_cmds='$RANLIB $lib'
8660
 
  fi
8661
 
  ;;
8662
 
 
8663
 
aix4* | aix5*)
8664
 
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8665
 
    test "$enable_shared" = yes && enable_static=no
8666
 
  fi
8667
 
    ;;
8668
 
esac
8669
 
AC_MSG_RESULT([$enable_shared])
8670
 
 
8671
 
AC_MSG_CHECKING([whether to build static libraries])
8672
 
# Make sure either enable_shared or enable_static is yes.
8673
 
test "$enable_shared" = yes || enable_static=yes
8674
 
AC_MSG_RESULT([$enable_static])
8675
 
 
8676
 
AC_LIBTOOL_CONFIG($1)
8677
 
 
8678
 
AC_LANG_POP
8679
 
CC="$lt_save_CC"
8680
 
])# AC_LIBTOOL_LANG_C_CONFIG
8681
 
 
8682
 
 
8683
 
# AC_LIBTOOL_LANG_CXX_CONFIG
8684
 
# --------------------------
8685
 
# Ensure that the configuration vars for the C compiler are
8686
 
# suitably defined.  Those variables are subsequently used by
8687
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8688
 
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8689
 
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
8690
 
[AC_LANG_PUSH(C++)
8691
 
AC_REQUIRE([AC_PROG_CXX])
8692
 
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
8693
 
 
8694
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8695
 
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8696
 
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8697
 
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8698
 
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8699
 
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8700
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8701
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8702
 
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8703
 
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8704
 
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8705
 
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8706
 
_LT_AC_TAGVAR(module_cmds, $1)=
8707
 
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8708
 
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8709
 
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8710
 
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8711
 
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8712
 
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8713
 
 
8714
 
# Dependencies to place before and after the object being linked:
8715
 
_LT_AC_TAGVAR(predep_objects, $1)=
8716
 
_LT_AC_TAGVAR(postdep_objects, $1)=
8717
 
_LT_AC_TAGVAR(predeps, $1)=
8718
 
_LT_AC_TAGVAR(postdeps, $1)=
8719
 
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8720
 
 
8721
 
# Source file extension for C++ test sources.
8722
 
ac_ext=cpp
8723
 
 
8724
 
# Object file extension for compiled C++ test sources.
8725
 
objext=o
8726
 
_LT_AC_TAGVAR(objext, $1)=$objext
8727
 
 
8728
 
# Code to be used in simple compile tests
8729
 
lt_simple_compile_test_code="int some_variable = 0;\n"
8730
 
 
8731
 
# Code to be used in simple link tests
8732
 
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
8733
 
 
8734
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8735
 
_LT_AC_SYS_COMPILER
8736
 
 
8737
 
# save warnings/boilerplate of simple test code
8738
 
_LT_COMPILER_BOILERPLATE
8739
 
_LT_LINKER_BOILERPLATE
8740
 
 
8741
 
# Allow CC to be a program name with arguments.
8742
 
lt_save_CC=$CC
8743
 
lt_save_LD=$LD
8744
 
lt_save_GCC=$GCC
8745
 
GCC=$GXX
8746
 
lt_save_with_gnu_ld=$with_gnu_ld
8747
 
lt_save_path_LD=$lt_cv_path_LD
8748
 
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8749
 
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8750
 
else
8751
 
  $as_unset lt_cv_prog_gnu_ld
8752
 
fi
8753
 
if test -n "${lt_cv_path_LDCXX+set}"; then
8754
 
  lt_cv_path_LD=$lt_cv_path_LDCXX
8755
 
else
8756
 
  $as_unset lt_cv_path_LD
8757
 
fi
8758
 
test -z "${LDCXX+set}" || LD=$LDCXX
8759
 
CC=${CXX-"c++"}
8760
 
compiler=$CC
8761
 
_LT_AC_TAGVAR(compiler, $1)=$CC
8762
 
_LT_CC_BASENAME([$compiler])
8763
 
 
8764
 
# We don't want -fno-exception wen compiling C++ code, so set the
8765
 
# no_builtin_flag separately
8766
 
if test "$GXX" = yes; then
8767
 
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8768
 
else
8769
 
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8770
 
fi
8771
 
 
8772
 
if test "$GXX" = yes; then
8773
 
  # Set up default GNU C++ configuration
8774
 
 
8775
 
  AC_PROG_LD
8776
 
 
8777
 
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
8778
 
  # archiving commands below assume that GNU ld is being used.
8779
 
  if test "$with_gnu_ld" = yes; then
8780
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8781
 
    _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'
8782
 
 
8783
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8784
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8785
 
 
8786
 
    # If archive_cmds runs LD, not CC, wlarc should be empty
8787
 
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8788
 
    #     investigate it a little bit more. (MM)
8789
 
    wlarc='${wl}'
8790
 
 
8791
 
    # ancient GNU ld didn't support --whole-archive et. al.
8792
 
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8793
 
        grep 'no-whole-archive' > /dev/null; then
8794
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8795
 
    else
8796
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8797
 
    fi
8798
 
  else
8799
 
    with_gnu_ld=no
8800
 
    wlarc=
8801
 
 
8802
 
    # A generic and very simple default shared library creation
8803
 
    # command for GNU C++ for the case where it uses the native
8804
 
    # linker, instead of GNU ld.  If possible, this setting should
8805
 
    # overridden to take advantage of the native linker features on
8806
 
    # the platform it is being used on.
8807
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8808
 
  fi
8809
 
 
8810
 
  # Commands to make compiler produce verbose output that lists
8811
 
  # what "hidden" libraries, object files and flags are used when
8812
 
  # linking a shared library.
8813
 
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8814
 
 
8815
 
else
8816
 
  GXX=no
8817
 
  with_gnu_ld=no
8818
 
  wlarc=
8819
 
fi
8820
 
 
8821
 
# PORTME: fill in a description of your system's C++ link characteristics
8822
 
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8823
 
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8824
 
case $host_os in
8825
 
  aix3*)
8826
 
    # FIXME: insert proper C++ library support
8827
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8828
 
    ;;
8829
 
  aix4* | aix5*)
8830
 
    if test "$host_cpu" = ia64; then
8831
 
      # On IA64, the linker does run time linking by default, so we don't
8832
 
      # have to do anything special.
8833
 
      aix_use_runtimelinking=no
8834
 
      exp_sym_flag='-Bexport'
8835
 
      no_entry_flag=""
8836
 
    else
8837
 
      aix_use_runtimelinking=no
8838
 
 
8839
 
      # Test if we are trying to use run time linking or normal
8840
 
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8841
 
      # need to do runtime linking.
8842
 
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
8843
 
        for ld_flag in $LDFLAGS; do
8844
 
          case $ld_flag in
8845
 
          *-brtl*)
8846
 
            aix_use_runtimelinking=yes
8847
 
            break
8848
 
            ;;
8849
 
          esac
8850
 
        done
8851
 
        ;;
8852
 
      esac
8853
 
 
8854
 
      exp_sym_flag='-bexport'
8855
 
      no_entry_flag='-bnoentry'
8856
 
    fi
8857
 
 
8858
 
    # When large executables or shared objects are built, AIX ld can
8859
 
    # have problems creating the table of contents.  If linking a library
8860
 
    # or program results in "error TOC overflow" add -mminimal-toc to
8861
 
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8862
 
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8863
 
 
8864
 
    _LT_AC_TAGVAR(archive_cmds, $1)=''
8865
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8866
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8867
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8868
 
 
8869
 
    if test "$GXX" = yes; then
8870
 
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
8871
 
      # We only want to do this on AIX 4.2 and lower, the check
8872
 
      # below for broken collect2 doesn't work under 4.3+
8873
 
        collect2name=`${CC} -print-prog-name=collect2`
8874
 
        if test -f "$collect2name" && \
8875
 
           strings "$collect2name" | grep resolve_lib_name >/dev/null
8876
 
        then
8877
 
          # We have reworked collect2
8878
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8879
 
        else
8880
 
          # We have old collect2
8881
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8882
 
          # It fails to find uninstalled libraries when the uninstalled
8883
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
8884
 
          # to unsupported forces relinking
8885
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8886
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8887
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8888
 
        fi
8889
 
        ;;
8890
 
      esac
8891
 
      shared_flag='-shared'
8892
 
      if test "$aix_use_runtimelinking" = yes; then
8893
 
        shared_flag="$shared_flag "'${wl}-G'
8894
 
      fi
8895
 
    else
8896
 
      # not using gcc
8897
 
      if test "$host_cpu" = ia64; then
8898
 
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8899
 
        # chokes on -Wl,-G. The following line is correct:
8900
 
        shared_flag='-G'
8901
 
      else
8902
 
        if test "$aix_use_runtimelinking" = yes; then
8903
 
          shared_flag='${wl}-G'
8904
 
        else
8905
 
          shared_flag='${wl}-bM:SRE'
8906
 
        fi
8907
 
      fi
8908
 
    fi
8909
 
 
8910
 
    # It seems that -bexpall does not export symbols beginning with
8911
 
    # underscore (_), so it is better to generate a list of symbols to export.
8912
 
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8913
 
    if test "$aix_use_runtimelinking" = yes; then
8914
 
      # Warning - without using the other runtime loading flags (-brtl),
8915
 
      # -berok will link without error, but may produce a broken library.
8916
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8917
 
      # Determine the default libpath from the value encoded in an empty executable.
8918
 
      _LT_AC_SYS_LIBPATH_AIX
8919
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8920
 
 
8921
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8922
 
     else
8923
 
      if test "$host_cpu" = ia64; then
8924
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8925
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8926
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
8927
 
      else
8928
 
        # Determine the default libpath from the value encoded in an empty executable.
8929
 
        _LT_AC_SYS_LIBPATH_AIX
8930
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8931
 
        # Warning - without using the other run time loading flags,
8932
 
        # -berok will link without error, but may produce a broken library.
8933
 
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8934
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8935
 
        # Exported symbols can be pulled into shared objects from archives
8936
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8937
 
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8938
 
        # This is similar to how AIX traditionally builds its shared libraries.
8939
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8940
 
      fi
8941
 
    fi
8942
 
    ;;
8943
 
 
8944
 
  beos*)
8945
 
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8946
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8947
 
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8948
 
      # support --undefined.  This deserves some investigation.  FIXME
8949
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8950
 
    else
8951
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8952
 
    fi
8953
 
    ;;
8954
 
 
8955
 
  chorus*)
8956
 
    case $cc_basename in
8957
 
      *)
8958
 
        # FIXME: insert proper C++ library support
8959
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8960
 
        ;;
8961
 
    esac
8962
 
    ;;
8963
 
 
8964
 
  cygwin* | mingw* | pw32*)
8965
 
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8966
 
    # as there is no search path for DLLs.
8967
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8968
 
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8969
 
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
8970
 
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8971
 
 
8972
 
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8973
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8974
 
      # If the export-symbols file already is a .def file (1st line
8975
 
      # is EXPORTS), use it as is; otherwise, prepend...
8976
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8977
 
        cp $export_symbols $output_objdir/$soname.def;
8978
 
      else
8979
 
        echo EXPORTS > $output_objdir/$soname.def;
8980
 
        cat $export_symbols >> $output_objdir/$soname.def;
8981
 
      fi~
8982
 
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8983
 
    else
8984
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8985
 
    fi
8986
 
  ;;
8987
 
      darwin* | rhapsody*)
8988
 
        case $host_os in
8989
 
        rhapsody* | darwin1.[[012]])
8990
 
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
8991
 
         ;;
8992
 
       *) # Darwin 1.3 on
8993
 
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8994
 
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8995
 
         else
8996
 
           case ${MACOSX_DEPLOYMENT_TARGET} in
8997
 
             10.[[012]])
8998
 
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8999
 
               ;;
9000
 
             10.*)
9001
 
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
9002
 
               ;;
9003
 
           esac
9004
 
         fi
9005
 
         ;;
9006
 
        esac
9007
 
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9008
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
9009
 
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
9010
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9011
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
9012
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9013
 
 
9014
 
    if test "$GXX" = yes ; then
9015
 
      lt_int_apple_cc_single_mod=no
9016
 
      output_verbose_link_cmd='echo'
9017
 
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
9018
 
       lt_int_apple_cc_single_mod=yes
9019
 
      fi
9020
 
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
9021
 
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9022
 
      else
9023
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9024
 
        fi
9025
 
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9026
 
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9027
 
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
9028
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9029
 
          else
9030
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9031
 
          fi
9032
 
            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9033
 
      else
9034
 
      case $cc_basename in
9035
 
        xlc*)
9036
 
         output_verbose_link_cmd='echo'
9037
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9038
 
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9039
 
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9040
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9041
 
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9042
 
          ;;
9043
 
       *)
9044
 
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9045
 
          ;;
9046
 
      esac
9047
 
      fi
9048
 
        ;;
9049
 
 
9050
 
  dgux*)
9051
 
    case $cc_basename in
9052
 
      ec++*)
9053
 
        # FIXME: insert proper C++ library support
9054
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9055
 
        ;;
9056
 
      ghcx*)
9057
 
        # Green Hills C++ Compiler
9058
 
        # FIXME: insert proper C++ library support
9059
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9060
 
        ;;
9061
 
      *)
9062
 
        # FIXME: insert proper C++ library support
9063
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9064
 
        ;;
9065
 
    esac
9066
 
    ;;
9067
 
  freebsd[[12]]*)
9068
 
    # C++ shared libraries reported to be fairly broken before switch to ELF
9069
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9070
 
    ;;
9071
 
  freebsd-elf*)
9072
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9073
 
    ;;
9074
 
  freebsd* | dragonfly*)
9075
 
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
9076
 
    # conventions
9077
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
9078
 
    ;;
9079
 
  gnu*)
9080
 
    ;;
9081
 
  hpux9*)
9082
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9083
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9084
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9085
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9086
 
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9087
 
                                # but as the default
9088
 
                                # location of the library.
9089
 
 
9090
 
    case $cc_basename in
9091
 
    CC*)
9092
 
      # FIXME: insert proper C++ library support
9093
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
9094
 
      ;;
9095
 
    aCC*)
9096
 
      _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'
9097
 
      # Commands to make compiler produce verbose output that lists
9098
 
      # what "hidden" libraries, object files and flags are used when
9099
 
      # linking a shared library.
9100
 
      #
9101
 
      # There doesn't appear to be a way to prevent this compiler from
9102
 
      # explicitly linking system object files so we need to strip them
9103
 
      # from the output so that they don't get included in the library
9104
 
      # dependencies.
9105
 
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9106
 
      ;;
9107
 
    *)
9108
 
      if test "$GXX" = yes; then
9109
 
        _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'
9110
 
      else
9111
 
        # FIXME: insert proper C++ library support
9112
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9113
 
      fi
9114
 
      ;;
9115
 
    esac
9116
 
    ;;
9117
 
  hpux10*|hpux11*)
9118
 
    if test $with_gnu_ld = no; then
9119
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9120
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9121
 
 
9122
 
      case $host_cpu in
9123
 
      hppa*64*|ia64*)
9124
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
9125
 
        ;;
9126
 
      *)
9127
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9128
 
        ;;
9129
 
      esac
9130
 
    fi
9131
 
    case $host_cpu in
9132
 
    hppa*64*|ia64*)
9133
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
9134
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9135
 
      ;;
9136
 
    *)
9137
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9138
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9139
 
                                              # but as the default
9140
 
                                              # location of the library.
9141
 
      ;;
9142
 
    esac
9143
 
 
9144
 
    case $cc_basename in
9145
 
      CC*)
9146
 
        # FIXME: insert proper C++ library support
9147
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9148
 
        ;;
9149
 
      aCC*)
9150
 
        case $host_cpu in
9151
 
        hppa*64*)
9152
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9153
 
          ;;
9154
 
        ia64*)
9155
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9156
 
          ;;
9157
 
        *)
9158
 
          _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'
9159
 
          ;;
9160
 
        esac
9161
 
        # Commands to make compiler produce verbose output that lists
9162
 
        # what "hidden" libraries, object files and flags are used when
9163
 
        # linking a shared library.
9164
 
        #
9165
 
        # There doesn't appear to be a way to prevent this compiler from
9166
 
        # explicitly linking system object files so we need to strip them
9167
 
        # from the output so that they don't get included in the library
9168
 
        # dependencies.
9169
 
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9170
 
        ;;
9171
 
      *)
9172
 
        if test "$GXX" = yes; then
9173
 
          if test $with_gnu_ld = no; then
9174
 
            case $host_cpu in
9175
 
            hppa*64*)
9176
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9177
 
              ;;
9178
 
            ia64*)
9179
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9180
 
              ;;
9181
 
            *)
9182
 
              _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'
9183
 
              ;;
9184
 
            esac
9185
 
          fi
9186
 
        else
9187
 
          # FIXME: insert proper C++ library support
9188
 
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
9189
 
        fi
9190
 
        ;;
9191
 
    esac
9192
 
    ;;
9193
 
  interix3*)
9194
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
9195
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9196
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9197
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9198
 
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9199
 
    # Instead, shared libraries are loaded at an image base (0x10000000 by
9200
 
    # default) and relocated if they conflict, which is a slow very memory
9201
 
    # consuming and fragmenting process.  To avoid this, we pick a random,
9202
 
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9203
 
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
9204
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9205
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9206
 
    ;;
9207
 
  irix5* | irix6*)
9208
 
    case $cc_basename in
9209
 
      CC*)
9210
 
        # SGI C++
9211
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
9212
 
 
9213
 
        # Archives containing C++ object files must be created using
9214
 
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
9215
 
        # necessary to make sure instantiated templates are included
9216
 
        # in the archive.
9217
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
9218
 
        ;;
9219
 
      *)
9220
 
        if test "$GXX" = yes; then
9221
 
          if test "$with_gnu_ld" = no; then
9222
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9223
 
          else
9224
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
9225
 
          fi
9226
 
        fi
9227
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9228
 
        ;;
9229
 
    esac
9230
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9231
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9232
 
    ;;
9233
 
  linux* | k*bsd*-gnu)
9234
 
    case $cc_basename in
9235
 
      KCC*)
9236
 
        # Kuck and Associates, Inc. (KAI) C++ Compiler
9237
 
 
9238
 
        # KCC will only create a shared library if the output file
9239
 
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
9240
 
        # to its proper name (with version) after linking.
9241
 
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
9242
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
9243
 
        # Commands to make compiler produce verbose output that lists
9244
 
        # what "hidden" libraries, object files and flags are used when
9245
 
        # linking a shared library.
9246
 
        #
9247
 
        # There doesn't appear to be a way to prevent this compiler from
9248
 
        # explicitly linking system object files so we need to strip them
9249
 
        # from the output so that they don't get included in the library
9250
 
        # dependencies.
9251
 
        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9252
 
 
9253
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
9254
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9255
 
 
9256
 
        # Archives containing C++ object files must be created using
9257
 
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
9258
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9259
 
        ;;
9260
 
      icpc*)
9261
 
        # Intel C++
9262
 
        with_gnu_ld=yes
9263
 
        # version 8.0 and above of icpc choke on multiply defined symbols
9264
 
        # if we add $predep_objects and $postdep_objects, however 7.1 and
9265
 
        # earlier do not add the objects themselves.
9266
 
        case `$CC -V 2>&1` in
9267
 
        *"Version 7."*)
9268
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
9269
 
          _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'
9270
 
          ;;
9271
 
        *)  # Version 8.0 or newer
9272
 
          tmp_idyn=
9273
 
          case $host_cpu in
9274
 
            ia64*) tmp_idyn=' -i_dynamic';;
9275
 
          esac
9276
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9277
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9278
 
          ;;
9279
 
        esac
9280
 
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9281
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9282
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9283
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
9284
 
        ;;
9285
 
      pgCC*)
9286
 
        # Portland Group C++ compiler
9287
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
9288
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
9289
 
 
9290
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
9291
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9292
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
9293
 
        ;;
9294
 
      cxx*)
9295
 
        # Compaq C++
9296
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
9297
 
        _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'
9298
 
 
9299
 
        runpath_var=LD_RUN_PATH
9300
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9301
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9302
 
 
9303
 
        # Commands to make compiler produce verbose output that lists
9304
 
        # what "hidden" libraries, object files and flags are used when
9305
 
        # linking a shared library.
9306
 
        #
9307
 
        # There doesn't appear to be a way to prevent this compiler from
9308
 
        # explicitly linking system object files so we need to strip them
9309
 
        # from the output so that they don't get included in the library
9310
 
        # dependencies.
9311
 
        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'
9312
 
        ;;
9313
 
    esac
9314
 
    ;;
9315
 
  lynxos*)
9316
 
    # FIXME: insert proper C++ library support
9317
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9318
 
    ;;
9319
 
  m88k*)
9320
 
    # FIXME: insert proper C++ library support
9321
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9322
 
    ;;
9323
 
  mvs*)
9324
 
    case $cc_basename in
9325
 
      cxx*)
9326
 
        # FIXME: insert proper C++ library support
9327
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9328
 
        ;;
9329
 
      *)
9330
 
        # FIXME: insert proper C++ library support
9331
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9332
 
        ;;
9333
 
    esac
9334
 
    ;;
9335
 
  netbsd* | netbsdelf*-gnu)
9336
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9337
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
9338
 
      wlarc=
9339
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9340
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9341
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9342
 
    fi
9343
 
    # Workaround some broken pre-1.5 toolchains
9344
 
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
9345
 
    ;;
9346
 
  openbsd2*)
9347
 
    # C++ shared libraries are fairly broken
9348
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9349
 
    ;;
9350
 
  openbsd*)
9351
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9352
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9353
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
9354
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9355
 
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9356
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
9357
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9358
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9359
 
    fi
9360
 
    output_verbose_link_cmd='echo'
9361
 
    ;;
9362
 
  osf3*)
9363
 
    case $cc_basename in
9364
 
      KCC*)
9365
 
        # Kuck and Associates, Inc. (KAI) C++ Compiler
9366
 
 
9367
 
        # KCC will only create a shared library if the output file
9368
 
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
9369
 
        # to its proper name (with version) after linking.
9370
 
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
9371
 
 
9372
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9373
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9374
 
 
9375
 
        # Archives containing C++ object files must be created using
9376
 
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
9377
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9378
 
 
9379
 
        ;;
9380
 
      RCC*)
9381
 
        # Rational C++ 2.4.1
9382
 
        # FIXME: insert proper C++ library support
9383
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9384
 
        ;;
9385
 
      cxx*)
9386
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9387
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
9388
 
 
9389
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9390
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9391
 
 
9392
 
        # Commands to make compiler produce verbose output that lists
9393
 
        # what "hidden" libraries, object files and flags are used when
9394
 
        # linking a shared library.
9395
 
        #
9396
 
        # There doesn't appear to be a way to prevent this compiler from
9397
 
        # explicitly linking system object files so we need to strip them
9398
 
        # from the output so that they don't get included in the library
9399
 
        # dependencies.
9400
 
        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'
9401
 
        ;;
9402
 
      *)
9403
 
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9404
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9405
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9406
 
 
9407
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9408
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9409
 
 
9410
 
          # Commands to make compiler produce verbose output that lists
9411
 
          # what "hidden" libraries, object files and flags are used when
9412
 
          # linking a shared library.
9413
 
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9414
 
 
9415
 
        else
9416
 
          # FIXME: insert proper C++ library support
9417
 
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
9418
 
        fi
9419
 
        ;;
9420
 
    esac
9421
 
    ;;
9422
 
  osf4* | osf5*)
9423
 
    case $cc_basename in
9424
 
      KCC*)
9425
 
        # Kuck and Associates, Inc. (KAI) C++ Compiler
9426
 
 
9427
 
        # KCC will only create a shared library if the output file
9428
 
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
9429
 
        # to its proper name (with version) after linking.
9430
 
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
9431
 
 
9432
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9433
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9434
 
 
9435
 
        # Archives containing C++ object files must be created using
9436
 
        # the KAI C++ compiler.
9437
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
9438
 
        ;;
9439
 
      RCC*)
9440
 
        # Rational C++ 2.4.1
9441
 
        # FIXME: insert proper C++ library support
9442
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9443
 
        ;;
9444
 
      cxx*)
9445
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9446
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
9447
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9448
 
          echo "-hidden">> $lib.exp~
9449
 
          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
9450
 
          $rm $lib.exp'
9451
 
 
9452
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9453
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9454
 
 
9455
 
        # Commands to make compiler produce verbose output that lists
9456
 
        # what "hidden" libraries, object files and flags are used when
9457
 
        # linking a shared library.
9458
 
        #
9459
 
        # There doesn't appear to be a way to prevent this compiler from
9460
 
        # explicitly linking system object files so we need to strip them
9461
 
        # from the output so that they don't get included in the library
9462
 
        # dependencies.
9463
 
        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'
9464
 
        ;;
9465
 
      *)
9466
 
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9467
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9468
 
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9469
 
 
9470
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9471
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9472
 
 
9473
 
          # Commands to make compiler produce verbose output that lists
9474
 
          # what "hidden" libraries, object files and flags are used when
9475
 
          # linking a shared library.
9476
 
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9477
 
 
9478
 
        else
9479
 
          # FIXME: insert proper C++ library support
9480
 
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
9481
 
        fi
9482
 
        ;;
9483
 
    esac
9484
 
    ;;
9485
 
  psos*)
9486
 
    # FIXME: insert proper C++ library support
9487
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9488
 
    ;;
9489
 
  sunos4*)
9490
 
    case $cc_basename in
9491
 
      CC*)
9492
 
        # Sun C++ 4.x
9493
 
        # FIXME: insert proper C++ library support
9494
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9495
 
        ;;
9496
 
      lcc*)
9497
 
        # Lucid
9498
 
        # FIXME: insert proper C++ library support
9499
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9500
 
        ;;
9501
 
      *)
9502
 
        # FIXME: insert proper C++ library support
9503
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9504
 
        ;;
9505
 
    esac
9506
 
    ;;
9507
 
  solaris*)
9508
 
    case $cc_basename in
9509
 
      CC*)
9510
 
        # Sun C++ 4.2, 5.x and Centerline C++
9511
 
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
9512
 
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9513
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9514
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9515
 
        $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9516
 
 
9517
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9518
 
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9519
 
        case $host_os in
9520
 
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9521
 
          *)
9522
 
            # The C++ compiler is used as linker so we must use $wl
9523
 
            # flag to pass the commands to the underlying system
9524
 
            # linker. We must also pass each convience library through
9525
 
            # to the system linker between allextract/defaultextract.
9526
 
            # The C++ compiler will combine linker options so we
9527
 
            # cannot just pass the convience library names through
9528
 
            # without $wl.
9529
 
            # Supported since Solaris 2.6 (maybe 2.5.1?)
9530
 
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
9531
 
            ;;
9532
 
        esac
9533
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9534
 
 
9535
 
        output_verbose_link_cmd='echo'
9536
 
 
9537
 
        # Archives containing C++ object files must be created using
9538
 
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
9539
 
        # necessary to make sure instantiated templates are included
9540
 
        # in the archive.
9541
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9542
 
        ;;
9543
 
      gcx*)
9544
 
        # Green Hills C++ Compiler
9545
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9546
 
 
9547
 
        # The C++ compiler must be used to create the archive.
9548
 
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9549
 
        ;;
9550
 
      *)
9551
 
        # GNU C++ compiler with Solaris linker
9552
 
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9553
 
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9554
 
          if $CC --version | grep -v '^2\.7' > /dev/null; then
9555
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9556
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9557
 
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9558
 
 
9559
 
            # Commands to make compiler produce verbose output that lists
9560
 
            # what "hidden" libraries, object files and flags are used when
9561
 
            # linking a shared library.
9562
 
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9563
 
          else
9564
 
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
9565
 
            # platform.
9566
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9567
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9568
 
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9569
 
 
9570
 
            # Commands to make compiler produce verbose output that lists
9571
 
            # what "hidden" libraries, object files and flags are used when
9572
 
            # linking a shared library.
9573
 
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9574
 
          fi
9575
 
 
9576
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9577
 
        fi
9578
 
        ;;
9579
 
    esac
9580
 
    ;;
9581
 
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9582
 
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9583
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9584
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9585
 
    runpath_var='LD_RUN_PATH'
9586
 
 
9587
 
    case $cc_basename in
9588
 
      CC*)
9589
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9590
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9591
 
        ;;
9592
 
      *)
9593
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9594
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9595
 
        ;;
9596
 
    esac
9597
 
    ;;
9598
 
  sysv5* | sco3.2v5* | sco5v6*)
9599
 
    # Note: We can NOT use -z defs as we might desire, because we do not
9600
 
    # link with -lc, and that would cause any symbols used from libc to
9601
 
    # always be unresolved, which means just about no library would
9602
 
    # ever link correctly.  If we're not using GNU ld we use -z text
9603
 
    # though, which does catch some bad symbols but isn't as heavy-handed
9604
 
    # as -z defs.
9605
 
    # For security reasons, it is highly recommended that you always
9606
 
    # use absolute paths for naming shared libraries, and exclude the
9607
 
    # DT_RUNPATH tag from executables and libraries.  But doing so
9608
 
    # requires that you compile everything twice, which is a pain.
9609
 
    # So that behaviour is only enabled if SCOABSPATH is set to a
9610
 
    # non-empty value in the environment.  Most likely only useful for
9611
 
    # creating official distributions of packages.
9612
 
    # This is a hack until libtool officially supports absolute path
9613
 
    # names for shared libraries.
9614
 
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9615
 
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
9616
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9617
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9618
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
9619
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
9620
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9621
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
9622
 
    runpath_var='LD_RUN_PATH'
9623
 
 
9624
 
    case $cc_basename in
9625
 
      CC*)
9626
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9627
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9628
 
        ;;
9629
 
      *)
9630
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9631
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9632
 
        ;;
9633
 
    esac
9634
 
    ;;
9635
 
  tandem*)
9636
 
    case $cc_basename in
9637
 
      NCC*)
9638
 
        # NonStop-UX NCC 3.20
9639
 
        # FIXME: insert proper C++ library support
9640
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9641
 
        ;;
9642
 
      *)
9643
 
        # FIXME: insert proper C++ library support
9644
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9645
 
        ;;
9646
 
    esac
9647
 
    ;;
9648
 
  vxworks*)
9649
 
    # FIXME: insert proper C++ library support
9650
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9651
 
    ;;
9652
 
  *)
9653
 
    # FIXME: insert proper C++ library support
9654
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9655
 
    ;;
9656
 
esac
9657
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9658
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9659
 
 
9660
 
_LT_AC_TAGVAR(GCC, $1)="$GXX"
9661
 
_LT_AC_TAGVAR(LD, $1)="$LD"
9662
 
 
9663
 
## CAVEAT EMPTOR:
9664
 
## There is no encapsulation within the following macros, do not change
9665
 
## the running order or otherwise move them around unless you know exactly
9666
 
## what you are doing...
9667
 
AC_LIBTOOL_POSTDEP_PREDEP($1)
9668
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9669
 
AC_LIBTOOL_PROG_CC_C_O($1)
9670
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9671
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9672
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9673
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9674
 
 
9675
 
AC_LIBTOOL_CONFIG($1)
9676
 
 
9677
 
AC_LANG_POP
9678
 
CC=$lt_save_CC
9679
 
LDCXX=$LD
9680
 
LD=$lt_save_LD
9681
 
GCC=$lt_save_GCC
9682
 
with_gnu_ldcxx=$with_gnu_ld
9683
 
with_gnu_ld=$lt_save_with_gnu_ld
9684
 
lt_cv_path_LDCXX=$lt_cv_path_LD
9685
 
lt_cv_path_LD=$lt_save_path_LD
9686
 
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9687
 
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9688
 
])# AC_LIBTOOL_LANG_CXX_CONFIG
9689
 
 
9690
 
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
9691
 
# ------------------------------------
9692
 
# Figure out "hidden" library dependencies from verbose
9693
 
# compiler output when linking a shared library.
9694
 
# Parse the compiler output and extract the necessary
9695
 
# objects, libraries and library flags.
9696
 
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
9697
 
dnl we can't use the lt_simple_compile_test_code here,
9698
 
dnl because it contains code intended for an executable,
9699
 
dnl not a library.  It's possible we should let each
9700
 
dnl tag define a new lt_????_link_test_code variable,
9701
 
dnl but it's only used here...
9702
 
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9703
 
int a;
9704
 
void foo (void) { a = 0; }
9705
 
EOF
9706
 
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9707
 
class Foo
9708
 
{
9709
 
public:
9710
 
  Foo (void) { a = 0; }
9711
 
private:
9712
 
  int a;
9713
 
};
9714
 
EOF
9715
 
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9716
 
      subroutine foo
9717
 
      implicit none
9718
 
      integer*4 a
9719
 
      a=0
9720
 
      return
9721
 
      end
9722
 
EOF
9723
 
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9724
 
public class foo {
9725
 
  private int a;
9726
 
  public void bar (void) {
9727
 
    a = 0;
9728
 
  }
9729
 
};
9730
 
EOF
9731
 
])
9732
 
dnl Parse the compiler output and extract the necessary
9733
 
dnl objects, libraries and library flags.
9734
 
if AC_TRY_EVAL(ac_compile); then
9735
 
  # Parse the compiler output and extract the necessary
9736
 
  # objects, libraries and library flags.
9737
 
 
9738
 
  # Sentinel used to keep track of whether or not we are before
9739
 
  # the conftest object file.
9740
 
  pre_test_object_deps_done=no
9741
 
 
9742
 
  # The `*' in the case matches for architectures that use `case' in
9743
 
  # $output_verbose_cmd can trigger glob expansion during the loop
9744
 
  # eval without this substitution.
9745
 
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
9746
 
 
9747
 
  for p in `eval $output_verbose_link_cmd`; do
9748
 
    case $p in
9749
 
 
9750
 
    -L* | -R* | -l*)
9751
 
       # Some compilers place space between "-{L,R}" and the path.
9752
 
       # Remove the space.
9753
 
       if test $p = "-L" \
9754
 
          || test $p = "-R"; then
9755
 
         prev=$p
9756
 
         continue
9757
 
       else
9758
 
         prev=
9759
 
       fi
9760
 
 
9761
 
       if test "$pre_test_object_deps_done" = no; then
9762
 
         case $p in
9763
 
         -L* | -R*)
9764
 
           # Internal compiler library paths should come after those
9765
 
           # provided the user.  The postdeps already come after the
9766
 
           # user supplied libs so there is no need to process them.
9767
 
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9768
 
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9769
 
           else
9770
 
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9771
 
           fi
9772
 
           ;;
9773
 
         # The "-l" case would never come before the object being
9774
 
         # linked, so don't bother handling this case.
9775
 
         esac
9776
 
       else
9777
 
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9778
 
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9779
 
         else
9780
 
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9781
 
         fi
9782
 
       fi
9783
 
       ;;
9784
 
 
9785
 
    *.$objext)
9786
 
       # This assumes that the test object file only shows up
9787
 
       # once in the compiler output.
9788
 
       if test "$p" = "conftest.$objext"; then
9789
 
         pre_test_object_deps_done=yes
9790
 
         continue
9791
 
       fi
9792
 
 
9793
 
       if test "$pre_test_object_deps_done" = no; then
9794
 
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9795
 
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
9796
 
         else
9797
 
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9798
 
         fi
9799
 
       else
9800
 
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9801
 
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
9802
 
         else
9803
 
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9804
 
         fi
9805
 
       fi
9806
 
       ;;
9807
 
 
9808
 
    *) ;; # Ignore the rest.
9809
 
 
9810
 
    esac
9811
 
  done
9812
 
 
9813
 
  # Clean up.
9814
 
  rm -f a.out a.exe
9815
 
else
9816
 
  echo "libtool.m4: error: problem compiling $1 test program"
9817
 
fi
9818
 
 
9819
 
$rm -f confest.$objext
9820
 
 
9821
 
# PORTME: override above test on systems where it is broken
9822
 
ifelse([$1],[CXX],
9823
 
[case $host_os in
9824
 
interix3*)
9825
 
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
9826
 
  # hack all around it, let's just trust "g++" to DTRT.
9827
 
  _LT_AC_TAGVAR(predep_objects,$1)=
9828
 
  _LT_AC_TAGVAR(postdep_objects,$1)=
9829
 
  _LT_AC_TAGVAR(postdeps,$1)=
9830
 
  ;;
9831
 
 
9832
 
solaris*)
9833
 
  case $cc_basename in
9834
 
  CC*)
9835
 
    # Adding this requires a known-good setup of shared libraries for
9836
 
    # Sun compiler versions before 5.6, else PIC objects from an old
9837
 
    # archive will be linked into the output, leading to subtle bugs.
9838
 
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
9839
 
    ;;
9840
 
  esac
9841
 
  ;;
9842
 
esac
9843
 
])
9844
 
 
9845
 
case " $_LT_AC_TAGVAR(postdeps, $1) " in
9846
 
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9847
 
esac
9848
 
])# AC_LIBTOOL_POSTDEP_PREDEP
9849
 
 
9850
 
# AC_LIBTOOL_LANG_F77_CONFIG
9851
 
# --------------------------
9852
 
# Ensure that the configuration vars for the C compiler are
9853
 
# suitably defined.  Those variables are subsequently used by
9854
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9855
 
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9856
 
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
9857
 
[AC_REQUIRE([AC_PROG_F77])
9858
 
AC_LANG_PUSH(Fortran 77)
9859
 
 
9860
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9861
 
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9862
 
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9863
 
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9864
 
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9865
 
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9866
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9867
 
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9868
 
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9869
 
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9870
 
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
9871
 
_LT_AC_TAGVAR(module_cmds, $1)=
9872
 
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
9873
 
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9874
 
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9875
 
_LT_AC_TAGVAR(no_undefined_flag, $1)=
9876
 
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9877
 
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9878
 
 
9879
 
# Source file extension for f77 test sources.
9880
 
ac_ext=f
9881
 
 
9882
 
# Object file extension for compiled f77 test sources.
9883
 
objext=o
9884
 
_LT_AC_TAGVAR(objext, $1)=$objext
9885
 
 
9886
 
# Code to be used in simple compile tests
9887
 
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
9888
 
 
9889
 
# Code to be used in simple link tests
9890
 
lt_simple_link_test_code="      program t\n      end\n"
9891
 
 
9892
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9893
 
_LT_AC_SYS_COMPILER
9894
 
 
9895
 
# save warnings/boilerplate of simple test code
9896
 
_LT_COMPILER_BOILERPLATE
9897
 
_LT_LINKER_BOILERPLATE
9898
 
 
9899
 
# Allow CC to be a program name with arguments.
9900
 
lt_save_CC="$CC"
9901
 
CC=${F77-"f77"}
9902
 
compiler=$CC
9903
 
_LT_AC_TAGVAR(compiler, $1)=$CC
9904
 
_LT_CC_BASENAME([$compiler])
9905
 
 
9906
 
AC_MSG_CHECKING([if libtool supports shared libraries])
9907
 
AC_MSG_RESULT([$can_build_shared])
9908
 
 
9909
 
AC_MSG_CHECKING([whether to build shared libraries])
9910
 
test "$can_build_shared" = "no" && enable_shared=no
9911
 
 
9912
 
# On AIX, shared libraries and static libraries use the same namespace, and
9913
 
# are all built from PIC.
9914
 
case $host_os in
9915
 
aix3*)
9916
 
  test "$enable_shared" = yes && enable_static=no
9917
 
  if test -n "$RANLIB"; then
9918
 
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
9919
 
    postinstall_cmds='$RANLIB $lib'
9920
 
  fi
9921
 
  ;;
9922
 
aix4* | aix5*)
9923
 
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9924
 
    test "$enable_shared" = yes && enable_static=no
9925
 
  fi
9926
 
  ;;
9927
 
esac
9928
 
AC_MSG_RESULT([$enable_shared])
9929
 
 
9930
 
AC_MSG_CHECKING([whether to build static libraries])
9931
 
# Make sure either enable_shared or enable_static is yes.
9932
 
test "$enable_shared" = yes || enable_static=yes
9933
 
AC_MSG_RESULT([$enable_static])
9934
 
 
9935
 
_LT_AC_TAGVAR(GCC, $1)="$G77"
9936
 
_LT_AC_TAGVAR(LD, $1)="$LD"
9937
 
 
9938
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9939
 
AC_LIBTOOL_PROG_CC_C_O($1)
9940
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9941
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9942
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9943
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9944
 
 
9945
 
AC_LIBTOOL_CONFIG($1)
9946
 
 
9947
 
AC_LANG_POP
9948
 
CC="$lt_save_CC"
9949
 
])# AC_LIBTOOL_LANG_F77_CONFIG
9950
 
 
9951
 
 
9952
 
# AC_LIBTOOL_LANG_GCJ_CONFIG
9953
 
# --------------------------
9954
 
# Ensure that the configuration vars for the C compiler are
9955
 
# suitably defined.  Those variables are subsequently used by
9956
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9957
 
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9958
 
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9959
 
[AC_LANG_SAVE
9960
 
 
9961
 
# Source file extension for Java test sources.
9962
 
ac_ext=java
9963
 
 
9964
 
# Object file extension for compiled Java test sources.
9965
 
objext=o
9966
 
_LT_AC_TAGVAR(objext, $1)=$objext
9967
 
 
9968
 
# Code to be used in simple compile tests
9969
 
lt_simple_compile_test_code="class foo {}\n"
9970
 
 
9971
 
# Code to be used in simple link tests
9972
 
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
9973
 
 
9974
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9975
 
_LT_AC_SYS_COMPILER
9976
 
 
9977
 
# save warnings/boilerplate of simple test code
9978
 
_LT_COMPILER_BOILERPLATE
9979
 
_LT_LINKER_BOILERPLATE
9980
 
 
9981
 
# Allow CC to be a program name with arguments.
9982
 
lt_save_CC="$CC"
9983
 
CC=${GCJ-"gcj"}
9984
 
compiler=$CC
9985
 
_LT_AC_TAGVAR(compiler, $1)=$CC
9986
 
_LT_CC_BASENAME([$compiler])
9987
 
 
9988
 
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9989
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9990
 
 
9991
 
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9992
 
 
9993
 
## CAVEAT EMPTOR:
9994
 
## There is no encapsulation within the following macros, do not change
9995
 
## the running order or otherwise move them around unless you know exactly
9996
 
## what you are doing...
9997
 
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9998
 
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9999
 
AC_LIBTOOL_PROG_CC_C_O($1)
10000
 
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
10001
 
AC_LIBTOOL_PROG_LD_SHLIBS($1)
10002
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
10003
 
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
10004
 
 
10005
 
AC_LIBTOOL_CONFIG($1)
10006
 
 
10007
 
AC_LANG_RESTORE
10008
 
CC="$lt_save_CC"
10009
 
])# AC_LIBTOOL_LANG_GCJ_CONFIG
10010
 
 
10011
 
 
10012
 
# AC_LIBTOOL_LANG_RC_CONFIG
10013
 
# -------------------------
10014
 
# Ensure that the configuration vars for the Windows resource compiler are
10015
 
# suitably defined.  Those variables are subsequently used by
10016
 
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
10017
 
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
10018
 
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
10019
 
[AC_LANG_SAVE
10020
 
 
10021
 
# Source file extension for RC test sources.
10022
 
ac_ext=rc
10023
 
 
10024
 
# Object file extension for compiled RC test sources.
10025
 
objext=o
10026
 
_LT_AC_TAGVAR(objext, $1)=$objext
10027
 
 
10028
 
# Code to be used in simple compile tests
10029
 
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
10030
 
 
10031
 
# Code to be used in simple link tests
10032
 
lt_simple_link_test_code="$lt_simple_compile_test_code"
10033
 
 
10034
 
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
10035
 
_LT_AC_SYS_COMPILER
10036
 
 
10037
 
# save warnings/boilerplate of simple test code
10038
 
_LT_COMPILER_BOILERPLATE
10039
 
_LT_LINKER_BOILERPLATE
10040
 
 
10041
 
# Allow CC to be a program name with arguments.
10042
 
lt_save_CC="$CC"
10043
 
CC=${RC-"windres"}
10044
 
compiler=$CC
10045
 
_LT_AC_TAGVAR(compiler, $1)=$CC
10046
 
_LT_CC_BASENAME([$compiler])
10047
 
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
10048
 
 
10049
 
AC_LIBTOOL_CONFIG($1)
10050
 
 
10051
 
AC_LANG_RESTORE
10052
 
CC="$lt_save_CC"
10053
 
])# AC_LIBTOOL_LANG_RC_CONFIG
10054
 
 
10055
 
 
10056
 
# AC_LIBTOOL_CONFIG([TAGNAME])
10057
 
# ----------------------------
10058
 
# If TAGNAME is not passed, then create an initial libtool script
10059
 
# with a default configuration from the untagged config vars.  Otherwise
10060
 
# add code to config.status for appending the configuration named by
10061
 
# TAGNAME from the matching tagged config vars.
10062
 
AC_DEFUN([AC_LIBTOOL_CONFIG],
10063
 
[# The else clause should only fire when bootstrapping the
10064
 
# libtool distribution, otherwise you forgot to ship ltmain.sh
10065
 
# with your package, and you will get complaints that there are
10066
 
# no rules to generate ltmain.sh.
10067
 
if test -f "$ltmain"; then
10068
 
  # See if we are running on zsh, and set the options which allow our commands through
10069
 
  # without removal of \ escapes.
10070
 
  if test -n "${ZSH_VERSION+set}" ; then
10071
 
    setopt NO_GLOB_SUBST
10072
 
  fi
10073
 
  # Now quote all the things that may contain metacharacters while being
10074
 
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
10075
 
  # variables and quote the copies for generation of the libtool script.
10076
 
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
10077
 
    SED SHELL STRIP \
10078
 
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10079
 
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10080
 
    deplibs_check_method reload_flag reload_cmds need_locks \
10081
 
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10082
 
    lt_cv_sys_global_symbol_to_c_name_address \
10083
 
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10084
 
    old_postinstall_cmds old_postuninstall_cmds \
10085
 
    _LT_AC_TAGVAR(compiler, $1) \
10086
 
    _LT_AC_TAGVAR(CC, $1) \
10087
 
    _LT_AC_TAGVAR(LD, $1) \
10088
 
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
10089
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
10090
 
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
10091
 
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
10092
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
10093
 
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
10094
 
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
10095
 
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
10096
 
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
10097
 
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
10098
 
    _LT_AC_TAGVAR(predep_objects, $1) \
10099
 
    _LT_AC_TAGVAR(postdep_objects, $1) \
10100
 
    _LT_AC_TAGVAR(predeps, $1) \
10101
 
    _LT_AC_TAGVAR(postdeps, $1) \
10102
 
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
10103
 
    _LT_AC_TAGVAR(archive_cmds, $1) \
10104
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
10105
 
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
10106
 
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
10107
 
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
10108
 
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
10109
 
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
10110
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
10111
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
10112
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
10113
 
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
10114
 
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
10115
 
    _LT_AC_TAGVAR(module_cmds, $1) \
10116
 
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
10117
 
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
10118
 
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
10119
 
    _LT_AC_TAGVAR(include_expsyms, $1); do
10120
 
 
10121
 
    case $var in
10122
 
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
10123
 
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
10124
 
    _LT_AC_TAGVAR(archive_cmds, $1) | \
10125
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
10126
 
    _LT_AC_TAGVAR(module_cmds, $1) | \
10127
 
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
10128
 
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
10129
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
10130
 
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
10131
 
    postinstall_cmds | postuninstall_cmds | \
10132
 
    old_postinstall_cmds | old_postuninstall_cmds | \
10133
 
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10134
 
      # Double-quote double-evaled strings.
10135
 
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10136
 
      ;;
10137
 
    *)
10138
 
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10139
 
      ;;
10140
 
    esac
10141
 
  done
10142
 
 
10143
 
  case $lt_echo in
10144
 
  *'\[$]0 --fallback-echo"')
10145
 
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
10146
 
    ;;
10147
 
  esac
10148
 
 
10149
 
ifelse([$1], [],
10150
 
  [cfgfile="${ofile}T"
10151
 
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10152
 
  $rm -f "$cfgfile"
10153
 
  AC_MSG_NOTICE([creating $ofile])],
10154
 
  [cfgfile="$ofile"])
10155
 
 
10156
 
  cat <<__EOF__ >> "$cfgfile"
10157
 
ifelse([$1], [],
10158
 
[#! $SHELL
10159
 
 
10160
 
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10161
 
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10162
 
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
10163
 
#
10164
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10165
 
# Free Software Foundation, Inc.
10166
 
#
10167
 
# This file is part of GNU Libtool:
10168
 
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10169
 
#
10170
 
# This program is free software; you can redistribute it and/or modify
10171
 
# it under the terms of the GNU General Public License as published by
10172
 
# the Free Software Foundation; either version 2 of the License, or
10173
 
# (at your option) any later version.
10174
 
#
10175
 
# This program is distributed in the hope that it will be useful, but
10176
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
10177
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10178
 
# General Public License for more details.
10179
 
#
10180
 
# You should have received a copy of the GNU General Public License
10181
 
# along with this program; if not, write to the Free Software
10182
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10183
 
#
10184
 
# As a special exception to the GNU General Public License, if you
10185
 
# distribute this file as part of a program that contains a
10186
 
# configuration script generated by Autoconf, you may include it under
10187
 
# the same distribution terms that you use for the rest of that program.
10188
 
 
10189
 
# A sed program that does not truncate output.
10190
 
SED=$lt_SED
10191
 
 
10192
 
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
10193
 
Xsed="$SED -e 1s/^X//"
10194
 
 
10195
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
10196
 
# if CDPATH is set.
10197
 
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10198
 
 
10199
 
# The names of the tagged configurations supported by this script.
10200
 
available_tags=
10201
 
 
10202
 
# ### BEGIN LIBTOOL CONFIG],
10203
 
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
10204
 
 
10205
 
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10206
 
 
10207
 
# Shell to use when invoking shell scripts.
10208
 
SHELL=$lt_SHELL
10209
 
 
10210
 
# Whether or not to build shared libraries.
10211
 
build_libtool_libs=$enable_shared
10212
 
 
10213
 
# Whether or not to build static libraries.
10214
 
build_old_libs=$enable_static
10215
 
 
10216
 
# Whether or not to add -lc for building shared libraries.
10217
 
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
10218
 
 
10219
 
# Whether or not to disallow shared libs when runtime libs are static
10220
 
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
10221
 
 
10222
 
# Whether or not to optimize for fast installation.
10223
 
fast_install=$enable_fast_install
10224
 
 
10225
 
# The host system.
10226
 
host_alias=$host_alias
10227
 
host=$host
10228
 
host_os=$host_os
10229
 
 
10230
 
# The build system.
10231
 
build_alias=$build_alias
10232
 
build=$build
10233
 
build_os=$build_os
10234
 
 
10235
 
# An echo program that does not interpret backslashes.
10236
 
echo=$lt_echo
10237
 
 
10238
 
# The archiver.
10239
 
AR=$lt_AR
10240
 
AR_FLAGS=$lt_AR_FLAGS
10241
 
 
10242
 
# A C compiler.
10243
 
LTCC=$lt_LTCC
10244
 
 
10245
 
# LTCC compiler flags.
10246
 
LTCFLAGS=$lt_LTCFLAGS
10247
 
 
10248
 
# A language-specific compiler.
10249
 
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
10250
 
 
10251
 
# Is the compiler the GNU C compiler?
10252
 
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
10253
 
 
10254
 
# An ERE matcher.
10255
 
EGREP=$lt_EGREP
10256
 
 
10257
 
# The linker used to build libraries.
10258
 
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
10259
 
 
10260
 
# Whether we need hard or soft links.
10261
 
LN_S=$lt_LN_S
10262
 
 
10263
 
# A BSD-compatible nm program.
10264
 
NM=$lt_NM
10265
 
 
10266
 
# A symbol stripping program
10267
 
STRIP=$lt_STRIP
10268
 
 
10269
 
# Used to examine libraries when file_magic_cmd begins "file"
10270
 
MAGIC_CMD=$MAGIC_CMD
10271
 
 
10272
 
# Used on cygwin: DLL creation program.
10273
 
DLLTOOL="$DLLTOOL"
10274
 
 
10275
 
# Used on cygwin: object dumper.
10276
 
OBJDUMP="$OBJDUMP"
10277
 
 
10278
 
# Used on cygwin: assembler.
10279
 
AS="$AS"
10280
 
 
10281
 
# The name of the directory that contains temporary libtool files.
10282
 
objdir=$objdir
10283
 
 
10284
 
# How to create reloadable object files.
10285
 
reload_flag=$lt_reload_flag
10286
 
reload_cmds=$lt_reload_cmds
10287
 
 
10288
 
# How to pass a linker flag through the compiler.
10289
 
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
10290
 
 
10291
 
# Object file suffix (normally "o").
10292
 
objext="$ac_objext"
10293
 
 
10294
 
# Old archive suffix (normally "a").
10295
 
libext="$libext"
10296
 
 
10297
 
# Shared library suffix (normally ".so").
10298
 
shrext_cmds='$shrext_cmds'
10299
 
 
10300
 
# Executable file suffix (normally "").
10301
 
exeext="$exeext"
10302
 
 
10303
 
# Additional compiler flags for building library objects.
10304
 
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
10305
 
pic_mode=$pic_mode
10306
 
 
10307
 
# What is the maximum length of a command?
10308
 
max_cmd_len=$lt_cv_sys_max_cmd_len
10309
 
 
10310
 
# Does compiler simultaneously support -c and -o options?
10311
 
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
10312
 
 
10313
 
# Must we lock files when doing compilation?
10314
 
need_locks=$lt_need_locks
10315
 
 
10316
 
# Do we need the lib prefix for modules?
10317
 
need_lib_prefix=$need_lib_prefix
10318
 
 
10319
 
# Do we need a version for libraries?
10320
 
need_version=$need_version
10321
 
 
10322
 
# Whether dlopen is supported.
10323
 
dlopen_support=$enable_dlopen
10324
 
 
10325
 
# Whether dlopen of programs is supported.
10326
 
dlopen_self=$enable_dlopen_self
10327
 
 
10328
 
# Whether dlopen of statically linked programs is supported.
10329
 
dlopen_self_static=$enable_dlopen_self_static
10330
 
 
10331
 
# Compiler flag to prevent dynamic linking.
10332
 
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
10333
 
 
10334
 
# Compiler flag to turn off builtin functions.
10335
 
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
10336
 
 
10337
 
# Compiler flag to allow reflexive dlopens.
10338
 
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
10339
 
 
10340
 
# Compiler flag to generate shared objects directly from archives.
10341
 
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
10342
 
 
10343
 
# Compiler flag to generate thread-safe objects.
10344
 
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
10345
 
 
10346
 
# Library versioning type.
10347
 
version_type=$version_type
10348
 
 
10349
 
# Format of library name prefix.
10350
 
libname_spec=$lt_libname_spec
10351
 
 
10352
 
# List of archive names.  First name is the real one, the rest are links.
10353
 
# The last name is the one that the linker finds with -lNAME.
10354
 
library_names_spec=$lt_library_names_spec
10355
 
 
10356
 
# The coded name of the library, if different from the real name.
10357
 
soname_spec=$lt_soname_spec
10358
 
 
10359
 
# Commands used to build and install an old-style archive.
10360
 
RANLIB=$lt_RANLIB
10361
 
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
10362
 
old_postinstall_cmds=$lt_old_postinstall_cmds
10363
 
old_postuninstall_cmds=$lt_old_postuninstall_cmds
10364
 
 
10365
 
# Create an old-style archive from a shared archive.
10366
 
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
10367
 
 
10368
 
# Create a temporary old-style archive to link instead of a shared archive.
10369
 
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
10370
 
 
10371
 
# Commands used to build and install a shared archive.
10372
 
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
10373
 
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
10374
 
postinstall_cmds=$lt_postinstall_cmds
10375
 
postuninstall_cmds=$lt_postuninstall_cmds
10376
 
 
10377
 
# Commands used to build a loadable module (assumed same as above if empty)
10378
 
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
10379
 
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
10380
 
 
10381
 
# Commands to strip libraries.
10382
 
old_striplib=$lt_old_striplib
10383
 
striplib=$lt_striplib
10384
 
 
10385
 
# Dependencies to place before the objects being linked to create a
10386
 
# shared library.
10387
 
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
10388
 
 
10389
 
# Dependencies to place after the objects being linked to create a
10390
 
# shared library.
10391
 
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
10392
 
 
10393
 
# Dependencies to place before the objects being linked to create a
10394
 
# shared library.
10395
 
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
10396
 
 
10397
 
# Dependencies to place after the objects being linked to create a
10398
 
# shared library.
10399
 
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
10400
 
 
10401
 
# The library search path used internally by the compiler when linking
10402
 
# a shared library.
10403
 
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
10404
 
 
10405
 
# Method to check whether dependent libraries are shared objects.
10406
 
deplibs_check_method=$lt_deplibs_check_method
10407
 
 
10408
 
# Command to use when deplibs_check_method == file_magic.
10409
 
file_magic_cmd=$lt_file_magic_cmd
10410
 
 
10411
 
# Flag that allows shared libraries with undefined symbols to be built.
10412
 
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
10413
 
 
10414
 
# Flag that forces no undefined symbols.
10415
 
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
10416
 
 
10417
 
# Commands used to finish a libtool library installation in a directory.
10418
 
finish_cmds=$lt_finish_cmds
10419
 
 
10420
 
# Same as above, but a single script fragment to be evaled but not shown.
10421
 
finish_eval=$lt_finish_eval
10422
 
 
10423
 
# Take the output of nm and produce a listing of raw symbols and C names.
10424
 
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10425
 
 
10426
 
# Transform the output of nm in a proper C declaration
10427
 
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10428
 
 
10429
 
# Transform the output of nm in a C name address pair
10430
 
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10431
 
 
10432
 
# This is the shared library runtime path variable.
10433
 
runpath_var=$runpath_var
10434
 
 
10435
 
# This is the shared library path variable.
10436
 
shlibpath_var=$shlibpath_var
10437
 
 
10438
 
# Is shlibpath searched before the hard-coded library search path?
10439
 
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10440
 
 
10441
 
# How to hardcode a shared library path into an executable.
10442
 
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
10443
 
 
10444
 
# Whether we should hardcode library paths into libraries.
10445
 
hardcode_into_libs=$hardcode_into_libs
10446
 
 
10447
 
# Flag to hardcode \$libdir into a binary during linking.
10448
 
# This must work even if \$libdir does not exist.
10449
 
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
10450
 
 
10451
 
# If ld is used when linking, flag to hardcode \$libdir into
10452
 
# a binary during linking. This must work even if \$libdir does
10453
 
# not exist.
10454
 
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
10455
 
 
10456
 
# Whether we need a single -rpath flag with a separated argument.
10457
 
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
10458
 
 
10459
 
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10460
 
# resulting binary.
10461
 
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
10462
 
 
10463
 
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10464
 
# resulting binary.
10465
 
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
10466
 
 
10467
 
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10468
 
# the resulting binary.
10469
 
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
10470
 
 
10471
 
# Set to yes if building a shared library automatically hardcodes DIR into the library
10472
 
# and all subsequent libraries and executables linked against it.
10473
 
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
10474
 
 
10475
 
# Variables whose values should be saved in libtool wrapper scripts and
10476
 
# restored at relink time.
10477
 
variables_saved_for_relink="$variables_saved_for_relink"
10478
 
 
10479
 
# Whether libtool must link a program against all its dependency libraries.
10480
 
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
10481
 
 
10482
 
# Compile-time system search path for libraries
10483
 
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10484
 
 
10485
 
# Run-time system search path for libraries
10486
 
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10487
 
 
10488
 
# Fix the shell variable \$srcfile for the compiler.
10489
 
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
10490
 
 
10491
 
# Set to yes if exported symbols are required.
10492
 
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
10493
 
 
10494
 
# The commands to list exported symbols.
10495
 
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
10496
 
 
10497
 
# The commands to extract the exported symbol list from a shared archive.
10498
 
extract_expsyms_cmds=$lt_extract_expsyms_cmds
10499
 
 
10500
 
# Symbols that should not be listed in the preloaded symbols.
10501
 
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
10502
 
 
10503
 
# Symbols that must always be exported.
10504
 
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
10505
 
 
10506
 
ifelse([$1],[],
10507
 
[# ### END LIBTOOL CONFIG],
10508
 
[# ### END LIBTOOL TAG CONFIG: $tagname])
10509
 
 
10510
 
__EOF__
10511
 
 
10512
 
ifelse([$1],[], [
10513
 
  case $host_os in
10514
 
  aix3*)
10515
 
    cat <<\EOF >> "$cfgfile"
10516
 
 
10517
 
# AIX sometimes has problems with the GCC collect2 program.  For some
10518
 
# reason, if we set the COLLECT_NAMES environment variable, the problems
10519
 
# vanish in a puff of smoke.
10520
 
if test "X${COLLECT_NAMES+set}" != Xset; then
10521
 
  COLLECT_NAMES=
10522
 
  export COLLECT_NAMES
10523
 
fi
10524
 
EOF
10525
 
    ;;
10526
 
  esac
10527
 
 
10528
 
  # We use sed instead of cat because bash on DJGPP gets confused if
10529
 
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10530
 
  # text mode, it properly converts lines to CR/LF.  This bash problem
10531
 
  # is reportedly fixed, but why not run on old versions too?
10532
 
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10533
 
 
10534
 
  mv -f "$cfgfile" "$ofile" || \
10535
 
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10536
 
  chmod +x "$ofile"
10537
 
])
10538
 
else
10539
 
  # If there is no Makefile yet, we rely on a make rule to execute
10540
 
  # `config.status --recheck' to rerun these tests and create the
10541
 
  # libtool script then.
10542
 
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10543
 
  if test -f "$ltmain_in"; then
10544
 
    test -f Makefile && make "$ltmain"
10545
 
  fi
10546
 
fi
10547
 
])# AC_LIBTOOL_CONFIG
10548
 
 
10549
 
 
10550
 
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
10551
 
# -------------------------------------------
10552
 
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
10553
 
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10554
 
 
10555
 
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
10556
 
 
10557
 
if test "$GCC" = yes; then
10558
 
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
10559
 
 
10560
 
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
10561
 
    lt_cv_prog_compiler_rtti_exceptions,
10562
 
    [-fno-rtti -fno-exceptions], [],
10563
 
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
10564
 
fi
10565
 
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
10566
 
 
10567
 
 
10568
 
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10569
 
# ---------------------------------
10570
 
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
10571
 
[AC_REQUIRE([AC_CANONICAL_HOST])
10572
 
AC_REQUIRE([AC_PROG_NM])
10573
 
AC_REQUIRE([AC_OBJEXT])
10574
 
# Check for command to grab the raw symbol name followed by C symbol from nm.
10575
 
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
10576
 
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
10577
 
[
10578
 
# These are sane defaults that work on at least a few old systems.
10579
 
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
10580
 
 
10581
 
# Character class describing NM global symbol codes.
10582
 
symcode='[[BCDEGRST]]'
10583
 
 
10584
 
# Regexp to match symbols that can be accessed directly from C.
10585
 
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
10586
 
 
10587
 
# Transform an extracted symbol line into a proper C declaration
10588
 
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
10589
 
 
10590
 
# Transform an extracted symbol line into symbol name and symbol address
10591
 
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'"
10592
 
 
10593
 
# Define system-specific variables.
10594
 
case $host_os in
10595
 
aix*)
10596
 
  symcode='[[BCDT]]'
10597
 
  ;;
10598
 
cygwin* | mingw* | pw32*)
10599
 
  symcode='[[ABCDGISTW]]'
10600
 
  ;;
10601
 
hpux*) # Its linker distinguishes data from code symbols
10602
 
  if test "$host_cpu" = ia64; then
10603
 
    symcode='[[ABCDEGRST]]'
10604
 
  fi
10605
 
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10606
 
  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'"
10607
 
  ;;
10608
 
linux* | k*bsd*-gnu)
10609
 
  if test "$host_cpu" = ia64; then
10610
 
    symcode='[[ABCDGIRSTW]]'
10611
 
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10612
 
    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'"
10613
 
  fi
10614
 
  ;;
10615
 
irix* | nonstopux*)
10616
 
  symcode='[[BCDEGRST]]'
10617
 
  ;;
10618
 
osf*)
10619
 
  symcode='[[BCDEGQRST]]'
10620
 
  ;;
10621
 
solaris*)
10622
 
  symcode='[[BDRT]]'
10623
 
  ;;
10624
 
sco3.2v5*)
10625
 
  symcode='[[DT]]'
10626
 
  ;;
10627
 
sysv4.2uw2*)
10628
 
  symcode='[[DT]]'
10629
 
  ;;
10630
 
sysv5* | sco5v6* | unixware* | OpenUNIX*)
10631
 
  symcode='[[ABDT]]'
10632
 
  ;;
10633
 
sysv4)
10634
 
  symcode='[[DFNSTU]]'
10635
 
  ;;
10636
 
esac
10637
 
 
10638
 
# Handle CRLF in mingw tool chain
10639
 
opt_cr=
10640
 
case $build_os in
10641
 
mingw*)
10642
 
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10643
 
  ;;
10644
 
esac
10645
 
 
10646
 
# If we're using GNU nm, then use its standard symbol codes.
10647
 
case `$NM -V 2>&1` in
10648
 
*GNU* | *'with BFD'*)
10649
 
  symcode='[[ABCDGIRSTW]]' ;;
10650
 
esac
10651
 
 
10652
 
# Try without a prefix undercore, then with it.
10653
 
for ac_symprfx in "" "_"; do
10654
 
 
10655
 
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
10656
 
  symxfrm="\\1 $ac_symprfx\\2 \\2"
10657
 
 
10658
 
  # Write the raw and C identifiers.
10659
 
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
10660
 
 
10661
 
  # Check to see that the pipe works correctly.
10662
 
  pipe_works=no
10663
 
 
10664
 
  rm -f conftest*
10665
 
  cat > conftest.$ac_ext <<EOF
10666
 
#ifdef __cplusplus
10667
 
extern "C" {
10668
 
#endif
10669
 
char nm_test_var;
10670
 
void nm_test_func(){}
10671
 
#ifdef __cplusplus
10672
 
}
10673
 
#endif
10674
 
int main(){nm_test_var='a';nm_test_func();return(0);}
10675
 
EOF
10676
 
 
10677
 
  if AC_TRY_EVAL(ac_compile); then
10678
 
    # Now try to grab the symbols.
10679
 
    nlist=conftest.nm
10680
 
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10681
 
      # Try sorting and uniquifying the output.
10682
 
      if sort "$nlist" | uniq > "$nlist"T; then
10683
 
        mv -f "$nlist"T "$nlist"
10684
 
      else
10685
 
        rm -f "$nlist"T
10686
 
      fi
10687
 
 
10688
 
      # Make sure that we snagged all the symbols we need.
10689
 
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
10690
 
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
10691
 
          cat <<EOF > conftest.$ac_ext
10692
 
#ifdef __cplusplus
10693
 
extern "C" {
10694
 
#endif
10695
 
 
10696
 
EOF
10697
 
          # Now generate the symbol file.
10698
 
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10699
 
 
10700
 
          cat <<EOF >> conftest.$ac_ext
10701
 
#if defined (__STDC__) && __STDC__
10702
 
# define lt_ptr_t void *
10703
 
#else
10704
 
# define lt_ptr_t char *
10705
 
# define const
10706
 
#endif
10707
 
 
10708
 
/* The mapping between symbol names and symbols. */
10709
 
const struct {
10710
 
  const char *name;
10711
 
  lt_ptr_t address;
10712
 
}
10713
 
lt_preloaded_symbols[[]] =
10714
 
{
10715
 
EOF
10716
 
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10717
 
          cat <<\EOF >> conftest.$ac_ext
10718
 
  {0, (lt_ptr_t) 0}
10719
 
};
10720
 
 
10721
 
#ifdef __cplusplus
10722
 
}
10723
 
#endif
10724
 
EOF
10725
 
          # Now try linking the two files.
10726
 
          mv conftest.$ac_objext conftstm.$ac_objext
10727
 
          lt_save_LIBS="$LIBS"
10728
 
          lt_save_CFLAGS="$CFLAGS"
10729
 
          LIBS="conftstm.$ac_objext"
10730
 
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10731
 
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10732
 
            pipe_works=yes
10733
 
          fi
10734
 
          LIBS="$lt_save_LIBS"
10735
 
          CFLAGS="$lt_save_CFLAGS"
10736
 
        else
10737
 
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10738
 
        fi
10739
 
      else
10740
 
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10741
 
      fi
10742
 
    else
10743
 
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10744
 
    fi
10745
 
  else
10746
 
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10747
 
    cat conftest.$ac_ext >&5
10748
 
  fi
10749
 
  rm -f conftest* conftst*
10750
 
 
10751
 
  # Do not use the global_symbol_pipe unless it works.
10752
 
  if test "$pipe_works" = yes; then
10753
 
    break
10754
 
  else
10755
 
    lt_cv_sys_global_symbol_pipe=
10756
 
  fi
10757
 
done
10758
 
])
10759
 
if test -z "$lt_cv_sys_global_symbol_pipe"; then
10760
 
  lt_cv_sys_global_symbol_to_cdecl=
10761
 
fi
10762
 
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10763
 
  AC_MSG_RESULT(failed)
10764
 
else
10765
 
  AC_MSG_RESULT(ok)
10766
 
fi
10767
 
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10768
 
 
10769
 
 
10770
 
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
10771
 
# ---------------------------------------
10772
 
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
10773
 
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10774
 
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10775
 
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10776
 
 
10777
 
AC_MSG_CHECKING([for $compiler option to produce PIC])
10778
 
 ifelse([$1],[CXX],[
10779
 
  # C++ specific cases for pic, static, wl, etc.
10780
 
  if test "$GXX" = yes; then
10781
 
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10782
 
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10783
 
 
10784
 
    case $host_os in
10785
 
    aix*)
10786
 
      # All AIX code is PIC.
10787
 
      if test "$host_cpu" = ia64; then
10788
 
        # AIX 5 now supports IA64 processor
10789
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10790
 
      fi
10791
 
      ;;
10792
 
    amigaos*)
10793
 
      # FIXME: we need at least 68020 code to build shared libraries, but
10794
 
      # adding the `-m68020' flag to GCC prevents building anything better,
10795
 
      # like `-m68040'.
10796
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10797
 
      ;;
10798
 
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10799
 
      # PIC is the default for these OSes.
10800
 
      ;;
10801
 
    mingw* | os2* | pw32*)
10802
 
      # This hack is so that the source file can tell whether it is being
10803
 
      # built for inclusion in a dll (and should export symbols for example).
10804
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10805
 
      ;;
10806
 
    darwin* | rhapsody*)
10807
 
      # PIC is the default on this platform
10808
 
      # Common symbols not allowed in MH_DYLIB files
10809
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10810
 
      ;;
10811
 
    *djgpp*)
10812
 
      # DJGPP does not support shared libraries at all
10813
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10814
 
      ;;
10815
 
    interix3*)
10816
 
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10817
 
      # Instead, we relocate shared libraries at runtime.
10818
 
      ;;
10819
 
    sysv4*MP*)
10820
 
      if test -d /usr/nec; then
10821
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10822
 
      fi
10823
 
      ;;
10824
 
    hpux*)
10825
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10826
 
      # not for PA HP-UX.
10827
 
      case $host_cpu in
10828
 
      hppa*64*|ia64*)
10829
 
        ;;
10830
 
      *)
10831
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10832
 
        ;;
10833
 
      esac
10834
 
      ;;
10835
 
    *)
10836
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10837
 
      ;;
10838
 
    esac
10839
 
  else
10840
 
    case $host_os in
10841
 
      aix4* | aix5*)
10842
 
        # All AIX code is PIC.
10843
 
        if test "$host_cpu" = ia64; then
10844
 
          # AIX 5 now supports IA64 processor
10845
 
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10846
 
        else
10847
 
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10848
 
        fi
10849
 
        ;;
10850
 
      chorus*)
10851
 
        case $cc_basename in
10852
 
        cxch68*)
10853
 
          # Green Hills C++ Compiler
10854
 
          # _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"
10855
 
          ;;
10856
 
        esac
10857
 
        ;;
10858
 
       darwin*)
10859
 
         # PIC is the default on this platform
10860
 
         # Common symbols not allowed in MH_DYLIB files
10861
 
         case $cc_basename in
10862
 
           xlc*)
10863
 
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
10864
 
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10865
 
           ;;
10866
 
         esac
10867
 
       ;;
10868
 
      dgux*)
10869
 
        case $cc_basename in
10870
 
          ec++*)
10871
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10872
 
            ;;
10873
 
          ghcx*)
10874
 
            # Green Hills C++ Compiler
10875
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10876
 
            ;;
10877
 
          *)
10878
 
            ;;
10879
 
        esac
10880
 
        ;;
10881
 
      freebsd* | dragonfly*)
10882
 
        # FreeBSD uses GNU C++
10883
 
        ;;
10884
 
      hpux9* | hpux10* | hpux11*)
10885
 
        case $cc_basename in
10886
 
          CC*)
10887
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10888
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10889
 
            if test "$host_cpu" != ia64; then
10890
 
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10891
 
            fi
10892
 
            ;;
10893
 
          aCC*)
10894
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10895
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10896
 
            case $host_cpu in
10897
 
            hppa*64*|ia64*)
10898
 
              # +Z the default
10899
 
              ;;
10900
 
            *)
10901
 
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10902
 
              ;;
10903
 
            esac
10904
 
            ;;
10905
 
          *)
10906
 
            ;;
10907
 
        esac
10908
 
        ;;
10909
 
      interix*)
10910
 
        # This is c89, which is MS Visual C++ (no shared libs)
10911
 
        # Anyone wants to do a port?
10912
 
        ;;
10913
 
      irix5* | irix6* | nonstopux*)
10914
 
        case $cc_basename in
10915
 
          CC*)
10916
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10917
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10918
 
            # CC pic flag -KPIC is the default.
10919
 
            ;;
10920
 
          *)
10921
 
            ;;
10922
 
        esac
10923
 
        ;;
10924
 
      linux* | k*bsd*-gnu)
10925
 
        case $cc_basename in
10926
 
          KCC*)
10927
 
            # KAI C++ Compiler
10928
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10929
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10930
 
            ;;
10931
 
          icpc* | ecpc*)
10932
 
            # Intel C++
10933
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10934
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10935
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10936
 
            ;;
10937
 
          pgCC*)
10938
 
            # Portland Group C++ compiler.
10939
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10940
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
10941
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10942
 
            ;;
10943
 
          cxx*)
10944
 
            # Compaq C++
10945
 
            # Make sure the PIC flag is empty.  It appears that all Alpha
10946
 
            # Linux and Compaq Tru64 Unix objects are PIC.
10947
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10948
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10949
 
            ;;
10950
 
          *)
10951
 
            ;;
10952
 
        esac
10953
 
        ;;
10954
 
      lynxos*)
10955
 
        ;;
10956
 
      m88k*)
10957
 
        ;;
10958
 
      mvs*)
10959
 
        case $cc_basename in
10960
 
          cxx*)
10961
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10962
 
            ;;
10963
 
          *)
10964
 
            ;;
10965
 
        esac
10966
 
        ;;
10967
 
      netbsd* | netbsdelf*-gnu)
10968
 
        ;;
10969
 
      osf3* | osf4* | osf5*)
10970
 
        case $cc_basename in
10971
 
          KCC*)
10972
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10973
 
            ;;
10974
 
          RCC*)
10975
 
            # Rational C++ 2.4.1
10976
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10977
 
            ;;
10978
 
          cxx*)
10979
 
            # Digital/Compaq C++
10980
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10981
 
            # Make sure the PIC flag is empty.  It appears that all Alpha
10982
 
            # Linux and Compaq Tru64 Unix objects are PIC.
10983
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10984
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10985
 
            ;;
10986
 
          *)
10987
 
            ;;
10988
 
        esac
10989
 
        ;;
10990
 
      psos*)
10991
 
        ;;
10992
 
      solaris*)
10993
 
        case $cc_basename in
10994
 
          CC*)
10995
 
            # Sun C++ 4.2, 5.x and Centerline C++
10996
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10997
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10998
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10999
 
            ;;
11000
 
          gcx*)
11001
 
            # Green Hills C++ Compiler
11002
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
11003
 
            ;;
11004
 
          *)
11005
 
            ;;
11006
 
        esac
11007
 
        ;;
11008
 
      sunos4*)
11009
 
        case $cc_basename in
11010
 
          CC*)
11011
 
            # Sun C++ 4.x
11012
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
11013
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11014
 
            ;;
11015
 
          lcc*)
11016
 
            # Lucid
11017
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
11018
 
            ;;
11019
 
          *)
11020
 
            ;;
11021
 
        esac
11022
 
        ;;
11023
 
      tandem*)
11024
 
        case $cc_basename in
11025
 
          NCC*)
11026
 
            # NonStop-UX NCC 3.20
11027
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11028
 
            ;;
11029
 
          *)
11030
 
            ;;
11031
 
        esac
11032
 
        ;;
11033
 
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11034
 
        case $cc_basename in
11035
 
          CC*)
11036
 
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11037
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11038
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11039
 
            ;;
11040
 
        esac
11041
 
        ;;
11042
 
      vxworks*)
11043
 
        ;;
11044
 
      *)
11045
 
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11046
 
        ;;
11047
 
    esac
11048
 
  fi
11049
 
],
11050
 
[
11051
 
  if test "$GCC" = yes; then
11052
 
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11053
 
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
11054
 
 
11055
 
    case $host_os in
11056
 
      aix*)
11057
 
      # All AIX code is PIC.
11058
 
      if test "$host_cpu" = ia64; then
11059
 
        # AIX 5 now supports IA64 processor
11060
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11061
 
      fi
11062
 
      ;;
11063
 
 
11064
 
    amigaos*)
11065
 
      # FIXME: we need at least 68020 code to build shared libraries, but
11066
 
      # adding the `-m68020' flag to GCC prevents building anything better,
11067
 
      # like `-m68040'.
11068
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
11069
 
      ;;
11070
 
 
11071
 
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11072
 
      # PIC is the default for these OSes.
11073
 
      ;;
11074
 
 
11075
 
    mingw* | pw32* | os2*)
11076
 
      # This hack is so that the source file can tell whether it is being
11077
 
      # built for inclusion in a dll (and should export symbols for example).
11078
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
11079
 
      ;;
11080
 
 
11081
 
    darwin* | rhapsody*)
11082
 
      # PIC is the default on this platform
11083
 
      # Common symbols not allowed in MH_DYLIB files
11084
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
11085
 
      ;;
11086
 
 
11087
 
    interix3*)
11088
 
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
11089
 
      # Instead, we relocate shared libraries at runtime.
11090
 
      ;;
11091
 
 
11092
 
    msdosdjgpp*)
11093
 
      # Just because we use GCC doesn't mean we suddenly get shared libraries
11094
 
      # on systems that don't support them.
11095
 
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11096
 
      enable_shared=no
11097
 
      ;;
11098
 
 
11099
 
    sysv4*MP*)
11100
 
      if test -d /usr/nec; then
11101
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
11102
 
      fi
11103
 
      ;;
11104
 
 
11105
 
    hpux*)
11106
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11107
 
      # not for PA HP-UX.
11108
 
      case $host_cpu in
11109
 
      hppa*64*|ia64*)
11110
 
        # +Z the default
11111
 
        ;;
11112
 
      *)
11113
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
11114
 
        ;;
11115
 
      esac
11116
 
      ;;
11117
 
 
11118
 
    *)
11119
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
11120
 
      ;;
11121
 
    esac
11122
 
  else
11123
 
    # PORTME Check for flag to pass linker flags through the system compiler.
11124
 
    case $host_os in
11125
 
    aix*)
11126
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11127
 
      if test "$host_cpu" = ia64; then
11128
 
        # AIX 5 now supports IA64 processor
11129
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11130
 
      else
11131
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
11132
 
      fi
11133
 
      ;;
11134
 
      darwin*)
11135
 
        # PIC is the default on this platform
11136
 
        # Common symbols not allowed in MH_DYLIB files
11137
 
       case $cc_basename in
11138
 
         xlc*)
11139
 
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
11140
 
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11141
 
         ;;
11142
 
       esac
11143
 
       ;;
11144
 
 
11145
 
    mingw* | pw32* | os2*)
11146
 
      # This hack is so that the source file can tell whether it is being
11147
 
      # built for inclusion in a dll (and should export symbols for example).
11148
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
11149
 
      ;;
11150
 
 
11151
 
    hpux9* | hpux10* | hpux11*)
11152
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11153
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11154
 
      # not for PA HP-UX.
11155
 
      case $host_cpu in
11156
 
      hppa*64*|ia64*)
11157
 
        # +Z the default
11158
 
        ;;
11159
 
      *)
11160
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
11161
 
        ;;
11162
 
      esac
11163
 
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
11164
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
11165
 
      ;;
11166
 
 
11167
 
    irix5* | irix6* | nonstopux*)
11168
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11169
 
      # PIC (with -KPIC) is the default.
11170
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
11171
 
      ;;
11172
 
 
11173
 
    newsos6)
11174
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11175
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11176
 
      ;;
11177
 
 
11178
 
    linux* | k*bsd*-gnu)
11179
 
      case $cc_basename in
11180
 
      icc* | ecc*)
11181
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11182
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11183
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
11184
 
        ;;
11185
 
      pgcc* | pgf77* | pgf90* | pgf95*)
11186
 
        # Portland Group compilers (*not* the Pentium gcc compiler,
11187
 
        # which looks to be a dead project)
11188
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11189
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
11190
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11191
 
        ;;
11192
 
      ccc*)
11193
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11194
 
        # All Alpha code is PIC.
11195
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
11196
 
        ;;
11197
 
      esac
11198
 
      ;;
11199
 
 
11200
 
    osf3* | osf4* | osf5*)
11201
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11202
 
      # All OSF/1 code is PIC.
11203
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
11204
 
      ;;
11205
 
 
11206
 
    solaris*)
11207
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11208
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11209
 
      case $cc_basename in
11210
 
      f77* | f90* | f95*)
11211
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
11212
 
      *)
11213
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
11214
 
      esac
11215
 
      ;;
11216
 
 
11217
 
    sunos4*)
11218
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
11219
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
11220
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11221
 
      ;;
11222
 
 
11223
 
    sysv4 | sysv4.2uw2* | sysv4.3*)
11224
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11225
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11226
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11227
 
      ;;
11228
 
 
11229
 
    sysv4*MP*)
11230
 
      if test -d /usr/nec ;then
11231
 
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
11232
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11233
 
      fi
11234
 
      ;;
11235
 
 
11236
 
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11237
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11238
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11239
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11240
 
      ;;
11241
 
 
11242
 
    unicos*)
11243
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11244
 
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11245
 
      ;;
11246
 
 
11247
 
    uts4*)
11248
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
11249
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11250
 
      ;;
11251
 
 
11252
 
    *)
11253
 
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11254
 
      ;;
11255
 
    esac
11256
 
  fi
11257
 
])
11258
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
11259
 
 
11260
 
#
11261
 
# Check to make sure the PIC flag actually works.
11262
 
#
11263
 
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
11264
 
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
11265
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
11266
 
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
11267
 
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
11268
 
     "" | " "*) ;;
11269
 
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
11270
 
     esac],
11271
 
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
11272
 
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
11273
 
fi
11274
 
case $host_os in
11275
 
  # For platforms which do not support PIC, -DPIC is meaningless:
11276
 
  *djgpp*)
11277
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
11278
 
    ;;
11279
 
  *)
11280
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
11281
 
    ;;
11282
 
esac
11283
 
 
11284
 
#
11285
 
# Check to make sure the static flag actually works.
11286
 
#
11287
 
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
11288
 
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
11289
 
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
11290
 
  $lt_tmp_static_flag,
11291
 
  [],
11292
 
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
11293
 
])
11294
 
 
11295
 
 
11296
 
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
11297
 
# ------------------------------------
11298
 
# See if the linker supports building shared libraries.
11299
 
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
11300
 
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
11301
 
ifelse([$1],[CXX],[
11302
 
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11303
 
  case $host_os in
11304
 
  aix4* | aix5*)
11305
 
    # If we're using GNU nm, then we don't want the "-C" option.
11306
 
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
11307
 
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
11308
 
      _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'
11309
 
    else
11310
 
      _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'
11311
 
    fi
11312
 
    ;;
11313
 
  pw32*)
11314
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
11315
 
  ;;
11316
 
  cygwin* | mingw*)
11317
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
11318
 
  ;;
11319
 
  linux* | k*bsd*-gnu)
11320
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
11321
 
  ;;
11322
 
  *)
11323
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11324
 
  ;;
11325
 
  esac
11326
 
],[
11327
 
  runpath_var=
11328
 
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
11329
 
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11330
 
  _LT_AC_TAGVAR(archive_cmds, $1)=
11331
 
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
11332
 
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
11333
 
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
11334
 
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
11335
 
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11336
 
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
11337
 
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11338
 
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
11339
 
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
11340
 
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
11341
 
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11342
 
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11343
 
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
11344
 
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
11345
 
  _LT_AC_TAGVAR(module_cmds, $1)=
11346
 
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
11347
 
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
11348
 
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11349
 
  # include_expsyms should be a list of space-separated symbols to be *always*
11350
 
  # included in the symbol list
11351
 
  _LT_AC_TAGVAR(include_expsyms, $1)=
11352
 
  # exclude_expsyms can be an extended regexp of symbols to exclude
11353
 
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
11354
 
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
11355
 
  # as well as any symbol that contains `d'.
11356
 
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
11357
 
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11358
 
  # platforms (ab)use it in PIC code, but their linkers get confused if
11359
 
  # the symbol is explicitly referenced.  Since portable code cannot
11360
 
  # rely on this symbol name, it's probably fine to never include it in
11361
 
  # preloaded symbol tables.
11362
 
  extract_expsyms_cmds=
11363
 
  # Just being paranoid about ensuring that cc_basename is set.
11364
 
  _LT_CC_BASENAME([$compiler])
11365
 
  case $host_os in
11366
 
  cygwin* | mingw* | pw32*)
11367
 
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
11368
 
    # When not using gcc, we currently assume that we are using
11369
 
    # Microsoft Visual C++.
11370
 
    if test "$GCC" != yes; then
11371
 
      with_gnu_ld=no
11372
 
    fi
11373
 
    ;;
11374
 
  interix*)
11375
 
    # we just hope/assume this is gcc and not c89 (= MSVC++)
11376
 
    with_gnu_ld=yes
11377
 
    ;;
11378
 
  openbsd*)
11379
 
    with_gnu_ld=no
11380
 
    ;;
11381
 
  esac
11382
 
 
11383
 
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
11384
 
  if test "$with_gnu_ld" = yes; then
11385
 
    # If archive_cmds runs LD, not CC, wlarc should be empty
11386
 
    wlarc='${wl}'
11387
 
 
11388
 
    # Set some defaults for GNU ld with shared library support. These
11389
 
    # are reset later if shared libraries are not supported. Putting them
11390
 
    # here allows them to be overridden if necessary.
11391
 
    runpath_var=LD_RUN_PATH
11392
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
11393
 
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
11394
 
    # ancient GNU ld didn't support --whole-archive et. al.
11395
 
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
11396
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11397
 
      else
11398
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11399
 
    fi
11400
 
    supports_anon_versioning=no
11401
 
    case `$LD -v 2>/dev/null` in
11402
 
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
11403
 
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11404
 
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11405
 
      *\ 2.11.*) ;; # other 2.11 versions
11406
 
      *) supports_anon_versioning=yes ;;
11407
 
    esac
11408
 
 
11409
 
    # See if GNU ld supports shared libraries.
11410
 
    case $host_os in
11411
 
    aix3* | aix4* | aix5*)
11412
 
      # On AIX/PPC, the GNU linker is very broken
11413
 
      if test "$host_cpu" != ia64; then
11414
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
11415
 
        cat <<EOF 1>&2
11416
 
 
11417
 
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
11418
 
*** to be unable to reliably create shared libraries on AIX.
11419
 
*** Therefore, libtool is disabling shared libraries support.  If you
11420
 
*** really care for shared libraries, you may want to modify your PATH
11421
 
*** so that a non-GNU linker is found, and then restart.
11422
 
 
11423
 
EOF
11424
 
      fi
11425
 
      ;;
11426
 
 
11427
 
    amigaos*)
11428
 
      _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)'
11429
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11430
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11431
 
 
11432
 
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
11433
 
      # that the semantics of dynamic libraries on AmigaOS, at least up
11434
 
      # to version 4, is to share data among multiple programs linked
11435
 
      # with the same dynamic library.  Since this doesn't match the
11436
 
      # behavior of shared libraries on other platforms, we can't use
11437
 
      # them.
11438
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11439
 
      ;;
11440
 
 
11441
 
    beos*)
11442
 
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11443
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11444
 
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11445
 
        # support --undefined.  This deserves some investigation.  FIXME
11446
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11447
 
      else
11448
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
11449
 
      fi
11450
 
      ;;
11451
 
 
11452
 
    cygwin* | mingw* | pw32*)
11453
 
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
11454
 
      # as there is no search path for DLLs.
11455
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11456
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11457
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
11458
 
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11459
 
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
11460
 
 
11461
 
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
11462
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11463
 
        # If the export-symbols file already is a .def file (1st line
11464
 
        # is EXPORTS), use it as is; otherwise, prepend...
11465
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11466
 
          cp $export_symbols $output_objdir/$soname.def;
11467
 
        else
11468
 
          echo EXPORTS > $output_objdir/$soname.def;
11469
 
          cat $export_symbols >> $output_objdir/$soname.def;
11470
 
        fi~
11471
 
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11472
 
      else
11473
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
11474
 
      fi
11475
 
      ;;
11476
 
 
11477
 
    interix3*)
11478
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
11479
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11480
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11481
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11482
 
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11483
 
      # Instead, shared libraries are loaded at an image base (0x10000000 by
11484
 
      # default) and relocated if they conflict, which is a slow very memory
11485
 
      # consuming and fragmenting process.  To avoid this, we pick a random,
11486
 
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11487
 
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11488
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11489
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11490
 
      ;;
11491
 
 
11492
 
    linux* | k*bsd*-gnu)
11493
 
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11494
 
        tmp_addflag=
11495
 
        case $cc_basename,$host_cpu in
11496
 
        pgcc*)                          # Portland Group C compiler
11497
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11498
 
          tmp_addflag=' $pic_flag'
11499
 
          ;;
11500
 
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
11501
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11502
 
          tmp_addflag=' $pic_flag -Mnomain' ;;
11503
 
        ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
11504
 
          tmp_addflag=' -i_dynamic' ;;
11505
 
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11506
 
          tmp_addflag=' -i_dynamic -nofor_main' ;;
11507
 
        ifc* | ifort*)                  # Intel Fortran compiler
11508
 
          tmp_addflag=' -nofor_main' ;;
11509
 
        esac
11510
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11511
 
 
11512
 
        if test $supports_anon_versioning = yes; then
11513
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
11514
 
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11515
 
  $echo "local: *; };" >> $output_objdir/$libname.ver~
11516
 
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
11517
 
        fi
11518
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=no
11519
 
      else
11520
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
11521
 
      fi
11522
 
      ;;
11523
 
 
11524
 
    netbsd* | netbsdelf*-gnu)
11525
 
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11526
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11527
 
        wlarc=
11528
 
      else
11529
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11530
 
        _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'
11531
 
      fi
11532
 
      ;;
11533
 
 
11534
 
    solaris*)
11535
 
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
11536
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
11537
 
        cat <<EOF 1>&2
11538
 
 
11539
 
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11540
 
*** create shared libraries on Solaris systems.  Therefore, libtool
11541
 
*** is disabling shared libraries support.  We urge you to upgrade GNU
11542
 
*** binutils to release 2.9.1 or newer.  Another option is to modify
11543
 
*** your PATH or compiler configuration so that the native linker is
11544
 
*** used, and then restart.
11545
 
 
11546
 
EOF
11547
 
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11548
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11549
 
        _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'
11550
 
      else
11551
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
11552
 
      fi
11553
 
      ;;
11554
 
 
11555
 
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11556
 
      case `$LD -v 2>&1` in
11557
 
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
11558
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
11559
 
        cat <<_LT_EOF 1>&2
11560
 
 
11561
 
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
11562
 
*** reliably create shared libraries on SCO systems.  Therefore, libtool
11563
 
*** is disabling shared libraries support.  We urge you to upgrade GNU
11564
 
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11565
 
*** your PATH or compiler configuration so that the native linker is
11566
 
*** used, and then restart.
11567
 
 
11568
 
_LT_EOF
11569
 
        ;;
11570
 
        *)
11571
 
          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11572
 
            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
11573
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
11574
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
11575
 
          else
11576
 
            _LT_AC_TAGVAR(ld_shlibs, $1)=no
11577
 
          fi
11578
 
        ;;
11579
 
      esac
11580
 
      ;;
11581
 
 
11582
 
    sunos4*)
11583
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11584
 
      wlarc=
11585
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11586
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11587
 
      ;;
11588
 
 
11589
 
    *)
11590
 
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11591
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11592
 
        _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'
11593
 
      else
11594
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
11595
 
      fi
11596
 
      ;;
11597
 
    esac
11598
 
 
11599
 
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
11600
 
      runpath_var=
11601
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11602
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
11603
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11604
 
    fi
11605
 
  else
11606
 
    # PORTME fill in a description of your system's linker (not GNU ld)
11607
 
    case $host_os in
11608
 
    aix3*)
11609
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11610
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
11611
 
      _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'
11612
 
      # Note: this linker hardcodes the directories in LIBPATH if there
11613
 
      # are no directories specified by -L.
11614
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11615
 
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
11616
 
        # Neither direct hardcoding nor static linking is supported with a
11617
 
        # broken collect2.
11618
 
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
11619
 
      fi
11620
 
      ;;
11621
 
 
11622
 
    aix4* | aix5*)
11623
 
      if test "$host_cpu" = ia64; then
11624
 
        # On IA64, the linker does run time linking by default, so we don't
11625
 
        # have to do anything special.
11626
 
        aix_use_runtimelinking=no
11627
 
        exp_sym_flag='-Bexport'
11628
 
        no_entry_flag=""
11629
 
      else
11630
 
        # If we're using GNU nm, then we don't want the "-C" option.
11631
 
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
11632
 
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
11633
 
          _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'
11634
 
        else
11635
 
          _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'
11636
 
        fi
11637
 
        aix_use_runtimelinking=no
11638
 
 
11639
 
        # Test if we are trying to use run time linking or normal
11640
 
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11641
 
        # need to do runtime linking.
11642
 
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
11643
 
          for ld_flag in $LDFLAGS; do
11644
 
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
11645
 
            aix_use_runtimelinking=yes
11646
 
            break
11647
 
          fi
11648
 
          done
11649
 
          ;;
11650
 
        esac
11651
 
 
11652
 
        exp_sym_flag='-bexport'
11653
 
        no_entry_flag='-bnoentry'
11654
 
      fi
11655
 
 
11656
 
      # When large executables or shared objects are built, AIX ld can
11657
 
      # have problems creating the table of contents.  If linking a library
11658
 
      # or program results in "error TOC overflow" add -mminimal-toc to
11659
 
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11660
 
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11661
 
 
11662
 
      _LT_AC_TAGVAR(archive_cmds, $1)=''
11663
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11664
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
11665
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11666
 
 
11667
 
      if test "$GCC" = yes; then
11668
 
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
11669
 
        # We only want to do this on AIX 4.2 and lower, the check
11670
 
        # below for broken collect2 doesn't work under 4.3+
11671
 
          collect2name=`${CC} -print-prog-name=collect2`
11672
 
          if test -f "$collect2name" && \
11673
 
           strings "$collect2name" | grep resolve_lib_name >/dev/null
11674
 
          then
11675
 
          # We have reworked collect2
11676
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11677
 
          else
11678
 
          # We have old collect2
11679
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
11680
 
          # It fails to find uninstalled libraries when the uninstalled
11681
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
11682
 
          # to unsupported forces relinking
11683
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11684
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11685
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
11686
 
          fi
11687
 
          ;;
11688
 
        esac
11689
 
        shared_flag='-shared'
11690
 
        if test "$aix_use_runtimelinking" = yes; then
11691
 
          shared_flag="$shared_flag "'${wl}-G'
11692
 
        fi
11693
 
      else
11694
 
        # not using gcc
11695
 
        if test "$host_cpu" = ia64; then
11696
 
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11697
 
        # chokes on -Wl,-G. The following line is correct:
11698
 
          shared_flag='-G'
11699
 
        else
11700
 
          if test "$aix_use_runtimelinking" = yes; then
11701
 
            shared_flag='${wl}-G'
11702
 
          else
11703
 
            shared_flag='${wl}-bM:SRE'
11704
 
          fi
11705
 
        fi
11706
 
      fi
11707
 
 
11708
 
      # It seems that -bexpall does not export symbols beginning with
11709
 
      # underscore (_), so it is better to generate a list of symbols to export.
11710
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
11711
 
      if test "$aix_use_runtimelinking" = yes; then
11712
 
        # Warning - without using the other runtime loading flags (-brtl),
11713
 
        # -berok will link without error, but may produce a broken library.
11714
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
11715
 
       # Determine the default libpath from the value encoded in an empty executable.
11716
 
       _LT_AC_SYS_LIBPATH_AIX
11717
 
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11718
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11719
 
       else
11720
 
        if test "$host_cpu" = ia64; then
11721
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
11722
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
11723
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
11724
 
        else
11725
 
         # Determine the default libpath from the value encoded in an empty executable.
11726
 
         _LT_AC_SYS_LIBPATH_AIX
11727
 
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11728
 
          # Warning - without using the other run time loading flags,
11729
 
          # -berok will link without error, but may produce a broken library.
11730
 
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
11731
 
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
11732
 
          # Exported symbols can be pulled into shared objects from archives
11733
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
11734
 
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11735
 
          # This is similar to how AIX traditionally builds its shared libraries.
11736
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11737
 
        fi
11738
 
      fi
11739
 
      ;;
11740
 
 
11741
 
    amigaos*)
11742
 
      _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)'
11743
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11744
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11745
 
      # see comment about different semantics on the GNU ld section
11746
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11747
 
      ;;
11748
 
 
11749
 
    bsdi[[45]]*)
11750
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
11751
 
      ;;
11752
 
 
11753
 
    cygwin* | mingw* | pw32*)
11754
 
      # When not using gcc, we currently assume that we are using
11755
 
      # Microsoft Visual C++.
11756
 
      # hardcode_libdir_flag_spec is actually meaningless, as there is
11757
 
      # no search path for DLLs.
11758
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
11759
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11760
 
      # Tell ltmain to make .lib files, not .a files.
11761
 
      libext=lib
11762
 
      # Tell ltmain to make .dll files, not .so files.
11763
 
      shrext_cmds=".dll"
11764
 
      # FIXME: Setting linknames here is a bad hack.
11765
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
11766
 
      # The linker will automatically build a .lib file if we build a DLL.
11767
 
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
11768
 
      # FIXME: Should let the user specify the lib program.
11769
 
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
11770
 
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
11771
 
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11772
 
      ;;
11773
 
 
11774
 
    darwin* | rhapsody*)
11775
 
      case $host_os in
11776
 
        rhapsody* | darwin1.[[012]])
11777
 
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
11778
 
         ;;
11779
 
       *) # Darwin 1.3 on
11780
 
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
11781
 
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
11782
 
         else
11783
 
           case ${MACOSX_DEPLOYMENT_TARGET} in
11784
 
             10.[[012]])
11785
 
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
11786
 
               ;;
11787
 
             10.*)
11788
 
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
11789
 
               ;;
11790
 
           esac
11791
 
         fi
11792
 
         ;;
11793
 
      esac
11794
 
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11795
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
11796
 
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
11797
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11798
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
11799
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11800
 
    if test "$GCC" = yes ; then
11801
 
        output_verbose_link_cmd='echo'
11802
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
11803
 
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
11804
 
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
11805
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11806
 
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11807
 
    else
11808
 
      case $cc_basename in
11809
 
        xlc*)
11810
 
         output_verbose_link_cmd='echo'
11811
 
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
11812
 
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
11813
 
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
11814
 
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11815
 
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11816
 
          ;;
11817
 
       *)
11818
 
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
11819
 
          ;;
11820
 
      esac
11821
 
    fi
11822
 
      ;;
11823
 
 
11824
 
    dgux*)
11825
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11826
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11827
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11828
 
      ;;
11829
 
 
11830
 
    freebsd1*)
11831
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11832
 
      ;;
11833
 
 
11834
 
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11835
 
    # support.  Future versions do this automatically, but an explicit c++rt0.o
11836
 
    # does not break anything, and helps significantly (at the cost of a little
11837
 
    # extra space).
11838
 
    freebsd2.2*)
11839
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11840
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11841
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11842
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11843
 
      ;;
11844
 
 
11845
 
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11846
 
    freebsd2*)
11847
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11848
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11849
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11850
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11851
 
      ;;
11852
 
 
11853
 
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11854
 
    freebsd* | dragonfly*)
11855
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
11856
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11857
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11858
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11859
 
      ;;
11860
 
 
11861
 
    hpux9*)
11862
 
      if test "$GCC" = yes; then
11863
 
        _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'
11864
 
      else
11865
 
        _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'
11866
 
      fi
11867
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11868
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11869
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11870
 
 
11871
 
      # hardcode_minus_L: Not really in the search PATH,
11872
 
      # but as the default location of the library.
11873
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11874
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11875
 
      ;;
11876
 
 
11877
 
    hpux10*)
11878
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11879
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11880
 
      else
11881
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11882
 
      fi
11883
 
      if test "$with_gnu_ld" = no; then
11884
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11885
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11886
 
 
11887
 
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11888
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11889
 
 
11890
 
        # hardcode_minus_L: Not really in the search PATH,
11891
 
        # but as the default location of the library.
11892
 
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11893
 
      fi
11894
 
      ;;
11895
 
 
11896
 
    hpux11*)
11897
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11898
 
        case $host_cpu in
11899
 
        hppa*64*)
11900
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11901
 
          ;;
11902
 
        ia64*)
11903
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11904
 
          ;;
11905
 
        *)
11906
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11907
 
          ;;
11908
 
        esac
11909
 
      else
11910
 
        case $host_cpu in
11911
 
        hppa*64*)
11912
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11913
 
          ;;
11914
 
        ia64*)
11915
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11916
 
          ;;
11917
 
        *)
11918
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11919
 
          ;;
11920
 
        esac
11921
 
      fi
11922
 
      if test "$with_gnu_ld" = no; then
11923
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11924
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11925
 
 
11926
 
        case $host_cpu in
11927
 
        hppa*64*|ia64*)
11928
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11929
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
11930
 
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11931
 
          ;;
11932
 
        *)
11933
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11934
 
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11935
 
 
11936
 
          # hardcode_minus_L: Not really in the search PATH,
11937
 
          # but as the default location of the library.
11938
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11939
 
          ;;
11940
 
        esac
11941
 
      fi
11942
 
      ;;
11943
 
 
11944
 
    irix5* | irix6* | nonstopux*)
11945
 
      if test "$GCC" = yes; then
11946
 
        _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'
11947
 
      else
11948
 
        _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'
11949
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11950
 
      fi
11951
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11952
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11953
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11954
 
      ;;
11955
 
 
11956
 
    netbsd* | netbsdelf*-gnu)
11957
 
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11958
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
11959
 
      else
11960
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
11961
 
      fi
11962
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11963
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11964
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11965
 
      ;;
11966
 
 
11967
 
    newsos6)
11968
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11969
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11970
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11971
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11972
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11973
 
      ;;
11974
 
 
11975
 
    openbsd*)
11976
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11977
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11978
 
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11979
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11980
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
11981
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11982
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11983
 
      else
11984
 
       case $host_os in
11985
 
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11986
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11987
 
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11988
 
           ;;
11989
 
         *)
11990
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11991
 
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11992
 
           ;;
11993
 
       esac
11994
 
      fi
11995
 
      ;;
11996
 
 
11997
 
    os2*)
11998
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11999
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
12000
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
12001
 
      _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'
12002
 
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
12003
 
      ;;
12004
 
 
12005
 
    osf3*)
12006
 
      if test "$GCC" = yes; then
12007
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
12008
 
        _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'
12009
 
      else
12010
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
12011
 
        _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'
12012
 
      fi
12013
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
12014
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
12015
 
      ;;
12016
 
 
12017
 
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
12018
 
      if test "$GCC" = yes; then
12019
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
12020
 
        _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'
12021
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
12022
 
      else
12023
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
12024
 
        _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'
12025
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
12026
 
        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
12027
 
 
12028
 
        # Both c and cxx compiler support -rpath directly
12029
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
12030
 
      fi
12031
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
12032
 
      ;;
12033
 
 
12034
 
    solaris*)
12035
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
12036
 
      if test "$GCC" = yes; then
12037
 
        wlarc='${wl}'
12038
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
12039
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12040
 
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
12041
 
      else
12042
 
        wlarc=''
12043
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
12044
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12045
 
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
12046
 
      fi
12047
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
12048
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12049
 
      case $host_os in
12050
 
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
12051
 
      *)
12052
 
        # The compiler driver will combine linker options so we
12053
 
        # cannot just pass the convience library names through
12054
 
        # without $wl, iff we do not link with $LD.
12055
 
        # Luckily, gcc supports the same syntax we need for Sun Studio.
12056
 
        # Supported since Solaris 2.6 (maybe 2.5.1?)
12057
 
        case $wlarc in
12058
 
        '')
12059
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
12060
 
        *)
12061
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
12062
 
        esac ;;
12063
 
      esac
12064
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
12065
 
      ;;
12066
 
 
12067
 
    sunos4*)
12068
 
      if test "x$host_vendor" = xsequent; then
12069
 
        # Use $CC to link under sequent, because it throws in some extra .o
12070
 
        # files that make .init and .fini sections work.
12071
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12072
 
      else
12073
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12074
 
      fi
12075
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
12076
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
12077
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
12078
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12079
 
      ;;
12080
 
 
12081
 
    sysv4)
12082
 
      case $host_vendor in
12083
 
        sni)
12084
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12085
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
12086
 
        ;;
12087
 
        siemens)
12088
 
          ## LD is ld it makes a PLAMLIB
12089
 
          ## CC just makes a GrossModule.
12090
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12091
 
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
12092
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
12093
 
        ;;
12094
 
        motorola)
12095
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12096
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
12097
 
        ;;
12098
 
      esac
12099
 
      runpath_var='LD_RUN_PATH'
12100
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12101
 
      ;;
12102
 
 
12103
 
    sysv4.3*)
12104
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12105
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12106
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
12107
 
      ;;
12108
 
 
12109
 
    sysv4*MP*)
12110
 
      if test -d /usr/nec; then
12111
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12112
 
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12113
 
        runpath_var=LD_RUN_PATH
12114
 
        hardcode_runpath_var=yes
12115
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
12116
 
      fi
12117
 
      ;;
12118
 
 
12119
 
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
12120
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
12121
 
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
12122
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12123
 
      runpath_var='LD_RUN_PATH'
12124
 
 
12125
 
      if test "$GCC" = yes; then
12126
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12127
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12128
 
      else
12129
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12130
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12131
 
      fi
12132
 
      ;;
12133
 
 
12134
 
    sysv5* | sco3.2v5* | sco5v6*)
12135
 
      # Note: We can NOT use -z defs as we might desire, because we do not
12136
 
      # link with -lc, and that would cause any symbols used from libc to
12137
 
      # always be unresolved, which means just about no library would
12138
 
      # ever link correctly.  If we're not using GNU ld we use -z text
12139
 
      # though, which does catch some bad symbols but isn't as heavy-handed
12140
 
      # as -z defs.
12141
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
12142
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
12143
 
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
12144
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12145
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
12146
 
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
12147
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
12148
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
12149
 
      runpath_var='LD_RUN_PATH'
12150
 
 
12151
 
      if test "$GCC" = yes; then
12152
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12153
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12154
 
      else
12155
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12156
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12157
 
      fi
12158
 
      ;;
12159
 
 
12160
 
    uts4*)
12161
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12162
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
12163
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12164
 
      ;;
12165
 
 
12166
 
    *)
12167
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
12168
 
      ;;
12169
 
    esac
12170
 
  fi
12171
 
])
12172
 
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
12173
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
12174
 
 
12175
 
#
12176
 
# Do we need to explicitly link libc?
12177
 
#
12178
 
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
12179
 
x|xyes)
12180
 
  # Assume -lc should be added
12181
 
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
12182
 
 
12183
 
  if test "$enable_shared" = yes && test "$GCC" = yes; then
12184
 
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
12185
 
    *'~'*)
12186
 
      # FIXME: we may have to deal with multi-command sequences.
12187
 
      ;;
12188
 
    '$CC '*)
12189
 
      # Test whether the compiler implicitly links with -lc since on some
12190
 
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12191
 
      # to ld, don't add -lc before -lgcc.
12192
 
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
12193
 
      $rm conftest*
12194
 
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
12195
 
 
12196
 
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
12197
 
        soname=conftest
12198
 
        lib=conftest
12199
 
        libobjs=conftest.$ac_objext
12200
 
        deplibs=
12201
 
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
12202
 
        pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
12203
 
        compiler_flags=-v
12204
 
        linker_flags=-v
12205
 
        verstring=
12206
 
        output_objdir=.
12207
 
        libname=conftest
12208
 
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
12209
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
12210
 
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
12211
 
        then
12212
 
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
12213
 
        else
12214
 
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
12215
 
        fi
12216
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
12217
 
      else
12218
 
        cat conftest.err 1>&5
12219
 
      fi
12220
 
      $rm conftest*
12221
 
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
12222
 
      ;;
12223
 
    esac
12224
 
  fi
12225
 
  ;;
12226
 
esac
12227
 
])# AC_LIBTOOL_PROG_LD_SHLIBS
12228
 
 
12229
 
 
12230
 
# _LT_AC_FILE_LTDLL_C
12231
 
# -------------------
12232
 
# Be careful that the start marker always follows a newline.
12233
 
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
12234
 
# /* ltdll.c starts here */
12235
 
# #define WIN32_LEAN_AND_MEAN
12236
 
# #include <windows.h>
12237
 
# #undef WIN32_LEAN_AND_MEAN
12238
 
# #include <stdio.h>
12239
 
#
12240
 
# #ifndef __CYGWIN__
12241
 
# #  ifdef __CYGWIN32__
12242
 
# #    define __CYGWIN__ __CYGWIN32__
12243
 
# #  endif
12244
 
# #endif
12245
 
#
12246
 
# #ifdef __cplusplus
12247
 
# extern "C" {
12248
 
# #endif
12249
 
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
12250
 
# #ifdef __cplusplus
12251
 
# }
12252
 
# #endif
12253
 
#
12254
 
# #ifdef __CYGWIN__
12255
 
# #include <cygwin/cygwin_dll.h>
12256
 
# DECLARE_CYGWIN_DLL( DllMain );
12257
 
# #endif
12258
 
# HINSTANCE __hDllInstance_base;
12259
 
#
12260
 
# BOOL APIENTRY
12261
 
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
12262
 
# {
12263
 
#   __hDllInstance_base = hInst;
12264
 
#   return TRUE;
12265
 
# }
12266
 
# /* ltdll.c ends here */
12267
 
])# _LT_AC_FILE_LTDLL_C
12268
 
 
12269
 
 
12270
 
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
12271
 
# ---------------------------------
12272
 
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
12273
 
 
12274
 
 
12275
 
# old names
12276
 
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
12277
 
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
12278
 
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
12279
 
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
12280
 
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
12281
 
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
12282
 
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
12283
 
 
12284
 
# This is just to silence aclocal about the macro not being used
12285
 
ifelse([AC_DISABLE_FAST_INSTALL])
12286
 
 
12287
 
AC_DEFUN([LT_AC_PROG_GCJ],
12288
 
[AC_CHECK_TOOL(GCJ, gcj, no)
12289
 
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
12290
 
  AC_SUBST(GCJFLAGS)
12291
 
])
12292
 
 
12293
 
AC_DEFUN([LT_AC_PROG_RC],
12294
 
[AC_CHECK_TOOL(RC, windres, no)
12295
 
])
12296
 
 
12297
 
############################################################
12298
 
# NOTE: This macro has been submitted for inclusion into   #
12299
 
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
12300
 
#  a released version of Autoconf we should remove this    #
12301
 
#  macro and use it instead.                               #
12302
 
############################################################
12303
 
# LT_AC_PROG_SED
12304
 
# --------------
12305
 
# Check for a fully-functional sed program, that truncates
12306
 
# as few characters as possible.  Prefer GNU sed if found.
12307
 
AC_DEFUN([LT_AC_PROG_SED],
12308
 
[AC_MSG_CHECKING([for a sed that does not truncate output])
12309
 
AC_CACHE_VAL(lt_cv_path_SED,
12310
 
[# Loop through the user's path and test for sed and gsed.
12311
 
# Then use that list of sed's as ones to test for truncation.
12312
 
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12313
 
for as_dir in $PATH
12314
 
do
12315
 
  IFS=$as_save_IFS
12316
 
  test -z "$as_dir" && as_dir=.
12317
 
  for lt_ac_prog in sed gsed; do
12318
 
    for ac_exec_ext in '' $ac_executable_extensions; do
12319
 
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
12320
 
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
12321
 
      fi
12322
 
    done
12323
 
  done
12324
 
done
12325
 
lt_ac_max=0
12326
 
lt_ac_count=0
12327
 
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
12328
 
# along with /bin/sed that truncates output.
12329
 
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
12330
 
  test ! -f $lt_ac_sed && continue
12331
 
  cat /dev/null > conftest.in
12332
 
  lt_ac_count=0
12333
 
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
12334
 
  # Check for GNU sed and select it if it is found.
12335
 
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
12336
 
    lt_cv_path_SED=$lt_ac_sed
12337
 
    break
12338
 
  fi
12339
 
  while true; do
12340
 
    cat conftest.in conftest.in >conftest.tmp
12341
 
    mv conftest.tmp conftest.in
12342
 
    cp conftest.in conftest.nl
12343
 
    echo >>conftest.nl
12344
 
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
12345
 
    cmp -s conftest.out conftest.nl || break
12346
 
    # 10000 chars as input seems more than enough
12347
 
    test $lt_ac_count -gt 10 && break
12348
 
    lt_ac_count=`expr $lt_ac_count + 1`
12349
 
    if test $lt_ac_count -gt $lt_ac_max; then
12350
 
      lt_ac_max=$lt_ac_count
12351
 
      lt_cv_path_SED=$lt_ac_sed
12352
 
    fi
12353
 
  done
12354
 
done
12355
 
])
12356
 
SED=$lt_cv_path_SED
12357
 
AC_MSG_RESULT([$SED])
12358
 
])