Subversion Repositories public

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
88 andreas 1
m4trace:/usr/share/aclocal/pkg.m4:26: -1- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
3
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
4
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
5
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6
fi
7
if test -n "$PKG_CONFIG"; then
8
	_pkg_min_version=m4_default([$1], [0.9.0])
9
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
10
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11
		AC_MSG_RESULT([yes])
12
	else
13
		AC_MSG_RESULT([no])
14
		PKG_CONFIG=""
15
	fi
16
 
17
fi[]dnl
18
])
19
m4trace:/usr/share/aclocal/pkg.m4:56: -1- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
20
if test -n "$PKG_CONFIG" && \
21
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
22
  m4_ifval([$2], [$2], [:])
23
m4_ifvaln([$3], [else
24
  $3])dnl
25
fi])
26
m4trace:/usr/share/aclocal/pkg.m4:84: -1- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
27
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
28
        _pkg_short_errors_supported=yes
29
else
30
        _pkg_short_errors_supported=no
31
fi[]dnl
32
])
33
m4trace:/usr/share/aclocal/pkg.m4:104: -1- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
34
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
35
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
36
 
37
pkg_failed=no
38
AC_MSG_CHECKING([for $1])
39
 
40
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
41
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
42
 
43
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
44
and $1[]_LIBS to avoid the need to call pkg-config.
45
See the pkg-config man page for more details.])
46
 
47
if test $pkg_failed = yes; then
48
        _PKG_SHORT_ERRORS_SUPPORTED
49
        if test $_pkg_short_errors_supported = yes; then
50
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
51
        else 
52
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
53
        fi
54
	# Put the nasty error message in config.log where it belongs
55
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
56
 
57
	ifelse([$4], , [AC_MSG_ERROR(dnl
58
[Package requirements ($2) were not met:
59
 
60
$$1_PKG_ERRORS
61
 
62
Consider adjusting the PKG_CONFIG_PATH environment variable if you
63
installed software in a non-standard prefix.
64
 
65
_PKG_TEXT
66
])],
67
		[AC_MSG_RESULT([no])
68
                $4])
69
elif test $pkg_failed = untried; then
70
	ifelse([$4], , [AC_MSG_FAILURE(dnl
71
[The pkg-config script could not be found or is too old.  Make sure it
72
is in your PATH or set the PKG_CONFIG environment variable to the full
73
path to pkg-config.
74
 
75
_PKG_TEXT
76
 
77
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
78
		[$4])
79
else
80
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
81
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
82
        AC_MSG_RESULT([yes])
83
	ifelse([$3], , :, [$3])
84
fi[]dnl
85
])
86
m4trace:/usr/share/aclocal-1.9/amversion.m4:13: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
87
m4trace:/usr/share/aclocal-1.9/amversion.m4:19: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])])
88
m4trace:/usr/share/aclocal-1.9/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly.
89
AC_PREREQ([2.50])dnl
90
# expand $ac_aux_dir to an absolute path
91
am_aux_dir=`cd $ac_aux_dir && pwd`
92
])
93
m4trace:/usr/share/aclocal-1.9/cond.m4:15: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl
94
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
95
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
96
AC_SUBST([$1_TRUE])
97
AC_SUBST([$1_FALSE])
98
if $2; then
99
  $1_TRUE=
100
  $1_FALSE='#'
101
else
102
  $1_TRUE='#'
103
  $1_FALSE=
104
fi
105
AC_CONFIG_COMMANDS_PRE(
106
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
107
  AC_MSG_ERROR([[conditional "$1" was never defined.
108
Usually this means the macro was only invoked conditionally.]])
109
fi])])
110
m4trace:/usr/share/aclocal-1.9/depend.m4:29: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
111
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
112
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
113
AC_REQUIRE([AM_DEP_TRACK])dnl
114
 
115
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
116
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
117
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
118
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
119
                   [depcc="$$1"   am_compiler_list=])
120
 
121
AC_CACHE_CHECK([dependency style of $depcc],
122
               [am_cv_$1_dependencies_compiler_type],
123
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
124
  # We make a subdir and do the tests there.  Otherwise we can end up
125
  # making bogus files that we don't know about and never remove.  For
126
  # instance it was reported that on HP-UX the gcc test will end up
127
  # making a dummy file named `D' -- because `-MD' means `put the output
128
  # in D'.
129
  mkdir conftest.dir
130
  # Copy depcomp to subdir because otherwise we won't find it if we're
131
  # using a relative directory.
132
  cp "$am_depcomp" conftest.dir
133
  cd conftest.dir
134
  # We will build objects and dependencies in a subdirectory because
135
  # it helps to detect inapplicable dependency modes.  For instance
136
  # both Tru64's cc and ICC support -MD to output dependencies as a
137
  # side effect of compilation, but ICC will put the dependencies in
138
  # the current directory while Tru64 will put them in the object
139
  # directory.
140
  mkdir sub
141
 
142
  am_cv_$1_dependencies_compiler_type=none
143
  if test "$am_compiler_list" = ""; then
144
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
145
  fi
146
  for depmode in $am_compiler_list; do
147
    # Setup a source with many dependencies, because some compilers
148
    # like to wrap large dependency lists on column 80 (with \), and
149
    # we should not choose a depcomp mode which is confused by this.
150
    #
151
    # We need to recreate these files for each test, as the compiler may
152
    # overwrite some of them when testing with obscure command lines.
153
    # This happens at least with the AIX C compiler.
154
    : > sub/conftest.c
155
    for i in 1 2 3 4 5 6; do
156
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
157
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
158
      # Solaris 8's {/usr,}/bin/sh.
159
      touch sub/conftst$i.h
160
    done
161
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
162
 
163
    case $depmode in
164
    nosideeffect)
165
      # after this tag, mechanisms are not by side-effect, so they'll
166
      # only be used when explicitly requested
167
      if test "x$enable_dependency_tracking" = xyes; then
168
	continue
169
      else
170
	break
171
      fi
172
      ;;
173
    none) break ;;
174
    esac
175
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
176
    # mode.  It turns out that the SunPro C++ compiler does not properly
177
    # handle `-M -o', and we need to detect this.
178
    if depmode=$depmode \
179
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
180
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
181
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
182
         >/dev/null 2>conftest.err &&
183
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
184
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
185
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
186
      # icc doesn't choke on unknown options, it will just issue warnings
187
      # or remarks (even with -Werror).  So we grep stderr for any message
188
      # that says an option was ignored or not supported.
189
      # When given -MP, icc 7.0 and 7.1 complain thusly:
190
      #   icc: Command line warning: ignoring option '-M'; no argument required
191
      # The diagnosis changed in icc 8.0:
192
      #   icc: Command line remark: option '-MP' not supported
193
      if (grep 'ignoring option' conftest.err ||
194
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
195
        am_cv_$1_dependencies_compiler_type=$depmode
196
        break
197
      fi
198
    fi
199
  done
200
 
201
  cd ..
202
  rm -rf conftest.dir
203
else
204
  am_cv_$1_dependencies_compiler_type=none
205
fi
206
])
207
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
208
AM_CONDITIONAL([am__fastdep$1], [
209
  test "x$enable_dependency_tracking" != xno \
210
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
211
])
212
m4trace:/usr/share/aclocal-1.9/depend.m4:138: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
213
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
214
])
215
m4trace:/usr/share/aclocal-1.9/depend.m4:146: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking,
216
[  --disable-dependency-tracking  speeds up one-time build
217
  --enable-dependency-tracking   do not reject slow dependency extractors])
218
if test "x$enable_dependency_tracking" != xno; then
219
  am_depcomp="$ac_aux_dir/depcomp"
220
  AMDEPBACKSLASH='\'
221
fi
222
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
223
AC_SUBST([AMDEPBACKSLASH])
224
])
225
m4trace:/usr/share/aclocal-1.9/depout.m4:14: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do
226
  # Strip MF so we end up with the name of the file.
227
  mf=`echo "$mf" | sed -e 's/:.*$//'`
228
  # Check whether this is an Automake generated Makefile or not.
229
  # We used to match only the files named `Makefile.in', but
230
  # some people rename them; so instead we look at the file content.
231
  # Grep'ing the first line is not enough: some people post-process
232
  # each Makefile.in and add a new line on top of each file to say so.
233
  # So let's grep whole file.
234
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
235
    dirpart=`AS_DIRNAME("$mf")`
236
  else
237
    continue
238
  fi
239
  # Extract the definition of DEPDIR, am__include, and am__quote
240
  # from the Makefile without running `make'.
241
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
242
  test -z "$DEPDIR" && continue
243
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
244
  test -z "am__include" && continue
245
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
246
  # When using ansi2knr, U may be empty or an underscore; expand it
247
  U=`sed -n 's/^U = //p' < "$mf"`
248
  # Find all dependency output files, they are included files with
249
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
250
  # simplest approach to changing $(DEPDIR) to its actual value in the
251
  # expansion.
252
  for file in `sed -n "
253
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
254
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
255
    # Make sure the directory exists.
256
    test -f "$dirpart/$file" && continue
257
    fdir=`AS_DIRNAME(["$file"])`
258
    AS_MKDIR_P([$dirpart/$fdir])
259
    # echo "creating $dirpart/$file"
260
    echo '# dummy' > "$dirpart/$file"
261
  done
262
done
263
])
264
m4trace:/usr/share/aclocal-1.9/depout.m4:63: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
265
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
266
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
267
])
268
m4trace:/usr/share/aclocal-1.9/init.m4:26: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl
269
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
270
dnl the ones we care about.
271
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
272
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
273
AC_REQUIRE([AC_PROG_INSTALL])dnl
274
# test to see if srcdir already configured
275
if test "`cd $srcdir && pwd`" != "`pwd`" &&
276
   test -f $srcdir/config.status; then
277
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
278
fi
279
 
280
# test whether we have cygpath
281
if test -z "$CYGPATH_W"; then
282
  if (cygpath --version) >/dev/null 2>/dev/null; then
283
    CYGPATH_W='cygpath -w'
284
  else
285
    CYGPATH_W=echo
286
  fi
287
fi
288
AC_SUBST([CYGPATH_W])
289
 
290
# Define the identity of the package.
291
dnl Distinguish between old-style and new-style calls.
292
m4_ifval([$2],
293
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
294
 AC_SUBST([PACKAGE], [$1])dnl
295
 AC_SUBST([VERSION], [$2])],
296
[_AM_SET_OPTIONS([$1])dnl
297
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
298
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
299
 
300
_AM_IF_OPTION([no-define],,
301
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
302
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
303
 
304
# Some tools Automake needs.
305
AC_REQUIRE([AM_SANITY_CHECK])dnl
306
AC_REQUIRE([AC_ARG_PROGRAM])dnl
307
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
308
AM_MISSING_PROG(AUTOCONF, autoconf)
309
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
310
AM_MISSING_PROG(AUTOHEADER, autoheader)
311
AM_MISSING_PROG(MAKEINFO, makeinfo)
312
AM_PROG_INSTALL_SH
313
AM_PROG_INSTALL_STRIP
314
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
315
# We need awk for the "check" target.  The system "awk" is bad on
316
# some platforms.
317
AC_REQUIRE([AC_PROG_AWK])dnl
318
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
319
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
320
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
321
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
322
	      		     [_AM_PROG_TAR([v7])])])
323
_AM_IF_OPTION([no-dependencies],,
324
[AC_PROVIDE_IFELSE([AC_PROG_CC],
325
                  [_AM_DEPENDENCIES(CC)],
326
                  [define([AC_PROG_CC],
327
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
328
AC_PROVIDE_IFELSE([AC_PROG_CXX],
329
                  [_AM_DEPENDENCIES(CXX)],
330
                  [define([AC_PROG_CXX],
331
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
332
])
333
])
334
m4trace:/usr/share/aclocal-1.9/init.m4:102: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers.
335
_am_stamp_count=1
336
for _am_header in $config_headers :; do
337
  case $_am_header in
338
    $1 | $1:* )
339
      break ;;
340
    * )
341
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
342
  esac
343
done
344
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
345
m4trace:/usr/share/aclocal-1.9/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
346
install_sh=${install_sh-"$am_aux_dir/install-sh"}
347
AC_SUBST(install_sh)])
348
m4trace:/usr/share/aclocal-1.9/lead-dot.m4:12: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null
349
mkdir .tst 2>/dev/null
350
if test -d .tst; then
351
  am__leading_dot=.
352
else
353
  am__leading_dot=_
354
fi
355
rmdir .tst 2>/dev/null
356
AC_SUBST([am__leading_dot])])
357
m4trace:/usr/share/aclocal-1.9/lex.m4:16: -1- AC_DEFUN([AM_PROG_LEX], [AC_PREREQ(2.50)dnl
358
AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
359
AC_REQUIRE([AC_PROG_LEX])dnl
360
if test "$LEX" = :; then
361
  LEX=${am_missing_run}flex
362
fi])
363
m4trace:/usr/share/aclocal-1.9/make.m4:14: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make}
364
cat > confinc << 'END'
365
am__doit:
366
	@echo done
367
.PHONY: am__doit
368
END
369
# If we don't find an include directive, just comment out the code.
370
AC_MSG_CHECKING([for style of include used by $am_make])
371
am__include="#"
372
am__quote=
373
_am_result=none
374
# First try GNU make style include.
375
echo "include confinc" > confmf
376
# We grep out `Entering directory' and `Leaving directory'
377
# messages which can occur if `w' ends up in MAKEFLAGS.
378
# In particular we don't look at `^make:' because GNU make might
379
# be invoked under some other name (usually "gmake"), in which
380
# case it prints its new name instead of `make'.
381
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
382
   am__include=include
383
   am__quote=
384
   _am_result=GNU
385
fi
386
# Now try BSD make style include.
387
if test "$am__include" = "#"; then
388
   echo '.include "confinc"' > confmf
389
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
390
      am__include=.include
391
      am__quote="\""
392
      _am_result=BSD
393
   fi
394
fi
395
AC_SUBST([am__include])
396
AC_SUBST([am__quote])
397
AC_MSG_RESULT([$_am_result])
398
rm -f confinc confmf
399
])
400
m4trace:/usr/share/aclocal-1.9/missing.m4:14: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
401
$1=${$1-"${am_missing_run}$2"}
402
AC_SUBST($1)])
403
m4trace:/usr/share/aclocal-1.9/missing.m4:24: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
404
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
405
# Use eval to expand $SHELL
406
if eval "$MISSING --run true"; then
407
  am_missing_run="$MISSING --run "
408
else
409
  am_missing_run=
410
  AC_MSG_WARN([`missing' script is too old or missing])
411
fi
412
])
413
m4trace:/usr/share/aclocal-1.9/mkdirp.m4:30: -1- AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
414
  # We used to keeping the `.' as first argument, in order to
415
  # allow $(mkdir_p) to be used without argument.  As in
416
  #   $(mkdir_p) $(somedir)
417
  # where $(somedir) is conditionally defined.  However this is wrong
418
  # for two reasons:
419
  #  1. if the package is installed by a user who cannot write `.'
420
  #     make install will fail,
421
  #  2. the above comment should most certainly read
422
  #     $(mkdir_p) $(DESTDIR)$(somedir)
423
  #     so it does not work when $(somedir) is undefined and
424
  #     $(DESTDIR) is not.
425
  #  To support the latter case, we have to write
426
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
427
  #  so the `.' trick is pointless.
428
  mkdir_p='mkdir -p --'
429
else
430
  # On NextStep and OpenStep, the `mkdir' command does not
431
  # recognize any option.  It will interpret all options as
432
  # directories to create, and then abort because `.' already
433
  # exists.
434
  for d in ./-p ./--version;
435
  do
436
    test -d $d && rmdir $d
437
  done
438
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
439
  if test -f "$ac_aux_dir/mkinstalldirs"; then
440
    mkdir_p='$(mkinstalldirs)'
441
  else
442
    mkdir_p='$(install_sh) -d'
443
  fi
444
fi
445
AC_SUBST([mkdir_p])])
446
m4trace:/usr/share/aclocal-1.9/options.m4:13: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
447
m4trace:/usr/share/aclocal-1.9/options.m4:19: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
448
m4trace:/usr/share/aclocal-1.9/options.m4:25: -1- AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
449
m4trace:/usr/share/aclocal-1.9/options.m4:31: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
450
m4trace:/usr/share/aclocal-1.9/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
451
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
452
   ac_status=$?
453
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
454
   (exit $ac_status); }])
455
m4trace:/usr/share/aclocal-1.9/sanity.m4:14: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane])
456
# Just in case
457
sleep 1
458
echo timestamp > conftest.file
459
# Do `set' in a subshell so we don't clobber the current shell's
460
# arguments.  Must try -L first in case configure is actually a
461
# symlink; some systems play weird games with the mod time of symlinks
462
# (eg FreeBSD returns the mod time of the symlink's containing
463
# directory).
464
if (
465
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
466
   if test "$[*]" = "X"; then
467
      # -L didn't work.
468
      set X `ls -t $srcdir/configure conftest.file`
469
   fi
470
   rm -f conftest.file
471
   if test "$[*]" != "X $srcdir/configure conftest.file" \
472
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
473
 
474
      # If neither matched, then we have a broken ls.  This can happen
475
      # if, for instance, CONFIG_SHELL is bash and it inherits a
476
      # broken ls alias from the environment.  This has actually
477
      # happened.  Such a system could not be considered "sane".
478
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
479
alias in your environment])
480
   fi
481
 
482
   test "$[2]" = conftest.file
483
   )
484
then
485
   # Ok.
486
   :
487
else
488
   AC_MSG_ERROR([newly created file is older than distributed files!
489
Check your system clock])
490
fi
491
AC_MSG_RESULT(yes)])
492
m4trace:/usr/share/aclocal-1.9/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
493
# Installed binaries are usually stripped using `strip' when the user
494
# run `make install-strip'.  However `strip' might not be the right
495
# tool to use in cross-compilation environments, therefore Automake
496
# will honor the `STRIP' environment variable to overrule this program.
497
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
498
if test "$cross_compiling" != no; then
499
  AC_CHECK_TOOL([STRIP], [strip], :)
500
fi
501
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
502
AC_SUBST([INSTALL_STRIP_PROGRAM])])
503
m4trace:/usr/share/aclocal-1.9/tar.m4:24: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility.
504
AM_MISSING_PROG([AMTAR], [tar])
505
m4_if([$1], [v7],
506
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
507
     [m4_case([$1], [ustar],, [pax],,
508
              [m4_fatal([Unknown tar format])])
509
AC_MSG_CHECKING([how to create a $1 tar archive])
510
# Loop over all known methods to create a tar archive until one works.
511
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
512
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
513
# Do not fold the above two line into one, because Tru64 sh and
514
# Solaris sh will not grok spaces in the rhs of `-'.
515
for _am_tool in $_am_tools
516
do
517
  case $_am_tool in
518
  gnutar)
519
    for _am_tar in tar gnutar gtar;
520
    do
521
      AM_RUN_LOG([$_am_tar --version]) && break
522
    done
523
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
524
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
525
    am__untar="$_am_tar -xf -"
526
    ;;
527
  plaintar)
528
    # Must skip GNU tar: if it does not support --format= it doesn't create
529
    # ustar tarball either.
530
    (tar --version) >/dev/null 2>&1 && continue
531
    am__tar='tar chf - "$$tardir"'
532
    am__tar_='tar chf - "$tardir"'
533
    am__untar='tar xf -'
534
    ;;
535
  pax)
536
    am__tar='pax -L -x $1 -w "$$tardir"'
537
    am__tar_='pax -L -x $1 -w "$tardir"'
538
    am__untar='pax -r'
539
    ;;
540
  cpio)
541
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
542
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
543
    am__untar='cpio -i -H $1 -d'
544
    ;;
545
  none)
546
    am__tar=false
547
    am__tar_=false
548
    am__untar=false
549
    ;;
550
  esac
551
 
552
  # If the value was cached, stop now.  We just wanted to have am__tar
553
  # and am__untar set.
554
  test -n "${am_cv_prog_tar_$1}" && break
555
 
556
  # tar/untar a dummy directory, and stop if the command works
557
  rm -rf conftest.dir
558
  mkdir conftest.dir
559
  echo GrepMe > conftest.dir/file
560
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
561
  rm -rf conftest.dir
562
  if test -s conftest.tar; then
563
    AM_RUN_LOG([$am__untar <conftest.tar])
564
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
565
  fi
566
done
567
rm -rf conftest.dir
568
 
569
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
570
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
571
AC_SUBST([am__tar])
572
AC_SUBST([am__untar])
573
])
574
m4trace:acinclude.m4:32: -1- AC_DEFUN([KDE_PATH_X_DIRECT], [
575
AC_REQUIRE([KDE_CHECK_LIB64])
576
 
577
if test "$ac_x_includes" = NO; then
578
  # Guess where to find include files, by looking for this one X11 .h file.
579
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
580
 
581
  # First, try using that file with no special directory specified.
582
AC_TRY_CPP([#include <$x_direct_test_include>],
583
[# We can compile using X headers with no special include directory.
584
ac_x_includes=],
585
[# Look for the header file in a standard set of common directories.
586
# Check X11 before X11Rn because it is often a symlink to the current release.
587
  for ac_dir in               \
588
    /usr/X11/include          \
589
    /usr/X11R6/include        \
590
    /usr/X11R5/include        \
591
    /usr/X11R4/include        \
592
                              \
593
    /usr/include/X11          \
594
    /usr/include/X11R6        \
595
    /usr/include/X11R5        \
596
    /usr/include/X11R4        \
597
                              \
598
    /usr/local/X11/include    \
599
    /usr/local/X11R6/include  \
600
    /usr/local/X11R5/include  \
601
    /usr/local/X11R4/include  \
602
                              \
603
    /usr/local/include/X11    \
604
    /usr/local/include/X11R6  \
605
    /usr/local/include/X11R5  \
606
    /usr/local/include/X11R4  \
607
                              \
608
    /usr/X386/include         \
609
    /usr/x386/include         \
610
    /usr/XFree86/include/X11  \
611
                              \
612
    /usr/include              \
613
    /usr/local/include        \
614
    /usr/unsupported/include  \
615
    /usr/athena/include       \
616
    /usr/local/x11r5/include  \
617
    /usr/lpp/Xamples/include  \
618
                              \
619
    /usr/openwin/include      \
620
    /usr/openwin/share/include \
621
    ; \
622
  do
623
    if test -r "$ac_dir/$x_direct_test_include"; then
624
      ac_x_includes=$ac_dir
625
      break
626
    fi
627
  done])
628
fi # $ac_x_includes = NO
629
 
630
if test "$ac_x_libraries" = NO; then
631
  # Check for the libraries.
632
 
633
  test -z "$x_direct_test_library" && x_direct_test_library=Xt
634
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
635
 
636
  # See if we find them without any special options.
637
  # Don't add to $LIBS permanently.
638
  ac_save_LIBS="$LIBS"
639
  LIBS="-l$x_direct_test_library $LIBS"
640
AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
641
[LIBS="$ac_save_LIBS"
642
# We can link X programs with no special library path.
643
ac_x_libraries=],
644
[LIBS="$ac_save_LIBS"
645
# First see if replacing the include by lib works.
646
# Check X11 before X11Rn because it is often a symlink to the current release.
647
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
648
    /usr/X11/lib${kdelibsuff}           \
649
    /usr/X11R6/lib${kdelibsuff}         \
650
    /usr/X11R5/lib${kdelibsuff}         \
651
    /usr/X11R4/lib${kdelibsuff}         \
652
                                        \
653
    /usr/lib${kdelibsuff}/X11           \
654
    /usr/lib${kdelibsuff}/X11R6         \
655
    /usr/lib${kdelibsuff}/X11R5         \
656
    /usr/lib${kdelibsuff}/X11R4         \
657
                                        \
658
    /usr/local/X11/lib${kdelibsuff}     \
659
    /usr/local/X11R6/lib${kdelibsuff}   \
660
    /usr/local/X11R5/lib${kdelibsuff}   \
661
    /usr/local/X11R4/lib${kdelibsuff}   \
662
                                        \
663
    /usr/local/lib${kdelibsuff}/X11     \
664
    /usr/local/lib${kdelibsuff}/X11R6   \
665
    /usr/local/lib${kdelibsuff}/X11R5   \
666
    /usr/local/lib${kdelibsuff}/X11R4   \
667
                                        \
668
    /usr/X386/lib${kdelibsuff}          \
669
    /usr/x386/lib${kdelibsuff}          \
670
    /usr/XFree86/lib${kdelibsuff}/X11   \
671
                                        \
672
    /usr/lib${kdelibsuff}               \
673
    /usr/local/lib${kdelibsuff}         \
674
    /usr/unsupported/lib${kdelibsuff}   \
675
    /usr/athena/lib${kdelibsuff}        \
676
    /usr/local/x11r5/lib${kdelibsuff}   \
677
    /usr/lpp/Xamples/lib${kdelibsuff}   \
678
    /lib/usr/lib${kdelibsuff}/X11       \
679
                                        \
680
    /usr/openwin/lib${kdelibsuff}       \
681
    /usr/openwin/share/lib${kdelibsuff} \
682
    ; \
683
do
684
dnl Don't even attempt the hair of trying to link an X program!
685
  for ac_extension in a so sl; do
686
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
687
      ac_x_libraries=$ac_dir
688
      break 2
689
    fi
690
  done
691
done])
692
fi # $ac_x_libraries = NO
693
])
694
m4trace:acinclude.m4:159: -1- AC_DEFUN([AC_FIND_FILE], [
695
$3=NO
696
for i in $2;
697
do
698
  for j in $1;
699
  do
700
    echo "configure: __oline__: $i/$j" >&AC_FD_CC
701
    if test -r "$i/$j"; then
702
      echo "taking that" >&AC_FD_CC
703
      $3=$i
704
      break 2
705
    fi
706
  done
707
done
708
])
709
m4trace:acinclude.m4:184: -1- AC_DEFUN([KDE_FIND_PATH], [
710
   AC_MSG_CHECKING([for $1])
711
   if test -n "$$2"; then
712
        kde_cv_path="$$2";
713
   else
714
        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
715
 
716
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
717
        [
718
        kde_cv_path="NONE"
719
	kde_save_IFS=$IFS
720
	IFS=':'
721
	dirs=""
722
	for dir in $PATH; do
723
	  dirs="$dirs $dir"
724
	done
725
	if test -z "$6"; then  dnl Append dirs in PATH (default)
726
	  dirs="$3 $dirs"
727
        else  dnl Prepend dirs in PATH (if 6th arg is set)
728
	  dirs="$dirs $3"
729
	fi
730
	IFS=$kde_save_IFS
731
 
732
        for dir in $dirs; do
733
	  if test -x "$dir/$1"; then
734
	    if test -n "$5"
735
	    then
736
              evalstr="$dir/$1 $5 2>&1 "
737
	      if eval $evalstr; then
738
                kde_cv_path="$dir/$1"
739
                break
740
	      fi
741
            else
742
		kde_cv_path="$dir/$1"
743
                break
744
	    fi
745
          fi
746
        done
747
 
748
        eval "kde_cv_path_$kde_cache=$kde_cv_path"
749
 
750
        ])
751
 
752
      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
753
 
754
   fi
755
 
756
   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
757
      AC_MSG_RESULT(not found)
758
      $4
759
   else
760
      AC_MSG_RESULT($kde_cv_path)
761
      $2=$kde_cv_path
762
 
763
   fi
764
])
765
m4trace:acinclude.m4:242: -1- AC_DEFUN([KDE_MOC_ERROR_MESSAGE], [
766
    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
767
Please check whether you installed Qt correctly.
768
You need to have a running moc binary.
769
configure tried to run $ac_cv_path_moc and the test didn't
770
succeed. If configure shouldn't have tried this one, set
771
the environment variable MOC to the right one before running
772
configure.
773
])
774
])
775
m4trace:acinclude.m4:254: -1- AC_DEFUN([KDE_UIC_ERROR_MESSAGE], [
776
    AC_MSG_WARN([No Qt ui compiler (uic) found!
777
Please check whether you installed Qt correctly.
778
You need to have a running uic binary.
779
configure tried to run $ac_cv_path_uic and the test didn't
780
succeed. If configure shouldn't have tried this one, set
781
the environment variable UIC to the right one before running
782
configure.
783
])
784
])
785
m4trace:acinclude.m4:267: -1- AC_DEFUN([KDE_CHECK_UIC_FLAG], [
786
    AC_MSG_CHECKING([whether uic supports -$1 ])
787
    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
788
    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
789
    [
790
        cat >conftest.ui <<EOT
791
        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
792
EOT
793
        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
794
        if AC_TRY_EVAL(ac_uic_testrun); then
795
            eval "kde_cv_prog_uic_$kde_cache=yes"
796
        else
797
            eval "kde_cv_prog_uic_$kde_cache=no"
798
        fi
799
        rm -f conftest*
800
    ])
801
 
802
    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
803
        AC_MSG_RESULT([yes])
804
        :
805
        $3
806
    else
807
        AC_MSG_RESULT([no])
808
        :
809
        $4
810
    fi
811
])
812
m4trace:acinclude.m4:302: -1- AC_DEFUN([AC_PATH_QT_MOC_UIC], [
813
   AC_REQUIRE([KDE_CHECK_PERL])
814
   qt_bindirs=""
815
   for dir in $kde_qt_dirs; do
816
      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
817
   done
818
   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
819
   if test ! "$ac_qt_bindir" = "NO"; then
820
      qt_bindirs="$ac_qt_bindir $qt_bindirs"
821
   fi
822
 
823
   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
824
   if test -z "$UIC_NOT_NEEDED"; then
825
     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
826
     if test -z "$UIC_PATH" ; then
827
       KDE_UIC_ERROR_MESSAGE
828
       exit 1
829
     else
830
       UIC=$UIC_PATH
831
 
832
       if test $kde_qtver = 3; then
833
         KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
834
         KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
835
 
836
         if test x$ac_uic_supports_libpath = xyes; then
837
             UIC="$UIC -L \$(kde_widgetdir)"
838
         fi
839
         if test x$ac_uic_supports_nounload = xyes; then
840
             UIC="$UIC -nounload"
841
         fi
842
       fi
843
     fi
844
   else
845
     UIC="echo uic not available: "
846
   fi
847
 
848
   AC_SUBST(MOC)
849
   AC_SUBST(UIC)
850
 
851
   UIC_TR="i18n"
852
   if test $kde_qtver = 3; then
853
     UIC_TR="tr2i18n"
854
   fi
855
 
856
   AC_SUBST(UIC_TR)
857
])
858
m4trace:acinclude.m4:350: -1- AC_DEFUN([KDE_1_CHECK_PATHS], [
859
  KDE_1_CHECK_PATH_HEADERS
860
 
861
  KDE_TEST_RPATH=
862
 
863
  if test -n "$USE_RPATH"; then
864
 
865
     if test -n "$kde_libraries"; then
866
       KDE_TEST_RPATH="-R $kde_libraries"
867
     fi
868
 
869
     if test -n "$qt_libraries"; then
870
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
871
     fi
872
 
873
     if test -n "$x_libraries"; then
874
       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
875
     fi
876
 
877
     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
878
  fi
879
 
880
AC_MSG_CHECKING([for KDE libraries installed])
881
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'
882
 
883
if AC_TRY_EVAL(ac_link) && test -s conftest; then
884
  AC_MSG_RESULT(yes)
885
else
886
  AC_MSG_ERROR([your system fails at linking a small KDE application!
887
Check, if your compiler is installed correctly and if you have used the
888
same compiler to compile Qt and kdelibs as you did use now.
889
For more details about this problem, look at the end of config.log.])
890
fi
891
 
892
if eval `KDEDIR= ./conftest 2>&5`; then
893
  kde_result=done
894
else
895
  kde_result=problems
896
fi
897
 
898
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
899
kde_have_all_paths=yes
900
 
901
KDE_SET_PATHS($kde_result)
902
 
903
])
904
m4trace:acinclude.m4:398: -1- AC_DEFUN([KDE_SET_PATHS], [
905
  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
906
	kde_htmldir=\"$kde_htmldir\" \
907
	kde_appsdir=\"$kde_appsdir\" \
908
	kde_icondir=\"$kde_icondir\" \
909
	kde_sounddir=\"$kde_sounddir\" \
910
	kde_datadir=\"$kde_datadir\" \
911
	kde_locale=\"$kde_locale\" \
912
	kde_cgidir=\"$kde_cgidir\" \
913
	kde_confdir=\"$kde_confdir\" \
914
	kde_kcfgdir=\"$kde_kcfgdir\" \
915
	kde_mimedir=\"$kde_mimedir\" \
916
	kde_toolbardir=\"$kde_toolbardir\" \
917
	kde_wallpaperdir=\"$kde_wallpaperdir\" \
918
	kde_templatesdir=\"$kde_templatesdir\" \
919
	kde_bindir=\"$kde_bindir\" \
920
	kde_servicesdir=\"$kde_servicesdir\" \
921
	kde_servicetypesdir=\"$kde_servicetypesdir\" \
922
	kde_moduledir=\"$kde_moduledir\" \
923
	kde_styledir=\"$kde_styledir\" \
924
	kde_widgetdir=\"$kde_widgetdir\" \
925
	xdg_appsdir=\"$xdg_appsdir\" \
926
	xdg_menudir=\"$xdg_menudir\" \
927
	xdg_directorydir=\"$xdg_directorydir\" \
928
	kde_result=$1"
929
])
930
m4trace:acinclude.m4:426: -1- AC_DEFUN([KDE_SET_DEFAULT_PATHS], [
931
if test "$1" = "default"; then
932
 
933
  if test -z "$kde_htmldir"; then
934
    kde_htmldir='\${datadir}/doc/HTML'
935
  fi
936
  if test -z "$kde_appsdir"; then
937
    kde_appsdir='\${datadir}/applnk'
938
  fi
939
  if test -z "$kde_icondir"; then
940
    kde_icondir='\${datadir}/icons'
941
  fi
942
  if test -z "$kde_sounddir"; then
943
    kde_sounddir='\${datadir}/sounds'
944
  fi
945
  if test -z "$kde_datadir"; then
946
    kde_datadir='\${datadir}/apps'
947
  fi
948
  if test -z "$kde_locale"; then
949
    kde_locale='\${datadir}/locale'
950
  fi
951
  if test -z "$kde_cgidir"; then
952
    kde_cgidir='\${exec_prefix}/cgi-bin'
953
  fi
954
  if test -z "$kde_confdir"; then
955
    kde_confdir='\${datadir}/config'
956
  fi
957
  if test -z "$kde_kcfgdir"; then
958
    kde_kcfgdir='\${datadir}/config.kcfg'
959
  fi
960
  if test -z "$kde_mimedir"; then
961
    kde_mimedir='\${datadir}/mimelnk'
962
  fi
963
  if test -z "$kde_toolbardir"; then
964
    kde_toolbardir='\${datadir}/toolbar'
965
  fi
966
  if test -z "$kde_wallpaperdir"; then
967
    kde_wallpaperdir='\${datadir}/wallpapers'
968
  fi
969
  if test -z "$kde_templatesdir"; then
970
    kde_templatesdir='\${datadir}/templates'
971
  fi
972
  if test -z "$kde_bindir"; then
973
    kde_bindir='\${exec_prefix}/bin'
974
  fi
975
  if test -z "$kde_servicesdir"; then
976
    kde_servicesdir='\${datadir}/services'
977
  fi
978
  if test -z "$kde_servicetypesdir"; then
979
    kde_servicetypesdir='\${datadir}/servicetypes'
980
  fi
981
  if test -z "$kde_moduledir"; then
982
    if test "$kde_qtver" = "2"; then
983
      kde_moduledir='\${libdir}/kde2'
984
    else
985
      kde_moduledir='\${libdir}/kde3'
986
    fi
987
  fi
988
  if test -z "$kde_styledir"; then
989
    kde_styledir='\${libdir}/kde3/plugins/styles'
990
  fi
991
  if test -z "$kde_widgetdir"; then
992
    kde_widgetdir='\${libdir}/kde3/plugins/designer'
993
  fi
994
  if test -z "$xdg_appsdir"; then
995
    xdg_appsdir='\${datadir}/applications/kde'
996
  fi
997
  if test -z "$xdg_menudir"; then
998
    xdg_menudir='\${sysconfdir}/xdg/menus'
999
  fi
1000
  if test -z "$xdg_directorydir"; then
1001
    xdg_directorydir='\${datadir}/desktop-directories'
1002
  fi
1003
 
1004
  KDE_SET_PATHS(defaults)
1005
 
1006
else
1007
 
1008
  if test $kde_qtver = 1; then
1009
     AC_MSG_RESULT([compiling])
1010
     KDE_1_CHECK_PATHS
1011
  else
1012
     AC_MSG_ERROR([path checking not yet supported for KDE 2])
1013
  fi
1014
 
1015
fi
1016
])
1017
m4trace:acinclude.m4:515: -1- AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS], [ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
1018
   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
1019
   test -z "$kde_datadir" || test -z "$kde_locale"  ||
1020
   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
1021
   test -z "$kde_kcfgdir" ||
1022
   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
1023
   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
1024
   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
1025
   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
1026
   test -z "$kde_styledir" || test -z "kde_widgetdir" ||
1027
   test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
1028
   test "x$kde_have_all_paths" != "xyes"; then
1029
     kde_have_all_paths=no
1030
  fi
1031
])
1032
m4trace:acinclude.m4:532: -1- AC_DEFUN([KDE_MISSING_PROG_ERROR], [
1033
    AC_MSG_ERROR([The important program $1 was not found!
1034
Please check whether you installed KDE correctly.
1035
])
1036
])
1037
m4trace:acinclude.m4:539: -1- AC_DEFUN([KDE_MISSING_ARTS_ERROR], [
1038
    AC_MSG_ERROR([The important program $1 was not found!
1039
Please check whether you installed aRts correctly or use
1040
--without-arts to compile without aRts support (this will remove functionality).
1041
])
1042
])
1043
m4trace:acinclude.m4:547: -1- AC_DEFUN([KDE_SET_DEFAULT_BINDIRS], [
1044
    kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
1045
    test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
1046
    if test -n "$KDEDIRS"; then
1047
       kde_save_IFS=$IFS
1048
       IFS=:
1049
       for dir in $KDEDIRS; do
1050
            kde_default_bindirs="$dir/bin $kde_default_bindirs "
1051
       done
1052
       IFS=$kde_save_IFS
1053
    fi
1054
])
1055
m4trace:acinclude.m4:561: -1- AC_DEFUN([KDE_SUBST_PROGRAMS], [
1056
    AC_ARG_WITH(arts,
1057
        AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
1058
        [build_arts=$withval],
1059
        [build_arts=yes]
1060
    )
1061
    AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
1062
    if test "$build_arts" = "no"; then
1063
        AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
1064
    fi
1065
 
1066
        KDE_SET_DEFAULT_BINDIRS
1067
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
1068
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
1069
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
1070
        if test "$build_arts" '!=' "no"; then
1071
          KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
1072
          KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
1073
        fi
1074
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
1075
 
1076
        kde32ornewer=1
1077
        kde33ornewer=1
1078
        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
1079
            kde32ornewer=
1080
            kde33ornewer=
1081
        else
1082
            if test "$kde_qtver" = "3"; then
1083
              if test "$kde_qtsubver" -le 1; then
1084
                kde32ornewer=
1085
              fi
1086
              if test "$kde_qtsubver" -le 2; then
1087
                kde33ornewer=
1088
              fi
1089
              if test "$KDECONFIG" != "compiled"; then
1090
                if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
1091
                  kde33ornewer=
1092
                fi
1093
              fi
1094
            fi
1095
        fi
1096
 
1097
        if test -n "$kde32ornewer"; then
1098
            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
1099
            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
1100
        fi
1101
        if test -n "$kde33ornewer"; then
1102
            KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
1103
            AC_SUBST(MAKEKDEWIDGETS)
1104
        fi
1105
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
1106
 
1107
        if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
1108
 	    kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
1109
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
1110
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
1111
	    if test "$KDE_XSL_STYLESHEET" = "NO"; then
1112
		KDE_XSL_STYLESHEET=""
1113
	    else
1114
                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
1115
	    fi
1116
        fi
1117
 
1118
        DCOP_DEPENDENCIES='$(DCOPIDL)'
1119
        if test -n "$kde32ornewer"; then
1120
            KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
1121
            DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
1122
            AC_SUBST(KCONFIG_COMPILER)
1123
            AC_SUBST(KCFG_DEPENDENCIES)
1124
            AC_SUBST(DCOPIDLNG)
1125
        fi
1126
        AC_SUBST(DCOPIDL)
1127
        AC_SUBST(DCOPIDL2CPP)
1128
        AC_SUBST(DCOP_DEPENDENCIES)
1129
        AC_SUBST(MCOPIDL)
1130
        AC_SUBST(ARTSCCONFIG)
1131
	AC_SUBST(MEINPROC)
1132
 	AC_SUBST(KDE_XSL_STYLESHEET)
1133
	AC_SUBST(XMLLINT)
1134
])
1135
m4trace:acinclude.m4:643: -1- AC_DEFUN([AC_CREATE_KFSSTND], [
1136
AC_REQUIRE([AC_CHECK_RPATH])
1137
 
1138
AC_MSG_CHECKING([for KDE paths])
1139
kde_result=""
1140
kde_cached_paths=yes
1141
AC_CACHE_VAL(kde_cv_all_paths,
1142
[
1143
  KDE_SET_DEFAULT_PATHS($1)
1144
  kde_cached_paths=no
1145
])
1146
eval "$kde_cv_all_paths"
1147
KDE_CHECK_PATHS_FOR_COMPLETENESS
1148
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
1149
  # wrong values were cached, may be, we can set better ones
1150
  kde_result=
1151
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
1152
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
1153
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
1154
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
1155
  kde_have_all_paths=
1156
  kde_styledir=
1157
  kde_widgetdir=
1158
  xdg_appsdir = xdg_menudir= xdg_directorydir= 
1159
  KDE_SET_DEFAULT_PATHS($1)
1160
  eval "$kde_cv_all_paths"
1161
  KDE_CHECK_PATHS_FOR_COMPLETENESS
1162
  kde_result="$kde_result (cache overridden)"
1163
fi
1164
if test "$kde_have_all_paths" = "no"; then
1165
  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
1166
Since it had compiled and linked before, it must be a strange problem on your system.
1167
Look at config.log for details. If you are not able to fix this, look at
1168
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
1169
(If you're using an egcs version on Linux, you may update binutils!)
1170
])
1171
else
1172
  rm -f conftest*
1173
  AC_MSG_RESULT($kde_result)
1174
fi
1175
 
1176
bindir=$kde_bindir
1177
 
1178
KDE_SUBST_PROGRAMS
1179
 
1180
])
1181
m4trace:acinclude.m4:691: -1- AC_DEFUN([AC_SUBST_KFSSTND], [
1182
AC_SUBST(kde_htmldir)
1183
AC_SUBST(kde_appsdir)
1184
AC_SUBST(kde_icondir)
1185
AC_SUBST(kde_sounddir)
1186
AC_SUBST(kde_datadir)
1187
AC_SUBST(kde_locale)
1188
AC_SUBST(kde_confdir)
1189
AC_SUBST(kde_kcfgdir)
1190
AC_SUBST(kde_mimedir)
1191
AC_SUBST(kde_wallpaperdir)
1192
AC_SUBST(kde_bindir)
1193
dnl X Desktop Group standards
1194
AC_SUBST(xdg_appsdir)
1195
AC_SUBST(xdg_menudir)
1196
AC_SUBST(xdg_directorydir)
1197
dnl for KDE 2
1198
AC_SUBST(kde_templatesdir)
1199
AC_SUBST(kde_servicesdir)
1200
AC_SUBST(kde_servicetypesdir)
1201
AC_SUBST(kde_moduledir)
1202
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
1203
AC_SUBST(kde_styledir)
1204
AC_SUBST(kde_widgetdir)
1205
if test "$kde_qtver" = 1; then
1206
  kde_minidir="$kde_icondir/mini"
1207
else
1208
# for KDE 1 - this breaks KDE2 apps using minidir, but
1209
# that's the plan ;-/
1210
  kde_minidir="/dev/null"
1211
fi
1212
dnl AC_SUBST(kde_minidir)
1213
dnl AC_SUBST(kde_cgidir)
1214
dnl AC_SUBST(kde_toolbardir)
1215
])
1216
m4trace:acinclude.m4:728: -1- AC_DEFUN([KDE_MISC_TESTS], [
1217
   dnl Checks for libraries.
1218
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
1219
   AC_SUBST(LIBUTIL)
1220
   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
1221
   AC_SUBST(LIBCOMPAT)
1222
   kde_have_crypt=
1223
   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
1224
      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
1225
        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
1226
You should install libcrypt from another source or configure with PAM
1227
support])
1228
	kde_have_crypt=no
1229
      ]))
1230
   AC_SUBST(LIBCRYPT)
1231
   if test $kde_have_crypt = yes; then
1232
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
1233
   fi
1234
   AC_CHECK_SOCKLEN_T
1235
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
1236
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1237
      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
1238
        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
1239
   fi
1240
   AC_CHECK_FUNC(inet_ntoa)
1241
   if test $ac_cv_func_inet_ntoa = no; then
1242
     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
1243
   fi
1244
   AC_CHECK_FUNC(connect)
1245
   if test $ac_cv_func_connect = no; then
1246
      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
1247
        $X_EXTRA_LIBS)
1248
   fi
1249
 
1250
   AC_CHECK_FUNC(remove)
1251
   if test $ac_cv_func_remove = no; then
1252
      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
1253
   fi
1254
 
1255
   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
1256
   AC_CHECK_FUNC(shmat, ,
1257
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
1258
 
1259
   # more headers that need to be explicitly included on darwin
1260
   AC_CHECK_HEADERS(sys/types.h stdint.h)
1261
 
1262
   # sys/bitypes.h is needed for uint32_t and friends on Tru64
1263
   AC_CHECK_HEADERS(sys/bitypes.h)
1264
 
1265
   # darwin requires a poll emulation library
1266
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
1267
 
1268
   # for some image handling on Mac OS X
1269
   AC_CHECK_HEADERS(Carbon/Carbon.h)
1270
 
1271
   # CoreAudio framework
1272
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
1273
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
1274
     FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio"
1275
   ])
1276
 
1277
   AC_CHECK_RES_INIT
1278
   AC_SUBST(LIB_POLL)
1279
   AC_SUBST(FRAMEWORK_COREAUDIO)
1280
   LIBSOCKET="$X_EXTRA_LIBS"
1281
   AC_SUBST(LIBSOCKET)
1282
   AC_SUBST(X_EXTRA_LIBS)
1283
   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
1284
   AC_SUBST(LIBUCB)
1285
 
1286
   case $host in  dnl this *is* LynxOS specific
1287
   *-*-lynxos* )
1288
        AC_MSG_CHECKING([LynxOS header file wrappers])
1289
        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
1290
        AC_MSG_RESULT(disabled)
1291
        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
1292
         ;;
1293
    esac
1294
 
1295
   KDE_CHECK_TYPES
1296
   KDE_CHECK_LIBDL
1297
   KDE_CHECK_STRLCPY
1298
   KDE_CHECK_PIE_SUPPORT
1299
 
1300
# darwin needs this to initialize the environment
1301
AC_CHECK_HEADERS(crt_externs.h)
1302
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
1303
 
1304
AH_VERBATIM(_DARWIN_ENVIRON,
1305
[
1306
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
1307
# include <sys/time.h>
1308
# include <crt_externs.h>
1309
# define environ (*_NSGetEnviron())
1310
#endif
1311
])
1312
 
1313
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
1314
[
1315
/*
1316
 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
1317
 * that defines bzero.
1318
 */
1319
 
1320
#if defined(_AIX)
1321
#include <strings.h>
1322
#endif
1323
])
1324
 
1325
AC_CHECK_FUNCS([vsnprintf snprintf])
1326
 
1327
AH_VERBATIM(_TRU64,[
1328
/*
1329
 * On HP-UX, the declaration of vsnprintf() is needed every time !
1330
 */
1331
 
1332
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
1333
#if __STDC__
1334
#include <stdarg.h>
1335
#include <stdlib.h>
1336
#else
1337
#include <varargs.h>
1338
#endif
1339
#ifdef __cplusplus
1340
extern "C"
1341
#endif
1342
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
1343
#ifdef __cplusplus
1344
extern "C"
1345
#endif
1346
int snprintf(char *str, size_t n, char const *fmt, ...);
1347
#endif
1348
])
1349
 
1350
])
1351
m4trace:acinclude.m4:870: -1- AC_DEFUN([K_PATH_X], [
1352
AC_REQUIRE([KDE_MISC_TESTS])dnl
1353
AC_REQUIRE([KDE_CHECK_LIB64])
1354
 
1355
AC_ARG_ENABLE(
1356
  embedded,
1357
  AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
1358
  kde_use_qt_emb=$enableval,
1359
  kde_use_qt_emb=no
1360
)
1361
 
1362
AC_ARG_ENABLE(
1363
  qtopia,
1364
  AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
1365
  kde_use_qt_emb_palm=$enableval,
1366
  kde_use_qt_emb_palm=no
1367
)
1368
 
1369
AC_ARG_ENABLE(
1370
  mac,
1371
  AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
1372
  kde_use_qt_mac=$enableval,
1373
  kde_use_qt_mac=no
1374
)
1375
 
1376
# used to disable x11-specific stuff on special platforms
1377
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
1378
 
1379
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
1380
 
1381
AC_MSG_CHECKING(for X)
1382
 
1383
AC_CACHE_VAL(kde_cv_have_x,
1384
[# One or both of the vars are not set, and there is no cached value.
1385
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
1386
   kde_x_includes=NO
1387
else
1388
   kde_x_includes=$x_includes
1389
fi
1390
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
1391
   kde_x_libraries=NO
1392
else
1393
   kde_x_libraries=$x_libraries
1394
fi
1395
 
1396
# below we use the standard autoconf calls
1397
ac_x_libraries=$kde_x_libraries
1398
ac_x_includes=$kde_x_includes
1399
 
1400
KDE_PATH_X_DIRECT
1401
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
1402
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
1403
dnl location. The correct location is /usr/lib32 or an undefined value
1404
dnl (the linker is smart enough to pick the correct default library).
1405
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
1406
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
1407
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
1408
dnl x_includes should be left alone.
1409
case "$host" in
1410
mips-sgi-irix6*)
1411
  ;;
1412
*-*-solaris*)
1413
  ;;
1414
*)
1415
  _AC_PATH_X_XMKMF
1416
  if test -z "$ac_x_includes"; then
1417
    ac_x_includes="."
1418
  fi
1419
  if test -z "$ac_x_libraries"; then
1420
    ac_x_libraries="/usr/lib${kdelibsuff}"
1421
  fi
1422
esac
1423
#from now on we use our own again
1424
 
1425
# when the user already gave --x-includes, we ignore
1426
# what the standard autoconf macros told us.
1427
if test "$kde_x_includes" = NO; then
1428
  kde_x_includes=$ac_x_includes
1429
fi
1430
 
1431
# for --x-libraries too
1432
if test "$kde_x_libraries" = NO; then
1433
  kde_x_libraries=$ac_x_libraries
1434
fi
1435
 
1436
if test "$kde_x_includes" = NO; then
1437
  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
1438
fi
1439
 
1440
if test "$kde_x_libraries" = NO; then
1441
  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
1442
fi
1443
 
1444
# Record where we found X for the cache.
1445
kde_cv_have_x="have_x=yes \
1446
         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
1447
])dnl
1448
 
1449
eval "$kde_cv_have_x"
1450
 
1451
if test "$have_x" != yes; then
1452
  AC_MSG_RESULT($have_x)
1453
  no_x=yes
1454
else
1455
  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
1456
fi
1457
 
1458
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
1459
  X_INCLUDES=""
1460
  x_includes="."; dnl better than nothing :-
1461
 else
1462
  x_includes=$kde_x_includes
1463
  X_INCLUDES="-I$x_includes"
1464
fi
1465
 
1466
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE || test "$kde_x_libraries" = "/usr/lib"; then
1467
  X_LDFLAGS=""
1468
  x_libraries="/usr/lib"; dnl better than nothing :-
1469
 else
1470
  x_libraries=$kde_x_libraries
1471
  X_LDFLAGS="-L$x_libraries"
1472
fi
1473
all_includes="$X_INCLUDES"
1474
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
1475
 
1476
# Check for libraries that X11R6 Xt/Xaw programs need.
1477
ac_save_LDFLAGS="$LDFLAGS"
1478
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1479
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1480
# check for ICE first), but we must link in the order -lSM -lICE or
1481
# we get undefined symbols.  So assume we have SM if we have ICE.
1482
# These have to be linked with before -lX11, unlike the other
1483
# libraries we check for below, so use a different variable.
1484
#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1485
AC_CHECK_LIB(ICE, IceConnectionNumber,
1486
  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
1487
LDFLAGS="$ac_save_LDFLAGS"
1488
 
1489
LIB_X11='-lX11 $(LIBSOCKET)'
1490
 
1491
AC_MSG_CHECKING(for libXext)
1492
AC_CACHE_VAL(kde_cv_have_libXext,
1493
[
1494
kde_ldflags_safe="$LDFLAGS"
1495
kde_libs_safe="$LIBS"
1496
 
1497
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
1498
LIBS="-lXext -lX11 $LIBSOCKET"
1499
 
1500
AC_TRY_LINK([
1501
#include <stdio.h>
1502
#ifdef STDC_HEADERS
1503
# include <stdlib.h>
1504
#endif
1505
],
1506
[
1507
printf("hello Xext\n");
1508
],
1509
kde_cv_have_libXext=yes,
1510
kde_cv_have_libXext=no
1511
)
1512
 
1513
LDFLAGS=$kde_ldflags_safe
1514
LIBS=$kde_libs_safe
1515
])
1516
 
1517
AC_MSG_RESULT($kde_cv_have_libXext)
1518
 
1519
if test "$kde_cv_have_libXext" = "no"; then
1520
  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1521
can't find it itself, we stop here assuming that make wouldn't find
1522
them either.])
1523
fi
1524
 
1525
LIB_XEXT="-lXext"
1526
QTE_NORTTI=""
1527
 
1528
elif test "$kde_use_qt_emb" = "yes"; then
1529
  dnl We're using QT Embedded
1530
  CPPFLAGS=-DQWS
1531
  CXXFLAGS="$CXXFLAGS -fno-rtti"
1532
  QTE_NORTTI="-fno-rtti -DQWS"
1533
  X_PRE_LIBS=""
1534
  LIB_X11=""
1535
  LIB_XEXT=""
1536
  LIB_XRENDER=""
1537
  LIBSM=""
1538
  X_INCLUDES=""
1539
  X_LDFLAGS=""
1540
  x_includes=""
1541
  x_libraries=""
1542
elif test "$kde_use_qt_mac" = "yes"; then
1543
  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1544
  dnl be included to get the information) --Sam
1545
  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1546
  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1547
  X_PRE_LIBS=""
1548
  LIB_X11=""
1549
  LIB_XEXT=""
1550
  LIB_XRENDER=""
1551
  LIBSM=""
1552
  X_INCLUDES=""
1553
  X_LDFLAGS=""
1554
  x_includes=""
1555
  x_libraries=""
1556
fi
1557
AC_SUBST(X_PRE_LIBS)
1558
AC_SUBST(LIB_X11)
1559
AC_SUBST(LIB_XRENDER)
1560
AC_SUBST(LIBSM)
1561
AC_SUBST(X_INCLUDES)
1562
AC_SUBST(X_LDFLAGS)
1563
AC_SUBST(x_includes)
1564
AC_SUBST(x_libraries)
1565
AC_SUBST(QTE_NORTTI)
1566
AC_SUBST(LIB_XEXT)
1567
 
1568
])
1569
m4trace:acinclude.m4:1090: -1- AC_DEFUN([KDE_PRINT_QT_PROGRAM], [
1570
AC_REQUIRE([KDE_USE_QT])
1571
cat > conftest.$ac_ext <<EOF
1572
#include "confdefs.h"
1573
#include <qglobal.h>
1574
#include <qapplication.h>
1575
EOF
1576
if test "$kde_qtver" = "2"; then
1577
cat >> conftest.$ac_ext <<EOF
1578
#include <qevent.h>
1579
#include <qstring.h>
1580
#include <qstyle.h>
1581
EOF
1582
 
1583
if test $kde_qtsubver -gt 0; then
1584
cat >> conftest.$ac_ext <<EOF
1585
#if QT_VERSION < 210
1586
#error 1
1587
#endif
1588
EOF
1589
fi
1590
fi
1591
 
1592
if test "$kde_qtver" = "3"; then
1593
cat >> conftest.$ac_ext <<EOF
1594
#include <qcursor.h>
1595
#include <qstylefactory.h>
1596
#include <private/qucomextra_p.h>
1597
EOF
1598
fi
1599
 
1600
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1601
cat >> conftest.$ac_ext <<EOF
1602
#error 1
1603
#endif
1604
 
1605
int main() {
1606
EOF
1607
if test "$kde_qtver" = "2"; then
1608
cat >> conftest.$ac_ext <<EOF
1609
    QStringList *t = new QStringList();
1610
    Q_UNUSED(t);
1611
EOF
1612
if test $kde_qtsubver -gt 0; then
1613
cat >> conftest.$ac_ext <<EOF
1614
    QString s;
1615
    s.setLatin1("Elvis is alive", 14);
1616
EOF
1617
fi
1618
fi
1619
if test "$kde_qtver" = "3"; then
1620
cat >> conftest.$ac_ext <<EOF
1621
    (void)QStyleFactory::create(QString::null);
1622
    QCursor c(Qt::WhatsThisCursor);
1623
EOF
1624
fi
1625
cat >> conftest.$ac_ext <<EOF
1626
    return 0;
1627
}
1628
EOF
1629
])
1630
m4trace:acinclude.m4:1153: -1- AC_DEFUN([KDE_USE_QT], [
1631
if test -z "$1"; then
1632
  # Current default Qt version: 3.3
1633
  kde_qtver=3
1634
  kde_qtsubver=3
1635
else
1636
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1637
  # following is the check if subversion isnt found in passed argument
1638
  if test "$kde_qtsubver" = "$1"; then
1639
    kde_qtsubver=1
1640
  fi
1641
  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1642
  if test "$kde_qtver" = "1"; then
1643
    kde_qtsubver=42
1644
  fi
1645
fi
1646
 
1647
if test -z "$2"; then
1648
  if test "$kde_qtver" = "2"; then
1649
    if test $kde_qtsubver -gt 0; then
1650
      kde_qt_minversion=">= Qt 2.2.2"
1651
    else
1652
      kde_qt_minversion=">= Qt 2.0.2"
1653
    fi
1654
  fi
1655
  if test "$kde_qtver" = "3"; then
1656
    if test $kde_qtsubver -gt 0; then
1657
	 if test $kde_qtsubver -gt 1; then
1658
	    if test $kde_qtsubver -gt 2; then
1659
		kde_qt_minversion=">= Qt 3.3 and < 4.0"
1660
	    else
1661
	        kde_qt_minversion=">= Qt 3.2 and < 4.0"
1662
	    fi
1663
	 else
1664
            kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
1665
         fi
1666
    else
1667
      kde_qt_minversion=">= Qt 3.0 and < 4.0"
1668
    fi
1669
  fi
1670
  if test "$kde_qtver" = "1"; then
1671
    kde_qt_minversion=">= 1.42 and < 2.0"
1672
  fi
1673
else
1674
   kde_qt_minversion="$2"
1675
fi
1676
 
1677
if test -z "$3"; then
1678
   if test $kde_qtver = 3; then
1679
     if test $kde_qtsubver -gt 0; then
1680
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1681
       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1682
       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1683
     else
1684
       kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
1685
     fi
1686
   fi
1687
   if test $kde_qtver = 2; then
1688
     if test $kde_qtsubver -gt 0; then
1689
       kde_qt_verstring="QT_VERSION >= 222"
1690
     else
1691
       kde_qt_verstring="QT_VERSION >= 200"
1692
     fi
1693
   fi
1694
   if test $kde_qtver = 1; then
1695
    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1696
   fi
1697
else
1698
   kde_qt_verstring="$3"
1699
fi
1700
 
1701
if test $kde_qtver = 4; then
1702
  kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
1703
fi
1704
if test $kde_qtver = 3; then
1705
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1706
fi
1707
if test $kde_qtver = 2; then
1708
   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1709
fi
1710
if test $kde_qtver = 1; then
1711
   kde_qt_dirs="$QTDIR /usr/lib/qt"
1712
fi
1713
])
1714
m4trace:acinclude.m4:1239: -1- AC_DEFUN([KDE_CHECK_QT_DIRECT], [
1715
AC_REQUIRE([KDE_USE_QT])
1716
AC_MSG_CHECKING([if Qt compiles without flags])
1717
AC_CACHE_VAL(kde_cv_qt_direct,
1718
[
1719
AC_LANG_SAVE
1720
AC_LANG_CPLUSPLUS
1721
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1722
ac_LIBRARY_PATH="$LIBRARY_PATH"
1723
ac_cxxflags_safe="$CXXFLAGS"
1724
ac_ldflags_safe="$LDFLAGS"
1725
ac_libs_safe="$LIBS"
1726
 
1727
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1728
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1729
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1730
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1731
else
1732
LIBS="$LIBQT $LIBSOCKET"
1733
fi
1734
LD_LIBRARY_PATH=
1735
export LD_LIBRARY_PATH
1736
LIBRARY_PATH=
1737
export LIBRARY_PATH
1738
 
1739
KDE_PRINT_QT_PROGRAM
1740
 
1741
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1742
  kde_cv_qt_direct="yes"
1743
else
1744
  kde_cv_qt_direct="no"
1745
  echo "configure: failed program was:" >&AC_FD_CC
1746
  cat conftest.$ac_ext >&AC_FD_CC
1747
fi
1748
 
1749
rm -f conftest*
1750
CXXFLAGS="$ac_cxxflags_safe"
1751
LDFLAGS="$ac_ldflags_safe"
1752
LIBS="$ac_libs_safe"
1753
 
1754
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1755
export LD_LIBRARY_PATH
1756
LIBRARY_PATH="$ac_LIBRARY_PATH"
1757
export LIBRARY_PATH
1758
AC_LANG_RESTORE
1759
])
1760
 
1761
if test "$kde_cv_qt_direct" = "yes"; then
1762
  AC_MSG_RESULT(yes)
1763
  $1
1764
else
1765
  AC_MSG_RESULT(no)
1766
  $2
1767
fi
1768
])
1769
m4trace:acinclude.m4:1302: -1- AC_DEFUN([AC_PATH_QT_1_3], [
1770
AC_REQUIRE([K_PATH_X])
1771
AC_REQUIRE([KDE_USE_QT])
1772
AC_REQUIRE([KDE_CHECK_LIB64])
1773
 
1774
dnl ------------------------------------------------------------------------
1775
dnl Add configure flag to enable linking to MT version of Qt library.
1776
dnl ------------------------------------------------------------------------
1777
 
1778
AC_ARG_ENABLE(
1779
  mt,
1780
  AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1781
  kde_use_qt_mt=$enableval,
1782
  [
1783
    if test $kde_qtver = 3; then
1784
      kde_use_qt_mt=yes
1785
    else
1786
      kde_use_qt_mt=no
1787
    fi
1788
  ]
1789
)
1790
 
1791
USING_QT_MT=""
1792
 
1793
dnl ------------------------------------------------------------------------
1794
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1795
dnl ------------------------------------------------------------------------
1796
 
1797
KDE_MT_LDFLAGS=
1798
KDE_MT_LIBS=
1799
if test "x$kde_use_qt_mt" = "xyes"; then
1800
  KDE_CHECK_THREADING
1801
  if test "x$kde_use_threading" = "xyes"; then
1802
    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1803
    KDE_MT_LDFLAGS="$USE_THREADS"
1804
    KDE_MT_LIBS="$LIBPTHREAD"
1805
  else
1806
    kde_use_qt_mt=no
1807
  fi
1808
fi
1809
AC_SUBST(KDE_MT_LDFLAGS)
1810
AC_SUBST(KDE_MT_LIBS)
1811
 
1812
kde_qt_was_given=yes
1813
 
1814
dnl ------------------------------------------------------------------------
1815
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1816
dnl ------------------------------------------------------------------------
1817
if test -z "$LIBQT_GLOB"; then
1818
  if test "x$kde_use_qt_emb" = "xyes"; then
1819
    LIBQT_GLOB="libqte.*"
1820
  else
1821
    LIBQT_GLOB="libqt.*"
1822
  fi
1823
fi
1824
 
1825
dnl ------------------------------------------------------------
1826
dnl If we got --enable-embedded then adjust the Qt library name.
1827
dnl ------------------------------------------------------------
1828
if test "x$kde_use_qt_emb" = "xyes"; then
1829
  qtlib="qte"
1830
else
1831
  qtlib="qt"
1832
fi
1833
 
1834
kde_int_qt="-l$qtlib"
1835
 
1836
if test -z "$LIBQPE"; then
1837
dnl ------------------------------------------------------------
1838
dnl If we got --enable-palmtop then add -lqpe to the link line
1839
dnl ------------------------------------------------------------
1840
  if test "x$kde_use_qt_emb" = "xyes"; then
1841
    if test "x$kde_use_qt_emb_palm" = "xyes"; then
1842
      LIB_QPE="-lqpe"
1843
    else
1844
      LIB_QPE=""
1845
    fi
1846
  else
1847
    LIB_QPE=""
1848
  fi
1849
fi
1850
 
1851
dnl ------------------------------------------------------------------------
1852
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1853
dnl ------------------------------------------------------------------------
1854
 
1855
if test "x$kde_use_qt_mt" = "xyes"; then
1856
  LIBQT="-l$qtlib-mt"
1857
  kde_int_qt="-l$qtlib-mt"
1858
  LIBQT_GLOB="lib$qtlib-mt.*"
1859
  USING_QT_MT="using -mt"
1860
else
1861
  LIBQT="-l$qtlib"
1862
fi
1863
 
1864
if test $kde_qtver != 1; then
1865
 
1866
  AC_REQUIRE([AC_FIND_PNG])
1867
  AC_REQUIRE([AC_FIND_JPEG])
1868
  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1869
fi
1870
 
1871
if test $kde_qtver = 3; then
1872
  AC_REQUIRE([KDE_CHECK_LIBDL])
1873
  LIBQT="$LIBQT $LIBDL"
1874
fi
1875
 
1876
AC_MSG_CHECKING([for Qt])
1877
 
1878
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1879
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1880
fi
1881
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1882
qt_libraries=""
1883
qt_includes=""
1884
AC_ARG_WITH(qt-dir,
1885
    AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1886
    [  ac_qt_includes="$withval"/include
1887
       ac_qt_libraries="$withval"/lib${kdelibsuff}
1888
       ac_qt_bindir="$withval"/bin
1889
    ])
1890
 
1891
AC_ARG_WITH(qt-includes,
1892
    AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1893
    [
1894
       ac_qt_includes="$withval"
1895
    ])
1896
 
1897
kde_qt_libs_given=no
1898
 
1899
AC_ARG_WITH(qt-libraries,
1900
    AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1901
    [  ac_qt_libraries="$withval"
1902
       kde_qt_libs_given=yes
1903
    ])
1904
 
1905
AC_CACHE_VAL(ac_cv_have_qt,
1906
[#try to guess Qt locations
1907
 
1908
qt_incdirs=""
1909
for dir in $kde_qt_dirs; do
1910
   qt_incdirs="$qt_incdirs $dir/include $dir"
1911
done
1912
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"
1913
if test ! "$ac_qt_includes" = "NO"; then
1914
   qt_incdirs="$ac_qt_includes $qt_incdirs"
1915
fi
1916
 
1917
if test "$kde_qtver" != "1"; then
1918
  kde_qt_header=qstyle.h
1919
else
1920
  kde_qt_header=qglobal.h
1921
fi
1922
 
1923
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1924
ac_qt_includes="$qt_incdir"
1925
 
1926
qt_libdirs=""
1927
for dir in $kde_qt_dirs; do
1928
   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1929
done
1930
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1931
if test ! "$ac_qt_libraries" = "NO"; then
1932
  qt_libdir=$ac_qt_libraries
1933
else
1934
  qt_libdirs="$ac_qt_libraries $qt_libdirs"
1935
  # if the Qt was given, the chance is too big that libqt.* doesn't exist
1936
  qt_libdir=NONE
1937
  for dir in $qt_libdirs; do
1938
    try="ls -1 $dir/${LIBQT_GLOB}"
1939
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1940
  done
1941
fi
1942
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1943
  if test -e "$a"; then
1944
    LIBQT="$LIBQT ${kde_int_qt}_incremental"
1945
    break
1946
  fi
1947
done
1948
 
1949
ac_qt_libraries="$qt_libdir"
1950
 
1951
AC_LANG_SAVE
1952
AC_LANG_CPLUSPLUS
1953
 
1954
ac_cxxflags_safe="$CXXFLAGS"
1955
ac_ldflags_safe="$LDFLAGS"
1956
ac_libs_safe="$LIBS"
1957
 
1958
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1959
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1960
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1961
 
1962
KDE_PRINT_QT_PROGRAM
1963
 
1964
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1965
  rm -f conftest*
1966
else
1967
  echo "configure: failed program was:" >&AC_FD_CC
1968
  cat conftest.$ac_ext >&AC_FD_CC
1969
  ac_qt_libraries="NO"
1970
fi
1971
rm -f conftest*
1972
CXXFLAGS="$ac_cxxflags_safe"
1973
LDFLAGS="$ac_ldflags_safe"
1974
LIBS="$ac_libs_safe"
1975
 
1976
AC_LANG_RESTORE
1977
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1978
  ac_cv_have_qt="have_qt=no"
1979
  ac_qt_notfound=""
1980
  missing_qt_mt=""
1981
  if test "$ac_qt_includes" = NO; then
1982
    if test "$ac_qt_libraries" = NO; then
1983
      ac_qt_notfound="(headers and libraries)";
1984
    else
1985
      ac_qt_notfound="(headers)";
1986
    fi
1987
  else
1988
    if test "x$kde_use_qt_mt" = "xyes"; then
1989
       missing_qt_mt="
1990
Make sure that you have compiled Qt with thread support!"
1991
       ac_qt_notfound="(library $qtlib-mt)";
1992
    else
1993
       ac_qt_notfound="(library $qtlib)";
1994
    fi
1995
  fi
1996
 
1997
  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1998
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1999
else
2000
  have_qt="yes"
2001
fi
2002
])
2003
 
2004
eval "$ac_cv_have_qt"
2005
 
2006
if test "$have_qt" != yes; then
2007
  AC_MSG_RESULT([$have_qt]);
2008
else
2009
  ac_cv_have_qt="have_qt=yes \
2010
    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
2011
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
2012
 
2013
  qt_libraries="$ac_qt_libraries"
2014
  qt_includes="$ac_qt_includes"
2015
fi
2016
 
2017
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
2018
     KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
2019
fi
2020
 
2021
AC_SUBST(qt_libraries)
2022
AC_SUBST(qt_includes)
2023
 
2024
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
2025
 QT_INCLUDES=""
2026
else
2027
 QT_INCLUDES="-I$qt_includes"
2028
 all_includes="$QT_INCLUDES $all_includes"
2029
fi
2030
 
2031
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
2032
 QT_LDFLAGS=""
2033
else
2034
 QT_LDFLAGS="-L$qt_libraries"
2035
 all_libraries="$QT_LDFLAGS $all_libraries"
2036
fi
2037
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
2038
 
2039
AC_SUBST(QT_INCLUDES)
2040
AC_SUBST(QT_LDFLAGS)
2041
AC_PATH_QT_MOC_UIC
2042
 
2043
KDE_CHECK_QT_JPEG
2044
 
2045
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2046
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
2047
else
2048
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
2049
fi
2050
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
2051
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
2052
  if test -e "$a"; then
2053
     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
2054
     break
2055
  fi
2056
done
2057
 
2058
AC_SUBST(LIB_QT)
2059
AC_SUBST(LIB_QPE)
2060
 
2061
AC_SUBST(kde_qtver)
2062
])
2063
m4trace:acinclude.m4:1598: -1- AC_DEFUN([AC_PATH_QT], [
2064
AC_PATH_QT_1_3
2065
])
2066
m4trace:acinclude.m4:1603: -1- AC_DEFUN([KDE_CHECK_UIC_PLUGINS], [
2067
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
2068
 
2069
if test x$ac_uic_supports_libpath = xyes; then
2070
 
2071
AC_MSG_CHECKING([if UIC has KDE plugins available])
2072
AC_CACHE_VAL(kde_cv_uic_plugins,
2073
[
2074
cat > actest.ui << EOF
2075
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
2076
<class>NewConnectionDialog</class>
2077
<widget class="QDialog">
2078
   <widget class="KLineEdit">
2079
        <property name="name">
2080
           <cstring>testInput</cstring>
2081
        </property>
2082
   </widget>
2083
</widget>
2084
</UI>
2085
EOF
2086
 
2087
 
2088
 
2089
kde_cv_uic_plugins=no
2090
kde_line="$UIC_PATH -L $kde_widgetdir"
2091
if test x$ac_uic_supports_nounload = xyes; then
2092
   kde_line="$kde_line -nounload"
2093
fi
2094
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
2095
if AC_TRY_EVAL(kde_line); then
2096
	# if you're trying to debug this check and think it's incorrect,
2097
	# better check your installation. The check _is_ correct - your
2098
	# installation is not.
2099
	if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
2100
		kde_cv_uic_plugins=yes
2101
	fi
2102
fi
2103
rm -f actest.ui actest.cpp
2104
])
2105
 
2106
AC_MSG_RESULT([$kde_cv_uic_plugins])
2107
if test "$kde_cv_uic_plugins" != yes; then
2108
	AC_MSG_ERROR([
2109
you need to install kdelibs first.
2110
 
2111
If you did install kdelibs, then the Qt version that is picked up by
2112
this configure is not the same version you used to compile kdelibs. 
2113
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the 
2114
_same Qt version_, compiled with the _same compiler_ and the same Qt
2115
configuration settings.
2116
])
2117
fi
2118
fi
2119
])
2120
m4trace:acinclude.m4:1659: -1- AC_DEFUN([KDE_CHECK_FINAL], [
2121
  AC_ARG_ENABLE(final,
2122
	AC_HELP_STRING([--enable-final],
2123
		       [build size optimized apps (experimental - needs lots of memory)]),
2124
	kde_use_final=$enableval, kde_use_final=no)
2125
 
2126
  if test "x$kde_use_final" = "xyes"; then
2127
      KDE_USE_FINAL_TRUE=""
2128
      KDE_USE_FINAL_FALSE="#"
2129
   else
2130
      KDE_USE_FINAL_TRUE="#"
2131
      KDE_USE_FINAL_FALSE=""
2132
  fi
2133
  AC_SUBST(KDE_USE_FINAL_TRUE)
2134
  AC_SUBST(KDE_USE_FINAL_FALSE)
2135
])
2136
m4trace:acinclude.m4:1677: -1- AC_DEFUN([KDE_CHECK_CLOSURE], [
2137
  AC_ARG_ENABLE(closure,
2138
		AC_HELP_STRING([--enable-closure],[delay template instantiation]),
2139
  	kde_use_closure=$enableval, kde_use_closure=no)
2140
 
2141
  KDE_NO_UNDEFINED=""
2142
  if test "x$kde_use_closure" = "xyes"; then
2143
       KDE_USE_CLOSURE_TRUE=""
2144
       KDE_USE_CLOSURE_FALSE="#"
2145
#       CXXFLAGS="$CXXFLAGS $REPO"
2146
  else
2147
       KDE_USE_CLOSURE_TRUE="#"
2148
       KDE_USE_CLOSURE_FALSE=""
2149
       KDE_NO_UNDEFINED=""
2150
       case $host in 
2151
         *-*-linux-gnu)
2152
           KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
2153
                [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
2154
		[KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
2155
		[KDE_NO_UNDEFINED=""])],
2156
	    [KDE_NO_UNDEFINED=""])
2157
           ;;
2158
       esac
2159
  fi
2160
  AC_SUBST(KDE_USE_CLOSURE_TRUE)
2161
  AC_SUBST(KDE_USE_CLOSURE_FALSE)
2162
  AC_SUBST(KDE_NO_UNDEFINED)
2163
])
2164
m4trace:acinclude.m4:1708: -1- AC_DEFUN([KDE_CHECK_NEW_LDFLAGS], [
2165
  AC_ARG_ENABLE(new_ldflags,
2166
		AC_HELP_STRING([--enable-new-ldflags],
2167
		[enable the new linker flags]),
2168
	kde_use_new_ldflags=$enableval, 
2169
	kde_use_new_ldflags=no)
2170
 
2171
  LDFLAGS_AS_NEEDED=""
2172
  LDFLAGS_NEW_DTAGS=""
2173
  if test "x$kde_use_new_ldflags" = "xyes"; then
2174
       LDFLAGS_NEW_DTAGS=""
2175
       KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
2176
		[LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
2177
 
2178
       KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
2179
		[LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
2180
  fi
2181
  AC_SUBST(LDFLAGS_AS_NEEDED)
2182
  AC_SUBST(LDFLAGS_NEW_DTAGS)
2183
])
2184
m4trace:acinclude.m4:1730: -1- AC_DEFUN([KDE_CHECK_NMCHECK], [
2185
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
2186
	kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
2187
 
2188
  if test "$kde_use_nmcheck" = "yes"; then
2189
      KDE_USE_NMCHECK_TRUE=""
2190
      KDE_USE_NMCHECK_FALSE="#"
2191
   else
2192
      KDE_USE_NMCHECK_TRUE="#"
2193
      KDE_USE_NMCHECK_FALSE=""
2194
  fi
2195
  AC_SUBST(KDE_USE_NMCHECK_TRUE)
2196
  AC_SUBST(KDE_USE_NMCHECK_FALSE)
2197
])
2198
m4trace:acinclude.m4:1746: -1- AC_DEFUN([KDE_EXPAND_MAKEVAR], [
2199
savex=$exec_prefix
2200
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
2201
tmp=$$2
2202
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
2203
exec_prefix=$savex
2204
])
2205
m4trace:acinclude.m4:1760: -1- AC_DEFUN([AC_BASE_PATH_KDE], [
2206
AC_REQUIRE([KDE_CHECK_STL])
2207
AC_REQUIRE([AC_PATH_QT])dnl
2208
AC_REQUIRE([KDE_CHECK_LIB64])
2209
 
2210
AC_CHECK_RPATH
2211
AC_MSG_CHECKING([for KDE])
2212
 
2213
if test "${prefix}" != NONE; then
2214
  kde_includes=${includedir}
2215
  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
2216
 
2217
  kde_libraries=${libdir}
2218
  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
2219
 
2220
else
2221
  ac_kde_includes=
2222
  ac_kde_libraries=
2223
  kde_libraries=""
2224
  kde_includes=""
2225
fi
2226
 
2227
AC_CACHE_VAL(ac_cv_have_kde,
2228
[#try to guess kde locations
2229
 
2230
if test "$kde_qtver" = 1; then
2231
  kde_check_header="ksock.h"
2232
  kde_check_lib="libkdecore.la"
2233
else
2234
  kde_check_header="ksharedptr.h"
2235
  kde_check_lib="libkio.la"
2236
fi
2237
 
2238
if test -z "$1"; then
2239
 
2240
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
2241
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
2242
kde_incdirs="$ac_kde_includes $kde_incdirs"
2243
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
2244
ac_kde_includes="$kde_incdir"
2245
 
2246
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
2247
  AC_MSG_ERROR([
2248
in the prefix, you've chosen, are no KDE headers installed. This will fail.
2249
So, check this please and use another prefix!])
2250
fi
2251
 
2252
kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
2253
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
2254
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
2255
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
2256
ac_kde_libraries="$kde_libdir"
2257
 
2258
kde_widgetdir=NO
2259
dnl this might be somewhere else
2260
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
2261
 
2262
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
2263
AC_MSG_ERROR([
2264
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
2265
So, check this please and use another prefix!])
2266
fi
2267
 
2268
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
2269
AC_MSG_ERROR([
2270
I can't find the designer plugins. These are required and should have been installed
2271
by kdelibs])
2272
fi
2273
 
2274
if test -n "$kde_widgetdir"; then
2275
    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
2276
fi
2277
 
2278
 
2279
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
2280
  ac_cv_have_kde="have_kde=no"
2281
else
2282
  ac_cv_have_kde="have_kde=yes \
2283
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
2284
fi
2285
 
2286
else dnl test -z $1, e.g. from kdelibs
2287
 
2288
  ac_cv_have_kde="have_kde=no"
2289
 
2290
fi
2291
])dnl
2292
 
2293
eval "$ac_cv_have_kde"
2294
 
2295
if test "$have_kde" != "yes"; then
2296
 if test "${prefix}" = NONE; then
2297
  ac_kde_prefix="$ac_default_prefix"
2298
 else
2299
  ac_kde_prefix="$prefix"
2300
 fi
2301
 if test "$exec_prefix" = NONE; then
2302
  ac_kde_exec_prefix="$ac_kde_prefix"
2303
  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
2304
 else
2305
  ac_kde_exec_prefix="$exec_prefix"
2306
  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
2307
 fi
2308
 
2309
 kde_libraries="${libdir}"
2310
 kde_includes="${includedir}"
2311
 
2312
else
2313
  ac_cv_have_kde="have_kde=yes \
2314
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
2315
  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
2316
 
2317
  kde_libraries="$ac_kde_libraries"
2318
  kde_includes="$ac_kde_includes"
2319
fi
2320
AC_SUBST(kde_libraries)
2321
AC_SUBST(kde_includes)
2322
 
2323
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
2324
 KDE_INCLUDES=""
2325
else
2326
 KDE_INCLUDES="-I$kde_includes"
2327
 all_includes="$KDE_INCLUDES $all_includes"
2328
fi
2329
 
2330
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
2331
 
2332
KDE_LDFLAGS="-L$kde_libraries"
2333
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
2334
 all_libraries="$KDE_LDFLAGS $all_libraries"
2335
fi
2336
 
2337
AC_SUBST(KDE_LDFLAGS)
2338
AC_SUBST(KDE_INCLUDES)
2339
 
2340
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2341
 
2342
all_libraries="$all_libraries $USER_LDFLAGS"
2343
all_includes="$all_includes $USER_INCLUDES"
2344
AC_SUBST(all_includes)
2345
AC_SUBST(all_libraries)
2346
 
2347
if test -z "$1"; then
2348
KDE_CHECK_UIC_PLUGINS
2349
fi
2350
 
2351
ac_kde_libraries="$kde_libdir"
2352
 
2353
AC_SUBST(AUTODIRS)
2354
 
2355
 
2356
])
2357
m4trace:acinclude.m4:1914: -1- AC_DEFUN([KDE_CHECK_EXTRA_LIBS], [
2358
AC_MSG_CHECKING(for extra includes)
2359
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
2360
  kde_use_extra_includes="$withval",
2361
  kde_use_extra_includes=NONE
2362
)
2363
kde_extra_includes=
2364
if test -n "$kde_use_extra_includes" && \
2365
   test "$kde_use_extra_includes" != "NONE"; then
2366
 
2367
   ac_save_ifs=$IFS
2368
   IFS=':'
2369
   for dir in $kde_use_extra_includes; do
2370
     kde_extra_includes="$kde_extra_includes $dir"
2371
     USER_INCLUDES="$USER_INCLUDES -I$dir"
2372
   done
2373
   IFS=$ac_save_ifs
2374
   kde_use_extra_includes="added"
2375
else
2376
   kde_use_extra_includes="no"
2377
fi
2378
AC_SUBST(USER_INCLUDES)
2379
 
2380
AC_MSG_RESULT($kde_use_extra_includes)
2381
 
2382
kde_extra_libs=
2383
AC_MSG_CHECKING(for extra libs)
2384
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
2385
  kde_use_extra_libs=$withval,
2386
  kde_use_extra_libs=NONE
2387
)
2388
if test -n "$kde_use_extra_libs" && \
2389
   test "$kde_use_extra_libs" != "NONE"; then
2390
 
2391
   ac_save_ifs=$IFS
2392
   IFS=':'
2393
   for dir in $kde_use_extra_libs; do
2394
     kde_extra_libs="$kde_extra_libs $dir"
2395
     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
2396
     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
2397
   done
2398
   IFS=$ac_save_ifs
2399
   kde_use_extra_libs="added"
2400
else
2401
   kde_use_extra_libs="no"
2402
fi
2403
 
2404
AC_SUBST(USER_LDFLAGS)
2405
 
2406
AC_MSG_RESULT($kde_use_extra_libs)
2407
 
2408
])
2409
m4trace:acinclude.m4:1968: -1- AC_DEFUN([KDE_1_CHECK_PATH_HEADERS], [
2410
    AC_MSG_CHECKING([for KDE headers installed])
2411
    AC_LANG_SAVE
2412
    AC_LANG_CPLUSPLUS
2413
cat > conftest.$ac_ext <<EOF
2414
#ifdef STDC_HEADERS
2415
# include <stdlib.h>
2416
#endif
2417
#include <stdio.h>
2418
#include "confdefs.h"
2419
#include <kapp.h>
2420
 
2421
int main() {
2422
    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
2423
    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
2424
    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
2425
    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
2426
    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
2427
    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
2428
    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
2429
    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
2430
    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
2431
    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
2432
    printf("kde_wallpaperdir=\\"%s\\"\n",
2433
	KApplication::kde_wallpaperdir().data());
2434
    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
2435
    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
2436
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
2437
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
2438
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
2439
    printf("kde_styledir=\\"/tmp/dummy\\"\n");
2440
    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
2441
    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
2442
    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
2443
    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
2444
    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
2445
    return 0;
2446
    }
2447
EOF
2448
 
2449
 ac_save_CPPFLAGS=$CPPFLAGS
2450
 CPPFLAGS="$all_includes $CPPFLAGS"
2451
 if AC_TRY_EVAL(ac_compile); then
2452
   AC_MSG_RESULT(yes)
2453
 else
2454
   AC_MSG_ERROR([your system is not able to compile a small KDE application!
2455
Check, if you installed the KDE header files correctly.
2456
For more details about this problem, look at the end of config.log.])
2457
  fi
2458
  CPPFLAGS=$ac_save_CPPFLAGS
2459
 
2460
  AC_LANG_RESTORE
2461
])
2462
m4trace:acinclude.m4:2023: -1- AC_DEFUN([KDE_CHECK_KDEQTADDON], [
2463
AC_MSG_CHECKING(for kde-qt-addon)
2464
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2465
[
2466
 kde_ldflags_safe="$LDFLAGS"
2467
 kde_libs_safe="$LIBS"
2468
 kde_cxxflags_safe="$CXXFLAGS"
2469
 
2470
 LIBS="-lkde-qt-addon $LIBQT $LIBS"
2471
 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
2472
 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
2473
 
2474
 AC_TRY_LINK([
2475
   #include <qdom.h>
2476
 ],
2477
 [
2478
   QDomDocument doc;
2479
 ],
2480
  kde_cv_have_kdeqtaddon=yes,
2481
  kde_cv_have_kdeqtaddon=no
2482
 )
2483
 
2484
 LDFLAGS=$kde_ldflags_safe
2485
 LIBS=$kde_libs_safe
2486
 CXXFLAGS=$kde_cxxflags_safe
2487
])
2488
 
2489
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2490
 
2491
if test "$kde_cv_have_kdeqtaddon" = "no"; then
2492
  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2493
It is a separate package (and CVS module) named kde-qt-addon.])
2494
fi
2495
])
2496
m4trace:acinclude.m4:2059: -1- AC_DEFUN([KDE_CREATE_LIBS_ALIASES], [
2497
   AC_REQUIRE([KDE_MISC_TESTS])
2498
   AC_REQUIRE([KDE_CHECK_LIBDL])
2499
   AC_REQUIRE([K_PATH_X])
2500
 
2501
if test $kde_qtver = 3; then
2502
   case $host in 
2503
               *cygwin*) lib_kded="-lkdeinit_kded" ;;
2504
               *) lib_kded="" ;;
2505
       esac
2506
   AC_SUBST(LIB_KDED, $lib_kded)
2507
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2508
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2509
   AC_SUBST(LIB_KIO, "-lkio")
2510
   AC_SUBST(LIB_KJS, "-lkjs")
2511
   AC_SUBST(LIB_SMB, "-lsmb")
2512
   AC_SUBST(LIB_KAB, "-lkab")
2513
   AC_SUBST(LIB_KABC, "-lkabc")
2514
   AC_SUBST(LIB_KHTML, "-lkhtml")
2515
   AC_SUBST(LIB_KSPELL, "-lkspell")
2516
   AC_SUBST(LIB_KPARTS, "-lkparts")
2517
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2518
   AC_SUBST(LIB_KUTILS, "-lkutils")
2519
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
2520
   AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2521
   AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2522
   AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2523
   AC_SUBST(LIB_KUNITTEST, "-lkunittest")
2524
# these are for backward compatibility
2525
   AC_SUBST(LIB_KSYCOCA, "-lkio")
2526
   AC_SUBST(LIB_KFILE, "-lkio")
2527
elif test $kde_qtver = 2; then
2528
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2529
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2530
   AC_SUBST(LIB_KIO, "-lkio")
2531
   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2532
   AC_SUBST(LIB_SMB, "-lsmb")
2533
   AC_SUBST(LIB_KFILE, "-lkfile")
2534
   AC_SUBST(LIB_KAB, "-lkab")
2535
   AC_SUBST(LIB_KHTML, "-lkhtml")
2536
   AC_SUBST(LIB_KSPELL, "-lkspell")
2537
   AC_SUBST(LIB_KPARTS, "-lkparts")
2538
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2539
else
2540
   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2541
   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2542
   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2543
   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2544
   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2545
fi
2546
])
2547
m4trace:acinclude.m4:2112: -1- AC_DEFUN([AC_PATH_KDE], [
2548
  AC_BASE_PATH_KDE
2549
  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2550
  [
2551
  if test "$enableval" = "no";
2552
    then ac_use_path_checking="default"
2553
    else ac_use_path_checking=""
2554
  fi
2555
  ],
2556
  [
2557
  if test "$kde_qtver" = 1;
2558
    then ac_use_path_checking=""
2559
    else ac_use_path_checking="default"
2560
  fi
2561
  ]
2562
  )
2563
 
2564
  AC_CREATE_KFSSTND($ac_use_path_checking)
2565
 
2566
  AC_SUBST_KFSSTND
2567
  KDE_CREATE_LIBS_ALIASES
2568
])
2569
m4trace:acinclude.m4:2137: -1- AC_DEFUN([KDE_CHECK_FUNC_EXT], [
2570
AC_MSG_CHECKING(for $1)
2571
AC_CACHE_VAL(kde_cv_func_$1,
2572
[
2573
AC_LANG_SAVE
2574
AC_LANG_CPLUSPLUS
2575
save_CXXFLAGS="$CXXFLAGS"
2576
kde_safe_LIBS="$LIBS"
2577
LIBS="$LIBS $X_EXTRA_LIBS"
2578
if test "$GXX" = "yes"; then
2579
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2580
fi
2581
AC_TRY_COMPILE([
2582
$2
2583
],
2584
[
2585
$3
2586
],
2587
kde_cv_func_$1=yes,
2588
kde_cv_func_$1=no)
2589
CXXFLAGS="$save_CXXFLAGS"
2590
LIBS="$kde_safe_LIBS"
2591
AC_LANG_RESTORE
2592
])
2593
 
2594
AC_MSG_RESULT($kde_cv_func_$1)
2595
 
2596
AC_MSG_CHECKING([if $1 needs custom prototype])
2597
AC_CACHE_VAL(kde_cv_proto_$1,
2598
[
2599
if test "x$kde_cv_func_$1" = xyes; then
2600
  kde_cv_proto_$1=no
2601
else
2602
  case "$1" in
2603
	setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2604
		kde_cv_proto_$1="yes - in libkdefakes"
2605
		;;
2606
	*)
2607
		kde_cv_proto_$1=unknown
2608
		;;
2609
  esac
2610
fi
2611
 
2612
if test "x$kde_cv_proto_$1" = xunknown; then
2613
 
2614
AC_LANG_SAVE
2615
AC_LANG_CPLUSPLUS
2616
  kde_safe_libs=$LIBS
2617
  LIBS="$LIBS $X_EXTRA_LIBS"
2618
  AC_TRY_LINK([
2619
$2
2620
 
2621
extern "C" $4;
2622
],
2623
[
2624
$3
2625
],
2626
[ kde_cv_func_$1=yes
2627
  kde_cv_proto_$1=yes ],
2628
  [kde_cv_proto_$1="$1 unavailable"]
2629
)
2630
LIBS=$kde_safe_libs
2631
AC_LANG_RESTORE
2632
fi
2633
])
2634
AC_MSG_RESULT($kde_cv_proto_$1)
2635
 
2636
if test "x$kde_cv_func_$1" = xyes; then
2637
  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2638
  $6
2639
fi
2640
if test "x$kde_cv_proto_$1" = xno; then
2641
  AC_DEFINE(HAVE_$5_PROTO, 1,
2642
  [Define if you have the $1 prototype])
2643
fi
2644
 
2645
AH_VERBATIM([_HAVE_$5_PROTO],
2646
[
2647
#if !defined(HAVE_$5_PROTO)
2648
#ifdef __cplusplus
2649
extern "C" {
2650
#endif
2651
$4;
2652
#ifdef __cplusplus
2653
}
2654
#endif
2655
#endif
2656
])
2657
])
2658
m4trace:acinclude.m4:2228: -1- AC_DEFUN([AC_CHECK_SETENV], [
2659
	KDE_CHECK_FUNC_EXT(setenv, [
2660
#include <stdlib.h>
2661
], 
2662
		[setenv("VAR", "VALUE", 1);],
2663
	        [int setenv (const char *, const char *, int)],
2664
		[SETENV])
2665
])
2666
m4trace:acinclude.m4:2238: -1- AC_DEFUN([AC_CHECK_UNSETENV], [
2667
	KDE_CHECK_FUNC_EXT(unsetenv, [
2668
#include <stdlib.h>
2669
], 
2670
		[unsetenv("VAR");],
2671
	        [void unsetenv (const char *)],
2672
		[UNSETENV])
2673
])
2674
m4trace:acinclude.m4:2248: -1- AC_DEFUN([AC_CHECK_GETDOMAINNAME], [
2675
	KDE_CHECK_FUNC_EXT(getdomainname, [
2676
#include <stdlib.h>
2677
#include <unistd.h>
2678
#include <netdb.h>
2679
], 
2680
		[
2681
char buffer[200];
2682
getdomainname(buffer, 200);
2683
], 	
2684
	        [#include <sys/types.h>
2685
		int getdomainname (char *, size_t)],
2686
		[GETDOMAINNAME])
2687
])
2688
m4trace:acinclude.m4:2264: -1- AC_DEFUN([AC_CHECK_GETHOSTNAME], [
2689
	KDE_CHECK_FUNC_EXT(gethostname, [
2690
#include <stdlib.h>
2691
#include <unistd.h>
2692
], 
2693
		[
2694
char buffer[200];
2695
gethostname(buffer, 200);
2696
], 	
2697
	        [int gethostname (char *, unsigned int)],
2698
		[GETHOSTNAME])
2699
])
2700
m4trace:acinclude.m4:2278: -1- AC_DEFUN([AC_CHECK_USLEEP], [
2701
	KDE_CHECK_FUNC_EXT(usleep, [
2702
#include <unistd.h>
2703
], 
2704
		[
2705
usleep(200);
2706
], 	
2707
	        [int usleep (unsigned int)],
2708
		[USLEEP])
2709
])
2710
m4trace:acinclude.m4:2291: -1- AC_DEFUN([AC_CHECK_RANDOM], [
2711
	KDE_CHECK_FUNC_EXT(random, [
2712
#include <stdlib.h>
2713
], 
2714
		[
2715
random();
2716
], 	
2717
	        [long int random(void)],
2718
		[RANDOM])
2719
 
2720
	KDE_CHECK_FUNC_EXT(srandom, [
2721
#include <stdlib.h>
2722
], 
2723
		[
2724
srandom(27);
2725
], 	
2726
	        [void srandom(unsigned int)],
2727
		[SRANDOM])
2728
 
2729
])
2730
m4trace:acinclude.m4:2313: -1- AC_DEFUN([AC_CHECK_INITGROUPS], [
2731
	KDE_CHECK_FUNC_EXT(initgroups, [
2732
#include <sys/types.h>
2733
#include <unistd.h>
2734
#include <grp.h>
2735
],
2736
	[
2737
char buffer[200];
2738
initgroups(buffer, 27);
2739
],
2740
	[int initgroups(const char *, gid_t)],
2741
	[INITGROUPS])
2742
])
2743
m4trace:acinclude.m4:2328: -1- AC_DEFUN([AC_CHECK_MKSTEMPS], [
2744
	KDE_CHECK_FUNC_EXT(mkstemps, [
2745
#include <stdlib.h>
2746
#include <unistd.h>
2747
],
2748
	[
2749
mkstemps("/tmp/aaaXXXXXX", 6);
2750
],
2751
	[int mkstemps(char *, int)],
2752
	[MKSTEMPS])
2753
])
2754
m4trace:acinclude.m4:2341: -1- AC_DEFUN([AC_CHECK_MKSTEMP], [
2755
	KDE_CHECK_FUNC_EXT(mkstemp, [
2756
#include <stdlib.h>
2757
#include <unistd.h>
2758
],
2759
	[
2760
mkstemp("/tmp/aaaXXXXXX");
2761
],
2762
	[int mkstemp(char *)],
2763
	[MKSTEMP])
2764
])
2765
m4trace:acinclude.m4:2354: -1- AC_DEFUN([AC_CHECK_MKDTEMP], [
2766
	KDE_CHECK_FUNC_EXT(mkdtemp, [
2767
#include <stdlib.h>
2768
#include <unistd.h>
2769
],
2770
	[
2771
mkdtemp("/tmp/aaaXXXXXX");
2772
],
2773
	[char *mkdtemp(char *)],
2774
	[MKDTEMP])
2775
])
2776
m4trace:acinclude.m4:2368: -1- AC_DEFUN([AC_CHECK_RES_INIT], [
2777
  AC_MSG_CHECKING([if res_init needs -lresolv])
2778
  kde_libs_safe="$LIBS"
2779
  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2780
  AC_TRY_LINK(
2781
    [
2782
#include <sys/types.h>
2783
#include <netinet/in.h>
2784
#include <arpa/nameser.h>
2785
#include <resolv.h>
2786
    ],
2787
    [
2788
      res_init(); 
2789
    ],
2790
    [
2791
      LIBRESOLV="-lresolv"
2792
      AC_MSG_RESULT(yes)
2793
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2794
    ],
2795
    [ AC_MSG_RESULT(no) ]
2796
  )
2797
  LIBS=$kde_libs_safe
2798
  AC_SUBST(LIBRESOLV)
2799
 
2800
  KDE_CHECK_FUNC_EXT(res_init,
2801
    [
2802
#include <sys/types.h>
2803
#include <netinet/in.h>
2804
#include <arpa/nameser.h>
2805
#include <resolv.h>
2806
    ],
2807
    [res_init()],
2808
    [int res_init(void)],
2809
    [RES_INIT])
2810
])
2811
m4trace:acinclude.m4:2405: -1- AC_DEFUN([AC_CHECK_STRLCPY], [
2812
	KDE_CHECK_FUNC_EXT(strlcpy, [
2813
#include <string.h>
2814
],
2815
[ char buf[20];
2816
  strlcpy(buf, "KDE function test", sizeof(buf));
2817
],
2818
 	[unsigned long strlcpy(char*, const char*, unsigned long)],
2819
	[STRLCPY])
2820
])
2821
m4trace:acinclude.m4:2417: -1- AC_DEFUN([AC_CHECK_STRLCAT], [
2822
	KDE_CHECK_FUNC_EXT(strlcat, [
2823
#include <string.h>
2824
],
2825
[ char buf[20];
2826
  buf[0]='\0';
2827
  strlcat(buf, "KDE function test", sizeof(buf));
2828
],
2829
 	[unsigned long strlcat(char*, const char*, unsigned long)],
2830
	[STRLCAT])
2831
])
2832
m4trace:acinclude.m4:2430: -1- AC_DEFUN([AC_CHECK_RES_QUERY], [
2833
	KDE_CHECK_FUNC_EXT(res_query, [
2834
#include <sys/types.h>
2835
#include <netinet/in.h>
2836
#include <arpa/nameser.h>
2837
#include <resolv.h>
2838
#include <netdb.h>
2839
],
2840
[
2841
res_query(NULL, 0, 0, NULL, 0);
2842
],
2843
	[int res_query(const char *, int, int, unsigned char *, int)],
2844
	[RES_QUERY])
2845
])
2846
m4trace:acinclude.m4:2446: -1- AC_DEFUN([AC_CHECK_DN_SKIPNAME], [
2847
	KDE_CHECK_FUNC_EXT(dn_skipname, [
2848
#include <sys/types.h>
2849
#include <netinet/in.h>
2850
#include <arpa/nameser.h>
2851
#include <resolv.h>
2852
],
2853
[
2854
dn_skipname (NULL, NULL);
2855
],
2856
	[int dn_skipname (unsigned char *, unsigned char *)],
2857
	[DN_SKIPNAME])
2858
])
2859
m4trace:acinclude.m4:2462: -1- AC_DEFUN([AC_FIND_GIF], [AC_MSG_CHECKING([for giflib])
2860
AC_CACHE_VAL(ac_cv_lib_gif,
2861
[ac_save_LIBS="$LIBS"
2862
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2863
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2864
else
2865
LIBS="$all_libraries -lgif"
2866
fi
2867
AC_TRY_LINK(dnl
2868
[
2869
#ifdef __cplusplus
2870
extern "C" {
2871
#endif
2872
int GifLastError(void);
2873
#ifdef __cplusplus
2874
}
2875
#endif
2876
/* We use char because int might match the return type of a gcc2
2877
    builtin and then its argument prototype would still apply.  */
2878
],
2879
            [return GifLastError();],
2880
            eval "ac_cv_lib_gif=yes",
2881
            eval "ac_cv_lib_gif=no")
2882
LIBS="$ac_save_LIBS"
2883
])dnl
2884
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2885
  AC_MSG_RESULT(yes)
2886
  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2887
else
2888
  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2889
fi
2890
])
2891
m4trace:acinclude.m4:2496: -1- AC_DEFUN([KDE_FIND_JPEG_HELPER], [
2892
AC_MSG_CHECKING([for libjpeg$2])
2893
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2894
[
2895
ac_save_LIBS="$LIBS"
2896
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2897
ac_save_CFLAGS="$CFLAGS"
2898
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2899
AC_TRY_LINK(
2900
[
2901
#ifdef __cplusplus
2902
extern "C" {
2903
#endif
2904
void jpeg_CreateDecompress();
2905
#ifdef __cplusplus
2906
}
2907
#endif
2908
],
2909
[jpeg_CreateDecompress();],
2910
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2911
            eval "ac_cv_lib_jpeg_$1=no")
2912
LIBS="$ac_save_LIBS"
2913
CFLAGS="$ac_save_CFLAGS"
2914
])
2915
 
2916
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2917
  LIBJPEG="$ac_cv_lib_jpeg_$1"
2918
  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2919
else
2920
  AC_MSG_RESULT(no)
2921
  $3
2922
fi
2923
 
2924
])
2925
m4trace:acinclude.m4:2532: -1- AC_DEFUN([AC_FIND_JPEG], [
2926
dnl first look for libraries
2927
KDE_FIND_JPEG_HELPER(6b, 6b,
2928
   KDE_FIND_JPEG_HELPER(normal, [],
2929
    [
2930
       LIBJPEG=
2931
    ]
2932
   )
2933
)
2934
 
2935
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2936
dnl requires system dependent includes loaded before it)
2937
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2938
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2939
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2940
 
2941
dnl if headers _and_ libraries are missing, this is no error, and we
2942
dnl continue with a warning (the user will get no jpeg support in khtml)
2943
dnl if only one is missing, it means a configuration error, but we still
2944
dnl only warn
2945
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2946
  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2947
else
2948
  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2949
    AC_MSG_WARN([
2950
There is an installation error in jpeg support. You seem to have only one
2951
of either the headers _or_ the libraries installed. You may need to either
2952
provide correct --with-extra-... options, or the development package of
2953
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2954
Disabling JPEG support.
2955
])
2956
  else
2957
    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2958
  fi
2959
  jpeg_incdir=
2960
  LIBJPEG=
2961
fi
2962
 
2963
AC_SUBST(LIBJPEG)
2964
AH_VERBATIM(_AC_CHECK_JPEG,
2965
[/*
2966
 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2967
 * headers and I'm too lazy to write a configure test as long as only
2968
 * unixware is related
2969
 */
2970
#ifdef _UNIXWARE
2971
#define HAVE_BOOLEAN
2972
#endif
2973
])
2974
])
2975
m4trace:acinclude.m4:2584: -1- AC_DEFUN([KDE_CHECK_QT_JPEG], [
2976
if test -n "$LIBJPEG"; then
2977
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2978
AC_CACHE_VAL(kde_cv_qt_jpeg,
2979
[
2980
AC_LANG_SAVE
2981
AC_LANG_CPLUSPLUS
2982
ac_save_LIBS="$LIBS"
2983
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2984
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2985
ac_save_CXXFLAGS="$CXXFLAGS"
2986
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2987
AC_TRY_LINK(
2988
[#include <qapplication.h>],
2989
            [
2990
            int argc;
2991
            char** argv;
2992
            QApplication app(argc, argv);],
2993
            eval "kde_cv_qt_jpeg=no",
2994
            eval "kde_cv_qt_jpeg=yes")
2995
LIBS="$ac_save_LIBS"
2996
CXXFLAGS="$ac_save_CXXFLAGS"
2997
AC_LANG_RESTORE
2998
fi
2999
])
3000
 
3001
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
3002
  AC_MSG_RESULT(yes)
3003
  LIBJPEG_QT='$(LIBJPEG)'
3004
else
3005
  AC_MSG_RESULT(no)
3006
  LIBJPEG_QT=
3007
fi
3008
 
3009
])
3010
m4trace:acinclude.m4:2621: -1- AC_DEFUN([AC_FIND_ZLIB], [
3011
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3012
AC_MSG_CHECKING([for libz])
3013
AC_CACHE_VAL(ac_cv_lib_z,
3014
[
3015
kde_save_LIBS="$LIBS"
3016
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
3017
kde_save_CFLAGS="$CFLAGS"
3018
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
3019
AC_TRY_LINK(dnl
3020
[
3021
#include<zlib.h>
3022
],
3023
[
3024
  char buf[42];
3025
  gzFile f = (gzFile) 0;
3026
  /* this would segfault.. but we only link, don't run */
3027
  (void) gzgets(f, buf, sizeof(buf));
3028
 
3029
  return (zlibVersion() == ZLIB_VERSION); 
3030
],
3031
            eval "ac_cv_lib_z='-lz'",
3032
            eval "ac_cv_lib_z=no")
3033
LIBS="$kde_save_LIBS"
3034
CFLAGS="$kde_save_CFLAGS"
3035
])dnl
3036
if test ! "$ac_cv_lib_z" = no; then
3037
  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
3038
  LIBZ="$ac_cv_lib_z"
3039
  AC_MSG_RESULT($ac_cv_lib_z)
3040
else
3041
  AC_MSG_ERROR(not found. 
3042
          Possibly configure picks up an outdated version
3043
          installed by XFree86. Remove it from your system.
3044
 
3045
          Check your installation and look into config.log)
3046
  LIBZ=""
3047
fi
3048
AC_SUBST(LIBZ)
3049
])
3050
m4trace:acinclude.m4:2663: -1- AC_DEFUN([KDE_TRY_TIFFLIB], [
3051
AC_MSG_CHECKING([for libtiff $1])
3052
 
3053
AC_CACHE_VAL(kde_cv_libtiff_$1,
3054
[
3055
AC_LANG_SAVE
3056
AC_LANG_CPLUSPLUS
3057
kde_save_LIBS="$LIBS"
3058
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3059
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
3060
else
3061
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
3062
fi
3063
kde_save_CXXFLAGS="$CXXFLAGS"
3064
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
3065
 
3066
AC_TRY_LINK(dnl
3067
[
3068
#include<tiffio.h>
3069
],
3070
    [return (TIFFOpen( "", "r") == 0); ],
3071
[
3072
    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
3073
], [
3074
    kde_cv_libtiff_$1=no
3075
])
3076
 
3077
LIBS="$kde_save_LIBS"
3078
CXXFLAGS="$kde_save_CXXFLAGS"
3079
AC_LANG_RESTORE
3080
])
3081
 
3082
if test "$kde_cv_libtiff_$1" = "no"; then
3083
    AC_MSG_RESULT(no)
3084
    LIBTIFF=""
3085
    $3
3086
else
3087
    LIBTIFF="$kde_cv_libtiff_$1"
3088
    AC_MSG_RESULT(yes)
3089
    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
3090
    $2
3091
fi
3092
 
3093
])
3094
m4trace:acinclude.m4:2709: -1- AC_DEFUN([AC_FIND_TIFF], [
3095
AC_REQUIRE([K_PATH_X])
3096
AC_REQUIRE([AC_FIND_ZLIB])
3097
AC_REQUIRE([AC_FIND_JPEG])
3098
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3099
 
3100
KDE_TRY_TIFFLIB(tiff, [],
3101
   KDE_TRY_TIFFLIB(tiff34))
3102
 
3103
AC_SUBST(LIBTIFF)
3104
])
3105
m4trace:acinclude.m4:2722: -1- AC_DEFUN([KDE_FIND_LIBEXR], [
3106
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3107
AC_REQUIRE([AC_FIND_ZLIB])
3108
AC_CACHE_VAL(ac_cv_libexr,
3109
[
3110
  if test -z "$PKG_CONFIG"; then
3111
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
3112
  fi
3113
 
3114
  AC_MSG_CHECKING([for OpenEXR libraries])
3115
 
3116
  if test "$PKG_CONFIG" = "no" ; then
3117
     AC_MSG_RESULT(no)
3118
     echo "*** The pkg-config script could not be found. Make sure it is"
3119
     echo "*** in your path, or set the PKG_CONFIG environment variable"
3120
     echo "*** to the full path to pkg-config."
3121
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
3122
  else
3123
     if !(`$PKG_CONFIG --exists OpenEXR`) ; then
3124
        AC_MSG_RESULT(no)
3125
        EXRSTATUS=no
3126
     else
3127
        if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then
3128
           AC_MSG_RESULT(no)
3129
           EXRSTATUS=old
3130
        else
3131
           kde_save_LIBS="$LIBS"
3132
           LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ"
3133
           AC_LANG_SAVE
3134
           AC_LANG_CPLUSPLUS
3135
           kde_save_CXXFLAGS="$CXXFLAGS"
3136
           EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
3137
           CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS"
3138
 
3139
           AC_TRY_LINK(dnl
3140
               [
3141
               #include <ImfRgbaFile.h>
3142
               ],
3143
               [
3144
               using namespace Imf;
3145
               RgbaInputFile file ("dummy");
3146
               return 0;
3147
               ],
3148
               eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'",
3149
               eval "ac_cv_libexr=no"
3150
           )
3151
           LIBS="$kde_save_LIBS"
3152
           CXXFLAGS="$kde_save_CXXFLAGS"
3153
           AC_LANG_RESTORE
3154
           ])dnl
3155
           if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then
3156
               AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
3157
               LIB_EXR="$ac_cv_libexr"
3158
               AC_MSG_RESULT($ac_cv_libexr)
3159
           else
3160
               AC_MSG_RESULT(no)
3161
               LIB_EXR=""
3162
           fi
3163
        fi
3164
     fi
3165
  fi
3166
  AC_SUBST(LIB_EXR)
3167
  AC_SUBST(EXR_FLAGS)
3168
])
3169
m4trace:acinclude.m4:2790: -1- AC_DEFUN([AC_FIND_PNG], [
3170
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3171
AC_REQUIRE([AC_FIND_ZLIB])
3172
AC_MSG_CHECKING([for libpng])
3173
AC_CACHE_VAL(ac_cv_lib_png,
3174
[
3175
kde_save_LIBS="$LIBS"
3176
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3177
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
3178
else
3179
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
3180
fi
3181
kde_save_CFLAGS="$CFLAGS"
3182
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
3183
 
3184
AC_TRY_LINK(dnl
3185
    [
3186
    #include<png.h>
3187
    ],
3188
    [
3189
    png_structp png_ptr = png_create_read_struct(  /* image ptr */
3190
		PNG_LIBPNG_VER_STRING, 0, 0, 0 );
3191
    return( png_ptr != 0 );
3192
    ],
3193
    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
3194
    eval "ac_cv_lib_png=no"
3195
)
3196
LIBS="$kde_save_LIBS"
3197
CFLAGS="$kde_save_CFLAGS"
3198
])dnl
3199
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
3200
  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
3201
  LIBPNG="$ac_cv_lib_png"
3202
  AC_SUBST(LIBPNG)
3203
  AC_MSG_RESULT($ac_cv_lib_png)
3204
else
3205
  AC_MSG_RESULT(no)
3206
  LIBPNG=""
3207
  AC_SUBST(LIBPNG)
3208
fi
3209
])
3210
m4trace:acinclude.m4:2834: -1- AC_DEFUN([AC_FIND_JASPER], [
3211
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3212
AC_REQUIRE([AC_FIND_JPEG])
3213
AC_MSG_CHECKING([for jasper])
3214
AC_CACHE_VAL(ac_cv_jasper,
3215
[
3216
kde_save_LIBS="$LIBS"
3217
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
3218
kde_save_CFLAGS="$CFLAGS"
3219
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
3220
 
3221
AC_TRY_LINK(dnl
3222
    [
3223
    #include<jasper/jasper.h>
3224
    ],
3225
    [
3226
    return( jas_init() );
3227
    ],
3228
    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
3229
    eval "ac_cv_jasper=no"
3230
)
3231
LIBS="$kde_save_LIBS"
3232
CFLAGS="$kde_save_CFLAGS"
3233
])dnl
3234
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
3235
  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
3236
  LIB_JASPER="$ac_cv_jasper"
3237
  AC_MSG_RESULT($ac_cv_jasper)
3238
else
3239
  AC_MSG_RESULT(no)
3240
  LIB_JASPER=""
3241
fi
3242
AC_SUBST(LIB_JASPER)
3243
])
3244
m4trace:acinclude.m4:2870: -1- AC_DEFUN([AC_CHECK_BOOL], [
3245
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
3246
])
3247
m4trace:acinclude.m4:2875: -1- AC_DEFUN([AC_CHECK_GNU_EXTENSIONS], [
3248
AC_MSG_CHECKING(if you need GNU extensions)
3249
AC_CACHE_VAL(ac_cv_gnu_extensions,
3250
[
3251
cat > conftest.c << EOF
3252
#include <features.h>
3253
 
3254
#ifdef __GNU_LIBRARY__
3255
yes
3256
#endif
3257
EOF
3258
 
3259
if (eval "$ac_cpp conftest.c") 2>&5 |
3260
  egrep "yes" >/dev/null 2>&1; then
3261
  rm -rf conftest*
3262
  ac_cv_gnu_extensions=yes
3263
else
3264
  ac_cv_gnu_extensions=no
3265
fi
3266
])
3267
 
3268
AC_MSG_RESULT($ac_cv_gnu_extensions)
3269
if test "$ac_cv_gnu_extensions" = "yes"; then
3270
  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
3271
fi
3272
])
3273
m4trace:acinclude.m4:2903: -1- AC_DEFUN([KDE_CHECK_COMPILER_FLAG], [
3274
AC_MSG_CHECKING([whether $CXX supports -$1])
3275
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
3276
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
3277
[
3278
  AC_LANG_SAVE
3279
  AC_LANG_CPLUSPLUS
3280
  save_CXXFLAGS="$CXXFLAGS"
3281
  CXXFLAGS="$CXXFLAGS -$1"
3282
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
3283
  CXXFLAGS="$save_CXXFLAGS"
3284
  AC_LANG_RESTORE
3285
])
3286
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
3287
 AC_MSG_RESULT(yes)
3288
 :
3289
 $2
3290
else
3291
 AC_MSG_RESULT(no)
3292
 :
3293
 $3
3294
fi
3295
])
3296
m4trace:acinclude.m4:2928: -1- AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG], [
3297
AC_MSG_CHECKING([whether $CC supports -$1])
3298
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
3299
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
3300
[
3301
  AC_LANG_SAVE
3302
  AC_LANG_C
3303
  save_CFLAGS="$CFLAGS"
3304
  CFLAGS="$CFLAGS -$1"
3305
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
3306
  CFLAGS="$save_CFLAGS"
3307
  AC_LANG_RESTORE
3308
])
3309
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
3310
 AC_MSG_RESULT(yes)
3311
 :
3312
 $2
3313
else
3314
 AC_MSG_RESULT(no)
3315
 :
3316
 $3
3317
fi
3318
])
3319
m4trace:acinclude.m4:2957: -1- AC_DEFUN([AC_REMOVE_FORBIDDEN], [ __val=$$1
3320
  __forbid=" $2 "
3321
  if test -n "$__val"; then
3322
    __new=""
3323
    ac_save_IFS=$IFS
3324
    IFS=" 	"
3325
    for i in $__val; do
3326
      case "$__forbid" in
3327
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
3328
	*) # Careful to not add spaces, where there were none, because otherwise
3329
	   # libtool gets confused, if we change e.g. CXX
3330
	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
3331
      esac
3332
    done
3333
    IFS=$ac_save_IFS
3334
    $1=$__new
3335
  fi
3336
])
3337
m4trace:acinclude.m4:2978: -1- AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER], [
3338
  AC_MSG_CHECKING([whether $CC is blacklisted])
3339
 
3340
  dnl In theory we have tu run this test against $CC and $CXX
3341
  dnl in C and in C++ mode, because its perfectly legal for
3342
  dnl the user to mix compiler versions, since C has a defined
3343
  dnl ABI. 
3344
  dnl 
3345
  dnl For now, we assume the user is not on crack.
3346
 
3347
  AC_TRY_COMPILE([
3348
#ifdef __GNUC__
3349
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
3350
choke me
3351
#endif
3352
#endif
3353
], ,
3354
  kde_bad_compiler=no, 
3355
  kde_bad_compiler=yes
3356
)
3357
 
3358
  AC_MSG_RESULT($kde_bad_compiler)
3359
 
3360
if test "$kde_bad_compiler" = "yes"; then
3361
  AC_MSG_ERROR([
3362
 
3363
This particular compiler version is blacklisted because it
3364
is known to miscompile KDE. Please use a newer version, or
3365
if that is not yet available, choose an older version. 
3366
 
3367
Please do not report a bug or bother us reporting this
3368
configure error. We know about it, and we introduced
3369
it by intention to avoid untraceable bugs or crashes in KDE.
3370
 
3371
])
3372
fi
3373
 
3374
])
3375
m4trace:acinclude.m4:3019: -1- AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH], [
3376
  AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline],
3377
    kde_cv_opt_noinline_match,
3378
  [
3379
  kde_cv_opt_noinline_match=irrelevant
3380
  dnl if we don't use both -O2 and -fno-inline, this check is moot
3381
  if echo "$CFLAGS" | grep -e -O2 >/dev/null 2>/dev/null \
3382
     && echo "$CFLAGS" | grep -e -fno-inline >/dev/null 2>/dev/null ; then
3383
 
3384
    ac_cflags_save="$CFLAGS"
3385
    CFLAGS="$CFLAGS -D_USE_GNU"
3386
 
3387
    AC_TRY_LINK([
3388
  #include <string.h>
3389
], [  const char *pt, *et;
3390
  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 ,  ";,"  )); }) ;
3391
],
3392
    kde_cv_opt_noinline_match=yes,
3393
    kde_cv_opt_noinline_match=no
3394
    )
3395
 
3396
    CFLAGS="$ac_cflags_save"
3397
  fi
3398
  ])
3399
])
3400
m4trace:acinclude.m4:3048: -1- AC_DEFUN([AC_VALIDIFY_CXXFLAGS], [dnl
3401
if test "x$kde_use_qt_emb" != "xyes"; then
3402
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
3403
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
3404
else
3405
 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
3406
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
3407
fi
3408
])
3409
m4trace:acinclude.m4:3059: -1- AC_DEFUN([AC_CHECK_COMPILERS], [
3410
  AC_ARG_ENABLE(debug,
3411
	        AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
3412
  [
3413
    case $enableval in
3414
      yes)
3415
        kde_use_debug_code="yes"
3416
        kde_use_debug_define=no
3417
        ;;
3418
      full)
3419
        kde_use_debug_code="full"
3420
        kde_use_debug_define=no
3421
        ;;
3422
      *)
3423
        kde_use_debug_code="no"
3424
        kde_use_debug_define=yes
3425
        ;;
3426
    esac
3427
  ], 
3428
    [kde_use_debug_code="no"
3429
      kde_use_debug_define=no
3430
  ])
3431
 
3432
  dnl Just for configure --help
3433
  AC_ARG_ENABLE(dummyoption,
3434
	        AC_HELP_STRING([--disable-debug],
3435
	  		       [disables debug output and debug symbols [default=no]]),
3436
		[],[])
3437
 
3438
  AC_ARG_ENABLE(strict,
3439
		AC_HELP_STRING([--enable-strict],
3440
			      [compiles with strict compiler options (may not work!)]),
3441
   [
3442
    if test $enableval = "no"; then
3443
         kde_use_strict_options="no"
3444
       else
3445
         kde_use_strict_options="yes"
3446
    fi
3447
   ], [kde_use_strict_options="no"])
3448
 
3449
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
3450
   [
3451
    if test $enableval = "no"; then
3452
         kde_use_warnings="no"
3453
       else
3454
         kde_use_warnings="yes"
3455
    fi
3456
   ], [kde_use_warnings="yes"])
3457
 
3458
  dnl enable warnings for debug build
3459
  if test "$kde_use_debug_code" != "no"; then
3460
    kde_use_warnings=yes
3461
  fi
3462
 
3463
  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
3464
    [kde_use_profiling=$enableval],
3465
    [kde_use_profiling="no"]
3466
  )
3467
 
3468
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
3469
  CFLAGS=" $CFLAGS"
3470
 
3471
  AC_PROG_CC 
3472
 
3473
  AC_PROG_CPP
3474
 
3475
  if test "$GCC" = "yes"; then
3476
    if test "$kde_use_debug_code" != "no"; then
3477
      if test $kde_use_debug_code = "full"; then
3478
        CFLAGS="-g3 -fno-inline $CFLAGS"
3479
      else
3480
        CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS"
3481
      fi
3482
    else
3483
      CFLAGS="-O2 $CFLAGS"
3484
    fi
3485
  fi
3486
 
3487
  if test "$kde_use_debug_define" = "yes"; then
3488
    CFLAGS="-DNDEBUG $CFLAGS"
3489
  fi
3490
 
3491
 
3492
  case "$host" in
3493
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
3494
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
3495
  esac
3496
 
3497
  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
3498
     LDFLAGS=""
3499
  fi
3500
 
3501
  CXXFLAGS=" $CXXFLAGS"
3502
 
3503
  AC_PROG_CXX
3504
 
3505
  KDE_CHECK_FOR_BAD_COMPILER
3506
 
3507
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3508
    if test "$kde_use_debug_code" != "no"; then
3509
      if test "$CXX" = "KCC"; then
3510
        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3511
      else
3512
        if test "$kde_use_debug_code" = "full"; then
3513
          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
3514
        else
3515
          CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS"
3516
        fi
3517
      fi
3518
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
3519
 
3520
      dnl convenience compiler flags
3521
      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
3522
      AC_SUBST(WOVERLOADED_VIRTUAL)
3523
    else
3524
      if test "$CXX" = "KCC"; then
3525
        CXXFLAGS="+K3 $CXXFLAGS"
3526
      else
3527
        CXXFLAGS="-O2 $CXXFLAGS"
3528
      fi
3529
    fi
3530
  fi
3531
 
3532
  if test "$kde_use_debug_define" = "yes"; then
3533
    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
3534
  fi  
3535
 
3536
  if test "$kde_use_profiling" = "yes"; then
3537
    KDE_CHECK_COMPILER_FLAG(pg,
3538
    [
3539
      CFLAGS="-pg $CFLAGS"
3540
      CXXFLAGS="-pg $CXXFLAGS"
3541
    ])
3542
  fi
3543
 
3544
  if test "$kde_use_warnings" = "yes"; then
3545
      if test "$GCC" = "yes"; then
3546
        CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
3547
        case $host in
3548
          *-*-linux-gnu)	
3549
            CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3550
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
3551
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3552
            KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
3553
          ;;
3554
        esac
3555
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3556
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3557
        dnl ### FIXME: revert for KDE 4
3558
        KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
3559
     fi
3560
  fi
3561
 
3562
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
3563
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3564
  fi
3565
 
3566
  AC_ARG_ENABLE(pch,
3567
     AC_HELP_STRING([--enable-pch],
3568
                    [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3569
    [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3570
 
3571
  HAVE_GCC_VISIBILITY=0
3572
  AC_SUBST([HAVE_GCC_VISIBILITY])
3573
 
3574
  if test "$GXX" = "yes"; then
3575
    gcc_no_reorder_blocks=NO
3576
    KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES])
3577
    if test $kde_use_debug_code != "no" && \
3578
       test $kde_use_debug_code != "full" && \
3579
       test "YES" = "$gcc_no_reorder_blocks" ; then
3580
          CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
3581
          CFLAGS="$CFLAGS -fno-reorder-blocks"
3582
    fi
3583
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3584
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3585
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3586
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
3587
    ENABLE_PERMISSIVE_FLAG="-fpermissive"
3588
 
3589
    if test "$kde_use_pch" = "yes"; then
3590
        AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3591
        echo >conftest.h
3592
        if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3593
            kde_gcc_supports_pch=yes
3594
            AC_MSG_RESULT(yes)
3595
        else
3596
            kde_gcc_supports_pch=no
3597
            AC_MSG_RESULT(no)
3598
        fi
3599
        if test "$kde_gcc_supports_pch" = "yes"; then
3600
            AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3601
            if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3602
                kde_gcc_supports_pch=yes
3603
                AC_MSG_RESULT(yes)
3604
            else
3605
                kde_gcc_supports_pch=no
3606
                AC_MSG_RESULT(no)
3607
            fi
3608
        fi
3609
        rm -f conftest.h conftest.h.gch
3610
    fi
3611
 
3612
    KDE_CHECK_FOR_OPT_NOINLINE_MATCH
3613
    if test "x$kde_cv_opt_noinline_match" = "xno" ; then
3614
       CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`"
3615
    fi
3616
  fi
3617
  AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3618
  if test "$CXX" = "KCC"; then
3619
    dnl unfortunately we currently cannot disable exception support in KCC
3620
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3621
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3622
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
3623
 
3624
    if test "$kde_use_pch" = "yes"; then
3625
      dnl TODO: support --pch-dir!
3626
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3627
      dnl the below works (but the dir must exist), but it's
3628
      dnl useless for a whole package.
3629
      dnl The are precompiled headers for each source file, so when compiling
3630
      dnl from scratch, it doesn't make a difference, and they take up
3631
      dnl around ~5Mb _per_ sourcefile.
3632
      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3633
      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3634
    fi
3635
    dnl this flag controls inlining. by default KCC inlines in optimisation mode
3636
    dnl all implementations that are defined inside the class {} declaration. 
3637
    dnl because of templates-compatibility with broken gcc compilers, this
3638
    dnl can cause excessive inlining. This flag limits it to a sane level
3639
    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3640
    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3641
    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3642
    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3643
    dnl Some source files are shared between multiple executables
3644
    dnl (or libraries) and some of those need template instantiations.
3645
    dnl In that case KCC needs to compile those sources with
3646
    dnl --one_instantiation_per_object.  To make it easy for us we compile
3647
    dnl _all_ objects with that flag (--one_per is a shorthand).
3648
    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3649
  fi
3650
  AC_SUBST(USE_EXCEPTIONS)
3651
  dnl obsolete macro - provided to keep things going
3652
  USE_RTTI=
3653
  AC_SUBST(USE_RTTI)
3654
 
3655
  case "$host" in
3656
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3657
      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3658
      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3659
      *-*-solaris*) 
3660
        if test "$GXX" = yes; then
3661
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
3662
          if test ! -f $libstdcpp; then
3663
             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])
3664
          fi
3665
        fi
3666
        ;;
3667
  esac
3668
 
3669
  AC_VALIDIFY_CXXFLAGS
3670
 
3671
  AC_PROG_CXXCPP
3672
 
3673
  if test "$GCC" = yes; then
3674
     NOOPT_CFLAGS=-O0
3675
  fi
3676
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3677
 
3678
  AC_ARG_ENABLE(coverage,
3679
    AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3680
      if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3681
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3682
        ac_coverage_linker="-lgcc"
3683
      elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3684
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3685
        ac_coverage_linker=""
3686
      else
3687
        AC_MSG_ERROR([coverage with your compiler is not supported])
3688
      fi
3689
      CFLAGS="$CFLAGS $ac_coverage_compiler"
3690
      CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3691
      LDFLAGS="$LDFLAGS $ac_coverage_linker"
3692
    ])
3693
 
3694
  AC_SUBST(NOOPT_CXXFLAGS)
3695
  AC_SUBST(NOOPT_CFLAGS)
3696
  AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3697
 
3698
  KDE_CHECK_NEW_LDFLAGS
3699
  KDE_CHECK_FINAL
3700
  KDE_CHECK_CLOSURE
3701
  KDE_CHECK_NMCHECK
3702
 
3703
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3704
])
3705
m4trace:acinclude.m4:3357: -1- AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG], [
3706
    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
3707
      [
3708
        AC_LANG_SAVE
3709
        AC_LANG_CPLUSPLUS
3710
 
3711
        safe_CXXFLAGS=$CXXFLAGS
3712
        safe_LDFLAGS=$LDFLAGS
3713
        CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
3714
        LDFLAGS="$LDFLAGS -shared -fPIC"
3715
 
3716
        AC_TRY_LINK(
3717
        [
3718
          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
3719
	  #include <string>
3720
          int some_function( void ) __attribute__ ((visibility("default")));
3721
          int some_function( void )
3722
          {
3723
	    std::string s("blafasel");
3724
            return 0;
3725
          }
3726
        ], [/* elvis is alive */],
3727
        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
3728
 
3729
        CXXFLAGS=$safe_CXXFLAGS
3730
        LDFLAGS=$safe_LDFLAGS
3731
        AC_LANG_RESTORE
3732
      ]
3733
    )
3734
 
3735
    if test x$kde_cv_val_gcc_visibility_bug = xno; then
3736
      CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
3737
    fi
3738
 
3739
])
3740
m4trace:acinclude.m4:3394: -1- AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY], [
3741
  AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
3742
 
3743
  AC_MSG_CHECKING([grepping for visibility push/pop in headers])
3744
 
3745
  if test "x$GXX" = "xyes"; then
3746
    AC_LANG_SAVE
3747
    AC_LANG_CPLUSPLUS
3748
    AC_EGREP_CPP(
3749
       [GCC visibility push],
3750
       [ #include <exception> 
3751
       ], 
3752
    [
3753
      AC_MSG_RESULT(yes)
3754
      kde_stdc_visibility_patched=yes ],
3755
    [ 
3756
      AC_MSG_RESULT(no)
3757
      AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for 
3758
                   visibility support. Disabling -fvisibility=hidden])
3759
 
3760
      kde_stdc_visibility_patched=no ])
3761
 
3762
    AC_LANG_RESTORE
3763
 
3764
    kde_have_gcc_visibility=no
3765
    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
3766
    [
3767
      kde_have_gcc_visibility=yes
3768
      dnl the whole toolchain is just a mess, gcc is just too buggy
3769
      dnl to handle STL with visibility enabled. Lets reconsider 
3770
      dnl when gcc 4.2 is out or when things get fixed in the compiler.
3771
      dnl Contact mueller@kde.org for details.
3772
      AC_ARG_ENABLE(gcc-hidden-visibility,
3773
        AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
3774
          [kde_have_gcc_visibility=$enableval],
3775
          [kde_have_gcc_visibility=no])
3776
 
3777
      AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
3778
        [
3779
          AC_LANG_SAVE
3780
          AC_LANG_CPLUSPLUS
3781
 
3782
          safe_CXXFLAGS=$CXXFLAGS
3783
          CXXFLAGS="$CXXFLAGS $all_includes"
3784
 
3785
          AC_TRY_COMPILE(
3786
          [
3787
#include <qglobal.h>
3788
#if Q_EXPORT - 0 != 0
3789
/* if this compiles, then Q_EXPORT is undefined */
3790
/* if Q_EXPORT is nonempty, this will break compilation */
3791
#endif
3792
          ], [/* elvis is alive */],
3793
          kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
3794
 
3795
          CXXFLAGS=$safe_CXXFLAGS
3796
          AC_LANG_RESTORE
3797
        ]
3798
      )
3799
 
3800
      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
3801
        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
3802
        KDE_CHECK_VISIBILITY_GCC_BUG
3803
        HAVE_GCC_VISIBILITY=1
3804
        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3805
      fi
3806
    ])
3807
  fi
3808
])
3809
m4trace:acinclude.m4:3465: -1- AC_DEFUN([KDE_ADD_DEPENDENCIES], [
3810
   [A]M_DEPENDENCIES(CC)
3811
   [A]M_DEPENDENCIES(CXX)
3812
])
3813
m4trace:acinclude.m4:3472: -1- AC_DEFUN([KDE_PROG_LIBTOOL], [
3814
AC_REQUIRE([AC_CHECK_COMPILERS])
3815
AC_REQUIRE([AC_ENABLE_SHARED])
3816
AC_REQUIRE([AC_ENABLE_STATIC])
3817
 
3818
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3819
AC_REQUIRE([KDE_CHECK_LIB64])
3820
 
3821
AC_OBJEXT
3822
AC_EXEEXT
3823
 
3824
AM_PROG_LIBTOOL
3825
AC_LIBTOOL_CXX
3826
 
3827
LIBTOOL_SHELL="/bin/sh ./libtool"
3828
#  LIBTOOL="$LIBTOOL --silent"
3829
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3830
AC_SUBST(KDE_PLUGIN)
3831
 
3832
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
3833
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
3834
AC_SUBST(KDE_CHECK_PLUGIN)
3835
 
3836
# we patch configure quite some so we better keep that consistent for incremental runs 
3837
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3838
])
3839
m4trace:acinclude.m4:3500: -1- AC_DEFUN([KDE_CHECK_LIB64], [
3840
    AC_ARG_ENABLE(libsuffix,
3841
        AC_HELP_STRING([--enable-libsuffix],
3842
            [/lib directory suffix (64,32,none,auto[=default])]),
3843
            kdelibsuff=$enableval, kdelibsuff="auto")
3844
 
3845
    if test "$kdelibsuff" = "auto"; then
3846
 
3847
cat > conftest.c << EOF
3848
#include <stdio.h>
3849
int main() {
3850
 return 0;
3851
}
3852
EOF
3853
        kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
3854
    s,.*/lib\([[^\/]]*\)/.*,\1, 
3855
    p 
3856
}'`
3857
	rm -rf conftest.*
3858
    fi	
3859
 
3860
    if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
3861
       kdelibsuff=
3862
    fi
3863
    if test -z "$kdelibsuff"; then
3864
        AC_MSG_RESULT([not using lib directory suffix])
3865
        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3866
    else
3867
        if test "$libdir" = '${exec_prefix}/lib'; then
3868
            libdir="$libdir${kdelibsuff}"
3869
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
3870
        fi
3871
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3872
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3873
    fi
3874
])
3875
m4trace:acinclude.m4:3538: -1- AC_DEFUN([KDE_CHECK_TYPES], [  AC_CHECK_SIZEOF(int, 4)dnl
3876
   AC_CHECK_SIZEOF(short)dnl
3877
  AC_CHECK_SIZEOF(long, 4)dnl
3878
  AC_CHECK_SIZEOF(char *, 4)dnl
3879
])
3880
m4trace:acinclude.m4:3546: -1- AC_DEFUN([KDE_DO_IT_ALL], [
3881
AC_CANONICAL_SYSTEM
3882
AC_ARG_PROGRAM
3883
AM_INIT_AUTOMAKE($1, $2)
3884
AM_DISABLE_LIBRARIES
3885
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3886
AC_CHECK_COMPILERS
3887
KDE_PROG_LIBTOOL
3888
AM_KDE_WITH_NLS
3889
AC_PATH_KDE
3890
])
3891
m4trace:acinclude.m4:3559: -1- AC_DEFUN([AC_CHECK_RPATH], [
3892
AC_MSG_CHECKING(for rpath)
3893
AC_ARG_ENABLE(rpath,
3894
      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3895
      USE_RPATH=$enableval, USE_RPATH=yes)
3896
 
3897
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3898
 
3899
  KDE_RPATH="-R \$(libdir)"
3900
 
3901
  if test "$kde_libraries" != "$libdir"; then
3902
      KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3903
  fi
3904
 
3905
  if test -n "$qt_libraries"; then
3906
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3907
  fi
3908
  dnl $x_libraries is set to /usr/lib in case
3909
  if test -n "$X_LDFLAGS"; then
3910
    X_RPATH="-R \$(x_libraries)"
3911
    KDE_RPATH="$KDE_RPATH $X_RPATH"
3912
  fi
3913
  if test -n "$KDE_EXTRA_RPATH"; then
3914
    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3915
  fi
3916
fi
3917
AC_SUBST(KDE_EXTRA_RPATH)
3918
AC_SUBST(KDE_RPATH)
3919
AC_SUBST(X_RPATH)
3920
AC_MSG_RESULT($USE_RPATH)
3921
])
3922
m4trace:acinclude.m4:3593: -1- AC_DEFUN([AC_CHECK_SOCKLEN_T], [
3923
   AC_MSG_CHECKING(for socklen_t)
3924
   AC_CACHE_VAL(kde_cv_socklen_t,
3925
   [
3926
      AC_LANG_PUSH(C++)
3927
      kde_cv_socklen_t=no
3928
      AC_TRY_COMPILE([
3929
         #include <sys/types.h>
3930
         #include <sys/socket.h>
3931
      ],
3932
      [
3933
         socklen_t len;
3934
         getpeername(0,0,&len);
3935
      ],
3936
      [
3937
         kde_cv_socklen_t=yes
3938
         kde_cv_socklen_t_equiv=socklen_t
3939
      ])
3940
      AC_LANG_POP(C++)
3941
   ])
3942
   AC_MSG_RESULT($kde_cv_socklen_t)
3943
   if test $kde_cv_socklen_t = no; then
3944
      AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3945
      AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3946
      [
3947
         kde_cv_socklen_t_equiv=int
3948
         AC_LANG_PUSH(C++)
3949
         for t in int size_t unsigned long "unsigned long"; do
3950
            AC_TRY_COMPILE([
3951
               #include <sys/types.h>
3952
               #include <sys/socket.h>
3953
            ],
3954
            [
3955
               $t len;
3956
               getpeername(0,0,&len);
3957
            ],
3958
            [
3959
               kde_cv_socklen_t_equiv="$t"
3960
               break
3961
            ])
3962
         done
3963
         AC_LANG_POP(C++)
3964
      ])
3965
      AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3966
   fi
3967
   AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3968
                     [type to use in place of socklen_t if not defined])
3969
   AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3970
                     [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3971
])
3972
m4trace:acinclude.m4:3661: -1- AC_DEFUN([AM_KDE_WITH_NLS], [
3973
    dnl If we use NLS figure out what method
3974
 
3975
    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3976
        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3977
    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3978
 
3979
     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3980
        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3981
        GMSGFMT=":"
3982
      fi
3983
      MSGFMT=$GMSGFMT
3984
      AC_SUBST(GMSGFMT)
3985
      AC_SUBST(MSGFMT)
3986
 
3987
      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3988
	[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3989
 
3990
      dnl Test whether we really found GNU xgettext.
3991
      if test "$XGETTEXT" != ":"; then
3992
	dnl If it is no GNU xgettext we define it as : so that the
3993
	dnl Makefiles still can work.
3994
	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3995
	  : ;
3996
	else
3997
	  AC_MSG_RESULT(
3998
	    [found xgettext programs is not GNU xgettext; ignore it])
3999
	  XGETTEXT=":"
4000
	fi
4001
      fi
4002
     AC_SUBST(XGETTEXT)
4003
 
4004
  ])
4005
m4trace:acinclude.m4:3704: -1- AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE], [# Extract the first word of "$2", so it can be a program name with args.
4006
set dummy $2; ac_word=[$]2
4007
AC_MSG_CHECKING([for $ac_word])
4008
AC_CACHE_VAL(ac_cv_path_$1,
4009
[case "[$]$1" in
4010
  /*)
4011
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
4012
  ;;
4013
  *)
4014
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4015
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
4016
    test -z "$ac_dir" && ac_dir=.
4017
    if test -f $ac_dir/$ac_word; then
4018
      if [$3]; then
4019
	ac_cv_path_$1="$ac_dir/$ac_word"
4020
	break
4021
      fi
4022
    fi
4023
  done
4024
  IFS="$ac_save_ifs"
4025
dnl If no 4th arg is given, leave the cache variable unset,
4026
dnl so AC_PATH_PROGS will keep looking.
4027
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
4028
])dnl
4029
  ;;
4030
esac])dnl
4031
$1="$ac_cv_path_$1"
4032
if test -n "[$]$1"; then
4033
  AC_MSG_RESULT([$]$1)
4034
else
4035
  AC_MSG_RESULT(no)
4036
fi
4037
AC_SUBST($1)dnl
4038
])
4039
m4trace:acinclude.m4:3746: -1- AC_DEFUN([AM_LC_MESSAGES], [if test $ac_cv_header_locale_h = yes; then
4040
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
4041
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
4042
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
4043
    if test $am_cv_val_LC_MESSAGES = yes; then
4044
      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
4045
    fi
4046
  fi])
4047
m4trace:acinclude.m4:3759: -1- AC_DEFUN([AM_FUNC_OBSTACK], [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
4048
 [AC_TRY_LINK([#include "obstack.h"],
4049
	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
4050
	      am_cv_func_obstack=yes,
4051
	      am_cv_func_obstack=no)])
4052
 if test $am_cv_func_obstack = yes; then
4053
   AC_DEFINE(HAVE_OBSTACK)
4054
 else
4055
   LIBOBJS="$LIBOBJS obstack.o"
4056
 fi
4057
])
4058
m4trace:acinclude.m4:3775: -1- AC_DEFUN([AM_FUNC_ERROR_AT_LINE], [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
4059
 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
4060
              am_cv_lib_error_at_line=yes,
4061
	      am_cv_lib_error_at_line=no)])
4062
 if test $am_cv_lib_error_at_line = no; then
4063
   LIBOBJS="$LIBOBJS error.o"
4064
 fi
4065
 AC_SUBST(LIBOBJS)dnl
4066
])
4067
m4trace:acinclude.m4:3792: -1- AC_DEFUN([AM_KDE_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
4068
   AC_REQUIRE([AC_PROG_RANLIB])dnl
4069
   AC_REQUIRE([AC_HEADER_STDC])dnl
4070
   AC_REQUIRE([AC_TYPE_OFF_T])dnl
4071
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
4072
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
4073
   AC_REQUIRE([AC_FUNC_MMAP])dnl
4074
   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
4075
   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
4076
   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
4077
__argz_count __argz_stringify __argz_next])
4078
 
4079
   AC_MSG_CHECKING(for stpcpy)
4080
   AC_CACHE_VAL(kde_cv_func_stpcpy,
4081
   [
4082
   kde_safe_cxxflags=$CXXFLAGS
4083
   CXXFLAGS="-Werror"
4084
   AC_LANG_SAVE
4085
   AC_LANG_CPLUSPLUS
4086
   AC_TRY_COMPILE([
4087
   #include <string.h>
4088
   ],
4089
   [
4090
   char buffer[200];
4091
   stpcpy(buffer, buffer);
4092
   ],
4093
   kde_cv_func_stpcpy=yes,
4094
   kde_cv_func_stpcpy=no)
4095
   AC_LANG_RESTORE
4096
   CXXFLAGS=$kde_safe_cxxflags
4097
   ])
4098
   AC_MSG_RESULT($kde_cv_func_stpcpy)
4099
   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
4100
     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
4101
   fi
4102
 
4103
   AM_LC_MESSAGES
4104
 
4105
   if test "x$CATOBJEXT" != "x"; then
4106
     if test "x$ALL_LINGUAS" = "x"; then
4107
       LINGUAS=
4108
     else
4109
       AC_MSG_CHECKING(for catalogs to be installed)
4110
       NEW_LINGUAS=
4111
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
4112
         case "$ALL_LINGUAS" in
4113
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4114
         esac
4115
       done
4116
       LINGUAS=$NEW_LINGUAS
4117
       AC_MSG_RESULT($LINGUAS)
4118
     fi
4119
 
4120
     dnl Construct list of names of catalog files to be constructed.
4121
     if test -n "$LINGUAS"; then
4122
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4123
     fi
4124
   fi
4125
 
4126
  ])
4127
m4trace:acinclude.m4:3854: -1- AC_DEFUN([AC_HAVE_XPM], [AC_REQUIRE_CPP()dnl
4128
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4129
 
4130
 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
4131
 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
4132
 
4133
 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
4134
	xpm_test=$withval, xpm_test="yes")
4135
 if test "x$xpm_test" = xno; then
4136
   ac_cv_have_xpm=no
4137
 else
4138
   AC_MSG_CHECKING(for XPM)
4139
   AC_CACHE_VAL(ac_cv_have_xpm,
4140
   [
4141
    ac_save_ldflags="$LDFLAGS"
4142
    ac_save_cflags="$CFLAGS"
4143
    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
4144
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
4145
    else
4146
      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
4147
    fi
4148
    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
4149
    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
4150
    AC_TRY_LINK([#include <X11/xpm.h>],[],
4151
	ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
4152
    LDFLAGS="$ac_save_ldflags"
4153
    CFLAGS="$ac_save_cflags"
4154
   ])dnl
4155
 
4156
  if test "$ac_cv_have_xpm" = no; then
4157
    AC_MSG_RESULT(no)
4158
    XPM_LDFLAGS=""
4159
    XPMINC=""
4160
    $2
4161
  else
4162
    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
4163
    if test "$XPM_LDFLAGS" = ""; then
4164
       XPMLIB='-lXpm $(LIB_X11)'
4165
    else
4166
       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
4167
    fi
4168
    if test "$XPM_INCLUDE" = ""; then
4169
       XPMINC=""
4170
    else
4171
       XPMINC="-I$XPM_INCLUDE"
4172
    fi
4173
    AC_MSG_RESULT(yes)
4174
    $1
4175
  fi
4176
 fi
4177
 AC_SUBST(XPMINC)
4178
 AC_SUBST(XPMLIB)
4179
])
4180
m4trace:acinclude.m4:3909: -1- AC_DEFUN([AC_HAVE_DPMS], [AC_REQUIRE_CPP()dnl
4181
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4182
 
4183
 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
4184
 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
4185
 DPMS_LIB=
4186
 
4187
 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
4188
	dpms_test=$withval, dpms_test="yes")
4189
 if test "x$dpms_test" = xno; then
4190
   ac_cv_have_dpms=no
4191
 else
4192
   AC_MSG_CHECKING(for DPMS)
4193
   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
4194
   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
4195
   AC_CACHE_VAL(ac_cv_have_dpms,
4196
   [
4197
    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
4198
      AC_MSG_RESULT(no)
4199
      ac_cv_have_dpms="no"
4200
    else
4201
      ac_save_ldflags="$LDFLAGS"
4202
      ac_save_cflags="$CFLAGS"
4203
      ac_save_libs="$LIBS"
4204
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
4205
      LIBS="-lX11 -lXext $LIBSOCKET"
4206
      CFLAGS="$CFLAGS $X_INCLUDES"
4207
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
4208
      AC_TRY_LINK([
4209
	  #include <X11/Xproto.h>
4210
	  #include <X11/X.h>
4211
	  #include <X11/Xlib.h>
4212
	  #include <X11/extensions/dpms.h>
4213
	  int foo_test_dpms()
4214
	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
4215
	  ac_cv_have_dpms="yes", [
4216
              LIBS="-lXdpms $LIBS"
4217
              AC_TRY_LINK([
4218
	          #include <X11/Xproto.h>
4219
        	  #include <X11/X.h>
4220
        	  #include <X11/Xlib.h>
4221
        	  #include <X11/extensions/dpms.h>
4222
        	  int foo_test_dpms()
4223
        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
4224
        	  [
4225
                  ac_cv_have_dpms="-lXdpms"
4226
                  ],ac_cv_have_dpms="no")
4227
              ])
4228
      LDFLAGS="$ac_save_ldflags"
4229
      CFLAGS="$ac_save_cflags"
4230
      LIBS="$ac_save_libs"
4231
    fi
4232
   ])dnl
4233
 
4234
  if test "$ac_cv_have_dpms" = no; then
4235
    AC_MSG_RESULT(no)
4236
    DPMS_LDFLAGS=""
4237
    DPMSINC=""
4238
    $2
4239
  else
4240
    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
4241
    if test "$ac_cv_have_dpms" = "-lXdpms"; then
4242
       DPMS_LIB="-lXdpms"
4243
    fi
4244
    if test "$DPMS_LDFLAGS" = ""; then
4245
       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
4246
    else
4247
       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
4248
    fi
4249
    if test "$DPMS_INCLUDE" = ""; then
4250
       DPMSINC=""
4251
    else
4252
       DPMSINC="-I$DPMS_INCLUDE"
4253
    fi
4254
    AC_MSG_RESULT(yes)
4255
    $1
4256
  fi
4257
 fi
4258
 ac_save_cflags="$CFLAGS"
4259
 CFLAGS="$CFLAGS $X_INCLUDES"
4260
 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
4261
 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
4262
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
4263
 AC_CHECK_DECL(DPMSCapable,
4264
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
4265
   [#include <X11/Xlib.h>
4266
   #include <X11/extensions/dpms.h>])
4267
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
4268
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
4269
 AC_CHECK_DECL(DPMSInfo,
4270
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
4271
   [#include <X11/Xlib.h>
4272
   #include <X11/extensions/dpms.h>])
4273
 CFLAGS="$ac_save_cflags"
4274
 AC_SUBST(DPMSINC)
4275
 AC_SUBST(DPMSLIB)
4276
])
4277
m4trace:acinclude.m4:4008: -1- AC_DEFUN([AC_HAVE_GL], [AC_REQUIRE_CPP()dnl
4278
  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4279
 
4280
 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
4281
 test -z "$GL_INCLUDE" && GL_INCLUDE=
4282
 
4283
 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
4284
	gl_test=$withval, gl_test="yes")
4285
 if test "x$kde_use_qt_emb" = "xyes"; then
4286
   # GL and Qt Embedded is a no-go for now.
4287
   ac_cv_have_gl=no
4288
 elif test "x$gl_test" = xno; then
4289
   ac_cv_have_gl=no
4290
 else
4291
   AC_MSG_CHECKING(for GL)
4292
   AC_CACHE_VAL(ac_cv_have_gl,
4293
   [
4294
    AC_LANG_SAVE
4295
    AC_LANG_CPLUSPLUS
4296
    ac_save_ldflags=$LDFLAGS
4297
    ac_save_cxxflags=$CXXFLAGS
4298
    ac_save_libs=$LIBS
4299
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
4300
    LIBS="$LIBS -lGL -lGLU"
4301
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
4302
    LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
4303
    CXXFLAGS="$CFLAGS $X_INCLUDES"
4304
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
4305
    AC_TRY_LINK([#include <GL/gl.h>
4306
#include <GL/glu.h>
4307
], [],
4308
	ac_cv_have_gl="yes", ac_cv_have_gl="no")
4309
    AC_LANG_RESTORE
4310
    LDFLAGS=$ac_save_ldflags
4311
    CXXFLAGS=$ac_save_cxxflags
4312
    LIBS=$ac_save_libs
4313
   ])dnl
4314
 
4315
  if test "$ac_cv_have_gl" = "no"; then
4316
    AC_MSG_RESULT(no)
4317
    GL_LDFLAGS=""
4318
    GLINC=""
4319
    $2
4320
  else
4321
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
4322
    if test "$GL_LDFLAGS" = ""; then
4323
       GLLIB='-lGLU -lGL $(LIB_X11)'
4324
    else
4325
       GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
4326
    fi
4327
    if test "$GL_INCLUDE" = ""; then
4328
       GLINC=""
4329
    else
4330
       GLINC="-I$GL_INCLUDE"
4331
    fi
4332
    AC_MSG_RESULT($ac_cv_have_gl)
4333
    $1
4334
  fi
4335
 fi
4336
 AC_SUBST(GLINC)
4337
 AC_SUBST(GLLIB)
4338
])
4339
m4trace:acinclude.m4:4075: -1- AC_DEFUN([KDE_PAM], [
4340
  AC_REQUIRE([KDE_CHECK_LIBDL])
4341
 
4342
  want_pam=
4343
  AC_ARG_WITH(pam,
4344
    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
4345
    [ if test "x$withval" = "xyes"; then
4346
        want_pam=yes
4347
        pam_service=kde
4348
      elif test "x$withval" = "xno"; then
4349
        want_pam=no
4350
      else
4351
        want_pam=yes
4352
        pam_service=$withval
4353
      fi
4354
    ], [ pam_service=kde ])
4355
 
4356
  use_pam=
4357
  PAMLIBS=
4358
  if test "x$want_pam" != xno; then
4359
    AC_CHECK_LIB(pam, pam_start, [
4360
      AC_CHECK_HEADER(security/pam_appl.h,
4361
        [ pam_header=security/pam_appl.h ],
4362
        [ AC_CHECK_HEADER(pam/pam_appl.h,
4363
            [ pam_header=pam/pam_appl.h ],
4364
            [
4365
    AC_MSG_WARN([PAM detected, but no headers found!
4366
Make sure you have the necessary development packages installed.])
4367
            ]
4368
          )
4369
        ]
4370
      )
4371
    ], , $LIBDL)
4372
    if test -z "$pam_header"; then
4373
      if test "x$want_pam" = xyes; then
4374
        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
4375
      fi
4376
    else
4377
      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
4378
      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
4379
      use_pam=yes
4380
 
4381
      dnl darwin claims to be something special
4382
      if test "$pam_header" = "pam/pam_appl.h"; then
4383
        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
4384
      fi
4385
 
4386
      dnl test whether struct pam_message is const (Linux) or not (Sun)
4387
      AC_MSG_CHECKING(for const pam_message)
4388
      AC_EGREP_HEADER([struct pam_message], $pam_header,
4389
        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
4390
                          [AC_MSG_RESULT([const: Linux-type PAM])],
4391
                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
4392
                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
4393
                          )],
4394
        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
4395
    fi
4396
  fi
4397
 
4398
  AC_SUBST(PAMLIBS)
4399
])
4400
m4trace:acinclude.m4:4138: -1- AC_DEFUN([DEF_PAM_SERVICE], [
4401
  AC_ARG_WITH($1-pam,
4402
    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
4403
    [ if test "x$use_pam" = xyes; then
4404
        $3_PAM_SERVICE=$withval
4405
      else
4406
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
4407
You may want to enforce it by using --with-pam.])
4408
      fi
4409
    ], 
4410
    [ if test "x$use_pam" = xyes; then
4411
        $3_PAM_SERVICE="$pam_service"
4412
      fi
4413
    ])
4414
    if test -n "$$3_PAM_SERVICE"; then
4415
      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
4416
      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
4417
    fi
4418
    AC_SUBST($3_PAM_SERVICE)
4419
])
4420
m4trace:acinclude.m4:4159: -1- AC_DEFUN([KDE_SHADOWPASSWD], [
4421
  AC_REQUIRE([KDE_PAM])
4422
 
4423
  AC_CHECK_LIB(shadow, getspent,
4424
    [ LIBSHADOW="-lshadow"
4425
      ac_use_shadow=yes
4426
    ],
4427
    [ dnl for UnixWare
4428
      AC_CHECK_LIB(gen, getspent, 
4429
        [ LIBGEN="-lgen"
4430
          ac_use_shadow=yes
4431
        ], 
4432
        [ AC_CHECK_FUNC(getspent, 
4433
            [ ac_use_shadow=yes ],
4434
            [ ac_use_shadow=no ])
4435
	])
4436
    ])
4437
  AC_SUBST(LIBSHADOW)
4438
  AC_SUBST(LIBGEN)
4439
 
4440
  AC_MSG_CHECKING([for shadow passwords])
4441
 
4442
  AC_ARG_WITH(shadow,
4443
    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
4444
    [ if test "x$withval" != "xno"; then
4445
        use_shadow=yes
4446
      else
4447
        use_shadow=no
4448
      fi
4449
    ], [
4450
      use_shadow="$ac_use_shadow"
4451
    ])
4452
 
4453
  if test "x$use_shadow" = xyes; then
4454
    AC_MSG_RESULT(yes)
4455
    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
4456
  else
4457
    AC_MSG_RESULT(no)
4458
    LIBSHADOW=
4459
    LIBGEN=
4460
  fi
4461
 
4462
  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
4463
  dnl this still applies, if we could use it indirectly through pam.
4464
  if test "x$use_shadow" = xyes || 
4465
     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
4466
      case $host in
4467
      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
4468
	SETUIDFLAGS="-m 4755 -o root";;
4469
      *)
4470
	SETUIDFLAGS="-m 4755";;
4471
      esac
4472
  fi
4473
  AC_SUBST(SETUIDFLAGS)
4474
 
4475
])
4476
m4trace:acinclude.m4:4216: -1- AC_DEFUN([KDE_PASSWDLIBS], [
4477
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
4478
  AC_REQUIRE([KDE_PAM])
4479
  AC_REQUIRE([KDE_SHADOWPASSWD])
4480
 
4481
  if test "x$use_pam" = "xyes"; then 
4482
    PASSWDLIBS="$PAMLIBS"
4483
  else
4484
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
4485
  fi
4486
 
4487
  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
4488
  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
4489
  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
4490
  dnl may need to read /etc/master.passwd).
4491
  case $host in
4492
  *-*-freebsd*)
4493
    SETUIDFLAGS="-m 4755 -o root"
4494
    ;;
4495
  *)
4496
    ;;
4497
  esac
4498
 
4499
  AC_SUBST(PASSWDLIBS)
4500
])
4501
m4trace:acinclude.m4:4242: -1- AC_DEFUN([KDE_CHECK_LIBDL], [
4502
AC_CHECK_LIB(dl, dlopen, [
4503
LIBDL="-ldl"
4504
ac_cv_have_dlfcn=yes
4505
])
4506
 
4507
AC_CHECK_LIB(dld, shl_unload, [
4508
LIBDL="-ldld"
4509
ac_cv_have_shload=yes
4510
])
4511
 
4512
AC_SUBST(LIBDL)
4513
])
4514
m4trace:acinclude.m4:4257: -1- AC_DEFUN([KDE_CHECK_DLOPEN], [
4515
KDE_CHECK_LIBDL
4516
AC_CHECK_HEADERS(dlfcn.h dl.h)
4517
if test "$ac_cv_header_dlfcn_h" = "no"; then
4518
  ac_cv_have_dlfcn=no
4519
fi
4520
 
4521
if test "$ac_cv_header_dl_h" = "no"; then
4522
  ac_cv_have_shload=no
4523
fi
4524
 
4525
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4526
dnl (MM)
4527
AC_ARG_ENABLE(dlopen,
4528
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
4529
enable_dlopen=$enableval,
4530
enable_dlopen=yes)
4531
 
4532
# override the user's opinion, if we know it better ;)
4533
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
4534
  enable_dlopen=no
4535
fi
4536
 
4537
if test "$ac_cv_have_dlfcn" = "yes"; then
4538
  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
4539
fi
4540
 
4541
if test "$ac_cv_have_shload" = "yes"; then
4542
  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
4543
fi
4544
 
4545
if test "$enable_dlopen" = no ; then
4546
  test -n "$1" && eval $1
4547
else
4548
  test -n "$2" && eval $2
4549
fi
4550
 
4551
])
4552
m4trace:acinclude.m4:4297: -1- AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING], [
4553
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4554
KDE_PROG_LIBTOOL
4555
AC_MSG_CHECKING([dynamic loading])
4556
eval "`egrep '^build_libtool_libs=' libtool`"
4557
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
4558
  dynamic_loading=yes
4559
  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
4560
else
4561
  dynamic_loading=no
4562
fi
4563
AC_MSG_RESULT($dynamic_loading)
4564
if test "$dynamic_loading" = "yes"; then
4565
  $1
4566
else
4567
  $2
4568
fi
4569
])
4570
m4trace:acinclude.m4:4317: -1- AC_DEFUN([KDE_ADD_INCLUDES], [
4571
if test -z "$1"; then
4572
  test_include="Pix.h"
4573
else
4574
  test_include="$1"
4575
fi
4576
 
4577
AC_MSG_CHECKING([for libg++ ($test_include)])
4578
 
4579
AC_CACHE_VAL(kde_cv_libgpp_includes,
4580
[
4581
kde_cv_libgpp_includes=no
4582
 
4583
   for ac_dir in               \
4584
                               \
4585
     /usr/include/g++          \
4586
     /usr/include              \
4587
     /usr/unsupported/include  \
4588
     /opt/include              \
4589
     $extra_include            \
4590
     ; \
4591
   do
4592
     if test -r "$ac_dir/$test_include"; then
4593
       kde_cv_libgpp_includes=$ac_dir
4594
       break
4595
     fi
4596
   done
4597
])
4598
 
4599
AC_MSG_RESULT($kde_cv_libgpp_includes)
4600
if test "$kde_cv_libgpp_includes" != "no"; then
4601
  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
4602
fi
4603
])
4604
m4trace:acinclude.m4:4354: -1- AC_DEFUN([KDE_CHECK_LIBPTHREAD], [
4605
  dnl This code is here specifically to handle the
4606
  dnl various flavors of threading library on FreeBSD
4607
  dnl 4-, 5-, and 6-, and the (weird) rules around it.
4608
  dnl There may be an environment PTHREAD_LIBS that 
4609
  dnl specifies what to use; otherwise, search for it.
4610
  dnl -pthread is special cased and unsets LIBPTHREAD
4611
  dnl below if found.
4612
  LIBPTHREAD=""
4613
 
4614
  if test -n "$PTHREAD_LIBS"; then
4615
    if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4616
      LIBPTHREAD="PTHREAD"
4617
    else
4618
      PTHREAD_LIBS_save="$PTHREAD_LIBS"
4619
      PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4620
      AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4621
      KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4622
          LIBPTHREAD="$PTHREAD_LIBS_save"])
4623
      PTHREAD_LIBS="$PTHREAD_LIBS_save"
4624
    fi
4625
  fi
4626
 
4627
  dnl Is this test really needed, in the face of the Tru64 test below?
4628
  if test -z "$LIBPTHREAD"; then
4629
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4630
  fi
4631
 
4632
  dnl This is a special Tru64 check, see BR 76171 issue #18.
4633
  if test -z "$LIBPTHREAD" ; then
4634
    AC_MSG_CHECKING([for pthread_create in -lpthread])
4635
    kde_safe_libs=$LIBS
4636
    LIBS="$LIBS -lpthread"
4637
    AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4638
        AC_MSG_RESULT(yes)
4639
        LIBPTHREAD="-lpthread"],[
4640
	AC_MSG_RESULT(no)])
4641
    LIBS=$kde_safe_libs
4642
  fi
4643
 
4644
  dnl Un-special-case for FreeBSD.
4645
  if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4646
    LIBPTHREAD=""
4647
  fi
4648
 
4649
  AC_SUBST(LIBPTHREAD)
4650
])
4651
m4trace:acinclude.m4:4403: -1- AC_DEFUN([KDE_CHECK_PTHREAD_OPTION], [
4652
      USE_THREADS=""
4653
      if test -z "$LIBPTHREAD"; then
4654
        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
4655
      fi
4656
 
4657
    AH_VERBATIM(__svr_define, [
4658
#if defined(__SVR4) && !defined(__svr4__)
4659
#define __svr4__ 1
4660
#endif
4661
])
4662
    case $host_os in
4663
 	solaris*)
4664
		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4665
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4666
    		;;
4667
        freebsd*)
4668
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
4669
                ;;
4670
        aix*)
4671
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4672
                LIBPTHREAD="$LIBPTHREAD -lc_r"
4673
                ;;
4674
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4675
                if test "$CXX" = "KCC"; then
4676
                  CXXFLAGS="$CXXFLAGS --thread_safe"
4677
		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4678
                fi
4679
                ;;
4680
	*)
4681
		;;
4682
    esac
4683
    AC_SUBST(USE_THREADS)
4684
    AC_SUBST(LIBPTHREAD)
4685
])
4686
m4trace:acinclude.m4:4440: -1- AC_DEFUN([KDE_CHECK_THREADING], [
4687
  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4688
  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4689
  dnl default is yes if libpthread is found and no if no libpthread is available
4690
  if test -z "$LIBPTHREAD"; then
4691
    if test -z "$USE_THREADS"; then
4692
      kde_check_threading_default=no
4693
    else
4694
      kde_check_threading_default=yes
4695
    fi
4696
  else
4697
    kde_check_threading_default=yes
4698
  fi
4699
  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
4700
   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4701
  if test "x$kde_use_threading" = "xyes"; then
4702
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4703
  fi
4704
])
4705
m4trace:acinclude.m4:4461: -1- AC_DEFUN([KDE_TRY_LINK_PYTHON], [
4706
if test "$kde_python_link_found" = no; then
4707
 
4708
if test "$1" = normal; then
4709
  AC_MSG_CHECKING(if a Python application links)
4710
else
4711
  AC_MSG_CHECKING(if Python depends on $2)
4712
fi
4713
 
4714
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4715
[
4716
kde_save_cflags="$CFLAGS"
4717
CFLAGS="$CFLAGS $PYTHONINC"
4718
kde_save_libs="$LIBS"
4719
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4720
kde_save_ldflags="$LDFLAGS"
4721
LDFLAGS="$LDFLAGS $PYTHONLIB"
4722
 
4723
AC_TRY_LINK(
4724
[
4725
#include <Python.h>
4726
],[
4727
	PySys_SetArgv(1, 0);
4728
],
4729
	[kde_cv_try_link_python_$1=yes],
4730
	[kde_cv_try_link_python_$1=no]
4731
)
4732
CFLAGS="$kde_save_cflags"
4733
LIBS="$kde_save_libs"
4734
LDFLAGS="$kde_save_ldflags"
4735
])
4736
 
4737
if test "$kde_cv_try_link_python_$1" = "yes"; then
4738
  AC_MSG_RESULT(yes)
4739
  kde_python_link_found=yes
4740
  if test ! "$1" = normal; then
4741
    LIBPYTHON="$LIBPYTHON $2"
4742
  fi
4743
  $3
4744
else
4745
  AC_MSG_RESULT(no)
4746
  $4
4747
fi
4748
 
4749
fi
4750
 
4751
])
4752
m4trace:acinclude.m4:4510: -1- AC_DEFUN([KDE_CHECK_PYTHON_DIR], [
4753
AC_MSG_CHECKING([for Python directory])
4754
 
4755
AC_CACHE_VAL(kde_cv_pythondir,
4756
[
4757
  if test -z "$PYTHONDIR"; then
4758
    kde_cv_pythondir=/usr/local
4759
  else
4760
    kde_cv_pythondir="$PYTHONDIR"
4761
  fi
4762
])
4763
 
4764
AC_ARG_WITH(pythondir,
4765
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4766
[
4767
  ac_python_dir=$withval
4768
], ac_python_dir=$kde_cv_pythondir
4769
)
4770
 
4771
AC_MSG_RESULT($ac_python_dir)
4772
])
4773
m4trace:acinclude.m4:4533: -1- AC_DEFUN([KDE_CHECK_PYTHON_INTERN], [
4774
AC_REQUIRE([KDE_CHECK_LIBDL])
4775
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4776
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4777
 
4778
if test -z "$1"; then
4779
  version="1.5"
4780
else
4781
  version="$1"
4782
fi
4783
 
4784
AC_MSG_CHECKING([for Python$version])
4785
 
4786
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4787
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4788
if test ! -r $python_incdir/Python.h; then
4789
  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4790
  python_incdir=$python_incdir/python$version
4791
  if test ! -r $python_incdir/Python.h; then
4792
    python_incdir=no
4793
  fi
4794
fi
4795
 
4796
PYTHONINC=-I$python_incdir
4797
 
4798
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4799
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4800
if test ! -r $python_libdir/libpython$version.so; then
4801
  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4802
  if test ! -r $python_libdir/libpython$version.a; then
4803
    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4804
    python_libdir=$python_libdir/python$version/config
4805
    if test ! -r $python_libdir/libpython$version.a; then
4806
      python_libdir=no
4807
    fi
4808
  fi
4809
fi
4810
 
4811
PYTHONLIB=-L$python_libdir
4812
kde_orig_LIBPYTHON=$LIBPYTHON
4813
if test -z "$LIBPYTHON"; then
4814
  LIBPYTHON=-lpython$version
4815
fi
4816
 
4817
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4818
python_moddir=$python_moddir/python$version
4819
if test ! -r $python_moddir/copy.py; then
4820
  python_moddir=no
4821
fi
4822
 
4823
PYTHONMODDIR=$python_moddir
4824
 
4825
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4826
 
4827
if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
4828
   LIBPYTHON=$kde_orig_LIBPYTHON
4829
   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4830
   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4831
   $2
4832
else 
4833
  dnl Note: this test is very weak
4834
  kde_python_link_found=no
4835
  KDE_TRY_LINK_PYTHON(normal)
4836
  KDE_TRY_LINK_PYTHON(m, -lm)
4837
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4838
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4839
  KDE_TRY_LINK_PYTHON(db2, -ldb2)
4840
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4841
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4842
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4843
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4844
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4845
  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4846
  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4847
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4848
	[AC_MSG_WARN([it seems, Python depends on another library.
4849
    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4850
    and contact the authors to let them know about this problem])
4851
	])
4852
 
4853
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4854
  AC_SUBST(PYTHONINC)
4855
  AC_SUBST(PYTHONLIB)
4856
  AC_SUBST(LIBPYTHON)
4857
  AC_SUBST(PYTHONMODDIR)
4858
  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4859
fi
4860
 
4861
])
4862
m4trace:acinclude.m4:4625: -1- AC_DEFUN([KDE_CHECK_PYTHON], [
4863
  KDE_CHECK_PYTHON_INTERN("2.5",
4864
    [KDE_CHECK_PYTHON_INTERN("2.4",
4865
     [KDE_CHECK_PYTHON_INTERN("2.3", 
4866
       [KDE_CHECK_PYTHON_INTERN("2.2", 
4867
         [KDE_CHECK_PYTHON_INTERN("2.1", 
4868
           [KDE_CHECK_PYTHON_INTERN("2.0", 
4869
             [KDE_CHECK_PYTHON_INTERN($1, $2) ])
4870
           ])
4871
         ])
4872
       ])
4873
     ])
4874
  ])
4875
])
4876
m4trace:acinclude.m4:4641: -1- AC_DEFUN([KDE_CHECK_STL], [
4877
    AC_LANG_SAVE
4878
    AC_LANG_CPLUSPLUS
4879
    ac_save_CXXFLAGS="$CXXFLAGS"
4880
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4881
 
4882
    AC_MSG_CHECKING([if C++ programs can be compiled])
4883
    AC_CACHE_VAL(kde_cv_stl_works,
4884
    [
4885
      AC_TRY_COMPILE([
4886
#include <string>
4887
using namespace std;
4888
],[
4889
  string astring="Hallo Welt.";
4890
  astring.erase(0, 6); // now astring is "Welt"
4891
  return 0;
4892
], kde_cv_stl_works=yes,
4893
   kde_cv_stl_works=no)
4894
])
4895
 
4896
   AC_MSG_RESULT($kde_cv_stl_works)
4897
 
4898
   if test "$kde_cv_stl_works" = "yes"; then
4899
     # back compatible
4900
	 AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4901
   else
4902
	 AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4903
Check config.log for details - if you're using a Linux distribution you might miss
4904
a package named similar to libstdc++-dev.])
4905
   fi
4906
 
4907
   CXXFLAGS="$ac_save_CXXFLAGS"
4908
   AC_LANG_RESTORE
4909
])
4910
m4trace:acinclude.m4:4677: -1- AC_DEFUN([AC_FIND_QIMGIO], [AC_REQUIRE([AC_FIND_JPEG])
4911
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4912
AC_MSG_CHECKING([for qimgio])
4913
AC_CACHE_VAL(ac_cv_lib_qimgio,
4914
[
4915
AC_LANG_SAVE
4916
AC_LANG_CPLUSPLUS
4917
ac_save_LIBS="$LIBS"
4918
ac_save_CXXFLAGS="$CXXFLAGS"
4919
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4920
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4921
AC_TRY_RUN(dnl
4922
[
4923
#include <qimageio.h>
4924
#include <qstring.h>
4925
int main() {
4926
		QString t = "hallo";
4927
		t.fill('t');
4928
		qInitImageIO();
4929
}
4930
],
4931
            ac_cv_lib_qimgio=yes,
4932
            ac_cv_lib_qimgio=no,
4933
	    ac_cv_lib_qimgio=no)
4934
LIBS="$ac_save_LIBS"
4935
CXXFLAGS="$ac_save_CXXFLAGS"
4936
AC_LANG_RESTORE
4937
])dnl
4938
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4939
  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4940
  AC_MSG_RESULT(yes)
4941
  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4942
  AC_SUBST(LIBQIMGIO)
4943
else
4944
  AC_MSG_RESULT(not found)
4945
fi
4946
])
4947
m4trace:acinclude.m4:4716: -1- AC_DEFUN([AM_DISABLE_LIBRARIES], [
4948
    AC_PROVIDE([AM_ENABLE_STATIC])
4949
    AC_PROVIDE([AM_ENABLE_SHARED])
4950
    enable_static=no
4951
    enable_shared=yes
4952
])
4953
m4trace:acinclude.m4:4725: -1- AC_DEFUN([AC_CHECK_UTMP_FILE], [
4954
    AC_MSG_CHECKING([for utmp file])
4955
 
4956
    AC_CACHE_VAL(kde_cv_utmp_file,
4957
    [
4958
    kde_cv_utmp_file=no
4959
 
4960
    for ac_file in    \
4961
                      \
4962
	/var/run/utmp \
4963
	/var/adm/utmp \
4964
	/etc/utmp     \
4965
     ; \
4966
    do
4967
     if test -r "$ac_file"; then
4968
       kde_cv_utmp_file=$ac_file
4969
       break
4970
     fi
4971
    done
4972
    ])
4973
 
4974
    if test "$kde_cv_utmp_file" != "no"; then
4975
	AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4976
	$1
4977
	AC_MSG_RESULT($kde_cv_utmp_file)
4978
    else
4979
    	$2
4980
	AC_MSG_RESULT([non found])
4981
    fi
4982
])
4983
m4trace:acinclude.m4:4758: -1- AC_DEFUN([KDE_CREATE_SUBDIRSLIST], [
4984
 
4985
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4986
TOPSUBDIRS=""
4987
 
4988
if test ! -s $srcdir/subdirs; then
4989
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
4990
  files=`cd $srcdir && ls -1`
4991
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4992
  for i in $dirs; do
4993
    echo $i >> $srcdir/subdirs
4994
  done
4995
fi
4996
 
4997
ac_topsubdirs=
4998
if test -s $srcdir/inst-apps; then
4999
  ac_topsubdirs="`cat $srcdir/inst-apps`"
5000
elif test -s $srcdir/subdirs; then
5001
  ac_topsubdirs="`cat $srcdir/subdirs`"
5002
fi
5003
 
5004
for i in $ac_topsubdirs; do
5005
  AC_MSG_CHECKING([if $i should be compiled])
5006
  if test -d $srcdir/$i; then
5007
    install_it="yes"
5008
    for j in $DO_NOT_COMPILE; do
5009
      if test $i = $j; then
5010
        install_it="no"
5011
      fi
5012
    done
5013
  else
5014
    install_it="no"
5015
  fi
5016
  AC_MSG_RESULT($install_it)
5017
  vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
5018
  if test $install_it = "yes"; then
5019
    TOPSUBDIRS="$TOPSUBDIRS $i"
5020
    eval "$vari""_SUBDIR_included=yes"
5021
  else
5022
    eval "$vari""_SUBDIR_included=no"
5023
  fi
5024
done
5025
 
5026
AC_SUBST(TOPSUBDIRS)
5027
])
5028
m4trace:acinclude.m4:4805: -1- AC_DEFUN([KDE_CHECK_NAMESPACES], [
5029
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
5030
AC_LANG_SAVE
5031
AC_LANG_CPLUSPLUS
5032
AC_TRY_COMPILE([
5033
],
5034
[
5035
namespace Foo {
5036
  extern int i;
5037
  namespace Bar {
5038
    extern int i;
5039
  }
5040
}
5041
 
5042
int Foo::i = 0;
5043
int Foo::Bar::i = 1;
5044
],[
5045
  AC_MSG_RESULT(yes)
5046
  AC_DEFINE(HAVE_NAMESPACES)
5047
], [
5048
AC_MSG_RESULT(no)
5049
])
5050
AC_LANG_RESTORE
5051
])
5052
m4trace:acinclude.m4:4835: -1- AC_DEFUN([AC_CHECK_S_ISSOCK], [
5053
AC_MSG_CHECKING(for S_ISSOCK)
5054
AC_CACHE_VAL(ac_cv_have_s_issock,
5055
[
5056
AC_TRY_LINK(
5057
[
5058
#include <sys/stat.h>
5059
],
5060
[
5061
struct stat buff;
5062
int b = S_ISSOCK( buff.st_mode );
5063
],
5064
ac_cv_have_s_issock=yes,
5065
ac_cv_have_s_issock=no)
5066
])
5067
AC_MSG_RESULT($ac_cv_have_s_issock)
5068
if test "$ac_cv_have_s_issock" = "yes"; then
5069
  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
5070
fi
5071
 
5072
AH_VERBATIM(_ISSOCK,
5073
[
5074
#ifndef HAVE_S_ISSOCK
5075
#define HAVE_S_ISSOCK
5076
#define S_ISSOCK(mode) (1==0)
5077
#endif
5078
])
5079
 
5080
])
5081
m4trace:acinclude.m4:4870: -1- AC_DEFUN([AC_CHECK_KDEMAXPATHLEN], [
5082
AC_MSG_CHECKING(for MAXPATHLEN)
5083
AC_CACHE_VAL(ac_cv_maxpathlen,
5084
[
5085
cat > conftest.$ac_ext <<EOF
5086
#ifdef STDC_HEADERS
5087
# include <stdlib.h>
5088
#endif
5089
#include <stdio.h>
5090
#include <sys/param.h>
5091
#ifndef MAXPATHLEN
5092
#define MAXPATHLEN 1024
5093
#endif
5094
 
5095
KDE_HELLO MAXPATHLEN
5096
 
5097
EOF
5098
 
5099
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
5100
 
5101
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
5102
    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
5103
else
5104
    ac_cv_maxpathlen=1024
5105
fi
5106
 
5107
rm conftest.*
5108
 
5109
])
5110
AC_MSG_RESULT($ac_cv_maxpathlen)
5111
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
5112
])
5113
m4trace:acinclude.m4:4904: -1- AC_DEFUN([KDE_CHECK_HEADER], [
5114
   kde_safe_cppflags=$CPPFLAGS
5115
   CPPFLAGS="$CPPFLAGS $all_includes"
5116
   AC_LANG_SAVE
5117
   AC_LANG_CPLUSPLUS
5118
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
5119
   AC_LANG_RESTORE
5120
   CPPFLAGS=$kde_safe_cppflags
5121
])
5122
m4trace:acinclude.m4:4915: -1- AC_DEFUN([KDE_CHECK_HEADERS], [
5123
   AH_CHECK_HEADERS([$1])
5124
   AC_LANG_SAVE
5125
   kde_safe_cppflags=$CPPFLAGS
5126
   CPPFLAGS="$CPPFLAGS $all_includes"
5127
   AC_LANG_CPLUSPLUS
5128
   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
5129
   CPPFLAGS=$kde_safe_cppflags
5130
   AC_LANG_RESTORE
5131
])
5132
m4trace:acinclude.m4:4927: -1- AC_DEFUN([KDE_FAST_CONFIGURE], [
5133
  dnl makes configure fast (needs perl)
5134
  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
5135
      with_fast_perl=$enableval, with_fast_perl=yes)
5136
])
5137
m4trace:acinclude.m4:4934: -1- AC_DEFUN([KDE_CONF_FILES], [
5138
  val=
5139
  if test -f $srcdir/configure.files ; then
5140
    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
5141
  fi
5142
  CONF_FILES=
5143
  if test -n "$val" ; then
5144
    for i in $val ; do
5145
      CONF_FILES="$CONF_FILES $i"
5146
    done
5147
  fi
5148
  AC_SUBST(CONF_FILES)
5149
])
5150
m4trace:acinclude.m4:4952: -1- AC_DEFUN([KDE_SET_PREFIX_CORE], [
5151
  unset CDPATH
5152
  dnl make $KDEDIR the default for the installation
5153
  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
5154
 
5155
  if test "x$prefix" = "xNONE"; then
5156
    prefix=$ac_default_prefix
5157
    ac_configure_args="$ac_configure_args --prefix=$prefix"
5158
  fi
5159
  # And delete superfluous '/' to make compares easier
5160
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5161
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5162
 
5163
  kde_libs_prefix='$(prefix)'
5164
  kde_libs_htmldir='$(kde_htmldir)'
5165
  AC_SUBST(kde_libs_prefix)
5166
  AC_SUBST(kde_libs_htmldir)
5167
  KDE_FAST_CONFIGURE
5168
  KDE_CONF_FILES
5169
])
5170
m4trace:acinclude.m4:4975: -1- AC_DEFUN([KDE_SET_PREFIX], [
5171
  unset CDPATH
5172
  dnl We can't give real code to that macro, only a value.
5173
  dnl It only matters for --help, since we set the prefix in this function anyway.
5174
  AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
5175
 
5176
  KDE_SET_DEFAULT_BINDIRS
5177
  if test "x$prefix" = "xNONE"; then
5178
    dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
5179
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
5180
  else
5181
    dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
5182
    kde_save_PATH="$PATH"
5183
    PATH="$exec_prefix/bin:$prefix/bin:$PATH"
5184
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
5185
    PATH="$kde_save_PATH"
5186
  fi
5187
 
5188
  kde_libs_prefix=`$KDECONFIG --prefix`
5189
  if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
5190
       AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
5191
                    This means it has been moved since you installed it.
5192
                    This won't work. Please recompile kdelibs for the new prefix.
5193
                    ])
5194
  fi
5195
  kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
5196
 
5197
  AC_MSG_CHECKING([where to install])
5198
  if test "x$prefix" = "xNONE"; then
5199
    prefix=$kde_libs_prefix
5200
    AC_MSG_RESULT([$prefix (as returned by kde-config)])
5201
  else
5202
    dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
5203
    given_prefix=$prefix
5204
    AC_MSG_RESULT([$prefix (as requested)])
5205
  fi
5206
 
5207
  # And delete superfluous '/' to make compares easier
5208
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5209
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5210
  given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5211
 
5212
  AC_SUBST(KDECONFIG)
5213
  AC_SUBST(kde_libs_prefix)
5214
  AC_SUBST(kde_libs_htmldir)
5215
 
5216
  KDE_FAST_CONFIGURE
5217
  KDE_CONF_FILES
5218
])
5219
m4trace:acinclude.m4:5092: -1- AC_DEFUN([KDE_LANG_CPLUSPLUS], [AC_LANG_CPLUSPLUS
5220
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
5221
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
5222
])
5223
m4trace:acinclude.m4:5103: -1- AC_DEFUN([KDE_CHECK_LONG_LONG], [
5224
AC_MSG_CHECKING(for long long)
5225
AC_CACHE_VAL(kde_cv_c_long_long,
5226
[
5227
  AC_LANG_SAVE
5228
  AC_LANG_CPLUSPLUS
5229
  AC_TRY_LINK([], [
5230
  long long foo = 0;
5231
  foo = foo+1;
5232
  ],
5233
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
5234
  AC_LANG_RESTORE
5235
])
5236
AC_MSG_RESULT($kde_cv_c_long_long)
5237
if test "$kde_cv_c_long_long" = yes; then
5238
   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
5239
fi
5240
])
5241
m4trace:acinclude.m4:5123: -1- AC_DEFUN([KDE_CHECK_LIB], [
5242
     kde_save_LDFLAGS="$LDFLAGS"
5243
     dnl AC_CHECK_LIB modifies LIBS, so save it here
5244
     kde_save_LIBS="$LIBS"
5245
     LDFLAGS="$LDFLAGS $all_libraries"
5246
     case $host_os in
5247
      aix*) LDFLAGS="-brtl $LDFLAGS"
5248
	test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
5249
	;;
5250
     esac
5251
     AC_CHECK_LIB($1, $2, $3, $4, $5)
5252
     LDFLAGS="$kde_save_LDFLAGS"
5253
     LIBS="$kde_save_LIBS"
5254
])
5255
m4trace:acinclude.m4:5139: -1- AC_DEFUN([KDE_JAVA_PREFIX], [
5256
	dir=`dirname "$1"`
5257
	base=`basename "$1"`
5258
	list=`ls -1 $dir 2> /dev/null`
5259
	for entry in $list; do 
5260
		if test -d $dir/$entry/bin; then
5261
			case $entry in
5262
			   $base)
5263
				javadirs="$javadirs $dir/$entry/bin"
5264
				;;
5265
			esac
5266
		elif test -d $dir/$entry/jre/bin; then
5267
			case $entry in
5268
			   $base)
5269
				javadirs="$javadirs $dir/$entry/jre/bin"
5270
				;;
5271
			esac
5272
		fi
5273
	done
5274
])
5275
m4trace:acinclude.m4:5162: -1- AC_DEFUN([KDE_CHECK_JAVA_DIR], [
5276
 
5277
AC_ARG_WITH(java,
5278
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
5279
[  ac_java_dir=$withval
5280
], ac_java_dir=""
5281
)
5282
 
5283
AC_MSG_CHECKING([for Java])
5284
 
5285
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
5286
if test "x$ac_java_dir" = "xno"; then
5287
   kde_java_bindir=no
5288
   kde_java_includedir=no
5289
   kde_java_libjvmdir=no
5290
   kde_java_libgcjdir=no
5291
   kde_java_libhpidir=no
5292
else
5293
  if test "x$ac_java_dir" = "x"; then
5294
 
5295
 
5296
      dnl No option set -> collect list of candidate paths
5297
      if test -n "$JAVA_HOME"; then
5298
        KDE_JAVA_PREFIX($JAVA_HOME)
5299
      fi
5300
      KDE_JAVA_PREFIX(/usr/j2se)
5301
      KDE_JAVA_PREFIX(/usr/lib/j2se)
5302
      KDE_JAVA_PREFIX(/usr/j*dk*)
5303
      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
5304
      KDE_JAVA_PREFIX(/opt/j*sdk*)
5305
      KDE_JAVA_PREFIX(/usr/lib/java*)
5306
      KDE_JAVA_PREFIX(/usr/java*)
5307
      KDE_JAVA_PREFIX(/usr/java/j*dk*)
5308
      KDE_JAVA_PREFIX(/usr/java/j*re*)
5309
      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
5310
      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
5311
      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
5312
      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
5313
      KDE_JAVA_PREFIX(/opt/java*)
5314
 
5315
      kde_cv_path="NONE"
5316
      kde_save_IFS=$IFS
5317
      IFS=':'
5318
      for dir in $PATH; do
5319
	  if test -d "$dir"; then
5320
	      javadirs="$javadirs $dir"
5321
	  fi
5322
      done
5323
      IFS=$kde_save_IFS
5324
      jredirs=
5325
 
5326
      dnl Now javadirs contains a list of paths that exist, all ending with bin/
5327
      for dir in $javadirs; do
5328
          dnl Check for the java executable
5329
	  if test -x "$dir/java"; then
5330
	      sane_path=$(cd $dir; /bin/pwd)
5331
	      dnl And also check for a libjvm.so somewhere under there
5332
	      dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
5333
              if test "$sane_path" != "/usr/bin"; then
5334
                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5335
		  if test ! -f $libjvmdir/libjvm.so; then continue; fi
5336
		  jredirs="$jredirs $dir"
5337
	      fi
5338
	  fi
5339
      done
5340
 
5341
      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
5342
      JAVAC=
5343
      JAVA=
5344
      kde_java_bindir=no
5345
      for dir in $jredirs; do
5346
	  JAVA="$dir/java"
5347
	  kde_java_bindir=$dir
5348
	  if test -x "$dir/javac"; then
5349
		JAVAC="$dir/javac"
5350
                break
5351
	  fi
5352
      done
5353
 
5354
      if test -n "$JAVAC"; then
5355
          dnl this substitution might not work - well, we test for jni.h below
5356
          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
5357
      else
5358
          kde_java_includedir=no
5359
      fi
5360
  else
5361
    dnl config option set
5362
    kde_java_bindir=$ac_java_dir/bin
5363
    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
5364
	kde_java_includedir=no
5365
    else
5366
        kde_java_includedir=$ac_java_dir/include
5367
    fi
5368
  fi
5369
fi
5370
 
5371
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
5372
if test "x$kde_java_bindir" != "xno"; then
5373
 
5374
  dnl Look for libjvm.so
5375
  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5376
  dnl Look for libgcj.so
5377
  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5378
  dnl Look for libhpi.so and avoid green threads
5379
  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5380
 
5381
  dnl Now check everything's fine under there
5382
  dnl the include dir is our flag for having the JDK
5383
  if test -d "$kde_java_includedir"; then
5384
    if test ! -x "$kde_java_bindir/javac"; then
5385
      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
5386
    fi
5387
    if test ! -x "$kde_java_bindir/javah"; then
5388
      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5389
    fi
5390
    if test ! -x "$kde_java_bindir/jar"; then
5391
      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5392
    fi
5393
    if test ! -r "$kde_java_includedir/jni.h"; then
5394
      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
5395
    fi
5396
 
5397
    jni_includes="-I$kde_java_includedir"
5398
    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5399
    dnl and under linux here.. 
5400
 
5401
    dnl not needed for gcj
5402
 
5403
    if test "x$kde_java_libgcjdir" = "x"; then 
5404
      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5405
      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5406
      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5407
    fi
5408
 
5409
  else
5410
    JAVAC=
5411
    jni_includes=
5412
  fi
5413
 
5414
  if test "x$kde_java_libgcjdir" = "x"; then 
5415
     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5416
        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5417
     fi 
5418
  else
5419
     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5420
        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5421
     fi 
5422
  fi
5423
 
5424
  if test ! -x "$kde_java_bindir/java"; then
5425
      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5426
  fi
5427
 
5428
  dnl not needed for gcj compile
5429
 
5430
  if test "x$kde_java_libgcjdir" = "x"; then 
5431
      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5432
        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5433
      fi
5434
  fi
5435
 
5436
  if test -n "$jni_includes"; then
5437
    dnl Check for JNI version
5438
    AC_LANG_SAVE
5439
    AC_LANG_CPLUSPLUS
5440
    ac_cxxflags_safe="$CXXFLAGS"
5441
    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
5442
 
5443
    AC_TRY_COMPILE([
5444
  #include <jni.h>
5445
	      ],
5446
	      [
5447
  #ifndef JNI_VERSION_1_2
5448
  Syntax Error
5449
  #endif
5450
	      ],[ kde_jni_works=yes ],
5451
	      [ kde_jni_works=no ])
5452
 
5453
    if test $kde_jni_works = no; then
5454
      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
5455
		    You need to have Java Development Kit (JDK) version 1.2. 
5456
 
5457
		    Use --with-java to specify another location.
5458
		    Use --without-java to configure without java support.
5459
		    Or download a newer JDK and try again. 
5460
		    See e.g. http://java.sun.com/products/jdk/1.2 ])
5461
    fi
5462
 
5463
    CXXFLAGS="$ac_cxxflags_safe"    
5464
    AC_LANG_RESTORE
5465
 
5466
    dnl All tests ok, inform and subst the variables
5467
 
5468
    JAVAC=$kde_java_bindir/javac
5469
    JAVAH=$kde_java_bindir/javah
5470
    JAR=$kde_java_bindir/jar
5471
    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5472
    if test "x$kde_java_libgcjdir" = "x"; then 
5473
      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5474
    else
5475
      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5476
    fi
5477
    AC_MSG_RESULT([java JDK in $kde_java_bindir])
5478
 
5479
  else
5480
      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5481
      AC_MSG_RESULT([java JRE in $kde_java_bindir])
5482
  fi
5483
elif test -d "/Library/Java/Home"; then
5484
  kde_java_bindir="/Library/Java/Home/bin"
5485
  jni_includes="-I/Library/Java/Home/include"
5486
 
5487
  JAVAC=$kde_java_bindir/javac
5488
  JAVAH=$kde_java_bindir/javah
5489
  JAR=$kde_java_bindir/jar
5490
  JVMLIBS="-Wl,-framework,JavaVM"
5491
 
5492
  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5493
  AC_MSG_RESULT([Apple Java Framework])
5494
else
5495
  AC_MSG_RESULT([none found])
5496
fi
5497
 
5498
AC_SUBST(JAVAC)
5499
AC_SUBST(JAVAH)
5500
AC_SUBST(JAR)
5501
AC_SUBST(JVMLIBS)
5502
AC_SUBST(jni_includes)
5503
 
5504
# for backward compat
5505
kde_cv_java_includedir=$kde_java_includedir
5506
kde_cv_java_bindir=$kde_java_bindir
5507
])
5508
m4trace:acinclude.m4:5413: -1- AC_DEFUN([KDE_NEED_FLEX], [
5509
kde_libs_safe=$LIBS
5510
LIBS="$LIBS $USER_LDFLAGS"
5511
AM_PROG_LEX
5512
LIBS=$kde_libs_safe
5513
if test -z "$LEXLIB"; then
5514
    AC_MSG_ERROR([You need to have flex installed.])
5515
fi
5516
AC_SUBST(LEXLIB)
5517
])
5518
m4trace:acinclude.m4:5425: -1- AC_DEFUN([AC_PATH_QTOPIA], [
5519
  dnl TODO: use AC_CACHE_VAL
5520
 
5521
  if test -z "$1"; then
5522
    qtopia_minver_maj=1
5523
    qtopia_minver_min=5
5524
    qtopia_minver_pat=0
5525
  else
5526
    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5527
    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5528
    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5529
  fi
5530
 
5531
  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5532
  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5533
 
5534
  AC_REQUIRE([AC_PATH_QT])
5535
 
5536
  AC_MSG_CHECKING([for Qtopia])
5537
 
5538
  LIB_QTOPIA="-lqpe"
5539
  AC_SUBST(LIB_QTOPIA)
5540
 
5541
  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5542
 
5543
  ac_qtopia_incdir=NO
5544
 
5545
  AC_ARG_WITH(qtopia-dir,
5546
              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
5547
              [  ac_qtopia_incdir="$withval"/include] ) 
5548
 
5549
  qtopia_incdirs=""
5550
  for dir in $kde_qtopia_dirs; do
5551
    qtopia_incdirs="$qtopia_incdirs $dir/include"
5552
  done
5553
 
5554
  if test ! "$ac_qtopia_incdir" = "NO"; then
5555
    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5556
  fi
5557
 
5558
  qtopia_incdir=""
5559
  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5560
  ac_qtopia_incdir="$qtopia_incdir"
5561
 
5562
  if test -z "$qtopia_incdir"; then
5563
    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5564
  fi
5565
 
5566
  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5567
  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5568
  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5569
 
5570
  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5571
  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5572
  if test "$qtopia_ver" -lt "$qtopia_minver"; then
5573
    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5574
is required.])
5575
  fi
5576
 
5577
  AC_LANG_SAVE
5578
  AC_LANG_CPLUSPLUS
5579
 
5580
  ac_cxxflags_safe="$CXXFLAGS"
5581
  ac_ldflags_safe="$LDFLAGS"
5582
  ac_libs_safe="$LIBS"
5583
 
5584
  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5585
  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5586
  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5587
 
5588
  cat > conftest.$ac_ext <<EOF
5589
#include "confdefs.h"
5590
#include <qpe/qpeapplication.h>
5591
#include <qpe/version.h>
5592
 
5593
int main( int argc, char **argv )
5594
{
5595
    QPEApplication app( argc, argv );
5596
    return 0;
5597
}
5598
EOF
5599
 
5600
  if AC_TRY_EVAL(ac_link) && test -s conftest; then
5601
    rm -f conftest*
5602
  else
5603
    rm -f conftest*
5604
    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5605
the end of config.log])
5606
  fi
5607
 
5608
  CXXFLAGS="$ac_cxxflags_safe"
5609
  LDFLAGS="$ac_ldflags_safe"
5610
  LIBS="$ac_libs_safe"
5611
 
5612
  AC_LANG_RESTORE
5613
 
5614
  QTOPIA_INCLUDES="-I$qtopia_incdir"
5615
  AC_SUBST(QTOPIA_INCLUDES)
5616
 
5617
  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5618
])
5619
m4trace:acinclude.m4:5529: -1- AC_DEFUN([KDE_INIT_DOXYGEN], [
5620
AC_MSG_CHECKING([for Qt docs])
5621
kde_qtdir=
5622
if test "${with_qt_dir+set}" = set; then
5623
  kde_qtdir="$with_qt_dir"
5624
fi
5625
 
5626
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)
5627
AC_MSG_RESULT($QTDOCDIR)
5628
 
5629
AC_SUBST(QTDOCDIR)
5630
 
5631
KDE_FIND_PATH(dot, DOT, [], [])
5632
if test -n "$DOT"; then
5633
  KDE_HAVE_DOT="YES"
5634
else
5635
  KDE_HAVE_DOT="NO"
5636
fi
5637
AC_SUBST(KDE_HAVE_DOT)
5638
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5639
AC_SUBST(DOXYGEN)
5640
 
5641
DOXYGEN_PROJECT_NAME="$1"
5642
DOXYGEN_PROJECT_NUMBER="$2"
5643
AC_SUBST(DOXYGEN_PROJECT_NAME)
5644
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5645
 
5646
KDE_HAS_DOXYGEN=no
5647
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5648
  KDE_HAS_DOXYGEN=yes
5649
fi
5650
AC_SUBST(KDE_HAS_DOXYGEN)
5651
 
5652
])
5653
m4trace:acinclude.m4:5566: -1- AC_DEFUN([AC_FIND_BZIP2], [
5654
AC_MSG_CHECKING([for bzDecompress in libbz2])
5655
AC_CACHE_VAL(ac_cv_lib_bzip2,
5656
[
5657
AC_LANG_SAVE
5658
AC_LANG_CPLUSPLUS
5659
kde_save_LIBS="$LIBS"
5660
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5661
kde_save_CXXFLAGS="$CXXFLAGS"
5662
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5663
AC_TRY_LINK(dnl
5664
[
5665
#define BZ_NO_STDIO
5666
#include<bzlib.h>
5667
],
5668
            [ bz_stream s; (void) bzDecompress(&s); ],
5669
            eval "ac_cv_lib_bzip2='-lbz2'",
5670
            eval "ac_cv_lib_bzip2=no")
5671
LIBS="$kde_save_LIBS"
5672
CXXFLAGS="$kde_save_CXXFLAGS"
5673
AC_LANG_RESTORE
5674
])dnl
5675
AC_MSG_RESULT($ac_cv_lib_bzip2)
5676
 
5677
if test ! "$ac_cv_lib_bzip2" = no; then
5678
  BZIP2DIR=bzip2
5679
 
5680
  LIBBZ2="$ac_cv_lib_bzip2"
5681
  AC_SUBST(LIBBZ2)
5682
 
5683
else
5684
 
5685
   cxx_shared_flag=
5686
   ld_shared_flag=
5687
   KDE_CHECK_COMPILER_FLAG(shared, [
5688
	ld_shared_flag="-shared"
5689
   ])
5690
   KDE_CHECK_COMPILER_FLAG(fPIC, [
5691
        cxx_shared_flag="-fPIC"
5692
   ])
5693
 
5694
   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5695
   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5696
   [
5697
   AC_LANG_SAVE
5698
   AC_LANG_CPLUSPLUS
5699
   kde_save_LIBS="$LIBS"
5700
   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5701
   kde_save_CXXFLAGS="$CXXFLAGS"
5702
   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5703
 
5704
   AC_TRY_LINK(dnl
5705
   [
5706
   #define BZ_NO_STDIO
5707
   #include<bzlib.h>
5708
   ],
5709
               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5710
               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5711
               eval "ac_cv_lib_bzip2_prefix=no")
5712
   LIBS="$kde_save_LIBS"
5713
   CXXFLAGS="$kde_save_CXXFLAGS"
5714
   AC_LANG_RESTORE
5715
   ])dnl
5716
 
5717
   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5718
 
5719
   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5720
     BZIP2DIR=bzip2
5721
 
5722
     LIBBZ2="$ac_cv_lib_bzip2_prefix"
5723
     AC_SUBST(LIBBZ2)
5724
 
5725
     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5726
   dnl else, we just ignore this
5727
   fi
5728
 
5729
fi
5730
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5731
])
5732
m4trace:acinclude.m4:5653: -1- AC_DEFUN([KDE_CHECK_SSL], [
5733
LIBSSL="-lssl -lcrypto"
5734
AC_REQUIRE([KDE_CHECK_LIB64])
5735
 
5736
ac_ssl_includes=NO ac_ssl_libraries=NO
5737
ssl_libraries=""
5738
ssl_includes=""
5739
AC_ARG_WITH(ssl-dir,
5740
    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5741
    [  ac_ssl_includes="$withval"/include
5742
       ac_ssl_libraries="$withval"/lib$kdelibsuff
5743
    ])
5744
 
5745
want_ssl=yes
5746
AC_ARG_WITH(ssl,
5747
    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5748
    [want_ssl=$withval])
5749
 
5750
if test $want_ssl = yes; then
5751
 
5752
AC_MSG_CHECKING(for OpenSSL)
5753
 
5754
AC_CACHE_VAL(ac_cv_have_ssl,
5755
[#try to guess OpenSSL locations
5756
 
5757
  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5758
  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5759
  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5760
  ac_ssl_includes="$ssl_incdir"
5761
 
5762
  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"
5763
  if test ! "$ac_ssl_libraries" = "NO"; then
5764
    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5765
  fi
5766
 
5767
  test=NONE
5768
  ssl_libdir=NONE
5769
  for dir in $ssl_libdirs; do
5770
    try="ls -1 $dir/libssl*"
5771
    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5772
  done
5773
 
5774
  ac_ssl_libraries="$ssl_libdir"
5775
 
5776
  ac_ldflags_safe="$LDFLAGS"
5777
  ac_libs_safe="$LIBS"
5778
 
5779
  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5780
  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5781
 
5782
  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5783
  ac_ssl_rsaref="yes"
5784
  ,
5785
  ac_ssl_rsaref="no"
5786
  )
5787
 
5788
  LDFLAGS="$ac_ldflags_safe"
5789
  LIBS="$ac_libs_safe"
5790
 
5791
  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5792
    have_ssl=no
5793
  else
5794
    have_ssl=yes;
5795
  fi
5796
 
5797
  ])
5798
 
5799
  eval "$ac_cv_have_ssl"
5800
 
5801
  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5802
 
5803
  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5804
  AC_MSG_RESULT($ac_ssl_rsaref)
5805
 
5806
  AC_MSG_CHECKING([for easter eggs])
5807
  AC_MSG_RESULT([none found])
5808
 
5809
else
5810
  have_ssl=no
5811
fi
5812
 
5813
if test "$have_ssl" = yes; then
5814
  AC_MSG_CHECKING(for OpenSSL version)
5815
  dnl Check for SSL version
5816
  AC_CACHE_VAL(ac_cv_ssl_version,
5817
  [
5818
 
5819
    cat >conftest.$ac_ext <<EOF
5820
#include <openssl/opensslv.h>
5821
#include <stdio.h>
5822
    int main() {
5823
 
5824
#ifndef OPENSSL_VERSION_NUMBER
5825
      printf("ssl_version=\\"error\\"\n");
5826
#else
5827
      if (OPENSSL_VERSION_NUMBER < 0x00906000)
5828
        printf("ssl_version=\\"old\\"\n");
5829
      else
5830
        printf("ssl_version=\\"ok\\"\n");
5831
#endif
5832
     return (0);
5833
    }
5834
EOF
5835
 
5836
    ac_save_CPPFLAGS=$CPPFLAGS
5837
    if test "$ac_ssl_includes" != "/usr/include"; then
5838
        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5839
    fi
5840
 
5841
    if AC_TRY_EVAL(ac_link); then 
5842
 
5843
      if eval `./conftest 2>&5`; then
5844
        if test $ssl_version = error; then
5845
          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5846
        else
5847
          if test $ssl_version = old; then
5848
            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5849
            have_ssl=no
5850
          fi
5851
        fi
5852
        ac_cv_ssl_version="ssl_version=$ssl_version"
5853
      else
5854
        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5855
        Check config.log, and if you can't figure it out, send a mail to 
5856
        David Faure <faure@kde.org>, attaching your config.log])
5857
      fi
5858
 
5859
    else
5860
      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5861
      Check config.log, and if you can't figure it out, send a mail to 
5862
      David Faure <faure@kde.org>, attaching your config.log])
5863
    fi 
5864
    CPPFLAGS=$ac_save_CPPFLAGS
5865
 
5866
  ])
5867
 
5868
  eval "$ac_cv_ssl_version"
5869
  AC_MSG_RESULT($ssl_version)
5870
fi
5871
 
5872
if test "$have_ssl" != yes; then
5873
  LIBSSL="";
5874
else
5875
  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5876
  ac_cv_have_ssl="have_ssl=yes \
5877
    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5878
 
5879
 
5880
  ssl_libraries="$ac_ssl_libraries"
5881
  ssl_includes="$ac_ssl_includes"
5882
 
5883
  if test "$ac_ssl_rsaref" = yes; then
5884
    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
5885
  fi
5886
 
5887
  if test $ssl_version = "old"; then
5888
    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5889
  fi
5890
fi
5891
 
5892
SSL_INCLUDES=
5893
 
5894
if test "$ssl_includes" = "/usr/include"; then
5895
  if test -f /usr/kerberos/include/krb5.h; then
5896
	SSL_INCLUDES="-I/usr/kerberos/include"
5897
  fi
5898
elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5899
  SSL_INCLUDES="-I$ssl_includes"
5900
fi
5901
 
5902
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5903
 SSL_LDFLAGS=""
5904
else
5905
 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5906
fi
5907
 
5908
AC_SUBST(SSL_INCLUDES)
5909
AC_SUBST(SSL_LDFLAGS)
5910
AC_SUBST(LIBSSL)
5911
])
5912
m4trace:acinclude.m4:5835: -1- AC_DEFUN([KDE_CHECK_STRLCPY], [
5913
  AC_REQUIRE([AC_CHECK_STRLCAT])
5914
  AC_REQUIRE([AC_CHECK_STRLCPY])
5915
  AC_CHECK_SIZEOF(size_t)
5916
  AC_CHECK_SIZEOF(unsigned long)
5917
 
5918
  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5919
  AC_TRY_COMPILE(,[
5920
    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5921
       choke me
5922
    #endif
5923
    ],AC_MSG_RESULT([yes]),[
5924
      AC_MSG_RESULT(no)
5925
      AC_MSG_ERROR([
5926
       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
5927
       does not apply. Please mail kde-devel@kde.org with a description of your system!
5928
      ])
5929
  ])
5930
])
5931
m4trace:acinclude.m4:5856: -1- AC_DEFUN([KDE_CHECK_BINUTILS], [
5932
  AC_MSG_CHECKING([if ld supports unversioned version maps])
5933
 
5934
  kde_save_LDFLAGS="$LDFLAGS"
5935
  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5936
  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5937
  AC_TRY_LINK([int foo;],
5938
[
5939
#ifdef __INTEL_COMPILER
5940
icc apparently does not support libtools version-info and version-script
5941
at the same time. Dunno where the bug is, but until somebody figured out,
5942
better disable the optional version scripts.
5943
#endif
5944
 
5945
  foo = 42;
5946
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5947
  LDFLAGS="$kde_save_LDFLAGS"
5948
  rm -f conftest.map
5949
  AM_CONDITIONAL(include_VERSION_SCRIPT, 
5950
    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5951
 
5952
  AC_MSG_RESULT($kde_supports_versionmaps)
5953
])
5954
m4trace:acinclude.m4:5881: -1- AC_DEFUN([AM_PROG_OBJC], [
5955
AC_CHECK_PROGS(OBJC, gcc, gcc)
5956
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5957
if test "x${OBJCFLAGS-unset}" = xunset; then
5958
   OBJCFLAGS="-g -O2"
5959
fi
5960
AC_SUBST(OBJCFLAGS)
5961
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5962
])
5963
m4trace:acinclude.m4:5891: -1- AC_DEFUN([KDE_CHECK_PERL], [
5964
	KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5965
		    AC_MSG_ERROR([No Perl found in your $PATH.
5966
We need perl to generate some code.])
5967
	])
5968
    AC_SUBST(PERL)
5969
])
5970
m4trace:acinclude.m4:5900: -1- AC_DEFUN([KDE_CHECK_LARGEFILE], [
5971
AC_SYS_LARGEFILE
5972
if test "$ac_cv_sys_file_offset_bits" != no; then
5973
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5974
fi
5975
 
5976
if test "x$ac_cv_sys_large_files" != "xno"; then
5977
  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5978
fi
5979
 
5980
])
5981
m4trace:acinclude.m4:5919: -1- AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5982
 
5983
   PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5984
   if test "$prefix" != "$kde_libs_prefix"; then
5985
       PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5986
   fi
5987
   export PKG_CONFIG_PATH
5988
   PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
5989
])
5990
m4trace:acinclude.m4:5931: -1- AC_DEFUN([KDE_CHECK_PIE_SUPPORT], [
5991
  AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
5992
  [
5993
    AC_LANG_SAVE
5994
    AC_LANG_CPLUSPLUS
5995
    safe_CXXFLAGS=$CXXFLAGS
5996
    safe_LDFLAGS=$LDFLAGS
5997
    CXXFLAGS="$CXXFLAGS -fPIE"
5998
    LDFLAGS="$LDFLAGS -pie"
5999
 
6000
    AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
6001
 
6002
    CXXFLAGS=$safe_CXXFLAGS
6003
    LDFLAGS=$safe_LDFLAGS
6004
    AC_LANG_RESTORE
6005
  ])
6006
 
6007
  AC_MSG_CHECKING(if enabling -pie/fPIE support)
6008
 
6009
  AC_ARG_ENABLE(pie,
6010
    AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
6011
      [kde_has_pie_support=$enableval],
6012
      [kde_has_pie_support=detect])
6013
 
6014
  if test "$kde_has_pie_support" = "detect"; then
6015
    kde_has_pie_support=$kde_cv_val_pie_support
6016
  fi
6017
 
6018
  AC_MSG_RESULT([$kde_has_pie_support])
6019
 
6020
  KDE_USE_FPIE=""
6021
  KDE_USE_PIE=""
6022
 
6023
  AC_SUBST([KDE_USE_FPIE])
6024
  AC_SUBST([KDE_USE_PIE])
6025
 
6026
  if test "$kde_has_pie_support" = "yes"; then
6027
    KDE_USE_FPIE="-fPIE"
6028
    KDE_USE_PIE="-pie"
6029
  fi
6030
])
6031
m4trace:acinclude.m4:6012: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
6032
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
6033
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
6034
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
6035
    [AC_LIBTOOL_CXX],
6036
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
6037
  ])])
6038
dnl And a similar setup for Fortran 77 support
6039
  AC_PROVIDE_IFELSE([AC_PROG_F77],
6040
    [AC_LIBTOOL_F77],
6041
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
6042
])])
6043
 
6044
dnl Quote AM_PROG_GCJ so that aclocal doesn't bring it in needlessly.
6045
dnl If either AC_PROG_GCJ or AM_PROG_GCJ have already been expanded, run
6046
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
6047
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
6048
    [AC_LIBTOOL_GCJ],
6049
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
6050
      [AC_LIBTOOL_GCJ],
6051
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
6052
	[AC_LIBTOOL_GCJ],
6053
      [ifdef([AC_PROG_GCJ],
6054
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6055
       ifdef([A][M_PROG_GCJ],
6056
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6057
       ifdef([LT_AC_PROG_GCJ],
6058
	     [define([LT_AC_PROG_GCJ],
6059
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6060
])])
6061
m4trace:acinclude.m4:6047: -1- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
6062
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
6063
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
6064
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
6065
 
6066
# This can be used to rebuild libtool when needed
6067
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
6068
 
6069
# Always use our own libtool.
6070
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
6071
AC_SUBST(LIBTOOL)dnl
6072
 
6073
# Prevent multiple expansion
6074
define([AC_PROG_LIBTOOL], [])
6075
])
6076
m4trace:acinclude.m4:6067: -1- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl
6077
AC_REQUIRE([AC_ENABLE_SHARED])dnl
6078
AC_REQUIRE([AC_ENABLE_STATIC])dnl
6079
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
6080
AC_REQUIRE([AC_CANONICAL_HOST])dnl
6081
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6082
AC_REQUIRE([AC_PROG_CC])dnl
6083
AC_REQUIRE([AC_PROG_LD])dnl
6084
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
6085
AC_REQUIRE([AC_PROG_NM])dnl
6086
 
6087
AC_REQUIRE([AC_PROG_LN_S])dnl
6088
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
6089
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6090
AC_REQUIRE([AC_OBJEXT])dnl
6091
AC_REQUIRE([AC_EXEEXT])dnl
6092
dnl
6093
 
6094
AC_LIBTOOL_SYS_MAX_CMD_LEN
6095
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6096
AC_LIBTOOL_OBJDIR
6097
 
6098
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6099
_LT_AC_PROG_ECHO_BACKSLASH
6100
 
6101
case $host_os in
6102
aix3*)
6103
  # AIX sometimes has problems with the GCC collect2 program.  For some
6104
  # reason, if we set the COLLECT_NAMES environment variable, the problems
6105
  # vanish in a puff of smoke.
6106
  if test "X${COLLECT_NAMES+set}" != Xset; then
6107
    COLLECT_NAMES=
6108
    export COLLECT_NAMES
6109
  fi
6110
  ;;
6111
esac
6112
 
6113
# Sed substitution that helps us do robust quoting.  It backslashifies
6114
# metacharacters that are still active within double-quoted strings.
6115
Xsed='sed -e s/^X//'
6116
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
6117
 
6118
# Same as above, but do not quote variable references.
6119
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
6120
 
6121
# Sed substitution to delay expansion of an escaped shell variable in a
6122
# double_quote_subst'ed string.
6123
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6124
 
6125
# Sed substitution to avoid accidental globbing in evaled expressions
6126
no_glob_subst='s/\*/\\\*/g'
6127
 
6128
# Constants:
6129
rm="rm -f"
6130
 
6131
# Global variables:
6132
default_ofile=libtool
6133
can_build_shared=yes
6134
 
6135
# All known linkers require a `.a' archive for static linking (except M$VC,
6136
# which needs '.lib').
6137
libext=a
6138
ltmain="$ac_aux_dir/ltmain.sh"
6139
ofile="$default_ofile"
6140
with_gnu_ld="$lt_cv_prog_gnu_ld"
6141
 
6142
AC_CHECK_TOOL(AR, ar, false)
6143
AC_CHECK_TOOL(RANLIB, ranlib, :)
6144
AC_CHECK_TOOL(STRIP, strip, :)
6145
 
6146
old_CC="$CC"
6147
old_CFLAGS="$CFLAGS"
6148
 
6149
# Set sane defaults for various variables
6150
test -z "$AR" && AR=ar
6151
test -z "$AR_FLAGS" && AR_FLAGS=cru
6152
test -z "$AS" && AS=as
6153
test -z "$CC" && CC=cc
6154
test -z "$LTCC" && LTCC=$CC
6155
test -z "$DLLTOOL" && DLLTOOL=dlltool
6156
test -z "$LD" && LD=ld
6157
test -z "$LN_S" && LN_S="ln -s"
6158
test -z "$MAGIC_CMD" && MAGIC_CMD=file
6159
test -z "$NM" && NM=nm
6160
test -z "$SED" && SED=sed
6161
test -z "$OBJDUMP" && OBJDUMP=objdump
6162
test -z "$RANLIB" && RANLIB=:
6163
test -z "$STRIP" && STRIP=:
6164
test -z "$ac_objext" && ac_objext=o
6165
 
6166
# Determine commands to create old-style static archives.
6167
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6168
old_postinstall_cmds='chmod 644 $oldlib'
6169
old_postuninstall_cmds=
6170
 
6171
if test -n "$RANLIB"; then
6172
  case $host_os in
6173
  openbsd*)
6174
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
6175
    ;;
6176
  *)
6177
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
6178
    ;;
6179
  esac
6180
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6181
fi
6182
 
6183
# Only perform the check for file, if the check method requires it
6184
case $deplibs_check_method in
6185
file_magic*)
6186
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6187
    AC_PATH_MAGIC
6188
  fi
6189
  ;;
6190
esac
6191
 
6192
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
6193
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6194
enable_win32_dll=yes, enable_win32_dll=no)
6195
 
6196
AC_ARG_ENABLE([libtool-lock],
6197
    [AC_HELP_STRING([--disable-libtool-lock],
6198
	[avoid locking (might break parallel builds)])])
6199
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6200
 
6201
AC_ARG_WITH([pic],
6202
    [AC_HELP_STRING([--with-pic],
6203
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
6204
    [pic_mode="$withval"],
6205
    [pic_mode=default])
6206
test -z "$pic_mode" && pic_mode=default
6207
 
6208
# Use C for the default configuration in the libtool script
6209
tagname=
6210
AC_LIBTOOL_LANG_C_CONFIG
6211
_LT_AC_TAGCONFIG
6212
])
6213
m4trace:acinclude.m4:6209: -1- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl
6214
 
6215
# If no C compiler was specified, use CC.
6216
LTCC=${LTCC-"$CC"}
6217
 
6218
# Allow CC to be a program name with arguments.
6219
compiler=$CC
6220
])
6221
m4trace:acinclude.m4:6228: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6222
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
6223
}'`
6224
# Check for a 64-bit object if we didn't find anything.
6225
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; }
6226
}'`; fi],[])
6227
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6228
])
6229
m4trace:acinclude.m4:6241: -1- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE],
6230
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6231
	 [AC_DIVERT_PUSH(NOTICE)])
6232
$1
6233
AC_DIVERT_POP
6234
])
6235
m4trace:acinclude.m4:6254: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([
6236
# Check that we are running under the correct shell.
6237
SHELL=${CONFIG_SHELL-/bin/sh}
6238
 
6239
case X$ECHO in
6240
X*--fallback-echo)
6241
  # Remove one level of quotation (which was required for Make).
6242
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6243
  ;;
6244
esac
6245
 
6246
echo=${ECHO-echo}
6247
if test "X[$]1" = X--no-reexec; then
6248
  # Discard the --no-reexec flag, and continue.
6249
  shift
6250
elif test "X[$]1" = X--fallback-echo; then
6251
  # Avoid inline document here, it may be left over
6252
  :
6253
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
6254
  # Yippee, $echo works!
6255
  :
6256
else
6257
  # Restart under the correct shell.
6258
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6259
fi
6260
 
6261
if test "X[$]1" = X--fallback-echo; then
6262
  # used as fallback echo
6263
  shift
6264
  cat <<EOF
6265
[$]*
6266
EOF
6267
  exit 0
6268
fi
6269
 
6270
# The HP-UX ksh and POSIX shell print the target directory to stdout
6271
# if CDPATH is set.
6272
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6273
 
6274
if test -z "$ECHO"; then
6275
if test "X${echo_test_string+set}" != Xset; then
6276
# find a string as large as possible, as long as the shell can cope with it
6277
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6278
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6279
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
6280
       echo_test_string="`eval $cmd`" &&
6281
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6282
    then
6283
      break
6284
    fi
6285
  done
6286
fi
6287
 
6288
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6289
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6290
   test "X$echo_testing_string" = "X$echo_test_string"; then
6291
  :
6292
else
6293
  # The Solaris, AIX, and Digital Unix default echo programs unquote
6294
  # backslashes.  This makes it impossible to quote backslashes using
6295
  #   echo "$something" | sed 's/\\/\\\\/g'
6296
  #
6297
  # So, first we look for a working echo in the user's PATH.
6298
 
6299
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6300
  for dir in $PATH /usr/ucb; do
6301
    IFS="$lt_save_ifs"
6302
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6303
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6304
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6305
       test "X$echo_testing_string" = "X$echo_test_string"; then
6306
      echo="$dir/echo"
6307
      break
6308
    fi
6309
  done
6310
  IFS="$lt_save_ifs"
6311
 
6312
  if test "X$echo" = Xecho; then
6313
    # We didn't find a better echo, so look for alternatives.
6314
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6315
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6316
       test "X$echo_testing_string" = "X$echo_test_string"; then
6317
      # This shell has a builtin print -r that does the trick.
6318
      echo='print -r'
6319
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6320
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
6321
      # If we have ksh, try running configure again with it.
6322
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6323
      export ORIGINAL_CONFIG_SHELL
6324
      CONFIG_SHELL=/bin/ksh
6325
      export CONFIG_SHELL
6326
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6327
    else
6328
      # Try using printf.
6329
      echo='printf %s\n'
6330
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6331
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6332
	 test "X$echo_testing_string" = "X$echo_test_string"; then
6333
	# Cool, printf works
6334
	:
6335
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6336
	   test "X$echo_testing_string" = 'X\t' &&
6337
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6338
	   test "X$echo_testing_string" = "X$echo_test_string"; then
6339
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6340
	export CONFIG_SHELL
6341
	SHELL="$CONFIG_SHELL"
6342
	export SHELL
6343
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
6344
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6345
	   test "X$echo_testing_string" = 'X\t' &&
6346
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6347
	   test "X$echo_testing_string" = "X$echo_test_string"; then
6348
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
6349
      else
6350
	# maybe with a smaller string...
6351
	prev=:
6352
 
6353
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6354
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6355
	  then
6356
	    break
6357
	  fi
6358
	  prev="$cmd"
6359
	done
6360
 
6361
	if test "$prev" != 'sed 50q "[$]0"'; then
6362
	  echo_test_string=`eval $prev`
6363
	  export echo_test_string
6364
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6365
	else
6366
	  # Oops.  We lost completely, so just stick with echo.
6367
	  echo=echo
6368
	fi
6369
      fi
6370
    fi
6371
  fi
6372
fi
6373
fi
6374
 
6375
# Copy echo and quote the copy suitably for passing to libtool from
6376
# the Makefile, instead of quoting the original, which is used later.
6377
ECHO=$echo
6378
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6379
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6380
fi
6381
 
6382
AC_SUBST(ECHO)
6383
])])
6384
m4trace:acinclude.m4:6408: -1- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock],
6385
    [AC_HELP_STRING([--disable-libtool-lock],
6386
	[avoid locking (might break parallel builds)])])
6387
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6388
 
6389
# Some flags need to be propagated to the compiler or linker for good
6390
# libtool support.
6391
case $host in
6392
ia64-*-hpux*)
6393
  # Find out which ABI we are using.
6394
  echo 'int i;' > conftest.$ac_ext
6395
  if AC_TRY_EVAL(ac_compile); then
6396
    case `/usr/bin/file conftest.$ac_objext` in
6397
    *ELF-32*)
6398
      HPUX_IA64_MODE="32"
6399
      ;;
6400
    *ELF-64*)
6401
      HPUX_IA64_MODE="64"
6402
      ;;
6403
    esac
6404
  fi
6405
  rm -rf conftest*
6406
  ;;
6407
*-*-irix6*)
6408
  # Find out which ABI we are using.
6409
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6410
  if AC_TRY_EVAL(ac_compile); then
6411
   if test "$lt_cv_prog_gnu_ld" = yes; then
6412
    case `/usr/bin/file conftest.$ac_objext` in
6413
    *32-bit*)
6414
      LD="${LD-ld} -melf32bsmip"
6415
      ;;
6416
    *N32*)
6417
      LD="${LD-ld} -melf32bmipn32"
6418
      ;;
6419
    *64-bit*)
6420
      LD="${LD-ld} -melf64bmip"
6421
      ;;
6422
    esac
6423
   else
6424
    case `/usr/bin/file conftest.$ac_objext` in
6425
    *32-bit*)
6426
      LD="${LD-ld} -32"
6427
      ;;
6428
    *N32*)
6429
      LD="${LD-ld} -n32"
6430
      ;;
6431
    *64-bit*)
6432
      LD="${LD-ld} -64"
6433
      ;;
6434
    esac
6435
   fi
6436
  fi
6437
  rm -rf conftest*
6438
  ;;
6439
 
6440
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6441
  # Find out which ABI we are using.
6442
  echo 'int i;' > conftest.$ac_ext
6443
  if AC_TRY_EVAL(ac_compile); then
6444
    case "`/usr/bin/file conftest.o`" in
6445
    *32-bit*)
6446
      LINUX_64_MODE="32"
6447
      case $host in
6448
        x86_64-*linux*)
6449
          LD="${LD-ld} -m elf_i386"
6450
          ;;
6451
        ppc64-*linux*)
6452
          LD="${LD-ld} -m elf32ppclinux"
6453
          ;;
6454
        s390x-*linux*)
6455
          LD="${LD-ld} -m elf_s390"
6456
          ;;
6457
        sparc64-*linux*)
6458
          LD="${LD-ld} -m elf32_sparc"
6459
          ;;
6460
      esac
6461
      ;;
6462
    *64-bit*)
6463
      LINUX_64_MODE="64"
6464
      case $host in
6465
        x86_64-*linux*)
6466
          LD="${LD-ld} -m elf_x86_64"
6467
          ;;
6468
        ppc*-*linux*|powerpc*-*linux*)
6469
          LD="${LD-ld} -m elf64ppc"
6470
          ;;
6471
        s390*-*linux*)
6472
          LD="${LD-ld} -m elf64_s390"
6473
          ;;
6474
        sparc*-*linux*)
6475
          LD="${LD-ld} -m elf64_sparc"
6476
          ;;
6477
      esac
6478
      ;;
6479
    esac
6480
  fi
6481
  rm -rf conftest*
6482
  ;;
6483
 
6484
*-*-sco3.2v5*)
6485
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6486
  SAVE_CFLAGS="$CFLAGS"
6487
  CFLAGS="$CFLAGS -belf"
6488
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6489
    [AC_LANG_PUSH(C)
6490
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6491
     AC_LANG_POP])
6492
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6493
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6494
    CFLAGS="$SAVE_CFLAGS"
6495
  fi
6496
  ;;
6497
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6498
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6499
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6500
  AC_CHECK_TOOL(AS, as, false)
6501
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
6502
  ;;
6503
  ])
6504
esac
6505
 
6506
need_locks="$enable_libtool_lock"
6507
 
6508
])
6509
m4trace:acinclude.m4:6540: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])
6510
AC_CACHE_CHECK([$1], [$2],
6511
  [$2=no
6512
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6513
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6514
   lt_compiler_flag="$3"
6515
   # Insert the option either (1) after the last *FLAGS variable, or
6516
   # (2) before a word containing "conftest.", or (3) at the end.
6517
   # Note that $ac_compile itself does not contain backslashes and begins
6518
   # with a dollar sign (not a hyphen), so the echo should work correctly.
6519
   # The option is referenced via a variable to avoid confusing sed.
6520
   lt_compile=`echo "$ac_compile" | $SED \
6521
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6522
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6523
   -e 's:$: $lt_compiler_flag:'`
6524
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6525
   (eval "$lt_compile" 2>conftest.err)
6526
   ac_status=$?
6527
   cat conftest.err >&AS_MESSAGE_LOG_FD
6528
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6529
   if (exit $ac_status) && test -s "$ac_outfile"; then
6530
     # The compiler can only warn and ignore the option if not recognized
6531
     # So say no if there are warnings
6532
     if test ! -s conftest.err; then
6533
       $2=yes
6534
     fi
6535
   fi
6536
   $rm conftest*
6537
])
6538
 
6539
if test x"[$]$2" = xyes; then
6540
    ifelse([$5], , :, [$5])
6541
else
6542
    ifelse([$6], , :, [$6])
6543
fi
6544
])
6545
m4trace:acinclude.m4:6583: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2],
6546
  [$2=no
6547
   save_LDFLAGS="$LDFLAGS"
6548
   LDFLAGS="$LDFLAGS $3"
6549
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
6550
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6551
     # The compiler can only warn and ignore the option if not recognized
6552
     # So say no if there are warnings
6553
     if test -s conftest.err; then
6554
       # Append any errors to the config.log.
6555
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
6556
     else
6557
       $2=yes
6558
     fi
6559
   fi
6560
   $rm conftest*
6561
   LDFLAGS="$save_LDFLAGS"
6562
])
6563
 
6564
if test x"[$]$2" = xyes; then
6565
    ifelse([$4], , :, [$4])
6566
else
6567
    ifelse([$5], , :, [$5])
6568
fi
6569
])
6570
m4trace:acinclude.m4:6613: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments
6571
AC_MSG_CHECKING([the maximum length of command line arguments])
6572
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6573
  i=0
6574
  testring="ABCD"
6575
 
6576
  case $build_os in
6577
  msdosdjgpp*)
6578
    # On DJGPP, this test can blow up pretty badly due to problems in libc
6579
    # (any single argument exceeding 2000 bytes causes a buffer overrun
6580
    # during glob expansion).  Even if it were fixed, the result of this
6581
    # check would be larger than it should be.
6582
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6583
    ;;
6584
 
6585
  gnu*)
6586
    # Under GNU Hurd, this test is not required because there is
6587
    # no limit to the length of command line arguments.
6588
    # Libtool will interpret -1 as no limit whatsoever
6589
    lt_cv_sys_max_cmd_len=-1;
6590
    ;;
6591
 
6592
  cygwin* | mingw*)
6593
    # On Win9x/ME, this test blows up -- it succeeds, but takes
6594
    # about 5 minutes as the teststring grows exponentially.
6595
    # Worse, since 9x/ME are not pre-emptively multitasking,
6596
    # you end up with a "frozen" computer, even though with patience
6597
    # the test eventually succeeds (with a max line length of 256k).
6598
    # Instead, let's just punt: use the minimum linelength reported by
6599
    # all of the supported platforms: 8192 (on NT/2K/XP).
6600
    lt_cv_sys_max_cmd_len=8192;
6601
    ;;
6602
 
6603
 *)
6604
    # If test is not a shell built-in, we'll probably end up computing a
6605
    # maximum length that is only half of the actual maximum length, but
6606
    # we can't tell.
6607
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6608
	       = "XX$testring") >/dev/null 2>&1 &&
6609
	    new_result=`expr "X$testring" : ".*" 2>&1` &&
6610
	    lt_cv_sys_max_cmd_len=$new_result &&
6611
	    test $i != 17 # 1/2 MB should be enough
6612
    do
6613
      i=`expr $i + 1`
6614
      testring=$testring$testring
6615
    done
6616
    testring=
6617
    # Add a significant safety factor because C++ compilers can tack on massive
6618
    # amounts of additional arguments before passing them to the linker.
6619
    # It appears as though 1/2 is a usable value.
6620
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6621
    ;;
6622
  esac
6623
])
6624
if test -n $lt_cv_sys_max_cmd_len ; then
6625
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6626
else
6627
  AC_MSG_RESULT(none)
6628
fi
6629
])
6630
m4trace:acinclude.m4:6678: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl
6631
])
6632
m4trace:acinclude.m4:6686: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6633
if test "$cross_compiling" = yes; then :
6634
  [$4]
6635
else
6636
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6637
  lt_status=$lt_dlunknown
6638
  cat > conftest.$ac_ext <<EOF
6639
[#line __oline__ "configure"
6640
#include "confdefs.h"
6641
 
6642
#if HAVE_DLFCN_H
6643
#include <dlfcn.h>
6644
#endif
6645
 
6646
#include <stdio.h>
6647
 
6648
#ifdef RTLD_GLOBAL
6649
#  define LT_DLGLOBAL		RTLD_GLOBAL
6650
#else
6651
#  ifdef DL_GLOBAL
6652
#    define LT_DLGLOBAL		DL_GLOBAL
6653
#  else
6654
#    define LT_DLGLOBAL		0
6655
#  endif
6656
#endif
6657
 
6658
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6659
   find out it does not work in some platform. */
6660
#ifndef LT_DLLAZY_OR_NOW
6661
#  ifdef RTLD_LAZY
6662
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
6663
#  else
6664
#    ifdef DL_LAZY
6665
#      define LT_DLLAZY_OR_NOW		DL_LAZY
6666
#    else
6667
#      ifdef RTLD_NOW
6668
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
6669
#      else
6670
#        ifdef DL_NOW
6671
#          define LT_DLLAZY_OR_NOW	DL_NOW
6672
#        else
6673
#          define LT_DLLAZY_OR_NOW	0
6674
#        endif
6675
#      endif
6676
#    endif
6677
#  endif
6678
#endif
6679
 
6680
#ifdef __cplusplus
6681
extern "C" void exit (int);
6682
#endif
6683
 
6684
void fnord() { int i=42;}
6685
int main ()
6686
{
6687
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6688
  int status = $lt_dlunknown;
6689
 
6690
  if (self)
6691
    {
6692
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6693
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6694
      /* dlclose (self); */
6695
    }
6696
 
6697
    exit (status);
6698
}]
6699
EOF
6700
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6701
    (./conftest; exit; ) 2>/dev/null
6702
    lt_status=$?
6703
    case x$lt_status in
6704
      x$lt_dlno_uscore) $1 ;;
6705
      x$lt_dlneed_uscore) $2 ;;
6706
      x$lt_unknown|x*) $3 ;;
6707
    esac
6708
  else :
6709
    # compilation failed
6710
    $3
6711
  fi
6712
fi
6713
rm -fr conftest*
6714
])
6715
m4trace:acinclude.m4:6774: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6716
if test "x$enable_dlopen" != xyes; then
6717
  enable_dlopen=unknown
6718
  enable_dlopen_self=unknown
6719
  enable_dlopen_self_static=unknown
6720
else
6721
  lt_cv_dlopen=no
6722
  lt_cv_dlopen_libs=
6723
 
6724
  case $host_os in
6725
  beos*)
6726
    lt_cv_dlopen="load_add_on"
6727
    lt_cv_dlopen_libs=
6728
    lt_cv_dlopen_self=yes
6729
    ;;
6730
 
6731
  mingw* | pw32*)
6732
    lt_cv_dlopen="LoadLibrary"
6733
    lt_cv_dlopen_libs=
6734
   ;;
6735
 
6736
  cygwin*)
6737
    lt_cv_dlopen="dlopen"
6738
    lt_cv_dlopen_libs=
6739
   ;;
6740
 
6741
  darwin*)
6742
  # if libdl is installed we need to link against it
6743
    AC_CHECK_LIB([dl], [dlopen],
6744
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6745
    lt_cv_dlopen="dyld"
6746
    lt_cv_dlopen_libs=
6747
    lt_cv_dlopen_self=yes
6748
    ])
6749
   ;;
6750
 
6751
  *)
6752
    AC_CHECK_FUNC([shl_load],
6753
	  [lt_cv_dlopen="shl_load"],
6754
      [AC_CHECK_LIB([dld], [shl_load],
6755
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6756
	[AC_CHECK_FUNC([dlopen],
6757
	      [lt_cv_dlopen="dlopen"],
6758
	  [AC_CHECK_LIB([dl], [dlopen],
6759
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6760
	    [AC_CHECK_LIB([svld], [dlopen],
6761
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6762
	      [AC_CHECK_LIB([dld], [dld_link],
6763
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6764
	      ])
6765
	    ])
6766
	  ])
6767
	])
6768
      ])
6769
    ;;
6770
  esac
6771
 
6772
  if test "x$lt_cv_dlopen" != xno; then
6773
    enable_dlopen=yes
6774
  else
6775
    enable_dlopen=no
6776
  fi
6777
 
6778
  case $lt_cv_dlopen in
6779
  dlopen)
6780
    save_CPPFLAGS="$CPPFLAGS"
6781
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6782
 
6783
    save_LDFLAGS="$LDFLAGS"
6784
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6785
 
6786
    save_LIBS="$LIBS"
6787
    LIBS="$lt_cv_dlopen_libs $LIBS"
6788
 
6789
    AC_CACHE_CHECK([whether a program can dlopen itself],
6790
	  lt_cv_dlopen_self, [dnl
6791
	  _LT_AC_TRY_DLOPEN_SELF(
6792
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6793
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6794
    ])
6795
 
6796
    if test "x$lt_cv_dlopen_self" = xyes; then
6797
      LDFLAGS="$LDFLAGS $link_static_flag"
6798
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6799
    	  lt_cv_dlopen_self_static, [dnl
6800
	  _LT_AC_TRY_DLOPEN_SELF(
6801
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6802
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
6803
      ])
6804
    fi
6805
 
6806
    CPPFLAGS="$save_CPPFLAGS"
6807
    LDFLAGS="$save_LDFLAGS"
6808
    LIBS="$save_LIBS"
6809
    ;;
6810
  esac
6811
 
6812
  case $lt_cv_dlopen_self in
6813
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6814
  *) enable_dlopen_self=unknown ;;
6815
  esac
6816
 
6817
  case $lt_cv_dlopen_self_static in
6818
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6819
  *) enable_dlopen_self_static=unknown ;;
6820
  esac
6821
fi
6822
])
6823
m4trace:acinclude.m4:6888: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6824
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6825
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6826
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6827
   $rm -r conftest 2>/dev/null
6828
   mkdir conftest
6829
   cd conftest
6830
   mkdir out
6831
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6832
 
6833
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6834
   # that will create temporary files in the current directory regardless of
6835
   # the output directory.  Thus, making CWD read-only will cause this test
6836
   # to fail, enabling locking or at least warning the user not to do parallel
6837
   # builds.
6838
   chmod -w .
6839
 
6840
   lt_compiler_flag="-o out/conftest2.$ac_objext"
6841
   # Insert the option either (1) after the last *FLAGS variable, or
6842
   # (2) before a word containing "conftest.", or (3) at the end.
6843
   # Note that $ac_compile itself does not contain backslashes and begins
6844
   # with a dollar sign (not a hyphen), so the echo should work correctly.
6845
   lt_compile=`echo "$ac_compile" | $SED \
6846
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6847
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6848
   -e 's:$: $lt_compiler_flag:'`
6849
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6850
   (eval "$lt_compile" 2>out/conftest.err)
6851
   ac_status=$?
6852
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
6853
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6854
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
6855
   then
6856
     # The compiler can only warn and ignore the option if not recognized
6857
     # So say no if there are warnings
6858
     if test ! -s out/conftest.err; then
6859
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6860
     fi
6861
   fi
6862
   chmod u+w .
6863
   $rm conftest* out/*
6864
   rmdir out
6865
   cd ..
6866
   rmdir conftest
6867
   $rm conftest*
6868
])
6869
])
6870
m4trace:acinclude.m4:6941: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl
6871
 
6872
hard_links="nottested"
6873
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6874
  # do not overwrite the value of need_locks provided by the user
6875
  AC_MSG_CHECKING([if we can lock with hard links])
6876
  hard_links=yes
6877
  $rm conftest*
6878
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6879
  touch conftest.a
6880
  ln conftest.a conftest.b 2>&5 || hard_links=no
6881
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6882
  AC_MSG_RESULT([$hard_links])
6883
  if test "$hard_links" = no; then
6884
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6885
    need_locks=warn
6886
  fi
6887
else
6888
  need_locks=no
6889
fi
6890
])
6891
m4trace:acinclude.m4:6967: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6892
[rm -f .libs 2>/dev/null
6893
mkdir .libs 2>/dev/null
6894
if test -d .libs; then
6895
  lt_cv_objdir=.libs
6896
else
6897
  # MS-DOS does not allow filenames that begin with a dot.
6898
  lt_cv_objdir=_libs
6899
fi
6900
rmdir .libs 2>/dev/null])
6901
objdir=$lt_cv_objdir
6902
])
6903
m4trace:acinclude.m4:6985: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs])
6904
_LT_AC_TAGVAR(hardcode_action, $1)=
6905
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6906
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6907
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6908
 
6909
  # We can hardcode non-existant directories.
6910
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6911
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
6912
     # have to relink, otherwise we might link with an installed library
6913
     # when we should be linking with a yet-to-be-installed one
6914
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6915
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6916
    # Linking always hardcodes the temporary library directory.
6917
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
6918
  else
6919
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
6920
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
6921
  fi
6922
else
6923
  # We cannot hardcode anything, or else we can only hardcode existing
6924
  # directories.
6925
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6926
fi
6927
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6928
 
6929
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6930
  # Fast installation is not supported
6931
  enable_fast_install=no
6932
elif test "$shlibpath_overrides_runpath" = yes ||
6933
     test "$enable_shared" = no; then
6934
  # Fast installation is not necessary
6935
  enable_fast_install=needless
6936
fi
6937
])
6938
m4trace:acinclude.m4:7025: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib=
6939
old_striplib=
6940
AC_MSG_CHECKING([whether stripping libraries is possible])
6941
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6942
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6943
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6944
  AC_MSG_RESULT([yes])
6945
else
6946
# FIXME - insert some real tests, host_os isn't really good enough
6947
  case $host_os in
6948
   darwin*)
6949
       if test -n "$STRIP" ; then
6950
         striplib="$STRIP -x"
6951
         AC_MSG_RESULT([yes])
6952
       else
6953
  AC_MSG_RESULT([no])
6954
fi
6955
       ;;
6956
   *)
6957
  AC_MSG_RESULT([no])
6958
    ;;
6959
  esac  
6960
fi
6961
])
6962
m4trace:acinclude.m4:7055: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics])
6963
library_names_spec=
6964
libname_spec='lib$name'
6965
soname_spec=
6966
shrext=".so"
6967
postinstall_cmds=
6968
postuninstall_cmds=
6969
finish_cmds=
6970
finish_eval=
6971
shlibpath_var=
6972
shlibpath_overrides_runpath=unknown
6973
version_type=none
6974
dynamic_linker="$host_os ld.so"
6975
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6976
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6977
need_lib_prefix=unknown
6978
hardcode_into_libs=no
6979
 
6980
# when you set need_version to no, make sure it does not cause -set_version
6981
# flags to be left without arguments
6982
need_version=unknown
6983
 
6984
case $host_os in
6985
aix3*)
6986
  version_type=linux
6987
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6988
  shlibpath_var=LIBPATH
6989
 
6990
  # AIX 3 has no versioning support, so we append a major version to the name.
6991
  soname_spec='${libname}${release}${shared_ext}$major'
6992
  ;;
6993
 
6994
aix4* | aix5*)
6995
  version_type=linux
6996
  need_lib_prefix=no
6997
  need_version=no
6998
  hardcode_into_libs=yes
6999
  if test "$host_cpu" = ia64; then
7000
    # AIX 5 supports IA64
7001
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
7002
    shlibpath_var=LD_LIBRARY_PATH
7003
  else
7004
    # With GCC up to 2.95.x, collect2 would create an import file
7005
    # for dependence libraries.  The import file would start with
7006
    # the line `#! .'.  This would cause the generated library to
7007
    # depend on `.', always an invalid library.  This was fixed in
7008
    # development snapshots of GCC prior to 3.0.
7009
    case $host_os in
7010
      aix4 | aix4.[[01]] | aix4.[[01]].*)
7011
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
7012
	   echo ' yes '
7013
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
7014
	:
7015
      else
7016
	can_build_shared=no
7017
      fi
7018
      ;;
7019
    esac
7020
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
7021
    # soname into executable. Probably we can add versioning support to
7022
    # collect2, so additional links can be useful in future.
7023
    if test "$aix_use_runtimelinking" = yes; then
7024
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
7025
      # instead of lib<name>.a to let people know that these are not
7026
      # typical AIX shared libraries.
7027
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7028
    else
7029
      # We preserve .a as extension for shared libraries through AIX4.2
7030
      # and later when we are not doing run time linking.
7031
      library_names_spec='${libname}${release}.a $libname.a'
7032
      soname_spec='${libname}${release}${shared_ext}$major'
7033
    fi
7034
    shlibpath_var=LIBPATH
7035
  fi
7036
  ;;
7037
 
7038
amigaos*)
7039
  library_names_spec='$libname.ixlibrary $libname.a'
7040
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
7041
  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'
7042
  ;;
7043
 
7044
beos*)
7045
  library_names_spec='${libname}${shared_ext}'
7046
  dynamic_linker="$host_os ld.so"
7047
  shlibpath_var=LIBRARY_PATH
7048
  ;;
7049
 
7050
bsdi4*)
7051
  version_type=linux
7052
  need_version=no
7053
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7054
  soname_spec='${libname}${release}${shared_ext}$major'
7055
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
7056
  shlibpath_var=LD_LIBRARY_PATH
7057
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
7058
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
7059
  # the default ld.so.conf also contains /usr/contrib/lib and
7060
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
7061
  # libtool to hard-code these into programs
7062
  ;;
7063
 
7064
cygwin* | mingw* | pw32*)
7065
  version_type=windows
7066
  shrext=".dll"
7067
  need_version=no
7068
  need_lib_prefix=no
7069
 
7070
  case $GCC,$host_os in
7071
  yes,cygwin* | yes,mingw* | yes,pw32*)
7072
    library_names_spec='$libname.dll.a'
7073
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
7074
    postinstall_cmds='base_file=`basename \${file}`~
7075
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
7076
      dldir=$destdir/`dirname \$dlpath`~
7077
      test -d \$dldir || mkdir -p \$dldir~
7078
      $install_prog $dir/$dlname \$dldir/$dlname'
7079
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
7080
      dlpath=$dir/\$dldll~
7081
       $rm \$dlpath'
7082
    shlibpath_overrides_runpath=yes
7083
 
7084
    case $host_os in
7085
    cygwin*)
7086
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
7087
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7088
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
7089
      ;;
7090
    mingw*)
7091
      # MinGW DLLs use traditional 'lib' prefix
7092
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7093
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
7094
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
7095
        # It is most probably a Windows format PATH printed by
7096
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
7097
        # path with ; separators, and with drive letters. We can handle the
7098
        # drive letters (cygwin fileutils understands them), so leave them,
7099
        # especially as we might pass files found there to a mingw objdump,
7100
        # which wouldn't understand a cygwinified path. Ahh.
7101
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
7102
      else
7103
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
7104
      fi
7105
      ;;
7106
    pw32*)
7107
      # pw32 DLLs use 'pw' prefix rather than 'lib'
7108
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
7109
      ;;
7110
    esac
7111
    ;;
7112
 
7113
  *)
7114
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
7115
    ;;
7116
  esac
7117
  dynamic_linker='Win32 ld.exe'
7118
  # FIXME: first we should search . and the directory the executable is in
7119
  shlibpath_var=PATH
7120
  ;;
7121
 
7122
darwin* | rhapsody*)
7123
  dynamic_linker="$host_os dyld"
7124
  version_type=darwin
7125
  need_lib_prefix=no
7126
  need_version=no
7127
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
7128
  soname_spec='${libname}${release}${major}$shared_ext'
7129
  shlibpath_overrides_runpath=yes
7130
  shlibpath_var=DYLD_LIBRARY_PATH
7131
  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
7132
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
7133
  if test "$GCC" = yes; then
7134
    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"`
7135
  else
7136
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
7137
  fi
7138
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
7139
  ;;
7140
 
7141
dgux*)
7142
  version_type=linux
7143
  need_lib_prefix=no
7144
  need_version=no
7145
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
7146
  soname_spec='${libname}${release}${shared_ext}$major'
7147
  shlibpath_var=LD_LIBRARY_PATH
7148
  ;;
7149
 
7150
freebsd1*)
7151
  dynamic_linker=no
7152
  ;;
7153
 
7154
kfreebsd*-gnu*)
7155
  version_type=linux
7156
  need_lib_prefix=no
7157
  need_version=no
7158
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7159
  soname_spec='${libname}${release}${shared_ext}$major'
7160
  shlibpath_var=LD_LIBRARY_PATH
7161
  shlibpath_overrides_runpath=no
7162
  hardcode_into_libs=yes
7163
  dynamic_linker='GNU ld.so'
7164
  ;;
7165
 
7166
freebsd*)
7167
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
7168
  version_type=freebsd-$objformat
7169
  case $version_type in
7170
    freebsd-elf*)
7171
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7172
      need_version=no
7173
      need_lib_prefix=no
7174
      ;;
7175
    freebsd-*)
7176
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
7177
      need_version=yes
7178
      ;;
7179
  esac
7180
  shlibpath_var=LD_LIBRARY_PATH
7181
  case $host_os in
7182
  freebsd2*)
7183
    shlibpath_overrides_runpath=yes
7184
    ;;
7185
  freebsd3.[01]* | freebsdelf3.[01]*)
7186
    shlibpath_overrides_runpath=yes
7187
    hardcode_into_libs=yes
7188
    ;;
7189
  *) # from 3.2 on
7190
    shlibpath_overrides_runpath=no
7191
    hardcode_into_libs=yes
7192
    ;;
7193
  esac
7194
  ;;
7195
 
7196
gnu*)
7197
  version_type=linux
7198
  need_lib_prefix=no
7199
  need_version=no
7200
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
7201
  soname_spec='${libname}${release}${shared_ext}$major'
7202
  shlibpath_var=LD_LIBRARY_PATH
7203
  hardcode_into_libs=yes
7204
  ;;
7205
 
7206
hpux9* | hpux10* | hpux11*)
7207
  # Give a soname corresponding to the major version so that dld.sl refuses to
7208
  # link against other versions.
7209
  version_type=sunos
7210
  need_lib_prefix=no
7211
  need_version=no
7212
  case "$host_cpu" in
7213
  ia64*)
7214
    shrext='.so'
7215
    hardcode_into_libs=yes
7216
    dynamic_linker="$host_os dld.so"
7217
    shlibpath_var=LD_LIBRARY_PATH
7218
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7219
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7220
    soname_spec='${libname}${release}${shared_ext}$major'
7221
    if test "X$HPUX_IA64_MODE" = X32; then
7222
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
7223
    else
7224
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
7225
    fi
7226
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7227
    ;;
7228
   hppa*64*)
7229
     shrext='.sl'
7230
     hardcode_into_libs=yes
7231
     dynamic_linker="$host_os dld.sl"
7232
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
7233
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7234
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7235
     soname_spec='${libname}${release}${shared_ext}$major'
7236
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
7237
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7238
     ;;
7239
   *)
7240
    shrext='.sl'
7241
    dynamic_linker="$host_os dld.sl"
7242
    shlibpath_var=SHLIB_PATH
7243
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7244
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7245
    soname_spec='${libname}${release}${shared_ext}$major'
7246
    ;;
7247
  esac
7248
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
7249
  postinstall_cmds='chmod 555 $lib'
7250
  ;;
7251
 
7252
irix5* | irix6* | nonstopux*)
7253
  case $host_os in
7254
    nonstopux*) version_type=nonstopux ;;
7255
    *)
7256
	if test "$lt_cv_prog_gnu_ld" = yes; then
7257
		version_type=linux
7258
	else
7259
		version_type=irix
7260
	fi ;;
7261
  esac
7262
  need_lib_prefix=no
7263
  need_version=no
7264
  soname_spec='${libname}${release}${shared_ext}$major'
7265
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7266
  case $host_os in
7267
  irix5* | nonstopux*)
7268
    libsuff= shlibsuff=
7269
    ;;
7270
  *)
7271
    case $LD in # libtool.m4 will add one of these switches to LD
7272
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7273
      libsuff= shlibsuff= libmagic=32-bit;;
7274
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7275
      libsuff=32 shlibsuff=N32 libmagic=N32;;
7276
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7277
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
7278
    *) libsuff= shlibsuff= libmagic=never-match;;
7279
    esac
7280
    ;;
7281
  esac
7282
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7283
  shlibpath_overrides_runpath=no
7284
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7285
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7286
  hardcode_into_libs=yes
7287
  ;;
7288
 
7289
# No shared lib support for Linux oldld, aout, or coff.
7290
linux*oldld* | linux*aout* | linux*coff*)
7291
  dynamic_linker=no
7292
  ;;
7293
 
7294
# This must be Linux ELF.
7295
linux*)
7296
  version_type=linux
7297
  need_lib_prefix=no
7298
  need_version=no
7299
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7300
  soname_spec='${libname}${release}${shared_ext}$major'
7301
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7302
  libsuff=
7303
  if test "x$LINUX_64_MODE" = x64; then
7304
    # Some platforms are per default 64-bit, so there's no /lib64
7305
    if test -d /lib64 -a ! -h /lib64; then
7306
      libsuff=64
7307
    fi
7308
  fi
7309
  shlibpath_var=LD_LIBRARY_PATH
7310
  shlibpath_overrides_runpath=no
7311
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
7312
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
7313
  # This implies no fast_install, which is unacceptable.
7314
  # Some rework will be needed to allow for fast_install
7315
  # before this can be enabled.
7316
  hardcode_into_libs=yes
7317
 
7318
  # We used to test for /lib/ld.so.1 and disable shared libraries on
7319
  # powerpc, because MkLinux only supported shared libraries with the
7320
  # GNU dynamic linker.  Since this was broken with cross compilers,
7321
  # most powerpc-linux boxes support dynamic linking these days and
7322
  # people can always --disable-shared, the test was removed, and we
7323
  # assume the GNU/Linux dynamic linker is in use.
7324
  dynamic_linker='GNU/Linux ld.so'
7325
  ;;
7326
 
7327
netbsd*)
7328
  version_type=sunos
7329
  need_lib_prefix=no
7330
  need_version=no
7331
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7332
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7333
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7334
    dynamic_linker='NetBSD (a.out) ld.so'
7335
  else
7336
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
7337
    soname_spec='${libname}${release}${shared_ext}$major'
7338
    dynamic_linker='NetBSD ld.elf_so'
7339
  fi
7340
  shlibpath_var=LD_LIBRARY_PATH
7341
  shlibpath_overrides_runpath=yes
7342
  hardcode_into_libs=yes
7343
  ;;
7344
 
7345
newsos6)
7346
  version_type=linux
7347
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7348
  shlibpath_var=LD_LIBRARY_PATH
7349
  shlibpath_overrides_runpath=yes
7350
  ;;
7351
 
7352
nto-qnx*)
7353
  version_type=linux
7354
  need_lib_prefix=no
7355
  need_version=no
7356
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7357
  soname_spec='${libname}${release}${shared_ext}$major'
7358
  shlibpath_var=LD_LIBRARY_PATH
7359
  shlibpath_overrides_runpath=yes
7360
  ;;
7361
 
7362
openbsd*)
7363
  version_type=sunos
7364
  need_lib_prefix=no
7365
  need_version=no
7366
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7367
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7368
  shlibpath_var=LD_LIBRARY_PATH
7369
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7370
    case $host_os in
7371
      openbsd2.[[89]] | openbsd2.[[89]].*)
7372
	shlibpath_overrides_runpath=no
7373
	;;
7374
      *)
7375
	shlibpath_overrides_runpath=yes
7376
	;;
7377
      esac
7378
  else
7379
    shlibpath_overrides_runpath=yes
7380
  fi
7381
  ;;
7382
 
7383
os2*)
7384
  libname_spec='$name'
7385
  shrext=".dll"
7386
  need_lib_prefix=no
7387
  library_names_spec='$libname${shared_ext} $libname.a'
7388
  dynamic_linker='OS/2 ld.exe'
7389
  shlibpath_var=LIBPATH
7390
  ;;
7391
 
7392
osf3* | osf4* | osf5*)
7393
  version_type=osf
7394
  need_lib_prefix=no
7395
  need_version=no
7396
  soname_spec='${libname}${release}${shared_ext}$major'
7397
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7398
  shlibpath_var=LD_LIBRARY_PATH
7399
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7400
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7401
  ;;
7402
 
7403
sco3.2v5*)
7404
  version_type=osf
7405
  soname_spec='${libname}${release}${shared_ext}$major'
7406
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7407
  shlibpath_var=LD_LIBRARY_PATH
7408
  ;;
7409
 
7410
solaris*)
7411
  version_type=linux
7412
  need_lib_prefix=no
7413
  need_version=no
7414
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7415
  soname_spec='${libname}${release}${shared_ext}$major'
7416
  shlibpath_var=LD_LIBRARY_PATH
7417
  shlibpath_overrides_runpath=yes
7418
  hardcode_into_libs=yes
7419
  # ldd complains unless libraries are executable
7420
  postinstall_cmds='chmod +x $lib'
7421
  ;;
7422
 
7423
sunos4*)
7424
  version_type=sunos
7425
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7426
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7427
  shlibpath_var=LD_LIBRARY_PATH
7428
  shlibpath_overrides_runpath=yes
7429
  if test "$with_gnu_ld" = yes; then
7430
    need_lib_prefix=no
7431
  fi
7432
  need_version=yes
7433
  ;;
7434
 
7435
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7436
  version_type=linux
7437
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7438
  soname_spec='${libname}${release}${shared_ext}$major'
7439
  shlibpath_var=LD_LIBRARY_PATH
7440
  case $host_vendor in
7441
    sni)
7442
      shlibpath_overrides_runpath=no
7443
      need_lib_prefix=no
7444
      export_dynamic_flag_spec='${wl}-Blargedynsym'
7445
      runpath_var=LD_RUN_PATH
7446
      ;;
7447
    siemens)
7448
      need_lib_prefix=no
7449
      ;;
7450
    motorola)
7451
      need_lib_prefix=no
7452
      need_version=no
7453
      shlibpath_overrides_runpath=no
7454
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7455
      ;;
7456
  esac
7457
  ;;
7458
 
7459
sysv4*MP*)
7460
  if test -d /usr/nec ;then
7461
    version_type=linux
7462
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7463
    soname_spec='$libname${shared_ext}.$major'
7464
    shlibpath_var=LD_LIBRARY_PATH
7465
  fi
7466
  ;;
7467
 
7468
uts4*)
7469
  version_type=linux
7470
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7471
  soname_spec='${libname}${release}${shared_ext}$major'
7472
  shlibpath_var=LD_LIBRARY_PATH
7473
  ;;
7474
 
7475
*)
7476
  dynamic_linker=no
7477
  ;;
7478
esac
7479
AC_MSG_RESULT([$dynamic_linker])
7480
test "$dynamic_linker" = no && can_build_shared=no
7481
])
7482
m4trace:acinclude.m4:7580: -1- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags],
7483
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7484
        [include additional configurations @<:@automatic@:>@])],
7485
    [tagnames="$withval"])
7486
 
7487
if test -f "$ltmain" && test -n "$tagnames"; then
7488
  if test ! -f "${ofile}"; then
7489
    AC_MSG_WARN([output file `$ofile' does not exist])
7490
  fi
7491
 
7492
  if test -z "$LTCC"; then
7493
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7494
    if test -z "$LTCC"; then
7495
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7496
    else
7497
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7498
    fi
7499
  fi
7500
 
7501
  # Extract list of available tagged configurations in $ofile.
7502
  # Note that this assumes the entire list is on one line.
7503
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7504
 
7505
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7506
  for tagname in $tagnames; do
7507
    IFS="$lt_save_ifs"
7508
    # Check whether tagname contains only valid characters
7509
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7510
    "") ;;
7511
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
7512
	;;
7513
    esac
7514
 
7515
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7516
    then
7517
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
7518
    fi
7519
 
7520
    # Update the list of available tags.
7521
    if test -n "$tagname"; then
7522
      echo appending configuration tag \"$tagname\" to $ofile
7523
 
7524
      case $tagname in
7525
      CXX)
7526
	if test -n "$CXX" && test "X$CXX" != "Xno"; then
7527
	  AC_LIBTOOL_LANG_CXX_CONFIG
7528
	else
7529
	  tagname=""
7530
	fi
7531
	;;
7532
 
7533
      F77)
7534
	if test -n "$F77" && test "X$F77" != "Xno"; then
7535
	  AC_LIBTOOL_LANG_F77_CONFIG
7536
	else
7537
	  tagname=""
7538
	fi
7539
	;;
7540
 
7541
      GCJ)
7542
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7543
	  AC_LIBTOOL_LANG_GCJ_CONFIG
7544
	else
7545
	  tagname=""
7546
	fi
7547
	;;
7548
 
7549
      RC)
7550
	AC_LIBTOOL_LANG_RC_CONFIG
7551
	;;
7552
 
7553
      *)
7554
	AC_MSG_ERROR([Unsupported tag name: $tagname])
7555
	;;
7556
      esac
7557
 
7558
      # Append the new tag name to the list of available tags.
7559
      if test -n "$tagname" ; then
7560
      available_tags="$available_tags $tagname"
7561
    fi
7562
    fi
7563
  done
7564
  IFS="$lt_save_ifs"
7565
 
7566
  # Now substitute the updated list of available tags.
7567
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7568
    mv "${ofile}T" "$ofile"
7569
    chmod +x "$ofile"
7570
  else
7571
    rm -f "${ofile}T"
7572
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
7573
  fi
7574
fi
7575
])
7576
m4trace:acinclude.m4:7680: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7577
])
7578
m4trace:acinclude.m4:7688: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7579
])
7580
m4trace:acinclude.m4:7697: -1- AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7581
AC_ARG_ENABLE([shared],
7582
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7583
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7584
    [p=${PACKAGE-default}
7585
    case $enableval in
7586
    yes) enable_shared=yes ;;
7587
    no) enable_shared=no ;;
7588
    *)
7589
      enable_shared=no
7590
      # Look at the argument we got.  We use all the common list separators.
7591
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7592
      for pkg in $enableval; do
7593
	IFS="$lt_save_ifs"
7594
	if test "X$pkg" = "X$p"; then
7595
	  enable_shared=yes
7596
	fi
7597
      done
7598
      IFS="$lt_save_ifs"
7599
      ;;
7600
    esac],
7601
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7602
])
7603
m4trace:acinclude.m4:7726: -1- AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7604
AC_ENABLE_SHARED(no)
7605
])
7606
m4trace:acinclude.m4:7736: -1- AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7607
AC_ARG_ENABLE([static],
7608
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7609
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7610
    [p=${PACKAGE-default}
7611
    case $enableval in
7612
    yes) enable_static=yes ;;
7613
    no) enable_static=no ;;
7614
    *)
7615
     enable_static=no
7616
      # Look at the argument we got.  We use all the common list separators.
7617
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7618
      for pkg in $enableval; do
7619
	IFS="$lt_save_ifs"
7620
	if test "X$pkg" = "X$p"; then
7621
	  enable_static=yes
7622
	fi
7623
      done
7624
      IFS="$lt_save_ifs"
7625
      ;;
7626
    esac],
7627
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7628
])
7629
m4trace:acinclude.m4:7765: -1- AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7630
AC_ENABLE_STATIC(no)
7631
])
7632
m4trace:acinclude.m4:7775: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7633
AC_ARG_ENABLE([fast-install],
7634
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7635
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7636
    [p=${PACKAGE-default}
7637
    case $enableval in
7638
    yes) enable_fast_install=yes ;;
7639
    no) enable_fast_install=no ;;
7640
    *)
7641
      enable_fast_install=no
7642
      # Look at the argument we got.  We use all the common list separators.
7643
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7644
      for pkg in $enableval; do
7645
	IFS="$lt_save_ifs"
7646
	if test "X$pkg" = "X$p"; then
7647
	  enable_fast_install=yes
7648
	fi
7649
      done
7650
      IFS="$lt_save_ifs"
7651
      ;;
7652
    esac],
7653
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7654
])
7655
m4trace:acinclude.m4:7804: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7656
AC_ENABLE_FAST_INSTALL(no)
7657
])
7658
m4trace:acinclude.m4:7814: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7659
pic_mode=ifelse($#,1,$1,default)
7660
])
7661
m4trace:acinclude.m4:7838: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl
7662
AC_MSG_CHECKING([for $1])
7663
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7664
[case $MAGIC_CMD in
7665
[[\\/*] |  ?:[\\/]*])
7666
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7667
  ;;
7668
*)
7669
  lt_save_MAGIC_CMD="$MAGIC_CMD"
7670
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7671
dnl $ac_dummy forces splitting on constant user-supplied paths.
7672
dnl POSIX.2 word splitting is done only on the output of word expansions,
7673
dnl not every word.  This closes a longstanding sh security hole.
7674
  ac_dummy="ifelse([$2], , $PATH, [$2])"
7675
  for ac_dir in $ac_dummy; do
7676
    IFS="$lt_save_ifs"
7677
    test -z "$ac_dir" && ac_dir=.
7678
    if test -f $ac_dir/$1; then
7679
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7680
      if test -n "$file_magic_test_file"; then
7681
	case $deplibs_check_method in
7682
	"file_magic "*)
7683
	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7684
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7685
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7686
	    $EGREP "$file_magic_regex" > /dev/null; then
7687
	    :
7688
	  else
7689
	    cat <<EOF 1>&2
7690
 
7691
*** Warning: the command libtool uses to detect shared libraries,
7692
*** $file_magic_cmd, produces output that libtool cannot recognize.
7693
*** The result is that libtool may fail to recognize shared libraries
7694
*** as such.  This will affect the creation of libtool libraries that
7695
*** depend on shared libraries, but programs linked with such libtool
7696
*** libraries will work regardless of this problem.  Nevertheless, you
7697
*** may want to report the problem to your system manager and/or to
7698
*** bug-libtool@gnu.org
7699
 
7700
EOF
7701
	  fi ;;
7702
	esac
7703
      fi
7704
      break
7705
    fi
7706
  done
7707
  IFS="$lt_save_ifs"
7708
  MAGIC_CMD="$lt_save_MAGIC_CMD"
7709
  ;;
7710
esac])
7711
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7712
if test -n "$MAGIC_CMD"; then
7713
  AC_MSG_RESULT($MAGIC_CMD)
7714
else
7715
  AC_MSG_RESULT(no)
7716
fi
7717
])
7718
m4trace:acinclude.m4:7901: -1- AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7719
if test -z "$lt_cv_path_MAGIC_CMD"; then
7720
  if test -n "$ac_tool_prefix"; then
7721
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7722
  else
7723
    MAGIC_CMD=:
7724
  fi
7725
fi
7726
])
7727
m4trace:acinclude.m4:7916: -1- AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld],
7728
    [AC_HELP_STRING([--with-gnu-ld],
7729
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7730
    [test "$withval" = no || with_gnu_ld=yes],
7731
    [with_gnu_ld=no])
7732
AC_REQUIRE([LT_AC_PROG_SED])dnl
7733
AC_REQUIRE([AC_PROG_CC])dnl
7734
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7735
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7736
ac_prog=ld
7737
if test "$GCC" = yes; then
7738
  # Check if gcc -print-prog-name=ld gives a path.
7739
  AC_MSG_CHECKING([for ld used by $CC])
7740
  case $host in
7741
  *-*-mingw*)
7742
    # gcc leaves a trailing carriage return which upsets mingw
7743
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7744
  *)
7745
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7746
  esac
7747
  case $ac_prog in
7748
    # Accept absolute paths.
7749
    [[\\/]]* | ?:[[\\/]]*)
7750
      re_direlt='/[[^/]][[^/]]*/\.\./'
7751
      # Canonicalize the pathname of ld
7752
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7753
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7754
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7755
      done
7756
      test -z "$LD" && LD="$ac_prog"
7757
      ;;
7758
  "")
7759
    # If it fails, then pretend we aren't using GCC.
7760
    ac_prog=ld
7761
    ;;
7762
  *)
7763
    # If it is relative, then search for the first ld in PATH.
7764
    with_gnu_ld=unknown
7765
    ;;
7766
  esac
7767
elif test "$with_gnu_ld" = yes; then
7768
  AC_MSG_CHECKING([for GNU ld])
7769
else
7770
  AC_MSG_CHECKING([for non-GNU ld])
7771
fi
7772
AC_CACHE_VAL(lt_cv_path_LD,
7773
[if test -z "$LD"; then
7774
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7775
  for ac_dir in $PATH; do
7776
    IFS="$lt_save_ifs"
7777
    test -z "$ac_dir" && ac_dir=.
7778
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7779
      lt_cv_path_LD="$ac_dir/$ac_prog"
7780
      # Check to see if the program is GNU ld.  I'd rather use --version,
7781
      # but apparently some GNU ld's only accept -v.
7782
      # Break only if it was the GNU/non-GNU ld that we prefer.
7783
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7784
      *GNU* | *'with BFD'*)
7785
	test "$with_gnu_ld" != no && break
7786
	;;
7787
      *)
7788
	test "$with_gnu_ld" != yes && break
7789
	;;
7790
      esac
7791
    fi
7792
  done
7793
  IFS="$lt_save_ifs"
7794
else
7795
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
7796
fi])
7797
LD="$lt_cv_path_LD"
7798
if test -n "$LD"; then
7799
  AC_MSG_RESULT($LD)
7800
else
7801
  AC_MSG_RESULT(no)
7802
fi
7803
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7804
AC_PROG_LD_GNU
7805
])
7806
m4trace:acinclude.m4:8000: -1- AC_DEFUN([AC_PROG_LD_GNU], [AC_REQUIRE([AC_PROG_EGREP])dnl
7807
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7808
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7809
case `$LD -v 2>&1 </dev/null` in
7810
*GNU* | *'with BFD'*)
7811
  lt_cv_prog_gnu_ld=yes
7812
  ;;
7813
*)
7814
  lt_cv_prog_gnu_ld=no
7815
  ;;
7816
esac])
7817
with_gnu_ld=$lt_cv_prog_gnu_ld
7818
])
7819
m4trace:acinclude.m4:8020: -1- AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], [AC_CACHE_CHECK([for $LD option to reload object files],
7820
  lt_cv_ld_reload_flag,
7821
  [lt_cv_ld_reload_flag='-r'])
7822
reload_flag=$lt_cv_ld_reload_flag
7823
case $reload_flag in
7824
"" | " "*) ;;
7825
*) reload_flag=" $reload_flag" ;;
7826
esac
7827
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7828
])
7829
m4trace:acinclude.m4:8037: -1- AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], [AC_CACHE_CHECK([how to recognise dependent libraries],
7830
lt_cv_deplibs_check_method,
7831
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7832
lt_cv_file_magic_test_file=
7833
lt_cv_deplibs_check_method='unknown'
7834
# Need to set the preceding variable on all platforms that support
7835
# interlibrary dependencies.
7836
# 'none' -- dependencies not supported.
7837
# `unknown' -- same as none, but documents that we really don't know.
7838
# 'pass_all' -- all dependencies passed with no checks.
7839
# 'test_compile' -- check by making test program.
7840
# 'file_magic [[regex]]' -- check by looking for files in library path
7841
# which responds to the $file_magic_cmd with a given extended regex.
7842
# If you have `file' or equivalent on your system and you're not sure
7843
# whether `pass_all' will *always* work, you probably want this one.
7844
 
7845
case $host_os in
7846
aix4* | aix5*)
7847
  lt_cv_deplibs_check_method=pass_all
7848
  ;;
7849
 
7850
beos*)
7851
  lt_cv_deplibs_check_method=pass_all
7852
  ;;
7853
 
7854
bsdi4*)
7855
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7856
  lt_cv_file_magic_cmd='/usr/bin/file -L'
7857
  lt_cv_file_magic_test_file=/shlib/libc.so
7858
  ;;
7859
 
7860
cygwin*)
7861
  lt_cv_deplibs_check_method=pass_all
7862
  ;;
7863
 
7864
mingw* | pw32*)
7865
  # win32_libid is a shell function defined in ltmain.sh
7866
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7867
  lt_cv_file_magic_cmd='win32_libid'
7868
  ;;
7869
 
7870
darwin* | rhapsody*)
7871
  # this will be overwritten by pass_all, but leave it in just in case
7872
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7873
  lt_cv_file_magic_cmd='/usr/bin/file -L'
7874
  case "$host_os" in
7875
  rhapsody* | darwin1.[[012]])
7876
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7877
    ;;
7878
  *) # Darwin 1.3 on
7879
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7880
    ;;
7881
  esac
7882
  lt_cv_deplibs_check_method=pass_all
7883
  ;;
7884
 
7885
freebsd* | kfreebsd*-gnu)
7886
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7887
    case $host_cpu in
7888
    i*86 )
7889
      # Not sure whether the presence of OpenBSD here was a mistake.
7890
      # Let's accept both of them until this is cleared up.
7891
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7892
      lt_cv_file_magic_cmd=/usr/bin/file
7893
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7894
      ;;
7895
    esac
7896
  else
7897
    lt_cv_deplibs_check_method=pass_all
7898
  fi
7899
  ;;
7900
 
7901
gnu*)
7902
  lt_cv_deplibs_check_method=pass_all
7903
  ;;
7904
 
7905
hpux10.20* | hpux11*)
7906
  lt_cv_file_magic_cmd=/usr/bin/file
7907
  case "$host_cpu" in
7908
  ia64*)
7909
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7910
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7911
    ;;
7912
  hppa*64*)
7913
    [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]']
7914
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7915
    ;;
7916
  *)
7917
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7918
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7919
    ;;
7920
  esac
7921
  ;;
7922
 
7923
irix5* | irix6* | nonstopux*)
7924
  case $host_os in
7925
  irix5* | nonstopux*)
7926
    # this will be overridden with pass_all, but let us keep it just in case
7927
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7928
    ;;
7929
  *)
7930
    case $LD in
7931
    *-32|*"-32 ") libmagic=32-bit;;
7932
    *-n32|*"-n32 ") libmagic=N32;;
7933
    *-64|*"-64 ") libmagic=64-bit;;
7934
    *) libmagic=never-match;;
7935
    esac
7936
    # this will be overridden with pass_all, but let us keep it just in case
7937
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7938
    ;;
7939
  esac
7940
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7941
  lt_cv_deplibs_check_method=pass_all
7942
  ;;
7943
 
7944
# This must be Linux ELF.
7945
linux*)
7946
  case $host_cpu in
7947
  alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
7948
    lt_cv_deplibs_check_method=pass_all ;;
7949
  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
7950
  arm* )
7951
    lt_cv_deplibs_check_method=pass_all ;;
7952
  *)
7953
    # glibc up to 2.1.1 does not perform some relocations on ARM
7954
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7955
  esac
7956
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7957
  ;;
7958
 
7959
netbsd*)
7960
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7961
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7962
  else
7963
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7964
  fi
7965
  ;;
7966
 
7967
newos6*)
7968
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7969
  lt_cv_file_magic_cmd=/usr/bin/file
7970
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7971
  ;;
7972
 
7973
nto-qnx*)
7974
  lt_cv_deplibs_check_method=unknown
7975
  ;;
7976
 
7977
openbsd*)
7978
  lt_cv_file_magic_cmd=/usr/bin/file
7979
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7980
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7981
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7982
  else
7983
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7984
  fi
7985
  ;;
7986
 
7987
osf3* | osf4* | osf5*)
7988
  # this will be overridden with pass_all, but let us keep it just in case
7989
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7990
  lt_cv_file_magic_test_file=/shlib/libc.so
7991
  lt_cv_deplibs_check_method=pass_all
7992
  ;;
7993
 
7994
sco3.2v5*)
7995
  lt_cv_deplibs_check_method=pass_all
7996
  ;;
7997
 
7998
solaris*)
7999
  lt_cv_deplibs_check_method=pass_all
8000
  lt_cv_file_magic_test_file=/lib/libc.so
8001
  ;;
8002
 
8003
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8004
  case $host_vendor in
8005
  motorola)
8006
    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]]'
8007
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8008
    ;;
8009
  ncr)
8010
    lt_cv_deplibs_check_method=pass_all
8011
    ;;
8012
  sequent)
8013
    lt_cv_file_magic_cmd='/bin/file'
8014
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
8015
    ;;
8016
  sni)
8017
    lt_cv_file_magic_cmd='/bin/file'
8018
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
8019
    lt_cv_file_magic_test_file=/lib/libc.so
8020
    ;;
8021
  siemens)
8022
    lt_cv_deplibs_check_method=pass_all
8023
    ;;
8024
  esac
8025
  ;;
8026
 
8027
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
8028
  lt_cv_deplibs_check_method=pass_all
8029
  ;;
8030
esac
8031
])
8032
file_magic_cmd=$lt_cv_file_magic_cmd
8033
deplibs_check_method=$lt_cv_deplibs_check_method
8034
test -z "$deplibs_check_method" && deplibs_check_method=unknown
8035
])
8036
m4trace:acinclude.m4:8250: -1- AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
8037
[if test -n "$NM"; then
8038
  # Let the user override the test.
8039
  lt_cv_path_NM="$NM"
8040
else
8041
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8042
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
8043
    IFS="$lt_save_ifs"
8044
    test -z "$ac_dir" && ac_dir=.
8045
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
8046
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
8047
      # Check to see if the nm accepts a BSD-compat flag.
8048
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
8049
      #   nm: unknown option "B" ignored
8050
      # Tru64's nm complains that /dev/null is an invalid object file
8051
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
8052
      */dev/null* | *'Invalid file or object type'*)
8053
	lt_cv_path_NM="$tmp_nm -B"
8054
	break
8055
        ;;
8056
      *)
8057
	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8058
	*/dev/null*)
8059
	  lt_cv_path_NM="$tmp_nm -p"
8060
	  break
8061
	  ;;
8062
	*)
8063
	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8064
	  continue # so that we can try to find one that supports BSD flags
8065
	  ;;
8066
	esac
8067
      esac
8068
    fi
8069
  done
8070
  IFS="$lt_save_ifs"
8071
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
8072
fi])
8073
NM="$lt_cv_path_NM"
8074
])
8075
m4trace:acinclude.m4:8295: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8076
LIBM=
8077
case $host in
8078
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
8079
  # These system don't have libm, or don't need it
8080
  ;;
8081
*-ncr-sysv4.3*)
8082
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
8083
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
8084
  ;;
8085
*)
8086
  AC_CHECK_LIB(m, cos, LIBM="-lm")
8087
  ;;
8088
esac
8089
])
8090
m4trace:acinclude.m4:8324: -1- AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8091
  case $enable_ltdl_convenience in
8092
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8093
  "") enable_ltdl_convenience=yes
8094
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8095
  esac
8096
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
8097
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8098
  # For backwards non-gettext consistent compatibility...
8099
  INCLTDL="$LTDLINCL"
8100
])
8101
m4trace:acinclude.m4:8350: -1- AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8102
  AC_CHECK_LIB(ltdl, lt_dlinit,
8103
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8104
  [if test x"$enable_ltdl_install" = xno; then
8105
     AC_MSG_WARN([libltdl not installed, but installation disabled])
8106
   else
8107
     enable_ltdl_install=yes
8108
   fi
8109
  ])
8110
  if test x"$enable_ltdl_install" = x"yes"; then
8111
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
8112
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8113
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8114
  else
8115
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8116
    LIBLTDL="-lltdl"
8117
    LTDLINCL=
8118
  fi
8119
  # For backwards non-gettext consistent compatibility...
8120
  INCLTDL="$LTDLINCL"
8121
])
8122
m4trace:acinclude.m4:8377: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX])
8123
])
8124
m4trace:acinclude.m4:8384: -1- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX])
8125
AC_REQUIRE([AC_PROG_CXXCPP])
8126
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8127
])
8128
m4trace:acinclude.m4:8394: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77])
8129
])
8130
m4trace:acinclude.m4:8401: -1- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77])
8131
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8132
])
8133
m4trace:acinclude.m4:8410: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ])
8134
])
8135
m4trace:acinclude.m4:8417: -1- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8136
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8137
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8138
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8139
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8140
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8141
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8142
])
8143
m4trace:acinclude.m4:8431: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC])
8144
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8145
])
8146
m4trace:acinclude.m4:8442: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8147
m4trace:acinclude.m4:8443: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC"
8148
AC_LANG_PUSH(C)
8149
 
8150
# Source file extension for C test sources.
8151
ac_ext=c
8152
 
8153
# Object file extension for compiled C test sources.
8154
objext=o
8155
_LT_AC_TAGVAR(objext, $1)=$objext
8156
 
8157
# Code to be used in simple compile tests
8158
lt_simple_compile_test_code="int some_variable = 0;\n"
8159
 
8160
# Code to be used in simple link tests
8161
lt_simple_link_test_code='int main(){return(0);}\n'
8162
 
8163
_LT_AC_SYS_COMPILER
8164
 
8165
#
8166
# Check for any special shared library compilation flags.
8167
#
8168
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
8169
if test "$GCC" = no; then
8170
  case $host_os in
8171
  sco3.2v5*)
8172
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
8173
    ;;
8174
  esac
8175
fi
8176
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
8177
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
8178
  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
8179
  else
8180
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
8181
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
8182
  fi
8183
fi
8184
 
8185
 
8186
#
8187
# Check to make sure the static flag actually works.
8188
#
8189
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
8190
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
8191
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
8192
  [],
8193
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
8194
 
8195
 
8196
## CAVEAT EMPTOR:
8197
## There is no encapsulation within the following macros, do not change
8198
## the running order or otherwise move them around unless you know exactly
8199
## what you are doing...
8200
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8201
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8202
AC_LIBTOOL_PROG_CC_C_O($1)
8203
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8204
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8205
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8206
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8207
AC_LIBTOOL_SYS_LIB_STRIP
8208
AC_LIBTOOL_DLOPEN_SELF($1)
8209
 
8210
# Report which librarie types wil actually be built
8211
AC_MSG_CHECKING([if libtool supports shared libraries])
8212
AC_MSG_RESULT([$can_build_shared])
8213
 
8214
AC_MSG_CHECKING([whether to build shared libraries])
8215
test "$can_build_shared" = "no" && enable_shared=no
8216
 
8217
# On AIX, shared libraries and static libraries use the same namespace, and
8218
# are all built from PIC.
8219
case "$host_os" in
8220
aix3*)
8221
  test "$enable_shared" = yes && enable_static=no
8222
  if test -n "$RANLIB"; then
8223
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
8224
    postinstall_cmds='$RANLIB $lib'
8225
  fi
8226
  ;;
8227
 
8228
aix4*)
8229
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8230
    test "$enable_shared" = yes && enable_static=no
8231
  fi
8232
  ;;
8233
  darwin* | rhapsody*)
8234
  if test "$GCC" = yes; then
8235
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8236
    case "$host_os" in
8237
    rhapsody* | darwin1.[[012]])
8238
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8239
      ;;
8240
    *) # Darwin 1.3 on
8241
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8242
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8243
      else
8244
	case ${MACOSX_DEPLOYMENT_TARGET} in
8245
	  10.[012])
8246
	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8247
	    ;;
8248
	  10.*)
8249
	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8250
	    ;;
8251
	esac
8252
      fi
8253
      ;;
8254
    esac
8255
    output_verbose_link_cmd='echo'
8256
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8257
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8258
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8259
    _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 $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8260
    _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 $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8261
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
8262
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8263
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8264
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8265
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8266
  else
8267
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8268
  fi  
8269
    ;;  
8270
esac
8271
AC_MSG_RESULT([$enable_shared])
8272
 
8273
AC_MSG_CHECKING([whether to build static libraries])
8274
# Make sure either enable_shared or enable_static is yes.
8275
test "$enable_shared" = yes || enable_static=yes
8276
AC_MSG_RESULT([$enable_static])
8277
 
8278
AC_LIBTOOL_CONFIG($1)
8279
 
8280
AC_LANG_POP
8281
CC="$lt_save_CC"
8282
])
8283
m4trace:acinclude.m4:8587: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8284
m4trace:acinclude.m4:8588: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++)
8285
AC_REQUIRE([AC_PROG_CXX])
8286
AC_REQUIRE([AC_PROG_CXXCPP])
8287
 
8288
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8289
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8290
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8291
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8292
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8293
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8294
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8295
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8296
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8297
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8298
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8299
_LT_AC_TAGVAR(module_cmds, $1)=
8300
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8301
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8302
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8303
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8304
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8305
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8306
 
8307
# Dependencies to place before and after the object being linked:
8308
_LT_AC_TAGVAR(predep_objects, $1)=
8309
_LT_AC_TAGVAR(postdep_objects, $1)=
8310
_LT_AC_TAGVAR(predeps, $1)=
8311
_LT_AC_TAGVAR(postdeps, $1)=
8312
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8313
 
8314
# Source file extension for C++ test sources.
8315
ac_ext=cc
8316
 
8317
# Object file extension for compiled C++ test sources.
8318
objext=o
8319
_LT_AC_TAGVAR(objext, $1)=$objext
8320
 
8321
# Code to be used in simple compile tests
8322
lt_simple_compile_test_code="int some_variable = 0;\n"
8323
 
8324
# Code to be used in simple link tests
8325
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
8326
 
8327
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8328
_LT_AC_SYS_COMPILER
8329
 
8330
# Allow CC to be a program name with arguments.
8331
lt_save_CC=$CC
8332
lt_save_LD=$LD
8333
lt_save_GCC=$GCC
8334
GCC=$GXX
8335
lt_save_with_gnu_ld=$with_gnu_ld
8336
lt_save_path_LD=$lt_cv_path_LD
8337
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8338
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8339
else
8340
  unset lt_cv_prog_gnu_ld
8341
fi
8342
if test -n "${lt_cv_path_LDCXX+set}"; then
8343
  lt_cv_path_LD=$lt_cv_path_LDCXX
8344
else
8345
  unset lt_cv_path_LD
8346
fi
8347
test -z "${LDCXX+set}" || LD=$LDCXX
8348
CC=${CXX-"c++"}
8349
compiler=$CC
8350
_LT_AC_TAGVAR(compiler, $1)=$CC
8351
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8352
 
8353
# We don't want -fno-exception wen compiling C++ code, so set the
8354
# no_builtin_flag separately
8355
if test "$GXX" = yes; then
8356
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8357
else
8358
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8359
fi
8360
 
8361
if test "$GXX" = yes; then
8362
  # Set up default GNU C++ configuration
8363
 
8364
  AC_PROG_LD
8365
 
8366
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
8367
  # archiving commands below assume that GNU ld is being used.
8368
  if test "$with_gnu_ld" = yes; then
8369
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8370
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8371
 
8372
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8373
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8374
 
8375
    # If archive_cmds runs LD, not CC, wlarc should be empty
8376
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8377
    #     investigate it a little bit more. (MM)
8378
    wlarc='${wl}'
8379
 
8380
    # ancient GNU ld didn't support --whole-archive et. al.
8381
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8382
	grep 'no-whole-archive' > /dev/null; then
8383
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8384
    else
8385
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8386
    fi
8387
  else
8388
    with_gnu_ld=no
8389
    wlarc=
8390
 
8391
    # A generic and very simple default shared library creation
8392
    # command for GNU C++ for the case where it uses the native
8393
    # linker, instead of GNU ld.  If possible, this setting should
8394
    # overridden to take advantage of the native linker features on
8395
    # the platform it is being used on.
8396
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
8397
  fi
8398
 
8399
  # Commands to make compiler produce verbose output that lists
8400
  # what "hidden" libraries, object files and flags are used when
8401
  # linking a shared library.
8402
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8403
 
8404
else
8405
  GXX=no
8406
  with_gnu_ld=no
8407
  wlarc=
8408
fi
8409
 
8410
# PORTME: fill in a description of your system's C++ link characteristics
8411
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8412
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8413
case $host_os in
8414
  aix3*)
8415
    # FIXME: insert proper C++ library support
8416
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8417
    ;;
8418
  aix4* | aix5*)
8419
    if test "$host_cpu" = ia64; then
8420
      # On IA64, the linker does run time linking by default, so we don't
8421
      # have to do anything special.
8422
      aix_use_runtimelinking=no
8423
      exp_sym_flag='-Bexport'
8424
      no_entry_flag=""
8425
    else
8426
      # KDE requires run time linking.  Make it the default.
8427
      aix_use_runtimelinking=yes
8428
      exp_sym_flag='-bexport'
8429
      no_entry_flag='-bnoentry'
8430
    fi
8431
 
8432
    # When large executables or shared objects are built, AIX ld can
8433
    # have problems creating the table of contents.  If linking a library
8434
    # or program results in "error TOC overflow" add -mminimal-toc to
8435
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8436
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8437
 
8438
    _LT_AC_TAGVAR(archive_cmds, $1)=''
8439
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8440
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8441
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8442
 
8443
    if test "$GXX" = yes; then
8444
      case $host_os in aix4.[012]|aix4.[012].*)
8445
      # We only want to do this on AIX 4.2 and lower, the check
8446
      # below for broken collect2 doesn't work under 4.3+
8447
	collect2name=`${CC} -print-prog-name=collect2`
8448
	if test -f "$collect2name" && \
8449
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
8450
	then
8451
	  # We have reworked collect2
8452
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8453
	else
8454
	  # We have old collect2
8455
	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8456
	  # It fails to find uninstalled libraries when the uninstalled
8457
	  # path is not listed in the libpath.  Setting hardcode_minus_L
8458
	  # to unsupported forces relinking
8459
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8460
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8461
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8462
	fi
8463
      esac
8464
      shared_flag='-shared'
8465
    else
8466
      # not using gcc
8467
      if test "$host_cpu" = ia64; then
8468
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8469
	# chokes on -Wl,-G. The following line is correct:
8470
	shared_flag='-G'
8471
      else
8472
	if test "$aix_use_runtimelinking" = yes; then
8473
	  shared_flag='-qmkshrobj ${wl}-G'
8474
	else
8475
	  shared_flag='-qmkshrobj'
8476
	fi
8477
      fi
8478
    fi
8479
 
8480
    # Let the compiler handle the export list.
8481
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
8482
    if test "$aix_use_runtimelinking" = yes; then
8483
      # Warning - without using the other runtime loading flags (-brtl),
8484
      # -berok will link without error, but may produce a broken library.
8485
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8486
      # Determine the default libpath from the value encoded in an empty executable.
8487
      _LT_AC_SYS_LIBPATH_AIX
8488
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8489
 
8490
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8491
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8492
     else
8493
      if test "$host_cpu" = ia64; then
8494
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8495
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8496
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8497
      else
8498
	# Determine the default libpath from the value encoded in an empty executable.
8499
	_LT_AC_SYS_LIBPATH_AIX
8500
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8501
	# Warning - without using the other run time loading flags,
8502
	# -berok will link without error, but may produce a broken library.
8503
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8504
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8505
	# -bexpall does not export symbols beginning with underscore (_)
8506
	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
8507
	# Exported symbols can be pulled into shared objects from archives
8508
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8509
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8510
	# This is similar to how AIX traditionally builds it's shared libraries.
8511
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8512
      fi
8513
    fi
8514
    ;;
8515
  chorus*)
8516
    case $cc_basename in
8517
      *)
8518
	# FIXME: insert proper C++ library support
8519
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8520
	;;
8521
    esac
8522
    ;;
8523
 
8524
  cygwin* | mingw* | pw32*)
8525
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8526
    # as there is no search path for DLLs.
8527
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8528
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
8529
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
8530
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8531
 
8532
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8533
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8534
      # If the export-symbols file already is a .def file (1st line
8535
      # is EXPORTS), use it as is; otherwise, prepend...
8536
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8537
	cp $export_symbols $output_objdir/$soname.def;
8538
      else
8539
	echo EXPORTS > $output_objdir/$soname.def;
8540
	cat $export_symbols >> $output_objdir/$soname.def;
8541
      fi~
8542
      $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8543
    else
8544
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8545
    fi
8546
  ;;
8547
 
8548
  darwin* | rhapsody*)
8549
  if test "$GXX" = yes; then
8550
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8551
    case "$host_os" in
8552
    rhapsody* | darwin1.[[012]])
8553
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8554
      ;;
8555
    *) # Darwin 1.3 on
8556
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8557
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8558
      else
8559
	case ${MACOSX_DEPLOYMENT_TARGET} in
8560
	  10.[012])
8561
	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8562
	    ;;
8563
	  10.*)
8564
	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8565
	    ;;
8566
	esac
8567
      fi
8568
      ;;
8569
    esac
8570
    lt_int_apple_cc_single_mod=no
8571
    output_verbose_link_cmd='echo'
8572
    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8573
      lt_int_apple_cc_single_mod=yes
8574
    fi
8575
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8576
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8577
    else
8578
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
8579
    fi
8580
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8581
 
8582
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8583
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8584
      _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 $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8585
    else
8586
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8587
    fi
8588
    _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 $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8589
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
8590
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8591
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8592
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8593
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8594
  else
8595
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8596
  fi
8597
    ;;
8598
 
8599
  dgux*)
8600
    case $cc_basename in
8601
      ec++)
8602
	# FIXME: insert proper C++ library support
8603
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8604
	;;
8605
      ghcx)
8606
	# Green Hills C++ Compiler
8607
	# FIXME: insert proper C++ library support
8608
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8609
	;;
8610
      *)
8611
	# FIXME: insert proper C++ library support
8612
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8613
	;;
8614
    esac
8615
    ;;
8616
  freebsd[12]*)
8617
    # C++ shared libraries reported to be fairly broken before switch to ELF
8618
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8619
    ;;
8620
  freebsd-elf*)
8621
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8622
    ;;
8623
  freebsd* | kfreebsd*-gnu)
8624
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8625
    # conventions
8626
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8627
    ;;
8628
  gnu*)
8629
    ;;
8630
  hpux9*)
8631
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8632
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8633
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8634
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8635
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8636
				# but as the default
8637
				# location of the library.
8638
 
8639
    case $cc_basename in
8640
    CC)
8641
      # FIXME: insert proper C++ library support
8642
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8643
      ;;
8644
    aCC)
8645
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8646
      # Commands to make compiler produce verbose output that lists
8647
      # what "hidden" libraries, object files and flags are used when
8648
      # linking a shared library.
8649
      #
8650
      # There doesn't appear to be a way to prevent this compiler from
8651
      # explicitly linking system object files so we need to strip them
8652
      # from the output so that they don't get included in the library
8653
      # dependencies.
8654
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8655
      ;;
8656
    *)
8657
      if test "$GXX" = yes; then
8658
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8659
      else
8660
        # FIXME: insert proper C++ library support
8661
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8662
      fi
8663
      ;;
8664
    esac
8665
    ;;
8666
  hpux10*|hpux11*)
8667
    if test $with_gnu_ld = no; then
8668
      case "$host_cpu" in
8669
      hppa*64*)
8670
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8671
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8672
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8673
        ;;
8674
      ia64*)
8675
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8676
        ;;
8677
      *)
8678
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8679
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8680
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8681
        ;;
8682
      esac
8683
    fi
8684
    case "$host_cpu" in
8685
    hppa*64*)
8686
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
8687
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8688
      ;;
8689
    ia64*)
8690
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
8691
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8692
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8693
					      # but as the default
8694
					      # location of the library.
8695
      ;;
8696
    *)
8697
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8698
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8699
					      # but as the default
8700
					      # location of the library.
8701
      ;;
8702
    esac
8703
 
8704
    case $cc_basename in
8705
      CC)
8706
	# FIXME: insert proper C++ library support
8707
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8708
	;;
8709
      aCC)
8710
	case "$host_cpu" in
8711
	hppa*64*|ia64*)
8712
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8713
	  ;;
8714
	*)
8715
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8716
	  ;;
8717
	esac
8718
	# Commands to make compiler produce verbose output that lists
8719
	# what "hidden" libraries, object files and flags are used when
8720
	# linking a shared library.
8721
	#
8722
	# There doesn't appear to be a way to prevent this compiler from
8723
	# explicitly linking system object files so we need to strip them
8724
	# from the output so that they don't get included in the library
8725
	# dependencies.
8726
	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'
8727
	;;
8728
      *)
8729
	if test "$GXX" = yes; then
8730
	  if test $with_gnu_ld = no; then
8731
	    case "$host_cpu" in
8732
	    ia64*|hppa*64*)
8733
	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8734
	      ;;
8735
	    *)
8736
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8737
	      ;;
8738
	    esac
8739
	  fi
8740
	else
8741
	  # FIXME: insert proper C++ library support
8742
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
8743
	fi
8744
	;;
8745
    esac
8746
    ;;
8747
  irix5* | irix6*)
8748
    case $cc_basename in
8749
      CC)
8750
	# SGI C++
8751
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8752
 
8753
	# Archives containing C++ object files must be created using
8754
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8755
	# necessary to make sure instantiated templates are included
8756
	# in the archive.
8757
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8758
	;;
8759
      *)
8760
	if test "$GXX" = yes; then
8761
	  if test "$with_gnu_ld" = no; then
8762
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8763
	  else
8764
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
8765
	  fi
8766
	fi
8767
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8768
	;;
8769
    esac
8770
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8771
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8772
    ;;
8773
  linux*)
8774
    case $cc_basename in
8775
      KCC)
8776
	# Kuck and Associates, Inc. (KAI) C++ Compiler
8777
 
8778
	# KCC will only create a shared library if the output file
8779
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
8780
	# to its proper name (with version) after linking.
8781
	_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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8782
	_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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8783
	# Commands to make compiler produce verbose output that lists
8784
	# what "hidden" libraries, object files and flags are used when
8785
	# linking a shared library.
8786
	#
8787
	# There doesn't appear to be a way to prevent this compiler from
8788
	# explicitly linking system object files so we need to strip them
8789
	# from the output so that they don't get included in the library
8790
	# dependencies.
8791
	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'
8792
 
8793
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8794
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8795
 
8796
	# Archives containing C++ object files must be created using
8797
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8798
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8799
	;;
8800
      icpc)
8801
	# Intel C++
8802
	with_gnu_ld=yes
8803
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8804
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8805
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8806
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8807
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8808
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8809
	;;
8810
      cxx)
8811
	# Compaq C++
8812
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8813
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8814
 
8815
	runpath_var=LD_RUN_PATH
8816
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8817
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8818
 
8819
	# Commands to make compiler produce verbose output that lists
8820
	# what "hidden" libraries, object files and flags are used when
8821
	# linking a shared library.
8822
	#
8823
	# There doesn't appear to be a way to prevent this compiler from
8824
	# explicitly linking system object files so we need to strip them
8825
	# from the output so that they don't get included in the library
8826
	# dependencies.
8827
	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'
8828
	;;
8829
    esac
8830
    ;;
8831
  lynxos*)
8832
    # FIXME: insert proper C++ library support
8833
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8834
    ;;
8835
  m88k*)
8836
    # FIXME: insert proper C++ library support
8837
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8838
    ;;
8839
  mvs*)
8840
    case $cc_basename in
8841
      cxx)
8842
	# FIXME: insert proper C++ library support
8843
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8844
	;;
8845
      *)
8846
	# FIXME: insert proper C++ library support
8847
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8848
	;;
8849
    esac
8850
    ;;
8851
  netbsd*)
8852
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8853
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8854
      wlarc=
8855
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8856
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8857
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8858
    fi
8859
    # Workaround some broken pre-1.5 toolchains
8860
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8861
    ;;
8862
  osf3*)
8863
    case $cc_basename in
8864
      KCC)
8865
	# Kuck and Associates, Inc. (KAI) C++ Compiler
8866
 
8867
	# KCC will only create a shared library if the output file
8868
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
8869
	# to its proper name (with version) after linking.
8870
	_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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8871
 
8872
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8873
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8874
 
8875
	# Archives containing C++ object files must be created using
8876
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8877
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8878
 
8879
	;;
8880
      RCC)
8881
	# Rational C++ 2.4.1
8882
	# FIXME: insert proper C++ library support
8883
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8884
	;;
8885
      cxx)
8886
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8887
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8888
 
8889
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8890
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8891
 
8892
	# Commands to make compiler produce verbose output that lists
8893
	# what "hidden" libraries, object files and flags are used when
8894
	# linking a shared library.
8895
	#
8896
	# There doesn't appear to be a way to prevent this compiler from
8897
	# explicitly linking system object files so we need to strip them
8898
	# from the output so that they don't get included in the library
8899
	# dependencies.
8900
	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'
8901
	;;
8902
      *)
8903
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8904
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8905
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8906
 
8907
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8908
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8909
 
8910
	  # Commands to make compiler produce verbose output that lists
8911
	  # what "hidden" libraries, object files and flags are used when
8912
	  # linking a shared library.
8913
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8914
 
8915
	else
8916
	  # FIXME: insert proper C++ library support
8917
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
8918
	fi
8919
	;;
8920
    esac
8921
    ;;
8922
  osf4* | osf5*)
8923
    case $cc_basename in
8924
      KCC)
8925
	# Kuck and Associates, Inc. (KAI) C++ Compiler
8926
 
8927
	# KCC will only create a shared library if the output file
8928
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
8929
	# to its proper name (with version) after linking.
8930
	_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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8931
 
8932
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8933
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8934
 
8935
	# Archives containing C++ object files must be created using
8936
	# the KAI C++ compiler.
8937
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8938
	;;
8939
      RCC)
8940
	# Rational C++ 2.4.1
8941
	# FIXME: insert proper C++ library support
8942
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8943
	;;
8944
      cxx)
8945
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8946
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8947
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8948
	  echo "-hidden">> $lib.exp~
8949
	  $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
8950
	  $rm $lib.exp'
8951
 
8952
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8953
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8954
 
8955
	# Commands to make compiler produce verbose output that lists
8956
	# what "hidden" libraries, object files and flags are used when
8957
	# linking a shared library.
8958
	#
8959
	# There doesn't appear to be a way to prevent this compiler from
8960
	# explicitly linking system object files so we need to strip them
8961
	# from the output so that they don't get included in the library
8962
	# dependencies.
8963
	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'
8964
	;;
8965
      *)
8966
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8967
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8968
	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8969
 
8970
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8971
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8972
 
8973
	  # Commands to make compiler produce verbose output that lists
8974
	  # what "hidden" libraries, object files and flags are used when
8975
	  # linking a shared library.
8976
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8977
 
8978
	else
8979
	  # FIXME: insert proper C++ library support
8980
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
8981
	fi
8982
	;;
8983
    esac
8984
    ;;
8985
  psos*)
8986
    # FIXME: insert proper C++ library support
8987
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8988
    ;;
8989
  sco*)
8990
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8991
    case $cc_basename in
8992
      CC)
8993
	# FIXME: insert proper C++ library support
8994
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8995
	;;
8996
      *)
8997
	# FIXME: insert proper C++ library support
8998
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8999
	;;
9000
    esac
9001
    ;;
9002
  sunos4*)
9003
    case $cc_basename in
9004
      CC)
9005
	# Sun C++ 4.x
9006
	# FIXME: insert proper C++ library support
9007
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9008
	;;
9009
      lcc)
9010
	# Lucid
9011
	# FIXME: insert proper C++ library support
9012
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9013
	;;
9014
      *)
9015
	# FIXME: insert proper C++ library support
9016
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9017
	;;
9018
    esac
9019
    ;;
9020
  solaris*)
9021
    case $cc_basename in
9022
      CC)
9023
	# Sun C++ 4.2, 5.x and Centerline C++
9024
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9025
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
9026
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9027
	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9028
 
9029
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9030
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9031
	case $host_os in
9032
	  solaris2.[0-5] | solaris2.[0-5].*) ;;
9033
	  *)
9034
	    # The C++ compiler is used as linker so we must use $wl
9035
	    # flag to pass the commands to the underlying system
9036
	    # linker.
9037
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
9038
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9039
	    ;;
9040
	esac
9041
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9042
 
9043
	# Commands to make compiler produce verbose output that lists
9044
	# what "hidden" libraries, object files and flags are used when
9045
	# linking a shared library.
9046
	#
9047
	# There doesn't appear to be a way to prevent this compiler from
9048
	# explicitly linking system object files so we need to strip them
9049
	# from the output so that they don't get included in the library
9050
	# dependencies.
9051
	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9052
 
9053
	# Archives containing C++ object files must be created using
9054
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
9055
	# necessary to make sure instantiated templates are included
9056
	# in the archive.
9057
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9058
	;;
9059
      gcx)
9060
	# Green Hills C++ Compiler
9061
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9062
 
9063
	# The C++ compiler must be used to create the archive.
9064
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9065
	;;
9066
      *)
9067
	# GNU C++ compiler with Solaris linker
9068
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9069
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9070
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
9071
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9072
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9073
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9074
 
9075
	    # Commands to make compiler produce verbose output that lists
9076
	    # what "hidden" libraries, object files and flags are used when
9077
	    # linking a shared library.
9078
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9079
	  else
9080
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
9081
	    # platform.
9082
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9083
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9084
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9085
 
9086
	    # Commands to make compiler produce verbose output that lists
9087
	    # what "hidden" libraries, object files and flags are used when
9088
	    # linking a shared library.
9089
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9090
	  fi
9091
 
9092
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9093
	fi
9094
	;;
9095
    esac
9096
    ;;
9097
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
9098
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9099
    ;;
9100
  tandem*)
9101
    case $cc_basename in
9102
      NCC)
9103
	# NonStop-UX NCC 3.20
9104
	# FIXME: insert proper C++ library support
9105
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9106
	;;
9107
      *)
9108
	# FIXME: insert proper C++ library support
9109
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9110
	;;
9111
    esac
9112
    ;;
9113
  vxworks*)
9114
    # FIXME: insert proper C++ library support
9115
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9116
    ;;
9117
  *)
9118
    # FIXME: insert proper C++ library support
9119
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
9120
    ;;
9121
esac
9122
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9123
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9124
 
9125
_LT_AC_TAGVAR(GCC, $1)="$GXX"
9126
_LT_AC_TAGVAR(LD, $1)="$LD"
9127
 
9128
## CAVEAT EMPTOR:
9129
## There is no encapsulation within the following macros, do not change
9130
## the running order or otherwise move them around unless you know exactly
9131
## what you are doing...
9132
AC_LIBTOOL_POSTDEP_PREDEP($1)
9133
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9134
AC_LIBTOOL_PROG_CC_C_O($1)
9135
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9136
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9137
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9138
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9139
AC_LIBTOOL_SYS_LIB_STRIP
9140
AC_LIBTOOL_DLOPEN_SELF($1)
9141
 
9142
AC_LIBTOOL_CONFIG($1)
9143
 
9144
AC_LANG_POP
9145
CC=$lt_save_CC
9146
LDCXX=$LD
9147
LD=$lt_save_LD
9148
GCC=$lt_save_GCC
9149
with_gnu_ldcxx=$with_gnu_ld
9150
with_gnu_ld=$lt_save_with_gnu_ld
9151
lt_cv_path_LDCXX=$lt_cv_path_LD
9152
lt_cv_path_LD=$lt_save_path_LD
9153
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9154
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9155
])
9156
m4trace:acinclude.m4:9468: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [
9157
dnl we can't use the lt_simple_compile_test_code here,
9158
dnl because it contains code intended for an executable,
9159
dnl not a library.  It's possible we should let each
9160
dnl tag define a new lt_????_link_test_code variable,
9161
dnl but it's only used here...
9162
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9163
int a;
9164
void foo (void) { a = 0; }
9165
EOF
9166
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9167
class Foo
9168
{
9169
public:
9170
  Foo (void) { a = 0; }
9171
private:
9172
  int a;
9173
};
9174
EOF
9175
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9176
      subroutine foo
9177
      implicit none
9178
      integer*4 a
9179
      a=0
9180
      return
9181
      end
9182
EOF
9183
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9184
public class foo {
9185
  private int a;
9186
  public void bar (void) {
9187
    a = 0;
9188
  }
9189
};
9190
EOF
9191
])
9192
dnl Parse the compiler output and extract the necessary
9193
dnl objects, libraries and library flags.
9194
if AC_TRY_EVAL(ac_compile); then
9195
  # Parse the compiler output and extract the necessary
9196
  # objects, libraries and library flags.
9197
 
9198
  # Sentinel used to keep track of whether or not we are before
9199
  # the conftest object file.
9200
  pre_test_object_deps_done=no
9201
 
9202
  # The `*' in the case matches for architectures that use `case' in
9203
  # $output_verbose_cmd can trigger glob expansion during the loop
9204
  # eval without this substitution.
9205
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
9206
 
9207
  for p in `eval $output_verbose_link_cmd`; do
9208
    case $p in
9209
 
9210
    -L* | -R* | -l*)
9211
       # Some compilers place space between "-{L,R}" and the path.
9212
       # Remove the space.
9213
       if test $p = "-L" \
9214
	  || test $p = "-R"; then
9215
	 prev=$p
9216
	 continue
9217
       else
9218
	 prev=
9219
       fi
9220
 
9221
       if test "$pre_test_object_deps_done" = no; then
9222
	 case $p in
9223
	 -L* | -R*)
9224
	   # Internal compiler library paths should come after those
9225
	   # provided the user.  The postdeps already come after the
9226
	   # user supplied libs so there is no need to process them.
9227
	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9228
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9229
	   else
9230
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9231
	   fi
9232
	   ;;
9233
	 # The "-l" case would never come before the object being
9234
	 # linked, so don't bother handling this case.
9235
	 esac
9236
       else
9237
	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9238
	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9239
	 else
9240
	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9241
	 fi
9242
       fi
9243
       ;;
9244
 
9245
    *.$objext|*.$libext)
9246
       # This assumes that the test object file only shows up
9247
       # once in the compiler output.
9248
       if test "$p" = "conftest.$objext"; then
9249
	 pre_test_object_deps_done=yes
9250
	 continue
9251
       fi
9252
 
9253
       if test "$pre_test_object_deps_done" = no; then
9254
	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9255
	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
9256
	 else
9257
	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9258
	 fi
9259
       else
9260
	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9261
	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
9262
	 else
9263
	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9264
	 fi
9265
       fi
9266
       ;;
9267
 
9268
    *) ;; # Ignore the rest.
9269
 
9270
    esac
9271
  done
9272
 
9273
  # Clean up.
9274
  rm -f a.out a.exe
9275
else
9276
  echo "libtool.m4: error: problem compiling $1 test program"
9277
fi
9278
 
9279
$rm -f confest.$objext
9280
 
9281
case " $_LT_AC_TAGVAR(postdeps, $1) " in
9282
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9283
esac
9284
])
9285
m4trace:acinclude.m4:9603: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9286
m4trace:acinclude.m4:9604: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77])
9287
AC_LANG_PUSH(Fortran 77)
9288
 
9289
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9290
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9291
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9292
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9293
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9294
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9295
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9296
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9297
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9298
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9299
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
9300
_LT_AC_TAGVAR(module_cmds, $1)=
9301
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
9302
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9303
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9304
_LT_AC_TAGVAR(no_undefined_flag, $1)=
9305
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9306
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9307
 
9308
# Source file extension for f77 test sources.
9309
ac_ext=f
9310
 
9311
# Object file extension for compiled f77 test sources.
9312
objext=o
9313
_LT_AC_TAGVAR(objext, $1)=$objext
9314
 
9315
# Code to be used in simple compile tests
9316
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
9317
 
9318
# Code to be used in simple link tests
9319
lt_simple_link_test_code="      program t\n      end\n"
9320
 
9321
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9322
_LT_AC_SYS_COMPILER
9323
 
9324
# Allow CC to be a program name with arguments.
9325
lt_save_CC="$CC"
9326
CC=${F77-"f77"}
9327
compiler=$CC
9328
_LT_AC_TAGVAR(compiler, $1)=$CC
9329
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
9330
 
9331
AC_MSG_CHECKING([if libtool supports shared libraries])
9332
AC_MSG_RESULT([$can_build_shared])
9333
 
9334
AC_MSG_CHECKING([whether to build shared libraries])
9335
test "$can_build_shared" = "no" && enable_shared=no
9336
 
9337
# On AIX, shared libraries and static libraries use the same namespace, and
9338
# are all built from PIC.
9339
case "$host_os" in
9340
aix3*)
9341
  test "$enable_shared" = yes && enable_static=no
9342
  if test -n "$RANLIB"; then
9343
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
9344
    postinstall_cmds='$RANLIB $lib'
9345
  fi
9346
  ;;
9347
aix4*)
9348
  test "$enable_shared" = yes && enable_static=no
9349
  ;;
9350
esac
9351
AC_MSG_RESULT([$enable_shared])
9352
 
9353
AC_MSG_CHECKING([whether to build static libraries])
9354
# Make sure either enable_shared or enable_static is yes.
9355
test "$enable_shared" = yes || enable_static=yes
9356
AC_MSG_RESULT([$enable_static])
9357
 
9358
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9359
 
9360
_LT_AC_TAGVAR(GCC, $1)="$G77"
9361
_LT_AC_TAGVAR(LD, $1)="$LD"
9362
 
9363
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9364
AC_LIBTOOL_PROG_CC_C_O($1)
9365
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9366
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9367
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9368
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9369
AC_LIBTOOL_SYS_LIB_STRIP
9370
 
9371
 
9372
AC_LIBTOOL_CONFIG($1)
9373
 
9374
AC_LANG_POP
9375
CC="$lt_save_CC"
9376
])
9377
m4trace:acinclude.m4:9703: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9378
m4trace:acinclude.m4:9704: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE
9379
 
9380
# Source file extension for Java test sources.
9381
ac_ext=java
9382
 
9383
# Object file extension for compiled Java test sources.
9384
objext=o
9385
_LT_AC_TAGVAR(objext, $1)=$objext
9386
 
9387
# Code to be used in simple compile tests
9388
lt_simple_compile_test_code="class foo {}\n"
9389
 
9390
# Code to be used in simple link tests
9391
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9392
 
9393
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9394
_LT_AC_SYS_COMPILER
9395
 
9396
# Allow CC to be a program name with arguments.
9397
lt_save_CC="$CC"
9398
CC=${GCJ-"gcj"}
9399
compiler=$CC
9400
_LT_AC_TAGVAR(compiler, $1)=$CC
9401
 
9402
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9403
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9404
 
9405
## CAVEAT EMPTOR:
9406
## There is no encapsulation within the following macros, do not change
9407
## the running order or otherwise move them around unless you know exactly
9408
## what you are doing...
9409
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9410
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9411
AC_LIBTOOL_PROG_CC_C_O($1)
9412
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9413
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9414
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9415
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9416
AC_LIBTOOL_SYS_LIB_STRIP
9417
AC_LIBTOOL_DLOPEN_SELF($1)
9418
 
9419
AC_LIBTOOL_CONFIG($1)
9420
 
9421
AC_LANG_RESTORE
9422
CC="$lt_save_CC"
9423
])
9424
m4trace:acinclude.m4:9758: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9425
m4trace:acinclude.m4:9759: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE
9426
 
9427
# Source file extension for RC test sources.
9428
ac_ext=rc
9429
 
9430
# Object file extension for compiled RC test sources.
9431
objext=o
9432
_LT_AC_TAGVAR(objext, $1)=$objext
9433
 
9434
# Code to be used in simple compile tests
9435
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9436
 
9437
# Code to be used in simple link tests
9438
lt_simple_link_test_code="$lt_simple_compile_test_code"
9439
 
9440
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9441
_LT_AC_SYS_COMPILER
9442
 
9443
# Allow CC to be a program name with arguments.
9444
lt_save_CC="$CC"
9445
CC=${RC-"windres"}
9446
compiler=$CC
9447
_LT_AC_TAGVAR(compiler, $1)=$CC
9448
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9449
 
9450
AC_LIBTOOL_CONFIG($1)
9451
 
9452
AC_LANG_RESTORE
9453
CC="$lt_save_CC"
9454
])
9455
m4trace:acinclude.m4:9798: -1- AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the
9456
# libtool distribution, otherwise you forgot to ship ltmain.sh
9457
# with your package, and you will get complaints that there are
9458
# no rules to generate ltmain.sh.
9459
if test -f "$ltmain"; then
9460
  # See if we are running on zsh, and set the options which allow our commands through
9461
  # without removal of \ escapes.
9462
  if test -n "${ZSH_VERSION+set}" ; then
9463
    setopt NO_GLOB_SUBST
9464
  fi  
9465
  # Now quote all the things that may contain metacharacters while being
9466
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
9467
  # variables and quote the copies for generation of the libtool script.
9468
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9469
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9470
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9471
    deplibs_check_method reload_flag reload_cmds need_locks \
9472
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9473
    lt_cv_sys_global_symbol_to_c_name_address \
9474
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9475
    old_postinstall_cmds old_postuninstall_cmds \
9476
    _LT_AC_TAGVAR(compiler, $1) \
9477
    _LT_AC_TAGVAR(CC, $1) \
9478
    _LT_AC_TAGVAR(LD, $1) \
9479
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9480
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9481
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9482
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9483
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9484
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9485
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9486
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9487
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
9488
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9489
    _LT_AC_TAGVAR(predep_objects, $1) \
9490
    _LT_AC_TAGVAR(postdep_objects, $1) \
9491
    _LT_AC_TAGVAR(predeps, $1) \
9492
    _LT_AC_TAGVAR(postdeps, $1) \
9493
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9494
    _LT_AC_TAGVAR(archive_cmds, $1) \
9495
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9496
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
9497
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
9498
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9499
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
9500
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
9501
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
9502
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9503
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9504
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9505
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
9506
    _LT_AC_TAGVAR(module_cmds, $1) \
9507
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
9508
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9509
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
9510
    _LT_AC_TAGVAR(include_expsyms, $1); do
9511
 
9512
    case $var in
9513
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
9514
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9515
    _LT_AC_TAGVAR(archive_cmds, $1) | \
9516
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9517
    _LT_AC_TAGVAR(module_cmds, $1) | \
9518
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
9519
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9520
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9521
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
9522
    postinstall_cmds | postuninstall_cmds | \
9523
    old_postinstall_cmds | old_postuninstall_cmds | \
9524
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9525
      # Double-quote double-evaled strings.
9526
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9527
      ;;
9528
    *)
9529
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9530
      ;;
9531
    esac
9532
  done
9533
 
9534
  case $lt_echo in
9535
  *'\[$]0 --fallback-echo"')
9536
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9537
    ;;
9538
  esac
9539
 
9540
ifelse([$1], [],
9541
  [cfgfile="${ofile}T"
9542
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9543
  $rm -f "$cfgfile"
9544
  AC_MSG_NOTICE([creating $ofile])],
9545
  [cfgfile="$ofile"])
9546
 
9547
  cat <<__EOF__ >> "$cfgfile"
9548
ifelse([$1], [],
9549
[#! $SHELL
9550
 
9551
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9552
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9553
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
9554
#
9555
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9556
# Free Software Foundation, Inc.
9557
#
9558
# This file is part of GNU Libtool:
9559
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9560
#
9561
# This program is free software; you can redistribute it and/or modify
9562
# it under the terms of the GNU General Public License as published by
9563
# the Free Software Foundation; either version 2 of the License, or
9564
# (at your option) any later version.
9565
#
9566
# This program is distributed in the hope that it will be useful, but
9567
# WITHOUT ANY WARRANTY; without even the implied warranty of
9568
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9569
# General Public License for more details.
9570
#
9571
# You should have received a copy of the GNU General Public License
9572
# along with this program; if not, write to the Free Software
9573
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9574
#
9575
# As a special exception to the GNU General Public License, if you
9576
# distribute this file as part of a program that contains a
9577
# configuration script generated by Autoconf, you may include it under
9578
# the same distribution terms that you use for the rest of that program.
9579
 
9580
# A sed program that does not truncate output.
9581
SED=$lt_SED
9582
 
9583
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
9584
Xsed="$SED -e s/^X//"
9585
 
9586
# The HP-UX ksh and POSIX shell print the target directory to stdout
9587
# if CDPATH is set.
9588
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9589
 
9590
# The names of the tagged configurations supported by this script.
9591
available_tags=
9592
 
9593
# ### BEGIN LIBTOOL CONFIG],
9594
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9595
 
9596
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9597
 
9598
# Shell to use when invoking shell scripts.
9599
SHELL=$lt_SHELL
9600
 
9601
# Whether or not to build shared libraries.
9602
build_libtool_libs=$enable_shared
9603
 
9604
# Whether or not to build static libraries.
9605
build_old_libs=$enable_static
9606
 
9607
# Whether or not to add -lc for building shared libraries.
9608
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9609
 
9610
# Whether or not to disallow shared libs when runtime libs are static
9611
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9612
 
9613
# Whether or not to optimize for fast installation.
9614
fast_install=$enable_fast_install
9615
 
9616
# The host system.
9617
host_alias=$host_alias
9618
host=$host
9619
 
9620
# An echo program that does not interpret backslashes.
9621
echo=$lt_echo
9622
 
9623
# The archiver.
9624
AR=$lt_AR
9625
AR_FLAGS=$lt_AR_FLAGS
9626
 
9627
# A C compiler.
9628
LTCC=$lt_LTCC
9629
 
9630
# A language-specific compiler.
9631
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
9632
 
9633
# Is the compiler the GNU C compiler?
9634
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
9635
 
9636
# An ERE matcher.
9637
EGREP=$lt_EGREP
9638
 
9639
# The linker used to build libraries.
9640
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
9641
 
9642
# Whether we need hard or soft links.
9643
LN_S=$lt_LN_S
9644
 
9645
# A BSD-compatible nm program.
9646
NM=$lt_NM
9647
 
9648
# A symbol stripping program
9649
STRIP=$STRIP
9650
 
9651
# Used to examine libraries when file_magic_cmd begins "file"
9652
MAGIC_CMD=$MAGIC_CMD
9653
 
9654
# Used on cygwin: DLL creation program.
9655
DLLTOOL="$DLLTOOL"
9656
 
9657
# Used on cygwin: object dumper.
9658
OBJDUMP="$OBJDUMP"
9659
 
9660
# Used on cygwin: assembler.
9661
AS="$AS"
9662
 
9663
# The name of the directory that contains temporary libtool files.
9664
objdir=$objdir
9665
 
9666
# How to create reloadable object files.
9667
reload_flag=$lt_reload_flag
9668
reload_cmds=$lt_reload_cmds
9669
 
9670
# How to pass a linker flag through the compiler.
9671
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9672
 
9673
# Object file suffix (normally "o").
9674
objext="$ac_objext"
9675
 
9676
# Old archive suffix (normally "a").
9677
libext="$libext"
9678
 
9679
# Shared library suffix (normally ".so").
9680
shrext='$shrext'
9681
 
9682
# Executable file suffix (normally "").
9683
exeext="$exeext"
9684
 
9685
# Additional compiler flags for building library objects.
9686
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9687
pic_mode=$pic_mode
9688
 
9689
# What is the maximum length of a command?
9690
max_cmd_len=$lt_cv_sys_max_cmd_len
9691
 
9692
# Does compiler simultaneously support -c and -o options?
9693
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
9694
 
9695
# Must we lock files when doing compilation ?
9696
need_locks=$lt_need_locks
9697
 
9698
# Do we need the lib prefix for modules?
9699
need_lib_prefix=$need_lib_prefix
9700
 
9701
# Do we need a version for libraries?
9702
need_version=$need_version
9703
 
9704
# Whether dlopen is supported.
9705
dlopen_support=$enable_dlopen
9706
 
9707
# Whether dlopen of programs is supported.
9708
dlopen_self=$enable_dlopen_self
9709
 
9710
# Whether dlopen of statically linked programs is supported.
9711
dlopen_self_static=$enable_dlopen_self_static
9712
 
9713
# Compiler flag to prevent dynamic linking.
9714
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9715
 
9716
# Compiler flag to turn off builtin functions.
9717
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9718
 
9719
# Compiler flag to allow reflexive dlopens.
9720
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9721
 
9722
# Compiler flag to generate shared objects directly from archives.
9723
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9724
 
9725
# Compiler flag to generate thread-safe objects.
9726
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9727
 
9728
# Library versioning type.
9729
version_type=$version_type
9730
 
9731
# Format of library name prefix.
9732
libname_spec=$lt_libname_spec
9733
 
9734
# List of archive names.  First name is the real one, the rest are links.
9735
# The last name is the one that the linker finds with -lNAME.
9736
library_names_spec=$lt_library_names_spec
9737
 
9738
# The coded name of the library, if different from the real name.
9739
soname_spec=$lt_soname_spec
9740
 
9741
# Commands used to build and install an old-style archive.
9742
RANLIB=$lt_RANLIB
9743
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9744
old_postinstall_cmds=$lt_old_postinstall_cmds
9745
old_postuninstall_cmds=$lt_old_postuninstall_cmds
9746
 
9747
# Create an old-style archive from a shared archive.
9748
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9749
 
9750
# Create a temporary old-style archive to link instead of a shared archive.
9751
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9752
 
9753
# Commands used to build and install a shared archive.
9754
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9755
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9756
postinstall_cmds=$lt_postinstall_cmds
9757
postuninstall_cmds=$lt_postuninstall_cmds
9758
 
9759
# Commands used to build a loadable module (assumed same as above if empty)
9760
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
9761
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
9762
 
9763
# Commands to strip libraries.
9764
old_striplib=$lt_old_striplib
9765
striplib=$lt_striplib
9766
 
9767
# Dependencies to place before the objects being linked to create a
9768
# shared library.
9769
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9770
 
9771
# Dependencies to place after the objects being linked to create a
9772
# shared library.
9773
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9774
 
9775
# Dependencies to place before the objects being linked to create a
9776
# shared library.
9777
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9778
 
9779
# Dependencies to place after the objects being linked to create a
9780
# shared library.
9781
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9782
 
9783
# The library search path used internally by the compiler when linking
9784
# a shared library.
9785
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9786
 
9787
# Method to check whether dependent libraries are shared objects.
9788
deplibs_check_method=$lt_deplibs_check_method
9789
 
9790
# Command to use when deplibs_check_method == file_magic.
9791
file_magic_cmd=$lt_file_magic_cmd
9792
 
9793
# Flag that allows shared libraries with undefined symbols to be built.
9794
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9795
 
9796
# Flag that forces no undefined symbols.
9797
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9798
 
9799
# Commands used to finish a libtool library installation in a directory.
9800
finish_cmds=$lt_finish_cmds
9801
 
9802
# Same as above, but a single script fragment to be evaled but not shown.
9803
finish_eval=$lt_finish_eval
9804
 
9805
# Take the output of nm and produce a listing of raw symbols and C names.
9806
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9807
 
9808
# Transform the output of nm in a proper C declaration
9809
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9810
 
9811
# Transform the output of nm in a C name address pair
9812
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9813
 
9814
# This is the shared library runtime path variable.
9815
runpath_var=$runpath_var
9816
 
9817
# This is the shared library path variable.
9818
shlibpath_var=$shlibpath_var
9819
 
9820
# Is shlibpath searched before the hard-coded library search path?
9821
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9822
 
9823
# How to hardcode a shared library path into an executable.
9824
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9825
 
9826
# Whether we should hardcode library paths into libraries.
9827
hardcode_into_libs=$hardcode_into_libs
9828
 
9829
# Flag to hardcode \$libdir into a binary during linking.
9830
# This must work even if \$libdir does not exist.
9831
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9832
 
9833
# If ld is used when linking, flag to hardcode \$libdir into
9834
# a binary during linking. This must work even if \$libdir does
9835
# not exist.
9836
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
9837
 
9838
# Whether we need a single -rpath flag with a separated argument.
9839
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9840
 
9841
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
9842
# resulting binary.
9843
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9844
 
9845
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9846
# resulting binary.
9847
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9848
 
9849
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9850
# the resulting binary.
9851
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9852
 
9853
# Set to yes if building a shared library automatically hardcodes DIR into the library
9854
# and all subsequent libraries and executables linked against it.
9855
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
9856
 
9857
# Variables whose values should be saved in libtool wrapper scripts and
9858
# restored at relink time.
9859
variables_saved_for_relink="$variables_saved_for_relink"
9860
 
9861
# Whether libtool must link a program against all its dependency libraries.
9862
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9863
 
9864
# Compile-time system search path for libraries
9865
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9866
 
9867
# Run-time system search path for libraries
9868
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9869
 
9870
# Fix the shell variable \$srcfile for the compiler.
9871
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9872
 
9873
# Set to yes if exported symbols are required.
9874
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9875
 
9876
# The commands to list exported symbols.
9877
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9878
 
9879
# The commands to extract the exported symbol list from a shared archive.
9880
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9881
 
9882
# Symbols that should not be listed in the preloaded symbols.
9883
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9884
 
9885
# Symbols that must always be exported.
9886
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9887
 
9888
ifelse([$1],[],
9889
[# ### END LIBTOOL CONFIG],
9890
[# ### END LIBTOOL TAG CONFIG: $tagname])
9891
 
9892
__EOF__
9893
 
9894
ifelse([$1],[], [
9895
  case $host_os in
9896
  aix3*)
9897
    cat <<\EOF >> "$cfgfile"
9898
 
9899
# AIX sometimes has problems with the GCC collect2 program.  For some
9900
# reason, if we set the COLLECT_NAMES environment variable, the problems
9901
# vanish in a puff of smoke.
9902
if test "X${COLLECT_NAMES+set}" != Xset; then
9903
  COLLECT_NAMES=
9904
  export COLLECT_NAMES
9905
fi
9906
EOF
9907
    ;;
9908
  esac
9909
 
9910
  # We use sed instead of cat because bash on DJGPP gets confused if
9911
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
9912
  # text mode, it properly converts lines to CR/LF.  This bash problem
9913
  # is reportedly fixed, but why not run on old versions too?
9914
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9915
 
9916
  mv -f "$cfgfile" "$ofile" || \
9917
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9918
  chmod +x "$ofile"
9919
])
9920
else
9921
  # If there is no Makefile yet, we rely on a make rule to execute
9922
  # `config.status --recheck' to rerun these tests and create the
9923
  # libtool script then.
9924
  test -f Makefile && make "$ltmain"
9925
fi
9926
])
9927
m4trace:acinclude.m4:10275: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9928
 
9929
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9930
 
9931
if test "$GCC" = yes; then
9932
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9933
 
9934
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9935
    lt_cv_prog_compiler_rtti_exceptions,
9936
    [-fno-rtti -fno-exceptions], [],
9937
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9938
fi
9939
])
9940
m4trace:acinclude.m4:10293: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST])
9941
AC_REQUIRE([AC_PROG_NM])
9942
AC_REQUIRE([AC_OBJEXT])
9943
# Check for command to grab the raw symbol name followed by C symbol from nm.
9944
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9945
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9946
[
9947
# These are sane defaults that work on at least a few old systems.
9948
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9949
 
9950
# Character class describing NM global symbol codes.
9951
symcode='[[BCDEGRST]]'
9952
 
9953
# Regexp to match symbols that can be accessed directly from C.
9954
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9955
 
9956
# Transform the above into a raw symbol and a C symbol.
9957
symxfrm='\1 \2\3 \3'
9958
 
9959
# Transform an extracted symbol line into a proper C declaration
9960
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9961
 
9962
# Transform an extracted symbol line into symbol name and symbol address
9963
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'"
9964
 
9965
# Define system-specific variables.
9966
case $host_os in
9967
aix*)
9968
  symcode='[[BCDT]]'
9969
  ;;
9970
cygwin* | mingw* | pw32*)
9971
  symcode='[[ABCDGISTW]]'
9972
  ;;
9973
hpux*) # Its linker distinguishes data from code symbols
9974
  if test "$host_cpu" = ia64; then
9975
    symcode='[[ABCDEGRST]]'
9976
  fi
9977
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9978
  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'"
9979
  ;;
9980
irix* | nonstopux*)
9981
  symcode='[[BCDEGRST]]'
9982
  ;;
9983
osf*)
9984
  symcode='[[BCDEGQRST]]'
9985
  ;;
9986
solaris* | sysv5*)
9987
  symcode='[[BDT]]'
9988
  ;;
9989
sysv4)
9990
  symcode='[[DFNSTU]]'
9991
  ;;
9992
esac
9993
 
9994
# Handle CRLF in mingw tool chain
9995
opt_cr=
9996
case $build_os in
9997
mingw*)
9998
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9999
  ;;
10000
esac
10001
 
10002
# If we're using GNU nm, then use its standard symbol codes.
10003
case `$NM -V 2>&1` in
10004
*GNU* | *'with BFD'*)
10005
  symcode='[[ABCDGISTW]]' ;;
10006
esac
10007
 
10008
# Try without a prefix undercore, then with it.
10009
for ac_symprfx in "" "_"; do
10010
 
10011
  # Write the raw and C identifiers.
10012
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
10013
 
10014
  # Check to see that the pipe works correctly.
10015
  pipe_works=no
10016
 
10017
  rm -f conftest*
10018
  cat > conftest.$ac_ext <<EOF
10019
#ifdef __cplusplus
10020
extern "C" {
10021
#endif
10022
char nm_test_var;
10023
void nm_test_func(){}
10024
#ifdef __cplusplus
10025
}
10026
#endif
10027
int main(){nm_test_var='a';nm_test_func();return(0);}
10028
EOF
10029
 
10030
  if AC_TRY_EVAL(ac_compile); then
10031
    # Now try to grab the symbols.
10032
    nlist=conftest.nm
10033
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10034
      # Try sorting and uniquifying the output.
10035
      if sort "$nlist" | uniq > "$nlist"T; then
10036
	mv -f "$nlist"T "$nlist"
10037
      else
10038
	rm -f "$nlist"T
10039
      fi
10040
 
10041
      # Make sure that we snagged all the symbols we need.
10042
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
10043
	if grep ' nm_test_func$' "$nlist" >/dev/null; then
10044
	  cat <<EOF > conftest.$ac_ext
10045
#ifdef __cplusplus
10046
extern "C" {
10047
#endif
10048
 
10049
EOF
10050
	  # Now generate the symbol file.
10051
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10052
 
10053
	  cat <<EOF >> conftest.$ac_ext
10054
#if defined (__STDC__) && __STDC__
10055
# define lt_ptr_t void *
10056
#else
10057
# define lt_ptr_t char *
10058
# define const
10059
#endif
10060
 
10061
/* The mapping between symbol names and symbols. */
10062
const struct {
10063
  const char *name;
10064
  lt_ptr_t address;
10065
}
10066
lt_preloaded_symbols[[]] =
10067
{
10068
EOF
10069
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10070
	  cat <<\EOF >> conftest.$ac_ext
10071
  {0, (lt_ptr_t) 0}
10072
};
10073
 
10074
#ifdef __cplusplus
10075
}
10076
#endif
10077
EOF
10078
	  # Now try linking the two files.
10079
	  mv conftest.$ac_objext conftstm.$ac_objext
10080
	  lt_save_LIBS="$LIBS"
10081
	  lt_save_CFLAGS="$CFLAGS"
10082
	  LIBS="conftstm.$ac_objext"
10083
	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10084
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10085
	    pipe_works=yes
10086
	  fi
10087
	  LIBS="$lt_save_LIBS"
10088
	  CFLAGS="$lt_save_CFLAGS"
10089
	else
10090
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10091
	fi
10092
      else
10093
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10094
      fi
10095
    else
10096
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10097
    fi
10098
  else
10099
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10100
    cat conftest.$ac_ext >&5
10101
  fi
10102
  rm -f conftest* conftst*
10103
 
10104
  # Do not use the global_symbol_pipe unless it works.
10105
  if test "$pipe_works" = yes; then
10106
    break
10107
  else
10108
    lt_cv_sys_global_symbol_pipe=
10109
  fi
10110
done
10111
])
10112
if test -z "$lt_cv_sys_global_symbol_pipe"; then
10113
  lt_cv_sys_global_symbol_to_cdecl=
10114
fi
10115
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10116
  AC_MSG_RESULT(failed)
10117
else
10118
  AC_MSG_RESULT(ok)
10119
fi
10120
])
10121
m4trace:acinclude.m4:10479: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10122
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10123
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10124
 
10125
AC_MSG_CHECKING([for $compiler option to produce PIC])
10126
 ifelse([$1],[CXX],[
10127
  # C++ specific cases for pic, static, wl, etc.
10128
  if test "$GXX" = yes; then
10129
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10130
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10131
 
10132
    case $host_os in
10133
    aix*)
10134
      # All AIX code is PIC.
10135
      if test "$host_cpu" = ia64; then
10136
	# AIX 5 now supports IA64 processor
10137
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10138
      fi
10139
      ;;
10140
    amigaos*)
10141
      # FIXME: we need at least 68020 code to build shared libraries, but
10142
      # adding the `-m68020' flag to GCC prevents building anything better,
10143
      # like `-m68040'.
10144
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10145
      ;;
10146
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10147
      # PIC is the default for these OSes.
10148
      ;;
10149
    mingw* | os2* | pw32*)
10150
      # This hack is so that the source file can tell whether it is being
10151
      # built for inclusion in a dll (and should export symbols for example).
10152
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10153
      ;;
10154
    darwin* | rhapsody*)
10155
      # PIC is the default on this platform
10156
      # Common symbols not allowed in MH_DYLIB files
10157
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10158
      ;;
10159
    *djgpp*)
10160
      # DJGPP does not support shared libraries at all
10161
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10162
      ;;
10163
    sysv4*MP*)
10164
      if test -d /usr/nec; then
10165
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10166
      fi
10167
      ;;
10168
    hpux*)
10169
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10170
      # not for PA HP-UX.
10171
      case "$host_cpu" in
10172
      hppa*64*|ia64*)
10173
	;;
10174
      *)
10175
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10176
	;;
10177
      esac
10178
      ;;
10179
    *)
10180
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10181
      ;;
10182
    esac
10183
  else
10184
    case $host_os in
10185
      aix4* | aix5*)
10186
	# All AIX code is PIC.
10187
	if test "$host_cpu" = ia64; then
10188
	  # AIX 5 now supports IA64 processor
10189
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10190
	else
10191
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10192
	fi
10193
	;;
10194
      chorus*)
10195
	case $cc_basename in
10196
	cxch68)
10197
	  # Green Hills C++ Compiler
10198
	  # _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"
10199
	  ;;
10200
	esac
10201
	;;
10202
      dgux*)
10203
	case $cc_basename in
10204
	  ec++)
10205
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10206
	    ;;
10207
	  ghcx)
10208
	    # Green Hills C++ Compiler
10209
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10210
	    ;;
10211
	  *)
10212
	    ;;
10213
	esac
10214
	;;
10215
      freebsd* | kfreebsd*-gnu)
10216
	# FreeBSD uses GNU C++
10217
	;;
10218
      hpux9* | hpux10* | hpux11*)
10219
	case $cc_basename in
10220
	  CC)
10221
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10222
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10223
	    if test "$host_cpu" != ia64; then
10224
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10225
	    fi
10226
	    ;;
10227
	  aCC)
10228
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10229
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10230
	    case "$host_cpu" in
10231
	    hppa*64*|ia64*)
10232
	      # +Z the default
10233
	      ;;
10234
	    *)
10235
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10236
	      ;;
10237
	    esac
10238
	    ;;
10239
	  *)
10240
	    ;;
10241
	esac
10242
	;;
10243
      irix5* | irix6* | nonstopux*)
10244
	case $cc_basename in
10245
	  CC)
10246
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10247
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10248
	    # CC pic flag -KPIC is the default.
10249
	    ;;
10250
	  *)
10251
	    ;;
10252
	esac
10253
	;;
10254
      linux*)
10255
	case $cc_basename in
10256
	  KCC)
10257
	    # KAI C++ Compiler
10258
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10259
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10260
	    ;;
10261
	  icpc)
10262
	    # Intel C++
10263
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10264
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10265
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10266
	    ;; 
10267
	  cxx)
10268
	    # Compaq C++
10269
	    # Make sure the PIC flag is empty.  It appears that all Alpha
10270
	    # Linux and Compaq Tru64 Unix objects are PIC.
10271
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10272
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10273
	    ;;
10274
	  *)
10275
	    ;;
10276
	esac
10277
	;;
10278
      lynxos*)
10279
	;;
10280
      m88k*)
10281
	;;
10282
      mvs*)
10283
	case $cc_basename in
10284
	  cxx)
10285
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10286
	    ;;
10287
	  *)
10288
	    ;;
10289
	esac
10290
	;;
10291
      netbsd*)
10292
	;;
10293
      osf3* | osf4* | osf5*)
10294
	case $cc_basename in
10295
	  KCC)
10296
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10297
	    ;;
10298
	  RCC)
10299
	    # Rational C++ 2.4.1
10300
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10301
	    ;;
10302
	  cxx)
10303
	    # Digital/Compaq C++
10304
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10305
	    # Make sure the PIC flag is empty.  It appears that all Alpha
10306
	    # Linux and Compaq Tru64 Unix objects are PIC.
10307
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10308
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10309
	    ;;
10310
	  *)
10311
	    ;;
10312
	esac
10313
	;;
10314
      psos*)
10315
	;;
10316
      sco*)
10317
	case $cc_basename in
10318
	  CC)
10319
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10320
	    ;;
10321
	  *)
10322
	    ;;
10323
	esac
10324
	;;
10325
      solaris*)
10326
	case $cc_basename in
10327
	  CC)
10328
	    # Sun C++ 4.2, 5.x and Centerline C++
10329
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10330
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10331
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10332
	    ;;
10333
	  gcx)
10334
	    # Green Hills C++ Compiler
10335
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10336
	    ;;
10337
	  *)
10338
	    ;;
10339
	esac
10340
	;;
10341
      sunos4*)
10342
	case $cc_basename in
10343
	  CC)
10344
	    # Sun C++ 4.x
10345
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10346
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10347
	    ;;
10348
	  lcc)
10349
	    # Lucid
10350
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10351
	    ;;
10352
	  *)
10353
	    ;;
10354
	esac
10355
	;;
10356
      tandem*)
10357
	case $cc_basename in
10358
	  NCC)
10359
	    # NonStop-UX NCC 3.20
10360
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10361
	    ;;
10362
	  *)
10363
	    ;;
10364
	esac
10365
	;;
10366
      unixware*)
10367
	;;
10368
      vxworks*)
10369
	;;
10370
      *)
10371
	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10372
	;;
10373
    esac
10374
  fi
10375
],
10376
[
10377
  if test "$GCC" = yes; then
10378
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10379
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10380
 
10381
    case $host_os in
10382
      aix*)
10383
      # All AIX code is PIC.
10384
      if test "$host_cpu" = ia64; then
10385
	# AIX 5 now supports IA64 processor
10386
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10387
      fi
10388
      ;;
10389
 
10390
    amigaos*)
10391
      # FIXME: we need at least 68020 code to build shared libraries, but
10392
      # adding the `-m68020' flag to GCC prevents building anything better,
10393
      # like `-m68040'.
10394
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10395
      ;;
10396
 
10397
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10398
      # PIC is the default for these OSes.
10399
      ;;
10400
 
10401
    mingw* | pw32* | os2*)
10402
      # This hack is so that the source file can tell whether it is being
10403
      # built for inclusion in a dll (and should export symbols for example).
10404
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10405
      ;;
10406
 
10407
    darwin* | rhapsody*)
10408
      # PIC is the default on this platform
10409
      # Common symbols not allowed in MH_DYLIB files
10410
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10411
      ;;
10412
 
10413
    msdosdjgpp*)
10414
      # Just because we use GCC doesn't mean we suddenly get shared libraries
10415
      # on systems that don't support them.
10416
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10417
      enable_shared=no
10418
      ;;
10419
 
10420
    sysv4*MP*)
10421
      if test -d /usr/nec; then
10422
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10423
      fi
10424
      ;;
10425
 
10426
    hpux*)
10427
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10428
      # not for PA HP-UX.
10429
      case "$host_cpu" in
10430
      hppa*64*|ia64*)
10431
	# +Z the default
10432
	;;
10433
      *)
10434
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10435
	;;
10436
      esac
10437
      ;;
10438
 
10439
    *)
10440
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10441
      ;;
10442
    esac
10443
  else
10444
    # PORTME Check for flag to pass linker flags through the system compiler.
10445
    case $host_os in
10446
    aix*)
10447
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10448
      if test "$host_cpu" = ia64; then
10449
	# AIX 5 now supports IA64 processor
10450
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10451
      else
10452
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10453
      fi
10454
      ;;
10455
 
10456
    mingw* | pw32* | os2*)
10457
      # This hack is so that the source file can tell whether it is being
10458
      # built for inclusion in a dll (and should export symbols for example).
10459
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10460
      ;;
10461
 
10462
    hpux9* | hpux10* | hpux11*)
10463
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10464
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10465
      # not for PA HP-UX.
10466
      case "$host_cpu" in
10467
      hppa*64*|ia64*)
10468
	# +Z the default
10469
	;;
10470
      *)
10471
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10472
	;;
10473
      esac
10474
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
10475
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10476
      ;;
10477
 
10478
    irix5* | irix6* | nonstopux*)
10479
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10480
      # PIC (with -KPIC) is the default.
10481
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10482
      ;;
10483
 
10484
    newsos6)
10485
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10486
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10487
      ;;
10488
 
10489
    linux*)
10490
      case $CC in
10491
      icc* | ecc*)
10492
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10493
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10494
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10495
        ;;
10496
      ccc*)
10497
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10498
        # All Alpha code is PIC.
10499
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10500
        ;;
10501
      esac
10502
      ;;
10503
 
10504
    osf3* | osf4* | osf5*)
10505
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10506
      # All OSF/1 code is PIC.
10507
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10508
      ;;
10509
 
10510
    sco3.2v5*)
10511
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10512
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10513
      ;;
10514
 
10515
    solaris*)
10516
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10517
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10518
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10519
      ;;
10520
 
10521
    sunos4*)
10522
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10523
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10524
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10525
      ;;
10526
 
10527
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10528
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10529
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10530
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10531
      ;;
10532
 
10533
    sysv4*MP*)
10534
      if test -d /usr/nec ;then
10535
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10536
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10537
      fi
10538
      ;;
10539
 
10540
    uts4*)
10541
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10542
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10543
      ;;
10544
 
10545
    *)
10546
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10547
      ;;
10548
    esac
10549
  fi
10550
])
10551
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10552
 
10553
#
10554
# Check to make sure the PIC flag actually works.
10555
#
10556
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10557
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10558
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10559
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10560
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10561
     "" | " "*) ;;
10562
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10563
     esac],
10564
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10565
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10566
fi
10567
case "$host_os" in
10568
  # For platforms which do not support PIC, -DPIC is meaningless:
10569
  *djgpp*)
10570
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10571
    ;;
10572
  *)
10573
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10574
    ;;
10575
esac
10576
])
10577
m4trace:acinclude.m4:10941: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10578
ifelse([$1],[CXX],[
10579
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10580
  case $host_os in
10581
  aix4* | aix5*)
10582
    # If we're using GNU nm, then we don't want the "-C" option.
10583
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
10584
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10585
      _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'
10586
    else
10587
      _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'
10588
    fi
10589
    ;;
10590
  pw32*)
10591
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10592
  ;;
10593
  cygwin* | mingw*)
10594
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10595
  ;;
10596
  *)
10597
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10598
  ;;
10599
  esac
10600
],[
10601
  runpath_var=
10602
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
10603
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10604
  _LT_AC_TAGVAR(archive_cmds, $1)=
10605
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10606
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10607
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10608
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10609
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10610
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
10611
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10612
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
10613
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10614
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
10615
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10616
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10617
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
10618
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
10619
  _LT_AC_TAGVAR(module_cmds, $1)=
10620
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
10621
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
10622
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10623
  # include_expsyms should be a list of space-separated symbols to be *always*
10624
  # included in the symbol list
10625
  _LT_AC_TAGVAR(include_expsyms, $1)=
10626
  # exclude_expsyms can be an extended regexp of symbols to exclude
10627
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
10628
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10629
  # as well as any symbol that contains `d'.
10630
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
10631
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10632
  # platforms (ab)use it in PIC code, but their linkers get confused if
10633
  # the symbol is explicitly referenced.  Since portable code cannot
10634
  # rely on this symbol name, it's probably fine to never include it in
10635
  # preloaded symbol tables.
10636
  extract_expsyms_cmds=
10637
 
10638
  case $host_os in
10639
  cygwin* | mingw* | pw32*)
10640
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
10641
    # When not using gcc, we currently assume that we are using
10642
    # Microsoft Visual C++.
10643
    if test "$GCC" != yes; then
10644
      with_gnu_ld=no
10645
    fi
10646
    ;;
10647
  openbsd*)
10648
    with_gnu_ld=no
10649
    ;;
10650
  esac
10651
 
10652
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
10653
  if test "$with_gnu_ld" = yes; then
10654
    # If archive_cmds runs LD, not CC, wlarc should be empty
10655
    wlarc='${wl}'
10656
 
10657
    # See if GNU ld supports shared libraries.
10658
    case $host_os in
10659
    aix3* | aix4* | aix5*)
10660
      # On AIX/PPC, the GNU linker is very broken
10661
      if test "$host_cpu" != ia64; then
10662
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
10663
	cat <<EOF 1>&2
10664
 
10665
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
10666
*** to be unable to reliably create shared libraries on AIX.
10667
*** Therefore, libtool is disabling shared libraries support.  If you
10668
*** really care for shared libraries, you may want to modify your PATH
10669
*** so that a non-GNU linker is found, and then restart.
10670
 
10671
EOF
10672
      fi
10673
      ;;
10674
 
10675
    amigaos*)
10676
      _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)'
10677
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10678
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10679
 
10680
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
10681
      # that the semantics of dynamic libraries on AmigaOS, at least up
10682
      # to version 4, is to share data among multiple programs linked
10683
      # with the same dynamic library.  Since this doesn't match the
10684
      # behavior of shared libraries on other platforms, we can't use
10685
      # them.
10686
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10687
      ;;
10688
 
10689
    beos*)
10690
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10691
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10692
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10693
	# support --undefined.  This deserves some investigation.  FIXME
10694
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10695
      else
10696
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
10697
      fi
10698
      ;;
10699
 
10700
    cygwin* | mingw* | pw32*)
10701
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10702
      # as there is no search path for DLLs.
10703
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10704
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
10705
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
10706
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10707
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10708
 
10709
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10710
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10711
	# If the export-symbols file already is a .def file (1st line
10712
	# is EXPORTS), use it as is; otherwise, prepend...
10713
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10714
	  cp $export_symbols $output_objdir/$soname.def;
10715
	else
10716
	  echo EXPORTS > $output_objdir/$soname.def;
10717
	  cat $export_symbols >> $output_objdir/$soname.def;
10718
	fi~
10719
	$CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
10720
      else
10721
	ld_shlibs=no
10722
      fi
10723
      ;;
10724
 
10725
    netbsd*)
10726
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10727
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10728
	wlarc=
10729
      else
10730
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10731
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10732
      fi
10733
      ;;
10734
 
10735
    solaris* | sysv5*)
10736
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
10737
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
10738
	cat <<EOF 1>&2
10739
 
10740
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10741
*** create shared libraries on Solaris systems.  Therefore, libtool
10742
*** is disabling shared libraries support.  We urge you to upgrade GNU
10743
*** binutils to release 2.9.1 or newer.  Another option is to modify
10744
*** your PATH or compiler configuration so that the native linker is
10745
*** used, and then restart.
10746
 
10747
EOF
10748
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10749
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10750
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10751
      else
10752
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
10753
      fi
10754
      ;;
10755
 
10756
    sunos4*)
10757
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10758
      wlarc=
10759
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10760
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10761
      ;;
10762
 
10763
    *)
10764
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10765
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10766
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10767
      else
10768
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
10769
      fi
10770
      ;;
10771
    esac
10772
 
10773
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10774
      runpath_var=LD_RUN_PATH
10775
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10776
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10777
      # ancient GNU ld didn't support --whole-archive et. al.
10778
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
10779
 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10780
      else
10781
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10782
      fi
10783
    fi
10784
  else
10785
    # PORTME fill in a description of your system's linker (not GNU ld)
10786
    case $host_os in
10787
    aix3*)
10788
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10789
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10790
      _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'
10791
      # Note: this linker hardcodes the directories in LIBPATH if there
10792
      # are no directories specified by -L.
10793
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10794
      if test "$GCC" = yes && test -z "$link_static_flag"; then
10795
	# Neither direct hardcoding nor static linking is supported with a
10796
	# broken collect2.
10797
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10798
      fi
10799
      ;;
10800
 
10801
    aix4* | aix5*)
10802
      if test "$host_cpu" = ia64; then
10803
	# On IA64, the linker does run time linking by default, so we don't
10804
	# have to do anything special.
10805
	aix_use_runtimelinking=no
10806
	exp_sym_flag='-Bexport'
10807
	no_entry_flag=""
10808
      else
10809
	# If we're using GNU nm, then we don't want the "-C" option.
10810
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
10811
	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10812
	  _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'
10813
	else
10814
	  _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'
10815
	fi
10816
 
10817
	# KDE requires run time linking.  Make it the default.
10818
	aix_use_runtimelinking=yes
10819
	exp_sym_flag='-bexport'
10820
	no_entry_flag='-bnoentry'
10821
      fi
10822
 
10823
      # When large executables or shared objects are built, AIX ld can
10824
      # have problems creating the table of contents.  If linking a library
10825
      # or program results in "error TOC overflow" add -mminimal-toc to
10826
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
10827
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10828
 
10829
      _LT_AC_TAGVAR(archive_cmds, $1)=''
10830
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10831
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10832
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10833
 
10834
      if test "$GCC" = yes; then
10835
	case $host_os in aix4.[012]|aix4.[012].*)
10836
	# We only want to do this on AIX 4.2 and lower, the check
10837
	# below for broken collect2 doesn't work under 4.3+
10838
	  collect2name=`${CC} -print-prog-name=collect2`
10839
	  if test -f "$collect2name" && \
10840
  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
10841
	  then
10842
  	  # We have reworked collect2
10843
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10844
	  else
10845
  	  # We have old collect2
10846
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10847
  	  # It fails to find uninstalled libraries when the uninstalled
10848
  	  # path is not listed in the libpath.  Setting hardcode_minus_L
10849
  	  # to unsupported forces relinking
10850
  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10851
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10852
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10853
	  fi
10854
	esac
10855
	shared_flag='-shared'
10856
      else
10857
	# not using gcc
10858
	if test "$host_cpu" = ia64; then
10859
  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10860
  	# chokes on -Wl,-G. The following line is correct:
10861
	  shared_flag='-G'
10862
	else
10863
  	if test "$aix_use_runtimelinking" = yes; then
10864
	    shared_flag='-qmkshrobj ${wl}-G'
10865
	  else
10866
	    shared_flag='-qmkshrobj'
10867
  	fi
10868
	fi
10869
      fi
10870
 
10871
      # Let the compiler handle the export list.
10872
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
10873
      if test "$aix_use_runtimelinking" = yes; then
10874
	# Warning - without using the other runtime loading flags (-brtl),
10875
	# -berok will link without error, but may produce a broken library.
10876
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10877
       # Determine the default libpath from the value encoded in an empty executable.
10878
	_LT_AC_SYS_LIBPATH_AIX
10879
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10880
	_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
10881
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10882
       else
10883
	if test "$host_cpu" = ia64; then
10884
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10885
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10886
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
10887
	else
10888
	 # Determine the default libpath from the value encoded in an empty executable.
10889
	 _LT_AC_SYS_LIBPATH_AIX
10890
	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10891
	  # Warning - without using the other run time loading flags,
10892
	  # -berok will link without error, but may produce a broken library.
10893
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10894
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10895
	  # -bexpall does not export symbols beginning with underscore (_)
10896
	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10897
	  # Exported symbols can be pulled into shared objects from archives
10898
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10899
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10900
	  # This is similar to how AIX traditionally builds it's shared libraries.
10901
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10902
	fi
10903
      fi
10904
      ;;
10905
 
10906
    amigaos*)
10907
      _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)'
10908
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10909
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10910
      # see comment about different semantics on the GNU ld section
10911
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10912
      ;;
10913
 
10914
    bsdi4*)
10915
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10916
      ;;
10917
 
10918
    cygwin* | mingw* | pw32*)
10919
      # When not using gcc, we currently assume that we are using
10920
      # Microsoft Visual C++.
10921
      # hardcode_libdir_flag_spec is actually meaningless, as there is
10922
      # no search path for DLLs.
10923
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10924
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
10925
      # Tell ltmain to make .lib files, not .a files.
10926
      libext=lib
10927
      # Tell ltmain to make .dll files, not .so files.
10928
      shrext=".dll"
10929
      # FIXME: Setting linknames here is a bad hack.
10930
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
10931
      # The linker will automatically build a .lib file if we build a DLL.
10932
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10933
      # FIXME: Should let the user specify the lib program.
10934
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10935
      fix_srcfile_path='`cygpath -w "$srcfile"`'
10936
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10937
      ;;
10938
 
10939
    darwin* | rhapsody*)
10940
    if test "$GXX" = yes ; then
10941
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10942
      case "$host_os" in
10943
      rhapsody* | darwin1.[[012]])
10944
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
10945
	;;
10946
      *) # Darwin 1.3 on
10947
	if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
10948
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
10949
	else
10950
	  case ${MACOSX_DEPLOYMENT_TARGET} in
10951
	    10.[012])
10952
	      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
10953
	      ;;
10954
	    10.*)
10955
	      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
10956
	      ;;
10957
	  esac
10958
	fi
10959
	;;
10960
      esac
10961
    	lt_int_apple_cc_single_mod=no
10962
    	output_verbose_link_cmd='echo'
10963
    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
10964
    	  lt_int_apple_cc_single_mod=yes
10965
    	fi
10966
    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10967
    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
10968
    	else
10969
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
10970
      fi
10971
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
10972
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
10973
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10974
          _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 $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10975
        else
10976
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10977
        fi
10978
          _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 $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10979
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
10980
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
10981
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10982
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10983
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10984
    else  
10985
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10986
    fi  
10987
      ;;
10988
 
10989
    dgux*)
10990
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10991
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10992
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10993
      ;;
10994
 
10995
    freebsd1*)
10996
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10997
      ;;
10998
 
10999
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11000
    # support.  Future versions do this automatically, but an explicit c++rt0.o
11001
    # does not break anything, and helps significantly (at the cost of a little
11002
    # extra space).
11003
    freebsd2.2*)
11004
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11005
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11006
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11007
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11008
      ;;
11009
 
11010
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11011
    freebsd2*)
11012
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11013
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11014
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11015
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11016
      ;;
11017
 
11018
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11019
    freebsd* | kfreebsd*-gnu)
11020
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
11021
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11022
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11023
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11024
      ;;
11025
 
11026
    hpux9*)
11027
      if test "$GCC" = yes; then
11028
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11029
      else
11030
	_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'
11031
      fi
11032
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11033
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11034
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11035
 
11036
      # hardcode_minus_L: Not really in the search PATH,
11037
      # but as the default location of the library.
11038
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11039
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11040
      ;;
11041
 
11042
    hpux10* | hpux11*)
11043
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11044
	case "$host_cpu" in
11045
	hppa*64*|ia64*)
11046
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11047
	  ;;
11048
	*)
11049
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
11050
	  ;;
11051
	esac
11052
      else
11053
	case "$host_cpu" in
11054
	hppa*64*|ia64*)
11055
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
11056
	  ;;
11057
	*)
11058
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11059
	  ;;
11060
	esac
11061
      fi
11062
      if test "$with_gnu_ld" = no; then
11063
	case "$host_cpu" in
11064
	hppa*64*)
11065
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11066
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11067
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11068
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
11069
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11070
	  ;;
11071
	ia64*)
11072
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11073
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
11074
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11075
 
11076
	  # hardcode_minus_L: Not really in the search PATH,
11077
	  # but as the default location of the library.
11078
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11079
	  ;;
11080
	*)
11081
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11082
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11083
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11084
	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11085
 
11086
	  # hardcode_minus_L: Not really in the search PATH,
11087
	  # but as the default location of the library.
11088
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11089
	  ;;
11090
	esac
11091
      fi
11092
      ;;
11093
 
11094
    irix5* | irix6* | nonstopux*)
11095
      if test "$GCC" = yes; then
11096
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11097
      else
11098
	_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'
11099
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11100
      fi
11101
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11102
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11103
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11104
      ;;
11105
 
11106
    netbsd*)
11107
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11108
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
11109
      else
11110
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
11111
      fi
11112
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11113
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11114
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11115
      ;;
11116
 
11117
    newsos6)
11118
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11119
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11120
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11121
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11122
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11123
      ;;
11124
 
11125
    openbsd*)
11126
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11127
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11128
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11129
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11130
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11131
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11132
      else
11133
       case $host_os in
11134
	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11135
	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11136
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11137
	   ;;
11138
	 *)
11139
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11140
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11141
	   ;;
11142
       esac
11143
      fi
11144
      ;;
11145
 
11146
    os2*)
11147
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11148
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11149
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11150
      _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 $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
11151
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11152
      ;;
11153
 
11154
    osf3*)
11155
      if test "$GCC" = yes; then
11156
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11157
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11158
      else
11159
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11160
	_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'
11161
      fi
11162
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11163
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11164
      ;;
11165
 
11166
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
11167
      if test "$GCC" = yes; then
11168
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11169
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${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'
11170
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11171
      else
11172
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11173
	_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'
11174
	_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~
11175
	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
11176
 
11177
	# Both c and cxx compiler support -rpath directly
11178
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
11179
      fi
11180
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11181
      ;;
11182
 
11183
    sco3.2v5*)
11184
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11185
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11186
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
11187
      runpath_var=LD_RUN_PATH
11188
      hardcode_runpath_var=yes
11189
      ;;
11190
 
11191
    solaris*)
11192
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11193
      if test "$GCC" = yes; then
11194
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11195
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11196
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
11197
      else
11198
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11199
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11200
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11201
      fi
11202
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11203
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11204
      case $host_os in
11205
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11206
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
11207
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
11208
      esac
11209
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11210
      ;;
11211
 
11212
    sunos4*)
11213
      if test "x$host_vendor" = xsequent; then
11214
	# Use $CC to link under sequent, because it throws in some extra .o
11215
	# files that make .init and .fini sections work.
11216
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
11217
      else
11218
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11219
      fi
11220
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11221
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11222
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11223
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11224
      ;;
11225
 
11226
    sysv4)
11227
      case $host_vendor in
11228
	sni)
11229
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11230
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
11231
	;;
11232
	siemens)
11233
	  ## LD is ld it makes a PLAMLIB
11234
	  ## CC just makes a GrossModule.
11235
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11236
	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
11237
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
11238
        ;;
11239
	motorola)
11240
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11241
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
11242
	;;
11243
      esac
11244
      runpath_var='LD_RUN_PATH'
11245
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11246
      ;;
11247
 
11248
    sysv4.3*)
11249
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11250
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11251
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
11252
      ;;
11253
 
11254
    sysv4*MP*)
11255
      if test -d /usr/nec; then
11256
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11257
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11258
	runpath_var=LD_RUN_PATH
11259
	hardcode_runpath_var=yes
11260
	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
11261
      fi
11262
      ;;
11263
 
11264
    sysv4.2uw2*)
11265
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11266
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11267
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11268
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11269
      hardcode_runpath_var=yes
11270
      runpath_var=LD_RUN_PATH
11271
      ;;
11272
 
11273
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
11274
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
11275
      if test "$GCC" = yes; then
11276
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11277
      else
11278
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11279
      fi
11280
      runpath_var='LD_RUN_PATH'
11281
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11282
      ;;
11283
 
11284
    sysv5*)
11285
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11286
      # $CC -shared without GNU ld will not create a library from C++
11287
      # object files and a static libstdc++, better avoid it by now
11288
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11289
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11290
  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11291
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11292
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11293
      runpath_var='LD_RUN_PATH'
11294
      ;;
11295
 
11296
    uts4*)
11297
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11298
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11299
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11300
      ;;
11301
 
11302
    *)
11303
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
11304
      ;;
11305
    esac
11306
  fi
11307
])
11308
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
11309
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
11310
 
11311
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11312
if test "$GCC" = yes; then
11313
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11314
fi
11315
 
11316
#
11317
# Do we need to explicitly link libc?
11318
#
11319
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11320
x|xyes)
11321
  # Assume -lc should be added
11322
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11323
 
11324
  if test "$enable_shared" = yes && test "$GCC" = yes; then
11325
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
11326
    *'~'*)
11327
      # FIXME: we may have to deal with multi-command sequences.
11328
      ;;
11329
    '$CC '*)
11330
      # Test whether the compiler implicitly links with -lc since on some
11331
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
11332
      # to ld, don't add -lc before -lgcc.
11333
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11334
      $rm conftest*
11335
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11336
 
11337
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11338
        soname=conftest
11339
        lib=conftest
11340
        libobjs=conftest.$ac_objext
11341
        deplibs=
11342
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11343
        compiler_flags=-v
11344
        linker_flags=-v
11345
        verstring=
11346
        output_objdir=.
11347
        libname=conftest
11348
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11349
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
11350
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11351
        then
11352
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11353
        else
11354
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11355
        fi
11356
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11357
      else
11358
        cat conftest.err 1>&5
11359
      fi
11360
      $rm conftest*
11361
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11362
      ;;
11363
    esac
11364
  fi
11365
  ;;
11366
esac
11367
])
11368
m4trace:acinclude.m4:11738: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11369
# /* ltdll.c starts here */
11370
# #define WIN32_LEAN_AND_MEAN
11371
# #include <windows.h>
11372
# #undef WIN32_LEAN_AND_MEAN
11373
# #include <stdio.h>
11374
#
11375
# #ifndef __CYGWIN__
11376
# #  ifdef __CYGWIN32__
11377
# #    define __CYGWIN__ __CYGWIN32__
11378
# #  endif
11379
# #endif
11380
#
11381
# #ifdef __cplusplus
11382
# extern "C" {
11383
# #endif
11384
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11385
# #ifdef __cplusplus
11386
# }
11387
# #endif
11388
#
11389
# #ifdef __CYGWIN__
11390
# #include <cygwin/cygwin_dll.h>
11391
# DECLARE_CYGWIN_DLL( DllMain );
11392
# #endif
11393
# HINSTANCE __hDllInstance_base;
11394
#
11395
# BOOL APIENTRY
11396
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11397
# {
11398
#   __hDllInstance_base = hInst;
11399
#   return TRUE;
11400
# }
11401
# /* ltdll.c ends here */
11402
])
11403
m4trace:acinclude.m4:11777: -1- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11404
m4trace:acinclude.m4:11781: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
11405
m4trace:acinclude.m4:11782: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
11406
m4trace:acinclude.m4:11783: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
11407
m4trace:acinclude.m4:11784: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11408
m4trace:acinclude.m4:11785: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11409
m4trace:acinclude.m4:11786: -1- AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
11410
m4trace:acinclude.m4:11787: -1- AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
11411
m4trace:acinclude.m4:11792: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no)
11412
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11413
  AC_SUBST(GCJFLAGS)
11414
])
11415
m4trace:acinclude.m4:11798: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no)
11416
])
11417
m4trace:acinclude.m4:11812: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output])
11418
AC_CACHE_VAL(lt_cv_path_SED,
11419
[# Loop through the user's path and test for sed and gsed.
11420
# Then use that list of sed's as ones to test for truncation.
11421
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11422
for as_dir in $PATH
11423
do
11424
  IFS=$as_save_IFS
11425
  test -z "$as_dir" && as_dir=.
11426
  for lt_ac_prog in sed gsed; do
11427
    for ac_exec_ext in '' $ac_executable_extensions; do
11428
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11429
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11430
      fi
11431
    done
11432
  done
11433
done
11434
lt_ac_max=0
11435
lt_ac_count=0
11436
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11437
# along with /bin/sed that truncates output.
11438
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11439
  test ! -f $lt_ac_sed && break
11440
  cat /dev/null > conftest.in
11441
  lt_ac_count=0
11442
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11443
  # Check for GNU sed and select it if it is found.
11444
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11445
    lt_cv_path_SED=$lt_ac_sed
11446
    break
11447
  fi
11448
  while true; do
11449
    cat conftest.in conftest.in >conftest.tmp
11450
    mv conftest.tmp conftest.in
11451
    cp conftest.in conftest.nl
11452
    echo >>conftest.nl
11453
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11454
    cmp -s conftest.out conftest.nl || break
11455
    # 10000 chars as input seems more than enough
11456
    test $lt_ac_count -gt 10 && break
11457
    lt_ac_count=`expr $lt_ac_count + 1`
11458
    if test $lt_ac_count -gt $lt_ac_max; then
11459
      lt_ac_max=$lt_ac_count
11460
      lt_cv_path_SED=$lt_ac_sed
11461
    fi
11462
  done
11463
done
11464
])
11465
SED=$lt_cv_path_SED
11466
AC_MSG_RESULT([$SED])
11467
])
155 andreas 11468
m4trace:configure.ac:6: -1- AC_DEFUN([CHECK_GDAL], [
11469
LIBGDAL="-lgdal1.5.0"
11470
AC_REQUIRE([KDE_CHECK_LIB64])
11471
 
11472
ac_gdal_includes=NO ac_gdal_libraries=NO
11473
gdal_libraries=""
11474
gdal_includes=""
11475
AC_ARG_WITH(gdal-dir,
11476
    AC_HELP_STRING([--with-gdal-dir=DIR],[where the root of GDAL is installed]),
11477
    [  ac_gdal_includes="$withval"/include
11478
       ac_gdal_libraries="$withval"/lib$kdelibstuff
88 andreas 11479
    ])
11480
 
155 andreas 11481
want_gdal=yes
11482
AC_ARG_WITH(gdal,
11483
    AC_HELP_STRING([--without-gdal],[disable GDAL checks]),
11484
    [want_gdal=$withval])
88 andreas 11485
 
155 andreas 11486
if test $want_gdal = yes; then
88 andreas 11487
 
155 andreas 11488
AC_MSG_CHECKING(for GDAL)
88 andreas 11489
 
155 andreas 11490
AC_CACHE_VAL(ac_cv_have_gdal,
11491
[#try to guess GDAL locations
11492
 
11493
  gdal_incdirs="/usr/include /usr/local/include /usr/include/gdal /usr/local/include/gdal $prefix/include $prefix/include/gdal"
11494
  gdal_incdirs="$ac_gdal_includes $gdal_incdirs"
11495
  AC_FIND_FILE(gdal/gdal_priv.h, $gdal_incdirs, gdal_incdir)
11496
  ac_gdal_includes="$gdal_incdir"
88 andreas 11497
 
155 andreas 11498
  gdal_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/gdal/lib$kdelibsuff /usr/local/gdal/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
11499
  if test ! "$ac_gdal_libraries" = "NO"; then
11500
    gdal_libdirs="$ac_gdal_libraries $gdal_libdirs"
11501
  fi
11502
 
11503
  test=NONE
11504
  gdal_libdir=NONE
11505
  for dir in $gdal_libdirs; do
11506
    try="ls -1 $dir/libgdal1.5.0*"
11507
    if test=`eval $try 2> /dev/null`; then gdal_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
88 andreas 11508
  done
11509
 
155 andreas 11510
  ac_gdal_libraries="$gdal_libdir"
11511
 
11512
  ac_ldflags_safe="$LDFLAGS"
11513
  ac_libs_safe="$LIBS"
11514
 
11515
  LDFLAGS="$ac_ldflags_safe"
11516
  LIBS="$ac_libs_safe"
11517
 
11518
  if test "$ac_gdal_includes" = NO || test "$ac_gdal_libraries" = NO; then
11519
    have_gdal=no
11520
  else
11521
    have_gdal=yes;
11522
  fi
11523
 
11524
  ])
11525
 
11526
  eval "$ac_cv_have_gdal"
11527
 
11528
  AC_MSG_RESULT([libraries $ac_gdal_libraries, headers $ac_gdal_includes])
88 andreas 11529
else
155 andreas 11530
  have_gdal=no
11531
fi
88 andreas 11532
 
155 andreas 11533
if test "$have_gdal" = yes; then
11534
  AC_MSG_CHECKING(for GDAL version)
11535
  dnl Check for GDAL version
11536
  AC_CACHE_VAL(ac_cv_gdal_version,
11537
  [
88 andreas 11538
 
155 andreas 11539
    cat >conftest.$ac_ext <<EOF
11540
#include <gdal/gdal_priv.h>
11541
#include <stdio.h>
11542
    int main() {
11543
 
11544
#ifndef GDAL_VERSION_NUM
11545
      printf("gdal_version=\\"error\\"\n");
11546
#else
11547
      if (GDAL_VERSION_NUM < 1500)
11548
        printf("gdal_version=\\"old\\"\n");
88 andreas 11549
      else
155 andreas 11550
        printf("gdal_version=\\"ok\\"\n");
11551
#endif
11552
     return (0);
11553
    }
11554
EOF
88 andreas 11555
 
155 andreas 11556
    ac_save_CPPFLAGS=$CPPFLAGS
11557
    if test "$ac_gdal_includes" != "/usr/include"; then
11558
        CPPFLAGS="$CPPFLAGS -I$ac_gdal_includes"
11559
    fi
88 andreas 11560
 
155 andreas 11561
    if AC_TRY_EVAL(ac_link); then 
11562
 
11563
      if eval `./conftest 2>&5`; then
11564
        if test $gdal_version = error; then
11565
          AC_MSG_ERROR([$gdal_incdir/gdal/gdal_priv.h doesn't define GDAL_VERSION_NUM !])
11566
        else
11567
          if test $gdal_version = old; then
11568
            AC_MSG_WARN([GDAL version too old. Upgrade to 1.5.0 at least, see http://www.gdal.org. GDAL support disabled.])
11569
            have_gdal=no
11570
          fi
11571
        fi
11572
        ac_cv_gdal_version="gdal_version=$gdal_version"
11573
      else
11574
        AC_MSG_ERROR([Your system couldn't run a small GDAL test program.
11575
        Check config.log, and if you can't figure it out, send a mail to 
11576
        Andreas Theofilu <andreas@theosys.at>, attaching your config.log])
88 andreas 11577
      fi
11578
 
155 andreas 11579
    else
11580
      AC_MSG_ERROR([Your system couldn't link a small GDAL test program.
11581
      Check config.log, and if you can't figure it out, send a mail to 
11582
      Andreas Theofilu <andreas@theosys.at>, attaching your config.log])
11583
    fi 
11584
    CPPFLAGS=$ac_save_CPPFLAGS
88 andreas 11585
 
155 andreas 11586
  ])
88 andreas 11587
 
155 andreas 11588
  eval "$ac_cv_gdal_version"
11589
  AC_MSG_RESULT($gdal_version)
11590
fi
88 andreas 11591
 
155 andreas 11592
if test "$have_gdal" != yes; then
11593
  LIBGDAL="";
88 andreas 11594
else
155 andreas 11595
  AC_DEFINE(HAVE_GDAL, 1, [If we are going to use GDAL])
11596
  ac_cv_have_gdal="have_gdal=yes \
11597
    ac_gdal_includes=$ac_gdal_includes ac_gdal_libraries=$ac_gdal_libraries"
11598
 
11599
  gdal_libraries="$ac_gdal_libraries"
11600
  gdal_includes="$ac_gdal_includes"
88 andreas 11601
 
155 andreas 11602
  if test $gdal_version = "old"; then
11603
    AC_DEFINE(HAVE_OLD_GDAL_API, 1, [Define if you have GDAL < 1.5.0])
11604
  fi
88 andreas 11605
fi
11606
 
155 andreas 11607
GDAL_INCLUDES=
88 andreas 11608
 
155 andreas 11609
if test "$gdal_includes" = "/usr/include"; then
11610
  if test -f /usr/kerberos/include/krb5.h; then
11611
	GDAL_INCLUDES="-I/usr/kerberos/include"
11612
  fi
11613
elif test  "$gdal_includes" != "/usr/local/include" && test -n "$gdal_includes"; then
11614
  GDAL_INCLUDES="-I$gdal_includes"
88 andreas 11615
fi
11616
 
155 andreas 11617
if test "$gdal_libraries" = "/usr/lib" || test "$gdal_libraries" = "/usr/local/lib" || test -z "$gdal_libraries" || test "$gdal_libraries" = "NONE"; then
11618
 GDAL_LDFLAGS=""
88 andreas 11619
else
155 andreas 11620
 GDAL_LDFLAGS="-L$gdal_libraries -R$gdal_libraries"
88 andreas 11621
fi
11622
 
155 andreas 11623
AC_SUBST(GDAL_INCLUDES)
11624
AC_SUBST(GDAL_LDFLAGS)
11625
AC_SUBST(LIBGDAL)
88 andreas 11626
])