By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1169
Collapse All | Expand All

(-)a/acinclude.m4 (-12406 lines)
Lines 1-12406 Link Here
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/tde/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}/trinity'
483
    fi
484
  fi
485
  if test -z "$kde_styledir"; then
486
    kde_styledir='\${libdir}/trinity/plugins/styles'
487
  fi
488
  if test -z "$kde_widgetdir"; then
489
    kde_widgetdir='\${libdir}/trinity/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/trinity/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
        trinity2ornewer=1
584
        trinity3ornewer=1
585
        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
586
            trinity2ornewer=
587
            trinity3ornewer=
588
        else
589
            if test "$kde_qtver" = "3"; then
590
              if test "$kde_qtsubver" -le 1; then
591
                trinity2ornewer=
592
              fi
593
              if test "$kde_qtsubver" -le 2; then
594
                trinity3ornewer=
595
              fi
596
              if test "$KDECONFIG" != "compiled"; then
597
                if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
598
                  trinity3ornewer=
599
                fi
600
              fi
601
            fi
602
        fi
603
604
        if test -n "$trinity2ornewer"; 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 "$trinity3ornewer"; 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/trinity/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 "$trinity2ornewer"; 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 || test "$kde_x_libraries" = "/usr/lib"; 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
  fi
1693
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
1694
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
1695
  AC_SUBST(KDE_NO_UNDEFINED)
1696
])
1697
1698
dnl Check if the linker supports --enable-new-dtags and --as-needed
1699
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
1700
[
1701
  AC_ARG_ENABLE(new_ldflags,
1702
		AC_HELP_STRING([--enable-new-ldflags],
1703
		[enable the new linker flags]),
1704
	kde_use_new_ldflags=$enableval, 
1705
	kde_use_new_ldflags=no)
1706
1707
  LDFLAGS_AS_NEEDED=""
1708
  LDFLAGS_NEW_DTAGS=""
1709
  if test "x$kde_use_new_ldflags" = "xyes"; then
1710
       LDFLAGS_NEW_DTAGS=""
1711
       KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
1712
		[LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
1713
1714
       KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
1715
		[LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
1716
  fi
1717
  AC_SUBST(LDFLAGS_AS_NEEDED)
1718
  AC_SUBST(LDFLAGS_NEW_DTAGS)
1719
])
1720
1721
AC_DEFUN([KDE_CHECK_NMCHECK],
1722
[
1723
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1724
	kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1725
1726
  if test "$kde_use_nmcheck" = "yes"; then
1727
      KDE_USE_NMCHECK_TRUE=""
1728
      KDE_USE_NMCHECK_FALSE="#"
1729
   else
1730
      KDE_USE_NMCHECK_TRUE="#"
1731
      KDE_USE_NMCHECK_FALSE=""
1732
  fi
1733
  AC_SUBST(KDE_USE_NMCHECK_TRUE)
1734
  AC_SUBST(KDE_USE_NMCHECK_FALSE)
1735
])
1736
1737
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1738
savex=$exec_prefix
1739
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1740
tmp=$$2
1741
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1742
exec_prefix=$savex
1743
])
1744
1745
dnl ------------------------------------------------------------------------
1746
dnl Now, the same with KDE
1747
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1748
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1749
dnl ------------------------------------------------------------------------
1750
dnl
1751
AC_DEFUN([AC_BASE_PATH_KDE],
1752
[
1753
AC_REQUIRE([KDE_CHECK_STL])
1754
AC_REQUIRE([AC_PATH_QT])dnl
1755
AC_REQUIRE([KDE_CHECK_LIB64])
1756
1757
AC_CHECK_RPATH
1758
AC_MSG_CHECKING([for KDE])
1759
1760
if test "${prefix}" != NONE; then
1761
  kde_includes=${includedir}
1762
  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1763
1764
  kde_libraries=${libdir}
1765
  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1766
1767
else
1768
  ac_kde_includes=
1769
  ac_kde_libraries=
1770
  kde_libraries=""
1771
  kde_includes=""
1772
fi
1773
1774
AC_CACHE_VAL(ac_cv_have_kde,
1775
[#try to guess kde locations
1776
1777
if test "$kde_qtver" = 1; then
1778
  kde_check_header="ksock.h"
1779
  kde_check_lib="libkdecore.la"
1780
else
1781
  kde_check_header="ksharedptr.h"
1782
  kde_check_lib="libkio.la"
1783
fi
1784
1785
if test -z "$1"; then
1786
1787
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/trinity/include /opt/kde/include $x_includes $qt_includes"
1788
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1789
kde_incdirs="$ac_kde_includes $kde_incdirs"
1790
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1791
ac_kde_includes="$kde_incdir"
1792
1793
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1794
  AC_MSG_ERROR([
1795
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1796
So, check this please and use another prefix!])
1797
fi
1798
1799
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}/trinity /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/trinity/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1800
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1801
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1802
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1803
ac_kde_libraries="$kde_libdir"
1804
1805
kde_widgetdir=NO
1806
dnl this might be somewhere else
1807
AC_FIND_FILE("trinity/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1808
1809
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1810
AC_MSG_ERROR([
1811
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1812
So, check this please and use another prefix!])
1813
fi
1814
1815
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/trinity/plugins/designer/kdewidgets.la"; then
1816
AC_MSG_ERROR([
1817
I can't find the designer plugins. These are required and should have been installed
1818
by kdelibs])
1819
fi
1820
1821
if test -n "$kde_widgetdir"; then
1822
    kde_widgetdir="$kde_widgetdir/trinity/plugins/designer"
1823
fi
1824
1825
1826
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1827
  ac_cv_have_kde="have_kde=no"
1828
else
1829
  ac_cv_have_kde="have_kde=yes \
1830
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1831
fi
1832
1833
else dnl test -z $1, e.g. from kdelibs
1834
1835
  ac_cv_have_kde="have_kde=no"
1836
1837
fi
1838
])dnl
1839
1840
eval "$ac_cv_have_kde"
1841
1842
if test "$have_kde" != "yes"; then
1843
 if test "${prefix}" = NONE; then
1844
  ac_kde_prefix="$ac_default_prefix"
1845
 else
1846
  ac_kde_prefix="$prefix"
1847
 fi
1848
 if test "$exec_prefix" = NONE; then
1849
  ac_kde_exec_prefix="$ac_kde_prefix"
1850
  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1851
 else
1852
  ac_kde_exec_prefix="$exec_prefix"
1853
  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1854
 fi
1855
1856
 kde_libraries="${libdir}"
1857
 kde_includes="${includedir}"
1858
1859
else
1860
  ac_cv_have_kde="have_kde=yes \
1861
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1862
  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1863
1864
  kde_libraries="$ac_kde_libraries"
1865
  kde_includes="$ac_kde_includes"
1866
fi
1867
AC_SUBST(kde_libraries)
1868
AC_SUBST(kde_includes)
1869
1870
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
1871
 KDE_INCLUDES=""
1872
else
1873
 KDE_INCLUDES="-I$kde_includes"
1874
 all_includes="$KDE_INCLUDES $all_includes"
1875
fi
1876
1877
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1878
 
1879
KDE_LDFLAGS="-L$kde_libraries"
1880
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
1881
 all_libraries="$KDE_LDFLAGS $all_libraries"
1882
fi
1883
1884
AC_SUBST(KDE_LDFLAGS)
1885
AC_SUBST(KDE_INCLUDES)
1886
1887
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1888
1889
all_libraries="$all_libraries $USER_LDFLAGS"
1890
all_includes="$all_includes $USER_INCLUDES"
1891
AC_SUBST(all_includes)
1892
AC_SUBST(all_libraries)
1893
1894
if test -z "$1"; then
1895
KDE_CHECK_UIC_PLUGINS
1896
fi
1897
1898
ac_kde_libraries="$kde_libdir"
1899
1900
AC_SUBST(AUTODIRS)
1901
1902
1903
])
1904
1905
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1906
[
1907
AC_MSG_CHECKING(for extra includes)
1908
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1909
  kde_use_extra_includes="$withval",
1910
  kde_use_extra_includes=NONE
1911
)
1912
kde_extra_includes=
1913
if test -n "$kde_use_extra_includes" && \
1914
   test "$kde_use_extra_includes" != "NONE"; then
1915
1916
   ac_save_ifs=$IFS
1917
   IFS=':'
1918
   for dir in $kde_use_extra_includes; do
1919
     kde_extra_includes="$kde_extra_includes $dir"
1920
     USER_INCLUDES="$USER_INCLUDES -I$dir"
1921
   done
1922
   IFS=$ac_save_ifs
1923
   kde_use_extra_includes="added"
1924
else
1925
   kde_use_extra_includes="no"
1926
fi
1927
AC_SUBST(USER_INCLUDES)
1928
1929
AC_MSG_RESULT($kde_use_extra_includes)
1930
1931
kde_extra_libs=
1932
AC_MSG_CHECKING(for extra libs)
1933
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1934
  kde_use_extra_libs=$withval,
1935
  kde_use_extra_libs=NONE
1936
)
1937
if test -n "$kde_use_extra_libs" && \
1938
   test "$kde_use_extra_libs" != "NONE"; then
1939
1940
   ac_save_ifs=$IFS
1941
   IFS=':'
1942
   for dir in $kde_use_extra_libs; do
1943
     kde_extra_libs="$kde_extra_libs $dir"
1944
     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1945
     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1946
   done
1947
   IFS=$ac_save_ifs
1948
   kde_use_extra_libs="added"
1949
else
1950
   kde_use_extra_libs="no"
1951
fi
1952
1953
AC_SUBST(USER_LDFLAGS)
1954
1955
AC_MSG_RESULT($kde_use_extra_libs)
1956
1957
])
1958
1959
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1960
[
1961
    AC_MSG_CHECKING([for KDE headers installed])
1962
    AC_LANG_SAVE
1963
    AC_LANG_CPLUSPLUS
1964
cat > conftest.$ac_ext <<EOF
1965
#ifdef STDC_HEADERS
1966
# include <stdlib.h>
1967
#endif
1968
#include <stdio.h>
1969
#include "confdefs.h"
1970
#include <kapp.h>
1971
1972
int main() {
1973
    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1974
    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1975
    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1976
    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1977
    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1978
    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1979
    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1980
    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1981
    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1982
    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1983
    printf("kde_wallpaperdir=\\"%s\\"\n",
1984
	KApplication::kde_wallpaperdir().data());
1985
    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1986
    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1987
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1988
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1989
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1990
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
1991
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1992
    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
1993
    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
1994
    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
1995
    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
1996
    return 0;
1997
    }
1998
EOF
1999
2000
 ac_save_CPPFLAGS=$CPPFLAGS
2001
 CPPFLAGS="$all_includes $CPPFLAGS"
2002
 if AC_TRY_EVAL(ac_compile); then
2003
   AC_MSG_RESULT(yes)
2004
 else
2005
   AC_MSG_ERROR([your system is not able to compile a small KDE application!
2006
Check, if you installed the KDE header files correctly.
2007
For more details about this problem, look at the end of config.log.])
2008
  fi
2009
  CPPFLAGS=$ac_save_CPPFLAGS
2010
2011
  AC_LANG_RESTORE
2012
])
2013
2014
AC_DEFUN([KDE_CHECK_KDEQTADDON],
2015
[
2016
AC_MSG_CHECKING(for kde-qt-addon)
2017
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2018
[
2019
 kde_ldflags_safe="$LDFLAGS"
2020
 kde_libs_safe="$LIBS"
2021
 kde_cxxflags_safe="$CXXFLAGS"
2022
2023
 LIBS="-lkde-qt-addon $LIBQT $LIBS"
2024
 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
2025
 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
2026
2027
 AC_TRY_LINK([
2028
   #include <qdom.h>
2029
 ],
2030
 [
2031
   QDomDocument doc;
2032
 ],
2033
  kde_cv_have_kdeqtaddon=yes,
2034
  kde_cv_have_kdeqtaddon=no
2035
 )
2036
2037
 LDFLAGS=$kde_ldflags_safe
2038
 LIBS=$kde_libs_safe
2039
 CXXFLAGS=$kde_cxxflags_safe
2040
])
2041
2042
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2043
2044
if test "$kde_cv_have_kdeqtaddon" = "no"; then
2045
  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2046
It is a separate package (and CVS module) named kde-qt-addon.])
2047
fi
2048
])
2049
2050
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2051
[
2052
   AC_REQUIRE([KDE_MISC_TESTS])
2053
   AC_REQUIRE([KDE_CHECK_LIBDL])
2054
   AC_REQUIRE([K_PATH_X])
2055
2056
if test $kde_qtver = 3; then
2057
   case $host in 
2058
               *cygwin*) lib_kded="-lkdeinit_kded" ;;
2059
               *) lib_kded="" ;;
2060
       esac
2061
   AC_SUBST(LIB_KDED, $lib_kded)
2062
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2063
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2064
   AC_SUBST(LIB_KIO, "-lkio")
2065
   AC_SUBST(LIB_KJS, "-lkjs")
2066
   AC_SUBST(LIB_SMB, "-lsmb")
2067
   AC_SUBST(LIB_KAB, "-lkab")
2068
   AC_SUBST(LIB_KABC, "-lkabc")
2069
   AC_SUBST(LIB_KHTML, "-lkhtml")
2070
   AC_SUBST(LIB_KSPELL, "-lkspell")
2071
   AC_SUBST(LIB_KPARTS, "-lkparts")
2072
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2073
   AC_SUBST(LIB_KUTILS, "-lkutils")
2074
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
2075
   AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2076
   AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2077
   AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2078
   AC_SUBST(LIB_KUNITTEST, "-lkunittest")
2079
# these are for backward compatibility
2080
   AC_SUBST(LIB_KSYCOCA, "-lkio")
2081
   AC_SUBST(LIB_KFILE, "-lkio")
2082
elif test $kde_qtver = 2; then
2083
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2084
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2085
   AC_SUBST(LIB_KIO, "-lkio")
2086
   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2087
   AC_SUBST(LIB_SMB, "-lsmb")
2088
   AC_SUBST(LIB_KFILE, "-lkfile")
2089
   AC_SUBST(LIB_KAB, "-lkab")
2090
   AC_SUBST(LIB_KHTML, "-lkhtml")
2091
   AC_SUBST(LIB_KSPELL, "-lkspell")
2092
   AC_SUBST(LIB_KPARTS, "-lkparts")
2093
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2094
else
2095
   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2096
   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2097
   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2098
   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2099
   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2100
fi
2101
])
2102
2103
AC_DEFUN([AC_PATH_KDE],
2104
[
2105
  AC_BASE_PATH_KDE
2106
  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2107
  [
2108
  if test "$enableval" = "no";
2109
    then ac_use_path_checking="default"
2110
    else ac_use_path_checking=""
2111
  fi
2112
  ],
2113
  [
2114
  if test "$kde_qtver" = 1;
2115
    then ac_use_path_checking=""
2116
    else ac_use_path_checking="default"
2117
  fi
2118
  ]
2119
  )
2120
2121
  AC_CREATE_KFSSTND($ac_use_path_checking)
2122
2123
  AC_SUBST_KFSSTND
2124
  KDE_CREATE_LIBS_ALIASES
2125
])
2126
2127
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2128
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2129
[
2130
AC_MSG_CHECKING(for $1)
2131
AC_CACHE_VAL(kde_cv_func_$1,
2132
[
2133
AC_LANG_SAVE
2134
AC_LANG_CPLUSPLUS
2135
save_CXXFLAGS="$CXXFLAGS"
2136
kde_safe_LIBS="$LIBS"
2137
LIBS="$LIBS $X_EXTRA_LIBS"
2138
AC_TRY_COMPILE([
2139
$2
2140
],
2141
[
2142
$3
2143
],
2144
kde_cv_func_$1=yes,
2145
kde_cv_func_$1=no)
2146
CXXFLAGS="$save_CXXFLAGS"
2147
LIBS="$kde_safe_LIBS"
2148
AC_LANG_RESTORE
2149
])
2150
2151
AC_MSG_RESULT($kde_cv_func_$1)
2152
2153
AC_MSG_CHECKING([if $1 needs custom prototype])
2154
AC_CACHE_VAL(kde_cv_proto_$1,
2155
[
2156
if test "x$kde_cv_func_$1" = xyes; then
2157
  kde_cv_proto_$1=no
2158
else
2159
  case "$1" in
2160
	setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2161
		kde_cv_proto_$1="yes - in libkdefakes"
2162
		;;
2163
	*)
2164
		kde_cv_proto_$1=unknown
2165
		;;
2166
  esac
2167
fi
2168
2169
if test "x$kde_cv_proto_$1" = xunknown; then
2170
2171
AC_LANG_SAVE
2172
AC_LANG_CPLUSPLUS
2173
  kde_safe_libs=$LIBS
2174
  LIBS="$LIBS $X_EXTRA_LIBS"
2175
  AC_TRY_LINK([
2176
$2
2177
2178
extern "C" $4;
2179
],
2180
[
2181
$3
2182
],
2183
[ kde_cv_func_$1=yes
2184
  kde_cv_proto_$1=yes ],
2185
  [kde_cv_proto_$1="$1 unavailable"]
2186
)
2187
LIBS=$kde_safe_libs
2188
AC_LANG_RESTORE
2189
fi
2190
])
2191
AC_MSG_RESULT($kde_cv_proto_$1)
2192
2193
if test "x$kde_cv_func_$1" = xyes; then
2194
  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2195
  $6
2196
fi
2197
if test "x$kde_cv_proto_$1" = xno; then
2198
  AC_DEFINE(HAVE_$5_PROTO, 1,
2199
  [Define if you have the $1 prototype])
2200
fi
2201
2202
AH_VERBATIM([_HAVE_$5_PROTO],
2203
[
2204
#if !defined(HAVE_$5_PROTO)
2205
#ifdef __cplusplus
2206
extern "C" {
2207
#endif
2208
$4;
2209
#ifdef __cplusplus
2210
}
2211
#endif
2212
#endif
2213
])
2214
])
2215
2216
AC_DEFUN([AC_CHECK_SETENV],
2217
[
2218
	KDE_CHECK_FUNC_EXT(setenv, [
2219
#include <stdlib.h>
2220
], 
2221
		[setenv("VAR", "VALUE", 1);],
2222
	        [int setenv (const char *, const char *, int)],
2223
		[SETENV])
2224
])
2225
2226
AC_DEFUN([AC_CHECK_UNSETENV],
2227
[
2228
	KDE_CHECK_FUNC_EXT(unsetenv, [
2229
#include <stdlib.h>
2230
], 
2231
		[unsetenv("VAR");],
2232
	        [void unsetenv (const char *)],
2233
		[UNSETENV])
2234
])
2235
2236
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2237
[
2238
	KDE_CHECK_FUNC_EXT(getdomainname, [
2239
#include <stdlib.h>
2240
#include <unistd.h>
2241
#include <netdb.h>
2242
], 
2243
		[
2244
char buffer[200];
2245
getdomainname(buffer, 200);
2246
], 	
2247
	        [#include <sys/types.h>
2248
		int getdomainname (char *, size_t)],
2249
		[GETDOMAINNAME])
2250
])
2251
2252
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2253
[
2254
	KDE_CHECK_FUNC_EXT(gethostname, [
2255
#include <stdlib.h>
2256
#include <unistd.h>
2257
], 
2258
		[
2259
char buffer[200];
2260
gethostname(buffer, 200);
2261
], 	
2262
	        [int gethostname (char *, unsigned int)],
2263
		[GETHOSTNAME])
2264
])
2265
2266
AC_DEFUN([AC_CHECK_USLEEP],
2267
[
2268
	KDE_CHECK_FUNC_EXT(usleep, [
2269
#include <unistd.h>
2270
], 
2271
		[
2272
usleep(200);
2273
], 	
2274
	        [int usleep (unsigned int)],
2275
		[USLEEP])
2276
])
2277
2278
2279
AC_DEFUN([AC_CHECK_RANDOM],
2280
[
2281
	KDE_CHECK_FUNC_EXT(random, [
2282
#include <stdlib.h>
2283
], 
2284
		[
2285
random();
2286
], 	
2287
	        [long int random(void)],
2288
		[RANDOM])
2289
2290
	KDE_CHECK_FUNC_EXT(srandom, [
2291
#include <stdlib.h>
2292
], 
2293
		[
2294
srandom(27);
2295
], 	
2296
	        [void srandom(unsigned int)],
2297
		[SRANDOM])
2298
2299
])
2300
2301
AC_DEFUN([AC_CHECK_INITGROUPS],
2302
[
2303
	KDE_CHECK_FUNC_EXT(initgroups, [
2304
#include <sys/types.h>
2305
#include <unistd.h>
2306
#include <grp.h>
2307
],
2308
	[
2309
char buffer[200];
2310
initgroups(buffer, 27);
2311
],
2312
	[int initgroups(const char *, gid_t)],
2313
	[INITGROUPS])
2314
])
2315
2316
AC_DEFUN([AC_CHECK_MKSTEMPS],
2317
[
2318
	KDE_CHECK_FUNC_EXT(mkstemps, [
2319
#include <stdlib.h>
2320
#include <unistd.h>
2321
],
2322
	[
2323
mkstemps("/tmp/aaaXXXXXX", 6);
2324
],
2325
	[int mkstemps(char *, int)],
2326
	[MKSTEMPS])
2327
])
2328
2329
AC_DEFUN([AC_CHECK_MKSTEMP],
2330
[
2331
	KDE_CHECK_FUNC_EXT(mkstemp, [
2332
#include <stdlib.h>
2333
#include <unistd.h>
2334
],
2335
	[
2336
mkstemp("/tmp/aaaXXXXXX");
2337
],
2338
	[int mkstemp(char *)],
2339
	[MKSTEMP])
2340
])
2341
2342
AC_DEFUN([AC_CHECK_MKDTEMP],
2343
[
2344
	KDE_CHECK_FUNC_EXT(mkdtemp, [
2345
#include <stdlib.h>
2346
#include <unistd.h>
2347
],
2348
	[
2349
mkdtemp("/tmp/aaaXXXXXX");
2350
],
2351
	[char *mkdtemp(char *)],
2352
	[MKDTEMP])
2353
])
2354
2355
2356
AC_DEFUN([AC_CHECK_RES_INIT],
2357
[
2358
  AC_MSG_CHECKING([if res_init needs -lresolv])
2359
  kde_libs_safe="$LIBS"
2360
  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2361
  AC_TRY_LINK(
2362
    [
2363
#include <sys/types.h>
2364
#include <netinet/in.h>
2365
#include <arpa/nameser.h>
2366
#include <resolv.h>
2367
    ],
2368
    [
2369
      res_init(); 
2370
    ],
2371
    [
2372
      LIBRESOLV="-lresolv"
2373
      AC_MSG_RESULT(yes)
2374
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2375
    ],
2376
    [ AC_MSG_RESULT(no) ]
2377
  )
2378
  LIBS=$kde_libs_safe
2379
  AC_SUBST(LIBRESOLV)
2380
2381
  KDE_CHECK_FUNC_EXT(res_init,
2382
    [
2383
#include <sys/types.h>
2384
#include <netinet/in.h>
2385
#include <arpa/nameser.h>
2386
#include <resolv.h>
2387
    ],
2388
    [res_init()],
2389
    [int res_init(void)],
2390
    [RES_INIT])
2391
])
2392
2393
AC_DEFUN([AC_CHECK_STRLCPY],
2394
[
2395
	KDE_CHECK_FUNC_EXT(strlcpy, [
2396
#include <string.h>
2397
],
2398
[ char buf[20];
2399
  strlcpy(buf, "KDE function test", sizeof(buf));
2400
],
2401
 	[unsigned long strlcpy(char*, const char*, unsigned long)],
2402
	[STRLCPY])
2403
])
2404
2405
AC_DEFUN([AC_CHECK_STRLCAT],
2406
[
2407
	KDE_CHECK_FUNC_EXT(strlcat, [
2408
#include <string.h>
2409
],
2410
[ char buf[20];
2411
  buf[0]='\0';
2412
  strlcat(buf, "KDE function test", sizeof(buf));
2413
],
2414
 	[unsigned long strlcat(char*, const char*, unsigned long)],
2415
	[STRLCAT])
2416
])
2417
2418
AC_DEFUN([AC_CHECK_RES_QUERY],
2419
[
2420
	KDE_CHECK_FUNC_EXT(res_query, [
2421
#include <sys/types.h>
2422
#include <netinet/in.h>
2423
#include <arpa/nameser.h>
2424
#include <resolv.h>
2425
#include <netdb.h>
2426
],
2427
[
2428
res_query(NULL, 0, 0, NULL, 0);
2429
],
2430
	[int res_query(const char *, int, int, unsigned char *, int)],
2431
	[RES_QUERY])
2432
])
2433
2434
AC_DEFUN([AC_CHECK_DN_SKIPNAME],
2435
[
2436
	KDE_CHECK_FUNC_EXT(dn_skipname, [
2437
#include <sys/types.h>
2438
#include <netinet/in.h>
2439
#include <arpa/nameser.h>
2440
#include <resolv.h>
2441
],
2442
[
2443
dn_skipname (NULL, NULL);
2444
],
2445
	[int dn_skipname (unsigned char *, unsigned char *)],
2446
	[DN_SKIPNAME])
2447
])
2448
2449
2450
AC_DEFUN([AC_FIND_GIF],
2451
   [AC_MSG_CHECKING([for giflib])
2452
AC_CACHE_VAL(ac_cv_lib_gif,
2453
[ac_save_LIBS="$LIBS"
2454
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2455
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2456
else
2457
LIBS="$all_libraries -lgif"
2458
fi
2459
AC_TRY_LINK(dnl
2460
[
2461
#ifdef __cplusplus
2462
extern "C" {
2463
#endif
2464
int GifLastError(void);
2465
#ifdef __cplusplus
2466
}
2467
#endif
2468
/* We use char because int might match the return type of a gcc2
2469
    builtin and then its argument prototype would still apply.  */
2470
],
2471
            [return GifLastError();],
2472
            eval "ac_cv_lib_gif=yes",
2473
            eval "ac_cv_lib_gif=no")
2474
LIBS="$ac_save_LIBS"
2475
])dnl
2476
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2477
  AC_MSG_RESULT(yes)
2478
  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2479
else
2480
  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2481
fi
2482
])
2483
2484
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2485
[
2486
AC_MSG_CHECKING([for libjpeg$2])
2487
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2488
[
2489
ac_save_LIBS="$LIBS"
2490
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2491
ac_save_CFLAGS="$CFLAGS"
2492
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2493
AC_TRY_LINK(
2494
[
2495
#ifdef __cplusplus
2496
extern "C" {
2497
#endif
2498
void jpeg_CreateDecompress();
2499
#ifdef __cplusplus
2500
}
2501
#endif
2502
],
2503
[jpeg_CreateDecompress();],
2504
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2505
            eval "ac_cv_lib_jpeg_$1=no")
2506
LIBS="$ac_save_LIBS"
2507
CFLAGS="$ac_save_CFLAGS"
2508
])
2509
2510
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2511
  LIBJPEG="$ac_cv_lib_jpeg_$1"
2512
  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2513
else
2514
  AC_MSG_RESULT(no)
2515
  $3
2516
fi
2517
2518
])
2519
2520
AC_DEFUN([AC_FIND_JPEG],
2521
[
2522
dnl first look for libraries
2523
KDE_FIND_JPEG_HELPER(6b, 6b,
2524
   KDE_FIND_JPEG_HELPER(normal, [],
2525
    [
2526
       LIBJPEG=
2527
    ]
2528
   )
2529
)
2530
2531
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2532
dnl requires system dependent includes loaded before it)
2533
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2534
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2535
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2536
2537
dnl if headers _and_ libraries are missing, this is no error, and we
2538
dnl continue with a warning (the user will get no jpeg support in khtml)
2539
dnl if only one is missing, it means a configuration error, but we still
2540
dnl only warn
2541
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2542
  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2543
else
2544
  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2545
    AC_MSG_WARN([
2546
There is an installation error in jpeg support. You seem to have only one
2547
of either the headers _or_ the libraries installed. You may need to either
2548
provide correct --with-extra-... options, or the development package of
2549
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2550
Disabling JPEG support.
2551
])
2552
  else
2553
    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2554
  fi
2555
  jpeg_incdir=
2556
  LIBJPEG=
2557
fi
2558
2559
AC_SUBST(LIBJPEG)
2560
AH_VERBATIM(_AC_CHECK_JPEG,
2561
[/*
2562
 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2563
 * headers and I'm too lazy to write a configure test as long as only
2564
 * unixware is related
2565
 */
2566
#ifdef _UNIXWARE
2567
#define HAVE_BOOLEAN
2568
#endif
2569
])
2570
])
2571
2572
AC_DEFUN([KDE_CHECK_QT_JPEG],
2573
[
2574
if test -n "$LIBJPEG"; then
2575
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2576
AC_CACHE_VAL(kde_cv_qt_jpeg,
2577
[
2578
AC_LANG_SAVE
2579
AC_LANG_CPLUSPLUS
2580
ac_save_LIBS="$LIBS"
2581
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2582
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2583
ac_save_CXXFLAGS="$CXXFLAGS"
2584
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2585
AC_TRY_LINK(
2586
[#include <qapplication.h>],
2587
            [
2588
            int argc;
2589
            char** argv;
2590
            QApplication app(argc, argv);],
2591
            eval "kde_cv_qt_jpeg=no",
2592
            eval "kde_cv_qt_jpeg=yes")
2593
LIBS="$ac_save_LIBS"
2594
CXXFLAGS="$ac_save_CXXFLAGS"
2595
AC_LANG_RESTORE
2596
fi
2597
])
2598
2599
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2600
  AC_MSG_RESULT(yes)
2601
  LIBJPEG_QT='$(LIBJPEG)'
2602
else
2603
  AC_MSG_RESULT(no)
2604
  LIBJPEG_QT=
2605
fi
2606
2607
])
2608
2609
AC_DEFUN([AC_FIND_ZLIB],
2610
[
2611
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2612
AC_MSG_CHECKING([for libz])
2613
AC_CACHE_VAL(ac_cv_lib_z,
2614
[
2615
kde_save_LIBS="$LIBS"
2616
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2617
kde_save_CFLAGS="$CFLAGS"
2618
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2619
AC_TRY_LINK(dnl
2620
[
2621
#include<zlib.h>
2622
],
2623
[
2624
  char buf[42];
2625
  gzFile f = (gzFile) 0;
2626
  /* this would segfault.. but we only link, don't run */
2627
  (void) gzgets(f, buf, sizeof(buf));
2628
2629
  return (zlibVersion() == ZLIB_VERSION); 
2630
],
2631
            eval "ac_cv_lib_z='-lz'",
2632
            eval "ac_cv_lib_z=no")
2633
LIBS="$kde_save_LIBS"
2634
CFLAGS="$kde_save_CFLAGS"
2635
])dnl
2636
if test ! "$ac_cv_lib_z" = no; then
2637
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2638
  LIBZ="$ac_cv_lib_z"
2639
  AC_MSG_RESULT($ac_cv_lib_z)
2640
else
2641
  AC_MSG_ERROR(not found. 
2642
          Possibly configure picks up an outdated version
2643
          installed by XFree86. Remove it from your system.
2644
2645
          Check your installation and look into config.log)
2646
  LIBZ=""
2647
fi
2648
AC_SUBST(LIBZ)
2649
])
2650
2651
AC_DEFUN([KDE_TRY_TIFFLIB],
2652
[
2653
AC_MSG_CHECKING([for libtiff $1])
2654
2655
AC_CACHE_VAL(kde_cv_libtiff_$1,
2656
[
2657
AC_LANG_SAVE
2658
AC_LANG_CPLUSPLUS
2659
kde_save_LIBS="$LIBS"
2660
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2661
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2662
else
2663
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2664
fi
2665
kde_save_CXXFLAGS="$CXXFLAGS"
2666
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2667
2668
AC_TRY_LINK(dnl
2669
[
2670
#include<tiffio.h>
2671
],
2672
    [return (TIFFOpen( "", "r") == 0); ],
2673
[
2674
    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2675
], [
2676
    kde_cv_libtiff_$1=no
2677
])
2678
2679
LIBS="$kde_save_LIBS"
2680
CXXFLAGS="$kde_save_CXXFLAGS"
2681
AC_LANG_RESTORE
2682
])
2683
2684
if test "$kde_cv_libtiff_$1" = "no"; then
2685
    AC_MSG_RESULT(no)
2686
    LIBTIFF=""
2687
    $3
2688
else
2689
    LIBTIFF="$kde_cv_libtiff_$1"
2690
    AC_MSG_RESULT(yes)
2691
    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2692
    $2
2693
fi
2694
2695
])
2696
2697
AC_DEFUN([AC_FIND_TIFF],
2698
[
2699
AC_REQUIRE([K_PATH_X])
2700
AC_REQUIRE([AC_FIND_ZLIB])
2701
AC_REQUIRE([AC_FIND_JPEG])
2702
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2703
2704
KDE_TRY_TIFFLIB(tiff, [],
2705
   KDE_TRY_TIFFLIB(tiff34))
2706
2707
AC_SUBST(LIBTIFF)
2708
])
2709
2710
AC_DEFUN([KDE_FIND_LIBEXR],
2711
[
2712
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2713
AC_REQUIRE([AC_FIND_ZLIB])
2714
AC_CACHE_VAL(ac_cv_libexr,
2715
[
2716
  if test -z "$PKG_CONFIG"; then
2717
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2718
  fi
2719
2720
  AC_MSG_CHECKING([for OpenEXR libraries])
2721
2722
  if test "$PKG_CONFIG" = "no" ; then
2723
     AC_MSG_RESULT(no)
2724
     echo "*** The pkg-config script could not be found. Make sure it is"
2725
     echo "*** in your path, or set the PKG_CONFIG environment variable"
2726
     echo "*** to the full path to pkg-config."
2727
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
2728
  else
2729
     if !(`$PKG_CONFIG --exists OpenEXR`) ; then
2730
        AC_MSG_RESULT(no)
2731
        EXRSTATUS=no
2732
     else
2733
        if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then
2734
           AC_MSG_RESULT(no)
2735
           EXRSTATUS=old
2736
        else
2737
           kde_save_LIBS="$LIBS"
2738
           LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ"
2739
           AC_LANG_SAVE
2740
           AC_LANG_CPLUSPLUS
2741
           kde_save_CXXFLAGS="$CXXFLAGS"
2742
           EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
2743
           CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS"
2744
2745
           AC_TRY_LINK(dnl
2746
               [
2747
               #include <ImfRgbaFile.h>
2748
               ],
2749
               [
2750
               using namespace Imf;
2751
               RgbaInputFile file ("dummy");
2752
               return 0;
2753
               ],
2754
               eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'",
2755
               eval "ac_cv_libexr=no"
2756
           )
2757
           LIBS="$kde_save_LIBS"
2758
           CXXFLAGS="$kde_save_CXXFLAGS"
2759
           AC_LANG_RESTORE
2760
           ])dnl
2761
           if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then
2762
               AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
2763
               LIB_EXR="$ac_cv_libexr"
2764
               AC_MSG_RESULT($ac_cv_libexr)
2765
           else
2766
               AC_MSG_RESULT(no)
2767
               LIB_EXR=""
2768
           fi
2769
        fi
2770
     fi
2771
  fi
2772
  AC_SUBST(LIB_EXR)
2773
  AC_SUBST(EXR_FLAGS)
2774
])
2775
2776
2777
2778
AC_DEFUN([AC_FIND_PNG],
2779
[
2780
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2781
AC_REQUIRE([AC_FIND_ZLIB])
2782
AC_MSG_CHECKING([for libpng])
2783
AC_CACHE_VAL(ac_cv_lib_png,
2784
[
2785
kde_save_LIBS="$LIBS"
2786
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2787
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2788
else
2789
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2790
fi
2791
kde_save_CFLAGS="$CFLAGS"
2792
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2793
2794
AC_TRY_LINK(dnl
2795
    [
2796
    #include<png.h>
2797
    ],
2798
    [
2799
    png_structp png_ptr = png_create_read_struct(  /* image ptr */
2800
		PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2801
    return( png_ptr != 0 );
2802
    ],
2803
    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2804
    eval "ac_cv_lib_png=no"
2805
)
2806
LIBS="$kde_save_LIBS"
2807
CFLAGS="$kde_save_CFLAGS"
2808
])dnl
2809
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2810
  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2811
  LIBPNG="$ac_cv_lib_png"
2812
  AC_SUBST(LIBPNG)
2813
  AC_MSG_RESULT($ac_cv_lib_png)
2814
else
2815
  AC_MSG_RESULT(no)
2816
  LIBPNG=""
2817
  AC_SUBST(LIBPNG)
2818
fi
2819
])
2820
2821
2822
AC_DEFUN([AC_FIND_JASPER],
2823
[
2824
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2825
AC_REQUIRE([AC_FIND_JPEG])
2826
AC_MSG_CHECKING([for jasper])
2827
AC_CACHE_VAL(ac_cv_jasper,
2828
[
2829
kde_save_LIBS="$LIBS"
2830
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2831
kde_save_CFLAGS="$CFLAGS"
2832
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2833
2834
AC_TRY_LINK(dnl
2835
    [
2836
    #include<jasper/jasper.h>
2837
    ],
2838
    [
2839
    return( jas_init() );
2840
    ],
2841
    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2842
    eval "ac_cv_jasper=no"
2843
)
2844
LIBS="$kde_save_LIBS"
2845
CFLAGS="$kde_save_CFLAGS"
2846
])dnl
2847
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2848
  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2849
  LIB_JASPER="$ac_cv_jasper"
2850
  AC_MSG_RESULT($ac_cv_jasper)
2851
else
2852
  AC_MSG_RESULT(no)
2853
  LIB_JASPER=""
2854
fi
2855
AC_SUBST(LIB_JASPER)
2856
])
2857
2858
AC_DEFUN([AC_CHECK_BOOL],
2859
[
2860
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2861
])
2862
2863
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2864
[
2865
AC_MSG_CHECKING(if you need GNU extensions)
2866
AC_CACHE_VAL(ac_cv_gnu_extensions,
2867
[
2868
cat > conftest.c << EOF
2869
#include <features.h>
2870
2871
#ifdef __GNU_LIBRARY__
2872
yes
2873
#endif
2874
EOF
2875
2876
if (eval "$ac_cpp conftest.c") 2>&5 |
2877
  egrep "yes" >/dev/null 2>&1; then
2878
  rm -rf conftest*
2879
  ac_cv_gnu_extensions=yes
2880
else
2881
  ac_cv_gnu_extensions=no
2882
fi
2883
])
2884
2885
AC_MSG_RESULT($ac_cv_gnu_extensions)
2886
if test "$ac_cv_gnu_extensions" = "yes"; then
2887
  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2888
fi
2889
])
2890
2891
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2892
[
2893
AC_MSG_CHECKING([whether $CXX supports -$1])
2894
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2895
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2896
[
2897
  AC_LANG_SAVE
2898
  AC_LANG_CPLUSPLUS
2899
  save_CXXFLAGS="$CXXFLAGS"
2900
  CXXFLAGS="$CXXFLAGS -$1"
2901
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2902
  CXXFLAGS="$save_CXXFLAGS"
2903
  AC_LANG_RESTORE
2904
])
2905
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2906
 AC_MSG_RESULT(yes)
2907
 :
2908
 $2
2909
else
2910
 AC_MSG_RESULT(no)
2911
 :
2912
 $3
2913
fi
2914
])
2915
2916
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
2917
[
2918
AC_MSG_CHECKING([whether $CC supports -$1])
2919
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2920
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
2921
[
2922
  AC_LANG_SAVE
2923
  AC_LANG_C
2924
  save_CFLAGS="$CFLAGS"
2925
  CFLAGS="$CFLAGS -$1"
2926
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
2927
  CFLAGS="$save_CFLAGS"
2928
  AC_LANG_RESTORE
2929
])
2930
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
2931
 AC_MSG_RESULT(yes)
2932
 :
2933
 $2
2934
else
2935
 AC_MSG_RESULT(no)
2936
 :
2937
 $3
2938
fi
2939
])
2940
2941
2942
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2943
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2944
dnl it's all white-space separated
2945
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2946
[ __val=$$1
2947
  __forbid=" $2 "
2948
  if test -n "$__val"; then
2949
    __new=""
2950
    ac_save_IFS=$IFS
2951
    IFS=" 	"
2952
    for i in $__val; do
2953
      case "$__forbid" in
2954
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2955
	*) # Careful to not add spaces, where there were none, because otherwise
2956
	   # libtool gets confused, if we change e.g. CXX
2957
	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2958
      esac
2959
    done
2960
    IFS=$ac_save_IFS
2961
    $1=$__new
2962
  fi
2963
])
2964
2965
2966
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
2967
[
2968
  AC_MSG_CHECKING([whether $CC is blacklisted])
2969
2970
  dnl In theory we have tu run this test against $CC and $CXX
2971
  dnl in C and in C++ mode, because its perfectly legal for
2972
  dnl the user to mix compiler versions, since C has a defined
2973
  dnl ABI. 
2974
  dnl 
2975
  dnl For now, we assume the user is not on crack.
2976
2977
  AC_TRY_COMPILE([
2978
#ifdef __GNUC__
2979
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
2980
choke me
2981
#endif
2982
#endif
2983
], ,
2984
  kde_bad_compiler=no, 
2985
  kde_bad_compiler=yes
2986
)
2987
2988
  AC_MSG_RESULT($kde_bad_compiler)
2989
2990
if test "$kde_bad_compiler" = "yes"; then
2991
  AC_MSG_ERROR([
2992
2993
This particular compiler version is blacklisted because it
2994
is known to miscompile KDE. Please use a newer version, or
2995
if that is not yet available, choose an older version. 
2996
2997
Please do not report a bug or bother us reporting this
2998
configure error. We know about it, and we introduced
2999
it by intention to avoid untraceable bugs or crashes in KDE.
3000
3001
])
3002
fi
3003
3004
])
3005
3006
3007
AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH],
3008
[
3009
  AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline],
3010
    kde_cv_opt_noinline_match,
3011
  [
3012
  kde_cv_opt_noinline_match=irrelevant
3013
  dnl if we don't use both -O2 and -fno-inline, this check is moot
3014
  if echo "$CFLAGS" | grep -e -O2 >/dev/null 2>/dev/null \
3015
     && echo "$CFLAGS" | grep -e -fno-inline >/dev/null 2>/dev/null ; then
3016
3017
    ac_cflags_save="$CFLAGS"
3018
    CFLAGS="$CFLAGS -D_USE_GNU"
3019
3020
    AC_TRY_LINK([
3021
  #include <string.h>
3022
], [  const char *pt, *et;
3023
  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 ,  ";,"  )); }) ;
3024
],
3025
    kde_cv_opt_noinline_match=yes,
3026
    kde_cv_opt_noinline_match=no
3027
    )
3028
3029
    CFLAGS="$ac_cflags_save"
3030
  fi
3031
  ])
3032
])
3033
3034
3035
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
3036
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
3037
[dnl
3038
if test "x$kde_use_qt_emb" != "xyes"; then
3039
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
3040
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
3041
else
3042
 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
3043
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
3044
fi
3045
])
3046
3047
AC_DEFUN([AC_CHECK_COMPILERS],
3048
[
3049
  AC_ARG_ENABLE(debug,
3050
	        AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
3051
  [
3052
    case $enableval in
3053
      yes)
3054
        kde_use_debug_code="yes"
3055
        kde_use_debug_define=no
3056
        ;;
3057
      full)
3058
        kde_use_debug_code="full"
3059
        kde_use_debug_define=no
3060
        ;;
3061
      *)
3062
        kde_use_debug_code="no"
3063
        kde_use_debug_define=yes
3064
        ;;
3065
    esac
3066
  ], 
3067
    [kde_use_debug_code="no"
3068
      kde_use_debug_define=no
3069
  ])
3070
3071
  dnl Just for configure --help
3072
  AC_ARG_ENABLE(dummyoption,
3073
	        AC_HELP_STRING([--disable-debug],
3074
	  		       [disables debug output and debug symbols [default=no]]),
3075
		[],[])
3076
3077
  AC_ARG_ENABLE(strict,
3078
		AC_HELP_STRING([--enable-strict],
3079
			      [compiles with strict compiler options (may not work!)]),
3080
   [
3081
    if test $enableval = "no"; then
3082
         kde_use_strict_options="no"
3083
       else
3084
         kde_use_strict_options="yes"
3085
    fi
3086
   ], [kde_use_strict_options="no"])
3087
3088
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
3089
   [
3090
    if test $enableval = "no"; then
3091
         kde_use_warnings="no"
3092
       else
3093
         kde_use_warnings="yes"
3094
    fi
3095
   ], [kde_use_warnings="yes"])
3096
3097
  dnl enable warnings for debug build
3098
  if test "$kde_use_debug_code" != "no"; then
3099
    kde_use_warnings=yes
3100
  fi
3101
3102
  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
3103
    [kde_use_profiling=$enableval],
3104
    [kde_use_profiling="no"]
3105
  )
3106
3107
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
3108
  CFLAGS=" $CFLAGS"
3109
3110
  AC_PROG_CC 
3111
3112
  AC_PROG_CPP
3113
3114
  if test "$GCC" = "yes"; then
3115
    if test "$kde_use_debug_code" != "no"; then
3116
      if test $kde_use_debug_code = "full"; then
3117
        CFLAGS="-g3 -fno-inline $CFLAGS"
3118
      else
3119
        CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS"
3120
      fi
3121
    else
3122
      CFLAGS="-O2 $CFLAGS"
3123
    fi
3124
  fi
3125
3126
  if test "$kde_use_debug_define" = "yes"; then
3127
    CFLAGS="-DNDEBUG $CFLAGS"
3128
  fi
3129
3130
3131
  case "$host" in
3132
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
3133
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
3134
  esac
3135
3136
  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
3137
     LDFLAGS=""
3138
  fi
3139
3140
  CXXFLAGS=" $CXXFLAGS"
3141
3142
  AC_PROG_CXX
3143
3144
  KDE_CHECK_FOR_BAD_COMPILER
3145
3146
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3147
    if test "$kde_use_debug_code" != "no"; then
3148
      if test "$CXX" = "KCC"; then
3149
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3150
      else
3151
        if test "$kde_use_debug_code" = "full"; then
3152
          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
3153
        else
3154
          CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS"
3155
        fi
3156
      fi
3157
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
3158
3159
      dnl convenience compiler flags
3160
      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
3161
      AC_SUBST(WOVERLOADED_VIRTUAL)
3162
    else
3163
      if test "$CXX" = "KCC"; then
3164
        CXXFLAGS="+K3 $CXXFLAGS"
3165
      else
3166
        CXXFLAGS="-O2 $CXXFLAGS"
3167
      fi
3168
    fi
3169
  fi
3170
3171
  if test "$kde_use_debug_define" = "yes"; then
3172
    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
3173
  fi  
3174
3175
  if test "$kde_use_profiling" = "yes"; then
3176
    KDE_CHECK_COMPILER_FLAG(pg,
3177
    [
3178
      CFLAGS="-pg $CFLAGS"
3179
      CXXFLAGS="-pg $CXXFLAGS"
3180
    ])
3181
  fi
3182
3183
  if test "$kde_use_warnings" = "yes"; then
3184
      if test "$GCC" = "yes"; then
3185
        CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
3186
        case $host in
3187
          *-*-linux-gnu)	
3188
            CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3189
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
3190
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3191
            KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
3192
          ;;
3193
        esac
3194
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3195
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3196
        dnl ### FIXME: revert for KDE 4
3197
        KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
3198
     fi
3199
  fi
3200
3201
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
3202
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3203
  fi
3204
3205
  AC_ARG_ENABLE(pch,
3206
     AC_HELP_STRING([--enable-pch],
3207
                    [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3208
    [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3209
 
3210
  HAVE_GCC_VISIBILITY=0
3211
  AC_SUBST([HAVE_GCC_VISIBILITY])
3212
3213
  if test "$GXX" = "yes"; then
3214
    gcc_no_reorder_blocks=NO
3215
    KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES])
3216
    if test $kde_use_debug_code != "no" && \
3217
       test $kde_use_debug_code != "full" && \
3218
       test "YES" = "$gcc_no_reorder_blocks" ; then
3219
          CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
3220
          CFLAGS="$CFLAGS -fno-reorder-blocks"
3221
    fi
3222
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3223
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3224
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3225
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
3226
    ENABLE_PERMISSIVE_FLAG="-fpermissive"
3227
3228
    if test "$kde_use_pch" = "yes"; then
3229
        AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3230
        echo >conftest.h
3231
        if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3232
            kde_gcc_supports_pch=yes
3233
            AC_MSG_RESULT(yes)
3234
        else
3235
            kde_gcc_supports_pch=no
3236
            AC_MSG_RESULT(no)
3237
        fi
3238
        if test "$kde_gcc_supports_pch" = "yes"; then
3239
            AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3240
            if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3241
                kde_gcc_supports_pch=yes
3242
                AC_MSG_RESULT(yes)
3243
            else
3244
                kde_gcc_supports_pch=no
3245
                AC_MSG_RESULT(no)
3246
            fi
3247
        fi
3248
        rm -f conftest.h conftest.h.gch
3249
    fi
3250
3251
    KDE_CHECK_FOR_OPT_NOINLINE_MATCH
3252
    if test "x$kde_cv_opt_noinline_match" = "xno" ; then
3253
       CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`"
3254
    fi
3255
  fi
3256
  AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3257
  if test "$CXX" = "KCC"; then
3258
    dnl unfortunately we currently cannot disable exception support in KCC
3259
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3260
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3261
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
3262
3263
    if test "$kde_use_pch" = "yes"; then
3264
      dnl TODO: support --pch-dir!
3265
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3266
      dnl the below works (but the dir must exist), but it's
3267
      dnl useless for a whole package.
3268
      dnl The are precompiled headers for each source file, so when compiling
3269
      dnl from scratch, it doesn't make a difference, and they take up
3270
      dnl around ~5Mb _per_ sourcefile.
3271
      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3272
      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3273
    fi
3274
    dnl this flag controls inlining. by default KCC inlines in optimisation mode
3275
    dnl all implementations that are defined inside the class {} declaration. 
3276
    dnl because of templates-compatibility with broken gcc compilers, this
3277
    dnl can cause excessive inlining. This flag limits it to a sane level
3278
    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3279
    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3280
    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3281
    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3282
    dnl Some source files are shared between multiple executables
3283
    dnl (or libraries) and some of those need template instantiations.
3284
    dnl In that case KCC needs to compile those sources with
3285
    dnl --one_instantiation_per_object.  To make it easy for us we compile
3286
    dnl _all_ objects with that flag (--one_per is a shorthand).
3287
    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3288
  fi
3289
  AC_SUBST(USE_EXCEPTIONS)
3290
  dnl obsolete macro - provided to keep things going
3291
  USE_RTTI=
3292
  AC_SUBST(USE_RTTI)
3293
3294
  case "$host" in
3295
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3296
      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3297
      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3298
      *-*-solaris*) 
3299
        if test "$GXX" = yes; then
3300
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
3301
          if test ! -f $libstdcpp; then
3302
             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])
3303
          fi
3304
        fi
3305
        ;;
3306
  esac
3307
3308
  AC_VALIDIFY_CXXFLAGS
3309
3310
  AC_PROG_CXXCPP
3311
3312
  if test "$GCC" = yes; then
3313
     NOOPT_CFLAGS=-O0
3314
  fi
3315
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3316
3317
  AC_ARG_ENABLE(coverage,
3318
    AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3319
      if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3320
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3321
        ac_coverage_linker="-lgcc"
3322
      elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3323
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3324
        ac_coverage_linker=""
3325
      else
3326
        AC_MSG_ERROR([coverage with your compiler is not supported])
3327
      fi
3328
      CFLAGS="$CFLAGS $ac_coverage_compiler"
3329
      CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3330
      LDFLAGS="$LDFLAGS $ac_coverage_linker"
3331
    ])
3332
3333
  AC_SUBST(NOOPT_CXXFLAGS)
3334
  AC_SUBST(NOOPT_CFLAGS)
3335
  AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3336
3337
  KDE_CHECK_NEW_LDFLAGS
3338
  KDE_CHECK_FINAL
3339
  KDE_CHECK_CLOSURE
3340
  KDE_CHECK_NMCHECK
3341
3342
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3343
])
3344
3345
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
3346
  [
3347
    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
3348
      [
3349
        AC_LANG_SAVE
3350
        AC_LANG_CPLUSPLUS
3351
3352
        safe_CXXFLAGS=$CXXFLAGS
3353
        safe_LDFLAGS=$LDFLAGS
3354
        CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
3355
        LDFLAGS="$LDFLAGS -shared -fPIC"
3356
3357
        AC_TRY_LINK(
3358
        [
3359
          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
3360
	  #include <string>
3361
          int some_function( void ) __attribute__ ((visibility("default")));
3362
          int some_function( void )
3363
          {
3364
	    std::string s("blafasel");
3365
            return 0;
3366
          }
3367
        ], [/* elvis is alive */],
3368
        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
3369
3370
        CXXFLAGS=$safe_CXXFLAGS
3371
        LDFLAGS=$safe_LDFLAGS
3372
        AC_LANG_RESTORE
3373
      ]
3374
    )
3375
3376
    if test x$kde_cv_val_gcc_visibility_bug = xno; then
3377
      CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
3378
    fi
3379
  ]
3380
)
3381
3382
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
3383
[
3384
  AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
3385
3386
  AC_MSG_CHECKING([grepping for visibility push/pop in headers])
3387
3388
  if test "x$GXX" = "xyes"; then
3389
    AC_LANG_SAVE
3390
    AC_LANG_CPLUSPLUS
3391
    AC_EGREP_CPP(
3392
       [GCC visibility push],
3393
       [ #include <exception> 
3394
       ], 
3395
    [
3396
      AC_MSG_RESULT(yes)
3397
      kde_stdc_visibility_patched=yes ],
3398
    [ 
3399
      AC_MSG_RESULT(no)
3400
      AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for 
3401
                   visibility support. Disabling -fvisibility=hidden])
3402
3403
      kde_stdc_visibility_patched=no ])
3404
3405
    AC_LANG_RESTORE
3406
3407
    kde_have_gcc_visibility=no
3408
    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
3409
    [
3410
      kde_have_gcc_visibility=yes
3411
      dnl the whole toolchain is just a mess, gcc is just too buggy
3412
      dnl to handle STL with visibility enabled. Lets reconsider 
3413
      dnl when gcc 4.2 is out or when things get fixed in the compiler.
3414
      dnl Contact mueller@kde.org for details.
3415
      AC_ARG_ENABLE(gcc-hidden-visibility,
3416
        AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
3417
          [kde_have_gcc_visibility=$enableval],
3418
          [kde_have_gcc_visibility=no])
3419
3420
      AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
3421
        [
3422
          AC_LANG_SAVE
3423
          AC_LANG_CPLUSPLUS
3424
3425
          safe_CXXFLAGS=$CXXFLAGS
3426
          CXXFLAGS="$CXXFLAGS $all_includes"
3427
3428
          AC_TRY_COMPILE(
3429
          [
3430
#include <qglobal.h>
3431
#if Q_EXPORT - 0 != 0
3432
/* if this compiles, then Q_EXPORT is undefined */
3433
/* if Q_EXPORT is nonempty, this will break compilation */
3434
#endif
3435
          ], [/* elvis is alive */],
3436
          kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
3437
3438
          CXXFLAGS=$safe_CXXFLAGS
3439
          AC_LANG_RESTORE
3440
        ]
3441
      )
3442
3443
      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
3444
        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
3445
        KDE_CHECK_VISIBILITY_GCC_BUG
3446
        HAVE_GCC_VISIBILITY=1
3447
        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3448
      fi
3449
    ])
3450
  fi
3451
])
3452
3453
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3454
[
3455
   [A]M_DEPENDENCIES(CC)
3456
   [A]M_DEPENDENCIES(CXX)
3457
])
3458
3459
dnl just a wrapper to clean up configure.in
3460
AC_DEFUN([KDE_PROG_LIBTOOL],
3461
[
3462
AC_REQUIRE([AC_CHECK_COMPILERS])
3463
AC_REQUIRE([AC_ENABLE_SHARED])
3464
AC_REQUIRE([AC_ENABLE_STATIC])
3465
3466
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3467
AC_REQUIRE([KDE_CHECK_LIB64])
3468
3469
AC_OBJEXT
3470
AC_EXEEXT
3471
3472
AM_PROG_LIBTOOL
3473
AC_LIBTOOL_CXX
3474
3475
LIBTOOL_SHELL="/bin/sh ./libtool"
3476
#  LIBTOOL="$LIBTOOL --silent"
3477
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3478
AC_SUBST(KDE_PLUGIN)
3479
3480
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
3481
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
3482
AC_SUBST(KDE_CHECK_PLUGIN)
3483
3484
# we patch configure quite some so we better keep that consistent for incremental runs 
3485
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3486
])
3487
3488
AC_DEFUN([KDE_CHECK_LIB64],
3489
[
3490
    AC_ARG_ENABLE(libsuffix,
3491
        AC_HELP_STRING([--enable-libsuffix],
3492
            [/lib directory suffix (64,32,none,auto[=default])]),
3493
            kdelibsuff=$enableval, kdelibsuff="auto")
3494
    
3495
    if test "$kdelibsuff" = "auto"; then
3496
    
3497
cat > conftest.c << EOF
3498
#include <stdio.h>
3499
int main() {
3500
 return 0;
3501
}
3502
EOF
3503
        kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
3504
    s,.*/lib\([[^\/]]*\)/.*,\1, 
3505
    p 
3506
}'`
3507
	rm -rf conftest.*
3508
    fi	
3509
	
3510
    if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
3511
       kdelibsuff=
3512
    fi
3513
    if test -z "$kdelibsuff"; then
3514
        AC_MSG_RESULT([not using lib directory suffix])
3515
        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3516
    else
3517
        if test "$libdir" = '${exec_prefix}/lib'; then
3518
            libdir="$libdir${kdelibsuff}"
3519
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
3520
        fi
3521
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3522
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3523
    fi
3524
])
3525
3526
AC_DEFUN([KDE_CHECK_TYPES],
3527
[  AC_CHECK_SIZEOF(int, 4)dnl
3528
   AC_CHECK_SIZEOF(short)dnl
3529
  AC_CHECK_SIZEOF(long, 4)dnl
3530
  AC_CHECK_SIZEOF(char *, 4)dnl
3531
])dnl
3532
3533
dnl Not used - kept for compat only?
3534
AC_DEFUN([KDE_DO_IT_ALL],
3535
[
3536
AC_CANONICAL_SYSTEM
3537
AC_ARG_PROGRAM
3538
AM_INIT_AUTOMAKE($1, $2)
3539
AM_DISABLE_LIBRARIES
3540
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3541
AC_CHECK_COMPILERS
3542
KDE_PROG_LIBTOOL
3543
AM_KDE_WITH_NLS
3544
AC_PATH_KDE
3545
])
3546
3547
AC_DEFUN([AC_CHECK_RPATH],
3548
[
3549
AC_MSG_CHECKING(for rpath)
3550
AC_ARG_ENABLE(rpath,
3551
      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3552
      USE_RPATH=$enableval, USE_RPATH=yes)
3553
3554
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3555
3556
  KDE_RPATH="-R \$(libdir)"
3557
3558
  if test "$kde_libraries" != "$libdir"; then
3559
      KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3560
  fi
3561
3562
  if test -n "$qt_libraries"; then
3563
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3564
  fi
3565
  dnl $x_libraries is set to /usr/lib in case
3566
  if test -n "$X_LDFLAGS"; then
3567
    X_RPATH="-R \$(x_libraries)"
3568
    KDE_RPATH="$KDE_RPATH $X_RPATH"
3569
  fi
3570
  if test -n "$KDE_EXTRA_RPATH"; then
3571
    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3572
  fi
3573
fi
3574
AC_SUBST(KDE_EXTRA_RPATH)
3575
AC_SUBST(KDE_RPATH)
3576
AC_SUBST(X_RPATH)
3577
AC_MSG_RESULT($USE_RPATH)
3578
])
3579
3580
dnl Check for the type of the third argument of getsockname
3581
AC_DEFUN([AC_CHECK_SOCKLEN_T],
3582
[
3583
   AC_MSG_CHECKING(for socklen_t)
3584
   AC_CACHE_VAL(kde_cv_socklen_t,
3585
   [
3586
      AC_LANG_PUSH(C++)
3587
      kde_cv_socklen_t=no
3588
      AC_TRY_COMPILE([
3589
         #include <sys/types.h>
3590
         #include <sys/socket.h>
3591
      ],
3592
      [
3593
         socklen_t len;
3594
         getpeername(0,0,&len);
3595
      ],
3596
      [
3597
         kde_cv_socklen_t=yes
3598
         kde_cv_socklen_t_equiv=socklen_t
3599
      ])
3600
      AC_LANG_POP(C++)
3601
   ])
3602
   AC_MSG_RESULT($kde_cv_socklen_t)
3603
   if test $kde_cv_socklen_t = no; then
3604
      AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3605
      AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3606
      [
3607
         kde_cv_socklen_t_equiv=int
3608
         AC_LANG_PUSH(C++)
3609
         for t in int size_t unsigned long "unsigned long"; do
3610
            AC_TRY_COMPILE([
3611
               #include <sys/types.h>
3612
               #include <sys/socket.h>
3613
            ],
3614
            [
3615
               $t len;
3616
               getpeername(0,0,&len);
3617
            ],
3618
            [
3619
               kde_cv_socklen_t_equiv="$t"
3620
               break
3621
            ])
3622
         done
3623
         AC_LANG_POP(C++)
3624
      ])
3625
      AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3626
   fi
3627
   AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3628
                     [type to use in place of socklen_t if not defined])
3629
   AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3630
                     [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3631
])
3632
3633
dnl This is a merge of some macros out of the gettext aclocal.m4
3634
dnl since we don't need anything, I took the things we need
3635
dnl the copyright for them is:
3636
dnl >
3637
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3638
dnl This Makefile.in is free software; the Free Software Foundation
3639
dnl gives unlimited permission to copy and/or distribute it,
3640
dnl with or without modifications, as long as this notice is preserved.
3641
3642
dnl This program is distributed in the hope that it will be useful,
3643
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3644
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3645
dnl PARTICULAR PURPOSE.
3646
dnl >
3647
dnl for this file it is relicensed under LGPL
3648
3649
AC_DEFUN([AM_KDE_WITH_NLS],
3650
  [
3651
    dnl If we use NLS figure out what method
3652
3653
    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3654
        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3655
    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3656
3657
     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3658
        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3659
        GMSGFMT=":"
3660
      fi
3661
      MSGFMT=$GMSGFMT
3662
      AC_SUBST(GMSGFMT)
3663
      AC_SUBST(MSGFMT)
3664
3665
      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3666
	[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3667
3668
      dnl Test whether we really found GNU xgettext.
3669
      if test "$XGETTEXT" != ":"; then
3670
	dnl If it is no GNU xgettext we define it as : so that the
3671
	dnl Makefiles still can work.
3672
	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3673
	  : ;
3674
	else
3675
	  AC_MSG_RESULT(
3676
	    [found xgettext programs is not GNU xgettext; ignore it])
3677
	  XGETTEXT=":"
3678
	fi
3679
      fi
3680
     AC_SUBST(XGETTEXT)
3681
3682
  ])
3683
3684
# Search path for a program which passes the given test.
3685
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3686
3687
# serial 1
3688
# Stephan Kulow: I appended a _KDE against name conflicts
3689
3690
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3691
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3692
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3693
[# Extract the first word of "$2", so it can be a program name with args.
3694
set dummy $2; ac_word=[$]2
3695
AC_MSG_CHECKING([for $ac_word])
3696
AC_CACHE_VAL(ac_cv_path_$1,
3697
[case "[$]$1" in
3698
  /*)
3699
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3700
  ;;
3701
  *)
3702
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3703
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
3704
    test -z "$ac_dir" && ac_dir=.
3705
    if test -f $ac_dir/$ac_word; then
3706
      if [$3]; then
3707
	ac_cv_path_$1="$ac_dir/$ac_word"
3708
	break
3709
      fi
3710
    fi
3711
  done
3712
  IFS="$ac_save_ifs"
3713
dnl If no 4th arg is given, leave the cache variable unset,
3714
dnl so AC_PATH_PROGS will keep looking.
3715
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3716
])dnl
3717
  ;;
3718
esac])dnl
3719
$1="$ac_cv_path_$1"
3720
if test -n "[$]$1"; then
3721
  AC_MSG_RESULT([$]$1)
3722
else
3723
  AC_MSG_RESULT(no)
3724
fi
3725
AC_SUBST($1)dnl
3726
])
3727
3728
3729
# Check whether LC_MESSAGES is available in <locale.h>.
3730
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3731
3732
# serial 1
3733
3734
AC_DEFUN([AM_LC_MESSAGES],
3735
  [if test $ac_cv_header_locale_h = yes; then
3736
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3737
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3738
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3739
    if test $am_cv_val_LC_MESSAGES = yes; then
3740
      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3741
    fi
3742
  fi])
3743
3744
dnl From Jim Meyering.
3745
dnl FIXME: migrate into libit.
3746
3747
AC_DEFUN([AM_FUNC_OBSTACK],
3748
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3749
 [AC_TRY_LINK([#include "obstack.h"],
3750
	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
3751
	      am_cv_func_obstack=yes,
3752
	      am_cv_func_obstack=no)])
3753
 if test $am_cv_func_obstack = yes; then
3754
   AC_DEFINE(HAVE_OBSTACK)
3755
 else
3756
   LIBOBJS="$LIBOBJS obstack.o"
3757
 fi
3758
])
3759
3760
dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
3761
dnl FIXME: Migrate into libit
3762
3763
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3764
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3765
 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3766
              am_cv_lib_error_at_line=yes,
3767
	      am_cv_lib_error_at_line=no)])
3768
 if test $am_cv_lib_error_at_line = no; then
3769
   LIBOBJS="$LIBOBJS error.o"
3770
 fi
3771
 AC_SUBST(LIBOBJS)dnl
3772
])
3773
3774
# Macro to add for using GNU gettext.
3775
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3776
3777
# serial 1
3778
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3779
3780
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3781
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3782
   AC_REQUIRE([AC_PROG_RANLIB])dnl
3783
   AC_REQUIRE([AC_HEADER_STDC])dnl
3784
   AC_REQUIRE([AC_TYPE_OFF_T])dnl
3785
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3786
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3787
   AC_REQUIRE([AC_FUNC_MMAP])dnl
3788
   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3789
   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3790
   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3791
__argz_count __argz_stringify __argz_next])
3792
3793
   AC_MSG_CHECKING(for stpcpy)
3794
   AC_CACHE_VAL(kde_cv_func_stpcpy,
3795
   [
3796
   kde_safe_cxxflags=$CXXFLAGS
3797
   CXXFLAGS="-Werror"
3798
   AC_LANG_SAVE
3799
   AC_LANG_CPLUSPLUS
3800
   AC_TRY_COMPILE([
3801
   #include <string.h>
3802
   ],
3803
   [
3804
   char buffer[200];
3805
   stpcpy(buffer, buffer);
3806
   ],
3807
   kde_cv_func_stpcpy=yes,
3808
   kde_cv_func_stpcpy=no)
3809
   AC_LANG_RESTORE
3810
   CXXFLAGS=$kde_safe_cxxflags
3811
   ])
3812
   AC_MSG_RESULT($kde_cv_func_stpcpy)
3813
   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3814
     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3815
   fi
3816
3817
   AM_LC_MESSAGES
3818
3819
   if test "x$CATOBJEXT" != "x"; then
3820
     if test "x$ALL_LINGUAS" = "x"; then
3821
       LINGUAS=
3822
     else
3823
       AC_MSG_CHECKING(for catalogs to be installed)
3824
       NEW_LINGUAS=
3825
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
3826
         case "$ALL_LINGUAS" in
3827
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3828
         esac
3829
       done
3830
       LINGUAS=$NEW_LINGUAS
3831
       AC_MSG_RESULT($LINGUAS)
3832
     fi
3833
3834
     dnl Construct list of names of catalog files to be constructed.
3835
     if test -n "$LINGUAS"; then
3836
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3837
     fi
3838
   fi
3839
3840
  ])
3841
3842
AC_DEFUN([AC_HAVE_XPM],
3843
 [AC_REQUIRE_CPP()dnl
3844
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3845
3846
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3847
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3848
3849
 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3850
	xpm_test=$withval, xpm_test="yes")
3851
 if test "x$xpm_test" = xno; then
3852
   ac_cv_have_xpm=no
3853
 else
3854
   AC_MSG_CHECKING(for XPM)
3855
   AC_CACHE_VAL(ac_cv_have_xpm,
3856
   [
3857
    ac_save_ldflags="$LDFLAGS"
3858
    ac_save_cflags="$CFLAGS"
3859
    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3860
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3861
    else
3862
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3863
    fi
3864
    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3865
    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3866
    AC_TRY_LINK([#include <X11/xpm.h>],[],
3867
	ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3868
    LDFLAGS="$ac_save_ldflags"
3869
    CFLAGS="$ac_save_cflags"
3870
   ])dnl
3871
3872
  if test "$ac_cv_have_xpm" = no; then
3873
    AC_MSG_RESULT(no)
3874
    XPM_LDFLAGS=""
3875
    XPMINC=""
3876
    $2
3877
  else
3878
    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3879
    if test "$XPM_LDFLAGS" = ""; then
3880
       XPMLIB='-lXpm $(LIB_X11)'
3881
    else
3882
       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3883
    fi
3884
    if test "$XPM_INCLUDE" = ""; then
3885
       XPMINC=""
3886
    else
3887
       XPMINC="-I$XPM_INCLUDE"
3888
    fi
3889
    AC_MSG_RESULT(yes)
3890
    $1
3891
  fi
3892
 fi
3893
 AC_SUBST(XPMINC)
3894
 AC_SUBST(XPMLIB)
3895
])
3896
3897
AC_DEFUN([AC_HAVE_DPMS],
3898
 [AC_REQUIRE_CPP()dnl
3899
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3900
3901
 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3902
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3903
 DPMS_LIB=
3904
3905
 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3906
	dpms_test=$withval, dpms_test="yes")
3907
 if test "x$dpms_test" = xno; then
3908
   ac_cv_have_dpms=no
3909
 else
3910
   AC_MSG_CHECKING(for DPMS)
3911
   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3912
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3913
   AC_CACHE_VAL(ac_cv_have_dpms,
3914
   [
3915
    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3916
      AC_MSG_RESULT(no)
3917
      ac_cv_have_dpms="no"
3918
    else
3919
      ac_save_ldflags="$LDFLAGS"
3920
      ac_save_cflags="$CFLAGS"
3921
      ac_save_libs="$LIBS"
3922
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
3923
      LIBS="-lX11 -lXext $LIBSOCKET"
3924
      CFLAGS="$CFLAGS $X_INCLUDES"
3925
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3926
      AC_TRY_LINK([
3927
	  #include <X11/Xproto.h>
3928
	  #include <X11/X.h>
3929
	  #include <X11/Xlib.h>
3930
	  #include <X11/extensions/dpms.h>
3931
	  int foo_test_dpms()
3932
	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3933
	  ac_cv_have_dpms="yes", [
3934
              LIBS="-lXdpms $LIBS"
3935
              AC_TRY_LINK([
3936
	          #include <X11/Xproto.h>
3937
        	  #include <X11/X.h>
3938
        	  #include <X11/Xlib.h>
3939
        	  #include <X11/extensions/dpms.h>
3940
        	  int foo_test_dpms()
3941
        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3942
        	  [
3943
                  ac_cv_have_dpms="-lXdpms"
3944
                  ],ac_cv_have_dpms="no")
3945
              ])
3946
      LDFLAGS="$ac_save_ldflags"
3947
      CFLAGS="$ac_save_cflags"
3948
      LIBS="$ac_save_libs"
3949
    fi
3950
   ])dnl
3951
3952
  if test "$ac_cv_have_dpms" = no; then
3953
    AC_MSG_RESULT(no)
3954
    DPMS_LDFLAGS=""
3955
    DPMSINC=""
3956
    $2
3957
  else
3958
    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3959
    if test "$ac_cv_have_dpms" = "-lXdpms"; then
3960
       DPMS_LIB="-lXdpms"
3961
    fi
3962
    if test "$DPMS_LDFLAGS" = ""; then
3963
       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3964
    else
3965
       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3966
    fi
3967
    if test "$DPMS_INCLUDE" = ""; then
3968
       DPMSINC=""
3969
    else
3970
       DPMSINC="-I$DPMS_INCLUDE"
3971
    fi
3972
    AC_MSG_RESULT(yes)
3973
    $1
3974
  fi
3975
 fi
3976
 ac_save_cflags="$CFLAGS"
3977
 CFLAGS="$CFLAGS $X_INCLUDES"
3978
 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3979
 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3980
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3981
 AC_CHECK_DECL(DPMSCapable,
3982
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3983
   [#include <X11/Xlib.h>
3984
   #include <X11/extensions/dpms.h>])
3985
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3986
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3987
 AC_CHECK_DECL(DPMSInfo,
3988
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3989
   [#include <X11/Xlib.h>
3990
   #include <X11/extensions/dpms.h>])
3991
 CFLAGS="$ac_save_cflags"
3992
 AC_SUBST(DPMSINC)
3993
 AC_SUBST(DPMSLIB)
3994
])
3995
3996
AC_DEFUN([AC_HAVE_GL],
3997
 [AC_REQUIRE_CPP()dnl
3998
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3999
4000
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
4001
 test -z "$GL_INCLUDE" && GL_INCLUDE=
4002
4003
 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
4004
	gl_test=$withval, gl_test="yes")
4005
 if test "x$kde_use_qt_emb" = "xyes"; then
4006
   # GL and Qt Embedded is a no-go for now.
4007
   ac_cv_have_gl=no
4008
 elif test "x$gl_test" = xno; then
4009
   ac_cv_have_gl=no
4010
 else
4011
   AC_MSG_CHECKING(for GL)
4012
   AC_CACHE_VAL(ac_cv_have_gl,
4013
   [
4014
    AC_LANG_SAVE
4015
    AC_LANG_CPLUSPLUS
4016
    ac_save_ldflags=$LDFLAGS
4017
    ac_save_cxxflags=$CXXFLAGS
4018
    ac_save_libs=$LIBS
4019
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
4020
    LIBS="$LIBS -lGL -lGLU"
4021
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
4022
    LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
4023
    CXXFLAGS="$CFLAGS $X_INCLUDES"
4024
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
4025
    AC_TRY_LINK([#include <GL/gl.h>
4026
#include <GL/glu.h>
4027
], [],
4028
	ac_cv_have_gl="yes", ac_cv_have_gl="no")
4029
    AC_LANG_RESTORE
4030
    LDFLAGS=$ac_save_ldflags
4031
    CXXFLAGS=$ac_save_cxxflags
4032
    LIBS=$ac_save_libs
4033
   ])dnl
4034
4035
  if test "$ac_cv_have_gl" = "no"; then
4036
    AC_MSG_RESULT(no)
4037
    GL_LDFLAGS=""
4038
    GLINC=""
4039
    $2
4040
  else
4041
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
4042
    if test "$GL_LDFLAGS" = ""; then
4043
       GLLIB='-lGLU -lGL $(LIB_X11)'
4044
    else
4045
       GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
4046
    fi
4047
    if test "$GL_INCLUDE" = ""; then
4048
       GLINC=""
4049
    else
4050
       GLINC="-I$GL_INCLUDE"
4051
    fi
4052
    AC_MSG_RESULT($ac_cv_have_gl)
4053
    $1
4054
  fi
4055
 fi
4056
 AC_SUBST(GLINC)
4057
 AC_SUBST(GLLIB)
4058
])
4059
4060
4061
 dnl shadow password and PAM magic - maintained by ossi@kde.org
4062
4063
AC_DEFUN([KDE_PAM], [
4064
  AC_REQUIRE([KDE_CHECK_LIBDL])
4065
4066
  want_pam=
4067
  AC_ARG_WITH(pam,
4068
    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
4069
    [ if test "x$withval" = "xyes"; then
4070
        want_pam=yes
4071
        pam_service=kde
4072
      elif test "x$withval" = "xno"; then
4073
        want_pam=no
4074
      else
4075
        want_pam=yes
4076
        pam_service=$withval
4077
      fi
4078
    ], [ pam_service=kde ])
4079
4080
  use_pam=
4081
  PAMLIBS=
4082
  if test "x$want_pam" != xno; then
4083
    AC_CHECK_LIB(pam, pam_start, [
4084
      AC_CHECK_HEADER(security/pam_appl.h,
4085
        [ pam_header=security/pam_appl.h ],
4086
        [ AC_CHECK_HEADER(pam/pam_appl.h,
4087
            [ pam_header=pam/pam_appl.h ],
4088
            [
4089
    AC_MSG_WARN([PAM detected, but no headers found!
4090
Make sure you have the necessary development packages installed.])
4091
            ]
4092
          )
4093
        ]
4094
      )
4095
    ], , $LIBDL)
4096
    if test -z "$pam_header"; then
4097
      if test "x$want_pam" = xyes; then
4098
        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
4099
      fi
4100
    else
4101
      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
4102
      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
4103
      use_pam=yes
4104
4105
      dnl darwin claims to be something special
4106
      if test "$pam_header" = "pam/pam_appl.h"; then
4107
        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
4108
      fi
4109
4110
      dnl test whether struct pam_message is const (Linux) or not (Sun)
4111
      AC_MSG_CHECKING(for const pam_message)
4112
      AC_EGREP_HEADER([struct pam_message], $pam_header,
4113
        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
4114
                          [AC_MSG_RESULT([const: Linux-type PAM])],
4115
                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
4116
                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
4117
                          )],
4118
        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
4119
    fi
4120
  fi
4121
4122
  AC_SUBST(PAMLIBS)
4123
])
4124
4125
dnl DEF_PAM_SERVICE(arg name, full name, define name)
4126
AC_DEFUN([DEF_PAM_SERVICE], [
4127
  AC_ARG_WITH($1-pam,
4128
    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
4129
    [ if test "x$use_pam" = xyes; then
4130
        $3_PAM_SERVICE=$withval
4131
      else
4132
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
4133
You may want to enforce it by using --with-pam.])
4134
      fi
4135
    ], 
4136
    [ if test "x$use_pam" = xyes; then
4137
        $3_PAM_SERVICE="$pam_service"
4138
      fi
4139
    ])
4140
    if test -n "$$3_PAM_SERVICE"; then
4141
      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
4142
      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
4143
    fi
4144
    AC_SUBST($3_PAM_SERVICE)
4145
])
4146
4147
AC_DEFUN([KDE_SHADOWPASSWD], [
4148
  AC_REQUIRE([KDE_PAM])
4149
4150
  AC_CHECK_LIB(shadow, getspent,
4151
    [ LIBSHADOW="-lshadow"
4152
      ac_use_shadow=yes
4153
    ],
4154
    [ dnl for UnixWare
4155
      AC_CHECK_LIB(gen, getspent, 
4156
        [ LIBGEN="-lgen"
4157
          ac_use_shadow=yes
4158
        ], 
4159
        [ AC_CHECK_FUNC(getspent, 
4160
            [ ac_use_shadow=yes ],
4161
            [ ac_use_shadow=no ])
4162
	])
4163
    ])
4164
  AC_SUBST(LIBSHADOW)
4165
  AC_SUBST(LIBGEN)
4166
  
4167
  AC_MSG_CHECKING([for shadow passwords])
4168
4169
  AC_ARG_WITH(shadow,
4170
    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
4171
    [ if test "x$withval" != "xno"; then
4172
        use_shadow=yes
4173
      else
4174
        use_shadow=no
4175
      fi
4176
    ], [
4177
      use_shadow="$ac_use_shadow"
4178
    ])
4179
4180
  if test "x$use_shadow" = xyes; then
4181
    AC_MSG_RESULT(yes)
4182
    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
4183
  else
4184
    AC_MSG_RESULT(no)
4185
    LIBSHADOW=
4186
    LIBGEN=
4187
  fi
4188
4189
  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
4190
  dnl this still applies, if we could use it indirectly through pam.
4191
  if test "x$use_shadow" = xyes || 
4192
     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
4193
      case $host in
4194
      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
4195
	SETUIDFLAGS="-m 4755 -o root";;
4196
      *)
4197
	SETUIDFLAGS="-m 4755";;
4198
      esac
4199
  fi
4200
  AC_SUBST(SETUIDFLAGS)
4201
4202
])
4203
4204
AC_DEFUN([KDE_PASSWDLIBS], [
4205
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
4206
  AC_REQUIRE([KDE_PAM])
4207
  AC_REQUIRE([KDE_SHADOWPASSWD])
4208
4209
  if test "x$use_pam" = "xyes"; then 
4210
    PASSWDLIBS="$PAMLIBS"
4211
  else
4212
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
4213
  fi
4214
4215
  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
4216
  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
4217
  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
4218
  dnl may need to read /etc/master.passwd).
4219
  case $host in
4220
  *-*-freebsd*)
4221
    SETUIDFLAGS="-m 4755 -o root"
4222
    ;;
4223
  *)
4224
    ;;
4225
  esac
4226
4227
  AC_SUBST(PASSWDLIBS)
4228
])
4229
4230
AC_DEFUN([KDE_CHECK_LIBDL],
4231
[
4232
AC_CHECK_LIB(dl, dlopen, [
4233
LIBDL="-ldl"
4234
ac_cv_have_dlfcn=yes
4235
])
4236
4237
AC_CHECK_LIB(dld, shl_unload, [
4238
LIBDL="-ldld"
4239
ac_cv_have_shload=yes
4240
])
4241
4242
AC_SUBST(LIBDL)
4243
])
4244
4245
AC_DEFUN([KDE_CHECK_DLOPEN],
4246
[
4247
KDE_CHECK_LIBDL
4248
AC_CHECK_HEADERS(dlfcn.h dl.h)
4249
if test "$ac_cv_header_dlfcn_h" = "no"; then
4250
  ac_cv_have_dlfcn=no
4251
fi
4252
4253
if test "$ac_cv_header_dl_h" = "no"; then
4254
  ac_cv_have_shload=no
4255
fi
4256
4257
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4258
dnl (MM)
4259
AC_ARG_ENABLE(dlopen,
4260
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
4261
enable_dlopen=$enableval,
4262
enable_dlopen=yes)
4263
4264
# override the user's opinion, if we know it better ;)
4265
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
4266
  enable_dlopen=no
4267
fi
4268
4269
if test "$ac_cv_have_dlfcn" = "yes"; then
4270
  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
4271
fi
4272
4273
if test "$ac_cv_have_shload" = "yes"; then
4274
  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
4275
fi
4276
4277
if test "$enable_dlopen" = no ; then
4278
  test -n "$1" && eval $1
4279
else
4280
  test -n "$2" && eval $2
4281
fi
4282
4283
])
4284
4285
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
4286
[
4287
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4288
KDE_PROG_LIBTOOL
4289
AC_MSG_CHECKING([dynamic loading])
4290
eval "`egrep '^build_libtool_libs=' libtool`"
4291
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
4292
  dynamic_loading=yes
4293
  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
4294
else
4295
  dynamic_loading=no
4296
fi
4297
AC_MSG_RESULT($dynamic_loading)
4298
if test "$dynamic_loading" = "yes"; then
4299
  $1
4300
else
4301
  $2
4302
fi
4303
])
4304
4305
AC_DEFUN([KDE_ADD_INCLUDES],
4306
[
4307
if test -z "$1"; then
4308
  test_include="Pix.h"
4309
else
4310
  test_include="$1"
4311
fi
4312
4313
AC_MSG_CHECKING([for libg++ ($test_include)])
4314
4315
AC_CACHE_VAL(kde_cv_libgpp_includes,
4316
[
4317
kde_cv_libgpp_includes=no
4318
4319
   for ac_dir in               \
4320
                               \
4321
     /usr/include/g++          \
4322
     /usr/include              \
4323
     /usr/unsupported/include  \
4324
     /opt/include              \
4325
     $extra_include            \
4326
     ; \
4327
   do
4328
     if test -r "$ac_dir/$test_include"; then
4329
       kde_cv_libgpp_includes=$ac_dir
4330
       break
4331
     fi
4332
   done
4333
])
4334
4335
AC_MSG_RESULT($kde_cv_libgpp_includes)
4336
if test "$kde_cv_libgpp_includes" != "no"; then
4337
  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
4338
fi
4339
])
4340
])
4341
4342
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
4343
[
4344
  dnl This code is here specifically to handle the
4345
  dnl various flavors of threading library on FreeBSD
4346
  dnl 4-, 5-, and 6-, and the (weird) rules around it.
4347
  dnl There may be an environment PTHREAD_LIBS that 
4348
  dnl specifies what to use; otherwise, search for it.
4349
  dnl -pthread is special cased and unsets LIBPTHREAD
4350
  dnl below if found.
4351
  LIBPTHREAD=""
4352
4353
  if test -n "$PTHREAD_LIBS"; then
4354
    if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4355
      LIBPTHREAD="PTHREAD"
4356
    else
4357
      PTHREAD_LIBS_save="$PTHREAD_LIBS"
4358
      PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4359
      AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4360
      KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4361
          LIBPTHREAD="$PTHREAD_LIBS_save"])
4362
      PTHREAD_LIBS="$PTHREAD_LIBS_save"
4363
    fi
4364
  fi
4365
4366
  dnl Is this test really needed, in the face of the Tru64 test below?
4367
  if test -z "$LIBPTHREAD"; then
4368
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4369
  fi
4370
4371
  dnl This is a special Tru64 check, see BR 76171 issue #18.
4372
  if test -z "$LIBPTHREAD" ; then
4373
    AC_MSG_CHECKING([for pthread_create in -lpthread])
4374
    kde_safe_libs=$LIBS
4375
    LIBS="$LIBS -lpthread"
4376
    AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4377
        AC_MSG_RESULT(yes)
4378
        LIBPTHREAD="-lpthread"],[
4379
	AC_MSG_RESULT(no)])
4380
    LIBS=$kde_safe_libs
4381
  fi
4382
4383
  dnl Un-special-case for FreeBSD.
4384
  if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4385
    LIBPTHREAD=""
4386
  fi
4387
4388
  AC_SUBST(LIBPTHREAD)
4389
])
4390
4391
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
4392
[
4393
      USE_THREADS=""
4394
      if test -z "$LIBPTHREAD"; then
4395
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
4396
      fi
4397
4398
    AH_VERBATIM(__svr_define, [
4399
#if defined(__SVR4) && !defined(__svr4__)
4400
#define __svr4__ 1
4401
#endif
4402
])
4403
    case $host_os in
4404
 	solaris*)
4405
		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4406
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4407
    		;;
4408
        freebsd*)
4409
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
4410
                ;;
4411
        aix*)
4412
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4413
                LIBPTHREAD="$LIBPTHREAD -lc_r"
4414
                ;;
4415
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4416
                if test "$CXX" = "KCC"; then
4417
                  CXXFLAGS="$CXXFLAGS --thread_safe"
4418
		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4419
                fi
4420
                ;;
4421
	*)
4422
		;;
4423
    esac
4424
    AC_SUBST(USE_THREADS)
4425
    AC_SUBST(LIBPTHREAD)
4426
])
4427
4428
AC_DEFUN([KDE_CHECK_THREADING],
4429
[
4430
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4431
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4432
  dnl default is yes if libpthread is found and no if no libpthread is available
4433
  if test -z "$LIBPTHREAD"; then
4434
    if test -z "$USE_THREADS"; then
4435
      kde_check_threading_default=no
4436
    else
4437
      kde_check_threading_default=yes
4438
    fi
4439
  else
4440
    kde_check_threading_default=yes
4441
  fi
4442
  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
4443
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4444
  if test "x$kde_use_threading" = "xyes"; then
4445
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4446
  fi
4447
])
4448
4449
AC_DEFUN([KDE_TRY_LINK_PYTHON],
4450
[
4451
if test "$kde_python_link_found" = no; then
4452
4453
if test "$1" = normal; then
4454
  AC_MSG_CHECKING(if a Python application links)
4455
else
4456
  AC_MSG_CHECKING(if Python depends on $2)
4457
fi
4458
4459
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4460
[
4461
kde_save_cflags="$CFLAGS"
4462
CFLAGS="$CFLAGS $PYTHONINC"
4463
kde_save_libs="$LIBS"
4464
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4465
kde_save_ldflags="$LDFLAGS"
4466
LDFLAGS="$LDFLAGS $PYTHONLIB"
4467
4468
AC_TRY_LINK(
4469
[
4470
#include <Python.h>
4471
],[
4472
	PySys_SetArgv(1, 0);
4473
],
4474
	[kde_cv_try_link_python_$1=yes],
4475
	[kde_cv_try_link_python_$1=no]
4476
)
4477
CFLAGS="$kde_save_cflags"
4478
LIBS="$kde_save_libs"
4479
LDFLAGS="$kde_save_ldflags"
4480
])
4481
4482
if test "$kde_cv_try_link_python_$1" = "yes"; then
4483
  AC_MSG_RESULT(yes)
4484
  kde_python_link_found=yes
4485
  if test ! "$1" = normal; then
4486
    LIBPYTHON="$LIBPYTHON $2"
4487
  fi
4488
  $3
4489
else
4490
  AC_MSG_RESULT(no)
4491
  $4
4492
fi
4493
4494
fi
4495
4496
])
4497
4498
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4499
[
4500
AC_MSG_CHECKING([for Python directory])
4501
 
4502
AC_CACHE_VAL(kde_cv_pythondir,
4503
[
4504
  if test -z "$PYTHONDIR"; then
4505
    kde_cv_pythondir=/usr/local
4506
  else
4507
    kde_cv_pythondir="$PYTHONDIR"
4508
  fi
4509
])
4510
 
4511
AC_ARG_WITH(pythondir,
4512
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4513
[
4514
  ac_python_dir=$withval
4515
], ac_python_dir=$kde_cv_pythondir
4516
)
4517
 
4518
AC_MSG_RESULT($ac_python_dir)
4519
])
4520
4521
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4522
[
4523
AC_REQUIRE([KDE_CHECK_LIBDL])
4524
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4525
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4526
4527
if test -z "$1"; then
4528
  version="1.5"
4529
else
4530
  version="$1"
4531
fi
4532
4533
AC_MSG_CHECKING([for Python$version])
4534
4535
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4536
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4537
if test ! -r $python_incdir/Python.h; then
4538
  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4539
  python_incdir=$python_incdir/python$version
4540
  if test ! -r $python_incdir/Python.h; then
4541
    python_incdir=no
4542
  fi
4543
fi
4544
4545
PYTHONINC=-I$python_incdir
4546
4547
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4548
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4549
if test ! -r $python_libdir/libpython$version.so; then
4550
  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4551
  if test ! -r $python_libdir/libpython$version.a; then
4552
    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4553
    python_libdir=$python_libdir/python$version/config
4554
    if test ! -r $python_libdir/libpython$version.a; then
4555
      python_libdir=no
4556
    fi
4557
  fi
4558
fi
4559
4560
PYTHONLIB=-L$python_libdir
4561
kde_orig_LIBPYTHON=$LIBPYTHON
4562
if test -z "$LIBPYTHON"; then
4563
  LIBPYTHON=-lpython$version
4564
fi
4565
4566
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4567
python_moddir=$python_moddir/python$version
4568
if test ! -r $python_moddir/copy.py; then
4569
  python_moddir=no
4570
fi
4571
4572
PYTHONMODDIR=$python_moddir
4573
4574
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4575
4576
if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
4577
   LIBPYTHON=$kde_orig_LIBPYTHON
4578
   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4579
   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4580
   $2
4581
else 
4582
  dnl Note: this test is very weak
4583
  kde_python_link_found=no
4584
  KDE_TRY_LINK_PYTHON(normal)
4585
  KDE_TRY_LINK_PYTHON(m, -lm)
4586
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4587
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4588
  KDE_TRY_LINK_PYTHON(db2, -ldb2)
4589
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4590
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4591
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4592
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4593
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4594
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4595
  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4596
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4597
	[AC_MSG_WARN([it seems, Python depends on another library.
4598
    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4599
    and contact the authors to let them know about this problem])
4600
	])
4601
4602
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4603
  AC_SUBST(PYTHONINC)
4604
  AC_SUBST(PYTHONLIB)
4605
  AC_SUBST(LIBPYTHON)
4606
  AC_SUBST(PYTHONMODDIR)
4607
  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4608
fi
4609
4610
])
4611
4612
4613
AC_DEFUN([KDE_CHECK_PYTHON],
4614
[
4615
  KDE_CHECK_PYTHON_INTERN("2.5",
4616
    [KDE_CHECK_PYTHON_INTERN("2.4",
4617
     [KDE_CHECK_PYTHON_INTERN("2.3", 
4618
       [KDE_CHECK_PYTHON_INTERN("2.2", 
4619
         [KDE_CHECK_PYTHON_INTERN("2.1", 
4620
           [KDE_CHECK_PYTHON_INTERN("2.0", 
4621
             [KDE_CHECK_PYTHON_INTERN($1, $2) ])
4622
           ])
4623
         ])
4624
       ])
4625
     ])
4626
  ])
4627
])
4628
4629
AC_DEFUN([KDE_CHECK_STL],
4630
[
4631
    AC_LANG_SAVE
4632
    AC_LANG_CPLUSPLUS
4633
    ac_save_CXXFLAGS="$CXXFLAGS"
4634
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4635
4636
    AC_MSG_CHECKING([if C++ programs can be compiled])
4637
    AC_CACHE_VAL(kde_cv_stl_works,
4638
    [
4639
      AC_TRY_COMPILE([
4640
#include <string>
4641
using namespace std;
4642
],[
4643
  string astring="Hallo Welt.";
4644
  astring.erase(0, 6); // now astring is "Welt"
4645
  return 0;
4646
], kde_cv_stl_works=yes,
4647
   kde_cv_stl_works=no)
4648
])
4649
4650
   AC_MSG_RESULT($kde_cv_stl_works)
4651
4652
   if test "$kde_cv_stl_works" = "yes"; then
4653
     # back compatible
4654
	 AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4655
   else
4656
	 AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4657
Check config.log for details - if you're using a Linux distribution you might miss
4658
a package named similar to libstdc++-dev.])
4659
   fi
4660
4661
   CXXFLAGS="$ac_save_CXXFLAGS"
4662
   AC_LANG_RESTORE
4663
])
4664
4665
AC_DEFUN([AC_FIND_QIMGIO],
4666
   [AC_REQUIRE([AC_FIND_JPEG])
4667
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4668
AC_MSG_CHECKING([for qimgio])
4669
AC_CACHE_VAL(ac_cv_lib_qimgio,
4670
[
4671
AC_LANG_SAVE
4672
AC_LANG_CPLUSPLUS
4673
ac_save_LIBS="$LIBS"
4674
ac_save_CXXFLAGS="$CXXFLAGS"
4675
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4676
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4677
AC_TRY_RUN(dnl
4678
[
4679
#include <qimageio.h>
4680
#include <qstring.h>
4681
int main() {
4682
		QString t = "hallo";
4683
		t.fill('t');
4684
		qInitImageIO();
4685
}
4686
],
4687
            ac_cv_lib_qimgio=yes,
4688
            ac_cv_lib_qimgio=no,
4689
	    ac_cv_lib_qimgio=no)
4690
LIBS="$ac_save_LIBS"
4691
CXXFLAGS="$ac_save_CXXFLAGS"
4692
AC_LANG_RESTORE
4693
])dnl
4694
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4695
  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4696
  AC_MSG_RESULT(yes)
4697
  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4698
  AC_SUBST(LIBQIMGIO)
4699
else
4700
  AC_MSG_RESULT(not found)
4701
fi
4702
])
4703
4704
AC_DEFUN([AM_DISABLE_LIBRARIES],
4705
[
4706
    AC_PROVIDE([AM_ENABLE_STATIC])
4707
    AC_PROVIDE([AM_ENABLE_SHARED])
4708
    enable_static=no
4709
    enable_shared=yes
4710
])
4711
4712
4713
AC_DEFUN([AC_CHECK_UTMP_FILE],
4714
[
4715
    AC_MSG_CHECKING([for utmp file])
4716
4717
    AC_CACHE_VAL(kde_cv_utmp_file,
4718
    [
4719
    kde_cv_utmp_file=no
4720
4721
    for ac_file in    \
4722
                      \
4723
	/var/run/utmp \
4724
	/var/adm/utmp \
4725
	/etc/utmp     \
4726
     ; \
4727
    do
4728
     if test -r "$ac_file"; then
4729
       kde_cv_utmp_file=$ac_file
4730
       break
4731
     fi
4732
    done
4733
    ])
4734
4735
    if test "$kde_cv_utmp_file" != "no"; then
4736
	AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4737
	$1
4738
	AC_MSG_RESULT($kde_cv_utmp_file)
4739
    else
4740
    	$2
4741
	AC_MSG_RESULT([non found])
4742
    fi
4743
])
4744
4745
4746
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4747
[
4748
4749
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4750
TOPSUBDIRS=""
4751
4752
if test ! -s $srcdir/subdirs; then
4753
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
4754
  files=`cd $srcdir && ls -1`
4755
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4756
  for i in $dirs; do
4757
    echo $i >> $srcdir/subdirs
4758
  done
4759
fi
4760
4761
ac_topsubdirs=
4762
if test -s $srcdir/inst-apps; then
4763
  ac_topsubdirs="`cat $srcdir/inst-apps`"
4764
elif test -s $srcdir/subdirs; then
4765
  ac_topsubdirs="`cat $srcdir/subdirs`"
4766
fi
4767
4768
for i in $ac_topsubdirs; do
4769
  AC_MSG_CHECKING([if $i should be compiled])
4770
  if test -d $srcdir/$i; then
4771
    install_it="yes"
4772
    for j in $DO_NOT_COMPILE; do
4773
      if test $i = $j; then
4774
        install_it="no"
4775
      fi
4776
    done
4777
  else
4778
    install_it="no"
4779
  fi
4780
  AC_MSG_RESULT($install_it)
4781
  vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
4782
  if test $install_it = "yes"; then
4783
    TOPSUBDIRS="$TOPSUBDIRS $i"
4784
    eval "$vari""_SUBDIR_included=yes"
4785
  else
4786
    eval "$vari""_SUBDIR_included=no"
4787
  fi
4788
done
4789
4790
AC_SUBST(TOPSUBDIRS)
4791
])
4792
4793
AC_DEFUN([KDE_CHECK_NAMESPACES],
4794
[
4795
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4796
AC_LANG_SAVE
4797
AC_LANG_CPLUSPLUS
4798
AC_TRY_COMPILE([
4799
],
4800
[
4801
namespace Foo {
4802
  extern int i;
4803
  namespace Bar {
4804
    extern int i;
4805
  }
4806
}
4807
4808
int Foo::i = 0;
4809
int Foo::Bar::i = 1;
4810
],[
4811
  AC_MSG_RESULT(yes)
4812
  AC_DEFINE(HAVE_NAMESPACES)
4813
], [
4814
AC_MSG_RESULT(no)
4815
])
4816
AC_LANG_RESTORE
4817
])
4818
4819
dnl ------------------------------------------------------------------------
4820
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4821
dnl ------------------------------------------------------------------------
4822
dnl
4823
AC_DEFUN([AC_CHECK_S_ISSOCK],
4824
[
4825
AC_MSG_CHECKING(for S_ISSOCK)
4826
AC_CACHE_VAL(ac_cv_have_s_issock,
4827
[
4828
AC_TRY_LINK(
4829
[
4830
#include <sys/stat.h>
4831
],
4832
[
4833
struct stat buff;
4834
int b = S_ISSOCK( buff.st_mode );
4835
],
4836
ac_cv_have_s_issock=yes,
4837
ac_cv_have_s_issock=no)
4838
])
4839
AC_MSG_RESULT($ac_cv_have_s_issock)
4840
if test "$ac_cv_have_s_issock" = "yes"; then
4841
  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4842
fi
4843
4844
AH_VERBATIM(_ISSOCK,
4845
[
4846
#ifndef HAVE_S_ISSOCK
4847
#define HAVE_S_ISSOCK
4848
#define S_ISSOCK(mode) (1==0)
4849
#endif
4850
])
4851
4852
])
4853
4854
dnl ------------------------------------------------------------------------
4855
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4856
dnl ------------------------------------------------------------------------
4857
dnl
4858
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4859
[
4860
AC_MSG_CHECKING(for MAXPATHLEN)
4861
AC_CACHE_VAL(ac_cv_maxpathlen,
4862
[
4863
cat > conftest.$ac_ext <<EOF
4864
#ifdef STDC_HEADERS
4865
# include <stdlib.h>
4866
#endif
4867
#include <stdio.h>
4868
#include <sys/param.h>
4869
#ifndef MAXPATHLEN
4870
#define MAXPATHLEN 1024
4871
#endif
4872
4873
KDE_HELLO MAXPATHLEN
4874
4875
EOF
4876
4877
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4878
4879
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4880
    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4881
else
4882
    ac_cv_maxpathlen=1024
4883
fi
4884
4885
rm conftest.*
4886
4887
])
4888
AC_MSG_RESULT($ac_cv_maxpathlen)
4889
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4890
])
4891
4892
AC_DEFUN([KDE_CHECK_HEADER],
4893
[
4894
   kde_safe_cppflags=$CPPFLAGS
4895
   CPPFLAGS="$CPPFLAGS $all_includes"
4896
   AC_LANG_SAVE
4897
   AC_LANG_CPLUSPLUS
4898
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4899
   AC_LANG_RESTORE
4900
   CPPFLAGS=$kde_safe_cppflags
4901
])
4902
4903
AC_DEFUN([KDE_CHECK_HEADERS],
4904
[
4905
   AH_CHECK_HEADERS([$1])
4906
   AC_LANG_SAVE
4907
   kde_safe_cppflags=$CPPFLAGS
4908
   CPPFLAGS="$CPPFLAGS $all_includes"
4909
   AC_LANG_CPLUSPLUS
4910
   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4911
   CPPFLAGS=$kde_safe_cppflags
4912
   AC_LANG_RESTORE
4913
])
4914
4915
AC_DEFUN([KDE_FAST_CONFIGURE],
4916
[
4917
  dnl makes configure fast (needs perl)
4918
  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4919
      with_fast_perl=$enableval, with_fast_perl=yes)
4920
])
4921
4922
AC_DEFUN([KDE_CONF_FILES],
4923
[
4924
  val=
4925
  if test -f $srcdir/configure.files ; then
4926
    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4927
  fi
4928
  CONF_FILES=
4929
  if test -n "$val" ; then
4930
    for i in $val ; do
4931
      CONF_FILES="$CONF_FILES $i"
4932
    done
4933
  fi
4934
  AC_SUBST(CONF_FILES)
4935
])dnl
4936
4937
dnl This sets the prefix, for arts and kdelibs
4938
dnl Do NOT use in any other module.
4939
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
4940
AC_DEFUN([KDE_SET_PREFIX_CORE],
4941
[
4942
  unset CDPATH
4943
  dnl make $KDEDIR the default for the installation
4944
  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4945
4946
  if test "x$prefix" = "xNONE"; then
4947
    prefix=$ac_default_prefix
4948
    ac_configure_args="$ac_configure_args --prefix=$prefix"
4949
  fi
4950
  # And delete superfluous '/' to make compares easier
4951
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4952
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4953
4954
  kde_libs_prefix='$(prefix)'
4955
  kde_libs_htmldir='$(kde_htmldir)'
4956
  AC_SUBST(kde_libs_prefix)
4957
  AC_SUBST(kde_libs_htmldir)
4958
  KDE_FAST_CONFIGURE
4959
  KDE_CONF_FILES
4960
])
4961
4962
4963
AC_DEFUN([KDE_SET_PREFIX],
4964
[
4965
  unset CDPATH
4966
  dnl We can't give real code to that macro, only a value.
4967
  dnl It only matters for --help, since we set the prefix in this function anyway.
4968
  AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
4969
4970
  KDE_SET_DEFAULT_BINDIRS
4971
  if test "x$prefix" = "xNONE"; then
4972
    dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
4973
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4974
  else
4975
    dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
4976
    kde_save_PATH="$PATH"
4977
    PATH="$exec_prefix/bin:$prefix/bin:$PATH"
4978
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4979
    PATH="$kde_save_PATH"
4980
  fi
4981
4982
  kde_libs_prefix=`$KDECONFIG --prefix`
4983
  if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
4984
       AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
4985
                    This means it has been moved since you installed it.
4986
                    This won't work. Please recompile kdelibs for the new prefix.
4987
                    ])
4988
  fi
4989
  kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
4990
4991
  AC_MSG_CHECKING([where to install])
4992
  if test "x$prefix" = "xNONE"; then
4993
    prefix=$kde_libs_prefix
4994
    AC_MSG_RESULT([$prefix (as returned by kde-config)])
4995
  else
4996
    dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
4997
    given_prefix=$prefix
4998
    AC_MSG_RESULT([$prefix (as requested)])
4999
  fi
5000
5001
  # And delete superfluous '/' to make compares easier
5002
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5003
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5004
  given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5005
5006
  AC_SUBST(KDECONFIG)
5007
  AC_SUBST(kde_libs_prefix)
5008
  AC_SUBST(kde_libs_htmldir)
5009
5010
  KDE_FAST_CONFIGURE
5011
  KDE_CONF_FILES
5012
])
5013
5014
pushdef([AC_PROG_INSTALL],
5015
[
5016
  dnl our own version, testing for a -p flag
5017
  popdef([AC_PROG_INSTALL])
5018
  dnl as AC_PROG_INSTALL works as it works we first have
5019
  dnl to save if the user didn't specify INSTALL, as the
5020
  dnl autoconf one overwrites INSTALL and we have no chance to find
5021
  dnl out afterwards
5022
  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
5023
  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
5024
  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
5025
  AC_PROG_INSTALL
5026
5027
  if test -z "$kde_save_INSTALL_given" ; then
5028
    # OK, user hasn't given any INSTALL, autoconf found one for us
5029
    # now we test, if it supports the -p flag
5030
    AC_MSG_CHECKING(for -p flag to install)
5031
    rm -f confinst.$$.* > /dev/null 2>&1
5032
    echo "Testtest" > confinst.$$.orig
5033
    ac_res=no
5034
    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
5035
      if test -f confinst.$$.new ; then
5036
        # OK, -p seems to do no harm to install
5037
	INSTALL="${INSTALL} -p"
5038
	ac_res=yes
5039
      fi
5040
    fi
5041
    rm -f confinst.$$.*
5042
    AC_MSG_RESULT($ac_res)
5043
  fi
5044
  dnl the following tries to resolve some signs and wonders coming up
5045
  dnl with different autoconf/automake versions
5046
  dnl e.g.:
5047
  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
5048
  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
5049
  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
5050
  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
5051
  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
5052
  dnl   install-@DIR@PROGRAMS targets to explicitly use that flag
5053
  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
5054
  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
5055
  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
5056
  dnl  *sometimes KDE does not use the install-@DIR@PROGRAM targets from
5057
  dnl   automake (due to broken Makefile.am or whatever) to install programs,
5058
  dnl   and so does not see the -s flag in automake > 1.4
5059
  dnl to clean up that mess we:
5060
  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
5061
  dnl   which cleans KDE's program with automake > 1.4;
5062
  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
5063
  dnl   with automake<=1.4
5064
  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
5065
  dnl   properly uses install-@DIR@PROGRAMS, but I don't care
5066
  dnl
5067
  dnl And to all this comes, that I even can't write in comments variable
5068
  dnl  names used by automake, because it is so stupid to think I wanted to
5069
  dnl  _use_ them, therefor I have written A_M_... instead of AM_
5070
  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
5071
5072
  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
5073
    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
5074
  fi
5075
  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
5076
    INSTALL_SCRIPT='${INSTALL}'
5077
  fi
5078
])dnl
5079
5080
AC_DEFUN([KDE_LANG_CPLUSPLUS],
5081
[AC_LANG_CPLUSPLUS
5082
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
5083
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
5084
])
5085
5086
pushdef([AC_LANG_CPLUSPLUS],
5087
[popdef([AC_LANG_CPLUSPLUS])
5088
KDE_LANG_CPLUSPLUS
5089
])
5090
5091
AC_DEFUN([KDE_CHECK_LONG_LONG],
5092
[
5093
AC_MSG_CHECKING(for long long)
5094
AC_CACHE_VAL(kde_cv_c_long_long,
5095
[
5096
  AC_LANG_SAVE
5097
  AC_LANG_CPLUSPLUS
5098
  AC_TRY_LINK([], [
5099
  long long foo = 0;
5100
  foo = foo+1;
5101
  ],
5102
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
5103
  AC_LANG_RESTORE
5104
])
5105
AC_MSG_RESULT($kde_cv_c_long_long)
5106
if test "$kde_cv_c_long_long" = yes; then
5107
   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
5108
fi
5109
])
5110
5111
AC_DEFUN([KDE_CHECK_LIB],
5112
[
5113
     kde_save_LDFLAGS="$LDFLAGS"
5114
     dnl AC_CHECK_LIB modifies LIBS, so save it here
5115
     kde_save_LIBS="$LIBS"
5116
     LDFLAGS="$LDFLAGS $all_libraries"
5117
     case $host_os in
5118
      aix*) LDFLAGS="-brtl $LDFLAGS"
5119
	test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
5120
	;;
5121
     esac
5122
     AC_CHECK_LIB($1, $2, $3, $4, $5)
5123
     LDFLAGS="$kde_save_LDFLAGS"
5124
     LIBS="$kde_save_LIBS"
5125
])
5126
5127
AC_DEFUN([KDE_JAVA_PREFIX],
5128
[
5129
	dir=`dirname "$1"`
5130
	base=`basename "$1"`
5131
	list=`ls -1 $dir 2> /dev/null`
5132
	for entry in $list; do 
5133
		if test -d $dir/$entry/bin; then
5134
			case $entry in
5135
			   $base)
5136
				javadirs="$javadirs $dir/$entry/bin"
5137
				;;
5138
			esac
5139
		elif test -d $dir/$entry/jre/bin; then
5140
			case $entry in
5141
			   $base)
5142
				javadirs="$javadirs $dir/$entry/jre/bin"
5143
				;;
5144
			esac
5145
		fi
5146
	done
5147
])
5148
5149
dnl KDE_CHEC_JAVA_DIR(onlyjre)
5150
AC_DEFUN([KDE_CHECK_JAVA_DIR],
5151
[
5152
5153
AC_ARG_WITH(java,
5154
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
5155
[  ac_java_dir=$withval
5156
], ac_java_dir=""
5157
)
5158
5159
AC_MSG_CHECKING([for Java])
5160
5161
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
5162
if test "x$ac_java_dir" = "xno"; then
5163
   kde_java_bindir=no
5164
   kde_java_includedir=no
5165
   kde_java_libjvmdir=no
5166
   kde_java_libgcjdir=no
5167
   kde_java_libhpidir=no
5168
else
5169
  if test "x$ac_java_dir" = "x"; then
5170
     
5171
     
5172
      dnl No option set -> collect list of candidate paths
5173
      if test -n "$JAVA_HOME"; then
5174
        KDE_JAVA_PREFIX($JAVA_HOME)
5175
      fi
5176
      KDE_JAVA_PREFIX(/usr/j2se)
5177
      KDE_JAVA_PREFIX(/usr/lib/j2se)
5178
      KDE_JAVA_PREFIX(/usr/j*dk*)
5179
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
5180
      KDE_JAVA_PREFIX(/opt/j*sdk*)
5181
      KDE_JAVA_PREFIX(/usr/lib/java*)
5182
      KDE_JAVA_PREFIX(/usr/java*)
5183
      KDE_JAVA_PREFIX(/usr/java/j*dk*)
5184
      KDE_JAVA_PREFIX(/usr/java/j*re*)
5185
      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
5186
      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
5187
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
5188
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
5189
      KDE_JAVA_PREFIX(/opt/java*)
5190
5191
      kde_cv_path="NONE"
5192
      kde_save_IFS=$IFS
5193
      IFS=':'
5194
      for dir in $PATH; do
5195
	  if test -d "$dir"; then
5196
	      javadirs="$javadirs $dir"
5197
	  fi
5198
      done
5199
      IFS=$kde_save_IFS
5200
      jredirs=
5201
5202
      dnl Now javadirs contains a list of paths that exist, all ending with bin/
5203
      for dir in $javadirs; do
5204
          dnl Check for the java executable
5205
	  if test -x "$dir/java"; then
5206
	      sane_path=$(cd $dir; /bin/pwd)
5207
	      dnl And also check for a libjvm.so somewhere under there
5208
	      dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
5209
              if test "$sane_path" != "/usr/bin"; then
5210
                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5211
		  if test ! -f $libjvmdir/libjvm.so; then continue; fi
5212
		  jredirs="$jredirs $dir"
5213
	      fi
5214
	  fi
5215
      done
5216
5217
      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
5218
      JAVAC=
5219
      JAVA=
5220
      kde_java_bindir=no
5221
      for dir in $jredirs; do
5222
	  JAVA="$dir/java"
5223
	  kde_java_bindir=$dir
5224
	  if test -x "$dir/javac"; then
5225
		JAVAC="$dir/javac"
5226
                break
5227
	  fi
5228
      done
5229
5230
      if test -n "$JAVAC"; then
5231
          dnl this substitution might not work - well, we test for jni.h below
5232
          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
5233
      else
5234
          kde_java_includedir=no
5235
      fi
5236
  else
5237
    dnl config option set
5238
    kde_java_bindir=$ac_java_dir/bin
5239
    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
5240
	kde_java_includedir=no
5241
    else
5242
        kde_java_includedir=$ac_java_dir/include
5243
    fi
5244
  fi
5245
fi
5246
5247
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
5248
if test "x$kde_java_bindir" != "xno"; then
5249
5250
  dnl Look for libjvm.so
5251
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5252
  dnl Look for libgcj.so
5253
  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5254
  dnl Look for libhpi.so and avoid green threads
5255
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5256
5257
  dnl Now check everything's fine under there
5258
  dnl the include dir is our flag for having the JDK
5259
  if test -d "$kde_java_includedir"; then
5260
    if test ! -x "$kde_java_bindir/javac"; then
5261
      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
5262
    fi
5263
    if test ! -x "$kde_java_bindir/javah"; then
5264
      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5265
    fi
5266
    if test ! -x "$kde_java_bindir/jar"; then
5267
      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5268
    fi
5269
    if test ! -r "$kde_java_includedir/jni.h"; then
5270
      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
5271
    fi
5272
5273
    jni_includes="-I$kde_java_includedir"
5274
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5275
    dnl and under linux here.. 
5276
    
5277
    dnl not needed for gcj
5278
5279
    if test "x$kde_java_libgcjdir" = "x"; then 
5280
      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5281
      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5282
      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5283
    fi
5284
5285
  else
5286
    JAVAC=
5287
    jni_includes=
5288
  fi
5289
5290
  if test "x$kde_java_libgcjdir" = "x"; then 
5291
     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5292
        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5293
     fi 
5294
  else
5295
     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5296
        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5297
     fi 
5298
  fi
5299
5300
  if test ! -x "$kde_java_bindir/java"; then
5301
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5302
  fi
5303
5304
  dnl not needed for gcj compile
5305
5306
  if test "x$kde_java_libgcjdir" = "x"; then 
5307
      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5308
        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5309
      fi
5310
  fi
5311
5312
  if test -n "$jni_includes"; then
5313
    dnl Check for JNI version
5314
    AC_LANG_SAVE
5315
    AC_LANG_CPLUSPLUS
5316
    ac_cxxflags_safe="$CXXFLAGS"
5317
    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
5318
5319
    AC_TRY_COMPILE([
5320
  #include <jni.h>
5321
	      ],
5322
	      [
5323
  #ifndef JNI_VERSION_1_2
5324
  Syntax Error
5325
  #endif
5326
	      ],[ kde_jni_works=yes ],
5327
	      [ kde_jni_works=no ])
5328
5329
    if test $kde_jni_works = no; then
5330
      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
5331
		    You need to have Java Development Kit (JDK) version 1.2. 
5332
5333
		    Use --with-java to specify another location.
5334
		    Use --without-java to configure without java support.
5335
		    Or download a newer JDK and try again. 
5336
		    See e.g. http://java.sun.com/products/jdk/1.2 ])
5337
    fi
5338
5339
    CXXFLAGS="$ac_cxxflags_safe"    
5340
    AC_LANG_RESTORE
5341
5342
    dnl All tests ok, inform and subst the variables
5343
5344
    JAVAC=$kde_java_bindir/javac
5345
    JAVAH=$kde_java_bindir/javah
5346
    JAR=$kde_java_bindir/jar
5347
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5348
    if test "x$kde_java_libgcjdir" = "x"; then 
5349
      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5350
    else
5351
      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5352
    fi
5353
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
5354
5355
  else
5356
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5357
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
5358
  fi
5359
elif test -d "/Library/Java/Home"; then
5360
  kde_java_bindir="/Library/Java/Home/bin"
5361
  jni_includes="-I/Library/Java/Home/include"
5362
5363
  JAVAC=$kde_java_bindir/javac
5364
  JAVAH=$kde_java_bindir/javah
5365
  JAR=$kde_java_bindir/jar
5366
  JVMLIBS="-Wl,-framework,JavaVM"
5367
5368
  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5369
  AC_MSG_RESULT([Apple Java Framework])
5370
else
5371
  AC_MSG_RESULT([none found])
5372
fi
5373
5374
AC_SUBST(JAVAC)
5375
AC_SUBST(JAVAH)
5376
AC_SUBST(JAR)
5377
AC_SUBST(JVMLIBS)
5378
AC_SUBST(jni_includes)
5379
5380
# for backward compat
5381
kde_cv_java_includedir=$kde_java_includedir
5382
kde_cv_java_bindir=$kde_java_bindir
5383
])
5384
5385
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
5386
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
5387
dnl big packages, m4_foreach is dog-slow.  So use our own version of
5388
dnl it.  (matz@kde.org)
5389
m4_define([mm_foreach],
5390
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
5391
m4_define([mm_car], [[$1]])
5392
m4_define([mm_car2], [[$@]])
5393
m4_define([_mm_foreach],
5394
[m4_if(m4_quote($2), [], [],
5395
       [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5396
                                                   mm_car2(m4_shift($2)),
5397
                                                   [$3])])])
5398
m4_define([AC_FOREACH],
5399
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5400
5401
AC_DEFUN([KDE_NEED_FLEX],
5402
[
5403
kde_libs_safe=$LIBS
5404
LIBS="$LIBS $USER_LDFLAGS"
5405
AM_PROG_LEX
5406
LIBS=$kde_libs_safe
5407
if test -z "$LEXLIB"; then
5408
    AC_MSG_ERROR([You need to have flex installed.])
5409
fi
5410
AC_SUBST(LEXLIB)
5411
])
5412
5413
AC_DEFUN([AC_PATH_QTOPIA],
5414
[
5415
  dnl TODO: use AC_CACHE_VAL
5416
5417
  if test -z "$1"; then
5418
    qtopia_minver_maj=1
5419
    qtopia_minver_min=5
5420
    qtopia_minver_pat=0
5421
  else
5422
    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5423
    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5424
    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5425
  fi
5426
5427
  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5428
  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5429
5430
  AC_REQUIRE([AC_PATH_QT])
5431
5432
  AC_MSG_CHECKING([for Qtopia])
5433
5434
  LIB_QTOPIA="-lqpe"
5435
  AC_SUBST(LIB_QTOPIA)
5436
5437
  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5438
5439
  ac_qtopia_incdir=NO
5440
5441
  AC_ARG_WITH(qtopia-dir,
5442
              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
5443
              [  ac_qtopia_incdir="$withval"/include] ) 
5444
  
5445
  qtopia_incdirs=""
5446
  for dir in $kde_qtopia_dirs; do
5447
    qtopia_incdirs="$qtopia_incdirs $dir/include"
5448
  done
5449
5450
  if test ! "$ac_qtopia_incdir" = "NO"; then
5451
    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5452
  fi
5453
5454
  qtopia_incdir=""
5455
  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5456
  ac_qtopia_incdir="$qtopia_incdir"
5457
5458
  if test -z "$qtopia_incdir"; then
5459
    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5460
  fi
5461
5462
  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5463
  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5464
  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5465
5466
  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5467
  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5468
  if test "$qtopia_ver" -lt "$qtopia_minver"; then
5469
    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5470
is required.])
5471
  fi
5472
5473
  AC_LANG_SAVE
5474
  AC_LANG_CPLUSPLUS
5475
5476
  ac_cxxflags_safe="$CXXFLAGS"
5477
  ac_ldflags_safe="$LDFLAGS"
5478
  ac_libs_safe="$LIBS"
5479
5480
  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5481
  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5482
  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5483
5484
  cat > conftest.$ac_ext <<EOF
5485
#include "confdefs.h"
5486
#include <qpe/qpeapplication.h>
5487
#include <qpe/version.h>
5488
5489
int main( int argc, char **argv )
5490
{
5491
    QPEApplication app( argc, argv );
5492
    return 0;
5493
}
5494
EOF
5495
5496
  if AC_TRY_EVAL(ac_link) && test -s conftest; then
5497
    rm -f conftest*
5498
  else
5499
    rm -f conftest*
5500
    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5501
the end of config.log])
5502
  fi
5503
5504
  CXXFLAGS="$ac_cxxflags_safe"
5505
  LDFLAGS="$ac_ldflags_safe"
5506
  LIBS="$ac_libs_safe"
5507
5508
  AC_LANG_RESTORE
5509
5510
  QTOPIA_INCLUDES="-I$qtopia_incdir"
5511
  AC_SUBST(QTOPIA_INCLUDES)
5512
5513
  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5514
])
5515
5516
5517
AC_DEFUN([KDE_INIT_DOXYGEN],
5518
[
5519
AC_MSG_CHECKING([for Qt docs])
5520
kde_qtdir=
5521
if test "${with_qt_dir+set}" = set; then
5522
  kde_qtdir="$with_qt_dir"
5523
fi
5524
5525
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)
5526
AC_MSG_RESULT($QTDOCDIR)
5527
5528
AC_SUBST(QTDOCDIR)
5529
5530
KDE_FIND_PATH(dot, DOT, [], [])
5531
if test -n "$DOT"; then
5532
  KDE_HAVE_DOT="YES"
5533
else
5534
  KDE_HAVE_DOT="NO"
5535
fi
5536
AC_SUBST(KDE_HAVE_DOT)
5537
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5538
AC_SUBST(DOXYGEN)
5539
5540
DOXYGEN_PROJECT_NAME="$1"
5541
DOXYGEN_PROJECT_NUMBER="$2"
5542
AC_SUBST(DOXYGEN_PROJECT_NAME)
5543
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5544
5545
KDE_HAS_DOXYGEN=no
5546
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5547
  KDE_HAS_DOXYGEN=yes
5548
fi
5549
AC_SUBST(KDE_HAS_DOXYGEN)
5550
5551
])
5552
5553
5554
AC_DEFUN([AC_FIND_BZIP2],
5555
[
5556
AC_MSG_CHECKING([for bzDecompress in libbz2])
5557
AC_CACHE_VAL(ac_cv_lib_bzip2,
5558
[
5559
AC_LANG_SAVE
5560
AC_LANG_CPLUSPLUS
5561
kde_save_LIBS="$LIBS"
5562
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5563
kde_save_CXXFLAGS="$CXXFLAGS"
5564
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5565
AC_TRY_LINK(dnl
5566
[
5567
#define BZ_NO_STDIO
5568
#include<bzlib.h>
5569
],
5570
            [ bz_stream s; (void) bzDecompress(&s); ],
5571
            eval "ac_cv_lib_bzip2='-lbz2'",
5572
            eval "ac_cv_lib_bzip2=no")
5573
LIBS="$kde_save_LIBS"
5574
CXXFLAGS="$kde_save_CXXFLAGS"
5575
AC_LANG_RESTORE
5576
])dnl
5577
AC_MSG_RESULT($ac_cv_lib_bzip2)
5578
5579
if test ! "$ac_cv_lib_bzip2" = no; then
5580
  BZIP2DIR=bzip2
5581
5582
  LIBBZ2="$ac_cv_lib_bzip2"
5583
  AC_SUBST(LIBBZ2)
5584
5585
else
5586
5587
   cxx_shared_flag=
5588
   ld_shared_flag=
5589
   KDE_CHECK_COMPILER_FLAG(shared, [
5590
	ld_shared_flag="-shared"
5591
   ])
5592
   KDE_CHECK_COMPILER_FLAG(fPIC, [
5593
        cxx_shared_flag="-fPIC"
5594
   ])
5595
5596
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5597
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5598
   [
5599
   AC_LANG_SAVE
5600
   AC_LANG_CPLUSPLUS
5601
   kde_save_LIBS="$LIBS"
5602
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5603
   kde_save_CXXFLAGS="$CXXFLAGS"
5604
   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5605
5606
   AC_TRY_LINK(dnl
5607
   [
5608
   #define BZ_NO_STDIO
5609
   #include<bzlib.h>
5610
   ],
5611
               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5612
               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5613
               eval "ac_cv_lib_bzip2_prefix=no")
5614
   LIBS="$kde_save_LIBS"
5615
   CXXFLAGS="$kde_save_CXXFLAGS"
5616
   AC_LANG_RESTORE
5617
   ])dnl
5618
5619
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5620
   
5621
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5622
     BZIP2DIR=bzip2
5623
    
5624
     LIBBZ2="$ac_cv_lib_bzip2_prefix"
5625
     AC_SUBST(LIBBZ2)
5626
5627
     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5628
   dnl else, we just ignore this
5629
   fi
5630
5631
fi
5632
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5633
])
5634
5635
dnl ------------------------------------------------------------------------
5636
dnl Try to find the SSL headers and libraries.
5637
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5638
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5639
dnl ------------------------------------------------------------------------
5640
dnl
5641
AC_DEFUN([KDE_CHECK_SSL],
5642
[
5643
LIBSSL="-lssl -lcrypto"
5644
AC_REQUIRE([KDE_CHECK_LIB64])
5645
5646
ac_ssl_includes=NO ac_ssl_libraries=NO
5647
ssl_libraries=""
5648
ssl_includes=""
5649
AC_ARG_WITH(ssl-dir,
5650
    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5651
    [  ac_ssl_includes="$withval"/include
5652
       ac_ssl_libraries="$withval"/lib$kdelibsuff
5653
    ])
5654
5655
want_ssl=yes
5656
AC_ARG_WITH(ssl,
5657
    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5658
    [want_ssl=$withval])
5659
5660
if test $want_ssl = yes; then
5661
5662
AC_MSG_CHECKING(for OpenSSL)
5663
5664
AC_CACHE_VAL(ac_cv_have_ssl,
5665
[#try to guess OpenSSL locations
5666
  
5667
  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5668
  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5669
  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5670
  ac_ssl_includes="$ssl_incdir"
5671
5672
  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"
5673
  if test ! "$ac_ssl_libraries" = "NO"; then
5674
    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5675
  fi
5676
5677
  test=NONE
5678
  ssl_libdir=NONE
5679
  for dir in $ssl_libdirs; do
5680
    try="ls -1 $dir/libssl*"
5681
    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5682
  done
5683
5684
  ac_ssl_libraries="$ssl_libdir"
5685
5686
  ac_ldflags_safe="$LDFLAGS"
5687
  ac_libs_safe="$LIBS"
5688
5689
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5690
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5691
5692
  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5693
  ac_ssl_rsaref="yes"
5694
  ,
5695
  ac_ssl_rsaref="no"
5696
  )
5697
5698
  LDFLAGS="$ac_ldflags_safe"
5699
  LIBS="$ac_libs_safe"
5700
5701
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5702
    have_ssl=no
5703
  else
5704
    have_ssl=yes;
5705
  fi
5706
5707
  ])
5708
5709
  eval "$ac_cv_have_ssl"
5710
5711
  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5712
5713
  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5714
  AC_MSG_RESULT($ac_ssl_rsaref)
5715
5716
  AC_MSG_CHECKING([for easter eggs])
5717
  AC_MSG_RESULT([none found])
5718
5719
else
5720
  have_ssl=no
5721
fi
5722
5723
if test "$have_ssl" = yes; then
5724
  AC_MSG_CHECKING(for OpenSSL version)
5725
  dnl Check for SSL version
5726
  AC_CACHE_VAL(ac_cv_ssl_version,
5727
  [
5728
5729
    cat >conftest.$ac_ext <<EOF
5730
#include <openssl/opensslv.h>
5731
#include <stdio.h>
5732
    int main() {
5733
 
5734
#ifndef OPENSSL_VERSION_NUMBER
5735
      printf("ssl_version=\\"error\\"\n");
5736
#else
5737
      if (OPENSSL_VERSION_NUMBER < 0x00906000)
5738
        printf("ssl_version=\\"old\\"\n");
5739
      else
5740
        printf("ssl_version=\\"ok\\"\n");
5741
#endif
5742
     return (0);
5743
    }
5744
EOF
5745
5746
    ac_save_CPPFLAGS=$CPPFLAGS
5747
    if test "$ac_ssl_includes" != "/usr/include"; then
5748
        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5749
    fi
5750
5751
    if AC_TRY_EVAL(ac_link); then 
5752
5753
      if eval `./conftest 2>&5`; then
5754
        if test $ssl_version = error; then
5755
          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5756
        else
5757
          if test $ssl_version = old; then
5758
            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5759
            have_ssl=no
5760
          fi
5761
        fi
5762
        ac_cv_ssl_version="ssl_version=$ssl_version"
5763
      else
5764
        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5765
        Check config.log, and if you can't figure it out, send a mail to 
5766
        David Faure <faure@kde.org>, attaching your config.log])
5767
      fi
5768
5769
    else
5770
      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5771
      Check config.log, and if you can't figure it out, send a mail to 
5772
      David Faure <faure@kde.org>, attaching your config.log])
5773
    fi 
5774
    CPPFLAGS=$ac_save_CPPFLAGS
5775
5776
  ])
5777
5778
  eval "$ac_cv_ssl_version"
5779
  AC_MSG_RESULT($ssl_version)
5780
fi
5781
5782
if test "$have_ssl" != yes; then
5783
  LIBSSL="";
5784
else
5785
  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5786
  ac_cv_have_ssl="have_ssl=yes \
5787
    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5788
  
5789
  
5790
  ssl_libraries="$ac_ssl_libraries"
5791
  ssl_includes="$ac_ssl_includes"
5792
5793
  if test "$ac_ssl_rsaref" = yes; then
5794
    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
5795
  fi
5796
5797
  if test $ssl_version = "old"; then
5798
    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5799
  fi
5800
fi
5801
5802
SSL_INCLUDES=
5803
5804
if test "$ssl_includes" = "/usr/include"; then
5805
  if test -f /usr/kerberos/include/krb5.h; then
5806
	SSL_INCLUDES="-I/usr/kerberos/include"
5807
  fi
5808
elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5809
  SSL_INCLUDES="-I$ssl_includes"
5810
fi
5811
5812
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5813
 SSL_LDFLAGS=""
5814
else
5815
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5816
fi
5817
5818
AC_SUBST(SSL_INCLUDES)
5819
AC_SUBST(SSL_LDFLAGS)
5820
AC_SUBST(LIBSSL)
5821
])
5822
5823
AC_DEFUN([KDE_CHECK_STRLCPY],
5824
[
5825
  AC_REQUIRE([AC_CHECK_STRLCAT])
5826
  AC_REQUIRE([AC_CHECK_STRLCPY])
5827
  AC_CHECK_SIZEOF(size_t)
5828
  AC_CHECK_SIZEOF(unsigned long)
5829
5830
  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5831
  AC_TRY_COMPILE(,[
5832
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5833
       choke me
5834
    #endif
5835
    ],AC_MSG_RESULT([yes]),[
5836
      AC_MSG_RESULT(no)
5837
      AC_MSG_ERROR([
5838
       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
5839
       does not apply. Please mail kde-devel@kde.org with a description of your system!
5840
      ])
5841
  ])
5842
])
5843
5844
AC_DEFUN([KDE_CHECK_BINUTILS],
5845
[
5846
  AC_MSG_CHECKING([if ld supports unversioned version maps])
5847
5848
  kde_save_LDFLAGS="$LDFLAGS"
5849
  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5850
  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5851
  AC_TRY_LINK([int foo;],
5852
[
5853
#ifdef __INTEL_COMPILER
5854
icc apparently does not support libtools version-info and version-script
5855
at the same time. Dunno where the bug is, but until somebody figured out,
5856
better disable the optional version scripts.
5857
#endif
5858
5859
  foo = 42;
5860
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5861
  LDFLAGS="$kde_save_LDFLAGS"
5862
  rm -f conftest.map
5863
  AM_CONDITIONAL(include_VERSION_SCRIPT, 
5864
    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5865
5866
  AC_MSG_RESULT($kde_supports_versionmaps)
5867
])
5868
5869
AC_DEFUN([AM_PROG_OBJC],[
5870
AC_CHECK_PROGS(OBJC, gcc, gcc)
5871
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5872
if test "x${OBJCFLAGS-unset}" = xunset; then
5873
   OBJCFLAGS="-g -O2"
5874
fi
5875
AC_SUBST(OBJCFLAGS)
5876
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5877
])
5878
5879
AC_DEFUN([KDE_CHECK_PERL],
5880
[
5881
	KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5882
		    AC_MSG_ERROR([No Perl found in your $PATH.
5883
We need perl to generate some code.])
5884
	])
5885
    AC_SUBST(PERL)
5886
])
5887
5888
AC_DEFUN([KDE_CHECK_LARGEFILE],
5889
[
5890
AC_SYS_LARGEFILE
5891
if test "$ac_cv_sys_file_offset_bits" != no; then
5892
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5893
fi
5894
5895
if test "x$ac_cv_sys_large_files" != "xno"; then
5896
  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5897
fi
5898
5899
])
5900
5901
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
5902
dnl which allows to search for libs that get installed into the KDE prefix.
5903
dnl
5904
dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
5905
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
5906
dnl also defines KSTUFF_PKG_ERRORS on error
5907
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5908
5909
   PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5910
   if test "$prefix" != "$kde_libs_prefix"; then
5911
       PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5912
   fi
5913
   export PKG_CONFIG_PATH
5914
   PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
5915
])
5916
5917
5918
dnl Check for PIE support in the compiler and linker
5919
AC_DEFUN([KDE_CHECK_PIE_SUPPORT],
5920
[
5921
  AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
5922
  [
5923
    AC_LANG_SAVE
5924
    AC_LANG_CPLUSPLUS
5925
    safe_CXXFLAGS=$CXXFLAGS
5926
    safe_LDFLAGS=$LDFLAGS
5927
    CXXFLAGS="$CXXFLAGS -fPIE"
5928
    LDFLAGS="$LDFLAGS -pie"
5929
5930
    AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
5931
5932
    CXXFLAGS=$safe_CXXFLAGS
5933
    LDFLAGS=$safe_LDFLAGS
5934
    AC_LANG_RESTORE
5935
  ])
5936
5937
  AC_MSG_CHECKING(if enabling -pie/fPIE support)
5938
5939
  AC_ARG_ENABLE(pie,
5940
    AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
5941
      [kde_has_pie_support=$enableval],
5942
      [kde_has_pie_support=detect])
5943
5944
  if test "$kde_has_pie_support" = "detect"; then
5945
    kde_has_pie_support=$kde_cv_val_pie_support
5946
  fi
5947
5948
  AC_MSG_RESULT([$kde_has_pie_support])
5949
5950
  KDE_USE_FPIE=""
5951
  KDE_USE_PIE=""
5952
5953
  AC_SUBST([KDE_USE_FPIE])
5954
  AC_SUBST([KDE_USE_PIE])
5955
5956
  if test "$kde_has_pie_support" = "yes"; then
5957
    KDE_USE_FPIE="-fPIE"
5958
    KDE_USE_PIE="-pie"
5959
  fi
5960
])
5961
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5962
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
5963
## Free Software Foundation, Inc.
5964
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5965
##
5966
## This file is free software; the Free Software Foundation gives
5967
## unlimited permission to copy and/or distribute it, with or without
5968
## modifications, as long as this notice is preserved.
5969
5970
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
5971
5972
5973
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5974
# -----------------------------------------------------------
5975
# If this macro is not defined by Autoconf, define it here.
5976
m4_ifdef([AC_PROVIDE_IFELSE],
5977
         [],
5978
         [m4_define([AC_PROVIDE_IFELSE],
5979
	         [m4_ifdef([AC_PROVIDE_$1],
5980
		           [$2], [$3])])])
5981
5982
5983
# AC_PROG_LIBTOOL
5984
# ---------------
5985
AC_DEFUN([AC_PROG_LIBTOOL],
5986
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5987
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5988
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5989
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
5990
    [AC_LIBTOOL_CXX],
5991
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5992
  ])])
5993
dnl And a similar setup for Fortran 77 support
5994
  AC_PROVIDE_IFELSE([AC_PROG_F77],
5995
    [AC_LIBTOOL_F77],
5996
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5997
])])
5998
5999
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
6000
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
6001
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
6002
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
6003
    [AC_LIBTOOL_GCJ],
6004
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
6005
      [AC_LIBTOOL_GCJ],
6006
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
6007
	[AC_LIBTOOL_GCJ],
6008
      [ifdef([AC_PROG_GCJ],
6009
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6010
       ifdef([A][M_PROG_GCJ],
6011
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6012
       ifdef([LT_AC_PROG_GCJ],
6013
	     [define([LT_AC_PROG_GCJ],
6014
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6015
])])# AC_PROG_LIBTOOL
6016
6017
6018
# _AC_PROG_LIBTOOL
6019
# ----------------
6020
AC_DEFUN([_AC_PROG_LIBTOOL],
6021
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
6022
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
6023
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
6024
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
6025
6026
# This can be used to rebuild libtool when needed
6027
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
6028
6029
# Always use our own libtool.
6030
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
6031
AC_SUBST(LIBTOOL)dnl
6032
6033
# Prevent multiple expansion
6034
define([AC_PROG_LIBTOOL], [])
6035
])# _AC_PROG_LIBTOOL
6036
6037
6038
# AC_LIBTOOL_SETUP
6039
# ----------------
6040
AC_DEFUN([AC_LIBTOOL_SETUP],
6041
[AC_PREREQ(2.50)dnl
6042
AC_REQUIRE([AC_ENABLE_SHARED])dnl
6043
AC_REQUIRE([AC_ENABLE_STATIC])dnl
6044
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
6045
AC_REQUIRE([AC_CANONICAL_HOST])dnl
6046
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6047
AC_REQUIRE([AC_PROG_CC])dnl
6048
AC_REQUIRE([AC_PROG_LD])dnl
6049
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
6050
AC_REQUIRE([AC_PROG_NM])dnl
6051
6052
AC_REQUIRE([AC_PROG_LN_S])dnl
6053
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
6054
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6055
AC_REQUIRE([AC_OBJEXT])dnl
6056
AC_REQUIRE([AC_EXEEXT])dnl
6057
dnl
6058
6059
AC_LIBTOOL_SYS_MAX_CMD_LEN
6060
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6061
AC_LIBTOOL_OBJDIR
6062
6063
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6064
_LT_AC_PROG_ECHO_BACKSLASH
6065
6066
case $host_os in
6067
aix3*)
6068
  # AIX sometimes has problems with the GCC collect2 program.  For some
6069
  # reason, if we set the COLLECT_NAMES environment variable, the problems
6070
  # vanish in a puff of smoke.
6071
  if test "X${COLLECT_NAMES+set}" != Xset; then
6072
    COLLECT_NAMES=
6073
    export COLLECT_NAMES
6074
  fi
6075
  ;;
6076
esac
6077
6078
# Sed substitution that helps us do robust quoting.  It backslashifies
6079
# metacharacters that are still active within double-quoted strings.
6080
Xsed='sed -e 1s/^X//'
6081
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
6082
6083
# Same as above, but do not quote variable references.
6084
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
6085
6086
# Sed substitution to delay expansion of an escaped shell variable in a
6087
# double_quote_subst'ed string.
6088
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6089
6090
# Sed substitution to avoid accidental globbing in evaled expressions
6091
no_glob_subst='s/\*/\\\*/g'
6092
6093
# Constants:
6094
rm="rm -f"
6095
6096
# Global variables:
6097
default_ofile=libtool
6098
can_build_shared=yes
6099
6100
# All known linkers require a `.a' archive for static linking (except MSVC,
6101
# which needs '.lib').
6102
libext=a
6103
ltmain="$ac_aux_dir/ltmain.sh"
6104
ofile="$default_ofile"
6105
with_gnu_ld="$lt_cv_prog_gnu_ld"
6106
6107
AC_CHECK_TOOL(AR, ar, false)
6108
AC_CHECK_TOOL(RANLIB, ranlib, :)
6109
AC_CHECK_TOOL(STRIP, strip, :)
6110
6111
old_CC="$CC"
6112
old_CFLAGS="$CFLAGS"
6113
6114
# Set sane defaults for various variables
6115
test -z "$AR" && AR=ar
6116
test -z "$AR_FLAGS" && AR_FLAGS=cru
6117
test -z "$AS" && AS=as
6118
test -z "$CC" && CC=cc
6119
test -z "$LTCC" && LTCC=$CC
6120
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
6121
test -z "$DLLTOOL" && DLLTOOL=dlltool
6122
test -z "$LD" && LD=ld
6123
test -z "$LN_S" && LN_S="ln -s"
6124
test -z "$MAGIC_CMD" && MAGIC_CMD=file
6125
test -z "$NM" && NM=nm
6126
test -z "$SED" && SED=sed
6127
test -z "$OBJDUMP" && OBJDUMP=objdump
6128
test -z "$RANLIB" && RANLIB=:
6129
test -z "$STRIP" && STRIP=:
6130
test -z "$ac_objext" && ac_objext=o
6131
6132
# Determine commands to create old-style static archives.
6133
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6134
old_postinstall_cmds='chmod 644 $oldlib'
6135
old_postuninstall_cmds=
6136
6137
if test -n "$RANLIB"; then
6138
  case $host_os in
6139
  openbsd*)
6140
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6141
    ;;
6142
  *)
6143
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6144
    ;;
6145
  esac
6146
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6147
fi
6148
6149
_LT_CC_BASENAME([$compiler])
6150
6151
# Only perform the check for file, if the check method requires it
6152
case $deplibs_check_method in
6153
file_magic*)
6154
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6155
    AC_PATH_MAGIC
6156
  fi
6157
  ;;
6158
esac
6159
6160
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
6161
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6162
enable_win32_dll=yes, enable_win32_dll=no)
6163
6164
AC_ARG_ENABLE([libtool-lock],
6165
    [AC_HELP_STRING([--disable-libtool-lock],
6166
	[avoid locking (might break parallel builds)])])
6167
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6168
6169
AC_ARG_WITH([pic],
6170
    [AC_HELP_STRING([--with-pic],
6171
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
6172
    [pic_mode="$withval"],
6173
    [pic_mode=default])
6174
test -z "$pic_mode" && pic_mode=default
6175
6176
# Use C for the default configuration in the libtool script
6177
tagname=
6178
AC_LIBTOOL_LANG_C_CONFIG
6179
_LT_AC_TAGCONFIG
6180
])# AC_LIBTOOL_SETUP
6181
6182
6183
# _LT_AC_SYS_COMPILER
6184
# -------------------
6185
AC_DEFUN([_LT_AC_SYS_COMPILER],
6186
[AC_REQUIRE([AC_PROG_CC])dnl
6187
6188
# If no C compiler was specified, use CC.
6189
LTCC=${LTCC-"$CC"}
6190
6191
# If no C compiler flags were specified, use CFLAGS.
6192
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
6193
6194
# Allow CC to be a program name with arguments.
6195
compiler=$CC
6196
])# _LT_AC_SYS_COMPILER
6197
6198
6199
# _LT_CC_BASENAME(CC)
6200
# -------------------
6201
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
6202
AC_DEFUN([_LT_CC_BASENAME],
6203
[for cc_temp in $1""; do
6204
  case $cc_temp in
6205
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
6206
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
6207
    \-*) ;;
6208
    *) break;;
6209
  esac
6210
done
6211
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
6212
])
6213
6214
6215
# _LT_COMPILER_BOILERPLATE
6216
# ------------------------
6217
# Check for compiler boilerplate output or warnings with
6218
# the simple compiler test code.
6219
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
6220
[ac_outfile=conftest.$ac_objext
6221
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
6222
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
6223
_lt_compiler_boilerplate=`cat conftest.err`
6224
$rm conftest*
6225
])# _LT_COMPILER_BOILERPLATE
6226
6227
6228
# _LT_LINKER_BOILERPLATE
6229
# ----------------------
6230
# Check for linker boilerplate output or warnings with
6231
# the simple link test code.
6232
AC_DEFUN([_LT_LINKER_BOILERPLATE],
6233
[ac_outfile=conftest.$ac_objext
6234
printf "$lt_simple_link_test_code" >conftest.$ac_ext
6235
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
6236
_lt_linker_boilerplate=`cat conftest.err`
6237
$rm conftest*
6238
])# _LT_LINKER_BOILERPLATE
6239
6240
6241
# _LT_AC_SYS_LIBPATH_AIX
6242
# ----------------------
6243
# Links a minimal program and checks the executable
6244
# for the system default hardcoded library path. In most cases,
6245
# this is /usr/lib:/lib, but when the MPI compilers are used
6246
# the location of the communication and MPI libs are included too.
6247
# If we don't find anything, use the default library path according
6248
# to the aix ld manual.
6249
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
6250
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6251
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
6252
}'`
6253
# Check for a 64-bit object if we didn't find anything.
6254
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; }
6255
}'`; fi],[])
6256
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6257
])# _LT_AC_SYS_LIBPATH_AIX
6258
6259
6260
# _LT_AC_SHELL_INIT(ARG)
6261
# ----------------------
6262
AC_DEFUN([_LT_AC_SHELL_INIT],
6263
[ifdef([AC_DIVERSION_NOTICE],
6264
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6265
	 [AC_DIVERT_PUSH(NOTICE)])
6266
$1
6267
AC_DIVERT_POP
6268
])# _LT_AC_SHELL_INIT
6269
6270
6271
# _LT_AC_PROG_ECHO_BACKSLASH
6272
# --------------------------
6273
# Add some code to the start of the generated configure script which
6274
# will find an echo command which doesn't interpret backslashes.
6275
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
6276
[_LT_AC_SHELL_INIT([
6277
# Check that we are running under the correct shell.
6278
SHELL=${CONFIG_SHELL-/bin/sh}
6279
6280
case X$ECHO in
6281
X*--fallback-echo)
6282
  # Remove one level of quotation (which was required for Make).
6283
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6284
  ;;
6285
esac
6286
6287
echo=${ECHO-echo}
6288
if test "X[$]1" = X--no-reexec; then
6289
  # Discard the --no-reexec flag, and continue.
6290
  shift
6291
elif test "X[$]1" = X--fallback-echo; then
6292
  # Avoid inline document here, it may be left over
6293
  :
6294
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
6295
  # Yippee, $echo works!
6296
  :
6297
else
6298
  # Restart under the correct shell.
6299
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6300
fi
6301
6302
if test "X[$]1" = X--fallback-echo; then
6303
  # used as fallback echo
6304
  shift
6305
  cat <<EOF
6306
[$]*
6307
EOF
6308
  exit 0
6309
fi
6310
6311
# The HP-UX ksh and POSIX shell print the target directory to stdout
6312
# if CDPATH is set.
6313
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
6314
6315
if test -z "$ECHO"; then
6316
if test "X${echo_test_string+set}" != Xset; then
6317
# find a string as large as possible, as long as the shell can cope with it
6318
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6319
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6320
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
6321
       echo_test_string=`eval $cmd` &&
6322
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6323
    then
6324
      break
6325
    fi
6326
  done
6327
fi
6328
6329
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6330
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6331
   test "X$echo_testing_string" = "X$echo_test_string"; then
6332
  :
6333
else
6334
  # The Solaris, AIX, and Digital Unix default echo programs unquote
6335
  # backslashes.  This makes it impossible to quote backslashes using
6336
  #   echo "$something" | sed 's/\\/\\\\/g'
6337
  #
6338
  # So, first we look for a working echo in the user's PATH.
6339
6340
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6341
  for dir in $PATH /usr/ucb; do
6342
    IFS="$lt_save_ifs"
6343
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6344
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6345
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6346
       test "X$echo_testing_string" = "X$echo_test_string"; then
6347
      echo="$dir/echo"
6348
      break
6349
    fi
6350
  done
6351
  IFS="$lt_save_ifs"
6352
6353
  if test "X$echo" = Xecho; then
6354
    # We didn't find a better echo, so look for alternatives.
6355
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6356
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6357
       test "X$echo_testing_string" = "X$echo_test_string"; then
6358
      # This shell has a builtin print -r that does the trick.
6359
      echo='print -r'
6360
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6361
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
6362
      # If we have ksh, try running configure again with it.
6363
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6364
      export ORIGINAL_CONFIG_SHELL
6365
      CONFIG_SHELL=/bin/ksh
6366
      export CONFIG_SHELL
6367
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6368
    else
6369
      # Try using printf.
6370
      echo='printf %s\n'
6371
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6372
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6373
	 test "X$echo_testing_string" = "X$echo_test_string"; then
6374
	# Cool, printf works
6375
	:
6376
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6377
	   test "X$echo_testing_string" = 'X\t' &&
6378
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6379
	   test "X$echo_testing_string" = "X$echo_test_string"; then
6380
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6381
	export CONFIG_SHELL
6382
	SHELL="$CONFIG_SHELL"
6383
	export SHELL
6384
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
6385
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6386
	   test "X$echo_testing_string" = 'X\t' &&
6387
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6388
	   test "X$echo_testing_string" = "X$echo_test_string"; then
6389
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
6390
      else
6391
	# maybe with a smaller string...
6392
	prev=:
6393
6394
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6395
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6396
	  then
6397
	    break
6398
	  fi
6399
	  prev="$cmd"
6400
	done
6401
6402
	if test "$prev" != 'sed 50q "[$]0"'; then
6403
	  echo_test_string=`eval $prev`
6404
	  export echo_test_string
6405
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6406
	else
6407
	  # Oops.  We lost completely, so just stick with echo.
6408
	  echo=echo
6409
	fi
6410
      fi
6411
    fi
6412
  fi
6413
fi
6414
fi
6415
6416
# Copy echo and quote the copy suitably for passing to libtool from
6417
# the Makefile, instead of quoting the original, which is used later.
6418
ECHO=$echo
6419
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6420
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6421
fi
6422
6423
AC_SUBST(ECHO)
6424
])])# _LT_AC_PROG_ECHO_BACKSLASH
6425
6426
6427
# _LT_AC_LOCK
6428
# -----------
6429
AC_DEFUN([_LT_AC_LOCK],
6430
[AC_ARG_ENABLE([libtool-lock],
6431
    [AC_HELP_STRING([--disable-libtool-lock],
6432
	[avoid locking (might break parallel builds)])])
6433
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6434
6435
# Some flags need to be propagated to the compiler or linker for good
6436
# libtool support.
6437
case $host in
6438
ia64-*-hpux*)
6439
  # Find out which ABI we are using.
6440
  echo 'int i;' > conftest.$ac_ext
6441
  if AC_TRY_EVAL(ac_compile); then
6442
    case `/usr/bin/file conftest.$ac_objext` in
6443
    *ELF-32*)
6444
      HPUX_IA64_MODE="32"
6445
      ;;
6446
    *ELF-64*)
6447
      HPUX_IA64_MODE="64"
6448
      ;;
6449
    esac
6450
  fi
6451
  rm -rf conftest*
6452
  ;;
6453
*-*-irix6*)
6454
  # Find out which ABI we are using.
6455
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6456
  if AC_TRY_EVAL(ac_compile); then
6457
   if test "$lt_cv_prog_gnu_ld" = yes; then
6458
    case `/usr/bin/file conftest.$ac_objext` in
6459
    *32-bit*)
6460
      LD="${LD-ld} -melf32bsmip"
6461
      ;;
6462
    *N32*)
6463
      LD="${LD-ld} -melf32bmipn32"
6464
      ;;
6465
    *64-bit*)
6466
      LD="${LD-ld} -melf64bmip"
6467
      ;;
6468
    esac
6469
   else
6470
    case `/usr/bin/file conftest.$ac_objext` in
6471
    *32-bit*)
6472
      LD="${LD-ld} -32"
6473
      ;;
6474
    *N32*)
6475
      LD="${LD-ld} -n32"
6476
      ;;
6477
    *64-bit*)
6478
      LD="${LD-ld} -64"
6479
      ;;
6480
    esac
6481
   fi
6482
  fi
6483
  rm -rf conftest*
6484
  ;;
6485
6486
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6487
  # Find out which ABI we are using.
6488
  echo 'int i;' > conftest.$ac_ext
6489
  if AC_TRY_EVAL(ac_compile); then
6490
    case `/usr/bin/file conftest.o` in
6491
    *32-bit*)
6492
      case $host in
6493
        x86_64-*linux*)
6494
          LD="${LD-ld} -m elf_i386"
6495
          ;;
6496
        ppc64-*linux*|powerpc64-*linux*)
6497
          LD="${LD-ld} -m elf32ppclinux"
6498
          ;;
6499
        s390x-*linux*)
6500
          LD="${LD-ld} -m elf_s390"
6501
          ;;
6502
        sparc64-*linux*)
6503
          LD="${LD-ld} -m elf32_sparc"
6504
          ;;
6505
      esac
6506
      ;;
6507
    *64-bit*)
6508
      case $host in
6509
        x86_64-*linux*)
6510
          LD="${LD-ld} -m elf_x86_64"
6511
          ;;
6512
        ppc*-*linux*|powerpc*-*linux*)
6513
          LD="${LD-ld} -m elf64ppc"
6514
          ;;
6515
        s390*-*linux*)
6516
          LD="${LD-ld} -m elf64_s390"
6517
          ;;
6518
        sparc*-*linux*)
6519
          LD="${LD-ld} -m elf64_sparc"
6520
          ;;
6521
      esac
6522
      ;;
6523
    esac
6524
  fi
6525
  rm -rf conftest*
6526
  ;;
6527
6528
*-*-sco3.2v5*)
6529
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6530
  SAVE_CFLAGS="$CFLAGS"
6531
  CFLAGS="$CFLAGS -belf"
6532
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6533
    [AC_LANG_PUSH(C)
6534
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6535
     AC_LANG_POP])
6536
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6537
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6538
    CFLAGS="$SAVE_CFLAGS"
6539
  fi
6540
  ;;
6541
sparc*-*solaris*)
6542
  # Find out which ABI we are using.
6543
  echo 'int i;' > conftest.$ac_ext
6544
  if AC_TRY_EVAL(ac_compile); then
6545
    case `/usr/bin/file conftest.o` in
6546
    *64-bit*)
6547
      case $lt_cv_prog_gnu_ld in
6548
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
6549
      *)    LD="${LD-ld} -64" ;;
6550
      esac
6551
      ;;
6552
    esac
6553
  fi
6554
  rm -rf conftest*
6555
  ;;
6556
6557
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6558
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6559
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6560
  AC_CHECK_TOOL(AS, as, false)
6561
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
6562
  ;;
6563
  ])
6564
esac
6565
6566
need_locks="$enable_libtool_lock"
6567
6568
])# _LT_AC_LOCK
6569
6570
6571
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6572
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6573
# ----------------------------------------------------------------
6574
# Check whether the given compiler option works
6575
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6576
[AC_REQUIRE([LT_AC_PROG_SED])
6577
AC_CACHE_CHECK([$1], [$2],
6578
  [$2=no
6579
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6580
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6581
   lt_compiler_flag="$3"
6582
   # Insert the option either (1) after the last *FLAGS variable, or
6583
   # (2) before a word containing "conftest.", or (3) at the end.
6584
   # Note that $ac_compile itself does not contain backslashes and begins
6585
   # with a dollar sign (not a hyphen), so the echo should work correctly.
6586
   # The option is referenced via a variable to avoid confusing sed.
6587
   lt_compile=`echo "$ac_compile" | $SED \
6588
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6589
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6590
   -e 's:$: $lt_compiler_flag:'`
6591
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6592
   (eval "$lt_compile" 2>conftest.err)
6593
   ac_status=$?
6594
   cat conftest.err >&AS_MESSAGE_LOG_FD
6595
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6596
   if (exit $ac_status) && test -s "$ac_outfile"; then
6597
     # The compiler can only warn and ignore the option if not recognized
6598
     # So say no if there are warnings other than the usual output.
6599
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
6600
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6601
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
6602
       $2=yes
6603
     fi
6604
   fi
6605
   $rm conftest*
6606
])
6607
6608
if test x"[$]$2" = xyes; then
6609
    ifelse([$5], , :, [$5])
6610
else
6611
    ifelse([$6], , :, [$6])
6612
fi
6613
])# AC_LIBTOOL_COMPILER_OPTION
6614
6615
6616
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6617
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
6618
# ------------------------------------------------------------
6619
# Check whether the given compiler option works
6620
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6621
[AC_CACHE_CHECK([$1], [$2],
6622
  [$2=no
6623
   save_LDFLAGS="$LDFLAGS"
6624
   LDFLAGS="$LDFLAGS $3"
6625
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
6626
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6627
     # The linker can only warn and ignore the option if not recognized
6628
     # So say no if there are warnings
6629
     if test -s conftest.err; then
6630
       # Append any errors to the config.log.
6631
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
6632
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
6633
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6634
       if diff conftest.exp conftest.er2 >/dev/null; then
6635
         $2=yes
6636
       fi
6637
     else
6638
       $2=yes
6639
     fi
6640
   fi
6641
   $rm conftest*
6642
   LDFLAGS="$save_LDFLAGS"
6643
])
6644
6645
if test x"[$]$2" = xyes; then
6646
    ifelse([$4], , :, [$4])
6647
else
6648
    ifelse([$5], , :, [$5])
6649
fi
6650
])# AC_LIBTOOL_LINKER_OPTION
6651
6652
6653
# AC_LIBTOOL_SYS_MAX_CMD_LEN
6654
# --------------------------
6655
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6656
[# find the maximum length of command line arguments
6657
AC_MSG_CHECKING([the maximum length of command line arguments])
6658
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6659
  i=0
6660
  teststring="ABCD"
6661
6662
  case $build_os in
6663
  msdosdjgpp*)
6664
    # On DJGPP, this test can blow up pretty badly due to problems in libc
6665
    # (any single argument exceeding 2000 bytes causes a buffer overrun
6666
    # during glob expansion).  Even if it were fixed, the result of this
6667
    # check would be larger than it should be.
6668
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6669
    ;;
6670
6671
  gnu*)
6672
    # Under GNU Hurd, this test is not required because there is
6673
    # no limit to the length of command line arguments.
6674
    # Libtool will interpret -1 as no limit whatsoever
6675
    lt_cv_sys_max_cmd_len=-1;
6676
    ;;
6677
6678
  cygwin* | mingw*)
6679
    # On Win9x/ME, this test blows up -- it succeeds, but takes
6680
    # about 5 minutes as the teststring grows exponentially.
6681
    # Worse, since 9x/ME are not pre-emptively multitasking,
6682
    # you end up with a "frozen" computer, even though with patience
6683
    # the test eventually succeeds (with a max line length of 256k).
6684
    # Instead, let's just punt: use the minimum linelength reported by
6685
    # all of the supported platforms: 8192 (on NT/2K/XP).
6686
    lt_cv_sys_max_cmd_len=8192;
6687
    ;;
6688
6689
  amigaos*)
6690
    # On AmigaOS with pdksh, this test takes hours, literally.
6691
    # So we just punt and use a minimum line length of 8192.
6692
    lt_cv_sys_max_cmd_len=8192;
6693
    ;;
6694
6695
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6696
    # This has been around since 386BSD, at least.  Likely further.
6697
    if test -x /sbin/sysctl; then
6698
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6699
    elif test -x /usr/sbin/sysctl; then
6700
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6701
    else
6702
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
6703
    fi
6704
    # And add a safety zone
6705
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6706
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6707
    ;;
6708
6709
  interix*)
6710
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
6711
    lt_cv_sys_max_cmd_len=196608
6712
    ;;
6713
6714
  osf*)
6715
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6716
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6717
    # nice to cause kernel panics so lets avoid the loop below.
6718
    # First set a reasonable default.
6719
    lt_cv_sys_max_cmd_len=16384
6720
    #
6721
    if test -x /sbin/sysconfig; then
6722
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6723
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
6724
      esac
6725
    fi
6726
    ;;
6727
  sco3.2v5*)
6728
    lt_cv_sys_max_cmd_len=102400
6729
    ;;
6730
  sysv5* | sco5v6* | sysv4.2uw2*)
6731
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6732
    if test -n "$kargmax"; then
6733
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
6734
    else
6735
      lt_cv_sys_max_cmd_len=32768
6736
    fi
6737
    ;;
6738
  *)
6739
    # If test is not a shell built-in, we'll probably end up computing a
6740
    # maximum length that is only half of the actual maximum length, but
6741
    # we can't tell.
6742
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6743
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
6744
	       = "XX$teststring") >/dev/null 2>&1 &&
6745
	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
6746
	    lt_cv_sys_max_cmd_len=$new_result &&
6747
	    test $i != 17 # 1/2 MB should be enough
6748
    do
6749
      i=`expr $i + 1`
6750
      teststring=$teststring$teststring
6751
    done
6752
    teststring=
6753
    # Add a significant safety factor because C++ compilers can tack on massive
6754
    # amounts of additional arguments before passing them to the linker.
6755
    # It appears as though 1/2 is a usable value.
6756
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6757
    ;;
6758
  esac
6759
])
6760
if test -n $lt_cv_sys_max_cmd_len ; then
6761
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6762
else
6763
  AC_MSG_RESULT(none)
6764
fi
6765
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6766
6767
6768
# _LT_AC_CHECK_DLFCN
6769
# ------------------
6770
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6771
[AC_CHECK_HEADERS(dlfcn.h)dnl
6772
])# _LT_AC_CHECK_DLFCN
6773
6774
6775
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6776
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6777
# ---------------------------------------------------------------------
6778
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6779
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6780
if test "$cross_compiling" = yes; then :
6781
  [$4]
6782
else
6783
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6784
  lt_status=$lt_dlunknown
6785
  cat > conftest.$ac_ext <<EOF
6786
[#line __oline__ "configure"
6787
#include "confdefs.h"
6788
6789
#if HAVE_DLFCN_H
6790
#include <dlfcn.h>
6791
#endif
6792
6793
#include <stdio.h>
6794
6795
#ifdef RTLD_GLOBAL
6796
#  define LT_DLGLOBAL		RTLD_GLOBAL
6797
#else
6798
#  ifdef DL_GLOBAL
6799
#    define LT_DLGLOBAL		DL_GLOBAL
6800
#  else
6801
#    define LT_DLGLOBAL		0
6802
#  endif
6803
#endif
6804
6805
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6806
   find out it does not work in some platform. */
6807
#ifndef LT_DLLAZY_OR_NOW
6808
#  ifdef RTLD_LAZY
6809
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
6810
#  else
6811
#    ifdef DL_LAZY
6812
#      define LT_DLLAZY_OR_NOW		DL_LAZY
6813
#    else
6814
#      ifdef RTLD_NOW
6815
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
6816
#      else
6817
#        ifdef DL_NOW
6818
#          define LT_DLLAZY_OR_NOW	DL_NOW
6819
#        else
6820
#          define LT_DLLAZY_OR_NOW	0
6821
#        endif
6822
#      endif
6823
#    endif
6824
#  endif
6825
#endif
6826
6827
#ifdef __cplusplus
6828
extern "C" void exit (int);
6829
#endif
6830
6831
void fnord() { int i=42;}
6832
int main ()
6833
{
6834
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6835
  int status = $lt_dlunknown;
6836
6837
  if (self)
6838
    {
6839
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6840
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6841
      /* dlclose (self); */
6842
    }
6843
  else
6844
    puts (dlerror ());
6845
6846
    exit (status);
6847
}]
6848
EOF
6849
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6850
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
6851
    lt_status=$?
6852
    case x$lt_status in
6853
      x$lt_dlno_uscore) $1 ;;
6854
      x$lt_dlneed_uscore) $2 ;;
6855
      x$lt_dlunknown|x*) $3 ;;
6856
    esac
6857
  else :
6858
    # compilation failed
6859
    $3
6860
  fi
6861
fi
6862
rm -fr conftest*
6863
])# _LT_AC_TRY_DLOPEN_SELF
6864
6865
6866
# AC_LIBTOOL_DLOPEN_SELF
6867
# ----------------------
6868
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6869
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6870
if test "x$enable_dlopen" != xyes; then
6871
  enable_dlopen=unknown
6872
  enable_dlopen_self=unknown
6873
  enable_dlopen_self_static=unknown
6874
else
6875
  lt_cv_dlopen=no
6876
  lt_cv_dlopen_libs=
6877
6878
  case $host_os in
6879
  beos*)
6880
    lt_cv_dlopen="load_add_on"
6881
    lt_cv_dlopen_libs=
6882
    lt_cv_dlopen_self=yes
6883
    ;;
6884
6885
  mingw* | pw32*)
6886
    lt_cv_dlopen="LoadLibrary"
6887
    lt_cv_dlopen_libs=
6888
   ;;
6889
6890
  cygwin*)
6891
    lt_cv_dlopen="dlopen"
6892
    lt_cv_dlopen_libs=
6893
   ;;
6894
6895
  darwin*)
6896
  # if libdl is installed we need to link against it
6897
    AC_CHECK_LIB([dl], [dlopen],
6898
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6899
    lt_cv_dlopen="dyld"
6900
    lt_cv_dlopen_libs=
6901
    lt_cv_dlopen_self=yes
6902
    ])
6903
   ;;
6904
6905
  *)
6906
    AC_CHECK_FUNC([shl_load],
6907
	  [lt_cv_dlopen="shl_load"],
6908
      [AC_CHECK_LIB([dld], [shl_load],
6909
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6910
	[AC_CHECK_FUNC([dlopen],
6911
	      [lt_cv_dlopen="dlopen"],
6912
	  [AC_CHECK_LIB([dl], [dlopen],
6913
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6914
	    [AC_CHECK_LIB([svld], [dlopen],
6915
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6916
	      [AC_CHECK_LIB([dld], [dld_link],
6917
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6918
	      ])
6919
	    ])
6920
	  ])
6921
	])
6922
      ])
6923
    ;;
6924
  esac
6925
6926
  if test "x$lt_cv_dlopen" != xno; then
6927
    enable_dlopen=yes
6928
  else
6929
    enable_dlopen=no
6930
  fi
6931
6932
  case $lt_cv_dlopen in
6933
  dlopen)
6934
    save_CPPFLAGS="$CPPFLAGS"
6935
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6936
6937
    save_LDFLAGS="$LDFLAGS"
6938
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6939
6940
    save_LIBS="$LIBS"
6941
    LIBS="$lt_cv_dlopen_libs $LIBS"
6942
6943
    AC_CACHE_CHECK([whether a program can dlopen itself],
6944
	  lt_cv_dlopen_self, [dnl
6945
	  _LT_AC_TRY_DLOPEN_SELF(
6946
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6947
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6948
    ])
6949
6950
    if test "x$lt_cv_dlopen_self" = xyes; then
6951
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
6952
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6953
    	  lt_cv_dlopen_self_static, [dnl
6954
	  _LT_AC_TRY_DLOPEN_SELF(
6955
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6956
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
6957
      ])
6958
    fi
6959
6960
    CPPFLAGS="$save_CPPFLAGS"
6961
    LDFLAGS="$save_LDFLAGS"
6962
    LIBS="$save_LIBS"
6963
    ;;
6964
  esac
6965
6966
  case $lt_cv_dlopen_self in
6967
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6968
  *) enable_dlopen_self=unknown ;;
6969
  esac
6970
6971
  case $lt_cv_dlopen_self_static in
6972
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6973
  *) enable_dlopen_self_static=unknown ;;
6974
  esac
6975
fi
6976
])# AC_LIBTOOL_DLOPEN_SELF
6977
6978
6979
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6980
# ---------------------------------
6981
# Check to see if options -c and -o are simultaneously supported by compiler
6982
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6983
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6984
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6985
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6986
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6987
   $rm -r conftest 2>/dev/null
6988
   mkdir conftest
6989
   cd conftest
6990
   mkdir out
6991
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6992
6993
   lt_compiler_flag="-o out/conftest2.$ac_objext"
6994
   # Insert the option either (1) after the last *FLAGS variable, or
6995
   # (2) before a word containing "conftest.", or (3) at the end.
6996
   # Note that $ac_compile itself does not contain backslashes and begins
6997
   # with a dollar sign (not a hyphen), so the echo should work correctly.
6998
   lt_compile=`echo "$ac_compile" | $SED \
6999
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7000
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
7001
   -e 's:$: $lt_compiler_flag:'`
7002
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
7003
   (eval "$lt_compile" 2>out/conftest.err)
7004
   ac_status=$?
7005
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
7006
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
7007
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
7008
   then
7009
     # The compiler can only warn and ignore the option if not recognized
7010
     # So say no if there are warnings
7011
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
7012
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
7013
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7014
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7015
     fi
7016
   fi
7017
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
7018
   $rm conftest*
7019
   # SGI C++ compiler will create directory out/ii_files/ for
7020
   # template instantiation
7021
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7022
   $rm out/* && rmdir out
7023
   cd ..
7024
   rmdir conftest
7025
   $rm conftest*
7026
])
7027
])# AC_LIBTOOL_PROG_CC_C_O
7028
7029
7030
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
7031
# -----------------------------------------
7032
# Check to see if we can do hard links to lock some files if needed
7033
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
7034
[AC_REQUIRE([_LT_AC_LOCK])dnl
7035
7036
hard_links="nottested"
7037
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
7038
  # do not overwrite the value of need_locks provided by the user
7039
  AC_MSG_CHECKING([if we can lock with hard links])
7040
  hard_links=yes
7041
  $rm conftest*
7042
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
7043
  touch conftest.a
7044
  ln conftest.a conftest.b 2>&5 || hard_links=no
7045
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
7046
  AC_MSG_RESULT([$hard_links])
7047
  if test "$hard_links" = no; then
7048
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
7049
    need_locks=warn
7050
  fi
7051
else
7052
  need_locks=no
7053
fi
7054
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
7055
7056
7057
# AC_LIBTOOL_OBJDIR
7058
# -----------------
7059
AC_DEFUN([AC_LIBTOOL_OBJDIR],
7060
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
7061
[rm -f .libs 2>/dev/null
7062
mkdir .libs 2>/dev/null
7063
if test -d .libs; then
7064
  lt_cv_objdir=.libs
7065
else
7066
  # MS-DOS does not allow filenames that begin with a dot.
7067
  lt_cv_objdir=_libs
7068
fi
7069
rmdir .libs 2>/dev/null])
7070
objdir=$lt_cv_objdir
7071
])# AC_LIBTOOL_OBJDIR
7072
7073
7074
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
7075
# ----------------------------------------------
7076
# Check hardcoding attributes.
7077
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
7078
[AC_MSG_CHECKING([how to hardcode library paths into programs])
7079
_LT_AC_TAGVAR(hardcode_action, $1)=
7080
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
7081
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
7082
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
7083
7084
  # We can hardcode non-existant directories.
7085
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
7086
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
7087
     # have to relink, otherwise we might link with an installed library
7088
     # when we should be linking with a yet-to-be-installed one
7089
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
7090
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
7091
    # Linking always hardcodes the temporary library directory.
7092
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
7093
  else
7094
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
7095
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
7096
  fi
7097
else
7098
  # We cannot hardcode anything, or else we can only hardcode existing
7099
  # directories.
7100
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
7101
fi
7102
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
7103
7104
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
7105
  # Fast installation is not supported
7106
  enable_fast_install=no
7107
elif test "$shlibpath_overrides_runpath" = yes ||
7108
     test "$enable_shared" = no; then
7109
  # Fast installation is not necessary
7110
  enable_fast_install=needless
7111
fi
7112
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
7113
7114
7115
# AC_LIBTOOL_SYS_LIB_STRIP
7116
# ------------------------
7117
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
7118
[striplib=
7119
old_striplib=
7120
AC_MSG_CHECKING([whether stripping libraries is possible])
7121
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
7122
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
7123
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
7124
  AC_MSG_RESULT([yes])
7125
else
7126
# FIXME - insert some real tests, host_os isn't really good enough
7127
  case $host_os in
7128
   darwin*)
7129
       if test -n "$STRIP" ; then
7130
         striplib="$STRIP -x"
7131
         AC_MSG_RESULT([yes])
7132
       else
7133
  AC_MSG_RESULT([no])
7134
fi
7135
       ;;
7136
   *)
7137
  AC_MSG_RESULT([no])
7138
    ;;
7139
  esac
7140
fi
7141
])# AC_LIBTOOL_SYS_LIB_STRIP
7142
7143
7144
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7145
# -----------------------------
7146
# PORTME Fill in your ld.so characteristics
7147
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
7148
[AC_MSG_CHECKING([dynamic linker characteristics])
7149
library_names_spec=
7150
libname_spec='lib$name'
7151
soname_spec=
7152
shrext_cmds=".so"
7153
postinstall_cmds=
7154
postuninstall_cmds=
7155
finish_cmds=
7156
finish_eval=
7157
shlibpath_var=
7158
shlibpath_overrides_runpath=unknown
7159
version_type=none
7160
dynamic_linker="$host_os ld.so"
7161
sys_lib_dlsearch_path_spec="/lib /usr/lib"
7162
if test "$GCC" = yes; then
7163
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
7164
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
7165
    # if the path contains ";" then we assume it to be the separator
7166
    # otherwise default to the standard path separator (i.e. ":") - it is
7167
    # assumed that no part of a normal pathname contains ";" but that should
7168
    # okay in the real world where ";" in dirpaths is itself problematic.
7169
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
7170
  else
7171
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
7172
  fi
7173
else
7174
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
7175
fi
7176
need_lib_prefix=unknown
7177
hardcode_into_libs=no
7178
7179
# when you set need_version to no, make sure it does not cause -set_version
7180
# flags to be left without arguments
7181
need_version=unknown
7182
7183
case $host_os in
7184
aix3*)
7185
  version_type=linux
7186
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
7187
  shlibpath_var=LIBPATH
7188
7189
  # AIX 3 has no versioning support, so we append a major version to the name.
7190
  soname_spec='${libname}${release}${shared_ext}$major'
7191
  ;;
7192
7193
aix4* | aix5*)
7194
  version_type=linux
7195
  need_lib_prefix=no
7196
  need_version=no
7197
  hardcode_into_libs=yes
7198
  if test "$host_cpu" = ia64; then
7199
    # AIX 5 supports IA64
7200
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
7201
    shlibpath_var=LD_LIBRARY_PATH
7202
  else
7203
    # With GCC up to 2.95.x, collect2 would create an import file
7204
    # for dependence libraries.  The import file would start with
7205
    # the line `#! .'.  This would cause the generated library to
7206
    # depend on `.', always an invalid library.  This was fixed in
7207
    # development snapshots of GCC prior to 3.0.
7208
    case $host_os in
7209
      aix4 | aix4.[[01]] | aix4.[[01]].*)
7210
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
7211
	   echo ' yes '
7212
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
7213
	:
7214
      else
7215
	can_build_shared=no
7216
      fi
7217
      ;;
7218
    esac
7219
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
7220
    # soname into executable. Probably we can add versioning support to
7221
    # collect2, so additional links can be useful in future.
7222
    if test "$aix_use_runtimelinking" = yes; then
7223
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
7224
      # instead of lib<name>.a to let people know that these are not
7225
      # typical AIX shared libraries.
7226
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7227
    else
7228
      # We preserve .a as extension for shared libraries through AIX4.2
7229
      # and later when we are not doing run time linking.
7230
      library_names_spec='${libname}${release}.a $libname.a'
7231
      soname_spec='${libname}${release}${shared_ext}$major'
7232
    fi
7233
    shlibpath_var=LIBPATH
7234
  fi
7235
  ;;
7236
7237
amigaos*)
7238
  library_names_spec='$libname.ixlibrary $libname.a'
7239
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
7240
  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'
7241
  ;;
7242
7243
beos*)
7244
  library_names_spec='${libname}${shared_ext}'
7245
  dynamic_linker="$host_os ld.so"
7246
  shlibpath_var=LIBRARY_PATH
7247
  ;;
7248
7249
bsdi[[45]]*)
7250
  version_type=linux
7251
  need_version=no
7252
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7253
  soname_spec='${libname}${release}${shared_ext}$major'
7254
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
7255
  shlibpath_var=LD_LIBRARY_PATH
7256
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
7257
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
7258
  # the default ld.so.conf also contains /usr/contrib/lib and
7259
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
7260
  # libtool to hard-code these into programs
7261
  ;;
7262
7263
cygwin* | mingw* | pw32*)
7264
  version_type=windows
7265
  shrext_cmds=".dll"
7266
  need_version=no
7267
  need_lib_prefix=no
7268
7269
  case $GCC,$host_os in
7270
  yes,cygwin* | yes,mingw* | yes,pw32*)
7271
    library_names_spec='$libname.dll.a'
7272
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
7273
    postinstall_cmds='base_file=`basename \${file}`~
7274
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
7275
      dldir=$destdir/`dirname \$dlpath`~
7276
      test -d \$dldir || mkdir -p \$dldir~
7277
      $install_prog $dir/$dlname \$dldir/$dlname~
7278
      chmod a+x \$dldir/$dlname'
7279
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
7280
      dlpath=$dir/\$dldll~
7281
       $rm \$dlpath'
7282
    shlibpath_overrides_runpath=yes
7283
7284
    case $host_os in
7285
    cygwin*)
7286
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
7287
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7288
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
7289
      ;;
7290
    mingw*)
7291
      # MinGW DLLs use traditional 'lib' prefix
7292
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7293
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
7294
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
7295
        # It is most probably a Windows format PATH printed by
7296
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
7297
        # path with ; separators, and with drive letters. We can handle the
7298
        # drive letters (cygwin fileutils understands them), so leave them,
7299
        # especially as we might pass files found there to a mingw objdump,
7300
        # which wouldn't understand a cygwinified path. Ahh.
7301
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
7302
      else
7303
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
7304
      fi
7305
      ;;
7306
    pw32*)
7307
      # pw32 DLLs use 'pw' prefix rather than 'lib'
7308
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7309
      ;;
7310
    esac
7311
    ;;
7312
7313
  *)
7314
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
7315
    ;;
7316
  esac
7317
  dynamic_linker='Win32 ld.exe'
7318
  # FIXME: first we should search . and the directory the executable is in
7319
  shlibpath_var=PATH
7320
  ;;
7321
7322
darwin* | rhapsody*)
7323
  dynamic_linker="$host_os dyld"
7324
  version_type=darwin
7325
  need_lib_prefix=no
7326
  need_version=no
7327
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
7328
  soname_spec='${libname}${release}${major}$shared_ext'
7329
  shlibpath_overrides_runpath=yes
7330
  shlibpath_var=DYLD_LIBRARY_PATH
7331
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
7332
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
7333
  if test "$GCC" = yes; then
7334
    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"`
7335
  else
7336
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
7337
  fi
7338
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
7339
  ;;
7340
7341
dgux*)
7342
  version_type=linux
7343
  need_lib_prefix=no
7344
  need_version=no
7345
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
7346
  soname_spec='${libname}${release}${shared_ext}$major'
7347
  shlibpath_var=LD_LIBRARY_PATH
7348
  ;;
7349
7350
freebsd1*)
7351
  dynamic_linker=no
7352
  ;;
7353
7354
freebsd* | dragonfly*)
7355
  # DragonFly does not have aout.  When/if they implement a new
7356
  # versioning mechanism, adjust this.
7357
  if test -x /usr/bin/objformat; then
7358
    objformat=`/usr/bin/objformat`
7359
  else
7360
    case $host_os in
7361
    freebsd[[123]]*) objformat=aout ;;
7362
    *) objformat=elf ;;
7363
    esac
7364
  fi
7365
  version_type=freebsd-$objformat
7366
  case $version_type in
7367
    freebsd-elf*)
7368
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7369
      need_version=no
7370
      need_lib_prefix=no
7371
      ;;
7372
    freebsd-*)
7373
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
7374
      need_version=yes
7375
      ;;
7376
  esac
7377
  shlibpath_var=LD_LIBRARY_PATH
7378
  case $host_os in
7379
  freebsd2*)
7380
    shlibpath_overrides_runpath=yes
7381
    ;;
7382
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
7383
    shlibpath_overrides_runpath=yes
7384
    hardcode_into_libs=yes
7385
    ;;
7386
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
7387
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
7388
    shlibpath_overrides_runpath=no
7389
    hardcode_into_libs=yes
7390
    ;;
7391
  freebsd*) # from 4.6 on
7392
    shlibpath_overrides_runpath=yes
7393
    hardcode_into_libs=yes
7394
    ;;
7395
  esac
7396
  ;;
7397
7398
gnu*)
7399
  version_type=linux
7400
  need_lib_prefix=no
7401
  need_version=no
7402
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
7403
  soname_spec='${libname}${release}${shared_ext}$major'
7404
  shlibpath_var=LD_LIBRARY_PATH
7405
  hardcode_into_libs=yes
7406
  ;;
7407
7408
hpux9* | hpux10* | hpux11*)
7409
  # Give a soname corresponding to the major version so that dld.sl refuses to
7410
  # link against other versions.
7411
  version_type=sunos
7412
  need_lib_prefix=no
7413
  need_version=no
7414
  case $host_cpu in
7415
  ia64*)
7416
    shrext_cmds='.so'
7417
    hardcode_into_libs=yes
7418
    dynamic_linker="$host_os dld.so"
7419
    shlibpath_var=LD_LIBRARY_PATH
7420
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7421
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7422
    soname_spec='${libname}${release}${shared_ext}$major'
7423
    if test "X$HPUX_IA64_MODE" = X32; then
7424
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
7425
    else
7426
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
7427
    fi
7428
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7429
    ;;
7430
   hppa*64*)
7431
     shrext_cmds='.sl'
7432
     hardcode_into_libs=yes
7433
     dynamic_linker="$host_os dld.sl"
7434
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
7435
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7436
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7437
     soname_spec='${libname}${release}${shared_ext}$major'
7438
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
7439
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7440
     ;;
7441
   *)
7442
    shrext_cmds='.sl'
7443
    dynamic_linker="$host_os dld.sl"
7444
    shlibpath_var=SHLIB_PATH
7445
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7446
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7447
    soname_spec='${libname}${release}${shared_ext}$major'
7448
    ;;
7449
  esac
7450
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
7451
  postinstall_cmds='chmod 555 $lib'
7452
  ;;
7453
7454
interix3*)
7455
  version_type=linux
7456
  need_lib_prefix=no
7457
  need_version=no
7458
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7459
  soname_spec='${libname}${release}${shared_ext}$major'
7460
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
7461
  shlibpath_var=LD_LIBRARY_PATH
7462
  shlibpath_overrides_runpath=no
7463
  hardcode_into_libs=yes
7464
  ;;
7465
7466
irix5* | irix6* | nonstopux*)
7467
  case $host_os in
7468
    nonstopux*) version_type=nonstopux ;;
7469
    *)
7470
	if test "$lt_cv_prog_gnu_ld" = yes; then
7471
		version_type=linux
7472
	else
7473
		version_type=irix
7474
	fi ;;
7475
  esac
7476
  need_lib_prefix=no
7477
  need_version=no
7478
  soname_spec='${libname}${release}${shared_ext}$major'
7479
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7480
  case $host_os in
7481
  irix5* | nonstopux*)
7482
    libsuff= shlibsuff=
7483
    ;;
7484
  *)
7485
    case $LD in # libtool.m4 will add one of these switches to LD
7486
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7487
      libsuff= shlibsuff= libmagic=32-bit;;
7488
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7489
      libsuff=32 shlibsuff=N32 libmagic=N32;;
7490
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7491
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
7492
    *) libsuff= shlibsuff= libmagic=never-match;;
7493
    esac
7494
    ;;
7495
  esac
7496
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7497
  shlibpath_overrides_runpath=no
7498
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7499
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7500
  hardcode_into_libs=yes
7501
  ;;
7502
7503
# No shared lib support for Linux oldld, aout, or coff.
7504
linux*oldld* | linux*aout* | linux*coff*)
7505
  dynamic_linker=no
7506
  ;;
7507
7508
# This must be Linux ELF.
7509
linux* | k*bsd*-gnu)
7510
  version_type=linux
7511
  need_lib_prefix=no
7512
  need_version=no
7513
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7514
  soname_spec='${libname}${release}${shared_ext}$major'
7515
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7516
  shlibpath_var=LD_LIBRARY_PATH
7517
  shlibpath_overrides_runpath=no
7518
  # This implies no fast_install, which is unacceptable.
7519
  # Some rework will be needed to allow for fast_install
7520
  # before this can be enabled.
7521
  hardcode_into_libs=yes
7522
7523
  # Append ld.so.conf contents to the search path
7524
  if test -f /etc/ld.so.conf; then
7525
    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' ' '`
7526
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
7527
  fi
7528
7529
  # We used to test for /lib/ld.so.1 and disable shared libraries on
7530
  # powerpc, because MkLinux only supported shared libraries with the
7531
  # GNU dynamic linker.  Since this was broken with cross compilers,
7532
  # most powerpc-linux boxes support dynamic linking these days and
7533
  # people can always --disable-shared, the test was removed, and we
7534
  # assume the GNU/Linux dynamic linker is in use.
7535
  dynamic_linker='GNU/Linux ld.so'
7536
  ;;
7537
7538
netbsdelf*-gnu)
7539
  version_type=linux
7540
  need_lib_prefix=no
7541
  need_version=no
7542
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7543
  soname_spec='${libname}${release}${shared_ext}$major'
7544
  shlibpath_var=LD_LIBRARY_PATH
7545
  shlibpath_overrides_runpath=no
7546
  hardcode_into_libs=yes
7547
  dynamic_linker='NetBSD ld.elf_so'
7548
  ;;
7549
7550
netbsd*)
7551
  version_type=sunos
7552
  need_lib_prefix=no
7553
  need_version=no
7554
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7555
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7556
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7557
    dynamic_linker='NetBSD (a.out) ld.so'
7558
  else
7559
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7560
    soname_spec='${libname}${release}${shared_ext}$major'
7561
    dynamic_linker='NetBSD ld.elf_so'
7562
  fi
7563
  shlibpath_var=LD_LIBRARY_PATH
7564
  shlibpath_overrides_runpath=yes
7565
  hardcode_into_libs=yes
7566
  ;;
7567
7568
newsos6)
7569
  version_type=linux
7570
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7571
  shlibpath_var=LD_LIBRARY_PATH
7572
  shlibpath_overrides_runpath=yes
7573
  ;;
7574
7575
nto-qnx*)
7576
  version_type=linux
7577
  need_lib_prefix=no
7578
  need_version=no
7579
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7580
  soname_spec='${libname}${release}${shared_ext}$major'
7581
  shlibpath_var=LD_LIBRARY_PATH
7582
  shlibpath_overrides_runpath=yes
7583
  ;;
7584
7585
openbsd*)
7586
  version_type=sunos
7587
  sys_lib_dlsearch_path_spec="/usr/lib"
7588
  need_lib_prefix=no
7589
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
7590
  case $host_os in
7591
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
7592
    *)                         need_version=no  ;;
7593
  esac
7594
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7595
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7596
  shlibpath_var=LD_LIBRARY_PATH
7597
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7598
    case $host_os in
7599
      openbsd2.[[89]] | openbsd2.[[89]].*)
7600
	shlibpath_overrides_runpath=no
7601
	;;
7602
      *)
7603
	shlibpath_overrides_runpath=yes
7604
	;;
7605
      esac
7606
  else
7607
    shlibpath_overrides_runpath=yes
7608
  fi
7609
  ;;
7610
7611
os2*)
7612
  libname_spec='$name'
7613
  shrext_cmds=".dll"
7614
  need_lib_prefix=no
7615
  library_names_spec='$libname${shared_ext} $libname.a'
7616
  dynamic_linker='OS/2 ld.exe'
7617
  shlibpath_var=LIBPATH
7618
  ;;
7619
7620
osf3* | osf4* | osf5*)
7621
  version_type=osf
7622
  need_lib_prefix=no
7623
  need_version=no
7624
  soname_spec='${libname}${release}${shared_ext}$major'
7625
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7626
  shlibpath_var=LD_LIBRARY_PATH
7627
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7628
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7629
  ;;
7630
7631
solaris*)
7632
  version_type=linux
7633
  need_lib_prefix=no
7634
  need_version=no
7635
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7636
  soname_spec='${libname}${release}${shared_ext}$major'
7637
  shlibpath_var=LD_LIBRARY_PATH
7638
  shlibpath_overrides_runpath=yes
7639
  hardcode_into_libs=yes
7640
  # ldd complains unless libraries are executable
7641
  postinstall_cmds='chmod +x $lib'
7642
  ;;
7643
7644
sunos4*)
7645
  version_type=sunos
7646
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7647
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7648
  shlibpath_var=LD_LIBRARY_PATH
7649
  shlibpath_overrides_runpath=yes
7650
  if test "$with_gnu_ld" = yes; then
7651
    need_lib_prefix=no
7652
  fi
7653
  need_version=yes
7654
  ;;
7655
7656
sysv4 | sysv4.3*)
7657
  version_type=linux
7658
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7659
  soname_spec='${libname}${release}${shared_ext}$major'
7660
  shlibpath_var=LD_LIBRARY_PATH
7661
  case $host_vendor in
7662
    sni)
7663
      shlibpath_overrides_runpath=no
7664
      need_lib_prefix=no
7665
      export_dynamic_flag_spec='${wl}-Blargedynsym'
7666
      runpath_var=LD_RUN_PATH
7667
      ;;
7668
    siemens)
7669
      need_lib_prefix=no
7670
      ;;
7671
    motorola)
7672
      need_lib_prefix=no
7673
      need_version=no
7674
      shlibpath_overrides_runpath=no
7675
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7676
      ;;
7677
  esac
7678
  ;;
7679
7680
sysv4*MP*)
7681
  if test -d /usr/nec ;then
7682
    version_type=linux
7683
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7684
    soname_spec='$libname${shared_ext}.$major'
7685
    shlibpath_var=LD_LIBRARY_PATH
7686
  fi
7687
  ;;
7688
7689
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7690
  version_type=freebsd-elf
7691
  need_lib_prefix=no
7692
  need_version=no
7693
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7694
  soname_spec='${libname}${release}${shared_ext}$major'
7695
  shlibpath_var=LD_LIBRARY_PATH
7696
  hardcode_into_libs=yes
7697
  if test "$with_gnu_ld" = yes; then
7698
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
7699
    shlibpath_overrides_runpath=no
7700
  else
7701
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
7702
    shlibpath_overrides_runpath=yes
7703
    case $host_os in
7704
      sco3.2v5*)
7705
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
7706
	;;
7707
    esac
7708
  fi
7709
  sys_lib_dlsearch_path_spec='/usr/lib'
7710
  ;;
7711
7712
uts4*)
7713
  version_type=linux
7714
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7715
  soname_spec='${libname}${release}${shared_ext}$major'
7716
  shlibpath_var=LD_LIBRARY_PATH
7717
  ;;
7718
7719
*)
7720
  dynamic_linker=no
7721
  ;;
7722
esac
7723
AC_MSG_RESULT([$dynamic_linker])
7724
test "$dynamic_linker" = no && can_build_shared=no
7725
7726
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7727
if test "$GCC" = yes; then
7728
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7729
fi
7730
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7731
7732
7733
# _LT_AC_TAGCONFIG
7734
# ----------------
7735
AC_DEFUN([_LT_AC_TAGCONFIG],
7736
[AC_ARG_WITH([tags],
7737
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7738
        [include additional configurations @<:@automatic@:>@])],
7739
    [tagnames="$withval"])
7740
7741
if test -f "$ltmain" && test -n "$tagnames"; then
7742
  if test ! -f "${ofile}"; then
7743
    AC_MSG_WARN([output file `$ofile' does not exist])
7744
  fi
7745
7746
  if test -z "$LTCC"; then
7747
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7748
    if test -z "$LTCC"; then
7749
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7750
    else
7751
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7752
    fi
7753
  fi
7754
  if test -z "$LTCFLAGS"; then
7755
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
7756
  fi
7757
7758
  # Extract list of available tagged configurations in $ofile.
7759
  # Note that this assumes the entire list is on one line.
7760
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7761
7762
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7763
  for tagname in $tagnames; do
7764
    IFS="$lt_save_ifs"
7765
    # Check whether tagname contains only valid characters
7766
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7767
    "") ;;
7768
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
7769
	;;
7770
    esac
7771
7772
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7773
    then
7774
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
7775
    fi
7776
7777
    # Update the list of available tags.
7778
    if test -n "$tagname"; then
7779
      echo appending configuration tag \"$tagname\" to $ofile
7780
7781
      case $tagname in
7782
      CXX)
7783
	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7784
	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7785
	    (test "X$CXX" != "Xg++"))) ; then
7786
	  AC_LIBTOOL_LANG_CXX_CONFIG
7787
	else
7788
	  tagname=""
7789
	fi
7790
	;;
7791
7792
      F77)
7793
	if test -n "$F77" && test "X$F77" != "Xno"; then
7794
	  AC_LIBTOOL_LANG_F77_CONFIG
7795
	else
7796
	  tagname=""
7797
	fi
7798
	;;
7799
7800
      GCJ)
7801
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7802
	  AC_LIBTOOL_LANG_GCJ_CONFIG
7803
	else
7804
	  tagname=""
7805
	fi
7806
	;;
7807
7808
      RC)
7809
	AC_LIBTOOL_LANG_RC_CONFIG
7810
	;;
7811
7812
      *)
7813
	AC_MSG_ERROR([Unsupported tag name: $tagname])
7814
	;;
7815
      esac
7816
7817
      # Append the new tag name to the list of available tags.
7818
      if test -n "$tagname" ; then
7819
      available_tags="$available_tags $tagname"
7820
    fi
7821
    fi
7822
  done
7823
  IFS="$lt_save_ifs"
7824
7825
  # Now substitute the updated list of available tags.
7826
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7827
    mv "${ofile}T" "$ofile"
7828
    chmod +x "$ofile"
7829
  else
7830
    rm -f "${ofile}T"
7831
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
7832
  fi
7833
fi
7834
])# _LT_AC_TAGCONFIG
7835
7836
7837
# AC_LIBTOOL_DLOPEN
7838
# -----------------
7839
# enable checks for dlopen support
7840
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7841
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7842
])# AC_LIBTOOL_DLOPEN
7843
7844
7845
# AC_LIBTOOL_WIN32_DLL
7846
# --------------------
7847
# declare package support for building win32 DLLs
7848
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7849
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7850
])# AC_LIBTOOL_WIN32_DLL
7851
7852
7853
# AC_ENABLE_SHARED([DEFAULT])
7854
# ---------------------------
7855
# implement the --enable-shared flag
7856
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7857
AC_DEFUN([AC_ENABLE_SHARED],
7858
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7859
AC_ARG_ENABLE([shared],
7860
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7861
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7862
    [p=${PACKAGE-default}
7863
    case $enableval in
7864
    yes) enable_shared=yes ;;
7865
    no) enable_shared=no ;;
7866
    *)
7867
      enable_shared=no
7868
      # Look at the argument we got.  We use all the common list separators.
7869
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7870
      for pkg in $enableval; do
7871
	IFS="$lt_save_ifs"
7872
	if test "X$pkg" = "X$p"; then
7873
	  enable_shared=yes
7874
	fi
7875
      done
7876
      IFS="$lt_save_ifs"
7877
      ;;
7878
    esac],
7879
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7880
])# AC_ENABLE_SHARED
7881
7882
7883
# AC_DISABLE_SHARED
7884
# -----------------
7885
# set the default shared flag to --disable-shared
7886
AC_DEFUN([AC_DISABLE_SHARED],
7887
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7888
AC_ENABLE_SHARED(no)
7889
])# AC_DISABLE_SHARED
7890
7891
7892
# AC_ENABLE_STATIC([DEFAULT])
7893
# ---------------------------
7894
# implement the --enable-static flag
7895
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7896
AC_DEFUN([AC_ENABLE_STATIC],
7897
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7898
AC_ARG_ENABLE([static],
7899
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7900
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7901
    [p=${PACKAGE-default}
7902
    case $enableval in
7903
    yes) enable_static=yes ;;
7904
    no) enable_static=no ;;
7905
    *)
7906
     enable_static=no
7907
      # Look at the argument we got.  We use all the common list separators.
7908
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7909
      for pkg in $enableval; do
7910
	IFS="$lt_save_ifs"
7911
	if test "X$pkg" = "X$p"; then
7912
	  enable_static=yes
7913
	fi
7914
      done
7915
      IFS="$lt_save_ifs"
7916
      ;;
7917
    esac],
7918
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7919
])# AC_ENABLE_STATIC
7920
7921
7922
# AC_DISABLE_STATIC
7923
# -----------------
7924
# set the default static flag to --disable-static
7925
AC_DEFUN([AC_DISABLE_STATIC],
7926
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7927
AC_ENABLE_STATIC(no)
7928
])# AC_DISABLE_STATIC
7929
7930
7931
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7932
# ---------------------------------
7933
# implement the --enable-fast-install flag
7934
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7935
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7936
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7937
AC_ARG_ENABLE([fast-install],
7938
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7939
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7940
    [p=${PACKAGE-default}
7941
    case $enableval in
7942
    yes) enable_fast_install=yes ;;
7943
    no) enable_fast_install=no ;;
7944
    *)
7945
      enable_fast_install=no
7946
      # Look at the argument we got.  We use all the common list separators.
7947
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7948
      for pkg in $enableval; do
7949
	IFS="$lt_save_ifs"
7950
	if test "X$pkg" = "X$p"; then
7951
	  enable_fast_install=yes
7952
	fi
7953
      done
7954
      IFS="$lt_save_ifs"
7955
      ;;
7956
    esac],
7957
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7958
])# AC_ENABLE_FAST_INSTALL
7959
7960
7961
# AC_DISABLE_FAST_INSTALL
7962
# -----------------------
7963
# set the default to --disable-fast-install
7964
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7965
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7966
AC_ENABLE_FAST_INSTALL(no)
7967
])# AC_DISABLE_FAST_INSTALL
7968
7969
7970
# AC_LIBTOOL_PICMODE([MODE])
7971
# --------------------------
7972
# implement the --with-pic flag
7973
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7974
AC_DEFUN([AC_LIBTOOL_PICMODE],
7975
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7976
pic_mode=ifelse($#,1,$1,default)
7977
])# AC_LIBTOOL_PICMODE
7978
7979
7980
# AC_PROG_EGREP
7981
# -------------
7982
# This is predefined starting with Autoconf 2.54, so this conditional
7983
# definition can be removed once we require Autoconf 2.54 or later.
7984
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7985
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7986
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7987
    then ac_cv_prog_egrep='grep -E'
7988
    else ac_cv_prog_egrep='egrep'
7989
    fi])
7990
 EGREP=$ac_cv_prog_egrep
7991
 AC_SUBST([EGREP])
7992
])])
7993
7994
7995
# AC_PATH_TOOL_PREFIX
7996
# -------------------
7997
# find a file program which can recognise shared library
7998
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7999
[AC_REQUIRE([AC_PROG_EGREP])dnl
8000
AC_MSG_CHECKING([for $1])
8001
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
8002
[case $MAGIC_CMD in
8003
[[\\/*] |  ?:[\\/]*])
8004
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8005
  ;;
8006
*)
8007
  lt_save_MAGIC_CMD="$MAGIC_CMD"
8008
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8009
dnl $ac_dummy forces splitting on constant user-supplied paths.
8010
dnl POSIX.2 word splitting is done only on the output of word expansions,
8011
dnl not every word.  This closes a longstanding sh security hole.
8012
  ac_dummy="ifelse([$2], , $PATH, [$2])"
8013
  for ac_dir in $ac_dummy; do
8014
    IFS="$lt_save_ifs"
8015
    test -z "$ac_dir" && ac_dir=.
8016
    if test -f $ac_dir/$1; then
8017
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
8018
      if test -n "$file_magic_test_file"; then
8019
	case $deplibs_check_method in
8020
	"file_magic "*)
8021
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8022
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8023
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8024
	    $EGREP "$file_magic_regex" > /dev/null; then
8025
	    :
8026
	  else
8027
	    cat <<EOF 1>&2
8028
8029
*** Warning: the command libtool uses to detect shared libraries,
8030
*** $file_magic_cmd, produces output that libtool cannot recognize.
8031
*** The result is that libtool may fail to recognize shared libraries
8032
*** as such.  This will affect the creation of libtool libraries that
8033
*** depend on shared libraries, but programs linked with such libtool
8034
*** libraries will work regardless of this problem.  Nevertheless, you
8035
*** may want to report the problem to your system manager and/or to
8036
*** bug-libtool@gnu.org
8037
8038
EOF
8039
	  fi ;;
8040
	esac
8041
      fi
8042
      break
8043
    fi
8044
  done
8045
  IFS="$lt_save_ifs"
8046
  MAGIC_CMD="$lt_save_MAGIC_CMD"
8047
  ;;
8048
esac])
8049
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8050
if test -n "$MAGIC_CMD"; then
8051
  AC_MSG_RESULT($MAGIC_CMD)
8052
else
8053
  AC_MSG_RESULT(no)
8054
fi
8055
])# AC_PATH_TOOL_PREFIX
8056
8057
8058
# AC_PATH_MAGIC
8059
# -------------
8060
# find a file program which can recognise a shared library
8061
AC_DEFUN([AC_PATH_MAGIC],
8062
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
8063
if test -z "$lt_cv_path_MAGIC_CMD"; then
8064
  if test -n "$ac_tool_prefix"; then
8065
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
8066
  else
8067
    MAGIC_CMD=:
8068
  fi
8069
fi
8070
])# AC_PATH_MAGIC
8071
8072
8073
# AC_PROG_LD
8074
# ----------
8075
# find the pathname to the GNU or non-GNU linker
8076
AC_DEFUN([AC_PROG_LD],
8077
[AC_ARG_WITH([gnu-ld],
8078
    [AC_HELP_STRING([--with-gnu-ld],
8079
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
8080
    [test "$withval" = no || with_gnu_ld=yes],
8081
    [with_gnu_ld=no])
8082
AC_REQUIRE([LT_AC_PROG_SED])dnl
8083
AC_REQUIRE([AC_PROG_CC])dnl
8084
AC_REQUIRE([AC_CANONICAL_HOST])dnl
8085
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8086
ac_prog=ld
8087
if test "$GCC" = yes; then
8088
  # Check if gcc -print-prog-name=ld gives a path.
8089
  AC_MSG_CHECKING([for ld used by $CC])
8090
  case $host in
8091
  *-*-mingw*)
8092
    # gcc leaves a trailing carriage return which upsets mingw
8093
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8094
  *)
8095
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8096
  esac
8097
  case $ac_prog in
8098
    # Accept absolute paths.
8099
    [[\\/]]* | ?:[[\\/]]*)
8100
      re_direlt='/[[^/]][[^/]]*/\.\./'
8101
      # Canonicalize the pathname of ld
8102
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
8103
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8104
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
8105
      done
8106
      test -z "$LD" && LD="$ac_prog"
8107
      ;;
8108
  "")
8109
    # If it fails, then pretend we aren't using GCC.
8110
    ac_prog=ld
8111
    ;;
8112
  *)
8113
    # If it is relative, then search for the first ld in PATH.
8114
    with_gnu_ld=unknown
8115
    ;;
8116
  esac
8117
elif test "$with_gnu_ld" = yes; then
8118
  AC_MSG_CHECKING([for GNU ld])
8119
else
8120
  AC_MSG_CHECKING([for non-GNU ld])
8121
fi
8122
AC_CACHE_VAL(lt_cv_path_LD,
8123
[if test -z "$LD"; then
8124
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8125
  for ac_dir in $PATH; do
8126
    IFS="$lt_save_ifs"
8127
    test -z "$ac_dir" && ac_dir=.
8128
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8129
      lt_cv_path_LD="$ac_dir/$ac_prog"
8130
      # Check to see if the program is GNU ld.  I'd rather use --version,
8131
      # but apparently some variants of GNU ld only accept -v.
8132
      # Break only if it was the GNU/non-GNU ld that we prefer.
8133
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8134
      *GNU* | *'with BFD'*)
8135
	test "$with_gnu_ld" != no && break
8136
	;;
8137
      *)
8138
	test "$with_gnu_ld" != yes && break
8139
	;;
8140
      esac
8141
    fi
8142
  done
8143
  IFS="$lt_save_ifs"
8144
else
8145
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
8146
fi])
8147
LD="$lt_cv_path_LD"
8148
if test -n "$LD"; then
8149
  AC_MSG_RESULT($LD)
8150
else
8151
  AC_MSG_RESULT(no)
8152
fi
8153
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
8154
AC_PROG_LD_GNU
8155
])# AC_PROG_LD
8156
8157
8158
# AC_PROG_LD_GNU
8159
# --------------
8160
AC_DEFUN([AC_PROG_LD_GNU],
8161
[AC_REQUIRE([AC_PROG_EGREP])dnl
8162
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
8163
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
8164
case `$LD -v 2>&1 </dev/null` in
8165
*GNU* | *'with BFD'*)
8166
  lt_cv_prog_gnu_ld=yes
8167
  ;;
8168
*)
8169
  lt_cv_prog_gnu_ld=no
8170
  ;;
8171
esac])
8172
with_gnu_ld=$lt_cv_prog_gnu_ld
8173
])# AC_PROG_LD_GNU
8174
8175
8176
# AC_PROG_LD_RELOAD_FLAG
8177
# ----------------------
8178
# find reload flag for linker
8179
#   -- PORTME Some linkers may need a different reload flag.
8180
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
8181
[AC_CACHE_CHECK([for $LD option to reload object files],
8182
  lt_cv_ld_reload_flag,
8183
  [lt_cv_ld_reload_flag='-r'])
8184
reload_flag=$lt_cv_ld_reload_flag
8185
case $reload_flag in
8186
"" | " "*) ;;
8187
*) reload_flag=" $reload_flag" ;;
8188
esac
8189
reload_cmds='$LD$reload_flag -o $output$reload_objs'
8190
case $host_os in
8191
  darwin*)
8192
    if test "$GCC" = yes; then
8193
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
8194
    else
8195
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8196
    fi
8197
    ;;
8198
esac
8199
])# AC_PROG_LD_RELOAD_FLAG
8200
8201
8202
# AC_DEPLIBS_CHECK_METHOD
8203
# -----------------------
8204
# how to check for library dependencies
8205
#  -- PORTME fill in with the dynamic library characteristics
8206
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
8207
[AC_CACHE_CHECK([how to recognise dependent libraries],
8208
lt_cv_deplibs_check_method,
8209
[lt_cv_file_magic_cmd='$MAGIC_CMD'
8210
lt_cv_file_magic_test_file=
8211
lt_cv_deplibs_check_method='unknown'
8212
# Need to set the preceding variable on all platforms that support
8213
# interlibrary dependencies.
8214
# 'none' -- dependencies not supported.
8215
# `unknown' -- same as none, but documents that we really don't know.
8216
# 'pass_all' -- all dependencies passed with no checks.
8217
# 'test_compile' -- check by making test program.
8218
# 'file_magic [[regex]]' -- check by looking for files in library path
8219
# which responds to the $file_magic_cmd with a given extended regex.
8220
# If you have `file' or equivalent on your system and you're not sure
8221
# whether `pass_all' will *always* work, you probably want this one.
8222
8223
case $host_os in
8224
aix4* | aix5*)
8225
  lt_cv_deplibs_check_method=pass_all
8226
  ;;
8227
8228
beos*)
8229
  lt_cv_deplibs_check_method=pass_all
8230
  ;;
8231
8232
bsdi[[45]]*)
8233
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
8234
  lt_cv_file_magic_cmd='/usr/bin/file -L'
8235
  lt_cv_file_magic_test_file=/shlib/libc.so
8236
  ;;
8237
8238
cygwin*)
8239
  # func_win32_libid is a shell function defined in ltmain.sh
8240
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8241
  lt_cv_file_magic_cmd='func_win32_libid'
8242
  ;;
8243
8244
mingw* | pw32*)
8245
  # Base MSYS/MinGW do not provide the 'file' command needed by
8246
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
8247
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
8248
  lt_cv_file_magic_cmd='$OBJDUMP -f'
8249
  ;;
8250
8251
darwin* | rhapsody*)
8252
  lt_cv_deplibs_check_method=pass_all
8253
  ;;
8254
8255
freebsd* | dragonfly*)
8256
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
8257
    case $host_cpu in
8258
    i*86 )
8259
      # Not sure whether the presence of OpenBSD here was a mistake.
8260
      # Let's accept both of them until this is cleared up.
8261
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
8262
      lt_cv_file_magic_cmd=/usr/bin/file
8263
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8264
      ;;
8265
    esac
8266
  else
8267
    lt_cv_deplibs_check_method=pass_all
8268
  fi
8269
  ;;
8270
8271
gnu*)
8272
  lt_cv_deplibs_check_method=pass_all
8273
  ;;
8274
8275
hpux10.20* | hpux11*)
8276
  lt_cv_file_magic_cmd=/usr/bin/file
8277
  case $host_cpu in
8278
  ia64*)
8279
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
8280
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8281
    ;;
8282
  hppa*64*)
8283
    [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]']
8284
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8285
    ;;
8286
  *)
8287
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
8288
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8289
    ;;
8290
  esac
8291
  ;;
8292
8293
interix3*)
8294
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8295
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
8296
  ;;
8297
8298
irix5* | irix6* | nonstopux*)
8299
  case $LD in
8300
  *-32|*"-32 ") libmagic=32-bit;;
8301
  *-n32|*"-n32 ") libmagic=N32;;
8302
  *-64|*"-64 ") libmagic=64-bit;;
8303
  *) libmagic=never-match;;
8304
  esac
8305
  lt_cv_deplibs_check_method=pass_all
8306
  ;;
8307
8308
# This must be Linux ELF.
8309
linux* | k*bsd*-gnu)
8310
  lt_cv_deplibs_check_method=pass_all
8311
  ;;
8312
8313
netbsd* | netbsdelf*-gnu)
8314
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
8315
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
8316
  else
8317
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
8318
  fi
8319
  ;;
8320
8321
newos6*)
8322
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
8323
  lt_cv_file_magic_cmd=/usr/bin/file
8324
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
8325
  ;;
8326
8327
nto-qnx*)
8328
  lt_cv_deplibs_check_method=unknown
8329
  ;;
8330
8331
openbsd*)
8332
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8333
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
8334
  else
8335
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
8336
  fi
8337
  ;;
8338
8339
osf3* | osf4* | osf5*)
8340
  lt_cv_deplibs_check_method=pass_all
8341
  ;;
8342
8343
solaris*)
8344
  lt_cv_deplibs_check_method=pass_all
8345
  ;;
8346
8347
sysv4 | sysv4.3*)
8348
  case $host_vendor in
8349
  motorola)
8350
    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]]'
8351
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8352
    ;;
8353
  ncr)
8354
    lt_cv_deplibs_check_method=pass_all
8355
    ;;
8356
  sequent)
8357
    lt_cv_file_magic_cmd='/bin/file'
8358
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
8359
    ;;
8360
  sni)
8361
    lt_cv_file_magic_cmd='/bin/file'
8362
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
8363
    lt_cv_file_magic_test_file=/lib/libc.so
8364
    ;;
8365
  siemens)
8366
    lt_cv_deplibs_check_method=pass_all
8367
    ;;
8368
  pc)
8369
    lt_cv_deplibs_check_method=pass_all
8370
    ;;
8371
  esac
8372
  ;;
8373
8374
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8375
  lt_cv_deplibs_check_method=pass_all
8376
  ;;
8377
esac
8378
])
8379
file_magic_cmd=$lt_cv_file_magic_cmd
8380
deplibs_check_method=$lt_cv_deplibs_check_method
8381
test -z "$deplibs_check_method" && deplibs_check_method=unknown
8382
])# AC_DEPLIBS_CHECK_METHOD
8383
8384
8385
# AC_PROG_NM
8386
# ----------
8387
# find the pathname to a BSD-compatible name lister
8388
AC_DEFUN([AC_PROG_NM],
8389
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
8390
[if test -n "$NM"; then
8391
  # Let the user override the test.
8392
  lt_cv_path_NM="$NM"
8393
else
8394
  lt_nm_to_check="${ac_tool_prefix}nm"
8395
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
8396
    lt_nm_to_check="$lt_nm_to_check nm"
8397
  fi
8398
  for lt_tmp_nm in $lt_nm_to_check; do
8399
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8400
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8401
      IFS="$lt_save_ifs"
8402
      test -z "$ac_dir" && ac_dir=.
8403
      tmp_nm="$ac_dir/$lt_tmp_nm"
8404
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
8405
	# Check to see if the nm accepts a BSD-compat flag.
8406
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
8407
	#   nm: unknown option "B" ignored
8408
	# Tru64's nm complains that /dev/null is an invalid object file
8409
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
8410
	*/dev/null* | *'Invalid file or object type'*)
8411
	  lt_cv_path_NM="$tmp_nm -B"
8412
	  break
8413
	  ;;
8414
	*)
8415
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8416
	  */dev/null*)
8417
	    lt_cv_path_NM="$tmp_nm -p"
8418
	    break
8419
	    ;;
8420
	  *)
8421
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8422
	    continue # so that we can try to find one that supports BSD flags
8423
	    ;;
8424
	  esac
8425
	  ;;
8426
	esac
8427
      fi
8428
    done
8429
    IFS="$lt_save_ifs"
8430
  done
8431
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
8432
fi])
8433
NM="$lt_cv_path_NM"
8434
])# AC_PROG_NM
8435
8436
8437
# AC_CHECK_LIBM
8438
# -------------
8439
# check for math library
8440
AC_DEFUN([AC_CHECK_LIBM],
8441
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8442
LIBM=
8443
case $host in
8444
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
8445
  # These system don't have libm, or don't need it
8446
  ;;
8447
*-ncr-sysv4.3*)
8448
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
8449
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
8450
  ;;
8451
*)
8452
  AC_CHECK_LIB(m, cos, LIBM="-lm")
8453
  ;;
8454
esac
8455
])# AC_CHECK_LIBM
8456
8457
8458
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
8459
# -----------------------------------
8460
# sets LIBLTDL to the link flags for the libltdl convenience library and
8461
# LTDLINCL to the include flags for the libltdl header and adds
8462
# --enable-ltdl-convenience to the configure arguments.  Note that
8463
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
8464
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
8465
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
8466
# (note the single quotes!).  If your package is not flat and you're not
8467
# using automake, define top_builddir and top_srcdir appropriately in
8468
# the Makefiles.
8469
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
8470
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8471
  case $enable_ltdl_convenience in
8472
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8473
  "") enable_ltdl_convenience=yes
8474
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8475
  esac
8476
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
8477
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8478
  # For backwards non-gettext consistent compatibility...
8479
  INCLTDL="$LTDLINCL"
8480
])# AC_LIBLTDL_CONVENIENCE
8481
8482
8483
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
8484
# -----------------------------------
8485
# sets LIBLTDL to the link flags for the libltdl installable library and
8486
# LTDLINCL to the include flags for the libltdl header and adds
8487
# --enable-ltdl-install to the configure arguments.  Note that
8488
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
8489
# and an installed libltdl is not found, it is assumed to be `libltdl'.
8490
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
8491
# '${top_srcdir}/' (note the single quotes!).  If your package is not
8492
# flat and you're not using automake, define top_builddir and top_srcdir
8493
# appropriately in the Makefiles.
8494
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
8495
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
8496
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8497
  AC_CHECK_LIB(ltdl, lt_dlinit,
8498
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8499
  [if test x"$enable_ltdl_install" = xno; then
8500
     AC_MSG_WARN([libltdl not installed, but installation disabled])
8501
   else
8502
     enable_ltdl_install=yes
8503
   fi
8504
  ])
8505
  if test x"$enable_ltdl_install" = x"yes"; then
8506
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
8507
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8508
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8509
  else
8510
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8511
    LIBLTDL="-lltdl"
8512
    LTDLINCL=
8513
  fi
8514
  # For backwards non-gettext consistent compatibility...
8515
  INCLTDL="$LTDLINCL"
8516
])# AC_LIBLTDL_INSTALLABLE
8517
8518
8519
# AC_LIBTOOL_CXX
8520
# --------------
8521
# enable support for C++ libraries
8522
AC_DEFUN([AC_LIBTOOL_CXX],
8523
[AC_REQUIRE([_LT_AC_LANG_CXX])
8524
])# AC_LIBTOOL_CXX
8525
8526
8527
# _LT_AC_LANG_CXX
8528
# ---------------
8529
AC_DEFUN([_LT_AC_LANG_CXX],
8530
[AC_REQUIRE([AC_PROG_CXX])
8531
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
8532
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8533
])# _LT_AC_LANG_CXX
8534
8535
# _LT_AC_PROG_CXXCPP
8536
# ------------------
8537
AC_DEFUN([_LT_AC_PROG_CXXCPP],
8538
[
8539
AC_REQUIRE([AC_PROG_CXX])
8540
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
8541
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
8542
    (test "X$CXX" != "Xg++"))) ; then
8543
  AC_PROG_CXXCPP
8544
fi
8545
])# _LT_AC_PROG_CXXCPP
8546
8547
# AC_LIBTOOL_F77
8548
# --------------
8549
# enable support for Fortran 77 libraries
8550
AC_DEFUN([AC_LIBTOOL_F77],
8551
[AC_REQUIRE([_LT_AC_LANG_F77])
8552
])# AC_LIBTOOL_F77
8553
8554
8555
# _LT_AC_LANG_F77
8556
# ---------------
8557
AC_DEFUN([_LT_AC_LANG_F77],
8558
[AC_REQUIRE([AC_PROG_F77])
8559
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8560
])# _LT_AC_LANG_F77
8561
8562
8563
# AC_LIBTOOL_GCJ
8564
# --------------
8565
# enable support for GCJ libraries
8566
AC_DEFUN([AC_LIBTOOL_GCJ],
8567
[AC_REQUIRE([_LT_AC_LANG_GCJ])
8568
])# AC_LIBTOOL_GCJ
8569
8570
8571
# _LT_AC_LANG_GCJ
8572
# ---------------
8573
AC_DEFUN([_LT_AC_LANG_GCJ],
8574
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8575
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8576
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8577
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8578
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8579
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8580
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8581
])# _LT_AC_LANG_GCJ
8582
8583
8584
# AC_LIBTOOL_RC
8585
# -------------
8586
# enable support for Windows resource files
8587
AC_DEFUN([AC_LIBTOOL_RC],
8588
[AC_REQUIRE([LT_AC_PROG_RC])
8589
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8590
])# AC_LIBTOOL_RC
8591
8592
8593
# AC_LIBTOOL_LANG_C_CONFIG
8594
# ------------------------
8595
# Ensure that the configuration vars for the C compiler are
8596
# suitably defined.  Those variables are subsequently used by
8597
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8598
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8599
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
8600
[lt_save_CC="$CC"
8601
AC_LANG_PUSH(C)
8602
8603
# Source file extension for C test sources.
8604
ac_ext=c
8605
8606
# Object file extension for compiled C test sources.
8607
objext=o
8608
_LT_AC_TAGVAR(objext, $1)=$objext
8609
8610
# Code to be used in simple compile tests
8611
lt_simple_compile_test_code="int some_variable = 0;\n"
8612
8613
# Code to be used in simple link tests
8614
lt_simple_link_test_code='int main(){return(0);}\n'
8615
8616
_LT_AC_SYS_COMPILER
8617
8618
# save warnings/boilerplate of simple test code
8619
_LT_COMPILER_BOILERPLATE
8620
_LT_LINKER_BOILERPLATE
8621
8622
## CAVEAT EMPTOR:
8623
## There is no encapsulation within the following macros, do not change
8624
## the running order or otherwise move them around unless you know exactly
8625
## what you are doing...
8626
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8627
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8628
AC_LIBTOOL_PROG_CC_C_O($1)
8629
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8630
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8631
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8632
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8633
AC_LIBTOOL_SYS_LIB_STRIP
8634
AC_LIBTOOL_DLOPEN_SELF
8635
8636
# Report which library types will actually be built
8637
AC_MSG_CHECKING([if libtool supports shared libraries])
8638
AC_MSG_RESULT([$can_build_shared])
8639
8640
AC_MSG_CHECKING([whether to build shared libraries])
8641
test "$can_build_shared" = "no" && enable_shared=no
8642
8643
# On AIX, shared libraries and static libraries use the same namespace, and
8644
# are all built from PIC.
8645
case $host_os in
8646
aix3*)
8647
  test "$enable_shared" = yes && enable_static=no
8648
  if test -n "$RANLIB"; then
8649
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
8650
    postinstall_cmds='$RANLIB $lib'
8651
  fi
8652
  ;;
8653
8654
aix4* | aix5*)
8655
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8656
    test "$enable_shared" = yes && enable_static=no
8657
  fi
8658
    ;;
8659
esac
8660
AC_MSG_RESULT([$enable_shared])
8661
8662
AC_MSG_CHECKING([whether to build static libraries])
8663
# Make sure either enable_shared or enable_static is yes.
8664
test "$enable_shared" = yes || enable_static=yes
8665
AC_MSG_RESULT([$enable_static])
8666
8667
AC_LIBTOOL_CONFIG($1)
8668
8669
AC_LANG_POP
8670
CC="$lt_save_CC"
8671
])# AC_LIBTOOL_LANG_C_CONFIG
8672
8673
8674
# AC_LIBTOOL_LANG_CXX_CONFIG
8675
# --------------------------
8676
# Ensure that the configuration vars for the C compiler are
8677
# suitably defined.  Those variables are subsequently used by
8678
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8679
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8680
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
8681
[AC_LANG_PUSH(C++)
8682
AC_REQUIRE([AC_PROG_CXX])
8683
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
8684
8685
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8686
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8687
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8688
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8689
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8690
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8691
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8692
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8693
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8694
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8695
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8696
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8697
_LT_AC_TAGVAR(module_cmds, $1)=
8698
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8699
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8700
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8701
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8702
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8703
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8704
8705
# Dependencies to place before and after the object being linked:
8706
_LT_AC_TAGVAR(predep_objects, $1)=
8707
_LT_AC_TAGVAR(postdep_objects, $1)=
8708
_LT_AC_TAGVAR(predeps, $1)=
8709
_LT_AC_TAGVAR(postdeps, $1)=
8710
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8711
8712
# Source file extension for C++ test sources.
8713
ac_ext=cpp
8714
8715
# Object file extension for compiled C++ test sources.
8716
objext=o
8717
_LT_AC_TAGVAR(objext, $1)=$objext
8718
8719
# Code to be used in simple compile tests
8720
lt_simple_compile_test_code="int some_variable = 0;\n"
8721
8722
# Code to be used in simple link tests
8723
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
8724
8725
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8726
_LT_AC_SYS_COMPILER
8727
8728
# save warnings/boilerplate of simple test code
8729
_LT_COMPILER_BOILERPLATE
8730
_LT_LINKER_BOILERPLATE
8731
8732
# Allow CC to be a program name with arguments.
8733
lt_save_CC=$CC
8734
lt_save_LD=$LD
8735
lt_save_GCC=$GCC
8736
GCC=$GXX
8737
lt_save_with_gnu_ld=$with_gnu_ld
8738
lt_save_path_LD=$lt_cv_path_LD
8739
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8740
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8741
else
8742
  $as_unset lt_cv_prog_gnu_ld
8743
fi
8744
if test -n "${lt_cv_path_LDCXX+set}"; then
8745
  lt_cv_path_LD=$lt_cv_path_LDCXX
8746
else
8747
  $as_unset lt_cv_path_LD
8748
fi
8749
test -z "${LDCXX+set}" || LD=$LDCXX
8750
CC=${CXX-"c++"}
8751
compiler=$CC
8752
_LT_AC_TAGVAR(compiler, $1)=$CC
8753
_LT_CC_BASENAME([$compiler])
8754
8755
# We don't want -fno-exception wen compiling C++ code, so set the
8756
# no_builtin_flag separately
8757
if test "$GXX" = yes; then
8758
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8759
else
8760
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8761
fi
8762
8763
if test "$GXX" = yes; then
8764
  # Set up default GNU C++ configuration
8765
8766
  AC_PROG_LD
8767
8768
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
8769
  # archiving commands below assume that GNU ld is being used.
8770
  if test "$with_gnu_ld" = yes; then
8771
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8772
    _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'
8773
8774
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8775
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8776
8777
    # If archive_cmds runs LD, not CC, wlarc should be empty
8778
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8779
    #     investigate it a little bit more. (MM)
8780
    wlarc='${wl}'
8781
8782
    # ancient GNU ld didn't support --whole-archive et. al.
8783
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8784
	grep 'no-whole-archive' > /dev/null; then
8785
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8786
    else
8787
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8788
    fi
8789
  else
8790
    with_gnu_ld=no
8791
    wlarc=
8792
8793
    # A generic and very simple default shared library creation
8794
    # command for GNU C++ for the case where it uses the native
8795
    # linker, instead of GNU ld.  If possible, this setting should
8796
    # overridden to take advantage of the native linker features on
8797
    # the platform it is being used on.
8798
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8799
  fi
8800
8801
  # Commands to make compiler produce verbose output that lists
8802
  # what "hidden" libraries, object files and flags are used when
8803
  # linking a shared library.
8804
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8805
8806
else
8807
  GXX=no
8808
  with_gnu_ld=no
8809
  wlarc=
8810
fi
8811
8812
# PORTME: fill in a description of your system's C++ link characteristics
8813
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8814
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8815
case $host_os in
8816
  aix3*)
8817
    # FIXME: insert proper C++ library support
8818
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8819
    ;;
8820
  aix4* | aix5*)
8821
    if test "$host_cpu" = ia64; then
8822
      # On IA64, the linker does run time linking by default, so we don't
8823
      # have to do anything special.
8824
      aix_use_runtimelinking=no
8825
      exp_sym_flag='-Bexport'
8826
      no_entry_flag=""
8827
    else
8828
      aix_use_runtimelinking=no
8829
8830
      # Test if we are trying to use run time linking or normal
8831
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8832
      # need to do runtime linking.
8833
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
8834
	for ld_flag in $LDFLAGS; do
8835
	  case $ld_flag in
8836
	  *-brtl*)
8837
	    aix_use_runtimelinking=yes
8838
	    break
8839
	    ;;
8840
	  esac
8841
	done
8842
	;;
8843
      esac
8844
8845
      exp_sym_flag='-bexport'
8846
      no_entry_flag='-bnoentry'
8847
    fi
8848
8849
    # When large executables or shared objects are built, AIX ld can
8850
    # have problems creating the table of contents.  If linking a library
8851
    # or program results in "error TOC overflow" add -mminimal-toc to
8852
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8853
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8854
8855
    _LT_AC_TAGVAR(archive_cmds, $1)=''
8856
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8857
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8858
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8859
8860
    if test "$GXX" = yes; then
8861
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
8862
      # We only want to do this on AIX 4.2 and lower, the check
8863
      # below for broken collect2 doesn't work under 4.3+
8864
	collect2name=`${CC} -print-prog-name=collect2`
8865
	if test -f "$collect2name" && \
8866
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
8867
	then
8868
	  # We have reworked collect2
8869
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8870
	else
8871
	  # We have old collect2
8872
	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8873
	  # It fails to find uninstalled libraries when the uninstalled
8874
	  # path is not listed in the libpath.  Setting hardcode_minus_L
8875
	  # to unsupported forces relinking
8876
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8877
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8878
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8879
	fi
8880
	;;
8881
      esac
8882
      shared_flag='-shared'
8883
      if test "$aix_use_runtimelinking" = yes; then
8884
	shared_flag="$shared_flag "'${wl}-G'
8885
      fi
8886
    else
8887
      # not using gcc
8888
      if test "$host_cpu" = ia64; then
8889
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8890
	# chokes on -Wl,-G. The following line is correct:
8891
	shared_flag='-G'
8892
      else
8893
	if test "$aix_use_runtimelinking" = yes; then
8894
	  shared_flag='${wl}-G'
8895
	else
8896
	  shared_flag='${wl}-bM:SRE'
8897
	fi
8898
      fi
8899
    fi
8900
8901
    # It seems that -bexpall does not export symbols beginning with
8902
    # underscore (_), so it is better to generate a list of symbols to export.
8903
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8904
    if test "$aix_use_runtimelinking" = yes; then
8905
      # Warning - without using the other runtime loading flags (-brtl),
8906
      # -berok will link without error, but may produce a broken library.
8907
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8908
      # Determine the default libpath from the value encoded in an empty executable.
8909
      _LT_AC_SYS_LIBPATH_AIX
8910
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8911
8912
      _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"
8913
     else
8914
      if test "$host_cpu" = ia64; then
8915
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8916
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8917
	_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"
8918
      else
8919
	# Determine the default libpath from the value encoded in an empty executable.
8920
	_LT_AC_SYS_LIBPATH_AIX
8921
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8922
	# Warning - without using the other run time loading flags,
8923
	# -berok will link without error, but may produce a broken library.
8924
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8925
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8926
	# Exported symbols can be pulled into shared objects from archives
8927
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8928
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8929
	# This is similar to how AIX traditionally builds its shared libraries.
8930
	_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'
8931
      fi
8932
    fi
8933
    ;;
8934
8935
  beos*)
8936
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8937
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8938
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8939
      # support --undefined.  This deserves some investigation.  FIXME
8940
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8941
    else
8942
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8943
    fi
8944
    ;;
8945
8946
  chorus*)
8947
    case $cc_basename in
8948
      *)
8949
	# FIXME: insert proper C++ library support
8950
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8951
	;;
8952
    esac
8953
    ;;
8954
8955
  cygwin* | mingw* | pw32*)
8956
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8957
    # as there is no search path for DLLs.
8958
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8959
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8960
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
8961
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8962
8963
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8964
      _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'
8965
      # If the export-symbols file already is a .def file (1st line
8966
      # is EXPORTS), use it as is; otherwise, prepend...
8967
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8968
	cp $export_symbols $output_objdir/$soname.def;
8969
      else
8970
	echo EXPORTS > $output_objdir/$soname.def;
8971
	cat $export_symbols >> $output_objdir/$soname.def;
8972
      fi~
8973
      $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'
8974
    else
8975
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8976
    fi
8977
  ;;
8978
      darwin* | rhapsody*)
8979
        case $host_os in
8980
        rhapsody* | darwin1.[[012]])
8981
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
8982
         ;;
8983
       *) # Darwin 1.3 on
8984
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8985
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8986
         else
8987
           case ${MACOSX_DEPLOYMENT_TARGET} in
8988
             10.[[012]])
8989
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8990
               ;;
8991
             10.*)
8992
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
8993
               ;;
8994
           esac
8995
         fi
8996
         ;;
8997
        esac
8998
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8999
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
9000
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
9001
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9002
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
9003
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9004
9005
    if test "$GXX" = yes ; then
9006
      lt_int_apple_cc_single_mod=no
9007
      output_verbose_link_cmd='echo'
9008
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
9009
       lt_int_apple_cc_single_mod=yes
9010
      fi
9011
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
9012
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9013
      else
9014
          _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'
9015
        fi
9016
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9017
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9018
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
9019
            _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}'
9020
          else
9021
            _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}'
9022
          fi
9023
            _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}'
9024
      else
9025
      case $cc_basename in
9026
        xlc*)
9027
         output_verbose_link_cmd='echo'
9028
          _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'
9029
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9030
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9031
          _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}'
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
          ;;
9034
       *)
9035
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9036
          ;;
9037
      esac
9038
      fi
9039
        ;;
9040
9041
  dgux*)
9042
    case $cc_basename in
9043
      ec++*)
9044
	# FIXME: insert proper C++ library support
9045
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9046
	;;
9047
      ghcx*)
9048
	# Green Hills C++ Compiler
9049
	# FIXME: insert proper C++ library support
9050
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9051
	;;
9052
      *)
9053
	# FIXME: insert proper C++ library support
9054
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9055
	;;
9056
    esac
9057
    ;;
9058
  freebsd[[12]]*)
9059
    # C++ shared libraries reported to be fairly broken before switch to ELF
9060
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9061
    ;;
9062
  freebsd-elf*)
9063
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9064
    ;;
9065
  freebsd* | dragonfly*)
9066
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
9067
    # conventions
9068
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
9069
    ;;
9070
  gnu*)
9071
    ;;
9072
  hpux9*)
9073
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9074
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9075
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9076
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9077
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9078
				# but as the default
9079
				# location of the library.
9080
9081
    case $cc_basename in
9082
    CC*)
9083
      # FIXME: insert proper C++ library support
9084
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
9085
      ;;
9086
    aCC*)
9087
      _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'
9088
      # Commands to make compiler produce verbose output that lists
9089
      # what "hidden" libraries, object files and flags are used when
9090
      # linking a shared library.
9091
      #
9092
      # There doesn't appear to be a way to prevent this compiler from
9093
      # explicitly linking system object files so we need to strip them
9094
      # from the output so that they don't get included in the library
9095
      # dependencies.
9096
      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'
9097
      ;;
9098
    *)
9099
      if test "$GXX" = yes; then
9100
        _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'
9101
      else
9102
        # FIXME: insert proper C++ library support
9103
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
9104
      fi
9105
      ;;
9106
    esac
9107
    ;;
9108
  hpux10*|hpux11*)
9109
    if test $with_gnu_ld = no; then
9110
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9111
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9112
9113
      case $host_cpu in
9114
      hppa*64*|ia64*)
9115
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
9116
        ;;
9117
      *)
9118
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9119
        ;;
9120
      esac
9121
    fi
9122
    case $host_cpu in
9123
    hppa*64*|ia64*)
9124
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
9125
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9126
      ;;
9127
    *)
9128
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9129
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9130
					      # but as the default
9131
					      # location of the library.
9132
      ;;
9133
    esac
9134
9135
    case $cc_basename in
9136
      CC*)
9137
	# FIXME: insert proper C++ library support
9138
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9139
	;;
9140
      aCC*)
9141
	case $host_cpu in
9142
	hppa*64*)
9143
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9144
	  ;;
9145
	ia64*)
9146
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9147
	  ;;
9148
	*)
9149
	  _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'
9150
	  ;;
9151
	esac
9152
	# Commands to make compiler produce verbose output that lists
9153
	# what "hidden" libraries, object files and flags are used when
9154
	# linking a shared library.
9155
	#
9156
	# There doesn't appear to be a way to prevent this compiler from
9157
	# explicitly linking system object files so we need to strip them
9158
	# from the output so that they don't get included in the library
9159
	# dependencies.
9160
	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'
9161
	;;
9162
      *)
9163
	if test "$GXX" = yes; then
9164
	  if test $with_gnu_ld = no; then
9165
	    case $host_cpu in
9166
	    hppa*64*)
9167
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9168
	      ;;
9169
	    ia64*)
9170
	      _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'
9171
	      ;;
9172
	    *)
9173
	      _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'
9174
	      ;;
9175
	    esac
9176
	  fi
9177
	else
9178
	  # FIXME: insert proper C++ library support
9179
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
9180
	fi
9181
	;;
9182
    esac
9183
    ;;
9184
  interix3*)
9185
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
9186
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9187
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9188
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9189
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9190
    # Instead, shared libraries are loaded at an image base (0x10000000 by
9191
    # default) and relocated if they conflict, which is a slow very memory
9192
    # consuming and fragmenting process.  To avoid this, we pick a random,
9193
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9194
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
9195
    _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'
9196
    _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'
9197
    ;;
9198
  irix5* | irix6*)
9199
    case $cc_basename in
9200
      CC*)
9201
	# SGI C++
9202
	_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'
9203
9204
	# Archives containing C++ object files must be created using
9205
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
9206
	# necessary to make sure instantiated templates are included
9207
	# in the archive.
9208
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
9209
	;;
9210
      *)
9211
	if test "$GXX" = yes; then
9212
	  if test "$with_gnu_ld" = no; then
9213
	    _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'
9214
	  else
9215
	    _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'
9216
	  fi
9217
	fi
9218
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9219
	;;
9220
    esac
9221
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9222
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9223
    ;;
9224
  linux* | k*bsd*-gnu)
9225
    case $cc_basename in
9226
      KCC*)
9227
	# Kuck and Associates, Inc. (KAI) C++ Compiler
9228
9229
	# KCC will only create a shared library if the output file
9230
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
9231
	# to its proper name (with version) after linking.
9232
	_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'
9233
	_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'
9234
	# Commands to make compiler produce verbose output that lists
9235
	# what "hidden" libraries, object files and flags are used when
9236
	# linking a shared library.
9237
	#
9238
	# There doesn't appear to be a way to prevent this compiler from
9239
	# explicitly linking system object files so we need to strip them
9240
	# from the output so that they don't get included in the library
9241
	# dependencies.
9242
	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'
9243
9244
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
9245
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9246
9247
	# Archives containing C++ object files must be created using
9248
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
9249
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9250
	;;
9251
      icpc*)
9252
	# Intel C++
9253
	with_gnu_ld=yes
9254
	# version 8.0 and above of icpc choke on multiply defined symbols
9255
	# if we add $predep_objects and $postdep_objects, however 7.1 and
9256
	# earlier do not add the objects themselves.
9257
	case `$CC -V 2>&1` in
9258
	*"Version 7."*)
9259
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
9260
  	  _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'
9261
	  ;;
9262
	*)  # Version 8.0 or newer
9263
	  tmp_idyn=
9264
	  case $host_cpu in
9265
	    ia64*) tmp_idyn=' -i_dynamic';;
9266
	  esac
9267
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9268
	  _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'
9269
	  ;;
9270
	esac
9271
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9272
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9273
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9274
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
9275
	;;
9276
      pgCC*)
9277
        # Portland Group C++ compiler
9278
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
9279
  	_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'
9280
9281
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$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`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
9284
        ;;
9285
      cxx*)
9286
	# Compaq C++
9287
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
9288
	_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'
9289
9290
	runpath_var=LD_RUN_PATH
9291
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9292
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9293
9294
	# Commands to make compiler produce verbose output that lists
9295
	# what "hidden" libraries, object files and flags are used when
9296
	# linking a shared library.
9297
	#
9298
	# There doesn't appear to be a way to prevent this compiler from
9299
	# explicitly linking system object files so we need to strip them
9300
	# from the output so that they don't get included in the library
9301
	# dependencies.
9302
	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'
9303
	;;
9304
    esac
9305
    ;;
9306
  lynxos*)
9307
    # FIXME: insert proper C++ library support
9308
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9309
    ;;
9310
  m88k*)
9311
    # FIXME: insert proper C++ library support
9312
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9313
    ;;
9314
  mvs*)
9315
    case $cc_basename in
9316
      cxx*)
9317
	# FIXME: insert proper C++ library support
9318
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9319
	;;
9320
      *)
9321
	# FIXME: insert proper C++ library support
9322
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9323
	;;
9324
    esac
9325
    ;;
9326
  netbsd* | netbsdelf*-gnu)
9327
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9328
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
9329
      wlarc=
9330
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9331
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9332
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9333
    fi
9334
    # Workaround some broken pre-1.5 toolchains
9335
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
9336
    ;;
9337
  openbsd2*)
9338
    # C++ shared libraries are fairly broken
9339
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9340
    ;;
9341
  openbsd*)
9342
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9343
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9344
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
9345
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9346
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9347
      _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'
9348
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9349
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9350
    fi
9351
    output_verbose_link_cmd='echo'
9352
    ;;
9353
  osf3*)
9354
    case $cc_basename in
9355
      KCC*)
9356
	# Kuck and Associates, Inc. (KAI) C++ Compiler
9357
9358
	# KCC will only create a shared library if the output file
9359
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
9360
	# to its proper name (with version) after linking.
9361
	_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'
9362
9363
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9364
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9365
9366
	# Archives containing C++ object files must be created using
9367
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
9368
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9369
9370
	;;
9371
      RCC*)
9372
	# Rational C++ 2.4.1
9373
	# FIXME: insert proper C++ library support
9374
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9375
	;;
9376
      cxx*)
9377
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9378
	_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'
9379
9380
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9381
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9382
9383
	# Commands to make compiler produce verbose output that lists
9384
	# what "hidden" libraries, object files and flags are used when
9385
	# linking a shared library.
9386
	#
9387
	# There doesn't appear to be a way to prevent this compiler from
9388
	# explicitly linking system object files so we need to strip them
9389
	# from the output so that they don't get included in the library
9390
	# dependencies.
9391
	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'
9392
	;;
9393
      *)
9394
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9395
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9396
	  _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'
9397
9398
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9399
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9400
9401
	  # Commands to make compiler produce verbose output that lists
9402
	  # what "hidden" libraries, object files and flags are used when
9403
	  # linking a shared library.
9404
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9405
9406
	else
9407
	  # FIXME: insert proper C++ library support
9408
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
9409
	fi
9410
	;;
9411
    esac
9412
    ;;
9413
  osf4* | osf5*)
9414
    case $cc_basename in
9415
      KCC*)
9416
	# Kuck and Associates, Inc. (KAI) C++ Compiler
9417
9418
	# KCC will only create a shared library if the output file
9419
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
9420
	# to its proper name (with version) after linking.
9421
	_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'
9422
9423
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9424
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9425
9426
	# Archives containing C++ object files must be created using
9427
	# the KAI C++ compiler.
9428
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
9429
	;;
9430
      RCC*)
9431
	# Rational C++ 2.4.1
9432
	# FIXME: insert proper C++ library support
9433
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9434
	;;
9435
      cxx*)
9436
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9437
	_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'
9438
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9439
	  echo "-hidden">> $lib.exp~
9440
	  $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~
9441
	  $rm $lib.exp'
9442
9443
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9444
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9445
9446
	# Commands to make compiler produce verbose output that lists
9447
	# what "hidden" libraries, object files and flags are used when
9448
	# linking a shared library.
9449
	#
9450
	# There doesn't appear to be a way to prevent this compiler from
9451
	# explicitly linking system object files so we need to strip them
9452
	# from the output so that they don't get included in the library
9453
	# dependencies.
9454
	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'
9455
	;;
9456
      *)
9457
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9458
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9459
	 _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'
9460
9461
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9462
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9463
9464
	  # Commands to make compiler produce verbose output that lists
9465
	  # what "hidden" libraries, object files and flags are used when
9466
	  # linking a shared library.
9467
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9468
9469
	else
9470
	  # FIXME: insert proper C++ library support
9471
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
9472
	fi
9473
	;;
9474
    esac
9475
    ;;
9476
  psos*)
9477
    # FIXME: insert proper C++ library support
9478
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9479
    ;;
9480
  sunos4*)
9481
    case $cc_basename in
9482
      CC*)
9483
	# Sun C++ 4.x
9484
	# FIXME: insert proper C++ library support
9485
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9486
	;;
9487
      lcc*)
9488
	# Lucid
9489
	# FIXME: insert proper C++ library support
9490
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9491
	;;
9492
      *)
9493
	# FIXME: insert proper C++ library support
9494
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9495
	;;
9496
    esac
9497
    ;;
9498
  solaris*)
9499
    case $cc_basename in
9500
      CC*)
9501
	# Sun C++ 4.2, 5.x and Centerline C++
9502
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
9503
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9504
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9505
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9506
	$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'
9507
9508
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9509
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9510
	case $host_os in
9511
	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9512
	  *)
9513
	    # The C++ compiler is used as linker so we must use $wl
9514
	    # flag to pass the commands to the underlying system
9515
	    # linker. We must also pass each convience library through
9516
	    # to the system linker between allextract/defaultextract.
9517
	    # The C++ compiler will combine linker options so we
9518
	    # cannot just pass the convience library names through
9519
	    # without $wl.
9520
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
9521
	    _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'
9522
	    ;;
9523
	esac
9524
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9525
9526
	output_verbose_link_cmd='echo'
9527
9528
	# Archives containing C++ object files must be created using
9529
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
9530
	# necessary to make sure instantiated templates are included
9531
	# in the archive.
9532
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9533
	;;
9534
      gcx*)
9535
	# Green Hills C++ Compiler
9536
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9537
9538
	# The C++ compiler must be used to create the archive.
9539
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9540
	;;
9541
      *)
9542
	# GNU C++ compiler with Solaris linker
9543
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9544
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9545
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
9546
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9547
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9548
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9549
9550
	    # Commands to make compiler produce verbose output that lists
9551
	    # what "hidden" libraries, object files and flags are used when
9552
	    # linking a shared library.
9553
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9554
	  else
9555
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
9556
	    # platform.
9557
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9558
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9559
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9560
9561
	    # Commands to make compiler produce verbose output that lists
9562
	    # what "hidden" libraries, object files and flags are used when
9563
	    # linking a shared library.
9564
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9565
	  fi
9566
9567
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9568
	fi
9569
	;;
9570
    esac
9571
    ;;
9572
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9573
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9574
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9575
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9576
    runpath_var='LD_RUN_PATH'
9577
9578
    case $cc_basename in
9579
      CC*)
9580
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9581
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9582
	;;
9583
      *)
9584
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9585
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9586
	;;
9587
    esac
9588
    ;;
9589
  sysv5* | sco3.2v5* | sco5v6*)
9590
    # Note: We can NOT use -z defs as we might desire, because we do not
9591
    # link with -lc, and that would cause any symbols used from libc to
9592
    # always be unresolved, which means just about no library would
9593
    # ever link correctly.  If we're not using GNU ld we use -z text
9594
    # though, which does catch some bad symbols but isn't as heavy-handed
9595
    # as -z defs.
9596
    # For security reasons, it is highly recommended that you always
9597
    # use absolute paths for naming shared libraries, and exclude the
9598
    # DT_RUNPATH tag from executables and libraries.  But doing so
9599
    # requires that you compile everything twice, which is a pain.
9600
    # So that behaviour is only enabled if SCOABSPATH is set to a
9601
    # non-empty value in the environment.  Most likely only useful for
9602
    # creating official distributions of packages.
9603
    # This is a hack until libtool officially supports absolute path
9604
    # names for shared libraries.
9605
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9606
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
9607
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9608
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9609
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
9610
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
9611
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9612
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
9613
    runpath_var='LD_RUN_PATH'
9614
9615
    case $cc_basename in
9616
      CC*)
9617
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9618
	_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'
9619
	;;
9620
      *)
9621
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9622
	_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'
9623
	;;
9624
    esac
9625
    ;;
9626
  tandem*)
9627
    case $cc_basename in
9628
      NCC*)
9629
	# NonStop-UX NCC 3.20
9630
	# FIXME: insert proper C++ library support
9631
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9632
	;;
9633
      *)
9634
	# FIXME: insert proper C++ library support
9635
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9636
	;;
9637
    esac
9638
    ;;
9639
  vxworks*)
9640
    # FIXME: insert proper C++ library support
9641
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9642
    ;;
9643
  *)
9644
    # FIXME: insert proper C++ library support
9645
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9646
    ;;
9647
esac
9648
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9649
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9650
9651
_LT_AC_TAGVAR(GCC, $1)="$GXX"
9652
_LT_AC_TAGVAR(LD, $1)="$LD"
9653
9654
## CAVEAT EMPTOR:
9655
## There is no encapsulation within the following macros, do not change
9656
## the running order or otherwise move them around unless you know exactly
9657
## what you are doing...
9658
AC_LIBTOOL_POSTDEP_PREDEP($1)
9659
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9660
AC_LIBTOOL_PROG_CC_C_O($1)
9661
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9662
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9663
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9664
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9665
9666
AC_LIBTOOL_CONFIG($1)
9667
9668
AC_LANG_POP
9669
CC=$lt_save_CC
9670
LDCXX=$LD
9671
LD=$lt_save_LD
9672
GCC=$lt_save_GCC
9673
with_gnu_ldcxx=$with_gnu_ld
9674
with_gnu_ld=$lt_save_with_gnu_ld
9675
lt_cv_path_LDCXX=$lt_cv_path_LD
9676
lt_cv_path_LD=$lt_save_path_LD
9677
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9678
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9679
])# AC_LIBTOOL_LANG_CXX_CONFIG
9680
9681
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
9682
# ------------------------------------
9683
# Figure out "hidden" library dependencies from verbose
9684
# compiler output when linking a shared library.
9685
# Parse the compiler output and extract the necessary
9686
# objects, libraries and library flags.
9687
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
9688
dnl we can't use the lt_simple_compile_test_code here,
9689
dnl because it contains code intended for an executable,
9690
dnl not a library.  It's possible we should let each
9691
dnl tag define a new lt_????_link_test_code variable,
9692
dnl but it's only used here...
9693
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9694
int a;
9695
void foo (void) { a = 0; }
9696
EOF
9697
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9698
class Foo
9699
{
9700
public:
9701
  Foo (void) { a = 0; }
9702
private:
9703
  int a;
9704
};
9705
EOF
9706
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9707
      subroutine foo
9708
      implicit none
9709
      integer*4 a
9710
      a=0
9711
      return
9712
      end
9713
EOF
9714
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9715
public class foo {
9716
  private int a;
9717
  public void bar (void) {
9718
    a = 0;
9719
  }
9720
};
9721
EOF
9722
])
9723
dnl Parse the compiler output and extract the necessary
9724
dnl objects, libraries and library flags.
9725
if AC_TRY_EVAL(ac_compile); then
9726
  # Parse the compiler output and extract the necessary
9727
  # objects, libraries and library flags.
9728
9729
  # Sentinel used to keep track of whether or not we are before
9730
  # the conftest object file.
9731
  pre_test_object_deps_done=no
9732
9733
  # The `*' in the case matches for architectures that use `case' in
9734
  # $output_verbose_cmd can trigger glob expansion during the loop
9735
  # eval without this substitution.
9736
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
9737
9738
  for p in `eval $output_verbose_link_cmd`; do
9739
    case $p in
9740
9741
    -L* | -R* | -l*)
9742
       # Some compilers place space between "-{L,R}" and the path.
9743
       # Remove the space.
9744
       if test $p = "-L" \
9745
	  || test $p = "-R"; then
9746
	 prev=$p
9747
	 continue
9748
       else
9749
	 prev=
9750
       fi
9751
9752
       if test "$pre_test_object_deps_done" = no; then
9753
	 case $p in
9754
	 -L* | -R*)
9755
	   # Internal compiler library paths should come after those
9756
	   # provided the user.  The postdeps already come after the
9757
	   # user supplied libs so there is no need to process them.
9758
	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9759
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9760
	   else
9761
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9762
	   fi
9763
	   ;;
9764
	 # The "-l" case would never come before the object being
9765
	 # linked, so don't bother handling this case.
9766
	 esac
9767
       else
9768
	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9769
	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9770
	 else
9771
	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9772
	 fi
9773
       fi
9774
       ;;
9775
9776
    *.$objext)
9777
       # This assumes that the test object file only shows up
9778
       # once in the compiler output.
9779
       if test "$p" = "conftest.$objext"; then
9780
	 pre_test_object_deps_done=yes
9781
	 continue
9782
       fi
9783
9784
       if test "$pre_test_object_deps_done" = no; then
9785
	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9786
	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
9787
	 else
9788
	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9789
	 fi
9790
       else
9791
	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9792
	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
9793
	 else
9794
	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9795
	 fi
9796
       fi
9797
       ;;
9798
9799
    *) ;; # Ignore the rest.
9800
9801
    esac
9802
  done
9803
9804
  # Clean up.
9805
  rm -f a.out a.exe
9806
else
9807
  echo "libtool.m4: error: problem compiling $1 test program"
9808
fi
9809
9810
$rm -f confest.$objext
9811
9812
# PORTME: override above test on systems where it is broken
9813
ifelse([$1],[CXX],
9814
[case $host_os in
9815
interix3*)
9816
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
9817
  # hack all around it, let's just trust "g++" to DTRT.
9818
  _LT_AC_TAGVAR(predep_objects,$1)=
9819
  _LT_AC_TAGVAR(postdep_objects,$1)=
9820
  _LT_AC_TAGVAR(postdeps,$1)=
9821
  ;;
9822
9823
solaris*)
9824
  case $cc_basename in
9825
  CC*)
9826
    # Adding this requires a known-good setup of shared libraries for
9827
    # Sun compiler versions before 5.6, else PIC objects from an old
9828
    # archive will be linked into the output, leading to subtle bugs.
9829
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
9830
    ;;
9831
  esac
9832
  ;;
9833
esac
9834
])
9835
9836
case " $_LT_AC_TAGVAR(postdeps, $1) " in
9837
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9838
esac
9839
])# AC_LIBTOOL_POSTDEP_PREDEP
9840
9841
# AC_LIBTOOL_LANG_F77_CONFIG
9842
# --------------------------
9843
# Ensure that the configuration vars for the C compiler are
9844
# suitably defined.  Those variables are subsequently used by
9845
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9846
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9847
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
9848
[AC_REQUIRE([AC_PROG_F77])
9849
AC_LANG_PUSH(Fortran 77)
9850
9851
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9852
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9853
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9854
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9855
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9856
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9857
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9858
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9859
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9860
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9861
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
9862
_LT_AC_TAGVAR(module_cmds, $1)=
9863
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
9864
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9865
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9866
_LT_AC_TAGVAR(no_undefined_flag, $1)=
9867
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9868
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9869
9870
# Source file extension for f77 test sources.
9871
ac_ext=f
9872
9873
# Object file extension for compiled f77 test sources.
9874
objext=o
9875
_LT_AC_TAGVAR(objext, $1)=$objext
9876
9877
# Code to be used in simple compile tests
9878
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
9879
9880
# Code to be used in simple link tests
9881
lt_simple_link_test_code="      program t\n      end\n"
9882
9883
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9884
_LT_AC_SYS_COMPILER
9885
9886
# save warnings/boilerplate of simple test code
9887
_LT_COMPILER_BOILERPLATE
9888
_LT_LINKER_BOILERPLATE
9889
9890
# Allow CC to be a program name with arguments.
9891
lt_save_CC="$CC"
9892
CC=${F77-"f77"}
9893
compiler=$CC
9894
_LT_AC_TAGVAR(compiler, $1)=$CC
9895
_LT_CC_BASENAME([$compiler])
9896
9897
AC_MSG_CHECKING([if libtool supports shared libraries])
9898
AC_MSG_RESULT([$can_build_shared])
9899
9900
AC_MSG_CHECKING([whether to build shared libraries])
9901
test "$can_build_shared" = "no" && enable_shared=no
9902
9903
# On AIX, shared libraries and static libraries use the same namespace, and
9904
# are all built from PIC.
9905
case $host_os in
9906
aix3*)
9907
  test "$enable_shared" = yes && enable_static=no
9908
  if test -n "$RANLIB"; then
9909
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
9910
    postinstall_cmds='$RANLIB $lib'
9911
  fi
9912
  ;;
9913
aix4* | aix5*)
9914
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9915
    test "$enable_shared" = yes && enable_static=no
9916
  fi
9917
  ;;
9918
esac
9919
AC_MSG_RESULT([$enable_shared])
9920
9921
AC_MSG_CHECKING([whether to build static libraries])
9922
# Make sure either enable_shared or enable_static is yes.
9923
test "$enable_shared" = yes || enable_static=yes
9924
AC_MSG_RESULT([$enable_static])
9925
9926
_LT_AC_TAGVAR(GCC, $1)="$G77"
9927
_LT_AC_TAGVAR(LD, $1)="$LD"
9928
9929
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9930
AC_LIBTOOL_PROG_CC_C_O($1)
9931
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9932
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9933
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9934
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9935
9936
AC_LIBTOOL_CONFIG($1)
9937
9938
AC_LANG_POP
9939
CC="$lt_save_CC"
9940
])# AC_LIBTOOL_LANG_F77_CONFIG
9941
9942
9943
# AC_LIBTOOL_LANG_GCJ_CONFIG
9944
# --------------------------
9945
# Ensure that the configuration vars for the C compiler are
9946
# suitably defined.  Those variables are subsequently used by
9947
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9948
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9949
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9950
[AC_LANG_SAVE
9951
9952
# Source file extension for Java test sources.
9953
ac_ext=java
9954
9955
# Object file extension for compiled Java test sources.
9956
objext=o
9957
_LT_AC_TAGVAR(objext, $1)=$objext
9958
9959
# Code to be used in simple compile tests
9960
lt_simple_compile_test_code="class foo {}\n"
9961
9962
# Code to be used in simple link tests
9963
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
9964
9965
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9966
_LT_AC_SYS_COMPILER
9967
9968
# save warnings/boilerplate of simple test code
9969
_LT_COMPILER_BOILERPLATE
9970
_LT_LINKER_BOILERPLATE
9971
9972
# Allow CC to be a program name with arguments.
9973
lt_save_CC="$CC"
9974
CC=${GCJ-"gcj"}
9975
compiler=$CC
9976
_LT_AC_TAGVAR(compiler, $1)=$CC
9977
_LT_CC_BASENAME([$compiler])
9978
9979
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9980
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9981
9982
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9983
9984
## CAVEAT EMPTOR:
9985
## There is no encapsulation within the following macros, do not change
9986
## the running order or otherwise move them around unless you know exactly
9987
## what you are doing...
9988
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9989
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9990
AC_LIBTOOL_PROG_CC_C_O($1)
9991
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9992
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9993
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9994
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9995
9996
AC_LIBTOOL_CONFIG($1)
9997
9998
AC_LANG_RESTORE
9999
CC="$lt_save_CC"
10000
])# AC_LIBTOOL_LANG_GCJ_CONFIG
10001
10002
10003
# AC_LIBTOOL_LANG_RC_CONFIG
10004
# -------------------------
10005
# Ensure that the configuration vars for the Windows resource compiler are
10006
# suitably defined.  Those variables are subsequently used by
10007
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
10008
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
10009
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
10010
[AC_LANG_SAVE
10011
10012
# Source file extension for RC test sources.
10013
ac_ext=rc
10014
10015
# Object file extension for compiled RC test sources.
10016
objext=o
10017
_LT_AC_TAGVAR(objext, $1)=$objext
10018
10019
# Code to be used in simple compile tests
10020
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
10021
10022
# Code to be used in simple link tests
10023
lt_simple_link_test_code="$lt_simple_compile_test_code"
10024
10025
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
10026
_LT_AC_SYS_COMPILER
10027
10028
# save warnings/boilerplate of simple test code
10029
_LT_COMPILER_BOILERPLATE
10030
_LT_LINKER_BOILERPLATE
10031
10032
# Allow CC to be a program name with arguments.
10033
lt_save_CC="$CC"
10034
CC=${RC-"windres"}
10035
compiler=$CC
10036
_LT_AC_TAGVAR(compiler, $1)=$CC
10037
_LT_CC_BASENAME([$compiler])
10038
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
10039
10040
AC_LIBTOOL_CONFIG($1)
10041
10042
AC_LANG_RESTORE
10043
CC="$lt_save_CC"
10044
])# AC_LIBTOOL_LANG_RC_CONFIG
10045
10046
10047
# AC_LIBTOOL_CONFIG([TAGNAME])
10048
# ----------------------------
10049
# If TAGNAME is not passed, then create an initial libtool script
10050
# with a default configuration from the untagged config vars.  Otherwise
10051
# add code to config.status for appending the configuration named by
10052
# TAGNAME from the matching tagged config vars.
10053
AC_DEFUN([AC_LIBTOOL_CONFIG],
10054
[# The else clause should only fire when bootstrapping the
10055
# libtool distribution, otherwise you forgot to ship ltmain.sh
10056
# with your package, and you will get complaints that there are
10057
# no rules to generate ltmain.sh.
10058
if test -f "$ltmain"; then
10059
  # See if we are running on zsh, and set the options which allow our commands through
10060
  # without removal of \ escapes.
10061
  if test -n "${ZSH_VERSION+set}" ; then
10062
    setopt NO_GLOB_SUBST
10063
  fi
10064
  # Now quote all the things that may contain metacharacters while being
10065
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
10066
  # variables and quote the copies for generation of the libtool script.
10067
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
10068
    SED SHELL STRIP \
10069
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10070
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10071
    deplibs_check_method reload_flag reload_cmds need_locks \
10072
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10073
    lt_cv_sys_global_symbol_to_c_name_address \
10074
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10075
    old_postinstall_cmds old_postuninstall_cmds \
10076
    _LT_AC_TAGVAR(compiler, $1) \
10077
    _LT_AC_TAGVAR(CC, $1) \
10078
    _LT_AC_TAGVAR(LD, $1) \
10079
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
10080
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
10081
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
10082
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
10083
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
10084
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
10085
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
10086
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
10087
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
10088
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
10089
    _LT_AC_TAGVAR(predep_objects, $1) \
10090
    _LT_AC_TAGVAR(postdep_objects, $1) \
10091
    _LT_AC_TAGVAR(predeps, $1) \
10092
    _LT_AC_TAGVAR(postdeps, $1) \
10093
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
10094
    _LT_AC_TAGVAR(archive_cmds, $1) \
10095
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
10096
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
10097
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
10098
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
10099
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
10100
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
10101
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
10102
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
10103
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
10104
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
10105
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
10106
    _LT_AC_TAGVAR(module_cmds, $1) \
10107
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
10108
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
10109
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
10110
    _LT_AC_TAGVAR(include_expsyms, $1); do
10111
10112
    case $var in
10113
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
10114
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
10115
    _LT_AC_TAGVAR(archive_cmds, $1) | \
10116
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
10117
    _LT_AC_TAGVAR(module_cmds, $1) | \
10118
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
10119
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
10120
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
10121
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
10122
    postinstall_cmds | postuninstall_cmds | \
10123
    old_postinstall_cmds | old_postuninstall_cmds | \
10124
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10125
      # Double-quote double-evaled strings.
10126
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10127
      ;;
10128
    *)
10129
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10130
      ;;
10131
    esac
10132
  done
10133
10134
  case $lt_echo in
10135
  *'\[$]0 --fallback-echo"')
10136
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
10137
    ;;
10138
  esac
10139
10140
ifelse([$1], [],
10141
  [cfgfile="${ofile}T"
10142
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10143
  $rm -f "$cfgfile"
10144
  AC_MSG_NOTICE([creating $ofile])],
10145
  [cfgfile="$ofile"])
10146
10147
  cat <<__EOF__ >> "$cfgfile"
10148
ifelse([$1], [],
10149
[#! $SHELL
10150
10151
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10152
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10153
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
10154
#
10155
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10156
# Free Software Foundation, Inc.
10157
#
10158
# This file is part of GNU Libtool:
10159
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10160
#
10161
# This program is free software; you can redistribute it and/or modify
10162
# it under the terms of the GNU General Public License as published by
10163
# the Free Software Foundation; either version 2 of the License, or
10164
# (at your option) any later version.
10165
#
10166
# This program is distributed in the hope that it will be useful, but
10167
# WITHOUT ANY WARRANTY; without even the implied warranty of
10168
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10169
# General Public License for more details.
10170
#
10171
# You should have received a copy of the GNU General Public License
10172
# along with this program; if not, write to the Free Software
10173
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10174
#
10175
# As a special exception to the GNU General Public License, if you
10176
# distribute this file as part of a program that contains a
10177
# configuration script generated by Autoconf, you may include it under
10178
# the same distribution terms that you use for the rest of that program.
10179
10180
# A sed program that does not truncate output.
10181
SED=$lt_SED
10182
10183
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
10184
Xsed="$SED -e 1s/^X//"
10185
10186
# The HP-UX ksh and POSIX shell print the target directory to stdout
10187
# if CDPATH is set.
10188
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10189
10190
# The names of the tagged configurations supported by this script.
10191
available_tags=
10192
10193
# ### BEGIN LIBTOOL CONFIG],
10194
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
10195
10196
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10197
10198
# Shell to use when invoking shell scripts.
10199
SHELL=$lt_SHELL
10200
10201
# Whether or not to build shared libraries.
10202
build_libtool_libs=$enable_shared
10203
10204
# Whether or not to build static libraries.
10205
build_old_libs=$enable_static
10206
10207
# Whether or not to add -lc for building shared libraries.
10208
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
10209
10210
# Whether or not to disallow shared libs when runtime libs are static
10211
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
10212
10213
# Whether or not to optimize for fast installation.
10214
fast_install=$enable_fast_install
10215
10216
# The host system.
10217
host_alias=$host_alias
10218
host=$host
10219
host_os=$host_os
10220
10221
# The build system.
10222
build_alias=$build_alias
10223
build=$build
10224
build_os=$build_os
10225
10226
# An echo program that does not interpret backslashes.
10227
echo=$lt_echo
10228
10229
# The archiver.
10230
AR=$lt_AR
10231
AR_FLAGS=$lt_AR_FLAGS
10232
10233
# A C compiler.
10234
LTCC=$lt_LTCC
10235
10236
# LTCC compiler flags.
10237
LTCFLAGS=$lt_LTCFLAGS
10238
10239
# A language-specific compiler.
10240
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
10241
10242
# Is the compiler the GNU C compiler?
10243
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
10244
10245
# An ERE matcher.
10246
EGREP=$lt_EGREP
10247
10248
# The linker used to build libraries.
10249
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
10250
10251
# Whether we need hard or soft links.
10252
LN_S=$lt_LN_S
10253
10254
# A BSD-compatible nm program.
10255
NM=$lt_NM
10256
10257
# A symbol stripping program
10258
STRIP=$lt_STRIP
10259
10260
# Used to examine libraries when file_magic_cmd begins "file"
10261
MAGIC_CMD=$MAGIC_CMD
10262
10263
# Used on cygwin: DLL creation program.
10264
DLLTOOL="$DLLTOOL"
10265
10266
# Used on cygwin: object dumper.
10267
OBJDUMP="$OBJDUMP"
10268
10269
# Used on cygwin: assembler.
10270
AS="$AS"
10271
10272
# The name of the directory that contains temporary libtool files.
10273
objdir=$objdir
10274
10275
# How to create reloadable object files.
10276
reload_flag=$lt_reload_flag
10277
reload_cmds=$lt_reload_cmds
10278
10279
# How to pass a linker flag through the compiler.
10280
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
10281
10282
# Object file suffix (normally "o").
10283
objext="$ac_objext"
10284
10285
# Old archive suffix (normally "a").
10286
libext="$libext"
10287
10288
# Shared library suffix (normally ".so").
10289
shrext_cmds='$shrext_cmds'
10290
10291
# Executable file suffix (normally "").
10292
exeext="$exeext"
10293
10294
# Additional compiler flags for building library objects.
10295
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
10296
pic_mode=$pic_mode
10297
10298
# What is the maximum length of a command?
10299
max_cmd_len=$lt_cv_sys_max_cmd_len
10300
10301
# Does compiler simultaneously support -c and -o options?
10302
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
10303
10304
# Must we lock files when doing compilation?
10305
need_locks=$lt_need_locks
10306
10307
# Do we need the lib prefix for modules?
10308
need_lib_prefix=$need_lib_prefix
10309
10310
# Do we need a version for libraries?
10311
need_version=$need_version
10312
10313
# Whether dlopen is supported.
10314
dlopen_support=$enable_dlopen
10315
10316
# Whether dlopen of programs is supported.
10317
dlopen_self=$enable_dlopen_self
10318
10319
# Whether dlopen of statically linked programs is supported.
10320
dlopen_self_static=$enable_dlopen_self_static
10321
10322
# Compiler flag to prevent dynamic linking.
10323
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
10324
10325
# Compiler flag to turn off builtin functions.
10326
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
10327
10328
# Compiler flag to allow reflexive dlopens.
10329
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
10330
10331
# Compiler flag to generate shared objects directly from archives.
10332
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
10333
10334
# Compiler flag to generate thread-safe objects.
10335
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
10336
10337
# Library versioning type.
10338
version_type=$version_type
10339
10340
# Format of library name prefix.
10341
libname_spec=$lt_libname_spec
10342
10343
# List of archive names.  First name is the real one, the rest are links.
10344
# The last name is the one that the linker finds with -lNAME.
10345
library_names_spec=$lt_library_names_spec
10346
10347
# The coded name of the library, if different from the real name.
10348
soname_spec=$lt_soname_spec
10349
10350
# Commands used to build and install an old-style archive.
10351
RANLIB=$lt_RANLIB
10352
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
10353
old_postinstall_cmds=$lt_old_postinstall_cmds
10354
old_postuninstall_cmds=$lt_old_postuninstall_cmds
10355
10356
# Create an old-style archive from a shared archive.
10357
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
10358
10359
# Create a temporary old-style archive to link instead of a shared archive.
10360
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
10361
10362
# Commands used to build and install a shared archive.
10363
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
10364
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
10365
postinstall_cmds=$lt_postinstall_cmds
10366
postuninstall_cmds=$lt_postuninstall_cmds
10367
10368
# Commands used to build a loadable module (assumed same as above if empty)
10369
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
10370
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
10371
10372
# Commands to strip libraries.
10373
old_striplib=$lt_old_striplib
10374
striplib=$lt_striplib
10375
10376
# Dependencies to place before the objects being linked to create a
10377
# shared library.
10378
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
10379
10380
# Dependencies to place after the objects being linked to create a
10381
# shared library.
10382
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
10383
10384
# Dependencies to place before the objects being linked to create a
10385
# shared library.
10386
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
10387
10388
# Dependencies to place after the objects being linked to create a
10389
# shared library.
10390
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
10391
10392
# The library search path used internally by the compiler when linking
10393
# a shared library.
10394
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
10395
10396
# Method to check whether dependent libraries are shared objects.
10397
deplibs_check_method=$lt_deplibs_check_method
10398
10399
# Command to use when deplibs_check_method == file_magic.
10400
file_magic_cmd=$lt_file_magic_cmd
10401
10402
# Flag that allows shared libraries with undefined symbols to be built.
10403
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
10404
10405
# Flag that forces no undefined symbols.
10406
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
10407
10408
# Commands used to finish a libtool library installation in a directory.
10409
finish_cmds=$lt_finish_cmds
10410
10411
# Same as above, but a single script fragment to be evaled but not shown.
10412
finish_eval=$lt_finish_eval
10413
10414
# Take the output of nm and produce a listing of raw symbols and C names.
10415
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10416
10417
# Transform the output of nm in a proper C declaration
10418
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10419
10420
# Transform the output of nm in a C name address pair
10421
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10422
10423
# This is the shared library runtime path variable.
10424
runpath_var=$runpath_var
10425
10426
# This is the shared library path variable.
10427
shlibpath_var=$shlibpath_var
10428
10429
# Is shlibpath searched before the hard-coded library search path?
10430
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10431
10432
# How to hardcode a shared library path into an executable.
10433
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
10434
10435
# Whether we should hardcode library paths into libraries.
10436
hardcode_into_libs=$hardcode_into_libs
10437
10438
# Flag to hardcode \$libdir into a binary during linking.
10439
# This must work even if \$libdir does not exist.
10440
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
10441
10442
# If ld is used when linking, flag to hardcode \$libdir into
10443
# a binary during linking. This must work even if \$libdir does
10444
# not exist.
10445
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
10446
10447
# Whether we need a single -rpath flag with a separated argument.
10448
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
10449
10450
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10451
# resulting binary.
10452
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
10453
10454
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10455
# resulting binary.
10456
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
10457
10458
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10459
# the resulting binary.
10460
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
10461
10462
# Set to yes if building a shared library automatically hardcodes DIR into the library
10463
# and all subsequent libraries and executables linked against it.
10464
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
10465
10466
# Variables whose values should be saved in libtool wrapper scripts and
10467
# restored at relink time.
10468
variables_saved_for_relink="$variables_saved_for_relink"
10469
10470
# Whether libtool must link a program against all its dependency libraries.
10471
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
10472
10473
# Compile-time system search path for libraries
10474
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10475
10476
# Run-time system search path for libraries
10477
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10478
10479
# Fix the shell variable \$srcfile for the compiler.
10480
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
10481
10482
# Set to yes if exported symbols are required.
10483
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
10484
10485
# The commands to list exported symbols.
10486
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
10487
10488
# The commands to extract the exported symbol list from a shared archive.
10489
extract_expsyms_cmds=$lt_extract_expsyms_cmds
10490
10491
# Symbols that should not be listed in the preloaded symbols.
10492
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
10493
10494
# Symbols that must always be exported.
10495
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
10496
10497
ifelse([$1],[],
10498
[# ### END LIBTOOL CONFIG],
10499
[# ### END LIBTOOL TAG CONFIG: $tagname])
10500
10501
__EOF__
10502
10503
ifelse([$1],[], [
10504
  case $host_os in
10505
  aix3*)
10506
    cat <<\EOF >> "$cfgfile"
10507
10508
# AIX sometimes has problems with the GCC collect2 program.  For some
10509
# reason, if we set the COLLECT_NAMES environment variable, the problems
10510
# vanish in a puff of smoke.
10511
if test "X${COLLECT_NAMES+set}" != Xset; then
10512
  COLLECT_NAMES=
10513
  export COLLECT_NAMES
10514
fi
10515
EOF
10516
    ;;
10517
  esac
10518
10519
  # We use sed instead of cat because bash on DJGPP gets confused if
10520
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10521
  # text mode, it properly converts lines to CR/LF.  This bash problem
10522
  # is reportedly fixed, but why not run on old versions too?
10523
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10524
10525
  mv -f "$cfgfile" "$ofile" || \
10526
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10527
  chmod +x "$ofile"
10528
])
10529
else
10530
  # If there is no Makefile yet, we rely on a make rule to execute
10531
  # `config.status --recheck' to rerun these tests and create the
10532
  # libtool script then.
10533
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10534
  if test -f "$ltmain_in"; then
10535
    test -f Makefile && make "$ltmain"
10536
  fi
10537
fi
10538
])# AC_LIBTOOL_CONFIG
10539
10540
10541
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
10542
# -------------------------------------------
10543
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
10544
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10545
10546
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
10547
10548
if test "$GCC" = yes; then
10549
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
10550
10551
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
10552
    lt_cv_prog_compiler_rtti_exceptions,
10553
    [-fno-rtti -fno-exceptions], [],
10554
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
10555
fi
10556
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
10557
10558
10559
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10560
# ---------------------------------
10561
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
10562
[AC_REQUIRE([AC_CANONICAL_HOST])
10563
AC_REQUIRE([AC_PROG_NM])
10564
AC_REQUIRE([AC_OBJEXT])
10565
# Check for command to grab the raw symbol name followed by C symbol from nm.
10566
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
10567
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
10568
[
10569
# These are sane defaults that work on at least a few old systems.
10570
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
10571
10572
# Character class describing NM global symbol codes.
10573
symcode='[[BCDEGRST]]'
10574
10575
# Regexp to match symbols that can be accessed directly from C.
10576
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
10577
10578
# Transform an extracted symbol line into a proper C declaration
10579
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
10580
10581
# Transform an extracted symbol line into symbol name and symbol address
10582
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'"
10583
10584
# Define system-specific variables.
10585
case $host_os in
10586
aix*)
10587
  symcode='[[BCDT]]'
10588
  ;;
10589
cygwin* | mingw* | pw32*)
10590
  symcode='[[ABCDGISTW]]'
10591
  ;;
10592
hpux*) # Its linker distinguishes data from code symbols
10593
  if test "$host_cpu" = ia64; then
10594
    symcode='[[ABCDEGRST]]'
10595
  fi
10596
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10597
  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'"
10598
  ;;
10599
linux* | k*bsd*-gnu)
10600
  if test "$host_cpu" = ia64; then
10601
    symcode='[[ABCDGIRSTW]]'
10602
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10603
    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'"
10604
  fi
10605
  ;;
10606
irix* | nonstopux*)
10607
  symcode='[[BCDEGRST]]'
10608
  ;;
10609
osf*)
10610
  symcode='[[BCDEGQRST]]'
10611
  ;;
10612
solaris*)
10613
  symcode='[[BDRT]]'
10614
  ;;
10615
sco3.2v5*)
10616
  symcode='[[DT]]'
10617
  ;;
10618
sysv4.2uw2*)
10619
  symcode='[[DT]]'
10620
  ;;
10621
sysv5* | sco5v6* | unixware* | OpenUNIX*)
10622
  symcode='[[ABDT]]'
10623
  ;;
10624
sysv4)
10625
  symcode='[[DFNSTU]]'
10626
  ;;
10627
esac
10628
10629
# Handle CRLF in mingw tool chain
10630
opt_cr=
10631
case $build_os in
10632
mingw*)
10633
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10634
  ;;
10635
esac
10636
10637
# If we're using GNU nm, then use its standard symbol codes.
10638
case `$NM -V 2>&1` in
10639
*GNU* | *'with BFD'*)
10640
  symcode='[[ABCDGIRSTW]]' ;;
10641
esac
10642
10643
# Try without a prefix undercore, then with it.
10644
for ac_symprfx in "" "_"; do
10645
10646
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
10647
  symxfrm="\\1 $ac_symprfx\\2 \\2"
10648
10649
  # Write the raw and C identifiers.
10650
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
10651
10652
  # Check to see that the pipe works correctly.
10653
  pipe_works=no
10654
10655
  rm -f conftest*
10656
  cat > conftest.$ac_ext <<EOF
10657
#ifdef __cplusplus
10658
extern "C" {
10659
#endif
10660
char nm_test_var;
10661
void nm_test_func(){}
10662
#ifdef __cplusplus
10663
}
10664
#endif
10665
int main(){nm_test_var='a';nm_test_func();return(0);}
10666
EOF
10667
10668
  if AC_TRY_EVAL(ac_compile); then
10669
    # Now try to grab the symbols.
10670
    nlist=conftest.nm
10671
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10672
      # Try sorting and uniquifying the output.
10673
      if sort "$nlist" | uniq > "$nlist"T; then
10674
	mv -f "$nlist"T "$nlist"
10675
      else
10676
	rm -f "$nlist"T
10677
      fi
10678
10679
      # Make sure that we snagged all the symbols we need.
10680
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
10681
	if grep ' nm_test_func$' "$nlist" >/dev/null; then
10682
	  cat <<EOF > conftest.$ac_ext
10683
#ifdef __cplusplus
10684
extern "C" {
10685
#endif
10686
10687
EOF
10688
	  # Now generate the symbol file.
10689
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10690
10691
	  cat <<EOF >> conftest.$ac_ext
10692
#if defined (__STDC__) && __STDC__
10693
# define lt_ptr_t void *
10694
#else
10695
# define lt_ptr_t char *
10696
# define const
10697
#endif
10698
10699
/* The mapping between symbol names and symbols. */
10700
const struct {
10701
  const char *name;
10702
  lt_ptr_t address;
10703
}
10704
lt_preloaded_symbols[[]] =
10705
{
10706
EOF
10707
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10708
	  cat <<\EOF >> conftest.$ac_ext
10709
  {0, (lt_ptr_t) 0}
10710
};
10711
10712
#ifdef __cplusplus
10713
}
10714
#endif
10715
EOF
10716
	  # Now try linking the two files.
10717
	  mv conftest.$ac_objext conftstm.$ac_objext
10718
	  lt_save_LIBS="$LIBS"
10719
	  lt_save_CFLAGS="$CFLAGS"
10720
	  LIBS="conftstm.$ac_objext"
10721
	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10722
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10723
	    pipe_works=yes
10724
	  fi
10725
	  LIBS="$lt_save_LIBS"
10726
	  CFLAGS="$lt_save_CFLAGS"
10727
	else
10728
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10729
	fi
10730
      else
10731
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10732
      fi
10733
    else
10734
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10735
    fi
10736
  else
10737
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10738
    cat conftest.$ac_ext >&5
10739
  fi
10740
  rm -f conftest* conftst*
10741
10742
  # Do not use the global_symbol_pipe unless it works.
10743
  if test "$pipe_works" = yes; then
10744
    break
10745
  else
10746
    lt_cv_sys_global_symbol_pipe=
10747
  fi
10748
done
10749
])
10750
if test -z "$lt_cv_sys_global_symbol_pipe"; then
10751
  lt_cv_sys_global_symbol_to_cdecl=
10752
fi
10753
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10754
  AC_MSG_RESULT(failed)
10755
else
10756
  AC_MSG_RESULT(ok)
10757
fi
10758
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10759
10760
10761
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
10762
# ---------------------------------------
10763
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
10764
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10765
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10766
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10767
10768
AC_MSG_CHECKING([for $compiler option to produce PIC])
10769
 ifelse([$1],[CXX],[
10770
  # C++ specific cases for pic, static, wl, etc.
10771
  if test "$GXX" = yes; then
10772
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10773
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10774
10775
    case $host_os in
10776
    aix*)
10777
      # All AIX code is PIC.
10778
      if test "$host_cpu" = ia64; then
10779
	# AIX 5 now supports IA64 processor
10780
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10781
      fi
10782
      ;;
10783
    amigaos*)
10784
      # FIXME: we need at least 68020 code to build shared libraries, but
10785
      # adding the `-m68020' flag to GCC prevents building anything better,
10786
      # like `-m68040'.
10787
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10788
      ;;
10789
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10790
      # PIC is the default for these OSes.
10791
      ;;
10792
    mingw* | os2* | pw32*)
10793
      # This hack is so that the source file can tell whether it is being
10794
      # built for inclusion in a dll (and should export symbols for example).
10795
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10796
      ;;
10797
    darwin* | rhapsody*)
10798
      # PIC is the default on this platform
10799
      # Common symbols not allowed in MH_DYLIB files
10800
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10801
      ;;
10802
    *djgpp*)
10803
      # DJGPP does not support shared libraries at all
10804
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10805
      ;;
10806
    interix3*)
10807
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10808
      # Instead, we relocate shared libraries at runtime.
10809
      ;;
10810
    sysv4*MP*)
10811
      if test -d /usr/nec; then
10812
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10813
      fi
10814
      ;;
10815
    hpux*)
10816
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10817
      # not for PA HP-UX.
10818
      case $host_cpu in
10819
      hppa*64*|ia64*)
10820
	;;
10821
      *)
10822
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10823
	;;
10824
      esac
10825
      ;;
10826
    *)
10827
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10828
      ;;
10829
    esac
10830
  else
10831
    case $host_os in
10832
      aix4* | aix5*)
10833
	# All AIX code is PIC.
10834
	if test "$host_cpu" = ia64; then
10835
	  # AIX 5 now supports IA64 processor
10836
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10837
	else
10838
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10839
	fi
10840
	;;
10841
      chorus*)
10842
	case $cc_basename in
10843
	cxch68*)
10844
	  # Green Hills C++ Compiler
10845
	  # _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"
10846
	  ;;
10847
	esac
10848
	;;
10849
       darwin*)
10850
         # PIC is the default on this platform
10851
         # Common symbols not allowed in MH_DYLIB files
10852
         case $cc_basename in
10853
           xlc*)
10854
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
10855
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10856
           ;;
10857
         esac
10858
       ;;
10859
      dgux*)
10860
	case $cc_basename in
10861
	  ec++*)
10862
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10863
	    ;;
10864
	  ghcx*)
10865
	    # Green Hills C++ Compiler
10866
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10867
	    ;;
10868
	  *)
10869
	    ;;
10870
	esac
10871
	;;
10872
      freebsd* | dragonfly*)
10873
	# FreeBSD uses GNU C++
10874
	;;
10875
      hpux9* | hpux10* | hpux11*)
10876
	case $cc_basename in
10877
	  CC*)
10878
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10879
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10880
	    if test "$host_cpu" != ia64; then
10881
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10882
	    fi
10883
	    ;;
10884
	  aCC*)
10885
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10886
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10887
	    case $host_cpu in
10888
	    hppa*64*|ia64*)
10889
	      # +Z the default
10890
	      ;;
10891
	    *)
10892
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10893
	      ;;
10894
	    esac
10895
	    ;;
10896
	  *)
10897
	    ;;
10898
	esac
10899
	;;
10900
      interix*)
10901
	# This is c89, which is MS Visual C++ (no shared libs)
10902
	# Anyone wants to do a port?
10903
	;;
10904
      irix5* | irix6* | nonstopux*)
10905
	case $cc_basename in
10906
	  CC*)
10907
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10908
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10909
	    # CC pic flag -KPIC is the default.
10910
	    ;;
10911
	  *)
10912
	    ;;
10913
	esac
10914
	;;
10915
      linux* | k*bsd*-gnu)
10916
	case $cc_basename in
10917
	  KCC*)
10918
	    # KAI C++ Compiler
10919
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10920
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10921
	    ;;
10922
	  icpc* | ecpc*)
10923
	    # Intel C++
10924
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10925
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10926
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10927
	    ;;
10928
	  pgCC*)
10929
	    # Portland Group C++ compiler.
10930
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10931
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
10932
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10933
	    ;;
10934
	  cxx*)
10935
	    # Compaq C++
10936
	    # Make sure the PIC flag is empty.  It appears that all Alpha
10937
	    # Linux and Compaq Tru64 Unix objects are PIC.
10938
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10939
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10940
	    ;;
10941
	  *)
10942
	    ;;
10943
	esac
10944
	;;
10945
      lynxos*)
10946
	;;
10947
      m88k*)
10948
	;;
10949
      mvs*)
10950
	case $cc_basename in
10951
	  cxx*)
10952
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10953
	    ;;
10954
	  *)
10955
	    ;;
10956
	esac
10957
	;;
10958
      netbsd* | netbsdelf*-gnu)
10959
	;;
10960
      osf3* | osf4* | osf5*)
10961
	case $cc_basename in
10962
	  KCC*)
10963
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10964
	    ;;
10965
	  RCC*)
10966
	    # Rational C++ 2.4.1
10967
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10968
	    ;;
10969
	  cxx*)
10970
	    # Digital/Compaq C++
10971
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10972
	    # Make sure the PIC flag is empty.  It appears that all Alpha
10973
	    # Linux and Compaq Tru64 Unix objects are PIC.
10974
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10975
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10976
	    ;;
10977
	  *)
10978
	    ;;
10979
	esac
10980
	;;
10981
      psos*)
10982
	;;
10983
      solaris*)
10984
	case $cc_basename in
10985
	  CC*)
10986
	    # Sun C++ 4.2, 5.x and Centerline C++
10987
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10988
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10989
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10990
	    ;;
10991
	  gcx*)
10992
	    # Green Hills C++ Compiler
10993
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10994
	    ;;
10995
	  *)
10996
	    ;;
10997
	esac
10998
	;;
10999
      sunos4*)
11000
	case $cc_basename in
11001
	  CC*)
11002
	    # Sun C++ 4.x
11003
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
11004
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11005
	    ;;
11006
	  lcc*)
11007
	    # Lucid
11008
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
11009
	    ;;
11010
	  *)
11011
	    ;;
11012
	esac
11013
	;;
11014
      tandem*)
11015
	case $cc_basename in
11016
	  NCC*)
11017
	    # NonStop-UX NCC 3.20
11018
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11019
	    ;;
11020
	  *)
11021
	    ;;
11022
	esac
11023
	;;
11024
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11025
	case $cc_basename in
11026
	  CC*)
11027
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11028
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11029
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11030
	    ;;
11031
	esac
11032
	;;
11033
      vxworks*)
11034
	;;
11035
      *)
11036
	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11037
	;;
11038
    esac
11039
  fi
11040
],
11041
[
11042
  if test "$GCC" = yes; then
11043
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11044
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
11045
11046
    case $host_os in
11047
      aix*)
11048
      # All AIX code is PIC.
11049
      if test "$host_cpu" = ia64; then
11050
	# AIX 5 now supports IA64 processor
11051
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11052
      fi
11053
      ;;
11054
11055
    amigaos*)
11056
      # FIXME: we need at least 68020 code to build shared libraries, but
11057
      # adding the `-m68020' flag to GCC prevents building anything better,
11058
      # like `-m68040'.
11059
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
11060
      ;;
11061
11062
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11063
      # PIC is the default for these OSes.
11064
      ;;
11065
11066
    mingw* | pw32* | os2*)
11067
      # This hack is so that the source file can tell whether it is being
11068
      # built for inclusion in a dll (and should export symbols for example).
11069
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
11070
      ;;
11071
11072
    darwin* | rhapsody*)
11073
      # PIC is the default on this platform
11074
      # Common symbols not allowed in MH_DYLIB files
11075
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
11076
      ;;
11077
11078
    interix3*)
11079
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
11080
      # Instead, we relocate shared libraries at runtime.
11081
      ;;
11082
11083
    msdosdjgpp*)
11084
      # Just because we use GCC doesn't mean we suddenly get shared libraries
11085
      # on systems that don't support them.
11086
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11087
      enable_shared=no
11088
      ;;
11089
11090
    sysv4*MP*)
11091
      if test -d /usr/nec; then
11092
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
11093
      fi
11094
      ;;
11095
11096
    hpux*)
11097
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11098
      # not for PA HP-UX.
11099
      case $host_cpu in
11100
      hppa*64*|ia64*)
11101
	# +Z the default
11102
	;;
11103
      *)
11104
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
11105
	;;
11106
      esac
11107
      ;;
11108
11109
    *)
11110
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
11111
      ;;
11112
    esac
11113
  else
11114
    # PORTME Check for flag to pass linker flags through the system compiler.
11115
    case $host_os in
11116
    aix*)
11117
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11118
      if test "$host_cpu" = ia64; then
11119
	# AIX 5 now supports IA64 processor
11120
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11121
      else
11122
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
11123
      fi
11124
      ;;
11125
      darwin*)
11126
        # PIC is the default on this platform
11127
        # Common symbols not allowed in MH_DYLIB files
11128
       case $cc_basename in
11129
         xlc*)
11130
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
11131
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11132
         ;;
11133
       esac
11134
       ;;
11135
11136
    mingw* | pw32* | os2*)
11137
      # This hack is so that the source file can tell whether it is being
11138
      # built for inclusion in a dll (and should export symbols for example).
11139
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
11140
      ;;
11141
11142
    hpux9* | hpux10* | hpux11*)
11143
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11144
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11145
      # not for PA HP-UX.
11146
      case $host_cpu in
11147
      hppa*64*|ia64*)
11148
	# +Z the default
11149
	;;
11150
      *)
11151
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
11152
	;;
11153
      esac
11154
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
11155
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
11156
      ;;
11157
11158
    irix5* | irix6* | nonstopux*)
11159
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11160
      # PIC (with -KPIC) is the default.
11161
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
11162
      ;;
11163
11164
    newsos6)
11165
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11166
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11167
      ;;
11168
11169
    linux* | k*bsd*-gnu)
11170
      case $cc_basename in
11171
      icc* | ecc*)
11172
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11173
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11174
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
11175
        ;;
11176
      pgcc* | pgf77* | pgf90* | pgf95*)
11177
        # Portland Group compilers (*not* the Pentium gcc compiler,
11178
	# which looks to be a dead project)
11179
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11180
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
11181
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11182
        ;;
11183
      ccc*)
11184
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11185
        # All Alpha code is PIC.
11186
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
11187
        ;;
11188
      esac
11189
      ;;
11190
11191
    osf3* | osf4* | osf5*)
11192
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11193
      # All OSF/1 code is PIC.
11194
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
11195
      ;;
11196
11197
    solaris*)
11198
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11199
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11200
      case $cc_basename in
11201
      f77* | f90* | f95*)
11202
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
11203
      *)
11204
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
11205
      esac
11206
      ;;
11207
11208
    sunos4*)
11209
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
11210
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
11211
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11212
      ;;
11213
11214
    sysv4 | sysv4.2uw2* | sysv4.3*)
11215
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11216
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11217
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11218
      ;;
11219
11220
    sysv4*MP*)
11221
      if test -d /usr/nec ;then
11222
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
11223
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11224
      fi
11225
      ;;
11226
11227
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11228
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11229
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11230
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11231
      ;;
11232
11233
    unicos*)
11234
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11235
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11236
      ;;
11237
11238
    uts4*)
11239
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
11240
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11241
      ;;
11242
11243
    *)
11244
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11245
      ;;
11246
    esac
11247
  fi
11248
])
11249
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
11250
11251
#
11252
# Check to make sure the PIC flag actually works.
11253
#
11254
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
11255
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
11256
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
11257
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
11258
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
11259
     "" | " "*) ;;
11260
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
11261
     esac],
11262
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
11263
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
11264
fi
11265
case $host_os in
11266
  # For platforms which do not support PIC, -DPIC is meaningless:
11267
  *djgpp*)
11268
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
11269
    ;;
11270
  *)
11271
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
11272
    ;;
11273
esac
11274
11275
#
11276
# Check to make sure the static flag actually works.
11277
#
11278
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
11279
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
11280
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
11281
  $lt_tmp_static_flag,
11282
  [],
11283
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
11284
])
11285
11286
11287
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
11288
# ------------------------------------
11289
# See if the linker supports building shared libraries.
11290
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
11291
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
11292
ifelse([$1],[CXX],[
11293
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11294
  case $host_os in
11295
  aix4* | aix5*)
11296
    # If we're using GNU nm, then we don't want the "-C" option.
11297
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
11298
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
11299
      _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'
11300
    else
11301
      _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'
11302
    fi
11303
    ;;
11304
  pw32*)
11305
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
11306
  ;;
11307
  cygwin* | mingw*)
11308
    _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'
11309
  ;;
11310
  linux* | k*bsd*-gnu)
11311
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
11312
  ;;
11313
  *)
11314
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11315
  ;;
11316
  esac
11317
],[
11318
  runpath_var=
11319
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
11320
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11321
  _LT_AC_TAGVAR(archive_cmds, $1)=
11322
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
11323
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
11324
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
11325
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
11326
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11327
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
11328
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11329
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
11330
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
11331
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
11332
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11333
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11334
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
11335
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
11336
  _LT_AC_TAGVAR(module_cmds, $1)=
11337
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
11338
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
11339
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11340
  # include_expsyms should be a list of space-separated symbols to be *always*
11341
  # included in the symbol list
11342
  _LT_AC_TAGVAR(include_expsyms, $1)=
11343
  # exclude_expsyms can be an extended regexp of symbols to exclude
11344
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
11345
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
11346
  # as well as any symbol that contains `d'.
11347
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
11348
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11349
  # platforms (ab)use it in PIC code, but their linkers get confused if
11350
  # the symbol is explicitly referenced.  Since portable code cannot
11351
  # rely on this symbol name, it's probably fine to never include it in
11352
  # preloaded symbol tables.
11353
  extract_expsyms_cmds=
11354
  # Just being paranoid about ensuring that cc_basename is set.
11355
  _LT_CC_BASENAME([$compiler])
11356
  case $host_os in
11357
  cygwin* | mingw* | pw32*)
11358
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
11359
    # When not using gcc, we currently assume that we are using
11360
    # Microsoft Visual C++.
11361
    if test "$GCC" != yes; then
11362
      with_gnu_ld=no
11363
    fi
11364
    ;;
11365
  interix*)
11366
    # we just hope/assume this is gcc and not c89 (= MSVC++)
11367
    with_gnu_ld=yes
11368
    ;;
11369
  openbsd*)
11370
    with_gnu_ld=no
11371
    ;;
11372
  esac
11373
11374
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
11375
  if test "$with_gnu_ld" = yes; then
11376
    # If archive_cmds runs LD, not CC, wlarc should be empty
11377
    wlarc='${wl}'
11378
11379
    # Set some defaults for GNU ld with shared library support. These
11380
    # are reset later if shared libraries are not supported. Putting them
11381
    # here allows them to be overridden if necessary.
11382
    runpath_var=LD_RUN_PATH
11383
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
11384
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
11385
    # ancient GNU ld didn't support --whole-archive et. al.
11386
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
11387
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11388
      else
11389
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11390
    fi
11391
    supports_anon_versioning=no
11392
    case `$LD -v 2>/dev/null` in
11393
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
11394
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11395
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11396
      *\ 2.11.*) ;; # other 2.11 versions
11397
      *) supports_anon_versioning=yes ;;
11398
    esac
11399
11400
    # See if GNU ld supports shared libraries.
11401
    case $host_os in
11402
    aix3* | aix4* | aix5*)
11403
      # On AIX/PPC, the GNU linker is very broken
11404
      if test "$host_cpu" != ia64; then
11405
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
11406
	cat <<EOF 1>&2
11407
11408
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
11409
*** to be unable to reliably create shared libraries on AIX.
11410
*** Therefore, libtool is disabling shared libraries support.  If you
11411
*** really care for shared libraries, you may want to modify your PATH
11412
*** so that a non-GNU linker is found, and then restart.
11413
11414
EOF
11415
      fi
11416
      ;;
11417
11418
    amigaos*)
11419
      _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)'
11420
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11421
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11422
11423
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
11424
      # that the semantics of dynamic libraries on AmigaOS, at least up
11425
      # to version 4, is to share data among multiple programs linked
11426
      # with the same dynamic library.  Since this doesn't match the
11427
      # behavior of shared libraries on other platforms, we can't use
11428
      # them.
11429
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11430
      ;;
11431
11432
    beos*)
11433
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11434
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11435
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11436
	# support --undefined.  This deserves some investigation.  FIXME
11437
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11438
      else
11439
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
11440
      fi
11441
      ;;
11442
11443
    cygwin* | mingw* | pw32*)
11444
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
11445
      # as there is no search path for DLLs.
11446
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11447
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11448
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
11449
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11450
      _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'
11451
11452
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
11453
        _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'
11454
	# If the export-symbols file already is a .def file (1st line
11455
	# is EXPORTS), use it as is; otherwise, prepend...
11456
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11457
	  cp $export_symbols $output_objdir/$soname.def;
11458
	else
11459
	  echo EXPORTS > $output_objdir/$soname.def;
11460
	  cat $export_symbols >> $output_objdir/$soname.def;
11461
	fi~
11462
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11463
      else
11464
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
11465
      fi
11466
      ;;
11467
11468
    interix3*)
11469
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
11470
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11471
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11472
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11473
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11474
      # Instead, shared libraries are loaded at an image base (0x10000000 by
11475
      # default) and relocated if they conflict, which is a slow very memory
11476
      # consuming and fragmenting process.  To avoid this, we pick a random,
11477
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11478
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11479
      _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'
11480
      _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'
11481
      ;;
11482
11483
    linux* | k*bsd*-gnu)
11484
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11485
	tmp_addflag=
11486
	case $cc_basename,$host_cpu in
11487
	pgcc*)				# Portland Group C compiler
11488
	  _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'
11489
	  tmp_addflag=' $pic_flag'
11490
	  ;;
11491
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
11492
	  _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'
11493
	  tmp_addflag=' $pic_flag -Mnomain' ;;
11494
	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
11495
	  tmp_addflag=' -i_dynamic' ;;
11496
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11497
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11498
	ifc* | ifort*)			# Intel Fortran compiler
11499
	  tmp_addflag=' -nofor_main' ;;
11500
	esac
11501
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11502
11503
	if test $supports_anon_versioning = yes; then
11504
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
11505
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11506
  $echo "local: *; };" >> $output_objdir/$libname.ver~
11507
	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
11508
	fi
11509
	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
11510
      else
11511
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
11512
      fi
11513
      ;;
11514
11515
    netbsd* | netbsdelf*-gnu)
11516
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11517
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11518
	wlarc=
11519
      else
11520
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11521
	_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'
11522
      fi
11523
      ;;
11524
11525
    solaris*)
11526
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
11527
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
11528
	cat <<EOF 1>&2
11529
11530
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11531
*** create shared libraries on Solaris systems.  Therefore, libtool
11532
*** is disabling shared libraries support.  We urge you to upgrade GNU
11533
*** binutils to release 2.9.1 or newer.  Another option is to modify
11534
*** your PATH or compiler configuration so that the native linker is
11535
*** used, and then restart.
11536
11537
EOF
11538
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11539
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11540
	_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'
11541
      else
11542
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
11543
      fi
11544
      ;;
11545
11546
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11547
      case `$LD -v 2>&1` in
11548
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
11549
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
11550
	cat <<_LT_EOF 1>&2
11551
11552
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
11553
*** reliably create shared libraries on SCO systems.  Therefore, libtool
11554
*** is disabling shared libraries support.  We urge you to upgrade GNU
11555
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11556
*** your PATH or compiler configuration so that the native linker is
11557
*** used, and then restart.
11558
11559
_LT_EOF
11560
	;;
11561
	*)
11562
	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11563
	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
11564
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
11565
	    _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'
11566
	  else
11567
	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
11568
	  fi
11569
	;;
11570
      esac
11571
      ;;
11572
11573
    sunos4*)
11574
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11575
      wlarc=
11576
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11577
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11578
      ;;
11579
11580
    *)
11581
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11582
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11583
	_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'
11584
      else
11585
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
11586
      fi
11587
      ;;
11588
    esac
11589
11590
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
11591
      runpath_var=
11592
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11593
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
11594
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11595
    fi
11596
  else
11597
    # PORTME fill in a description of your system's linker (not GNU ld)
11598
    case $host_os in
11599
    aix3*)
11600
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11601
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
11602
      _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'
11603
      # Note: this linker hardcodes the directories in LIBPATH if there
11604
      # are no directories specified by -L.
11605
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11606
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
11607
	# Neither direct hardcoding nor static linking is supported with a
11608
	# broken collect2.
11609
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
11610
      fi
11611
      ;;
11612
11613
    aix4* | aix5*)
11614
      if test "$host_cpu" = ia64; then
11615
	# On IA64, the linker does run time linking by default, so we don't
11616
	# have to do anything special.
11617
	aix_use_runtimelinking=no
11618
	exp_sym_flag='-Bexport'
11619
	no_entry_flag=""
11620
      else
11621
	# If we're using GNU nm, then we don't want the "-C" option.
11622
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
11623
	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
11624
	  _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'
11625
	else
11626
	  _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'
11627
	fi
11628
	aix_use_runtimelinking=no
11629
11630
	# Test if we are trying to use run time linking or normal
11631
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
11632
	# need to do runtime linking.
11633
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
11634
	  for ld_flag in $LDFLAGS; do
11635
  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
11636
  	    aix_use_runtimelinking=yes
11637
  	    break
11638
  	  fi
11639
	  done
11640
	  ;;
11641
	esac
11642
11643
	exp_sym_flag='-bexport'
11644
	no_entry_flag='-bnoentry'
11645
      fi
11646
11647
      # When large executables or shared objects are built, AIX ld can
11648
      # have problems creating the table of contents.  If linking a library
11649
      # or program results in "error TOC overflow" add -mminimal-toc to
11650
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11651
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11652
11653
      _LT_AC_TAGVAR(archive_cmds, $1)=''
11654
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11655
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
11656
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11657
11658
      if test "$GCC" = yes; then
11659
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
11660
	# We only want to do this on AIX 4.2 and lower, the check
11661
	# below for broken collect2 doesn't work under 4.3+
11662
	  collect2name=`${CC} -print-prog-name=collect2`
11663
	  if test -f "$collect2name" && \
11664
  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
11665
	  then
11666
  	  # We have reworked collect2
11667
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11668
	  else
11669
  	  # We have old collect2
11670
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
11671
  	  # It fails to find uninstalled libraries when the uninstalled
11672
  	  # path is not listed in the libpath.  Setting hardcode_minus_L
11673
  	  # to unsupported forces relinking
11674
  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11675
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11676
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
11677
	  fi
11678
	  ;;
11679
	esac
11680
	shared_flag='-shared'
11681
	if test "$aix_use_runtimelinking" = yes; then
11682
	  shared_flag="$shared_flag "'${wl}-G'
11683
	fi
11684
      else
11685
	# not using gcc
11686
	if test "$host_cpu" = ia64; then
11687
  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11688
  	# chokes on -Wl,-G. The following line is correct:
11689
	  shared_flag='-G'
11690
	else
11691
	  if test "$aix_use_runtimelinking" = yes; then
11692
	    shared_flag='${wl}-G'
11693
	  else
11694
	    shared_flag='${wl}-bM:SRE'
11695
	  fi
11696
	fi
11697
      fi
11698
11699
      # It seems that -bexpall does not export symbols beginning with
11700
      # underscore (_), so it is better to generate a list of symbols to export.
11701
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
11702
      if test "$aix_use_runtimelinking" = yes; then
11703
	# Warning - without using the other runtime loading flags (-brtl),
11704
	# -berok will link without error, but may produce a broken library.
11705
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
11706
       # Determine the default libpath from the value encoded in an empty executable.
11707
       _LT_AC_SYS_LIBPATH_AIX
11708
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11709
	_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"
11710
       else
11711
	if test "$host_cpu" = ia64; then
11712
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
11713
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
11714
	  _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"
11715
	else
11716
	 # Determine the default libpath from the value encoded in an empty executable.
11717
	 _LT_AC_SYS_LIBPATH_AIX
11718
	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11719
	  # Warning - without using the other run time loading flags,
11720
	  # -berok will link without error, but may produce a broken library.
11721
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
11722
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
11723
	  # Exported symbols can be pulled into shared objects from archives
11724
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
11725
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11726
	  # This is similar to how AIX traditionally builds its shared libraries.
11727
	  _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'
11728
	fi
11729
      fi
11730
      ;;
11731
11732
    amigaos*)
11733
      _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)'
11734
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11735
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11736
      # see comment about different semantics on the GNU ld section
11737
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11738
      ;;
11739
11740
    bsdi[[45]]*)
11741
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
11742
      ;;
11743
11744
    cygwin* | mingw* | pw32*)
11745
      # When not using gcc, we currently assume that we are using
11746
      # Microsoft Visual C++.
11747
      # hardcode_libdir_flag_spec is actually meaningless, as there is
11748
      # no search path for DLLs.
11749
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
11750
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11751
      # Tell ltmain to make .lib files, not .a files.
11752
      libext=lib
11753
      # Tell ltmain to make .dll files, not .so files.
11754
      shrext_cmds=".dll"
11755
      # FIXME: Setting linknames here is a bad hack.
11756
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
11757
      # The linker will automatically build a .lib file if we build a DLL.
11758
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
11759
      # FIXME: Should let the user specify the lib program.
11760
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
11761
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
11762
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11763
      ;;
11764
11765
    darwin* | rhapsody*)
11766
      case $host_os in
11767
        rhapsody* | darwin1.[[012]])
11768
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
11769
         ;;
11770
       *) # Darwin 1.3 on
11771
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
11772
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
11773
         else
11774
           case ${MACOSX_DEPLOYMENT_TARGET} in
11775
             10.[[012]])
11776
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
11777
               ;;
11778
             10.*)
11779
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
11780
               ;;
11781
           esac
11782
         fi
11783
         ;;
11784
      esac
11785
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11786
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
11787
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
11788
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11789
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
11790
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11791
    if test "$GCC" = yes ; then
11792
    	output_verbose_link_cmd='echo'
11793
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
11794
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
11795
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
11796
      _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}'
11797
      _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}'
11798
    else
11799
      case $cc_basename in
11800
        xlc*)
11801
         output_verbose_link_cmd='echo'
11802
         _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'
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 -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}'
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
          ;;
11808
       *)
11809
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
11810
          ;;
11811
      esac
11812
    fi
11813
      ;;
11814
11815
    dgux*)
11816
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11817
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11818
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11819
      ;;
11820
11821
    freebsd1*)
11822
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11823
      ;;
11824
11825
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11826
    # support.  Future versions do this automatically, but an explicit c++rt0.o
11827
    # does not break anything, and helps significantly (at the cost of a little
11828
    # extra space).
11829
    freebsd2.2*)
11830
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11831
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11832
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11833
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11834
      ;;
11835
11836
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11837
    freebsd2*)
11838
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11839
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11840
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11841
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11842
      ;;
11843
11844
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11845
    freebsd* | dragonfly*)
11846
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
11847
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11848
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11849
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11850
      ;;
11851
11852
    hpux9*)
11853
      if test "$GCC" = yes; then
11854
	_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'
11855
      else
11856
	_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'
11857
      fi
11858
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11859
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11860
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11861
11862
      # hardcode_minus_L: Not really in the search PATH,
11863
      # but as the default location of the library.
11864
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11865
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11866
      ;;
11867
11868
    hpux10*)
11869
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11870
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11871
      else
11872
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11873
      fi
11874
      if test "$with_gnu_ld" = no; then
11875
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11876
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11877
11878
	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11879
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11880
11881
	# hardcode_minus_L: Not really in the search PATH,
11882
	# but as the default location of the library.
11883
	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11884
      fi
11885
      ;;
11886
11887
    hpux11*)
11888
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11889
	case $host_cpu in
11890
	hppa*64*)
11891
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11892
	  ;;
11893
	ia64*)
11894
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11895
	  ;;
11896
	*)
11897
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11898
	  ;;
11899
	esac
11900
      else
11901
	case $host_cpu in
11902
	hppa*64*)
11903
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11904
	  ;;
11905
	ia64*)
11906
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11907
	  ;;
11908
	*)
11909
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11910
	  ;;
11911
	esac
11912
      fi
11913
      if test "$with_gnu_ld" = no; then
11914
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11915
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11916
11917
	case $host_cpu in
11918
	hppa*64*|ia64*)
11919
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11920
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
11921
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11922
	  ;;
11923
	*)
11924
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11925
	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11926
11927
	  # hardcode_minus_L: Not really in the search PATH,
11928
	  # but as the default location of the library.
11929
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11930
	  ;;
11931
	esac
11932
      fi
11933
      ;;
11934
11935
    irix5* | irix6* | nonstopux*)
11936
      if test "$GCC" = yes; then
11937
	_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'
11938
      else
11939
	_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'
11940
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11941
      fi
11942
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11943
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11944
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11945
      ;;
11946
11947
    netbsd* | netbsdelf*-gnu)
11948
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11949
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
11950
      else
11951
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
11952
      fi
11953
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11954
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11955
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11956
      ;;
11957
11958
    newsos6)
11959
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11960
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11961
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11962
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11963
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11964
      ;;
11965
11966
    openbsd*)
11967
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11968
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11969
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11970
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11971
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
11972
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11973
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11974
      else
11975
       case $host_os in
11976
	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11977
	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11978
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11979
	   ;;
11980
	 *)
11981
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11982
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11983
	   ;;
11984
       esac
11985
      fi
11986
      ;;
11987
11988
    os2*)
11989
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11990
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11991
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11992
      _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'
11993
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11994
      ;;
11995
11996
    osf3*)
11997
      if test "$GCC" = yes; then
11998
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11999
	_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'
12000
      else
12001
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
12002
	_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'
12003
      fi
12004
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
12005
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
12006
      ;;
12007
12008
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
12009
      if test "$GCC" = yes; then
12010
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
12011
	_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'
12012
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
12013
      else
12014
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
12015
	_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'
12016
	_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~
12017
	$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'
12018
12019
	# Both c and cxx compiler support -rpath directly
12020
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
12021
      fi
12022
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
12023
      ;;
12024
12025
    solaris*)
12026
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
12027
      if test "$GCC" = yes; then
12028
	wlarc='${wl}'
12029
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
12030
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12031
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
12032
      else
12033
	wlarc=''
12034
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
12035
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12036
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
12037
      fi
12038
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
12039
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12040
      case $host_os in
12041
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
12042
      *)
12043
 	# The compiler driver will combine linker options so we
12044
 	# cannot just pass the convience library names through
12045
 	# without $wl, iff we do not link with $LD.
12046
 	# Luckily, gcc supports the same syntax we need for Sun Studio.
12047
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
12048
 	case $wlarc in
12049
 	'')
12050
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
12051
 	*)
12052
 	  _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' ;;
12053
 	esac ;;
12054
      esac
12055
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
12056
      ;;
12057
12058
    sunos4*)
12059
      if test "x$host_vendor" = xsequent; then
12060
	# Use $CC to link under sequent, because it throws in some extra .o
12061
	# files that make .init and .fini sections work.
12062
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12063
      else
12064
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12065
      fi
12066
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
12067
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
12068
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
12069
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12070
      ;;
12071
12072
    sysv4)
12073
      case $host_vendor in
12074
	sni)
12075
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12076
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
12077
	;;
12078
	siemens)
12079
	  ## LD is ld it makes a PLAMLIB
12080
	  ## CC just makes a GrossModule.
12081
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12082
	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
12083
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
12084
        ;;
12085
	motorola)
12086
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12087
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
12088
	;;
12089
      esac
12090
      runpath_var='LD_RUN_PATH'
12091
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12092
      ;;
12093
12094
    sysv4.3*)
12095
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12096
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12097
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
12098
      ;;
12099
12100
    sysv4*MP*)
12101
      if test -d /usr/nec; then
12102
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12103
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12104
	runpath_var=LD_RUN_PATH
12105
	hardcode_runpath_var=yes
12106
	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
12107
      fi
12108
      ;;
12109
12110
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
12111
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
12112
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
12113
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12114
      runpath_var='LD_RUN_PATH'
12115
12116
      if test "$GCC" = yes; then
12117
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12118
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12119
      else
12120
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12121
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12122
      fi
12123
      ;;
12124
12125
    sysv5* | sco3.2v5* | sco5v6*)
12126
      # Note: We can NOT use -z defs as we might desire, because we do not
12127
      # link with -lc, and that would cause any symbols used from libc to
12128
      # always be unresolved, which means just about no library would
12129
      # ever link correctly.  If we're not using GNU ld we use -z text
12130
      # though, which does catch some bad symbols but isn't as heavy-handed
12131
      # as -z defs.
12132
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
12133
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
12134
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
12135
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12136
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
12137
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
12138
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
12139
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
12140
      runpath_var='LD_RUN_PATH'
12141
12142
      if test "$GCC" = yes; then
12143
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12144
	_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'
12145
      else
12146
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12147
	_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'
12148
      fi
12149
      ;;
12150
12151
    uts4*)
12152
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12153
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
12154
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12155
      ;;
12156
12157
    *)
12158
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
12159
      ;;
12160
    esac
12161
  fi
12162
])
12163
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
12164
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
12165
12166
#
12167
# Do we need to explicitly link libc?
12168
#
12169
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
12170
x|xyes)
12171
  # Assume -lc should be added
12172
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
12173
12174
  if test "$enable_shared" = yes && test "$GCC" = yes; then
12175
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
12176
    *'~'*)
12177
      # FIXME: we may have to deal with multi-command sequences.
12178
      ;;
12179
    '$CC '*)
12180
      # Test whether the compiler implicitly links with -lc since on some
12181
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12182
      # to ld, don't add -lc before -lgcc.
12183
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
12184
      $rm conftest*
12185
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
12186
12187
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
12188
        soname=conftest
12189
        lib=conftest
12190
        libobjs=conftest.$ac_objext
12191
        deplibs=
12192
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
12193
	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
12194
        compiler_flags=-v
12195
        linker_flags=-v
12196
        verstring=
12197
        output_objdir=.
12198
        libname=conftest
12199
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
12200
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
12201
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
12202
        then
12203
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
12204
        else
12205
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
12206
        fi
12207
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
12208
      else
12209
        cat conftest.err 1>&5
12210
      fi
12211
      $rm conftest*
12212
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
12213
      ;;
12214
    esac
12215
  fi
12216
  ;;
12217
esac
12218
])# AC_LIBTOOL_PROG_LD_SHLIBS
12219
12220
12221
# _LT_AC_FILE_LTDLL_C
12222
# -------------------
12223
# Be careful that the start marker always follows a newline.
12224
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
12225
# /* ltdll.c starts here */
12226
# #define WIN32_LEAN_AND_MEAN
12227
# #include <windows.h>
12228
# #undef WIN32_LEAN_AND_MEAN
12229
# #include <stdio.h>
12230
#
12231
# #ifndef __CYGWIN__
12232
# #  ifdef __CYGWIN32__
12233
# #    define __CYGWIN__ __CYGWIN32__
12234
# #  endif
12235
# #endif
12236
#
12237
# #ifdef __cplusplus
12238
# extern "C" {
12239
# #endif
12240
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
12241
# #ifdef __cplusplus
12242
# }
12243
# #endif
12244
#
12245
# #ifdef __CYGWIN__
12246
# #include <cygwin/cygwin_dll.h>
12247
# DECLARE_CYGWIN_DLL( DllMain );
12248
# #endif
12249
# HINSTANCE __hDllInstance_base;
12250
#
12251
# BOOL APIENTRY
12252
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
12253
# {
12254
#   __hDllInstance_base = hInst;
12255
#   return TRUE;
12256
# }
12257
# /* ltdll.c ends here */
12258
])# _LT_AC_FILE_LTDLL_C
12259
12260
12261
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
12262
# ---------------------------------
12263
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
12264
12265
12266
# old names
12267
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
12268
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
12269
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
12270
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
12271
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
12272
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
12273
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
12274
12275
# This is just to silence aclocal about the macro not being used
12276
ifelse([AC_DISABLE_FAST_INSTALL])
12277
12278
AC_DEFUN([LT_AC_PROG_GCJ],
12279
[AC_CHECK_TOOL(GCJ, gcj, no)
12280
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
12281
  AC_SUBST(GCJFLAGS)
12282
])
12283
12284
AC_DEFUN([LT_AC_PROG_RC],
12285
[AC_CHECK_TOOL(RC, windres, no)
12286
])
12287
12288
############################################################
12289
# NOTE: This macro has been submitted for inclusion into   #
12290
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
12291
#  a released version of Autoconf we should remove this    #
12292
#  macro and use it instead.                               #
12293
############################################################
12294
# LT_AC_PROG_SED
12295
# --------------
12296
# Check for a fully-functional sed program, that truncates
12297
# as few characters as possible.  Prefer GNU sed if found.
12298
AC_DEFUN([LT_AC_PROG_SED],
12299
[AC_MSG_CHECKING([for a sed that does not truncate output])
12300
AC_CACHE_VAL(lt_cv_path_SED,
12301
[# Loop through the user's path and test for sed and gsed.
12302
# Then use that list of sed's as ones to test for truncation.
12303
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12304
for as_dir in $PATH
12305
do
12306
  IFS=$as_save_IFS
12307
  test -z "$as_dir" && as_dir=.
12308
  for lt_ac_prog in sed gsed; do
12309
    for ac_exec_ext in '' $ac_executable_extensions; do
12310
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
12311
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
12312
      fi
12313
    done
12314
  done
12315
done
12316
lt_ac_max=0
12317
lt_ac_count=0
12318
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
12319
# along with /bin/sed that truncates output.
12320
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
12321
  test ! -f $lt_ac_sed && continue
12322
  cat /dev/null > conftest.in
12323
  lt_ac_count=0
12324
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
12325
  # Check for GNU sed and select it if it is found.
12326
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
12327
    lt_cv_path_SED=$lt_ac_sed
12328
    break
12329
  fi
12330
  while true; do
12331
    cat conftest.in conftest.in >conftest.tmp
12332
    mv conftest.tmp conftest.in
12333
    cp conftest.in conftest.nl
12334
    echo >>conftest.nl
12335
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
12336
    cmp -s conftest.out conftest.nl || break
12337
    # 10000 chars as input seems more than enough
12338
    test $lt_ac_count -gt 10 && break
12339
    lt_ac_count=`expr $lt_ac_count + 1`
12340
    if test $lt_ac_count -gt $lt_ac_max; then
12341
      lt_ac_max=$lt_ac_count
12342
      lt_cv_path_SED=$lt_ac_sed
12343
    fi
12344
  done
12345
done
12346
])
12347
SED=$lt_cv_path_SED
12348
AC_MSG_RESULT([$SED])
12349
])
12350
12351
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
12352
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
12353
dnl also defines GSTUFF_PKG_ERRORS on error
12354
AC_DEFUN([PKG_CHECK_MODULES], [
12355
  succeeded=no
12356
12357
  if test -z "$PKG_CONFIG"; then
12358
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
12359
  fi
12360
12361
  if test "$PKG_CONFIG" = "no" ; then
12362
     echo "*** The pkg-config script could not be found. Make sure it is"
12363
     echo "*** in your path, or set the PKG_CONFIG environment variable"
12364
     echo "*** to the full path to pkg-config."
12365
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
12366
  else
12367
     PKG_CONFIG_MIN_VERSION=0.9.0
12368
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12369
        AC_MSG_CHECKING(for $2)
12370
12371
        if $PKG_CONFIG --exists "$2" ; then
12372
            AC_MSG_RESULT(yes)
12373
            succeeded=yes
12374
12375
            AC_MSG_CHECKING($1_CFLAGS)
12376
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
12377
            AC_MSG_RESULT($$1_CFLAGS)
12378
12379
            AC_MSG_CHECKING($1_LIBS)
12380
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
12381
            AC_MSG_RESULT($$1_LIBS)
12382
        else
12383
            $1_CFLAGS=""
12384
            $1_LIBS=""
12385
            ## If we have a custom action on failure, don't print errors, but 
12386
            ## do set a variable so people can do so.
12387
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
12388
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
12389
        fi
12390
12391
        AC_SUBST($1_CFLAGS)
12392
        AC_SUBST($1_LIBS)
12393
     else
12394
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12395
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
12396
     fi
12397
  fi
12398
12399
  if test $succeeded = yes; then
12400
     ifelse([$3], , :, [$3])
12401
  else
12402
     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
12403
  fi
12404
])
12405
12406
(-)a/aclocal.m4 (-892 lines)
Lines 1-892 Link Here
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005  Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
8
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
# PARTICULAR PURPOSE.
13
14
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
15
#
16
# This file is free software; the Free Software Foundation
17
# gives unlimited permission to copy and/or distribute it,
18
# with or without modifications, as long as this notice is preserved.
19
20
# AM_AUTOMAKE_VERSION(VERSION)
21
# ----------------------------
22
# Automake X.Y traces this macro to ensure aclocal.m4 has been
23
# generated from the m4 files accompanying Automake X.Y.
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
25
26
# AM_SET_CURRENT_AUTOMAKE_VERSION
27
# -------------------------------
28
# Call AM_AUTOMAKE_VERSION so it can be traced.
29
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
30
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
31
	 [AM_AUTOMAKE_VERSION([1.9.6])])
32
33
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
34
35
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
36
#
37
# This file is free software; the Free Software Foundation
38
# gives unlimited permission to copy and/or distribute it,
39
# with or without modifications, as long as this notice is preserved.
40
41
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
43
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
44
#
45
# Of course, Automake must honor this variable whenever it calls a
46
# tool from the auxiliary directory.  The problem is that $srcdir (and
47
# therefore $ac_aux_dir as well) can be either absolute or relative,
48
# depending on how configure is run.  This is pretty annoying, since
49
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
50
# source directory, any form will work fine, but in subdirectories a
51
# relative path needs to be adjusted first.
52
#
53
# $ac_aux_dir/missing
54
#    fails when called from a subdirectory if $ac_aux_dir is relative
55
# $top_srcdir/$ac_aux_dir/missing
56
#    fails if $ac_aux_dir is absolute,
57
#    fails when called from a subdirectory in a VPATH build with
58
#          a relative $ac_aux_dir
59
#
60
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
61
# are both prefixed by $srcdir.  In an in-source build this is usually
62
# harmless because $srcdir is `.', but things will broke when you
63
# start a VPATH build or use an absolute $srcdir.
64
#
65
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
66
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
67
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
68
# and then we would define $MISSING as
69
#   MISSING="\${SHELL} $am_aux_dir/missing"
70
# This will work as long as MISSING is not called from configure, because
71
# unfortunately $(top_srcdir) has no meaning in configure.
72
# However there are other variables, like CC, which are often used in
73
# configure, and could therefore not use this "fixed" $ac_aux_dir.
74
#
75
# Another solution, used here, is to always expand $ac_aux_dir to an
76
# absolute PATH.  The drawback is that using absolute paths prevent a
77
# configured tree to be moved without reconfiguration.
78
79
AC_DEFUN([AM_AUX_DIR_EXPAND],
80
[dnl Rely on autoconf to set up CDPATH properly.
81
AC_PREREQ([2.50])dnl
82
# expand $ac_aux_dir to an absolute path
83
am_aux_dir=`cd $ac_aux_dir && pwd`
84
])
85
86
# AM_CONDITIONAL                                            -*- Autoconf -*-
87
88
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
89
# Free Software Foundation, Inc.
90
#
91
# This file is free software; the Free Software Foundation
92
# gives unlimited permission to copy and/or distribute it,
93
# with or without modifications, as long as this notice is preserved.
94
95
# serial 7
96
97
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
98
# -------------------------------------
99
# Define a conditional.
100
AC_DEFUN([AM_CONDITIONAL],
101
[AC_PREREQ(2.52)dnl
102
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
103
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
104
AC_SUBST([$1_TRUE])
105
AC_SUBST([$1_FALSE])
106
if $2; then
107
  $1_TRUE=
108
  $1_FALSE='#'
109
else
110
  $1_TRUE='#'
111
  $1_FALSE=
112
fi
113
AC_CONFIG_COMMANDS_PRE(
114
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
115
  AC_MSG_ERROR([[conditional "$1" was never defined.
116
Usually this means the macro was only invoked conditionally.]])
117
fi])])
118
119
120
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
121
# Free Software Foundation, Inc.
122
#
123
# This file is free software; the Free Software Foundation
124
# gives unlimited permission to copy and/or distribute it,
125
# with or without modifications, as long as this notice is preserved.
126
127
# serial 8
128
129
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
130
# written in clear, in which case automake, when reading aclocal.m4,
131
# will think it sees a *use*, and therefore will trigger all it's
132
# C support machinery.  Also note that it means that autoscan, seeing
133
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
134
135
136
# _AM_DEPENDENCIES(NAME)
137
# ----------------------
138
# See how the compiler implements dependency checking.
139
# NAME is "CC", "CXX", "GCJ", or "OBJC".
140
# We try a few techniques and use that to set a single cache variable.
141
#
142
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
143
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
144
# dependency, and given that the user is not expected to run this macro,
145
# just rely on AC_PROG_CC.
146
AC_DEFUN([_AM_DEPENDENCIES],
147
[AC_REQUIRE([AM_SET_DEPDIR])dnl
148
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
149
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
150
AC_REQUIRE([AM_DEP_TRACK])dnl
151
152
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
153
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
154
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
155
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
156
                   [depcc="$$1"   am_compiler_list=])
157
158
AC_CACHE_CHECK([dependency style of $depcc],
159
               [am_cv_$1_dependencies_compiler_type],
160
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
161
  # We make a subdir and do the tests there.  Otherwise we can end up
162
  # making bogus files that we don't know about and never remove.  For
163
  # instance it was reported that on HP-UX the gcc test will end up
164
  # making a dummy file named `D' -- because `-MD' means `put the output
165
  # in D'.
166
  mkdir conftest.dir
167
  # Copy depcomp to subdir because otherwise we won't find it if we're
168
  # using a relative directory.
169
  cp "$am_depcomp" conftest.dir
170
  cd conftest.dir
171
  # We will build objects and dependencies in a subdirectory because
172
  # it helps to detect inapplicable dependency modes.  For instance
173
  # both Tru64's cc and ICC support -MD to output dependencies as a
174
  # side effect of compilation, but ICC will put the dependencies in
175
  # the current directory while Tru64 will put them in the object
176
  # directory.
177
  mkdir sub
178
179
  am_cv_$1_dependencies_compiler_type=none
180
  if test "$am_compiler_list" = ""; then
181
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
182
  fi
183
  for depmode in $am_compiler_list; do
184
    # Setup a source with many dependencies, because some compilers
185
    # like to wrap large dependency lists on column 80 (with \), and
186
    # we should not choose a depcomp mode which is confused by this.
187
    #
188
    # We need to recreate these files for each test, as the compiler may
189
    # overwrite some of them when testing with obscure command lines.
190
    # This happens at least with the AIX C compiler.
191
    : > sub/conftest.c
192
    for i in 1 2 3 4 5 6; do
193
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
194
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
195
      # Solaris 8's {/usr,}/bin/sh.
196
      touch sub/conftst$i.h
197
    done
198
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
199
200
    case $depmode in
201
    nosideeffect)
202
      # after this tag, mechanisms are not by side-effect, so they'll
203
      # only be used when explicitly requested
204
      if test "x$enable_dependency_tracking" = xyes; then
205
	continue
206
      else
207
	break
208
      fi
209
      ;;
210
    none) break ;;
211
    esac
212
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
213
    # mode.  It turns out that the SunPro C++ compiler does not properly
214
    # handle `-M -o', and we need to detect this.
215
    if depmode=$depmode \
216
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
217
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
218
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
219
         >/dev/null 2>conftest.err &&
220
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
221
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
222
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
223
      # icc doesn't choke on unknown options, it will just issue warnings
224
      # or remarks (even with -Werror).  So we grep stderr for any message
225
      # that says an option was ignored or not supported.
226
      # When given -MP, icc 7.0 and 7.1 complain thusly:
227
      #   icc: Command line warning: ignoring option '-M'; no argument required
228
      # The diagnosis changed in icc 8.0:
229
      #   icc: Command line remark: option '-MP' not supported
230
      if (grep 'ignoring option' conftest.err ||
231
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
232
        am_cv_$1_dependencies_compiler_type=$depmode
233
        break
234
      fi
235
    fi
236
  done
237
238
  cd ..
239
  rm -rf conftest.dir
240
else
241
  am_cv_$1_dependencies_compiler_type=none
242
fi
243
])
244
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
245
AM_CONDITIONAL([am__fastdep$1], [
246
  test "x$enable_dependency_tracking" != xno \
247
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
248
])
249
250
251
# AM_SET_DEPDIR
252
# -------------
253
# Choose a directory name for dependency files.
254
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
255
AC_DEFUN([AM_SET_DEPDIR],
256
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
257
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
258
])
259
260
261
# AM_DEP_TRACK
262
# ------------
263
AC_DEFUN([AM_DEP_TRACK],
264
[AC_ARG_ENABLE(dependency-tracking,
265
[  --disable-dependency-tracking  speeds up one-time build
266
  --enable-dependency-tracking   do not reject slow dependency extractors])
267
if test "x$enable_dependency_tracking" != xno; then
268
  am_depcomp="$ac_aux_dir/depcomp"
269
  AMDEPBACKSLASH='\'
270
fi
271
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
272
AC_SUBST([AMDEPBACKSLASH])
273
])
274
275
# Generate code to set up dependency tracking.              -*- Autoconf -*-
276
277
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
278
# Free Software Foundation, Inc.
279
#
280
# This file is free software; the Free Software Foundation
281
# gives unlimited permission to copy and/or distribute it,
282
# with or without modifications, as long as this notice is preserved.
283
284
#serial 3
285
286
# _AM_OUTPUT_DEPENDENCY_COMMANDS
287
# ------------------------------
288
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
289
[for mf in $CONFIG_FILES; do
290
  # Strip MF so we end up with the name of the file.
291
  mf=`echo "$mf" | sed -e 's/:.*$//'`
292
  # Check whether this is an Automake generated Makefile or not.
293
  # We used to match only the files named `Makefile.in', but
294
  # some people rename them; so instead we look at the file content.
295
  # Grep'ing the first line is not enough: some people post-process
296
  # each Makefile.in and add a new line on top of each file to say so.
297
  # So let's grep whole file.
298
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
299
    dirpart=`AS_DIRNAME("$mf")`
300
  else
301
    continue
302
  fi
303
  # Extract the definition of DEPDIR, am__include, and am__quote
304
  # from the Makefile without running `make'.
305
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
306
  test -z "$DEPDIR" && continue
307
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
308
  test -z "am__include" && continue
309
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
310
  # When using ansi2knr, U may be empty or an underscore; expand it
311
  U=`sed -n 's/^U = //p' < "$mf"`
312
  # Find all dependency output files, they are included files with
313
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
314
  # simplest approach to changing $(DEPDIR) to its actual value in the
315
  # expansion.
316
  for file in `sed -n "
317
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
318
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
319
    # Make sure the directory exists.
320
    test -f "$dirpart/$file" && continue
321
    fdir=`AS_DIRNAME(["$file"])`
322
    AS_MKDIR_P([$dirpart/$fdir])
323
    # echo "creating $dirpart/$file"
324
    echo '# dummy' > "$dirpart/$file"
325
  done
326
done
327
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
328
329
330
# AM_OUTPUT_DEPENDENCY_COMMANDS
331
# -----------------------------
332
# This macro should only be invoked once -- use via AC_REQUIRE.
333
#
334
# This code is only required when automatic dependency tracking
335
# is enabled.  FIXME.  This creates each `.P' file that we will
336
# need in order to bootstrap the dependency handling code.
337
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
338
[AC_CONFIG_COMMANDS([depfiles],
339
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
340
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
341
])
342
343
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
344
# Free Software Foundation, Inc.
345
#
346
# This file is free software; the Free Software Foundation
347
# gives unlimited permission to copy and/or distribute it,
348
# with or without modifications, as long as this notice is preserved.
349
350
# serial 8
351
352
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
353
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
354
355
# Do all the work for Automake.                             -*- Autoconf -*-
356
357
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
358
# Free Software Foundation, Inc.
359
#
360
# This file is free software; the Free Software Foundation
361
# gives unlimited permission to copy and/or distribute it,
362
# with or without modifications, as long as this notice is preserved.
363
364
# serial 12
365
366
# This macro actually does too much.  Some checks are only needed if
367
# your package does certain things.  But this isn't really a big deal.
368
369
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
370
# AM_INIT_AUTOMAKE([OPTIONS])
371
# -----------------------------------------------
372
# The call with PACKAGE and VERSION arguments is the old style
373
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
374
# and VERSION should now be passed to AC_INIT and removed from
375
# the call to AM_INIT_AUTOMAKE.
376
# We support both call styles for the transition.  After
377
# the next Automake release, Autoconf can make the AC_INIT
378
# arguments mandatory, and then we can depend on a new Autoconf
379
# release and drop the old call support.
380
AC_DEFUN([AM_INIT_AUTOMAKE],
381
[AC_PREREQ([2.58])dnl
382
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
383
dnl the ones we care about.
384
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
385
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
386
AC_REQUIRE([AC_PROG_INSTALL])dnl
387
# test to see if srcdir already configured
388
if test "`cd $srcdir && pwd`" != "`pwd`" &&
389
   test -f $srcdir/config.status; then
390
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
391
fi
392
393
# test whether we have cygpath
394
if test -z "$CYGPATH_W"; then
395
  if (cygpath --version) >/dev/null 2>/dev/null; then
396
    CYGPATH_W='cygpath -w'
397
  else
398
    CYGPATH_W=echo
399
  fi
400
fi
401
AC_SUBST([CYGPATH_W])
402
403
# Define the identity of the package.
404
dnl Distinguish between old-style and new-style calls.
405
m4_ifval([$2],
406
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
407
 AC_SUBST([PACKAGE], [$1])dnl
408
 AC_SUBST([VERSION], [$2])],
409
[_AM_SET_OPTIONS([$1])dnl
410
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
411
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
412
413
_AM_IF_OPTION([no-define],,
414
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
415
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
416
417
# Some tools Automake needs.
418
AC_REQUIRE([AM_SANITY_CHECK])dnl
419
AC_REQUIRE([AC_ARG_PROGRAM])dnl
420
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
421
AM_MISSING_PROG(AUTOCONF, autoconf)
422
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
423
AM_MISSING_PROG(AUTOHEADER, autoheader)
424
AM_MISSING_PROG(MAKEINFO, makeinfo)
425
AM_PROG_INSTALL_SH
426
AM_PROG_INSTALL_STRIP
427
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
428
# We need awk for the "check" target.  The system "awk" is bad on
429
# some platforms.
430
AC_REQUIRE([AC_PROG_AWK])dnl
431
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
432
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
433
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
434
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
435
	      		     [_AM_PROG_TAR([v7])])])
436
_AM_IF_OPTION([no-dependencies],,
437
[AC_PROVIDE_IFELSE([AC_PROG_CC],
438
                  [_AM_DEPENDENCIES(CC)],
439
                  [define([AC_PROG_CC],
440
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
441
AC_PROVIDE_IFELSE([AC_PROG_CXX],
442
                  [_AM_DEPENDENCIES(CXX)],
443
                  [define([AC_PROG_CXX],
444
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
445
])
446
])
447
448
449
# When config.status generates a header, we must update the stamp-h file.
450
# This file resides in the same directory as the config header
451
# that is generated.  The stamp files are numbered to have different names.
452
453
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
454
# loop where config.status creates the headers, so we can generate
455
# our stamp files there.
456
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
457
[# Compute $1's index in $config_headers.
458
_am_stamp_count=1
459
for _am_header in $config_headers :; do
460
  case $_am_header in
461
    $1 | $1:* )
462
      break ;;
463
    * )
464
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
465
  esac
466
done
467
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
468
469
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
470
#
471
# This file is free software; the Free Software Foundation
472
# gives unlimited permission to copy and/or distribute it,
473
# with or without modifications, as long as this notice is preserved.
474
475
# AM_PROG_INSTALL_SH
476
# ------------------
477
# Define $install_sh.
478
AC_DEFUN([AM_PROG_INSTALL_SH],
479
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
480
install_sh=${install_sh-"$am_aux_dir/install-sh"}
481
AC_SUBST(install_sh)])
482
483
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
484
#
485
# This file is free software; the Free Software Foundation
486
# gives unlimited permission to copy and/or distribute it,
487
# with or without modifications, as long as this notice is preserved.
488
489
# serial 2
490
491
# Check whether the underlying file-system supports filenames
492
# with a leading dot.  For instance MS-DOS doesn't.
493
AC_DEFUN([AM_SET_LEADING_DOT],
494
[rm -rf .tst 2>/dev/null
495
mkdir .tst 2>/dev/null
496
if test -d .tst; then
497
  am__leading_dot=.
498
else
499
  am__leading_dot=_
500
fi
501
rmdir .tst 2>/dev/null
502
AC_SUBST([am__leading_dot])])
503
504
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
505
# From Jim Meyering
506
507
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
508
# Free Software Foundation, Inc.
509
#
510
# This file is free software; the Free Software Foundation
511
# gives unlimited permission to copy and/or distribute it,
512
# with or without modifications, as long as this notice is preserved.
513
514
# serial 4
515
516
AC_DEFUN([AM_MAINTAINER_MODE],
517
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
518
  dnl maintainer-mode is disabled by default
519
  AC_ARG_ENABLE(maintainer-mode,
520
[  --enable-maintainer-mode  enable make rules and dependencies not useful
521
			  (and sometimes confusing) to the casual installer],
522
      USE_MAINTAINER_MODE=$enableval,
523
      USE_MAINTAINER_MODE=no)
524
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
525
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
526
  MAINT=$MAINTAINER_MODE_TRUE
527
  AC_SUBST(MAINT)dnl
528
]
529
)
530
531
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
532
533
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
534
535
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
536
#
537
# This file is free software; the Free Software Foundation
538
# gives unlimited permission to copy and/or distribute it,
539
# with or without modifications, as long as this notice is preserved.
540
541
# serial 3
542
543
# AM_MAKE_INCLUDE()
544
# -----------------
545
# Check to see how make treats includes.
546
AC_DEFUN([AM_MAKE_INCLUDE],
547
[am_make=${MAKE-make}
548
cat > confinc << 'END'
549
am__doit:
550
	@echo done
551
.PHONY: am__doit
552
END
553
# If we don't find an include directive, just comment out the code.
554
AC_MSG_CHECKING([for style of include used by $am_make])
555
am__include="#"
556
am__quote=
557
_am_result=none
558
# First try GNU make style include.
559
echo "include confinc" > confmf
560
# We grep out `Entering directory' and `Leaving directory'
561
# messages which can occur if `w' ends up in MAKEFLAGS.
562
# In particular we don't look at `^make:' because GNU make might
563
# be invoked under some other name (usually "gmake"), in which
564
# case it prints its new name instead of `make'.
565
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
566
   am__include=include
567
   am__quote=
568
   _am_result=GNU
569
fi
570
# Now try BSD make style include.
571
if test "$am__include" = "#"; then
572
   echo '.include "confinc"' > confmf
573
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
574
      am__include=.include
575
      am__quote="\""
576
      _am_result=BSD
577
   fi
578
fi
579
AC_SUBST([am__include])
580
AC_SUBST([am__quote])
581
AC_MSG_RESULT([$_am_result])
582
rm -f confinc confmf
583
])
584
585
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
586
587
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
588
# Free Software Foundation, Inc.
589
#
590
# This file is free software; the Free Software Foundation
591
# gives unlimited permission to copy and/or distribute it,
592
# with or without modifications, as long as this notice is preserved.
593
594
# serial 4
595
596
# AM_MISSING_PROG(NAME, PROGRAM)
597
# ------------------------------
598
AC_DEFUN([AM_MISSING_PROG],
599
[AC_REQUIRE([AM_MISSING_HAS_RUN])
600
$1=${$1-"${am_missing_run}$2"}
601
AC_SUBST($1)])
602
603
604
# AM_MISSING_HAS_RUN
605
# ------------------
606
# Define MISSING if not defined so far and test if it supports --run.
607
# If it does, set am_missing_run to use it, otherwise, to nothing.
608
AC_DEFUN([AM_MISSING_HAS_RUN],
609
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
610
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
611
# Use eval to expand $SHELL
612
if eval "$MISSING --run true"; then
613
  am_missing_run="$MISSING --run "
614
else
615
  am_missing_run=
616
  AC_MSG_WARN([`missing' script is too old or missing])
617
fi
618
])
619
620
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
621
#
622
# This file is free software; the Free Software Foundation
623
# gives unlimited permission to copy and/or distribute it,
624
# with or without modifications, as long as this notice is preserved.
625
626
# AM_PROG_MKDIR_P
627
# ---------------
628
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
629
#
630
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
631
# created by `make install' are always world readable, even if the
632
# installer happens to have an overly restrictive umask (e.g. 077).
633
# This was a mistake.  There are at least two reasons why we must not
634
# use `-m 0755':
635
#   - it causes special bits like SGID to be ignored,
636
#   - it may be too restrictive (some setups expect 775 directories).
637
#
638
# Do not use -m 0755 and let people choose whatever they expect by
639
# setting umask.
640
#
641
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
642
# Some implementations (such as Solaris 8's) are not thread-safe: if a
643
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
644
# concurrently, both version can detect that a/ is missing, but only
645
# one can create it and the other will error out.  Consequently we
646
# restrict ourselves to GNU make (using the --version option ensures
647
# this.)
648
AC_DEFUN([AM_PROG_MKDIR_P],
649
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
650
  # We used to keeping the `.' as first argument, in order to
651
  # allow $(mkdir_p) to be used without argument.  As in
652
  #   $(mkdir_p) $(somedir)
653
  # where $(somedir) is conditionally defined.  However this is wrong
654
  # for two reasons:
655
  #  1. if the package is installed by a user who cannot write `.'
656
  #     make install will fail,
657
  #  2. the above comment should most certainly read
658
  #     $(mkdir_p) $(DESTDIR)$(somedir)
659
  #     so it does not work when $(somedir) is undefined and
660
  #     $(DESTDIR) is not.
661
  #  To support the latter case, we have to write
662
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
663
  #  so the `.' trick is pointless.
664
  mkdir_p='mkdir -p --'
665
else
666
  # On NextStep and OpenStep, the `mkdir' command does not
667
  # recognize any option.  It will interpret all options as
668
  # directories to create, and then abort because `.' already
669
  # exists.
670
  for d in ./-p ./--version;
671
  do
672
    test -d $d && rmdir $d
673
  done
674
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
675
  if test -f "$ac_aux_dir/mkinstalldirs"; then
676
    mkdir_p='$(mkinstalldirs)'
677
  else
678
    mkdir_p='$(install_sh) -d'
679
  fi
680
fi
681
AC_SUBST([mkdir_p])])
682
683
# Helper functions for option handling.                     -*- Autoconf -*-
684
685
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
686
#
687
# This file is free software; the Free Software Foundation
688
# gives unlimited permission to copy and/or distribute it,
689
# with or without modifications, as long as this notice is preserved.
690
691
# serial 3
692
693
# _AM_MANGLE_OPTION(NAME)
694
# -----------------------
695
AC_DEFUN([_AM_MANGLE_OPTION],
696
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
697
698
# _AM_SET_OPTION(NAME)
699
# ------------------------------
700
# Set option NAME.  Presently that only means defining a flag for this option.
701
AC_DEFUN([_AM_SET_OPTION],
702
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
703
704
# _AM_SET_OPTIONS(OPTIONS)
705
# ----------------------------------
706
# OPTIONS is a space-separated list of Automake options.
707
AC_DEFUN([_AM_SET_OPTIONS],
708
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
709
710
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
711
# -------------------------------------------
712
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
713
AC_DEFUN([_AM_IF_OPTION],
714
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
715
716
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
717
718
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
719
# Free Software Foundation, Inc.
720
#
721
# This file is free software; the Free Software Foundation
722
# gives unlimited permission to copy and/or distribute it,
723
# with or without modifications, as long as this notice is preserved.
724
725
# serial 4
726
727
# AM_SANITY_CHECK
728
# ---------------
729
AC_DEFUN([AM_SANITY_CHECK],
730
[AC_MSG_CHECKING([whether build environment is sane])
731
# Just in case
732
sleep 1
733
echo timestamp > conftest.file
734
# Do `set' in a subshell so we don't clobber the current shell's
735
# arguments.  Must try -L first in case configure is actually a
736
# symlink; some systems play weird games with the mod time of symlinks
737
# (eg FreeBSD returns the mod time of the symlink's containing
738
# directory).
739
if (
740
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
741
   if test "$[*]" = "X"; then
742
      # -L didn't work.
743
      set X `ls -t $srcdir/configure conftest.file`
744
   fi
745
   rm -f conftest.file
746
   if test "$[*]" != "X $srcdir/configure conftest.file" \
747
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
748
749
      # If neither matched, then we have a broken ls.  This can happen
750
      # if, for instance, CONFIG_SHELL is bash and it inherits a
751
      # broken ls alias from the environment.  This has actually
752
      # happened.  Such a system could not be considered "sane".
753
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
754
alias in your environment])
755
   fi
756
757
   test "$[2]" = conftest.file
758
   )
759
then
760
   # Ok.
761
   :
762
else
763
   AC_MSG_ERROR([newly created file is older than distributed files!
764
Check your system clock])
765
fi
766
AC_MSG_RESULT(yes)])
767
768
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
769
#
770
# This file is free software; the Free Software Foundation
771
# gives unlimited permission to copy and/or distribute it,
772
# with or without modifications, as long as this notice is preserved.
773
774
# AM_PROG_INSTALL_STRIP
775
# ---------------------
776
# One issue with vendor `install' (even GNU) is that you can't
777
# specify the program used to strip binaries.  This is especially
778
# annoying in cross-compiling environments, where the build's strip
779
# is unlikely to handle the host's binaries.
780
# Fortunately install-sh will honor a STRIPPROG variable, so we
781
# always use install-sh in `make install-strip', and initialize
782
# STRIPPROG with the value of the STRIP variable (set by the user).
783
AC_DEFUN([AM_PROG_INSTALL_STRIP],
784
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
785
# Installed binaries are usually stripped using `strip' when the user
786
# run `make install-strip'.  However `strip' might not be the right
787
# tool to use in cross-compilation environments, therefore Automake
788
# will honor the `STRIP' environment variable to overrule this program.
789
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
790
if test "$cross_compiling" != no; then
791
  AC_CHECK_TOOL([STRIP], [strip], :)
792
fi
793
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
794
AC_SUBST([INSTALL_STRIP_PROGRAM])])
795
796
# Check how to create a tarball.                            -*- Autoconf -*-
797
798
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
799
#
800
# This file is free software; the Free Software Foundation
801
# gives unlimited permission to copy and/or distribute it,
802
# with or without modifications, as long as this notice is preserved.
803
804
# serial 2
805
806
# _AM_PROG_TAR(FORMAT)
807
# --------------------
808
# Check how to create a tarball in format FORMAT.
809
# FORMAT should be one of `v7', `ustar', or `pax'.
810
#
811
# Substitute a variable $(am__tar) that is a command
812
# writing to stdout a FORMAT-tarball containing the directory
813
# $tardir.
814
#     tardir=directory && $(am__tar) > result.tar
815
#
816
# Substitute a variable $(am__untar) that extract such
817
# a tarball read from stdin.
818
#     $(am__untar) < result.tar
819
AC_DEFUN([_AM_PROG_TAR],
820
[# Always define AMTAR for backward compatibility.
821
AM_MISSING_PROG([AMTAR], [tar])
822
m4_if([$1], [v7],
823
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
824
     [m4_case([$1], [ustar],, [pax],,
825
              [m4_fatal([Unknown tar format])])
826
AC_MSG_CHECKING([how to create a $1 tar archive])
827
# Loop over all known methods to create a tar archive until one works.
828
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
829
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
830
# Do not fold the above two line into one, because Tru64 sh and
831
# Solaris sh will not grok spaces in the rhs of `-'.
832
for _am_tool in $_am_tools
833
do
834
  case $_am_tool in
835
  gnutar)
836
    for _am_tar in tar gnutar gtar;
837
    do
838
      AM_RUN_LOG([$_am_tar --version]) && break
839
    done
840
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
841
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
842
    am__untar="$_am_tar -xf -"
843
    ;;
844
  plaintar)
845
    # Must skip GNU tar: if it does not support --format= it doesn't create
846
    # ustar tarball either.
847
    (tar --version) >/dev/null 2>&1 && continue
848
    am__tar='tar chf - "$$tardir"'
849
    am__tar_='tar chf - "$tardir"'
850
    am__untar='tar xf -'
851
    ;;
852
  pax)
853
    am__tar='pax -L -x $1 -w "$$tardir"'
854
    am__tar_='pax -L -x $1 -w "$tardir"'
855
    am__untar='pax -r'
856
    ;;
857
  cpio)
858
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
859
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
860
    am__untar='cpio -i -H $1 -d'
861
    ;;
862
  none)
863
    am__tar=false
864
    am__tar_=false
865
    am__untar=false
866
    ;;
867
  esac
868
869
  # If the value was cached, stop now.  We just wanted to have am__tar
870
  # and am__untar set.
871
  test -n "${am_cv_prog_tar_$1}" && break
872
873
  # tar/untar a dummy directory, and stop if the command works
874
  rm -rf conftest.dir
875
  mkdir conftest.dir
876
  echo GrepMe > conftest.dir/file
877
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
878
  rm -rf conftest.dir
879
  if test -s conftest.tar; then
880
    AM_RUN_LOG([$am__untar <conftest.tar])
881
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
882
  fi
883
done
884
rm -rf conftest.dir
885
886
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
887
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
888
AC_SUBST([am__tar])
889
AC_SUBST([am__untar])
890
]) # _AM_PROG_TAR
891
892
m4_include([acinclude.m4])
(-)a/config.h.in (-6 / +38 lines)
Lines 1-5 Link Here
1
/* config.h.in.  Generated from configure.in by autoheader.  */
1
/* config.h.in.  Generated from configure.in by autoheader.  */
2
2
3
/* Define if building universal (internal helper macro) */
4
#undef AC_APPLE_UNIVERSAL_BUILD
5
3
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
6
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
4
#undef HAVE_CARBON_CARBON_H
7
#undef HAVE_CARBON_CARBON_H
5
8
Lines 68-76 Link Here
68
/* Defines if your system has the fontconfig and freetype libraries */
71
/* Defines if your system has the fontconfig and freetype libraries */
69
#undef HAVE_KARBONTEXT
72
#undef HAVE_KARBONTEXT
70
73
71
/* Define to 1 if you have the <kspell2/broker.h> header file. */
72
#undef HAVE_KSPELL2_BROKER_H
73
74
/* Defines if your system has the libart library */
74
/* Defines if your system has the libart library */
75
#undef HAVE_LIBART
75
#undef HAVE_LIBART
76
76
Lines 89-94 Link Here
89
/* Define if you have libtiff */
89
/* Define if you have libtiff */
90
#undef HAVE_LIBTIFF
90
#undef HAVE_LIBTIFF
91
91
92
/* Defines if your system has libpwd greater than or equal to v0.9.0 */
93
#undef HAVE_LIBWPD_090
94
92
/* Define if you have libz */
95
/* Define if you have libz */
93
#undef HAVE_LIBZ
96
#undef HAVE_LIBZ
94
97
Lines 150-155 Link Here
150
/* Define to 1 if you have the `rewinddir' function. */
153
/* Define to 1 if you have the `rewinddir' function. */
151
#undef HAVE_REWINDDIR
154
#undef HAVE_REWINDDIR
152
155
156
/* Defines if your system has Ruby 1.9.x */
157
#undef HAVE_RUBY_1_9
158
153
/* Define if you have a STL implementation by SGI */
159
/* Define if you have a STL implementation by SGI */
154
#undef HAVE_SGI_STL
160
#undef HAVE_SGI_STL
155
161
Lines 200-205 Link Here
200
/* Define to 1 if you have the <sys/types.h> header file. */
206
/* Define to 1 if you have the <sys/types.h> header file. */
201
#undef HAVE_SYS_TYPES_H
207
#undef HAVE_SYS_TYPES_H
202
208
209
/* Define to 1 if you have the <tdespell2/broker.h> header file. */
210
#undef HAVE_TDESPELL2_BROKER_H
211
203
/* Define to 1 if you have the <unistd.h> header file. */
212
/* Define to 1 if you have the <unistd.h> header file. */
204
#undef HAVE_UNISTD_H
213
#undef HAVE_UNISTD_H
205
214
Lines 227-232 Link Here
227
/* The correct header */
236
/* The correct header */
228
#undef LCMS_HEADER
237
#undef LCMS_HEADER
229
238
239
/* Define to the sub-directory in which libtool stores uninstalled libraries.
240
   */
241
#undef LT_OBJDIR
242
230
/* Name of package */
243
/* Name of package */
231
#undef PACKAGE
244
#undef PACKAGE
232
245
Lines 242-247 Link Here
242
/* Define to the one symbol short name of this package. */
255
/* Define to the one symbol short name of this package. */
243
#undef PACKAGE_TARNAME
256
#undef PACKAGE_TARNAME
244
257
258
/* Define to the home page for this package. */
259
#undef PACKAGE_URL
260
245
/* Define to the version of this package. */
261
/* Define to the version of this package. */
246
#undef PACKAGE_VERSION
262
#undef PACKAGE_VERSION
247
263
Lines 275-283 Link Here
275
/* Defined if compiling without arts */
291
/* Defined if compiling without arts */
276
#undef WITHOUT_ARTS
292
#undef WITHOUT_ARTS
277
293
278
/* Define to 1 if your processor stores words with the most significant byte
294
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
279
   first (like Motorola and SPARC, unlike Intel and VAX). */
295
   significant byte first (like Motorola and SPARC, unlike Intel). */
280
#undef WORDS_BIGENDIAN
296
#if defined AC_APPLE_UNIVERSAL_BUILD
297
# if defined __BIG_ENDIAN__
298
#  define WORDS_BIGENDIAN 1
299
# endif
300
#else
301
# ifndef WORDS_BIGENDIAN
302
#  undef WORDS_BIGENDIAN
303
# endif
304
#endif
281
305
282
/* Defines the executable of xmllint */
306
/* Defines the executable of xmllint */
283
#undef XMLLINT
307
#undef XMLLINT
Lines 311-316 Link Here
311
#endif
335
#endif
312
336
313
337
338
/* Enable large inode numbers on Mac OS X 10.5.  */
339
#ifndef _DARWIN_USE_64_BIT_INODE
340
# define _DARWIN_USE_64_BIT_INODE 1
341
#endif
342
314
/* Number of bits in a file offset, on hosts where this is settable. */
343
/* Number of bits in a file offset, on hosts where this is settable. */
315
#undef _FILE_OFFSET_BITS
344
#undef _FILE_OFFSET_BITS
316
345
Lines 379-384 Link Here
379
#endif
408
#endif
380
409
381
410
411
/* define to 1 if -fvisibility is supported */
412
#undef __KDE_HAVE_GCC_VISIBILITY
413
382
414
383
#if defined(__SVR4) && !defined(__svr4__)
415
#if defined(__SVR4) && !defined(__svr4__)
384
#define __svr4__ 1
416
#define __svr4__ 1
(-)a/configure.files (-4 / +4 lines)
Lines 1-5 Link Here
1
./admin/configure.in.min
1
./admin/configure.in.min
2
configure.in.in
2
configure.in.in
3
./chalk/configure.in.bot
4
./chalk/configure.in.in
5
./chalk/plugins/configure.in.in
6
./chalk/plugins/viewplugins/imagesize/configure.in.in
3
./example/configure.in.in
7
./example/configure.in.in
4
./filters/configure.in.mid
8
./filters/configure.in.mid
5
./filters/chalk/configure.in.in
9
./filters/chalk/configure.in.in
Lines 31-40 configure.in.in Link Here
31
./kexi/plugins/macros/configure.in.in
35
./kexi/plugins/macros/configure.in.in
32
./kivio/configure.in.in
36
./kivio/configure.in.in
33
./kpresenter/configure.in.in
37
./kpresenter/configure.in.in
34
./chalk/configure.in.bot
35
./chalk/configure.in.in
36
./chalk/plugins/configure.in.in
37
./chalk/plugins/viewplugins/imagesize/configure.in.in
38
./kspread/plugins/calculator/configure.in.in
38
./kspread/plugins/calculator/configure.in.in
39
./kword/mailmerge/configure.in.in
39
./kword/mailmerge/configure.in.in
40
./lib/configure.in.in
40
./lib/configure.in.in
(-)a/configure.in (-2701 lines)
Lines 1-2701 Link Here
1
dnl =======================================================
2
dnl FILE: ./admin/configure.in.min
3
dnl =======================================================
4
5
dnl    This file is part of the KDE libraries/packages
6
dnl    Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
7
 
8
dnl    This file is free software; you can redistribute it and/or
9
dnl    modify it under the terms of the GNU Library General Public
10
dnl    License as published by the Free Software Foundation; either
11
dnl    version 2 of the License, or (at your option) any later version.
12
 
13
dnl    This library is distributed in the hope that it will be useful,
14
dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
dnl    Library General Public License for more details.
17
 
18
dnl    You should have received a copy of the GNU Library General Public License
19
dnl    along with this library; see the file COPYING.LIB.  If not, write to
20
dnl    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
dnl    Boston, MA 02110-1301, USA.
22
23
# Original Author was Kalle@kde.org
24
# I lifted it in some mater. (Stephan Kulow)
25
# I used much code from Janos Farkas
26
27
dnl Process this file with autoconf to produce a configure script.
28
29
AC_INIT(acinclude.m4) dnl a source file from your sub dir
30
31
dnl This is so we can use kde-common
32
AC_CONFIG_AUX_DIR(admin)
33
34
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
35
unset CDPATH
36
37
dnl Checking host/target/build systems, for make, install etc.
38
AC_CANONICAL_SYSTEM 
39
dnl Perform program name transformation
40
AC_ARG_PROGRAM
41
42
dnl Automake doc recommends to do this only here. (Janos)
43
AM_INIT_AUTOMAKE(koffice, "1.6.3") dnl searches for some needed programs
44
45
AM_MAINTAINER_MODE
46
47
KDE_SET_PREFIX
48
49
dnl generate the config header
50
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
51
52
dnl Checks for programs.
53
AC_CHECK_COMPILERS
54
AC_ENABLE_SHARED(yes)
55
AC_ENABLE_STATIC(no)
56
KDE_PROG_LIBTOOL
57
58
dnl for NLS support. Call them in this order!
59
dnl WITH_NLS is for the po files
60
AM_KDE_WITH_NLS
61
62
KDE_USE_QT(3.3)
63
AC_PATH_KDE
64
dnl =======================================================
65
dnl FILE: configure.in.in
66
dnl =======================================================
67
68
#MIN_CONFIG(3.3)
69
70
# Remember to synchronize the version number with the file koffice/lib/kofficecore/kofficeversion.h
71
dnl PACKAGE set before
72
73
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
74
75
AC_CHECK_HEADERS(unistd.h sys/param.h floatingpoint.h paths.h)
76
AC_C_BIGENDIAN
77
AC_CHECK_KDEMAXPATHLEN
78
79
KDE_INIT_DOXYGEN([The KOffice API Reference], [Version $VERSION])
80
81
# Check for GraphicsMagick...
82
83
have_graphicsmagick=no
84
KDE_FIND_PATH(GraphicsMagick-config, GRAPHICS_MAGICK_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
85
  AC_MSG_WARN([Could not find GraphicsMagick anywhere, check http://www.graphicsmagick.org/ for GraphicsMagick >= 1.1.7.])
86
])
87
88
if test -n "$GRAPHICS_MAGICK_CONFIG"; then
89
 vers=`$GRAPHICS_MAGICK_CONFIG --version 2>/dev/null | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
90
  if test -n "$vers" && test "$vers" -ge 1001007;  then
91
     LIBGMAGICK_LIBS="`$GRAPHICS_MAGICK_CONFIG --libs`"
92
     LIBGMAGICK_LDFLAGS="`$GRAPHICS_MAGICK_CONFIG --ldflags`"
93
     LIBGMAGICK_RPATH=
94
     for args in $LIBGMAGICK_LIBS; do
95
	  case $args in
96
	    -L*)
97
  	       LIBGMAGICK_RPATH="$LIBMAGICK_RPATH $args"
98
 	       ;;
99
          esac
100
     done
101
     LIBGMAGICK_RPATH=`echo $LIBGMAGICK_RPATH | $SED -e "s/-L/-R/g"`
102
     LIBGMAGICK_CPPFLAGS="`$GRAPHICS_MAGICK_CONFIG --cppflags`"
103
     AC_DEFINE(HAVE_GMAGICK,1, [GraphicsMagick is available])
104
     have_graphicsmagick=yes
105
  else
106
     AC_MSG_WARN([You need at least GraphicsMagick 1.1.7])
107
  fi
108
109
fi
110
111
if test ! "$USE_RPATH" = "yes"; then
112
    LIBGMAGICK_RPATH=
113
fi
114
115
AC_SUBST(LIBGMAGICK_LIBS)
116
AC_SUBST(LIBGMAGICK_LDFLAGS)
117
AC_SUBST(LIBGMAGICK_CPPFLAGS)
118
AC_SUBST(LIBGMAGICK_RPATH)
119
AM_CONDITIONAL(include_graphicsmagick_filter, test "$have_graphicsmagick" = "yes" -a HAVE_GMAGICK)
120
121
# End of GraphicsMagick check
122
123
# Check for ImageMagick...
124
125
have_imagemagick=no
126
KDE_FIND_PATH(Magick-config, MAGICK_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
127
  AC_MSG_WARN([Could not find ImageMagick anywhere, check http://www.imagemagick.org/ for ImageMagick >= 5.5.2.])
128
])
129
130
if test -n "$MAGICK_CONFIG"; then
131
  vers=`$MAGICK_CONFIG --version 2>/dev/null | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
132
  if test -n "$vers" && test "$vers" -ge 5005002 
133
  then
134
     if test "$vers" -ge 6000003
135
     then
136
        AC_DEFINE(HAVE_MAGICK6, 1, [ImageMagick Version 6])
137
     fi
138
     if test "$vers" -ge 6001000
139
     then
140
        AC_DEFINE(HAVE_MAGICK61, 1, [ImageMagick Version 6.1])
141
     fi
142
     LIBMAGICK_LIBS="`$MAGICK_CONFIG --libs`"
143
     LIBMAGICK_LDFLAGS="`$MAGICK_CONFIG --ldflags`"
144
     LIBMAGICK_RPATH=
145
     for args in $LIBMAGICK_LIBS; do
146
	  case $args in
147
	    -L*)
148
  	       LIBMAGICK_RPATH="$LIBMAGICK_RPATH $args"
149
 	       ;;
150
          esac
151
     done
152
     LIBMAGICK_RPATH=`echo $LIBMAGICK_RPATH | $SED -e "s/-L/-R/g"`
153
     LIBMAGICK_CPPFLAGS="`$MAGICK_CONFIG --cppflags`"
154
     AC_DEFINE(HAVE_MAGICK,1, [ImageMagick is available])
155
     have_imagemagick=yes
156
  else
157
     AC_MSG_WARN([You need at least ImageMagick 5.5.2])
158
  fi
159
fi
160
161
if test ! "$USE_RPATH" = "yes"; then
162
    LIBMAGICK_RPATH=
163
fi
164
165
AC_SUBST(LIBMAGICK_LIBS)
166
AC_SUBST(LIBMAGICK_LDFLAGS)
167
AC_SUBST(LIBMAGICK_CPPFLAGS)
168
AC_SUBST(LIBMAGICK_RPATH)
169
AM_CONDITIONAL(include_imagemagick_filter, test "$have_imagemagick" = "yes" -a HAVE_MAGICK61 -a ! "$have_graphicsmagick" = "yes" -a ! HAVE_GMAGICK)
170
171
# End of ImageMagick check
172
173
##########################################################################
174
# This last check is copied from kdenonbeta/gsf/configure.in.in
175
##########################################################################
176
# KOFFICE_PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
177
# defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
178
# also defines GSTUFF_PKG_ERRORS on error
179
# Note: This is specially tweaked for karbon's fontconfig check. Please fix
180
# it before using it for other tests :-)
181
AC_DEFUN([KOFFICE_PKG_CHECK_MODULES], [
182
  succeeded=no
183
184
  if test -z "$PKG_CONFIG"; then
185
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
186
  fi
187
188
  if test "$PKG_CONFIG" = "no" ; then
189
     echo "*** The pkg-config script could not be found. Make sure it is"
190
     echo "*** in your path, or set the PKG_CONFIG environment variable"
191
     echo "*** to the full path to pkg-config."
192
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
193
     echo "***"
194
     echo "*** Due to that we can't perform the check for fontconfig..."    # added for karbon (Werner)
195
  else
196
     PKG_CONFIG_MIN_VERSION=0.9.0
197
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
198
        AC_MSG_CHECKING(for $2)
199
200
        if $PKG_CONFIG --exists "$2" ; then
201
            AC_MSG_RESULT(yes)
202
            succeeded=yes
203
204
            AC_MSG_CHECKING($1_CFLAGS)
205
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
206
            AC_MSG_RESULT($$1_CFLAGS)
207
208
            AC_MSG_CHECKING($1_LIBS)
209
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
210
            AC_MSG_RESULT($$1_LIBS)
211
        else
212
            $1_CFLAGS=""
213
            $1_LIBS=""
214
            ## If we have a custom action on failure, don't print errors, but 
215
            ## do set a variable so people can do so.
216
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
217
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
218
        fi
219
220
        AC_SUBST($1_CFLAGS)
221
        AC_SUBST($1_LIBS)
222
     else
223
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
224
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
225
     fi
226
  fi
227
228
  if test $succeeded = yes; then
229
     ifelse([$3], , :, [$3])
230
#  else                           # removed for karbon (Werner)
231
#    ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
232
  fi
233
])
234
235
# --- Check for KDE 3.2 or 3.3 ---
236
237
AC_MSG_CHECKING([for KDE version])
238
239
AC_LANG_SAVE
240
AC_LANG_CPLUSPLUS
241
kdeversion_save_CXXFLAGS="$CXXFLAGS"
242
kdeversion_safe_LIBS="$LIBS"
243
LIBS="$LIBS $X_EXTRA_LIBS"
244
CXXFLAGS="$CXXFLAGS $all_includes"
245
246
AC_COMPILE_IFELSE([
247
#include <kdeversion.h>
248
#if ! ( KDE_IS_VERSION( 3, 2, 90 ) )
249
#error KDE 3.2
250
#endif
251
],
252
	need_trinity2_compat="no"
253
,
254
	need_trinity2_compat="yes"
255
)
256
257
AC_COMPILE_IFELSE([
258
#include <kdeversion.h>
259
#if ! ( KDE_IS_VERSION( 3, 3, 90 ) )
260
#error KDE 3.3
261
#endif
262
],
263
	need_trinity3_compat="no"
264
,
265
	need_trinity3_compat="yes"
266
)
267
268
AC_COMPILE_IFELSE([
269
#include <kdeversion.h>
270
#if ! ( KDE_IS_VERSION( 3, 4, 90 ) )
271
#error KDE 3.4
272
#endif
273
],
274
	need_trinity4_compat="no"
275
,
276
	need_trinity4_compat="yes"
277
)
278
279
AC_COMPILE_IFELSE([
280
#include <kdeversion.h>
281
#if ! ( KDE_IS_VERSION( 3, 5, 2 ) )
282
#error KDE 3.5.x (x < 2)
283
#endif
284
],
285
	need_trinity51_compat="no"
286
,
287
	need_trinity51_compat="yes"
288
)
289
CXXFLAGS="$kdeversion_save_CXXFLAGS"
290
LIBS="$kdeversion_safe_LIBS"
291
AC_LANG_RESTORE
292
293
if test "$need_trinity2_compat" = "yes"; then
294
	AC_MSG_RESULT([KDE 3.2.x])
295
else
296
	if test "$need_trinity3_compat" = "yes"; then
297
		AC_MSG_RESULT([KDE 3.3.x])
298
	else 
299
		if test "$need_trinity4_compat" = "yes"; then
300
			AC_MSG_RESULT([KDE 3.4.x])
301
                else
302
                        if test "$need_trinity51_compat" = "yes"; then
303
                                AC_MSG_RESULT([KDE 3.5.x (x < 2)])
304
                        else
305
			        AC_MSG_RESULT([KDE 3.5.x (x >=2) or SVN trunk])
306
                        fi
307
		fi
308
	fi
309
fi
310
311
AM_CONDITIONAL(need_trinity2_compatibility, test "$need_trinity2_compat" = "yes")
312
AM_CONDITIONAL(need_trinity3_compatibility, test "$need_trinity3_compat" = "yes")
313
AM_CONDITIONAL(need_trinity4_compatibility, test "$need_trinity4_compat" = "yes")
314
AM_CONDITIONAL(need_trinity51_compatibility, test "$need_trinity51_compat" = "yes")
315
316
# Keep the old KDE 3.1 test, as long as it is still used
317
AM_CONDITIONAL(need_trinity1_compatibility, test "supported" = "no")
318
319
# --- End KDE 3.2 check ---
320
321
# --- OpenEXR check ---
322
323
KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
324
  AC_MSG_WARN([Could not find pkg-config])
325
])
326
327
AC_MSG_CHECKING([for OpenEXR])
328
329
if test -n "$PKGCONFIG"; then
330
  vers=`$PKGCONFIG OpenEXR --modversion 2>/dev/null`
331
  if test -n "$vers"
332
  then
333
     OPENEXR_LIBS="`$PKGCONFIG OpenEXR --libs`"
334
     OPENEXR_RPATH=
335
     for args in $OPENEXR_LIBS; do
336
          case $args in
337
            -L*)
338
               OPENEXR_RPATH="$OPENEXR_RPATH $args"
339
               ;;
340
          esac
341
     done
342
     OPENEXR_RPATH=`echo $OPENEXR_RPATH | $SED -e "s/-L/-R/g"`
343
     OPENEXR_CFLAGS="`$PKGCONFIG OpenEXR --cflags`"
344
345
     AC_DEFINE_UNQUOTED(HAVE_OPENEXR, 1, [Defines if your system has the OpenEXR library])
346
  fi
347
fi
348
349
if test ! "$USE_RPATH" = "yes"; then
350
    OPENEXR_RPATH=
351
fi
352
353
if test -n "$OPENEXR_LIBS"
354
then
355
  AC_MSG_RESULT([yes])
356
else
357
  AC_MSG_RESULT([not found])
358
fi
359
360
AC_SUBST(OPENEXR_LIBS)
361
AC_SUBST(OPENEXR_CFLAGS)
362
AC_SUBST(OPENEXR_RPATH)
363
364
AM_CONDITIONAL(have_openexr, test -n "$OPENEXR_LIBS")
365
366
# --- End of OpenEXR check ---
367
dnl =======================================================
368
dnl FILE: ./example/configure.in.in
369
dnl =======================================================
370
371
dnl This is here so that example isn't compiled and intalled by default.
372
dnl Do NOT put this file in your application, if you want it compiled !
373
374
DO_NOT_COMPILE="$DO_NOT_COMPILE example"
375
dnl =======================================================
376
dnl FILE: ./filters/chalk/configure.in.in
377
dnl =======================================================
378
379
# Check if the tiff lib is available
380
AC_FIND_TIFF
381
AM_CONDITIONAL(have_tiff, test -n "$LIBTIFF")
382
383
AC_FIND_PNG
384
AM_CONDITIONAL(have_png, test -n "$LIBPNG")
385
386
AC_FIND_JPEG
387
AM_CONDITIONAL(have_jpeg, test -n "$LIBJPEG")
388
389
#---------------------------------------------------------
390
# libexif detection
391
# taken from libkexif's configure.in.in
392
#---------------------------------------------------------
393
394
LIBEXIF=no
395
396
#PKG_CHECK_MODULES(LIBEXIF, libexif >= 0.5.7, ,
397
#        [ AC_MSG_WARN([libexif >= 0.5.7 not found.])
398
#          LIBEXIF=yes ])
399
400
401
#PKG_CHECK_MODULES(LIBEXIF06, libexif >= 0.6.9,
402
#        AC_DEFINE(HAVE_EXIF06,1,[check for libexif > 0.6]),
403
#                AC_MSG_WARN([Using old version of libexif.]))
404
405
PKG_CHECK_MODULES(LIBEXIF, libexif >= 0.6.12 , ,
406
        [ AC_MSG_WARN([libexif >= 0.6.12 not found.])
407
          LIBEXIF=yes ])
408
409
AC_SUBST(LIBEXIF_LIBS)
410
AC_SUBST(LIBEXIF_CFLAGS)
411
412
#---------------------------------------------------------
413
# libexif detection
414
#---------------------------------------------------------
415
AC_MSG_CHECKING([if C++ program with exif can be compiled])
416
AC_LANG_SAVE
417
AC_LANG_CPLUSPLUS
418
ac_save_CXXFLAGS="$CXXFLAGS"
419
CXXFLAGS="$CXXFLAGS $LIBEXIF_CFLAGS"
420
AC_CACHE_VAL(exif_build,
421
[
422
    AC_TRY_COMPILE([
423
    extern "C" {
424
#include <libexif/exif-loader.h>
425
#include <libexif/exif-utils.h>
426
}
427
    ],[
428
        ExifLoader *l = exif_loader_new ();
429
        exif_loader_write_file (l,"kikoo");
430
        return 0;
431
    ], exif_build=yes,
432
    exif_build=no)
433
])
434
AC_MSG_RESULT($exif_build)
435
if test "$exif_build" = "no"; then
436
    LIBEXIF=""
437
fi
438
CXXFLAGS="$ac_save_CXXFLAGS"
439
AC_LANG_RESTORE
440
441
                
442
AM_CONDITIONAL(have_exif, test -n "$LIBEXIF")
443
AM_CONDITIONAL(include_jpeg_filter, test -n "$LIBJPEG" -a -n "$LIBEXIF")
444
AM_CONDITIONAL(include_tiff_filter, test -n "$LIBTIFF" -a -n "$LIBEXIF")
445
dnl =======================================================
446
dnl FILE: ./filters/chalk/pdf/configure.in.in
447
dnl =======================================================
448
449
# Compile the pdf import filter only if Poppler is available
450
PKG_CHECK_MODULES(POPPLER, poppler-tqt >= 0.5.1, have_poppler=yes, have_poppler=no)
451
452
AM_CONDITIONAL(include_PDF, test "x$have_poppler" = xyes) 
453
dnl =======================================================
454
dnl FILE: ./filters/kword/msword/configure.in.in
455
dnl =======================================================
456
457
AC_ARG_WITH(libwv2,AC_HELP_STRING([--with-libwv2=DIR],[use libwv2 in DIR]),[
458
	if [ test "x$withval" != "xno" ]; then
459
		if [ test "x$withval" != "xyes" ]; then
460
			WV2_DIR=$withval
461
		fi
462
		search_for_wv2=yes
463
	else
464
		search_for_wv2=no
465
	fi
466
],[	search_for_wv2=yes
467
])
468
469
if [ test $search_for_wv2 != no ]; then
470
	if [ test -n "$WV2_DIR" ]; then
471
		KDE_FIND_PATH(wv2-config, WV2_CONFIG, [$WV2_DIR/bin], [
472
		  AC_MSG_WARN([Could not find libwv2, check http://www.sourceforge.net/projects/wvware/])
473
		])
474
	else
475
		KDE_FIND_PATH(wv2-config, WV2_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
476
		  AC_MSG_WARN([Could not find libwv2 anywhere, check http://www.sourceforge.net/projects/wvware/])
477
		])
478
	fi
479
fi
480
481
if test -n "$WV2_CONFIG"; then
482
  vers=`$WV2_CONFIG --version 2>/dev/null | $SED -e 's/libwv2 //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
483
  if test -n "$vers" && test "$vers" -ge 1009
484
  then
485
     LIBWV2_LIBS="`$WV2_CONFIG --libs`"
486
     LIBWV2_RPATH=
487
     for args in $LIBWV2_LIBS; do
488
	  case $args in
489
	    -L*)
490
  	       LIBWV2_RPATH="$LIBWV2_RPATH $args"
491
 	       ;;
492
          esac
493
     done
494
     LIBWV2_RPATH=`echo $LIBWV2_RPATH | $SED -e "s/-L/-R/g"`
495
     LIBWV2_CFLAGS="`$WV2_CONFIG --cflags`"
496
497
     AC_DEFINE_UNQUOTED(HAVE_WV2, 1, [Defines if your system has the wv2 library])
498
  else
499
     AC_MSG_WARN([You need at least version 0.1.9 of libwv2])
500
  fi
501
fi
502
503
504
AC_SUBST(LIBWV2_LIBS)
505
AC_SUBST(LIBWV2_CFLAGS)
506
AC_SUBST(LIBWV2_RPATH)
507
AM_CONDITIONAL(include_wv2_msword_filter, test -n "$LIBWV2_LIBS")
508
dnl =======================================================
509
dnl FILE: ./filters/kword/pdf/xpdf/configure.in.in
510
dnl =======================================================
511
512
513
AC_HEADER_DIRENT
514
AC_HEADER_STDC
515
AC_CHECK_FUNCS(rewinddir popen mkstemp)
516
517
dnl ##### Check for fseeko/ftello or fseek64/ftell64
518
dnl The LARGEFILE and FSEEKO macros have to be called in C, not C++, mode.
519
AC_SYS_LARGEFILE
520
AC_FUNC_FSEEKO
521
AC_CHECK_FUNCS(fseek64)
522
AC_CHECK_FUNCS(ftell64)
523
524
dnl ##### Check for libpaper (Debian).
525
KDE_CHECK_HEADERS(paper.h)
526
KDE_CHECK_LIB(paper, paperinit, [LIBPAPER="-lpaper"])
527
AC_SUBST(LIBPAPER)
528
dnl =======================================================
529
dnl FILE: ./filters/kword/wordperfect/configure.in.in
530
dnl =======================================================
531
532
KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
533
  AC_MSG_WARN([Could not find pkg-config])
534
])
535
536
if test -n "$PKGCONFIG"; then
537
  vers=`$PKGCONFIG libwpd-0.8 --modversion 2>/dev/null`
538
  if test -n "$vers"
539
  then
540
     LIBWPD_LIBS="`$PKGCONFIG libwpd-0.8 --libs`"
541
     LIBWPD_RPATH=
542
     for args in $LIBWPD_LIBS; do
543
          case $args in
544
            -L*)
545
               LIBWPD_RPATH="$LIBWPD_RPATH $args"
546
               ;;
547
          esac
548
     done
549
     LIBWPD_RPATH=`echo $LIBWPD_RPATH | $SED -e "s/-L/-R/g"`
550
     LIBWPD_CFLAGS="`$PKGCONFIG libwpd-0.8 --cflags`"
551
552
     AC_DEFINE_UNQUOTED(HAVE_WPD, 1, [Defines if your system has the libwpd library])
553
  fi
554
fi
555
556
557
AC_SUBST(LIBWPD_LIBS)
558
AC_SUBST(LIBWPD_CFLAGS)
559
AC_SUBST(LIBWPD_RPATH)
560
561
AM_CONDITIONAL(include_wpd_filter, test -n "$LIBWPD_LIBS")
562
563
dnl =======================================================
564
dnl FILE: ./filters/xsltfilter/configure.in.in
565
dnl =======================================================
566
567
568
KDE_FIND_PATH(xml2-config, XML_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
569
  AC_MSG_WARN([Could not find libxml2 anywhere, check ftp://xmlsoft.org/ for libxml >= 2.4.8. (we also keep a version of it in kdesupport for CVS users' convience)])
570
  HELP_SUBDIR=
571
])
572
573
if test -n "$XML_CONFIG"; then
574
  vers=`$XML_CONFIG --version 2>/dev/null | $SED -e 's/libxml //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
575
  if test -n "$vers" && test "$vers" -ge 2004008
576
  then
577
     LIBXML_LIBS="`$XML_CONFIG --libs`"
578
     LIBXML_RPATH=
579
     for args in $LIBXML_LIBS; do
580
	  case $args in
581
	    -L*)
582
  	       LIBXML_RPATH="$LIBXML_RPATH $args"
583
 	       ;;
584
          esac
585
     done
586
     LIBXML_RPATH=`echo $LIBXML_RPATH | $SED -e "s/-L/-R/g"`
587
     LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
588
589
     KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [XMLLINT=""])
590
     AC_DEFINE_UNQUOTED(XMLLINT, "$XMLLINT", [Defines the executable of xmllint])
591
  else
592
     AC_MSG_WARN([You need at least libxml 2.4.8])
593
     HELP_SUBDIR=
594
  fi
595
fi
596
597
KDE_FIND_PATH(xslt-config, XSLT_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
598
  AC_MSG_WARN([Could not find libxslt anywhere, check ftp://xmlsoft.org/ for libxslt >= 1.0.7. (we also keep a version of it in kdesupport for CVS users' convience)])
599
  HELP_SUBDIR=
600
])
601
602
if test -n "$XSLT_CONFIG"; then
603
   vers=`$XSLT_CONFIG --version 2>/dev/null | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
604
   if test -n "$vers" && test "$vers" -ge 1000007; then
605
     LIBXSLT_LIBS="`$XSLT_CONFIG --libs`"
606
     LIBXSLT_RPATH=
607
     for args in $LIBXSLT_LIBS; do
608
       case $args in
609
        -L*)
610
  	  LIBXSLT_RPATH="$LIBXSLT_RPATH $args"
611
 	  ;;
612
       esac
613
     done
614
     LIBXSLT_RPATH=`echo $LIBXSLT_RPATH | $SED -e "s/-L/-R/g"`
615
     LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
616
617
   else
618
     AC_MSG_WARN([You need at least libxslt 1.0.7])
619
     HELP_SUBDIR=
620
   fi
621
fi
622
623
if test ! "$USE_RPATH" = "yes"; then
624
    LIBXSLT_RPATH=
625
    LIBXML_RPATH=
626
fi
627
628
AC_SUBST(LIBXSLT_LIBS)
629
AC_SUBST(LIBXSLT_CFLAGS)
630
AC_SUBST(LIBXSLT_RPATH)
631
632
AC_SUBST(LIBXML_LIBS)
633
AC_SUBST(LIBXML_CFLAGS)
634
AC_SUBST(LIBXML_RPATH)
635
636
AM_CONDITIONAL(include_XSLTFILTERS, test -n "$LIBXML_LIBS" -a -n "$LIBXSLT_LIBS")
637
dnl =======================================================
638
dnl FILE: ./karbon/configure.in.in
639
dnl =======================================================
640
641
642
KDE_FIND_PATH(freetype-config, FREETYPE_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
643
  AC_MSG_WARN([Could not find libfreetype anywhere, check http://www.freetype.org/])
644
])
645
646
if test -n "$FREETYPE_CONFIG"; then
647
  vers=`$FREETYPE_CONFIG --version 2>/dev/null | $SED -e 's/libfreetype //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
648
  if test -n "$vers" && test "$vers" -ge 5000000
649
  then
650
     LIBFREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
651
     LIBFREETYPE_RPATH=
652
     for args in $LIBFREETYPE_LIBS; do
653
	  case $args in
654
	    -L*)
655
  	       LIBFREETYPE_RPATH="$LIBFREETYPE_RPATH $args"
656
 	       ;;
657
          esac
658
     done
659
     LIBFREETYPE_RPATH=`echo $LIBFREETYPE_RPATH | $SED -e "s/-L/-R/g"`
660
     LIBFREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
661
  else
662
     AC_MSG_WARN([You need at least libfreetype 5.0])
663
  fi
664
fi
665
666
AC_SUBST(LIBFREETYPE_LIBS)
667
AC_SUBST(LIBFREETYPE_CFLAGS)
668
AC_SUBST(LIBFREETYPE_RPATH)
669
670
671
KDE_FIND_PATH(libart2-config, LIBART_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
672
  AC_MSG_WARN([Could not find libart anywhere, check http://www.levien.com/libart/])
673
])
674
675
if test -n "$LIBART_CONFIG"; then
676
  vers=`$LIBART_CONFIG --version 2>/dev/null | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
677
  if test -n "$vers" && test "$vers" -ge 2003008
678
  then
679
     LIBART_LIBS="`$LIBART_CONFIG --libs`"
680
     LIBART_RPATH=
681
     for args in $LIBART_LIBS; do
682
	  case $args in
683
	    -L*)
684
  	       LIBART_RPATH="$LIBART_RPATH $args"
685
 	       ;;
686
          esac
687
     done
688
     LIBART_RPATH=`echo $LIBART_RPATH | $SED -e "s/-L/-R/g"`
689
     LIBART_CFLAGS="`$LIBART_CONFIG --cflags`"
690
691
     AC_DEFINE_UNQUOTED(HAVE_LIBART, 1, [Defines if your system has the libart library])
692
  else
693
     AC_MSG_WARN([You need at least libart 2.3.8])
694
  fi
695
fi
696
697
AC_SUBST(LIBART_LIBS)
698
AC_SUBST(LIBART_CFLAGS)
699
AC_SUBST(LIBART_RPATH)
700
701
702
# Check for fontconfig
703
KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
704
        KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
705
            AC_MSG_WARN([Could not find neither pkg-config nor fontconfig-config, check http://www.fontconfig.org/ ])
706
        ])
707
])
708
709
if test -n "$PKGCONFIG"; then
710
  vers=`$PKGCONFIG fontconfig --modversion 2>/dev/null | $SED -e 's/libfontconfig //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
711
  if test -n "$vers" && test "$vers" -ge 1000001
712
  then
713
     LIBFONTCONFIG_LIBS="`$PKGCONFIG fontconfig --libs`"
714
     LIBFONTCONFIG_RPATH=
715
     for args in $LIBFONTCONFIG_LIBS; do
716
          case $args in
717
            -L*)
718
               LIBFONTCONFIG_RPATH="$LIBFONTCONFIG_RPATH $args"
719
               ;;
720
          esac
721
     done
722
     LIBFONTCONFIG_RPATH=`echo $LIBFONTCONFIG_RPATH | $SED -e "s/-L/-R/g"`
723
     LIBFONTCONFIG_CFLAGS="`$PKGCONFIG fontconfig --cflags`"
724
725
     AC_DEFINE_UNQUOTED(HAVE_FONTCONFIG, 1, [Defines if your system has the libfontconfig library])
726
  fi
727
fi
728
729
if test -n "$FONTCONFIG_CONFIG"; then
730
  vers=`$FONTCONFIG_CONFIG --version 2>/dev/null | $SED -e 's/libfontconfig //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
731
  if test -n "$vers" && test "$vers" -ge 1000001
732
  then
733
     LIBFONTCONFIG_LIBS="`$FONTCONFIG_CONFIG --libs`"
734
     LIBFONTCONFIG_RPATH=
735
     for args in $LIBFONTCONFIG_LIBS; do
736
          case $args in
737
            -L*)
738
               LIBFONTCONFIG_RPATH="$LIBFONTCONFIG_RPATH $args"
739
               ;;
740
          esac
741
     done
742
     LIBFONTCONFIG_RPATH=`echo $LIBFONTCONFIG_RPATH | $SED -e "s/-L/-R/g"`
743
     LIBFONTCONFIG_CFLAGS="`$FONTCONFIG_CONFIG --cflags`"
744
745
     AC_DEFINE_UNQUOTED(HAVE_FONTCONFIG, 1, [Defines if your system has the libfontconfig library])
746
  fi
747
fi
748
749
AC_SUBST(LIBFONTCONFIG_LIBS)
750
AC_SUBST(LIBFONTCONFIG_CFLAGS)
751
AC_SUBST(LIBFONTCONFIG_RPATH)
752
753
if test -z "$LIBART_LIBS"; then
754
	DO_NOT_COMPILE="$DO_NOT_COMPILE karbon"
755
fi
756
757
if test -n "$LIBFREETYPE_LIBS" -a -n "$LIBFONTCONFIG_LIBS"; then
758
	AC_DEFINE_UNQUOTED(HAVE_KARBONTEXT, 1, [Defines if your system has the fontconfig and freetype libraries])
759
fi
760
dnl =======================================================
761
dnl FILE: ./kexi/3rdparty/configure.in.in
762
dnl =======================================================
763
764
dnl This is copied from gpsim-0.21.1/acinclude.m4, which was itself
765
dnl copied from the NcFTP distribution. 
766
dnl Modified by David Faure <faure@kde.org> for kexi's purposes.
767
dnl
768
dnl  Original author Mike Gleason mgleason@NcFTP.com
769
dnl
770
dnl
771
AC_DEFUN([kexi_LIB_READLINE], [
772
AC_MSG_CHECKING([for Readline library])
773
774
kexi_cv_lib_readline=no
775
ac_save_LIBS="$LIBS"
776
# Note: $LIBCURSES is permitted to be empty.
777
for LIBREADLINE in "-lreadline" "-lreadline $LIBCURSES" "-lreadline -ltermcap" "-lreadline -lncurses" "-lreadline -lcurses"
778
do
779
	LIBS="$ac_save_LIBS $LIBREADLINE"
780
	AC_TRY_RUN([
781
	/* program */
782
#include <stdio.h>
783
#include <stdlib.h>
784
#include <readline/readline.h>
785
 
786
main(int argc, char **argv)
787
{
788
	/* Note:  don't actually call readline, since it may block;
789
	 * We just want to see if it (dynamic) linked in okay.
790
	 */
791
	if (argc == 0)	/* never true */
792
		readline(0);
793
	exit(0);
794
}
795
],[
796
	# action if true
797
	kexi_cv_lib_readline=yes
798
],[
799
	# action if false
800
	kexi_cv_lib_readline=no
801
],[
802
	# action if cross compiling
803
	kexi_cv_lib_readline=no
804
])
805
806
	if test "$kexi_cv_lib_readline" = yes ; then break ; fi
807
done
808
# restore LIBS
809
LIBS="$ac_save_LIBS"
810
811
if test "$kexi_cv_lib_readline" = no ; then
812
	LIBREADLINE=""
813
	AC_MSG_RESULT("not found - kexisql will not be compiled")
814
else
815
	AC_MSG_RESULT($LIBREADLINE)
816
	AC_DEFINE(HAVE_READLINE, 1, [define if you have libreadline available])
817
fi
818
819
AM_CONDITIONAL(have_readline, test "$kexi_cv_lib_readline" = "yes")
820
AC_SUBST(LIBREADLINE)
821
])
822
823
kexi_LIB_READLINE
824
dnl =======================================================
825
dnl FILE: ./kexi/configure.in.in
826
dnl =======================================================
827
828
829
#KEXI_VERSION=
830
AC_SUBST(LIB_KEXI_KMDI, '-lkmdi')
831
AC_SUBST(LIB_KEXI_KMDI_INCLUDES, '')
832
833
dnl =======================================================
834
dnl FILE: ./kexi/kexidb/drivers/configure.in.in
835
dnl =======================================================
836
837
dnl ========================================
838
dnl checks for MySQL
839
dnl taken form KDEDB
840
dnl ========================================
841
842
AC_ARG_ENABLE(mysql,
843
	AC_HELP_STRING([--enable-mysql],[build MySQL-plugin [default=yes]]),
844
              mysql_plugin=$enableval, mysql_plugin=yes)
845
846
if test "x$mysql_plugin" = "xyes"; then
847
  compile_mysql_plugin="yes"
848
else
849
  compile_mysql_plugin="no"
850
fi
851
852
AC_ARG_WITH(mysql_includes,
853
AC_HELP_STRING([--with-mysql-includes=DIR],[use MySQL-includes installed in this directory]),
854
[
855
  ac_mysql_incdir=$withval
856
], ac_mysql_incdir=
857
)
858
859
AC_ARG_WITH(mysql_libraries,
860
AC_HELP_STRING([--with-mysql-libraries=DIR],[use MySQL-libs installed in this directory ]),
861
[
862
  ac_mysql_libdir=$withval
863
], ac_mysql_libdir=
864
)
865
866
dnl ==============================================
867
dnl check whether MySQL should be compiled
868
dnl and where headers and libraries are installed
869
dnl if present compile mysql-plugin
870
dnl ==============================================
871
872
AC_MSG_CHECKING([for MySQL])
873
874
if test "$compile_mysql_plugin" = "yes"; then
875
  if test -n "$ac_mysql_incdir" -o -n "$ac_mysql_libdir"; then
876
dnl *** Configure arguments for includes or libs given    ***
877
dnl *** and MySQL not explicitly disabled.                ***
878
dnl *** Check that the paths given to configure are valid ***
879
    AC_MSG_CHECKING([for MySQL headers])
880
    mysql_incdirs="$ac_mysql_incdir /usr/local/include /usr/include"
881
    AC_FIND_FILE(mysql/mysql.h, $mysql_incdirs, mysql_incdir)
882
    if test -r $mysql_incdir/mysql/mysql.h; then
883
      MYSQL_INC=$mysql_incdir
884
      AC_MSG_RESULT([$MYSQL_INC])
885
      AC_SUBST(MYSQL_INC)
886
    else
887
      compile_mysql_plugin="no"
888
      AC_MSG_RESULT([not found])
889
    fi
890
891
    AC_MSG_CHECKING([for MySQL libraries])
892
    mysql_libdirs="$ac_mysql_libdir /usr/local/lib$kdelibsuff /usr/lib$kdelibsuff"
893
    AC_FIND_FILE(mysql/libmysqlclient.so, $mysql_libdirs, mysql_libdir)
894
    if test -r $mysql_libdir/mysql/libmysqlclient.so; then
895
      MYSQL_LIBS=$mysql_libdir
896
      AC_MSG_RESULT([$MYSQL_LIBS])
897
      AC_SUBST(MYSQL_LIBS)
898
    else
899
      compile_mysql_plugin="no"
900
      AC_MSG_RESULT([not found])
901
    fi
902
  else
903
dnl *** No configure arguments for includes or libs given ***
904
dnl *** and MySQL not explicitly disabled.                ***
905
    KDE_FIND_PATH(mysql_config, MYSQL_CONFIG,
906
      [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /usr/bin ], [
907
      AC_MSG_RESULT([not found])
908
    ])
909
910
    if test -n "$MYSQL_CONFIG"; then
911
      mysql_incdir=`$MYSQL_CONFIG --cflags| $SED -e "s,-I,,g" | cut -d " " -f 1`
912
      mysql_libdir=`$MYSQL_CONFIG --libs| $SED -e "s,',,g"`
913
      MYSQL_INC=$mysql_incdir
914
      MYSQL_LIBS=$mysql_libdir
915
      AC_SUBST(MYSQL_INC)
916
      AC_SUBST(MYSQL_LIBS)
917
      compile_mypsql_plugin="yes"
918
      AC_MSG_RESULT([headers $mysql_incdir, libraries $mysql_libdir])
919
    else
920
      compile_mysql_plugin="no"
921
    fi
922
  fi
923
else
924
dnl *** MySQL plugin explicitly disabled.            ***
925
dnl *** Show that we are doing as requested.              ***
926
  AC_MSG_NOTICE([Not attempting to configure MySQL as requested])
927
fi
928
929
AM_CONDITIONAL(compile_mysql_plugin, test "$compile_mysql_plugin" = "yes")
930
931
dnl ========================================
932
dnl Checks for PostgreSQL
933
dnl ========================================
934
935
dnl ========================================
936
dnl libpq
937
dnl   Add configure-args
938
dnl ========================================
939
940
dnl Assume we're building until something fails, unless explicitly disabled
941
AC_ARG_ENABLE(pgsql,
942
AC_HELP_STRING([--enable-pgsql],[build PostgreSQL-plugin [default=yes]]),
943
 pgsql_plugin=$enableval, pgsql_plugin=yes)
944
945
if test "x$pgsql_plugin" = "xyes"; then
946
  compile_pgsql_plugin="yes"
947
else
948
  compile_pgsql_plugin="no"
949
fi
950
951
AC_ARG_WITH(pgsql-includes,
952
AC_HELP_STRING([--with-pgsql-includes=DIR],[use PostgreSQL(libpq)-includes installed in this directory ]),
953
[
954
  ac_pgsql_incdir=$withval
955
], ac_pgsql_incdir=
956
)
957
958
AC_ARG_WITH(pgsql-libraries,
959
AC_HELP_STRING([--with-pgsql-libraries=DIR],[use PostgreSQL(libpq)-libraries installed in this directory ]),
960
[
961
  ac_pgsql_libdir=$withval
962
], ac_pgsql_libdir=
963
)
964
965
966
dnl ========================================
967
dnl   header/library directories
968
dnl ========================================
969
970
if test "$compile_pgsql_plugin" = "yes"; then
971
  if test -n "$ac_pgsql_incdir" -o -n "$ac_pgsql_libdir"; then
972
dnl *** Configure arguments for includes or libs given    ***
973
dnl *** and PostgreSQL not explicitly disabled.           ***
974
dnl *** Check that the paths given to configure are valid ***
975
    AC_MSG_CHECKING([for PostgreSQL C API headers])
976
    pgsql_incdirs="$ac_pgsql_incdir /usr/local/include /usr/include"
977
    AC_FIND_FILE(libpq-fe.h, $pgsql_incdirs, pgsql_incdir)
978
    if test -r $pgsql_incdir/libpq-fe.h; then
979
      PG_INCDIR=$pgsql_incdir
980
      AC_MSG_RESULT([$PG_INCDIR])
981
      AC_SUBST(PG_INCDIR)
982
    else
983
      compile_pgsql_plugin="no"
984
      AC_MSG_RESULT([not found])
985
    fi
986
987
    AC_MSG_CHECKING([for PostgreSQL C API libraries])
988
    pgsql_libdirs="$ac_pgsql_libdir /usr/local/lib$kdelibsuff /usr/lib$kdelibsuff"
989
    AC_FIND_FILE(libpq.so, $pgsql_libdirs, pgsql_libdir)
990
    if test -r $pgsql_libdir/libpq.so; then
991
      PG_LIBDIR=$pgsql_libdir
992
      AC_MSG_RESULT([$PG_LIBDIR])
993
      AC_SUBST(PG_LIBDIR)
994
    else
995
      compile_pgsql_plugin="no"
996
      AC_MSG_RESULT([not found])
997
    fi
998
  else
999
dnl *** No configure arguments for includes or libs given ***
1000
dnl *** and PostgreSQL not explicitly disabled.           ***
1001
    KDE_FIND_PATH(pg_config, PG_CONFIG,
1002
      [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /usr/bin ], [
1003
      AC_MSG_RESULT([not found])
1004
    ])
1005
1006
    if test -n "$PG_CONFIG"; then
1007
      pgsql_incdir=`$PG_CONFIG --includedir`
1008
      pgsql_libdir=`$PG_CONFIG --libdir`
1009
      PG_INCDIR=$pgsql_incdir
1010
      PG_LIBDIR=$pgsql_libdir
1011
      AC_SUBST(PG_LIBDIR)
1012
      compile_pgsql_plugin="yes"
1013
      AC_MSG_RESULT([headers $pgsql_incdir, libraries $pgsql_libdir])
1014
    else
1015
      compile_pgsql_plugin="no"
1016
    fi
1017
  fi
1018
else
1019
dnl *** PostgreSQL plugin explicitly disabled.            ***
1020
dnl *** Show that we are doing as requested.              ***
1021
  AC_MSG_NOTICE([Not attempting to configure PostgreSQL as requested])
1022
fi
1023
1024
AM_CONDITIONAL(compile_pgsql_plugin, test "$compile_pgsql_plugin" = "yes")
1025
1026
1027
dnl ========================================
1028
dnl libpqxx checks
1029
dnl ========================================
1030
1031
AC_ARG_WITH(pqxx-includes,
1032
AC_HELP_STRING([--with-pqxx-includes=DIR],[use PostgreSQL(libpqxx)-includes installed in this directory ]),
1033
[
1034
  ac_pqxx_incdir=$withval
1035
], ac_pqxx_incdir=
1036
)
1037
1038
AC_ARG_WITH(pqxx-libraries,
1039
AC_HELP_STRING([--with-pqxx-libraries=DIR],[use PostgreSQL(libpqxx)-libraries installed in this directory ]),
1040
[
1041
  ac_pqxx_libdir=$withval
1042
], ac_pqxx_libdir=
1043
)
1044
1045
1046
dnl ========================================
1047
dnl   libpqxx headers
1048
dnl ========================================
1049
if test "$compile_pgsql_plugin" = "yes"; then
1050
  AC_MSG_CHECKING([for PostgreSQL C++ includes])
1051
  pqxx_incdirs="$ac_pqxx_incdir /usr/local/include /usr/include"
1052
  AC_FIND_FILE(pqxx/pqxx, $pqxx_incdirs, pqxx_incdir)
1053
  if test -r $pqxx_incdir/pqxx/pqxx; then
1054
    PQXX_INCDIR=$pqxx_incdir
1055
    AC_MSG_RESULT([$PQXX_INCDIR])
1056
    AC_SUBST(PQXX_INCDIR)
1057
  else
1058
    compile_pgsql_plugin="no"
1059
    AC_MSG_RESULT([not found])
1060
  fi
1061
fi
1062
1063
dnl ========================================
1064
dnl   libpqxx libraries
1065
dnl ========================================
1066
if test "$compile_pgsql_plugin" = "yes"; then
1067
  AC_MSG_CHECKING([for PostgreSQL C++ libraries])
1068
  pqxx_libdirs="$ac_pqxx_libdir /usr/local/lib$kdelibsuff /usr/lib$kdelibsuff"
1069
  AC_FIND_FILE(libpqxx.so, $pqxx_libdirs, pqxx_libdir)
1070
  if test -r $pqxx_libdir/libpqxx.so; then
1071
    PQXX_LIBDIR=$pqxx_libdir
1072
    AC_MSG_RESULT([$PQXX_LIBDIR])
1073
    AC_SUBST(PQXX_LIBDIR)
1074
  else
1075
    compile_pgsql_plugin="no"
1076
    AC_MSG_RESULT([not found])
1077
  fi
1078
fi
1079
1080
AM_CONDITIONAL(compile_pgsql_plugin, test "$compile_pgsql_plugin" = "yes")
1081
dnl =======================================================
1082
dnl FILE: ./kexi/main/configure.in.in
1083
dnl =======================================================
1084
1085
1086
dnl ======================================
1087
dnl KNewStuff Configuration
1088
dnl ======================================
1089
dnl
1090
dnl Copyright (C) 2004 Josef Spillner <spillner@kde.org>
1091
dnl This file is to be used within KDE's build system.
1092
dnl It defines $(LIB_KNEWSTUFF) if knewstuff has been found,
1093
dnl and a HAVE_KNEWSTUFF #define statement is added.
1094
dnl
1095
1096
AC_MSG_CHECKING([for KDE library: knewstuff])
1097
1098
ac_knewstuff_includes=NO ac_knewstuff_libraries=NO
1099
knewstuff_libraries=""
1100
knewstuff_includes=""
1101
1102
AC_CACHE_VAL(ac_cv_have_knewstuff,
1103
[
1104
AC_FIND_FILE(knewstuff/downloaddialog.h, $kde_incdirs, knewstuff_incdir)
1105
ac_knewstuff_includes="$knewstuff_incdir"
1106
1107
AC_FIND_FILE(libknewstuff.so, $kde_libdirs, knewstuff_libdir)
1108
ac_knewstuff_libraries="$knewstuff_libdir"
1109
1110
if test "$ac_knewstuff_includes" = NO || test "$ac_knewstuff_libraries" = NO; then
1111
  ac_cv_have_knewstuff="have_knewstuff=no"
1112
  ac_knewstuff_notfound=""
1113
else
1114
  have_knewstuff="yes"
1115
fi
1116
])
1117
1118
eval "$ac_cv_have_knewstuff"
1119
1120
if test "$have_knewstuff" != yes; then
1121
  AC_MSG_RESULT([$have_knewstuff])
1122
else
1123
  AC_MSG_RESULT([$have_knewstuff (libraries $ac_knewstuff_libraries, headers $ac_knewstuff_includes)])
1124
1125
dnl  AC_DEFINE_UNQUOTED(HAVE_KNEWSTUFF, 1, [Add KNewStuff functionality.])
1126
  CXXFLAGS="$CXXFLAGS -DHAVE_KNEWSTUFF"
1127
1128
  LIB_KNEWSTUFF='-lknewstuff'
1129
  AC_SUBST(LIB_KNEWSTUFF)
1130
fi
1131
1132
AC_CHECK_FILE([kexi/3rdparty/kexifeedbackwizard/lib/kexifeedbackwizard.cpp],
1133
  have_internal_feedback="yes"
1134
,
1135
  have_internal_feedback="no"
1136
)
1137
1138
AC_MSG_CHECKING([for KDE library: kfeedbackwizard])
1139
1140
ac_kfeedback_includes=NO ac_kfeedback_libraries=NO
1141
kfeedback_libraries=""
1142
kfeedback_includes=""
1143
1144
AC_CACHE_VAL(ac_cv_have_kfeedback,
1145
[
1146
AC_FIND_FILE(kfeedbackwizard.h, $kde_incdirs, kfeedback_incdir)
1147
ac_kfeedback_includes="$kfeedback_incdir"
1148
1149
AC_FIND_FILE(libkfeedbackwizard.so, $kde_libdirs, kfeedback_libdir)
1150
ac_kfeedback_libraries="$kfeedback_libdir"
1151
1152
if test "$ac_kfeedback_includes" = NO || test "$ac_kfeedback_libraries" = NO; then
1153
  ac_cv_have_kfeedback="have_kfeedback=no"
1154
  ac_kfeedback_notfound=""
1155
else
1156
  have_kfeedback="yes"
1157
fi
1158
])
1159
1160
eval "$ac_cv_have_kfeedback"
1161
1162
INC_KFEEDBACK=''
1163
LIB_KFEEDBACK=''
1164
if test "$have_kfeedback" != yes; then
1165
  if test "$have_internal_feedback" = yes; then
1166
    CXXFLAGS="$CXXFLAGS -DFEEDBACK_CLASS=KexiFeedbackWizard -DFEEDBACK_INCLUDE=\"<kexifeedbackwizard.h>\""
1167
    use_kexifb="yes"
1168
    AC_MSG_RESULT([using internal])
1169
    INC_KFEEDBACK='-I../3rdparty/kexifeedbackwizard/lib'
1170
    LIB_KFEEDBACK='../3rdparty/kexifeedbackwizard/lib/libkexifeedbackwizard.la'
1171
  else
1172
    use_kexifb="no"
1173
    AC_MSG_RESULT([dont use])
1174
  fi
1175
else
1176
  use_kexifb="no"
1177
  AC_MSG_RESULT([$have_kfeedback (libraries $ac_kfeedback_libraries, headers $ac_kfeedback_includes)])
1178
1179
dnl  AC_DEFINE_UNQUOTED(HAVE_KFEEDBACK, 1, [Add KNewStuff functionality.])
1180
  CXXFLAGS="$CXXFLAGS -DFEEDBACK_CLASS=KFeedbackWizard -DFEEDBACK_INCLUDE=\"<kfeedbackwizard.h>\""
1181
1182
  LIB_KFEEDBACK='-lkfeedbackwizard'
1183
fi
1184
AC_SUBST(LIB_KFEEDBACK)
1185
AC_SUBST(INC_KFEEDBACK)
1186
AM_CONDITIONAL(use_kexifeedback, test "$use_kexifb" = "yes")
1187
dnl =======================================================
1188
dnl FILE: ./kexi/migration/configure.in.in
1189
dnl =======================================================
1190
1191
# KexiMDB isn't built as part of Kexi right now.
1192
#AC_ARG_ENABLE(keximdb,
1193
#    AC_HELP_STRING([--enable-keximdb],
1194
#                   [build KexiMDB (MS Access) plugin [default=no]]),
1195
#    compile_keximdb_plugin=$enableval, compile_keximdb_plugin=no)
1196
#
1197
#AM_CONDITIONAL(compile_keximdb_plugin, test "x$compile_keximdb_plugin" != "xno")
1198
dnl =======================================================
1199
dnl FILE: ./kexi/plugins/configure.in.in
1200
dnl =======================================================
1201
1202
# disabled
1203
#AC_ARG_ENABLE(kexi-reports,
1204
#    AC_HELP_STRING([--enable-kexi-reports],
1205
#                   [build Kexi reports plugin (EXPERIMENTAL) [default=no]]),
1206
#    compile_kexi_reports_plugin=$enableval, compile_kexi_reports_plugin=no)
1207
#AM_CONDITIONAL(compile_kexi_reports_plugin, test "x$compile_kexi_reports_plugin" != "xno")
1208
#
1209
#if test "$compile_kexi_reports_plugin" == "yes"; then
1210
#    AC_DEFINE(KEXI_REPORTS_SUPPORT, 1, [build Kexi reports plugin])
1211
#fi
1212
1213
AC_ARG_ENABLE(kexi-macros,
1214
    AC_HELP_STRING([--enable-kexi-macros],
1215
                   [build Kexi macro plugin (EXPERIMENTAL) [default=yes]]),
1216
    compile_kexi_macros_plugin=$enableval, compile_kexi_macros_plugin=no)
1217
AM_CONDITIONAL(compile_kexi_macros_plugin, test "x$compile_kexi_macros_plugin" == "xyes")
1218
1219
if test "$compile_kexi_macros_plugin" == "yes"; then
1220
    AC_DEFINE(KEXI_MACROS_SUPPORT, 1, [build Kexi macros plugin])
1221
fi
1222
dnl =======================================================
1223
dnl FILE: ./kexi/plugins/macros/configure.in.in
1224
dnl =======================================================
1225
1226
# Check for kunittest
1227
AC_MSG_CHECKING([for kunittest])
1228
1229
# First we check if the console unittester could be compiled
1230
have_kunittest_header="no"
1231
KDE_CHECK_HEADER(kunittest/tester.h, have_kunittest_header="yes", , )
1232
AM_CONDITIONAL(include_kunittest, test "$have_kunittest_header" = "yes")
1233
1234
# Second we check if the GUI-unittester could be compiled
1235
have_kunittestgui_header="no"
1236
KDE_CHECK_HEADER(kunittest/runnergui.h, have_kunittestgui_header="yes", , )
1237
AM_CONDITIONAL(include_kunittestgui, test "$have_kunittestgui_header" = "yes")
1238
1239
dnl =======================================================
1240
dnl FILE: ./kivio/configure.in.in
1241
dnl =======================================================
1242
1243
dnl Do we have Python? 
1244
KDE_CHECK_PYTHON
1245
dnl =======================================================
1246
dnl FILE: ./kpresenter/configure.in.in
1247
dnl =======================================================
1248
1249
AC_HAVE_DPMS()
1250
dnl =======================================================
1251
dnl FILE: ./chalk/configure.in.in
1252
dnl =======================================================
1253
1254
KDE_CHECK_LIB(Xi, XOpenDisplay, [
1255
	LIB_XINPUTEXT="-lXi"
1256
	AC_DEFINE(HAVE_XINPUTEXT, 1, [Define if you have the X11 Input Extension])
1257
	])
1258
AC_SUBST(LIB_XINPUTEXT)
1259
1260
# Check for lcms
1261
AC_MSG_CHECKING([for lcms >= 1.15])
1262
1263
have_lcms_header='no'
1264
KDE_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
1265
if test "$have_lcms_header" = 'yes'
1266
then
1267
        AC_DEFINE(LCMS_HEADER, <lcms/lcms.h>, [The correct header])
1268
	HAVELCMS="yes"
1269
	LCMS_LIBS="-llcms"
1270
1271
	echo "#include <lcms/lcms.h>" > conftest.$ac_ext
1272
	echo "#if LCMS_VERSION < 115" >> conftest.$ac_ext
1273
	echo "#error Need lcms >= 1.15" >> conftest.$ac_ext
1274
	echo "#endif" >> conftest.$ac_ext
1275
	echo "int main() {}" >> conftest.$ac_ext
1276
1277
else
1278
        # Alternative! Debian does it this way...
1279
	KDE_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
1280
1281
    if test "$have_lcms_header" = 'yes'
1282
    then
1283
       	AC_DEFINE(LCMS_HEADER, <lcms.h>, [The correct header])
1284
	HAVELCMS="yes"
1285
	LCMS_LIBS="-llcms"
1286
1287
	   echo "#include <lcms.h>" > conftest.$ac_ext
1288
	   echo "#if LCMS_VERSION < 115" >> conftest.$ac_ext
1289
	   echo "#error Need lcms >= 1.15" >> conftest.$ac_ext
1290
	   echo "#endif" >> conftest.$ac_ext
1291
	   echo "int main() {}" >> conftest.$ac_ext
1292
    else
1293
        KDE_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
1294
        # and now debian also does it this way... can't they decide for one way of doing stuff ?
1295
        
1296
       AC_DEFINE(LCMS_HEADER, <liblcms1/lcms.h>, [The correct header])
1297
	HAVELCMS="yes"
1298
	LCMS_LIBS="-llcms"
1299
1300
       echo "#include <liblcms1/lcms.h>" > conftest.$ac_ext
1301
       echo "#if LCMS_VERSION < 115" >> conftest.$ac_ext
1302
       echo "#error Need lcms >= 1.15" >> conftest.$ac_ext
1303
       echo "#endif" >> conftest.$ac_ext
1304
       echo "int main() {}" >> conftest.$ac_ext
1305
1306
   fi
1307
fi
1308
1309
AC_SUBST(LCMS_LIBS)
1310
1311
# IM 6.1.3 changed the number of arguments to GetMagickInfoList
1312
1313
AC_MSG_CHECKING(if GetMagickInfoList has only 2 arguments)
1314
CPPFLAGS_TMP="$CPPFLAGS"   # Save preprocessor flags
1315
CPPFLAGS="$LIBMAGICK_CPPFLAGS"
1316
1317
AC_TRY_COMPILE(
1318
	[#include <stdio.h>
1319
	#if HAVE_SYS_TYPES_H
1320
	#include <sys/types.h>
1321
	#endif
1322
	#include "magick/api.h"],
1323
	[const char *pattern; unsigned long ncolors; (void)GetMagickInfoList(pattern, &ncolors)],
1324
	magick_info_list='yes',
1325
	magick_info_list='no')
1326
1327
CPPFLAGS="$CPPFLAGS_TMP"  # Restore preprocessor flags
1328
1329
if test "$magick_info_list" = 'yes'; then
1330
	AC_MSG_RESULT(yes)
1331
  AC_DEFINE([HAVE_OLD_GETMAGICKINFOLIST], 1, [GetMagickInfoList has different number of arguments with versions >= 6.1.3])
1332
else
1333
	AC_MSG_RESULT(no)
1334
fi
1335
1336
# Check for kunittest
1337
AC_MSG_CHECKING([for kunittest])
1338
1339
have_kunittest_header="no"
1340
KDE_CHECK_HEADER(kunittest/tester.h, have_kunittest_header="yes", , )
1341
AM_CONDITIONAL(include_kunittest_tests, test "$have_kunittest_header" = "yes")
1342
1343
# --- OpenGL check ---
1344
1345
AC_HAVE_GL( [], [] )
1346
1347
# --- End of OpenGL check ---
1348
1349
# Check for powf.
1350
1351
AC_CHECK_FUNC(powf, [have_powf="yes"], [AC_CHECK_LIB(m, powf, [have_powf="yes"], [have_powf="no"])])
1352
1353
if test "$have_powf" = 'yes'; then
1354
  AC_DEFINE([HAVE_POWF], 1, [Define to 1 if your system has powf in <maths.h>])
1355
fi\
1356
dnl =======================================================
1357
dnl FILE: ./chalk/plugins/configure.in.in
1358
dnl =======================================================
1359
1360
KDE_CHECK_HEADER(kjsembed/jsproxy_imp.h, have_kjsembed=yes, have_kjsembed=no)
1361
AM_CONDITIONAL(use_kjsembed, test x$have_kjsembed = xyes)
1362
dnl =======================================================
1363
dnl FILE: ./chalk/plugins/viewplugins/imagesize/configure.in.in
1364
dnl =======================================================
1365
1366
AC_CHECK_DECLS([round], [], [], [#include <math.h>])
1367
dnl =======================================================
1368
dnl FILE: ./kspread/plugins/calculator/configure.in.in
1369
dnl =======================================================
1370
1371
AC_CHECK_HEADERS(ieeefp.h)
1372
1373
AC_CHECK_FUNCS(fabsl)
1374
1375
AC_DEFUN([KDE_C_LONG_DOUBLE],
1376
[
1377
  AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
1378
  [
1379
    AC_TRY_RUN(
1380
    [
1381
#include <stdio.h>
1382
#include <stdlib.h>
1383
#include <string.h>
1384
#include <math.h>
1385
1386
int main() {
1387
/* The Stardent Vistra knows sizeof(long double), but does not support it.  */
1388
long double foo = 1.0;
1389
char buffer[10];
1390
/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
1391
int result = (sizeof(long double) < sizeof(double));
1392
/* the following is needed for a broken printf in glibc2 */
1393
if (!result) {
1394
    foo = foo * 3;
1395
    sprintf(buffer,"%0.0Lf",foo);
1396
    result = strcmp(buffer, "3");
1397
/* and now something mean ;-) */
1398
    foo = powl(fabsl(foo), 1);
1399
}
1400
exit(result); }
1401
    ],
1402
    ac_cv_c_long_double=yes, ac_cv_c_long_double=no,
1403
    ac_cv_c_long_double=no
1404
    )
1405
  ])
1406
  if test $ac_cv_c_long_double = yes; then
1407
    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have support for long double in printf])
1408
  fi
1409
])
1410
KDE_C_LONG_DOUBLE
1411
1412
AC_LANG_C
1413
KDE_CHECK_LIB(m, isinf, [
1414
  AC_DEFINE_UNQUOTED(HAVE_FUNC_ISINF, 1, [Define if you have isinf])
1415
])
1416
dnl =======================================================
1417
dnl FILE: ./kword/mailmerge/configure.in.in
1418
dnl =======================================================
1419
1420
dnl only compile the sql plugin if qt was compiled with sql support
1421
1422
1423
AC_MSG_CHECKING([for SQL support in QT])
1424
1425
LIBS_SAVE_KWSL="$LIBS"
1426
CXXFLAGS_SAVE_KWSL="$CXXFLAGS"
1427
CFLAGS_SAVE_KWSL="$CFLAGS"
1428
1429
AC_LANG_SAVE
1430
AC_LANG_CPLUSPLUS
1431
1432
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
1433
CXXFLAGS="$CXXFLAGS -I$qt_includes $all_includes"
1434
1435
AC_TRY_COMPILE([
1436
#include <qglobal.h>
1437
],
1438
[
1439
#ifdef QT_NO_SQL
1440
#error "No QT-SQL support"
1441
#endif
1442
],
1443
ac_trycompile_kwsl_qtsql=yes,
1444
ac_trycompile_kwsl_qtsql=no)
1445
1446
CXXFLAGS="$CXXFLAGS_SAVE_KWSL"
1447
LIBS="$LIBS_SAVE_KWSL"
1448
AC_LANG_RESTORE
1449
1450
if eval "test \"`echo $ac_trycompile_kwsl_qtsql`\" = yes"; then
1451
  SQLDIR=sql
1452
  AC_SUBST(SQLDIR)
1453
  AC_MSG_RESULT([QT supports SQL - compile qtsqlmailmerge])
1454
else
1455
  SQLDIR=
1456
  AC_SUBST(SQLDIR)
1457
  AC_MSG_RESULT([QT supports SQL -- qtsqlmailmerge will not be built])
1458
fi
1459
1460
AM_CONDITIONAL(include_sql, test -n "$SQLDIR")
1461
dnl =======================================================
1462
dnl FILE: ./lib/configure.in.in
1463
dnl =======================================================
1464
1465
AC_SUBST(KWMF_INCLUDES, '-I$(top_srcdir)/lib/kwmf -I$(top_builddir)/lib/kwmf')
1466
AC_SUBST(KSTORE_INCLUDES, '-I$(top_srcdir)/lib/store -I$(top_builddir)/lib/store')
1467
AC_SUBST(KOTEXT_INCLUDES, '-I$(top_srcdir)/lib/kotext -I$(top_builddir)/lib/kotext')
1468
AC_SUBST(KOPAINTER_INCLUDES, '-I$(top_srcdir)/lib/kopainter -I$(top_builddir)/lib/kopainter')
1469
AC_SUBST(KOPALETTE_INCLUDES, '-I$(top_srcdir)/lib/kopalette -I$(top_builddir)/lib/kopalette')
1470
AC_SUBST(KOFFICECORE_INCLUDES, '-I$(top_srcdir)/lib/kofficecore -I$(top_builddir)/lib/kofficecore')
1471
AC_SUBST(KOFFICEUI_INCLUDES, '-I$(top_srcdir)/lib/kofficeui -I$(top_builddir)/lib/kofficeui')
1472
AC_SUBST(KFORMULA_INCLUDES, '-I$(top_srcdir)/lib/kformula -I$(top_builddir)/lib/kformula')
1473
dnl those are included with e.g. <koproperty/set.h>
1474
AC_SUBST(KOPROPERTY_INCLUDES, '-I$(top_srcdir)/lib -I$(top_builddir)/lib')
1475
AC_SUBST(KROSS_INCLUDES, '-I$(top_srcdir)/lib/kross -I$(top_builddir)/lib/kross')
1476
AC_SUBST(LIB_KOFFICEUI, '$(top_builddir)/lib/kofficeui/libkofficeui.la')
1477
AC_SUBST(LIB_KOFFICECORE, '$(top_builddir)/lib/kofficecore/libkofficecore.la')
1478
AC_SUBST(LIB_KSTORE, '$(top_builddir)/lib/store/libkstore.la')
1479
AC_SUBST(LIB_KOTEXT, '$(top_builddir)/lib/kotext/libkotext.la')
1480
AC_SUBST(LIB_KOPAINTER, '$(top_builddir)/lib/kopainter/libkopainter.la')
1481
AC_SUBST(LIB_KOPALETTE, '$(top_builddir)/lib/kopalette/libkopalette.la')
1482
AC_SUBST(LIB_KWMF, '$(top_builddir)/lib/kwmf/libkwmf.la')
1483
AC_SUBST(LIB_KOWMF, '$(top_builddir)/lib/kwmf/libkowmf.la')
1484
AC_SUBST(LIB_KFORMULA, '$(top_builddir)/lib/kformula/libkformulalib.la')
1485
AC_SUBST(LIB_KOPROPERTY, '$(top_builddir)/lib/koproperty/libkoproperty.la')
1486
AC_SUBST(LIB_KROSS_API, '$(top_builddir)/lib/kross/api/libkrossapi.la')
1487
AC_SUBST(LIB_KROSS_MAIN, '$(top_builddir)/lib/kross/main/libkrossmain.la')
1488
1489
AC_SUBST(interfacedir, '$(top_srcdir)/lib/interfaces')
1490
AC_SUBST(KOFFICE_LIBS, '$(LIB_KOFFICEUI) $(LIB_KOFFICECORE) $(LIB_KSTORE)')
1491
AC_SUBST(KOFFICE_INCLUDES, '$(KOFFICEUI_INCLUDES) $(KOFFICECORE_INCLUDES) $(KSTORE_INCLUDES) $(KWMF_INCLUDES) $(KOPALETTE_INCLUDES)')
1492
1493
AC_DEFINE_UNQUOTED(PREFIX,"$prefix",[Define the PREFIX where to install this package])
1494
1495
dnl =======================================================
1496
dnl FILE: ./lib/kotext/configure.in.in
1497
dnl =======================================================
1498
1499
   AC_LANG_SAVE
1500
   AC_LANG_C
1501
   dnl Check for aspell library
1502
   KDE_CHECK_HEADERS([kspell2/broker.h])
1503
   if test "x$ac_cv_header_kspell2_broker_h" = "xyes"; then
1504
           dnl the header and the lib exist -> ok
1505
           dnl this is for config.h
1506
           AC_DEFINE(HAVE_LIBKSPELL2, 1, [If we are going to use libkspell2 for spell-checking])
1507
           LIBKSPELL2="-lkspell2"
1508
           AC_MSG_RESULT([found in $ac_kspell2_includes])
1509
   else
1510
           LIBKSPELL2=""
1511
           AC_MSG_RESULT([not found -- spell-checking will be disabled])
1512
   fi
1513
   AC_SUBST(LIBKSPELL2)
1514
   AC_LANG_RESTORE
1515
dnl =======================================================
1516
dnl FILE: ./lib/kross/configure.in.in
1517
dnl =======================================================
1518
1519
AC_ARG_ENABLE(scripting,
1520
    AC_HELP_STRING([--enable-scripting],
1521
                   [build scripting library (Kross) [default=yes]]),
1522
    compile_kross=$enableval, compile_kross=yes)
1523
AM_CONDITIONAL(compile_kross, test "x$compile_kross" = "xyes")
1524
1525
###############################
1526
# Check if Python is installed.
1527
1528
if test "x$compile_kross" = "xyes" ; then
1529
    #KDE_CHECK_PYTHON(2.3)
1530
    KDE_CHECK_PYTHON
1531
fi
1532
1533
# Compile the Kross python plugin only if both, $LIBPYTHON and
1534
# $PYTHONINC, are defined.
1535
AM_CONDITIONAL(compile_kross_python,
1536
               test -n "$LIBPYTHON" && test -n "$PYTHONINC")
1537
1538
###############################
1539
# Check for Ruby
1540
1541
if test "x$compile_kross" = "xyes" ; then
1542
  AC_CHECK_PROGS([RUBY], [ruby ruby1.8 ruby18 ruby1.9 ruby19], ruby)
1543
1544
  if test -n "$RUBY"; then
1545
    AC_MSG_CHECKING(for Ruby dirs)
1546
    # Note: pkgconfig file exists only for ruby >= 1.9.3
1547
    if test -n "$PKGCONFIG"; then
1548
      RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null`
1549
      if test -n "$RUBY_VERSION"; then
1550
        RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
1551
      fi
1552
      if test -z "$RUBY_VERSION"; then
1553
        RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null`
1554
        if test -n "$RUBY_VERSION"; then
1555
          RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags`
1556
        fi
1557
      fi
1558
      if test -z "$RUBY_VERSION"; then
1559
        # pkgconfig file does not exist but might be 1.9.1: RUBY_VERSION defined in ruby/version.h
1560
        if test -n "$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
1561
          # rubyhdrdir parameter works only in >=1.9.1; this is 1.9.1
1562
          RUBY_MAJOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MAJOR']"@:>@)'`
1563
          RUBY_MINOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MINOR']"@:>@)'`
1564
          RUBY_TEENY=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['TEENY']"@:>@)'`
1565
          if test "$RUBY_MAJOR" == "1" && test "$RUBY_MINOR" == "9"; then
1566
            RUBY_VERSION="$RUBY_MAJOR.$RUBY_MINOR.$RUBY_TEENY"
1567
            RUBY_CFLAGS="-I`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'`"
1568
            RUBY_CFLAGS="$RUBY_CFLAGS/`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"arch"@:>@)'` $RUBY_CFLAGS"
1569
            if test -n "`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`"; then
1570
              RUBY_ENABLESHARED=yes
1571
            fi
1572
          fi
1573
        fi
1574
      fi
1575
      if test -n "$RUBY_VERSION"; then
1576
        RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'`
1577
        RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'`
1578
        RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'`
1579
        RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'`
1580
        RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'`
1581
        RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'`
1582
        RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
1583
        AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x])
1584
      fi
1585
    fi
1586
    if test -z "$RUBY_VERSION"; then
1587
      RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
1588
      RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
1589
      RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
1590
      RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
1591
      RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
1592
      RUBY_INCLUDEDIR=$RUBY_ARCHDIR
1593
      RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
1594
    fi
1595
    AC_MSG_RESULT([
1596
                    archdir $RUBY_ARCHDIR,
1597
                    sitearchdir $RUBY_SITEARCHDIR,
1598
                    sitedir $RUBY_SITEDIR,
1599
                    rubylibdir $RUBY_RUBYLIBDIR,
1600
                    libdir $RUBY_LIBDIR,
1601
                    includedir $RUBY_INCLUDEDIR,
1602
                    librubyarg $RUBY_LIBRUBYARG,
1603
                    cflags $RUBY_CFLAGS])
1604
    AC_SUBST(RUBY_ARCHDIR)
1605
    AC_SUBST(RUBY_SITEARCHDIR)
1606
    AC_SUBST(RUBY_RUBYLIBDIR)
1607
    AC_SUBST(RUBY_INCLUDEDIR)
1608
    AC_SUBST(RUBY_LIBRUBYARG)
1609
    AC_SUBST(RUBY_SITEDIR)
1610
    AC_SUBST(RUBY_CFLAGS)
1611
1612
    AC_MSG_CHECKING(for Ruby header)
1613
1614
    if test ! -r $RUBY_INCLUDEDIR/ruby.h; then
1615
      # if $RUBY_INCLUDEDIR is not valid try to use $RUBY_ARCHDIR
1616
      RUBY_INCLUDEDIR=$RUBY_ARCHDIR
1617
    fi
1618
1619
    if test ! -r $RUBY_INCLUDEDIR/ruby.h; then
1620
      RUBY_LIBDIR=""
1621
      AC_MSG_RESULT([not found])
1622
    else
1623
      AC_MSG_RESULT([found]) # header
1624
1625
      AC_MSG_CHECKING(Ruby shared library)
1626
      if test "x$RUBY_ENABLESHARED" != "xyes" ; then
1627
        AC_MSG_RESULT([shared library not found])
1628
        RUBY_LIBDIR="" 
1629
      else
1630
        if test -z "$RUBY_LIBRUBYARG" ; then
1631
          AC_MSG_RESULT([link argument not found])
1632
          RUBY_LIBDIR="" 
1633
        else
1634
          AC_MSG_RESULT([found]) # shared library link arg
1635
1636
          AC_MSG_CHECKING([if C++ program with ruby can be compiled])
1637
          AC_LANG_SAVE
1638
          AC_LANG_CPLUSPLUS
1639
          ac_save_CXXFLAGS="$CXXFLAGS"
1640
          CXXFLAGS="$CXXFLAGS -I$RUBY_INCLUDEDIR"
1641
          AC_CACHE_VAL(ruby_build,
1642
          [
1643
            AC_TRY_COMPILE([
1644
                #include <ruby.h>
1645
                #include <version.h>
1646
            ],[
1647
            
1648
#if(RUBY_VERSION_MAJOR==1 && RUBY_VERSION_MINOR == 8 && RUBY_VERSION_TEENY <= 1)
1649
#error "need at least ruby 1.8.2\n"
1650
#endif
1651
1652
                ruby_init();
1653
                return 0;
1654
            ], ruby_build=yes,
1655
            ruby_build=no)
1656
          ])
1657
          AC_MSG_RESULT($ruby_build)
1658
          if test "$ruby_build" = "no"; then
1659
            RUBY_LIBDIR=""
1660
          fi
1661
          CXXFLAGS="$ac_save_CXXFLAGS"
1662
          AC_LANG_RESTORE
1663
        fi # have ruby shared lib argument
1664
      fi # have shared lib
1665
    fi # have ruby header
1666
  fi # have ruby
1667
fi # compiling kross
1668
1669
AM_CONDITIONAL(compile_kross_ruby, test -n "$RUBY_LIBDIR")
1670
KDE_CREATE_SUBDIRSLIST
1671
AM_CONDITIONAL(lib_SUBDIR_included, test "x$lib_SUBDIR_included" = xyes)
1672
AM_CONDITIONAL(interfaces_SUBDIR_included, test "x$interfaces_SUBDIR_included" = xyes)
1673
AM_CONDITIONAL(autocorrect_SUBDIR_included, test "x$autocorrect_SUBDIR_included" = xyes)
1674
AM_CONDITIONAL(doc_SUBDIR_included, test "x$doc_SUBDIR_included" = xyes)
1675
AM_CONDITIONAL(example_SUBDIR_included, test "x$example_SUBDIR_included" = xyes)
1676
AM_CONDITIONAL(karbon_SUBDIR_included, test "x$karbon_SUBDIR_included" = xyes)
1677
AM_CONDITIONAL(kchart_SUBDIR_included, test "x$kchart_SUBDIR_included" = xyes)
1678
AM_CONDITIONAL(kdgantt_SUBDIR_included, test "x$kdgantt_SUBDIR_included" = xyes)
1679
AM_CONDITIONAL(kformula_SUBDIR_included, test "x$kformula_SUBDIR_included" = xyes)
1680
AM_CONDITIONAL(kivio_SUBDIR_included, test "x$kivio_SUBDIR_included" = xyes)
1681
AM_CONDITIONAL(koshell_SUBDIR_included, test "x$koshell_SUBDIR_included" = xyes)
1682
AM_CONDITIONAL(kounavail_SUBDIR_included, test "x$kounavail_SUBDIR_included" = xyes)
1683
AM_CONDITIONAL(kpresenter_SUBDIR_included, test "x$kpresenter_SUBDIR_included" = xyes)
1684
AM_CONDITIONAL(chalk_SUBDIR_included, test "x$chalk_SUBDIR_included" = xyes)
1685
AM_CONDITIONAL(kspread_SUBDIR_included, test "x$kspread_SUBDIR_included" = xyes)
1686
AM_CONDITIONAL(kugar_SUBDIR_included, test "x$kugar_SUBDIR_included" = xyes)
1687
AM_CONDITIONAL(mimetypes_SUBDIR_included, test "x$mimetypes_SUBDIR_included" = xyes)
1688
AM_CONDITIONAL(pics_SUBDIR_included, test "x$pics_SUBDIR_included" = xyes)
1689
AM_CONDITIONAL(plugins_SUBDIR_included, test "x$plugins_SUBDIR_included" = xyes)
1690
AM_CONDITIONAL(servicetypes_SUBDIR_included, test "x$servicetypes_SUBDIR_included" = xyes)
1691
AM_CONDITIONAL(templates_SUBDIR_included, test "x$templates_SUBDIR_included" = xyes)
1692
AM_CONDITIONAL(tools_SUBDIR_included, test "x$tools_SUBDIR_included" = xyes)
1693
AM_CONDITIONAL(kword_SUBDIR_included, test "x$kword_SUBDIR_included" = xyes)
1694
AM_CONDITIONAL(kplato_SUBDIR_included, test "x$kplato_SUBDIR_included" = xyes)
1695
AM_CONDITIONAL(kexi_SUBDIR_included, test "x$kexi_SUBDIR_included" = xyes)
1696
AM_CONDITIONAL(filters_SUBDIR_included, test "x$filters_SUBDIR_included" = xyes)
1697
AC_CONFIG_FILES([ Makefile ])
1698
AC_CONFIG_FILES([ autocorrect/Makefile ])
1699
AC_CONFIG_FILES([ doc/Makefile ])
1700
AC_CONFIG_FILES([ doc/karbon/Makefile ])
1701
AC_CONFIG_FILES([ doc/kchart/Makefile ])
1702
AC_CONFIG_FILES([ doc/kexi/Makefile ])
1703
AC_CONFIG_FILES([ doc/kformula/Makefile ])
1704
AC_CONFIG_FILES([ doc/kivio/Makefile ])
1705
AC_CONFIG_FILES([ doc/koffice/Makefile ])
1706
AC_CONFIG_FILES([ doc/koshell/Makefile ])
1707
AC_CONFIG_FILES([ doc/kplato/Makefile ])
1708
AC_CONFIG_FILES([ doc/kpresenter/Makefile ])
1709
AC_CONFIG_FILES([ doc/chalk/Makefile ])
1710
AC_CONFIG_FILES([ doc/kspread/Makefile ])
1711
AC_CONFIG_FILES([ doc/kugar/Makefile ])
1712
AC_CONFIG_FILES([ doc/kword/Makefile ])
1713
AC_CONFIG_FILES([ doc/thesaurus/Makefile ])
1714
AC_CONFIG_FILES([ example/Makefile ])
1715
AC_CONFIG_FILES([ filters/Makefile ])
1716
AC_CONFIG_FILES([ filters/generic_wrapper/Makefile ])
1717
AC_CONFIG_FILES([ filters/karbon/Makefile ])
1718
AC_CONFIG_FILES([ filters/karbon/ai/Makefile ])
1719
AC_CONFIG_FILES([ filters/karbon/applixgraphics/Makefile ])
1720
AC_CONFIG_FILES([ filters/karbon/eps/Makefile ])
1721
AC_CONFIG_FILES([ filters/karbon/kontour/Makefile ])
1722
AC_CONFIG_FILES([ filters/karbon/msod/Makefile ])
1723
AC_CONFIG_FILES([ filters/karbon/oodraw/Makefile ])
1724
AC_CONFIG_FILES([ filters/karbon/png/Makefile ])
1725
AC_CONFIG_FILES([ filters/karbon/svg/Makefile ])
1726
AC_CONFIG_FILES([ filters/karbon/wmf/Makefile ])
1727
AC_CONFIG_FILES([ filters/karbon/xaml/Makefile ])
1728
AC_CONFIG_FILES([ filters/karbon/xcf/Makefile ])
1729
AC_CONFIG_FILES([ filters/kchart/Makefile ])
1730
AC_CONFIG_FILES([ filters/kchart/bmp/Makefile ])
1731
AC_CONFIG_FILES([ filters/kchart/jpeg/Makefile ])
1732
AC_CONFIG_FILES([ filters/kchart/libimageexport/Makefile ])
1733
AC_CONFIG_FILES([ filters/kchart/mng/Makefile ])
1734
AC_CONFIG_FILES([ filters/kchart/png/Makefile ])
1735
AC_CONFIG_FILES([ filters/kchart/svg/Makefile ])
1736
AC_CONFIG_FILES([ filters/kchart/xbm/Makefile ])
1737
AC_CONFIG_FILES([ filters/kchart/xpm/Makefile ])
1738
AC_CONFIG_FILES([ filters/kformula/Makefile ])
1739
AC_CONFIG_FILES([ filters/kformula/latex/Makefile ])
1740
AC_CONFIG_FILES([ filters/kformula/mathml/Makefile ])
1741
AC_CONFIG_FILES([ filters/kformula/png/Makefile ])
1742
AC_CONFIG_FILES([ filters/kformula/svg/Makefile ])
1743
AC_CONFIG_FILES([ filters/kivio/Makefile ])
1744
AC_CONFIG_FILES([ filters/kivio/imageexport/Makefile ])
1745
AC_CONFIG_FILES([ filters/kpresenter/Makefile ])
1746
AC_CONFIG_FILES([ filters/kpresenter/bmp/Makefile ])
1747
AC_CONFIG_FILES([ filters/kpresenter/jpeg/Makefile ])
1748
AC_CONFIG_FILES([ filters/kpresenter/kword/Makefile ])
1749
AC_CONFIG_FILES([ filters/kpresenter/libimageexport/Makefile ])
1750
AC_CONFIG_FILES([ filters/kpresenter/magicpoint/Makefile ])
1751
AC_CONFIG_FILES([ filters/kpresenter/mng/Makefile ])
1752
AC_CONFIG_FILES([ filters/kpresenter/ooimpress/Makefile ])
1753
AC_CONFIG_FILES([ filters/kpresenter/png/Makefile ])
1754
AC_CONFIG_FILES([ filters/kpresenter/powerpoint/Makefile ])
1755
AC_CONFIG_FILES([ filters/kpresenter/powerpoint/import/Makefile ])
1756
AC_CONFIG_FILES([ filters/kpresenter/powerpoint/libppt/Makefile ])
1757
AC_CONFIG_FILES([ filters/kpresenter/svg/Makefile ])
1758
AC_CONFIG_FILES([ filters/kpresenter/xbm/Makefile ])
1759
AC_CONFIG_FILES([ filters/kpresenter/xpm/Makefile ])
1760
AC_CONFIG_FILES([ filters/chalk/Makefile ])
1761
AC_CONFIG_FILES([ filters/chalk/gmagick/Makefile ])
1762
AC_CONFIG_FILES([ filters/chalk/jpeg/Makefile ])
1763
AC_CONFIG_FILES([ filters/chalk/libkisexif/Makefile ])
1764
AC_CONFIG_FILES([ filters/chalk/magick/Makefile ])
1765
AC_CONFIG_FILES([ filters/chalk/openexr/Makefile ])
1766
AC_CONFIG_FILES([ filters/chalk/pdf/Makefile ])
1767
AC_CONFIG_FILES([ filters/chalk/png/Makefile ])
1768
AC_CONFIG_FILES([ filters/chalk/raw/Makefile ])
1769
AC_CONFIG_FILES([ filters/chalk/tiff/Makefile ])
1770
AC_CONFIG_FILES([ filters/chalk/xcf/Makefile ])
1771
AC_CONFIG_FILES([ filters/kspread/Makefile ])
1772
AC_CONFIG_FILES([ filters/kspread/applixspread/Makefile ])
1773
AC_CONFIG_FILES([ filters/kspread/csv/Makefile ])
1774
AC_CONFIG_FILES([ filters/kspread/dbase/Makefile ])
1775
AC_CONFIG_FILES([ filters/kspread/excel/Makefile ])
1776
AC_CONFIG_FILES([ filters/kspread/excel/import/Makefile ])
1777
AC_CONFIG_FILES([ filters/kspread/excel/sidewinder/Makefile ])
1778
AC_CONFIG_FILES([ filters/kspread/gnumeric/Makefile ])
1779
AC_CONFIG_FILES([ filters/kspread/html/Makefile ])
1780
AC_CONFIG_FILES([ filters/kspread/kexi/Makefile ])
1781
AC_CONFIG_FILES([ filters/kspread/latex/Makefile ])
1782
AC_CONFIG_FILES([ filters/kspread/latex/export/Makefile ])
1783
AC_CONFIG_FILES([ filters/kspread/libkspreadexport/Makefile ])
1784
AC_CONFIG_FILES([ filters/kspread/opencalc/Makefile ])
1785
AC_CONFIG_FILES([ filters/kspread/qpro/Makefile ])
1786
AC_CONFIG_FILES([ filters/kspread/qpro/libqpro/Makefile ])
1787
AC_CONFIG_FILES([ filters/kspread/qpro/libqpro/qpro/Makefile ])
1788
AC_CONFIG_FILES([ filters/kspread/qpro/libqpro/src/Makefile ])
1789
AC_CONFIG_FILES([ filters/kugar/Makefile ])
1790
AC_CONFIG_FILES([ filters/kugar/kugarnop/Makefile ])
1791
AC_CONFIG_FILES([ filters/kword/Makefile ])
1792
AC_CONFIG_FILES([ filters/kword/abiword/Makefile ])
1793
AC_CONFIG_FILES([ filters/kword/amipro/Makefile ])
1794
AC_CONFIG_FILES([ filters/kword/applixword/Makefile ])
1795
AC_CONFIG_FILES([ filters/kword/ascii/Makefile ])
1796
AC_CONFIG_FILES([ filters/kword/docbook/Makefile ])
1797
AC_CONFIG_FILES([ filters/kword/hancomword/Makefile ])
1798
AC_CONFIG_FILES([ filters/kword/html/Makefile ])
1799
AC_CONFIG_FILES([ filters/kword/html/export/Makefile ])
1800
AC_CONFIG_FILES([ filters/kword/html/import/Makefile ])
1801
AC_CONFIG_FILES([ filters/kword/kword1.3/Makefile ])
1802
AC_CONFIG_FILES([ filters/kword/kword1.3/import/Makefile ])
1803
AC_CONFIG_FILES([ filters/kword/latex/Makefile ])
1804
AC_CONFIG_FILES([ filters/kword/latex/export/Makefile ])
1805
AC_CONFIG_FILES([ filters/kword/latex/import/Makefile ])
1806
AC_CONFIG_FILES([ filters/kword/latex/import/generator/Makefile ])
1807
AC_CONFIG_FILES([ filters/kword/latex/import/parser/Makefile ])
1808
AC_CONFIG_FILES([ filters/kword/libexport/Makefile ])
1809
AC_CONFIG_FILES([ filters/kword/msword/Makefile ])
1810
AC_CONFIG_FILES([ filters/kword/mswrite/Makefile ])
1811
AC_CONFIG_FILES([ filters/kword/oowriter/Makefile ])
1812
AC_CONFIG_FILES([ filters/kword/palmdoc/Makefile ])
1813
AC_CONFIG_FILES([ filters/kword/pdf/Makefile ])
1814
AC_CONFIG_FILES([ filters/kword/pdf/xpdf/Makefile ])
1815
AC_CONFIG_FILES([ filters/kword/pdf/xpdf/goo/Makefile ])
1816
AC_CONFIG_FILES([ filters/kword/pdf/xpdf/xpdf/Makefile ])
1817
AC_CONFIG_FILES([ filters/kword/rtf/Makefile ])
1818
AC_CONFIG_FILES([ filters/kword/rtf/export/Makefile ])
1819
AC_CONFIG_FILES([ filters/kword/rtf/import/Makefile ])
1820
AC_CONFIG_FILES([ filters/kword/starwriter/Makefile ])
1821
AC_CONFIG_FILES([ filters/kword/wml/Makefile ])
1822
AC_CONFIG_FILES([ filters/kword/wordperfect/Makefile ])
1823
AC_CONFIG_FILES([ filters/kword/wordperfect/export/Makefile ])
1824
AC_CONFIG_FILES([ filters/kword/wordperfect/import/Makefile ])
1825
AC_CONFIG_FILES([ filters/libdialogfilter/Makefile ])
1826
AC_CONFIG_FILES([ filters/liboofilter/Makefile ])
1827
AC_CONFIG_FILES([ filters/olefilters/Makefile ])
1828
AC_CONFIG_FILES([ filters/olefilters/lib/Makefile ])
1829
AC_CONFIG_FILES([ filters/olefilters/powerpoint97/Makefile ])
1830
AC_CONFIG_FILES([ filters/xsltfilter/Makefile ])
1831
AC_CONFIG_FILES([ filters/xsltfilter/export/Makefile ])
1832
AC_CONFIG_FILES([ filters/xsltfilter/export/xsl/Makefile ])
1833
AC_CONFIG_FILES([ filters/xsltfilter/export/xsl/kword/Makefile ])
1834
AC_CONFIG_FILES([ filters/xsltfilter/export/xsl/kword/xslfo/Makefile ])
1835
AC_CONFIG_FILES([ filters/xsltfilter/import/Makefile ])
1836
AC_CONFIG_FILES([ interfaces/Makefile ])
1837
AC_CONFIG_FILES([ karbon/Makefile ])
1838
AC_CONFIG_FILES([ karbon/commands/Makefile ])
1839
AC_CONFIG_FILES([ karbon/core/Makefile ])
1840
AC_CONFIG_FILES([ karbon/data/Makefile ])
1841
AC_CONFIG_FILES([ karbon/dialogs/Makefile ])
1842
AC_CONFIG_FILES([ karbon/dockers/Makefile ])
1843
AC_CONFIG_FILES([ karbon/pics/Makefile ])
1844
AC_CONFIG_FILES([ karbon/plugins/Makefile ])
1845
AC_CONFIG_FILES([ karbon/plugins/flattenpath/Makefile ])
1846
AC_CONFIG_FILES([ karbon/plugins/imagetool/Makefile ])
1847
AC_CONFIG_FILES([ karbon/plugins/insertknots/Makefile ])
1848
AC_CONFIG_FILES([ karbon/plugins/roundcorners/Makefile ])
1849
AC_CONFIG_FILES([ karbon/plugins/shadoweffect/Makefile ])
1850
AC_CONFIG_FILES([ karbon/plugins/whirlpinch/Makefile ])
1851
AC_CONFIG_FILES([ karbon/plugins/zoomtool/Makefile ])
1852
AC_CONFIG_FILES([ karbon/render/Makefile ])
1853
AC_CONFIG_FILES([ karbon/render/xrgbrender/Makefile ])
1854
AC_CONFIG_FILES([ karbon/shapes/Makefile ])
1855
AC_CONFIG_FILES([ karbon/templates/Makefile ])
1856
AC_CONFIG_FILES([ karbon/templates/basic/Makefile ])
1857
AC_CONFIG_FILES([ karbon/tools/Makefile ])
1858
AC_CONFIG_FILES([ karbon/visitors/Makefile ])
1859
AC_CONFIG_FILES([ karbon/widgets/Makefile ])
1860
AC_CONFIG_FILES([ kchart/Makefile ])
1861
AC_CONFIG_FILES([ kchart/kdchart/Makefile ])
1862
AC_CONFIG_FILES([ kchart/pics/Makefile ])
1863
AC_CONFIG_FILES([ kchart/templates/Makefile ])
1864
AC_CONFIG_FILES([ kchart/toolbar/Makefile ])
1865
AC_CONFIG_FILES([ kchart/toolbar/crystalsvg/Makefile ])
1866
AC_CONFIG_FILES([ kchart/toolbar/locolor/Makefile ])
1867
AC_CONFIG_FILES([ kdgantt/Makefile ])
1868
AC_CONFIG_FILES([ kexi/Makefile ])
1869
AC_CONFIG_FILES([ kexi/3rdparty/Makefile ])
1870
AC_CONFIG_FILES([ kexi/3rdparty/kexisql/Makefile ])
1871
AC_CONFIG_FILES([ kexi/3rdparty/kexisql/src/Makefile ])
1872
AC_CONFIG_FILES([ kexi/3rdparty/kexisql/tool/Makefile ])
1873
AC_CONFIG_FILES([ kexi/3rdparty/kexisql3/Makefile ])
1874
AC_CONFIG_FILES([ kexi/3rdparty/kexisql3/src/Makefile ])
1875
AC_CONFIG_FILES([ kexi/3rdparty/kolibs/Makefile ])
1876
AC_CONFIG_FILES([ kexi/3rdparty/uuid/Makefile ])
1877
AC_CONFIG_FILES([ kexi/core/Makefile ])
1878
AC_CONFIG_FILES([ kexi/data/Makefile ])
1879
AC_CONFIG_FILES([ kexi/data/trinity4compat/Makefile ])
1880
AC_CONFIG_FILES([ kexi/examples/Makefile ])
1881
AC_CONFIG_FILES([ kexi/formeditor/Makefile ])
1882
AC_CONFIG_FILES([ kexi/formeditor/factories/Makefile ])
1883
AC_CONFIG_FILES([ kexi/formeditor/kdevelop_plugin/Makefile ])
1884
AC_CONFIG_FILES([ kexi/formeditor/scripting/Makefile ])
1885
AC_CONFIG_FILES([ kexi/formeditor/test/Makefile ])
1886
AC_CONFIG_FILES([ kexi/kexidb/Makefile ])
1887
AC_CONFIG_FILES([ kexi/kexidb/drivers/Makefile ])
1888
AC_CONFIG_FILES([ kexi/kexidb/drivers/mySQL/Makefile ])
1889
AC_CONFIG_FILES([ kexi/kexidb/drivers/odbc/Makefile ])
1890
AC_CONFIG_FILES([ kexi/kexidb/drivers/pqxx/Makefile ])
1891
AC_CONFIG_FILES([ kexi/kexidb/drivers/sqlite/Makefile ])
1892
AC_CONFIG_FILES([ kexi/kexidb/drivers/sqlite2/Makefile ])
1893
AC_CONFIG_FILES([ kexi/kexidb/parser/Makefile ])
1894
AC_CONFIG_FILES([ kexi/kexiutils/Makefile ])
1895
AC_CONFIG_FILES([ kexi/main/Makefile ])
1896
AC_CONFIG_FILES([ kexi/main/printing/Makefile ])
1897
AC_CONFIG_FILES([ kexi/main/startup/Makefile ])
1898
AC_CONFIG_FILES([ kexi/migration/Makefile ])
1899
AC_CONFIG_FILES([ kexi/migration/mysql/Makefile ])
1900
AC_CONFIG_FILES([ kexi/migration/pqxx/Makefile ])
1901
AC_CONFIG_FILES([ kexi/migration/txt/Makefile ])
1902
AC_CONFIG_FILES([ kexi/pics/Makefile ])
1903
AC_CONFIG_FILES([ kexi/plugins/Makefile ])
1904
AC_CONFIG_FILES([ kexi/plugins/forms/Makefile ])
1905
AC_CONFIG_FILES([ kexi/plugins/forms/widgets/Makefile ])
1906
AC_CONFIG_FILES([ kexi/plugins/importexport/Makefile ])
1907
AC_CONFIG_FILES([ kexi/plugins/importexport/csv/Makefile ])
1908
AC_CONFIG_FILES([ kexi/plugins/macros/Makefile ])
1909
AC_CONFIG_FILES([ kexi/plugins/macros/kexiactions/Makefile ])
1910
AC_CONFIG_FILES([ kexi/plugins/macros/kexipart/Makefile ])
1911
AC_CONFIG_FILES([ kexi/plugins/macros/lib/Makefile ])
1912
AC_CONFIG_FILES([ kexi/plugins/macros/tests/Makefile ])
1913
AC_CONFIG_FILES([ kexi/plugins/migration/Makefile ])
1914
AC_CONFIG_FILES([ kexi/plugins/queries/Makefile ])
1915
AC_CONFIG_FILES([ kexi/plugins/relations/Makefile ])
1916
AC_CONFIG_FILES([ kexi/plugins/reports/Makefile ])
1917
AC_CONFIG_FILES([ kexi/plugins/scripting/Makefile ])
1918
AC_CONFIG_FILES([ kexi/plugins/scripting/kexiapp/Makefile ])
1919
AC_CONFIG_FILES([ kexi/plugins/scripting/kexidb/Makefile ])
1920
AC_CONFIG_FILES([ kexi/plugins/scripting/kexiscripting/Makefile ])
1921
AC_CONFIG_FILES([ kexi/plugins/scripting/scripts/Makefile ])
1922
AC_CONFIG_FILES([ kexi/plugins/scripting/scripts/copycenter/Makefile ])
1923
AC_CONFIG_FILES([ kexi/plugins/scripting/scripts/exportxhtml/Makefile ])
1924
AC_CONFIG_FILES([ kexi/plugins/scripting/scripts/importxhtml/Makefile ])
1925
AC_CONFIG_FILES([ kexi/plugins/scripting/scripts/projectdocumentor/Makefile ])
1926
AC_CONFIG_FILES([ kexi/plugins/scripting/scripts/python/Makefile ])
1927
AC_CONFIG_FILES([ kexi/plugins/scripting/scripts/python/kexiapp/Makefile ])
1928
AC_CONFIG_FILES([ kexi/plugins/tables/Makefile ])
1929
AC_CONFIG_FILES([ kexi/tests/Makefile ])
1930
AC_CONFIG_FILES([ kexi/tests/altertable/Makefile ])
1931
AC_CONFIG_FILES([ kexi/tests/newapi/Makefile ])
1932
AC_CONFIG_FILES([ kexi/tests/parser/Makefile ])
1933
AC_CONFIG_FILES([ kexi/tests/startup/Makefile ])
1934
AC_CONFIG_FILES([ kexi/tests/tableview/Makefile ])
1935
AC_CONFIG_FILES([ kexi/tests/widgets/Makefile ])
1936
AC_CONFIG_FILES([ kexi/tools/Makefile ])
1937
AC_CONFIG_FILES([ kexi/tools/add_column/Makefile ])
1938
AC_CONFIG_FILES([ kexi/tools/delete_column/Makefile ])
1939
AC_CONFIG_FILES([ kexi/widget/Makefile ])
1940
AC_CONFIG_FILES([ kexi/widget/relations/Makefile ])
1941
AC_CONFIG_FILES([ kexi/widget/tableview/Makefile ])
1942
AC_CONFIG_FILES([ kexi/widget/utils/Makefile ])
1943
AC_CONFIG_FILES([ kformula/Makefile ])
1944
AC_CONFIG_FILES([ kformula/pics/Makefile ])
1945
AC_CONFIG_FILES([ kivio/Makefile ])
1946
AC_CONFIG_FILES([ kivio/kiviopart/Makefile ])
1947
AC_CONFIG_FILES([ kivio/kiviopart/config/Makefile ])
1948
AC_CONFIG_FILES([ kivio/kiviopart/kiviosdk/Makefile ])
1949
AC_CONFIG_FILES([ kivio/kiviopart/pics/Makefile ])
1950
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Makefile ])
1951
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Makefile ])
1952
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Assorted/Makefile ])
1953
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Circuit/Makefile ])
1954
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Cisco/Makefile ])
1955
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Civil/Makefile ])
1956
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Contact/Makefile ])
1957
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Electric/Makefile ])
1958
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Jigsaw/Makefile ])
1959
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/MSE/Makefile ])
1960
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Network/Makefile ])
1961
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Pneumatic/Makefile ])
1962
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/SDL/Makefile ])
1963
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Dia/Sybase/Makefile ])
1964
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Flowcharting/Makefile ])
1965
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Flowcharting/BasicFlowcharting/Makefile ])
1966
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Flowcharting/Extended/Makefile ])
1967
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Flowcharting/Logic/Makefile ])
1968
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Geographic/Makefile ])
1969
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Geographic/Flags/Makefile ])
1970
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Geographic/Maps/Makefile ])
1971
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Hardware/Makefile ])
1972
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Hardware/Computer/Makefile ])
1973
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Hardware/Miscellaneous/Makefile ])
1974
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Miscellaneous/Makefile ])
1975
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Miscellaneous/Arrows/Makefile ])
1976
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Miscellaneous/Buildings/Makefile ])
1977
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Miscellaneous/ER/Makefile ])
1978
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Miscellaneous/NassiShneiderman/Makefile ])
1979
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Miscellaneous/People/Makefile ])
1980
AC_CONFIG_FILES([ kivio/kiviopart/stencils/Miscellaneous/Transport/Makefile ])
1981
AC_CONFIG_FILES([ kivio/kiviopart/stencils/UML/Makefile ])
1982
AC_CONFIG_FILES([ kivio/kiviopart/stencils/UML/ActivityDiagrams/Makefile ])
1983
AC_CONFIG_FILES([ kivio/kiviopart/stencils/UML/ClassDiagrams/Makefile ])
1984
AC_CONFIG_FILES([ kivio/kiviopart/tiles/Makefile ])
1985
AC_CONFIG_FILES([ kivio/kiviopart/tools/Makefile ])
1986
AC_CONFIG_FILES([ kivio/kiviopart/ui/Makefile ])
1987
AC_CONFIG_FILES([ kivio/plugins/Makefile ])
1988
AC_CONFIG_FILES([ kivio/plugins/kivioconnectortool/Makefile ])
1989
AC_CONFIG_FILES([ kivio/plugins/kivioconnectortool/straight_connector/Makefile ])
1990
AC_CONFIG_FILES([ kivio/plugins/kivioselecttool/Makefile ])
1991
AC_CONFIG_FILES([ kivio/plugins/kivioselecttool/select_pics/Makefile ])
1992
AC_CONFIG_FILES([ kivio/plugins/kiviosmlconnector/Makefile ])
1993
AC_CONFIG_FILES([ kivio/plugins/kiviosmlconnector/sml_connector/Makefile ])
1994
AC_CONFIG_FILES([ kivio/plugins/kiviotargettool/Makefile ])
1995
AC_CONFIG_FILES([ kivio/plugins/kiviotexttool/Makefile ])
1996
AC_CONFIG_FILES([ kivio/plugins/kiviozoomtool/Makefile ])
1997
AC_CONFIG_FILES([ kivio/plugins/kiviozoomtool/zoom_pics/Makefile ])
1998
AC_CONFIG_FILES([ kivio/templates/Makefile ])
1999
AC_CONFIG_FILES([ kivio/templates/basic/Makefile ])
2000
AC_CONFIG_FILES([ koshell/Makefile ])
2001
AC_CONFIG_FILES([ kounavail/Makefile ])
2002
AC_CONFIG_FILES([ kplato/Makefile ])
2003
AC_CONFIG_FILES([ kplato/pics/Makefile ])
2004
AC_CONFIG_FILES([ kplato/reports/Makefile ])
2005
AC_CONFIG_FILES([ kplato/templates/Makefile ])
2006
AC_CONFIG_FILES([ kplato/templates/Simple/Makefile ])
2007
AC_CONFIG_FILES([ kplato/tests/Makefile ])
2008
AC_CONFIG_FILES([ kplato/toolbar/Makefile ])
2009
AC_CONFIG_FILES([ kpresenter/Makefile ])
2010
AC_CONFIG_FILES([ kpresenter/autoformEdit/Makefile ])
2011
AC_CONFIG_FILES([ kpresenter/autoforms/Makefile ])
2012
AC_CONFIG_FILES([ kpresenter/autoforms/Arrows/Makefile ])
2013
AC_CONFIG_FILES([ kpresenter/autoforms/Connections/Makefile ])
2014
AC_CONFIG_FILES([ kpresenter/dtd/Makefile ])
2015
AC_CONFIG_FILES([ kpresenter/pics/Makefile ])
2016
AC_CONFIG_FILES([ kpresenter/pics/rotate/Makefile ])
2017
AC_CONFIG_FILES([ kpresenter/slideshow/Makefile ])
2018
AC_CONFIG_FILES([ kpresenter/templates/Makefile ])
2019
AC_CONFIG_FILES([ kpresenter/templates/A4/Makefile ])
2020
AC_CONFIG_FILES([ kpresenter/templates/Screen/Makefile ])
2021
AC_CONFIG_FILES([ kpresenter/templates/Screenpresentations/Makefile ])
2022
AC_CONFIG_FILES([ kpresenter/templates/common_icon/Makefile ])
2023
AC_CONFIG_FILES([ kpresenter/templates/legal/Makefile ])
2024
AC_CONFIG_FILES([ kpresenter/templates/letter/Makefile ])
2025
AC_CONFIG_FILES([ kpresenter/toolbar/Makefile ])
2026
AC_CONFIG_FILES([ chalk/Makefile ])
2027
AC_CONFIG_FILES([ chalk/colorspaces/Makefile ])
2028
AC_CONFIG_FILES([ chalk/colorspaces/cmyk_u16/Makefile ])
2029
AC_CONFIG_FILES([ chalk/colorspaces/cmyk_u8/Makefile ])
2030
AC_CONFIG_FILES([ chalk/colorspaces/cmyk_u8/templates/Makefile ])
2031
AC_CONFIG_FILES([ chalk/colorspaces/gray_u16/Makefile ])
2032
AC_CONFIG_FILES([ chalk/colorspaces/gray_u8/Makefile ])
2033
AC_CONFIG_FILES([ chalk/colorspaces/gray_u8/templates/Makefile ])
2034
AC_CONFIG_FILES([ chalk/colorspaces/gray_u8/tests/Makefile ])
2035
AC_CONFIG_FILES([ chalk/colorspaces/lms_f32/Makefile ])
2036
AC_CONFIG_FILES([ chalk/colorspaces/rgb_f16half/Makefile ])
2037
AC_CONFIG_FILES([ chalk/colorspaces/rgb_f16half/tests/Makefile ])
2038
AC_CONFIG_FILES([ chalk/colorspaces/rgb_f32/Makefile ])
2039
AC_CONFIG_FILES([ chalk/colorspaces/rgb_f32/tests/Makefile ])
2040
AC_CONFIG_FILES([ chalk/colorspaces/rgb_u16/Makefile ])
2041
AC_CONFIG_FILES([ chalk/colorspaces/rgb_u16/tests/Makefile ])
2042
AC_CONFIG_FILES([ chalk/colorspaces/rgb_u8/Makefile ])
2043
AC_CONFIG_FILES([ chalk/colorspaces/rgb_u8/templates/Makefile ])
2044
AC_CONFIG_FILES([ chalk/colorspaces/rgb_u8/tests/Makefile ])
2045
AC_CONFIG_FILES([ chalk/colorspaces/wet/Makefile ])
2046
AC_CONFIG_FILES([ chalk/colorspaces/wetsticky/Makefile ])
2047
AC_CONFIG_FILES([ chalk/colorspaces/wetsticky/brushop/Makefile ])
2048
AC_CONFIG_FILES([ chalk/colorspaces/ycbcr_u16/Makefile ])
2049
AC_CONFIG_FILES([ chalk/colorspaces/ycbcr_u8/Makefile ])
2050
AC_CONFIG_FILES([ chalk/core/Makefile ])
2051
AC_CONFIG_FILES([ chalk/core/tests/Makefile ])
2052
AC_CONFIG_FILES([ chalk/core/tiles/Makefile ])
2053
AC_CONFIG_FILES([ chalk/core/tiles/tests/Makefile ])
2054
AC_CONFIG_FILES([ chalk/data/Makefile ])
2055
AC_CONFIG_FILES([ chalk/data/brushes/Makefile ])
2056
AC_CONFIG_FILES([ chalk/data/gradients/Makefile ])
2057
AC_CONFIG_FILES([ chalk/data/images/Makefile ])
2058
AC_CONFIG_FILES([ chalk/data/palettes/Makefile ])
2059
AC_CONFIG_FILES([ chalk/data/patterns/Makefile ])
2060
AC_CONFIG_FILES([ chalk/data/profiles/Makefile ])
2061
AC_CONFIG_FILES([ chalk/dtd/Makefile ])
2062
AC_CONFIG_FILES([ chalk/chalkcolor/Makefile ])
2063
AC_CONFIG_FILES([ chalk/chalkcolor/colorspaces/Makefile ])
2064
AC_CONFIG_FILES([ chalk/chalkcolor/tests/Makefile ])
2065
AC_CONFIG_FILES([ chalk/pics/Makefile ])
2066
AC_CONFIG_FILES([ chalk/plugins/Makefile ])
2067
AC_CONFIG_FILES([ chalk/plugins/filters/Makefile ])
2068
AC_CONFIG_FILES([ chalk/plugins/filters/blur/Makefile ])
2069
AC_CONFIG_FILES([ chalk/plugins/filters/bumpmap/Makefile ])
2070
AC_CONFIG_FILES([ chalk/plugins/filters/cimg/Makefile ])
2071
AC_CONFIG_FILES([ chalk/plugins/filters/colorify/Makefile ])
2072
AC_CONFIG_FILES([ chalk/plugins/filters/colors/Makefile ])
2073
AC_CONFIG_FILES([ chalk/plugins/filters/colorsfilters/Makefile ])
2074
AC_CONFIG_FILES([ chalk/plugins/filters/convolutionfilters/Makefile ])
2075
AC_CONFIG_FILES([ chalk/plugins/filters/cubismfilter/Makefile ])
2076
AC_CONFIG_FILES([ chalk/plugins/filters/embossfilter/Makefile ])
2077
AC_CONFIG_FILES([ chalk/plugins/filters/example/Makefile ])
2078
AC_CONFIG_FILES([ chalk/plugins/filters/fastcolortransfer/Makefile ])
2079
AC_CONFIG_FILES([ chalk/plugins/filters/imageenhancement/Makefile ])
2080
AC_CONFIG_FILES([ chalk/plugins/filters/lenscorrectionfilter/Makefile ])
2081
AC_CONFIG_FILES([ chalk/plugins/filters/levelfilter/Makefile ])
2082
AC_CONFIG_FILES([ chalk/plugins/filters/noisefilter/Makefile ])
2083
AC_CONFIG_FILES([ chalk/plugins/filters/oilpaintfilter/Makefile ])
2084
AC_CONFIG_FILES([ chalk/plugins/filters/pixelizefilter/Makefile ])
2085
AC_CONFIG_FILES([ chalk/plugins/filters/raindropsfilter/Makefile ])
2086
AC_CONFIG_FILES([ chalk/plugins/filters/randompickfilter/Makefile ])
2087
AC_CONFIG_FILES([ chalk/plugins/filters/roundcorners/Makefile ])
2088
AC_CONFIG_FILES([ chalk/plugins/filters/smalltilesfilter/Makefile ])
2089
AC_CONFIG_FILES([ chalk/plugins/filters/sobelfilter/Makefile ])
2090
AC_CONFIG_FILES([ chalk/plugins/filters/threadtest/Makefile ])
2091
AC_CONFIG_FILES([ chalk/plugins/filters/unsharp/Makefile ])
2092
AC_CONFIG_FILES([ chalk/plugins/filters/wavefilter/Makefile ])
2093
AC_CONFIG_FILES([ chalk/plugins/paintops/Makefile ])
2094
AC_CONFIG_FILES([ chalk/plugins/paintops/defaultpaintops/Makefile ])
2095
AC_CONFIG_FILES([ chalk/plugins/tools/Makefile ])
2096
AC_CONFIG_FILES([ chalk/plugins/tools/defaulttools/Makefile ])
2097
AC_CONFIG_FILES([ chalk/plugins/tools/selectiontools/Makefile ])
2098
AC_CONFIG_FILES([ chalk/plugins/tools/tool_crop/Makefile ])
2099
AC_CONFIG_FILES([ chalk/plugins/tools/tool_curves/Makefile ])
2100
AC_CONFIG_FILES([ chalk/plugins/tools/tool_filter/Makefile ])
2101
AC_CONFIG_FILES([ chalk/plugins/tools/tool_perspectivegrid/Makefile ])
2102
AC_CONFIG_FILES([ chalk/plugins/tools/tool_perspectivetransform/Makefile ])
2103
AC_CONFIG_FILES([ chalk/plugins/tools/tool_polygon/Makefile ])
2104
AC_CONFIG_FILES([ chalk/plugins/tools/tool_polyline/Makefile ])
2105
AC_CONFIG_FILES([ chalk/plugins/tools/tool_selectsimilar/Makefile ])
2106
AC_CONFIG_FILES([ chalk/plugins/tools/tool_star/Makefile ])
2107
AC_CONFIG_FILES([ chalk/plugins/tools/tool_transform/Makefile ])
2108
AC_CONFIG_FILES([ chalk/plugins/viewplugins/Makefile ])
2109
AC_CONFIG_FILES([ chalk/plugins/viewplugins/colorrange/Makefile ])
2110
AC_CONFIG_FILES([ chalk/plugins/viewplugins/colorspaceconversion/Makefile ])
2111
AC_CONFIG_FILES([ chalk/plugins/viewplugins/dropshadow/Makefile ])
2112
AC_CONFIG_FILES([ chalk/plugins/viewplugins/filtersgallery/Makefile ])
2113
AC_CONFIG_FILES([ chalk/plugins/viewplugins/histogram/Makefile ])
2114
AC_CONFIG_FILES([ chalk/plugins/viewplugins/histogram_docker/Makefile ])
2115
AC_CONFIG_FILES([ chalk/plugins/viewplugins/history_docker/Makefile ])
2116
AC_CONFIG_FILES([ chalk/plugins/viewplugins/imagesize/Makefile ])
2117
AC_CONFIG_FILES([ chalk/plugins/viewplugins/modify_selection/Makefile ])
2118
AC_CONFIG_FILES([ chalk/plugins/viewplugins/performancetest/Makefile ])
2119
AC_CONFIG_FILES([ chalk/plugins/viewplugins/rotateimage/Makefile ])
2120
AC_CONFIG_FILES([ chalk/plugins/viewplugins/screenshot/Makefile ])
2121
AC_CONFIG_FILES([ chalk/plugins/viewplugins/scripting/Makefile ])
2122
AC_CONFIG_FILES([ chalk/plugins/viewplugins/scripting/chalkcore/Makefile ])
2123
AC_CONFIG_FILES([ chalk/plugins/viewplugins/scripting/chalkscripting/Makefile ])
2124
AC_CONFIG_FILES([ chalk/plugins/viewplugins/scripting/samples/Makefile ])
2125
AC_CONFIG_FILES([ chalk/plugins/viewplugins/scripting/samples/python/Makefile ])
2126
AC_CONFIG_FILES([ chalk/plugins/viewplugins/scripting/samples/ruby/Makefile ])
2127
AC_CONFIG_FILES([ chalk/plugins/viewplugins/selectopaque/Makefile ])
2128
AC_CONFIG_FILES([ chalk/plugins/viewplugins/separate_channels/Makefile ])
2129
AC_CONFIG_FILES([ chalk/plugins/viewplugins/shearimage/Makefile ])
2130
AC_CONFIG_FILES([ chalk/plugins/viewplugins/substrate/Makefile ])
2131
AC_CONFIG_FILES([ chalk/plugins/viewplugins/variations/Makefile ])
2132
AC_CONFIG_FILES([ chalk/sdk/Makefile ])
2133
AC_CONFIG_FILES([ chalk/ui/Makefile ])
2134
AC_CONFIG_FILES([ kspread/Makefile ])
2135
AC_CONFIG_FILES([ kspread/dialogs/Makefile ])
2136
AC_CONFIG_FILES([ kspread/dtd/Makefile ])
2137
AC_CONFIG_FILES([ kspread/extensions/Makefile ])
2138
AC_CONFIG_FILES([ kspread/pics/Makefile ])
2139
AC_CONFIG_FILES([ kspread/plugins/Makefile ])
2140
AC_CONFIG_FILES([ kspread/plugins/calculator/Makefile ])
2141
AC_CONFIG_FILES([ kspread/plugins/calculator/pics/Makefile ])
2142
AC_CONFIG_FILES([ kspread/plugins/insertcalendar/Makefile ])
2143
AC_CONFIG_FILES([ kspread/plugins/scripting/Makefile ])
2144
AC_CONFIG_FILES([ kspread/plugins/scripting/kspreadcore/Makefile ])
2145
AC_CONFIG_FILES([ kspread/plugins/scripting/scripts/Makefile ])
2146
AC_CONFIG_FILES([ kspread/plugins/scripting/scripts/exporthtml/Makefile ])
2147
AC_CONFIG_FILES([ kspread/plugins/scripting/scripts/scripteditor/Makefile ])
2148
AC_CONFIG_FILES([ kspread/sheetstyles/Makefile ])
2149
AC_CONFIG_FILES([ kspread/templates/Makefile ])
2150
AC_CONFIG_FILES([ kspread/templates/Business/Makefile ])
2151
AC_CONFIG_FILES([ kspread/templates/General/Makefile ])
2152
AC_CONFIG_FILES([ kspread/templates/HomeFamily/Makefile ])
2153
AC_CONFIG_FILES([ kspread/tests/Makefile ])
2154
AC_CONFIG_FILES([ kspread/toolbar/Makefile ])
2155
AC_CONFIG_FILES([ kspread/toolbar/crystalsvg/Makefile ])
2156
AC_CONFIG_FILES([ kugar/Makefile ])
2157
AC_CONFIG_FILES([ kugar/kudesigner/Makefile ])
2158
AC_CONFIG_FILES([ kugar/kudesigner/pics/Makefile ])
2159
AC_CONFIG_FILES([ kugar/kudesigner/templates/Makefile ])
2160
AC_CONFIG_FILES([ kugar/kudesigner/templates/General/Makefile ])
2161
AC_CONFIG_FILES([ kugar/kudesigner/toolbar/Makefile ])
2162
AC_CONFIG_FILES([ kugar/kudesigner_lib/Makefile ])
2163
AC_CONFIG_FILES([ kugar/lib/Makefile ])
2164
AC_CONFIG_FILES([ kugar/part/Makefile ])
2165
AC_CONFIG_FILES([ kugar/samples/Makefile ])
2166
AC_CONFIG_FILES([ kword/Makefile ])
2167
AC_CONFIG_FILES([ kword/data/Makefile ])
2168
AC_CONFIG_FILES([ kword/dtd/Makefile ])
2169
AC_CONFIG_FILES([ kword/expression/Makefile ])
2170
AC_CONFIG_FILES([ kword/horizontalline/Makefile ])
2171
AC_CONFIG_FILES([ kword/mailmerge/Makefile ])
2172
AC_CONFIG_FILES([ kword/mailmerge/kabc/Makefile ])
2173
AC_CONFIG_FILES([ kword/mailmerge/kspread/Makefile ])
2174
AC_CONFIG_FILES([ kword/mailmerge/sql/Makefile ])
2175
AC_CONFIG_FILES([ kword/pics/Makefile ])
2176
AC_CONFIG_FILES([ kword/templates/Makefile ])
2177
AC_CONFIG_FILES([ kword/templates/CardsAndLabels/Makefile ])
2178
AC_CONFIG_FILES([ kword/templates/Envelopes/Makefile ])
2179
AC_CONFIG_FILES([ kword/templates/Wordprocessing/Makefile ])
2180
AC_CONFIG_FILES([ kword/tests/Makefile ])
2181
AC_CONFIG_FILES([ kword/toolbar/Makefile ])
2182
AC_CONFIG_FILES([ lib/Makefile ])
2183
AC_CONFIG_FILES([ lib/kformula/Makefile ])
2184
AC_CONFIG_FILES([ lib/kformula/config/Makefile ])
2185
AC_CONFIG_FILES([ lib/kformula/dtd/Makefile ])
2186
AC_CONFIG_FILES([ lib/kformula/fonts/Makefile ])
2187
AC_CONFIG_FILES([ lib/kformula/pics/Makefile ])
2188
AC_CONFIG_FILES([ lib/kformula/pics/crystalsvg/Makefile ])
2189
AC_CONFIG_FILES([ lib/kofficecore/Makefile ])
2190
AC_CONFIG_FILES([ lib/kofficecore/tests/Makefile ])
2191
AC_CONFIG_FILES([ lib/kofficeui/Makefile ])
2192
AC_CONFIG_FILES([ lib/kofficeui/pics/Makefile ])
2193
AC_CONFIG_FILES([ lib/kofficeui/tests/Makefile ])
2194
AC_CONFIG_FILES([ lib/kopainter/Makefile ])
2195
AC_CONFIG_FILES([ lib/kopalette/Makefile ])
2196
AC_CONFIG_FILES([ lib/koproperty/Makefile ])
2197
AC_CONFIG_FILES([ lib/koproperty/editors/Makefile ])
2198
AC_CONFIG_FILES([ lib/koproperty/test/Makefile ])
2199
AC_CONFIG_FILES([ lib/kotext/Makefile ])
2200
AC_CONFIG_FILES([ lib/kotext/kohyphen/Makefile ])
2201
AC_CONFIG_FILES([ lib/kotext/kohyphen/hyphdicts/Makefile ])
2202
AC_CONFIG_FILES([ lib/kotext/tests/Makefile ])
2203
AC_CONFIG_FILES([ lib/kross/Makefile ])
2204
AC_CONFIG_FILES([ lib/kross/api/Makefile ])
2205
AC_CONFIG_FILES([ lib/kross/main/Makefile ])
2206
AC_CONFIG_FILES([ lib/kross/python/Makefile ])
2207
AC_CONFIG_FILES([ lib/kross/python/cxx/Makefile ])
2208
AC_CONFIG_FILES([ lib/kross/python/scripts/Makefile ])
2209
AC_CONFIG_FILES([ lib/kross/python/scripts/RestrictedPython/Makefile ])
2210
AC_CONFIG_FILES([ lib/kross/ruby/Makefile ])
2211
AC_CONFIG_FILES([ lib/kross/runner/Makefile ])
2212
AC_CONFIG_FILES([ lib/kross/test/Makefile ])
2213
AC_CONFIG_FILES([ lib/kwmf/Makefile ])
2214
AC_CONFIG_FILES([ lib/store/Makefile ])
2215
AC_CONFIG_FILES([ lib/store/tests/Makefile ])
2216
AC_CONFIG_FILES([ mimetypes/Makefile ])
2217
AC_CONFIG_FILES([ mimetypes/trinity3/Makefile ])
2218
AC_CONFIG_FILES([ mimetypes/trinity51/Makefile ])
2219
AC_CONFIG_FILES([ pics/Makefile ])
2220
AC_CONFIG_FILES([ pics/crystalsvg/Makefile ])
2221
AC_CONFIG_FILES([ plugins/Makefile ])
2222
AC_CONFIG_FILES([ plugins/scan/Makefile ])
2223
AC_CONFIG_FILES([ servicetypes/Makefile ])
2224
AC_CONFIG_FILES([ templates/Makefile ])
2225
AC_CONFIG_FILES([ tools/Makefile ])
2226
AC_CONFIG_FILES([ tools/converter/Makefile ])
2227
AC_CONFIG_FILES([ tools/kfile-plugins/Makefile ])
2228
AC_CONFIG_FILES([ tools/kfile-plugins/abiword/Makefile ])
2229
AC_CONFIG_FILES([ tools/kfile-plugins/gnumeric/Makefile ])
2230
AC_CONFIG_FILES([ tools/kfile-plugins/koffice/Makefile ])
2231
AC_CONFIG_FILES([ tools/kfile-plugins/ooo/Makefile ])
2232
AC_CONFIG_FILES([ tools/kthesaurus/Makefile ])
2233
AC_CONFIG_FILES([ tools/quickprint/Makefile ])
2234
AC_CONFIG_FILES([ tools/spell/Makefile ])
2235
AC_CONFIG_FILES([ tools/thesaurus/Makefile ])
2236
AC_CONFIG_FILES([ tools/thumbnail/Makefile ])
2237
AC_MSG_CHECKING([for filters to be compiled])
2238
2239
if test -s $srcdir/inst-apps ; then
2240
    SUBDIRLIST=`cat $srcdir/inst-apps`
2241
else
2242
    SUBDIRLIST=`cat $srcdir/subdirs`
2243
fi
2244
2245
# fallback (KDE_CREATE_SUBDIRLIST has this fallback, so I have put it here too.)
2246
if test -z "$SUBDIRLIST" ; then
2247
    SUBDIRLIST=`ls -1 $srcdir`
2248
fi
2249
2250
# first check which main apllication we could compile
2251
for args in $SUBDIRLIST ; do
2252
    case $args in
2253
        kword) COMPILE_FILTER_KWORD="$args " ;;
2254
        kspread) COMPILE_FILTER_KSPREAD="$args " ;;
2255
        kchart) COMPILE_FILTER_KCHART="$args " ;;
2256
        karbon) COMPILE_FILTER_KARBON="$args " ;;
2257
        kpresenter) COMPILE_FILTER_KPRESENTER="$args " ;;
2258
        kformula) COMPILE_FILTER_KFORMULA="$args " ;;
2259
        kugar) COMPILE_FILTER_KUGAR="$args " ;;
2260
        chalk) COMPILE_FILTER_KRITA="$args " ;;
2261
	kivio) COMPILE_FILTER_KIVIO="$args " ;;
2262
	kexi) COMPILE_FILTER_KEXI="$args " ;;
2263
    esac
2264
done
2265
2266
# now remove the applications the user has asked not to compile
2267
for args in $DO_NOT_COMPILE ; do
2268
    case $args in
2269
        kword) COMPILE_FILTER_KWORD= ;;
2270
        kspread) COMPILE_FILTER_KSPREAD= ;;
2271
        kchart) COMPILE_FILTER_KCHART= ;;
2272
        karbon) COMPILE_FILTER_KARBON= ;;
2273
        kpresenter) COMPILE_FILTER_KPRESENTER= ;;
2274
        kformula) COMPILE_FILTER_KFORMULA= ;;
2275
        kugar) COMPILE_FILTER_KUGAR= ;;
2276
        chalk) COMPILE_FILTER_KRITA= ;;
2277
	kivio) COMPILE_FILTER_KIVIO= ;;
2278
	kexi) COMPILE_FILTER_KEXI= ;;
2279
    esac
2280
done
2281
2282
USERFEEDBACKCOMPILE="$COMPILE_FILTER_KWORD$COMPILE_FILTER_KSPREAD$COMPILE_FILTER_KCHART$COMPILE_FILTER_KARBON$COMPILE_FILTER_KPRESENTER$COMPILE_FILTER_KFORMULA$COMPILE_FILTER_KUGAR"
2283
AC_MSG_RESULT([$USERFEEDBACKCOMPILE])
2284
2285
AM_CONDITIONAL(compile_filter_KWORD, test -n "$COMPILE_FILTER_KWORD")
2286
AM_CONDITIONAL(compile_filter_KSPREAD, test -n "$COMPILE_FILTER_KSPREAD")
2287
AM_CONDITIONAL(compile_filter_KCHART, test -n "$COMPILE_FILTER_KCHART")
2288
AM_CONDITIONAL(compile_filter_KARBON, test -n "$COMPILE_FILTER_KARBON")
2289
AM_CONDITIONAL(compile_filter_KPRESENTER, test -n "$COMPILE_FILTER_KPRESENTER")
2290
AM_CONDITIONAL(compile_filter_KFORMULA, test -n "$COMPILE_FILTER_KFORMULA")
2291
AM_CONDITIONAL(compile_filter_KUGAR, test -n "$COMPILE_FILTER_KUGAR")
2292
AM_CONDITIONAL(compile_filter_KRITA, test -n "$COMPILE_FILTER_KRITA")
2293
AM_CONDITIONAL(compile_filter_KIVIO, test -n "$COMPILE_FILTER_KIVIO")
2294
AM_CONDITIONAL(compile_filter_KEXI, test -n "$COMPILE_FILTER_KEXI")
2295
if test -s $srcdir/inst-apps ; then
2296
    SUBDIRLIST=`cat $srcdir/inst-apps`
2297
else
2298
    SUBDIRLIST=`cat $srcdir/subdirs`
2299
fi
2300
2301
# fallback (KDE_CREATE_SUBDIRLIST has this fallback, so I have put it here too.)
2302
if test -z "$SUBDIRLIST" ; then
2303
    SUBDIRLIST=`ls -1 $srcdir`
2304
fi
2305
2306
# first check which main apllication we could compile
2307
for args in $SUBDIRLIST ; do
2308
    case $args in
2309
        kugar) COMPILE_PLUGIN_KUGAR="$args " ;;
2310
    esac
2311
done
2312
2313
# now remove the applications the user has asked not to compile
2314
for args in $DO_NOT_COMPILE ; do
2315
    case $args in
2316
        kugar) COMPILE_PLUGIN_KUGAR= ;;
2317
    esac
2318
done
2319
2320
AM_CONDITIONAL(compile_plugin_KUGAR, test -n "$COMPILE_PLUGIN_KUGAR")
2321
if test -s $srcdir/inst-apps ; then
2322
    SUBDIRLIST=`cat $srcdir/inst-apps`
2323
else
2324
    SUBDIRLIST=`cat $srcdir/subdirs`
2325
fi
2326
2327
# fallback (KDE_CREATE_SUBDIRLIST has this fallback, so I have put it here too.)
2328
if test -z "$SUBDIRLIST" ; then
2329
    SUBDIRLIST=`ls -1 $srcdir`
2330
fi
2331
2332
AC_MSG_CHECKING([whether only Kexi is being built])
2333
KEXI_ONLY=yes
2334
for args in $SUBDIRLIST ; do
2335
    case $args in
2336
        lib) ;;
2337
        kexi) ;;
2338
        *) if test -d $srcdir/$args ; then 
2339
             KEXI_ONLY=no
2340
           fi
2341
           ;;
2342
    esac
2343
done
2344
AC_MSG_RESULT([$KEXI_ONLY])
2345
AM_CONDITIONAL(compile_kexionly, test "$KEXI_ONLY" = "yes" )
2346
2347
AC_MSG_CHECKING([whether kopainter should be compiled])
2348
2349
# first check which main application we could compile
2350
for args in $SUBDIRLIST ; do
2351
    case $args in
2352
        chalk) COMPILE_LIB_FOR_KRITA="$args " ;;
2353
        karbon) COMPILE_LIB_FOR_KARBON="$args " ;;
2354
        kivio) COMPILE_LIB_FOR_KIVIO="$args " ;;
2355
    esac
2356
done
2357
2358
# now remove the applications the user has asked not to compile
2359
COMPILE_LIB_FOR_KPRESENTER="#"
2360
for args in $DO_NOT_COMPILE ; do
2361
    case $args in
2362
        chalk) COMPILE_LIB_FOR_KRITA= ;;
2363
        karbon) COMPILE_LIB_FOR_KARBON= ;;
2364
        kivio) COMPILE_LIB_FOR_KIVIO= ;;
2365
	kpresenter) COMPILE_LIB_FOR_KPRESENTER= ;;
2366
    esac
2367
done
2368
2369
if test -n "$COMPILE_LIB_FOR_KRITA$COMPILE_LIB_FOR_KARBON$COMPILE_LIB_FOR_KIVIO$COMPILE_LIB_FOR_KPRESENTER" ; then
2370
    USERFEEDBACKCOMPILELIB="yes"
2371
else
2372
    USERFEEDBACKCOMPILELIB="no"
2373
fi
2374
2375
AC_MSG_RESULT([$USERFEEDBACKCOMPILELIB])
2376
2377
AM_CONDITIONAL(compile_lib_KOPAINTER, test "$USERFEEDBACKCOMPILELIB" = "yes" )
2378
2379
AC_OUTPUT
2380
if test -z "$LIBGMAGICK_LIBS" -a -z "$LIBMAGICK_LIBS"; then
2381
  echo ""
2382
  echo "You're missing GraphicsMagick (>=1.1.7). chalk's GraphicsMagick import/export"
2383
  echo "filter will not be compiled. You can download GraphicsMagick from"
2384
  echo "http://www.graphicsmagick.org/. The GraphicsMagick filter allows chalk to"
2385
  echo "read and write XCF, PSD, GIF, BMP, and many other image formats."
2386
  echo ""
2387
  echo "If you have problems compiling GraphicsMagick, please try configuring it using"
2388
  echo "the --without-magick-plus-plus flag, the C++ API isn't needed for chalk."
2389
  echo ""
2390
  all_tests=bad
2391
  AC_DEFINE([include_imagemagick_filter],"",[don't use magick filter])
2392
fi
2393
2394
if test -z "$LIBGMAGICK_LIBS" -a ! -z "$LIBMAGICK_LIBS"; then
2395
2396
  echo ""
2397
  echo "You're missing GraphicsMagick (>=1.1.7). chalk's GraphicsMagick import/export"
2398
  echo "filter will not be compiled. But ImageMagick was found, which mean that chalk"
2399
  echo "will be able to read and write XCF, PSD, GIF, BMP, and many other image formats."
2400
  echo "But the ImageMagick filter is deprecated and we strongly advise you to install"
2401
  echo "GraphicsMagick either from your distribution or from http://www.graphicsmagick.org/"
2402
fi
2403
if test -z "$LIBJPEG" -o -z "$LIBEXIF"; then
2404
  echo ""
2405
  echo "You're missing libjpeg or libexif 0.6.12 or later (binaries and/or headers)."
2406
  echo "chalk won't be able to import/export jpeg"
2407
  echo ""
2408
  all_tests=bad
2409
fi
2410
# ImageMagick is deprecated, we don't care anymore if it's not here
2411
#
2412
#if test -z "$LIBMAGICK_LIBS"; then
2413
#  echo ""
2414
#  echo "You're missing ImageMagick (>=6.1.0). chalk's ImageMagick import/export"
2415
#  echo "filter will not be compiled. You can download ImageMagick from"
2416
#  echo "http://www.imagemagick.org/. The ImageMagick filter allows chalk to"
2417
#  echo "read and write XCF, PSD, GIF, BMP, and many other image formats."
2418
#  echo ""
2419
#  echo "If you have problems compiling ImageMagick, please try configuring it using"
2420
#  echo "the --without-magick-plus-plus flag, the C++ API isn't needed for chalk."
2421
#  echo ""
2422
#  all_tests=bad
2423
#fi
2424
2425
if test -z "$OPENEXR_LIBS"; then
2426
  echo ""
2427
  echo "You're missing the OpenEXR library. Chalk's OpenEXR import/export filter will "
2428
  echo "not be compiled. You can download OpenEXR from http://www.openexr.com or "
2429
  echo "install it from an appropriate binary package."
2430
  echo ""
2431
  all_tests=bad
2432
fi
2433
2434
if test -z "$POPPLER_LIBS"; then
2435
  echo ""
2436
  echo "You're missing libpoppler 0.5.1 or later (binaries and/or headers)."
2437
  echo "chalk won't be able to import pdf"
2438
  echo "note that the tqt-binding of libpoppler is required"
2439
  echo ""
2440
fi
2441
if test -z "$LIBPNG";  then
2442
  echo ""
2443
  echo "You're missing libpng (binaries and/or headers), chalk won't be able"
2444
  echo "to import/export png"
2445
  echo ""
2446
  all_tests=bad
2447
fi
2448
2449
if test -z "$LIBTIFF"; then
2450
  echo ""
2451
  echo "You're missing libtiff (binaries and/or headers), chalk won't be able"
2452
  echo "to import/export tiff"
2453
  echo ""
2454
  all_tests=bad
2455
fi
2456
if test -z "$LIBWV2_LIBS"; then
2457
  echo ""
2458
  echo "You're missing libwv2 0.1.9 or newer. KWord's MS Word filter will not be"
2459
  echo "compiled. You can download wv2 using anonymous CVS from the Sourceforge"
2460
  echo "repository (http://sourceforge.net/cvs/?group_id=10501) or get a"
2461
  echo "tarball at http://sourceforge.net/projects/wvware/"
2462
#  echo "The MS Word filter won't be compiled due to experimental changes."
2463
  echo ""
2464
  all_tests=bad
2465
fi
2466
if test -z "$LIBWPD_LIBS"; then
2467
  echo ""
2468
  echo "You're missing libwpd 0.8 or newer. KWord's WordPerfect import filter will "
2469
  echo "not be compiled. You can download libwpd from http://libwpd.sf.net or "
2470
  echo "install it from appropriate binary package."
2471
  echo ""
2472
  all_tests=bad
2473
fi
2474
if test -z "$LIBXML_LIBS"; then
2475
  echo ""
2476
  echo "You're missing libxml2 (at least version 2.4.8)."
2477
  echo "The XSLT filters will not be compiled."
2478
  echo "Please download libxml2 from http://xmlsoft.org ."
2479
  echo ""
2480
  all_tests=bad
2481
fi
2482
2483
if test -z "$LIBXSLT_LIBS"; then
2484
  echo ""
2485
  echo "You're missing libxslt (at least version 1.0.7)."
2486
  echo "The XSLT filters will not be compiled."
2487
# TODO: URL is not exacly right anymore
2488
  echo "Please download libxml2 from http://xmlsoft.org ."
2489
  echo ""
2490
  all_tests=bad
2491
fi
2492
2493
if test -z "$LIBART_LIBS"; then
2494
  echo ""
2495
  echo "You're missing libart 2.3.8. karbon will not be compiled."
2496
  echo "You can download libart from"
2497
  echo "http://svg.kde.org/download.html"
2498
  echo ""
2499
  all_tests=bad
2500
else
2501
  if test -z "$LIBFONTCONFIG_LIBS"; then
2502
    echo ""
2503
    echo "You're missing fontconfig 1.0.1 or newer. karbon will not have text support."
2504
    echo "You can download fontconfig from http://fontconfig.org/"
2505
    echo ""
2506
    all_tests=bad
2507
  fi
2508
2509
  if test -z "$LIBFREETYPE_LIBS"; then
2510
    echo ""
2511
    echo "You're missing libfreetype 5.0 or newer. karbon will not have text support."
2512
    echo "You can download libfreetype from http://www.freetype.org/"
2513
    echo ""
2514
    all_tests=bad
2515
  fi
2516
fi
2517
if test -z "$MYSQL_INC" -o -z "$MYSQL_LIBS"; then
2518
2519
  echo "----------------------------------------------------------------------"
2520
2521
  echo "  + The MySQL development files were not found."
2522
  cat <<EOS
2523
  These are required for MySQL support in Kexi.
2524
2525
  If you want MySQL support in Kexi, you need to install the MySQL development
2526
  files, ensure that mysql-config is in your path,  and run this configure script
2527
  again, and finally run make; make install.  
2528
  If you don't need MySQL support, you can simply run make; make install now.
2529
EOS
2530
   all_tests=bad
2531
fi
2532
2533
if test -z "$PG_INCDIR" -o -z "$PG_LIBDIR" -o \
2534
        -z "$PQXX_INCDIR" -o -z "$PQXX_LIBDIR"; then
2535
2536
  echo "----------------------------------------------------------------------"
2537
2538
# LIBPQ messages
2539
  if test -z "$PG_INCDIR"; then
2540
    echo "  + The PostgreSQL C-API (libpq) headers were not found."
2541
  fi
2542
2543
  if test -z "$PG_LIBDIR"; then
2544
    echo "  + The PostgreSQL C-API (libpq) libraries were not found."
2545
  fi
2546
2547
  if test -z "$PG_INCDIR" -a -z "$PG_LIBDIR" ; then
2548
      pglib_parts_missing="HEADER or the libpq LIBRARY"
2549
  elif test -z "$PG_INCDIR" ; then
2550
      pglib_parts_missing="HEADER"
2551
  elif test -z "$PG_LIBDIR" ; then
2552
      pglib_parts_missing="LIBRARY"
2553
  fi
2554
2555
  if test -z "$PG_INCDIR" -o -z "$PG_LIBDIR" ; then
2556
    cat <<EOS
2557
    Could not find the libpq $pglib_parts_missing files.
2558
    These are required by the libpqxx C++ library, which is used by
2559
    Kexi's PostgreSQL drivers.
2560
2561
    The PostgreSQL C-API usually ship with PostgreSQL, but if you've
2562
    installed from a distros package then these files may be part of
2563
    a package called postgresql-devel or libpq-devel"
2564
2565
EOS
2566
  fi
2567
2568
# LIBPQXX messages
2569
  if test -z "$PQXX_INCDIR"; then
2570
    echo "  + The PostgreSQL C++ API (libpqxx) headers were not found."
2571
  fi
2572
2573
  if test -z "$PQXX_LIBDIR"; then
2574
    echo "  + The PostgreSQL C++ API (libpqxx) shared libraries were not found."
2575
  fi
2576
2577
  if test -z "$PQXX_INCDIR" -a -z "$PQXX_LIBDIR" ; then
2578
      pqxx_parts_missing="HEADER or the libpqxx LIBRARY"
2579
  elif test -z "$PQXX_INCDIR" ; then
2580
      pqxx_parts_missing="HEADER"
2581
  elif test -z "$PQXX_LIBDIR" ; then
2582
      pqxx_parts_missing="LIBRARY"
2583
  fi
2584
2585
  if test -z "$PQXX_INCDIR" -o -z "$PQXX_LIBDIR" ; then
2586
  cat <<EOS
2587
    Could not find the libpqxx $pqxx_parts_missing files.
2588
    These are required by Kexi's PostgreSQL drivers.
2589
2590
    Note: Kexi requires the SHARED libpqxx.so library files.
2591
          If you build pqxx library on your own, don't forget to use the
2592
          --enable-shared option when you run libpqxx's configure script.
2593
          This is necessary to compile the SHARED .so library, and
2594
          not the STATIC libpqxx.a.
2595
2596
    The PostgreSQL C++ API can be downloaded from pqxx.tk or
2597
    http://gborg.postgresql.org/project/libpqxx/projdisplay.php
2598
    Grab the latest version (>=2)
2599
2600
EOS
2601
  fi
2602
2603
# SUMMARY messages
2604
  cat <<EOS
2605
  These warnings are not critical, but without installing the files
2606
  listed above Kexi will be compiled without PostgreSQL support.
2607
2608
  If you want PostgreSQL support in Kexi, you need to install the files
2609
  listed above, then run this configure script again, and finally run
2610
  make; make install.  If you don't, simply run make; make install now.
2611
EOS
2612
2613
  all_tests=bad
2614
  echo "----------------------------------------------------------------------"
2615
fi
2616
if test -z "$LCMS_LIBS"; then
2617
  echo ""
2618
  echo "LittleCMS is missing, Chalk will not be built."
2619
  echo ""
2620
  echo "If you want to compile Chalk you should install:"
2621
  echo "  * lcms 1.15 or newer (http://www.littlecms.com/)"
2622
  echo ""
2623
  all_tests=bad
2624
else
2625
  if test -z "$GLLIB"; then
2626
    echo ""
2627
    echo "You're missing OpenGL libraries. chalk will"
2628
    echo "not be able to use OpenGL for hardware"
2629
    echo "accelerated rendering."
2630
    echo ""
2631
  fi
2632
fi
2633
2634
2635
if test -z "$LIBKSPELL2"; then
2636
   echo ""
2637
   echo "You don't use kdelibs CVS (kspell2 not found). Spell-checking disabled."
2638
   echo ""
2639
   all_tests=bad
2640
fi
2641
if test -z "$RUBY_LIBDIR" -a "x$compile_kross" = "xyes" ; then
2642
  echo ""
2643
  echo "Ruby development files were not found, or Ruby <= 1.8.1 was found,"
2644
  echo "Ruby scripting support for KOffice will not be built. If you don't"
2645
  echo "need Ruby scripting, you can ignore this message."
2646
  echo ""
2647
fi
2648
2649
if test -z "$LIBPYTHON" -a -z "$PYTHONINC" -a $"x$compile_kross" = "xyes"; then
2650
  echo ""
2651
  echo "Python developement files were not found, Python scripting support for"
2652
  echo "KOffice will not be built. If you don't need Python scripting, you"
2653
  echo "can ignore this message"
2654
  echo ""
2655
fi
2656
2657
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
2658
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
2659
  # And if so, warn when they don't match
2660
  if test "$kde_libs_prefix" != "$given_prefix"; then
2661
    # And if kde doesn't know about the prefix yet
2662
    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
2663
    if test $? -ne 0; then
2664
      echo ""
2665
      echo "Warning: you chose to install this package in $given_prefix,"
2666
      echo "but KDE was found in $kde_libs_prefix."
2667
      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
2668
      echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
2669
      echo "Then restart KDE."
2670
      echo ""
2671
    fi
2672
  fi
2673
fi
2674
2675
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
2676
  echo ""
2677
  echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
2678
  echo "was not included. Therefore, GCC symbol visibility support remains disabled."
2679
  echo ""
2680
  echo "For better performance, consider including the Qt visibility supporting patch"
2681
  echo "located at:"
2682
  echo ""
2683
  echo "http://bugs.kde.org/show_bug.cgi?id=109386"
2684
  echo ""
2685
  echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
2686
  echo "everything will continue to work just fine without it."
2687
  echo ""
2688
fi
2689
2690
if test "$all_tests" = "bad"; then
2691
  if test ! "$cache_file" = "/dev/null"; then
2692
    echo ""
2693
    echo "Please remove the file $cache_file after changing your setup"
2694
    echo "so that configure will find the changes next time."
2695
    echo ""
2696
  fi
2697
else
2698
  echo ""
2699
  echo "Good - your configure finished. Start make now"
2700
  echo ""
2701
fi
(-)a/filters/kword/wordperfect/configure.in.in (-2 lines)
Lines 41-48 if test -z "$LIBWPD_LIBS"; then Link Here
41
41
42
       AC_DEFINE_UNQUOTED(HAVE_WPD, 1, [Defines if your system has the libwpd library])
42
       AC_DEFINE_UNQUOTED(HAVE_WPD, 1, [Defines if your system has the libwpd library])
43
       AC_DEFINE_UNQUOTED(HAVE_LIBWPD_090, 1, [Defines if your system has libpwd greater than or equal to v0.9.0])
43
       AC_DEFINE_UNQUOTED(HAVE_LIBWPD_090, 1, [Defines if your system has libpwd greater than or equal to v0.9.0])
44
45
       AC_MSG_ERROR([[libwpd >= 0.9.0 is not yet supported!]])       
46
    fi
44
    fi
47
  fi
45
  fi
48
fi
46
fi
(-)a/filters/kword/wordperfect/import/WordPerfectCollector.hxx (+61 lines)
Lines 77-89 struct ltstr Link Here
77
  }
77
  }
78
};
78
};
79
79
80
#ifdef HAVE_LIBWPD_090
81
class WordPerfectCollector : public WPXDocumentInterface
82
#else // HAVE_LIBWPD_090
80
class WordPerfectCollector : public WPXHLListenerImpl
83
class WordPerfectCollector : public WPXHLListenerImpl
84
#endif HAVE_LIBWPD_090
81
{
85
{
82
public:
86
public:
83
	WordPerfectCollector(WPXInputStream *pInput, DocumentHandler *pHandler);
87
	WordPerfectCollector(WPXInputStream *pInput, DocumentHandler *pHandler);
84
	virtual ~WordPerfectCollector();
88
	virtual ~WordPerfectCollector();
85
	bool filter();
89
	bool filter();
86
90
91
#ifdef HAVE_LIBWPD_090
92
	virtual void setDocumentMetaData(const WPXPropertyList &propList) {};
93
	virtual void startDocument();
94
	virtual void endDocument();
95
	virtual void definePageStyle(const WPXPropertyList &propList) {};
96
	virtual void openPageSpan(const WPXPropertyList &propList) {};
97
	virtual void closePageSpan() {};
98
	virtual void openHeader(const WPXPropertyList &propList) {};
99
	virtual void closeHeader() {};
100
	virtual void openFooter(const WPXPropertyList &propList) {};
101
	virtual void closeFooter() {};
102
	virtual void defineParagraphStyle(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) {};
103
	virtual void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops);
104
	virtual void closeParagraph();
105
	virtual void defineCharacterStyle(const WPXPropertyList &propList) {};
106
	virtual void openSpan(const WPXPropertyList &propList);
107
	virtual void closeSpan();
108
	virtual void defineSectionStyle(const WPXPropertyList &propList, const WPXPropertyListVector &columns) {};
109
	virtual void openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns) {};
110
	virtual void closeSection() {};
111
	virtual void insertTab();
112
	virtual void insertSpace() {};
113
	virtual void insertText(const WPXString &text);
114
 	virtual void insertLineBreak();
115
	virtual void insertField(const WPXString &type, const WPXPropertyList &propList) {};
116
	virtual void defineOrderedListLevel(const WPXPropertyList &propList) {};
117
	virtual void defineUnorderedListLevel(const WPXPropertyList &propList) {};	
118
	virtual void openOrderedListLevel(const WPXPropertyList &propList) {};
119
	virtual void openUnorderedListLevel(const WPXPropertyList &propList) {};
120
	virtual void closeOrderedListLevel() {};
121
	virtual void closeUnorderedListLevel() {};
122
	virtual void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) {};
123
	virtual void closeListElement() {};       
124
	virtual void openFootnote(const WPXPropertyList &propList) {};
125
	virtual void closeFootnote() {};
126
	virtual void openEndnote(const WPXPropertyList &propList) {};
127
	virtual void closeEndnote() {};
128
	virtual void openComment(const WPXPropertyList &propList) {};
129
	virtual void closeComment() {};
130
	virtual void openTextBox(const WPXPropertyList &propList) {};
131
	virtual void closeTextBox() {};
132
 	virtual void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns) {};
133
 	virtual void openTableRow(const WPXPropertyList &propList) {};
134
	virtual void closeTableRow() {};
135
 	virtual void openTableCell(const WPXPropertyList &propList) {};
136
	virtual void closeTableCell() {};
137
	virtual void insertCoveredTableCell(const WPXPropertyList &propList) {};
138
 	virtual void closeTable() {};
139
	virtual void openFrame(const WPXPropertyList &propList) {};
140
	virtual void closeFrame() {};
141
	virtual void insertBinaryObject(const WPXPropertyList &propList, const WPXBinaryData &data) {};
142
	virtual void insertEquation(const WPXPropertyList &propList, const WPXString &data) {};
143
144
#else // HAVE_LIBWPD_090
145
87
 	virtual void setDocumentMetaData(const WPXPropertyList &propList) {}
146
 	virtual void setDocumentMetaData(const WPXPropertyList &propList) {}
88
	virtual void startDocument() {}
147
	virtual void startDocument() {}
89
	virtual void endDocument() {}
148
	virtual void endDocument() {}
Lines 132-137 public: Link Here
132
	virtual void insertCoveredTableCell(const WPXPropertyList &propList);
191
	virtual void insertCoveredTableCell(const WPXPropertyList &propList);
133
 	virtual void closeTable();
192
 	virtual void closeTable();
134
193
194
#endif // HAVE_LIBWPD_090
195
135
protected:
196
protected:
136
	void _resetDocumentState();
197
	void _resetDocumentState();
137
	bool _parseSourceDocument(WPXInputStream &input);
198
	bool _parseSourceDocument(WPXInputStream &input);
(-)a/filters/kword/wordperfect/import/wpimport.cc (+104 lines)
Lines 44-49 K_EXPORT_COMPONENT_FACTORY( libwpimport, WPImportFactory( "kofficefilters" ) ) Link Here
44
#include "DocumentHandler.hxx"
44
#include "DocumentHandler.hxx"
45
#include "WordPerfectCollector.hxx"
45
#include "WordPerfectCollector.hxx"
46
46
47
#ifdef HAVE_LIBWPD_090
48
class WPXMemoryInputStream : public WPXInputStream
49
{
50
public:
51
    WPXMemoryInputStream(unsigned char *data, unsigned long size);
52
    virtual ~WPXMemoryInputStream();
53
54
    virtual bool isOLEStream() {
55
        return false;
56
    }
57
    virtual WPXInputStream * getDocumentOLEStream(const char *name) {
58
        return NULL;
59
    }
60
61
    const virtual unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
62
    virtual int seek(long offset, WPX_SEEK_TYPE seekType);
63
    virtual long tell();
64
    virtual bool atEOS();
65
66
private:
67
    long m_offset;
68
    size_t m_size;
69
    unsigned char *m_data;
70
};
71
72
WPXMemoryInputStream::WPXMemoryInputStream(unsigned char *data, unsigned long size) :
73
	WPXInputStream(),
74
	m_offset(0),
75
	m_size(size),
76
	m_data(data)
77
{
78
}
79
80
WPXMemoryInputStream::~WPXMemoryInputStream()
81
{
82
}
83
84
const unsigned char * WPXMemoryInputStream::read(unsigned long numBytes, unsigned long &numBytesRead)
85
{
86
	numBytesRead = 0;
87
88
	if (numBytes == 0)
89
		return 0;
90
	
91
	int numBytesToRead;
92
93
	if ((m_offset+numBytes) < m_size)
94
		numBytesToRead = numBytes;
95
	else
96
		numBytesToRead = m_size - m_offset;
97
	
98
	numBytesRead = numBytesToRead; // about as paranoid as we can be..
99
100
	if (numBytesToRead == 0)
101
		return 0;
102
103
	long oldOffset = m_offset;
104
	m_offset += numBytesToRead;
105
	
106
	return &m_data[oldOffset];
107
}
108
109
int WPXMemoryInputStream::seek(long offset, WPX_SEEK_TYPE seekType)
110
{
111
	if (seekType == WPX_SEEK_CUR)
112
		m_offset += offset;
113
	else if (seekType == WPX_SEEK_SET)
114
		m_offset = offset;
115
116
	if (m_offset < 0)
117
	{
118
		m_offset = 0;
119
		return 1;
120
	}
121
	if ((long)m_offset > (long)m_size)
122
	{
123
		m_offset = m_size;
124
		return 1;
125
	}
126
127
	return 0;
128
}
129
130
long WPXMemoryInputStream::tell()
131
{
132
	return m_offset;
133
}
134
135
bool WPXMemoryInputStream::atEOS()
136
{
137
	if ((long)m_offset == (long)m_size) 
138
		return true; 
139
140
	return false;
141
}
142
143
#else // HAVE_LIBWPD_090
144
47
class WPXMemoryInputStream : public WPXInputStream
145
class WPXMemoryInputStream : public WPXInputStream
48
{
146
{
49
public:
147
public:
Lines 138-143 bool WPXMemoryInputStream::atEOS() Link Here
138
	return false;
236
	return false;
139
}
237
}
140
238
239
#endif // HAVE_LIBWPD_090
240
141
class KWordHandler : public DocumentHandler
241
class KWordHandler : public DocumentHandler
142
{
242
{
143
public:
243
public:
Lines 250-256 KoFilter::ConversionStatus WPImport::convert( const TQCString& from, const TQCSt Link Here
250
  // instream now owns buf, no need to delete buf later
350
  // instream now owns buf, no need to delete buf later
251
  WPXMemoryInputStream instream = WPXMemoryInputStream( buf, fsize );
351
  WPXMemoryInputStream instream = WPXMemoryInputStream( buf, fsize );
252
352
353
#ifdef HAVE_LIBWPD_090
354
  WPDConfidence confidence = WPDocument::isFileFormatSupported(&instream);
355
#else // HAVE_LIBWPD_090
253
  WPDConfidence confidence = WPDocument::isFileFormatSupported(&instream, false);
356
  WPDConfidence confidence = WPDocument::isFileFormatSupported(&instream, false);
357
#endif // HAVE_LIBWPD_090
254
  if( confidence == WPD_CONFIDENCE_NONE )
358
  if( confidence == WPD_CONFIDENCE_NONE )
255
  {
359
  {
256
    fprintf(stderr, "ERROR: We have no confidence that you are giving us a valid WordPerfect document.\n");
360
    fprintf(stderr, "ERROR: We have no confidence that you are giving us a valid WordPerfect document.\n");
(-)a/subdirs (-2 / +1 lines)
Lines 1-6 Link Here
1
lib
1
lib
2
interfaces
2
interfaces
3
autocorrect
3
autocorrect
4
chalk
4
doc
5
doc
5
example
6
example
6
karbon
7
karbon
Lines 11-17 kivio Link Here
11
koshell
12
koshell
12
kounavail
13
kounavail
13
kpresenter
14
kpresenter
14
chalk
15
kspread
15
kspread
16
kugar
16
kugar
17
mimetypes
17
mimetypes
18
-

Return to bug 1169