Annotation of embedaddon/php/aclocal.m4, revision 1.1.1.3
1.1 misho 1: dnl
1.1.1.2 misho 2: dnl $Id$
1.1 misho 3: dnl
4: dnl This file contains local autoconf functions.
5: dnl
6:
7: dnl -------------------------------------------------------------------------
8: dnl Output stylize macros for configure (help/runtime)
9: dnl -------------------------------------------------------------------------
10:
11: dnl
12: dnl PHP_HELP_SEPARATOR(title)
13: dnl
14: dnl Adds separator title into the configure --help display.
15: dnl
16: AC_DEFUN([PHP_HELP_SEPARATOR],[
17: AC_ARG_ENABLE([],[
18: $1
19: ],[])
20: ])
21:
22: dnl
23: dnl PHP_CONFIGURE_PART(title)
24: dnl
25: dnl Adds separator title configure output (idea borrowed from mm)
26: dnl
27: AC_DEFUN([PHP_CONFIGURE_PART],[
28: AC_MSG_RESULT()
29: AC_MSG_RESULT([${T_MD}$1${T_ME}])
30: ])
31:
32: dnl -------------------------------------------------------------------------
33: dnl Build system helper macros
34: dnl -------------------------------------------------------------------------
35:
36: dnl
37: dnl PHP_DEF_HAVE(what)
38: dnl
39: dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'
40: dnl
41: AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])])
42:
43: dnl
44: dnl PHP_RUN_ONCE(namespace, variable, code)
45: dnl
46: dnl execute code, if variable is not set in namespace
47: dnl
48: AC_DEFUN([PHP_RUN_ONCE],[
49: changequote({,})
50: unique=`echo $2|$SED 's/[^a-zA-Z0-9]/_/g'`
51: changequote([,])
52: cmd="echo $ac_n \"\$$1$unique$ac_c\""
53: if test -n "$unique" && test "`eval $cmd`" = "" ; then
54: eval "$1$unique=set"
55: $3
56: fi
57: ])
58:
59: dnl
60: dnl PHP_EXPAND_PATH(path, variable)
61: dnl
62: dnl expands path to an absolute path and assigns it to variable
63: dnl
64: AC_DEFUN([PHP_EXPAND_PATH],[
65: if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
66: $2=$1
67: else
68: changequote({,})
69: ep_dir="`echo $1|$SED 's%/*[^/][^/]*/*$%%'`"
70: changequote([,])
71: ep_realdir="`(cd \"$ep_dir\" && pwd)`"
72: $2="$ep_realdir/`basename \"$1\"`"
73: fi
74: ])
75:
76: dnl
77: dnl PHP_DEFINE(WHAT [, value[, directory]])
78: dnl
79: dnl Creates builddir/include/what.h and in there #define WHAT value
80: dnl
81: AC_DEFUN([PHP_DEFINE],[
82: [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
83: ])
84:
85: dnl
86: dnl PHP_SUBST(varname)
87: dnl
88: dnl Adds variable with it's value into Makefile, e.g.:
89: dnl CC = gcc
90: dnl
91: AC_DEFUN([PHP_SUBST],[
92: PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
93: ])
94:
95: dnl
96: dnl PHP_SUBST_OLD(varname)
97: dnl
98: dnl Same as PHP_SUBST() but also substitutes all @VARNAME@
99: dnl instances in every file passed to AC_OUTPUT()
100: dnl
101: AC_DEFUN([PHP_SUBST_OLD],[
102: PHP_SUBST($1)
103: AC_SUBST($1)
104: ])
105:
106: dnl
107: dnl PHP_OUTPUT(file)
108: dnl
109: dnl Adds "file" to the list of files generated by AC_OUTPUT
110: dnl This macro can be used several times.
111: dnl
112: AC_DEFUN([PHP_OUTPUT],[
113: PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
114: ])
115:
116:
117: dnl -------------------------------------------------------------------------
118: dnl Build system base macros
119: dnl -------------------------------------------------------------------------
120:
121: dnl
122: dnl PHP_CANONICAL_HOST_TARGET
123: dnl
124: AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[
125: AC_REQUIRE([AC_CANONICAL_HOST])dnl
126: AC_REQUIRE([AC_CANONICAL_TARGET])dnl
127: dnl Make sure we do not continue if host_alias is empty.
128: if test -z "$host_alias" && test -n "$host"; then
129: host_alias=$host
130: fi
131: if test -z "$host_alias"; then
132: AC_MSG_ERROR([host_alias is not set!])
133: fi
134: ])
135:
136: dnl
137: dnl PHP_INIT_BUILD_SYSTEM
138: dnl
139: AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
140: AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
141: test -d include || $php_shtool mkdir include
142: > Makefile.objects
143: > Makefile.fragments
144: dnl We need to play tricks here to avoid matching the grep line itself
145: pattern=define
146: $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null
147: ])
148:
149: dnl
150: dnl PHP_GEN_GLOBAL_MAKEFILE
151: dnl
152: dnl Generates the global makefile.
153: dnl
154: AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[
155: cat >Makefile <<EOF
156: srcdir = $abs_srcdir
157: builddir = $abs_builddir
158: top_srcdir = $abs_srcdir
159: top_builddir = $abs_builddir
160: EOF
161: for i in $PHP_VAR_SUBST; do
162: eval echo "$i = \$$i" >> Makefile
163: done
164:
165: cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
166: ])
167:
168: dnl
169: dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile [, ext_srcdir [, ext_builddir]]])
170: dnl
171: dnl Processes a file called Makefile.frag in the source directory
172: dnl of the most recently added extension. $(srcdir) and $(builddir)
173: dnl are substituted with the proper paths. Can be used to supply
174: dnl custom rules and/or additional targets.
175: dnl
176: AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
177: ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
178: ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
179: ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
180: test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
181: ])
182:
183: dnl
184: dnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]])
185: dnl
186: dnl Adds sources which are located relative to source-path to the
187: dnl array of type type. Sources are processed with optional
188: dnl special-flags which are passed to the compiler. Sources
189: dnl can be either written in C or C++ (filenames shall end in .c
190: dnl or .cpp, respectively).
191: dnl
192: dnl Note: If source-path begins with a "/", the "/" is removed and
193: dnl the path is interpreted relative to the top build-directory.
194: dnl
195: dnl which array to append to?
196: AC_DEFUN([PHP_ADD_SOURCES],[
1.1.1.2 misho 197: PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))
1.1 misho 198: ])
199:
200: dnl
201: dnl _PHP_ASSIGN_BUILD_VARS(type)
202: dnl internal, don't use
203: AC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[
204: ifelse($1,shared,[
205: b_c_pre=$shared_c_pre
206: b_cxx_pre=$shared_cxx_pre
207: b_c_meta=$shared_c_meta
208: b_cxx_meta=$shared_cxx_meta
209: b_c_post=$shared_c_post
210: b_cxx_post=$shared_cxx_post
211: ],[
212: b_c_pre=$php_c_pre
213: b_cxx_pre=$php_cxx_pre
214: b_c_meta=$php_c_meta
215: b_cxx_meta=$php_cxx_meta
216: b_c_post=$php_c_post
217: b_cxx_post=$php_cxx_post
218: ])dnl
219: b_lo=[$]$1_lo
220: ])
221:
222: dnl
223: dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
224: dnl
225: dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
226: dnl name of the array target-var directly, as well as whether
227: dnl shared objects will be built from the sources.
228: dnl
229: dnl Should not be used directly.
230: dnl
231: AC_DEFUN([PHP_ADD_SOURCES_X],[
232: dnl relative to source- or build-directory?
233: dnl ac_srcdir/ac_bdir include trailing slash
234: case $1 in
235: ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
236: /*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
237: *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
238: esac
239:
240: dnl how to build .. shared or static?
241: ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php))
242:
243: dnl iterate over the sources
244: old_IFS=[$]IFS
245: for ac_src in $2; do
246:
247: dnl remove the suffix
248: IFS=.
249: set $ac_src
250: ac_obj=[$]1
251: IFS=$old_IFS
252:
253: dnl append to the array which has been dynamically chosen at m4 time
254: $4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
255:
256: dnl choose the right compiler/flags/etc. for the source-file
257: case $ac_src in
258: *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
259: *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
260: *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
261: *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
262: esac
263:
264: dnl create a rule for the object/source combo
265: cat >>Makefile.objects<<EOF
266: $ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
267: $ac_comp
268: EOF
269: done
270: ])
271:
272: dnl -------------------------------------------------------------------------
273: dnl Compiler characteristics checks
274: dnl -------------------------------------------------------------------------
275:
276: dnl
277: dnl PHP_TARGET_RDYNAMIC
278: dnl
279: dnl Checks whether -rdynamic is supported by the compiler. This
280: dnl is necessary for some targets to populate the global symbol
281: dnl table. Otherwise, dynamic modules would not be able to resolve
282: dnl PHP-related symbols.
283: dnl
284: dnl If successful, adds -rdynamic to PHP_LDFLAGS.
285: dnl
286: AC_DEFUN([PHP_TARGET_RDYNAMIC],[
287: if test -n "$GCC"; then
288: dnl we should use a PHP-specific macro here
289: PHP_CHECK_GCC_ARG(-rdynamic, gcc_rdynamic=yes)
290: if test "$gcc_rdynamic" = "yes"; then
291: PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic"
292: fi
293: fi
294: ])
295:
296: dnl
297: dnl PHP_RUNPATH_SWITCH
298: dnl
299: dnl Checks for -R, etc. switch
300: dnl
301: AC_DEFUN([PHP_RUNPATH_SWITCH],[
302: AC_MSG_CHECKING([if compiler supports -R])
303: AC_CACHE_VAL(php_cv_cc_dashr,[
304: SAVE_LIBS=$LIBS
305: LIBS="-R /usr/$PHP_LIBDIR $LIBS"
306: AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
307: LIBS=$SAVE_LIBS])
308: AC_MSG_RESULT([$php_cv_cc_dashr])
309: if test $php_cv_cc_dashr = "yes"; then
310: ld_runpath_switch=-R
311: else
312: AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
313: AC_CACHE_VAL(php_cv_cc_rpath,[
314: SAVE_LIBS=$LIBS
315: LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
316: AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
317: LIBS=$SAVE_LIBS])
318: AC_MSG_RESULT([$php_cv_cc_rpath])
319: if test $php_cv_cc_rpath = "yes"; then
320: ld_runpath_switch=-Wl,-rpath,
321: else
322: dnl something innocuous
323: ld_runpath_switch=-L
324: fi
325: fi
326: if test "$PHP_RPATH" = "no"; then
327: ld_runpath_switch=
328: fi
329: ])
330:
331: dnl
332: dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)
333: dnl
334: AC_DEFUN([PHP_CHECK_GCC_ARG],[
335: gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
336: AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
337: echo 'void somefunc() { };' > conftest.c
338: cmd='$CC $1 -c conftest.c'
339: if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then
340: ac_result=no
341: else
342: ac_result=yes
343: fi
344: eval $gcc_arg_name=$ac_result
345: rm -f conftest.*
346: ])
347: if eval test "\$$gcc_arg_name" = "yes"; then
348: $2
349: else
350: :
351: $3
352: fi
353: ])
354:
355: dnl
356: dnl PHP_LIBGCC_LIBPATH(gcc)
357: dnl
358: dnl Stores the location of libgcc in libgcc_libpath
359: dnl
360: AC_DEFUN([PHP_LIBGCC_LIBPATH],[
361: changequote({,})
362: libgcc_libpath=`$1 --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'`
363: changequote([,])
364: ])
365:
366: dnl -------------------------------------------------------------------------
367: dnl Macros to modify LIBS, INCLUDES, etc. variables
368: dnl -------------------------------------------------------------------------
369:
370: dnl
371: dnl PHP_REMOVE_USR_LIB(NAME)
372: dnl
373: dnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME
374: dnl
375: AC_DEFUN([PHP_REMOVE_USR_LIB],[
376: unset ac_new_flags
377: for i in [$]$1; do
378: case [$]i in
379: -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/[)] ;;
380: *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
381: esac
382: done
383: $1=[$]ac_new_flags
384: ])
385:
386: dnl
387: dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD)
388: dnl
389: dnl Use this macro, if you need to add libraries and or library search
390: dnl paths to the PHP build system which are only given in compiler
391: dnl notation.
392: dnl
393: AC_DEFUN([PHP_EVAL_LIBLINE],[
394: for ac_i in $1; do
395: case $ac_i in
396: -pthread[)]
397: if test "$ext_shared" = "yes"; then
398: $2="[$]$2 -pthread"
399: else
400: PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
401: fi
402: ;;
403: -l*[)]
404: ac_ii=`echo $ac_i|cut -c 3-`
405: PHP_ADD_LIBRARY($ac_ii,1,$2)
406: ;;
407: -L*[)]
408: ac_ii=`echo $ac_i|cut -c 3-`
409: PHP_ADD_LIBPATH($ac_ii,$2)
410: ;;
411: esac
412: done
413: ])
414:
415: dnl
416: dnl PHP_EVAL_INCLINE(headerline)
417: dnl
418: dnl Use this macro, if you need to add header search paths to the PHP
419: dnl build system which are only given in compiler notation.
420: dnl
421: AC_DEFUN([PHP_EVAL_INCLINE],[
422: for ac_i in $1; do
423: case $ac_i in
424: -I*[)]
425: ac_ii=`echo $ac_i|cut -c 3-`
426: PHP_ADD_INCLUDE($ac_ii)
427: ;;
428: esac
429: done
430: ])
431:
432: dnl internal, don't use
433: AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[
434: PHP_RUN_ONCE(LIBPATH, $1, [
435: test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
436: LDFLAGS="$LDFLAGS -L$1"
437: PHP_RPATHS="$PHP_RPATHS $1"
438: ])
439: ])dnl
440: dnl
441: dnl
442: dnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD])
443: dnl
444: dnl Adds a path to linkpath/runpath (LDFLAGS)
445: dnl
446: AC_DEFUN([PHP_ADD_LIBPATH],[
447: if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then
448: PHP_EXPAND_PATH($1, ai_p)
449: ifelse([$2],,[
450: _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
451: ],[
452: if test "$ext_shared" = "yes"; then
453: $2="-L$ai_p [$]$2"
454: test -n "$ld_runpath_switch" && $2="$ld_runpath_switch$ai_p [$]$2"
455: else
456: _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
457: fi
458: ])
459: fi
460: ])
461:
462: dnl
463: dnl PHP_UTILIZE_RPATHS()
464: dnl
465: dnl builds RPATHS/LDFLAGS from PHP_RPATHS
466: dnl
467: AC_DEFUN([PHP_UTILIZE_RPATHS],[
468: OLD_RPATHS=$PHP_RPATHS
469: unset PHP_RPATHS
470:
471: for i in $OLD_RPATHS; do
472: dnl Can be passed to native cc/libtool
473: PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
474: dnl Libtool-specific
475: PHP_RPATHS="$PHP_RPATHS -R $i"
476: dnl cc-specific
477: NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
478: done
479:
480: if test "$PHP_RPATH" = "no"; then
481: unset PHP_RPATHS
482: unset NATIVE_RPATHS
483: fi
484: ])
485:
486: dnl
487: dnl PHP_ADD_INCLUDE(path [,before])
488: dnl
489: dnl add an include path.
490: dnl if before is 1, add in the beginning of INCLUDES.
491: dnl
492: AC_DEFUN([PHP_ADD_INCLUDE],[
493: if test "$1" != "/usr/include"; then
494: PHP_EXPAND_PATH($1, ai_p)
495: PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [
496: if test "$2"; then
497: INCLUDES="-I$ai_p $INCLUDES"
498: else
499: INCLUDES="$INCLUDES -I$ai_p"
500: fi
501: ])
502: fi
503: ])
504:
505: dnl internal, don't use
506: AC_DEFUN([_PHP_X_ADD_LIBRARY],[dnl
507: ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
508: ])dnl
509: dnl
510: dnl internal, don't use
511: AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[
512: case $1 in
513: c|c_r|pthread*[)] ;;
514: *[)] ifelse($3,,[
515: _PHP_X_ADD_LIBRARY($1,$2,$5)
516: ],[
517: if test "$ext_shared" = "yes"; then
518: _PHP_X_ADD_LIBRARY($1,$2,$3)
519: else
520: $4($1,$2)
521: fi
522: ]) ;;
523: esac
524: ])dnl
525: dnl
526: dnl
527: dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
528: dnl
529: dnl add a library to the link line
530: dnl
531: AC_DEFUN([PHP_ADD_LIBRARY],[
532: _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
533: ])
534:
535: dnl
536: dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])
537: dnl
538: dnl add a library to the link line (deferred, not used during configure)
539: dnl
540: AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[
541: _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
542: ])
543:
544: dnl
545: dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
546: dnl
547: dnl add a library to the link line and path to linkpath/runpath.
548: dnl if shared-libadd is not empty and $ext_shared is yes,
549: dnl shared-libadd will be assigned the library information
550: dnl
551: AC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[
552: ifelse($3,,[
553: if test -n "$2"; then
554: PHP_ADD_LIBPATH($2)
555: fi
556: PHP_ADD_LIBRARY($1)
557: ],[
558: if test "$ext_shared" = "yes"; then
559: $3="-l$1 [$]$3"
560: if test -n "$2"; then
561: PHP_ADD_LIBPATH($2,$3)
562: fi
563: else
564: PHP_ADD_LIBRARY_WITH_PATH($1,$2)
565: fi
566: ])
567: ])
568:
569: dnl
570: dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])
571: dnl
572: dnl add a library to the link line (deferred)
573: dnl and path to linkpath/runpath (not deferred)
574: dnl if shared-libadd is not empty and $ext_shared is yes,
575: dnl shared-libadd will be assigned the library information
576: dnl
577: AC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[
578: ifelse($3,,[
579: if test -n "$2"; then
580: PHP_ADD_LIBPATH($2)
581: fi
582: PHP_ADD_LIBRARY_DEFER($1)
583: ],[
584: if test "$ext_shared" = "yes"; then
585: $3="-l$1 [$]$3"
586: if test -n "$2"; then
587: PHP_ADD_LIBPATH($2,$3)
588: fi
589: else
590: PHP_ADD_LIBRARY_DEFER_WITH_PATH($1,$2)
591: fi
592: ])
593: ])
594:
595: dnl
596: dnl PHP_ADD_FRAMEWORK(framework [,before])
597: dnl
598: dnl add a (Darwin / Mac OS X) framework to the link
599: dnl line. if before is 1, the framework is added
600: dnl to the beginning of the line.
601: dnl
602: AC_DEFUN([PHP_ADD_FRAMEWORK], [
603: PHP_RUN_ONCE(FRAMEWORKS, $1, [
604: if test "$2"; then
605: PHP_FRAMEWORKS="-framework $1 $PHP_FRAMEWORKS"
606: else
607: PHP_FRAMEWORKS="$PHP_FRAMEWORKS -framework $1"
608: fi
609: ])
610: ])
611:
612: dnl
613: dnl PHP_ADD_FRAMEWORKPATH(path [,before])
614: dnl
615: dnl add a (Darwin / Mac OS X) framework path to the link
616: dnl and include lines. default paths include (but are
617: dnl not limited to) /Local/Library/Frameworks and
618: dnl /System/Library/Frameworks, so these don't need
619: dnl to be specifically added. if before is 1, the
620: dnl framework path is added to the beginning of the
621: dnl relevant lines.
622: dnl
623: AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [
624: PHP_EXPAND_PATH($1, ai_p)
625: PHP_RUN_ONCE(FRAMEWORKPATH, $ai_p, [
626: if test "$2"; then
627: PHP_FRAMEWORKPATH="-F$ai_p $PHP_FRAMEWORKPATH"
628: else
629: PHP_FRAMEWORKPATH="$PHP_FRAMEWORKPATH -F$ai_p"
630: fi
631: ])
632: ])
633:
634: dnl
635: dnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path)
636: dnl
637: dnl Adds a (Darwin / Mac OS X) framework path and the
638: dnl framework itself to the link and include lines.
639: dnl
640: AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [
641: PHP_ADD_FRAMEWORKPATH($2)
642: PHP_ADD_FRAMEWORK($1)
643: ])
644:
645: dnl
646: dnl PHP_SET_LIBTOOL_VARIABLE(var)
647: dnl
648: dnl Set libtool variable
649: dnl
650: AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[
651: if test -z "$LIBTOOL"; then
652: LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
653: else
654: LIBTOOL="$LIBTOOL $1"
655: fi
656: ])
657:
658: dnl -------------------------------------------------------------------------
659: dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLE
660: dnl -------------------------------------------------------------------------
661:
662: dnl PHP_ARG_ANALYZE_EX
663: dnl internal
664: AC_DEFUN([PHP_ARG_ANALYZE_EX],[
665: ext_output="yes, shared"
666: ext_shared=yes
667: case [$]$1 in
668: shared,*[)]
669: $1=`echo "[$]$1"|$SED 's/^shared,//'`
670: ;;
671: shared[)]
672: $1=yes
673: ;;
674: no[)]
675: ext_output=no
676: ext_shared=no
677: ;;
678: *[)]
679: ext_output=yes
680: ext_shared=no
681: ;;
682: esac
683:
684: PHP_ALWAYS_SHARED([$1])
685: ])
686:
687: dnl PHP_ARG_ANALYZE
688: dnl internal
689: AC_DEFUN([PHP_ARG_ANALYZE],[
690: ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)])
691: ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
692: ])
693:
694: dnl
695: dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])
696: dnl Sets PHP_ARG_NAME either to the user value or to the default value.
697: dnl default-val defaults to no. This will also set the variable ext_shared,
698: dnl and will overwrite any previous variable of that name.
699: dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
700: dnl the PHP_ARG_ANALYZE_EX.
701: dnl
702: AC_DEFUN([PHP_ARG_WITH],[
703: php_with_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
704: PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
705: ])
706:
707: dnl PHP_REAL_ARG_WITH
708: dnl internal
709: AC_DEFUN([PHP_REAL_ARG_WITH],[
710: ifelse([$2],,,[AC_MSG_CHECKING([$2])])
711: AC_ARG_WITH($1,[$3],$5=[$]withval,
712: [
713: $5=ifelse($4,,no,$4)
714: ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
715: ])
716: PHP_ARG_ANALYZE($5,[$2],$6)
717: ])
718:
719: dnl
720: dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])
721: dnl Sets PHP_ARG_NAME either to the user value or to the default value.
722: dnl default-val defaults to no. This will also set the variable ext_shared,
723: dnl and will overwrite any previous variable of that name.
724: dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
725: dnl the PHP_ARG_ANALYZE_EX.
726: dnl
727: AC_DEFUN([PHP_ARG_ENABLE],[
728: php_enable_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
729: PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
730: ])
731:
732: dnl PHP_REAL_ARG_ENABLE
733: dnl internal
734: AC_DEFUN([PHP_REAL_ARG_ENABLE],[
735: ifelse([$2],,,[AC_MSG_CHECKING([$2])])
736: AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
737: [
738: $5=ifelse($4,,no,$4)
739: ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
740: ])
741: PHP_ARG_ANALYZE($5,[$2],$6)
742: ])
743:
744: dnl -------------------------------------------------------------------------
745: dnl Build macros
746: dnl -------------------------------------------------------------------------
747:
748: dnl
749: dnl PHP_BUILD_THREAD_SAFE
750: dnl
751: AC_DEFUN([PHP_BUILD_THREAD_SAFE],[
752: enable_maintainer_zts=yes
753: if test "$pthreads_working" != "yes"; then
754: AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])
755: fi
756: ])
757:
758: dnl
759: dnl PHP_REQUIRE_CXX
760: dnl
761: AC_DEFUN([PHP_REQUIRE_CXX],[
762: if test -z "$php_cxx_done"; then
763: AC_PROG_CXX
764: AC_PROG_CXXCPP
1.1.1.2 misho 765: PHP_ADD_LIBRARY(stdc++)
1.1 misho 766: php_cxx_done=yes
767: fi
768: ])
769:
770: dnl
771: dnl PHP_BUILD_SHARED
772: dnl
773: AC_DEFUN([PHP_BUILD_SHARED],[
774: PHP_BUILD_PROGRAM
775: OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
1.1.1.2 misho 776: php_sapi_module=shared
1.1 misho 777:
778: php_c_pre=$shared_c_pre
779: php_c_meta=$shared_c_meta
780: php_c_post=$shared_c_post
781: php_cxx_pre=$shared_cxx_pre
782: php_cxx_meta=$shared_cxx_meta
783: php_cxx_post=$shared_cxx_post
784: php_lo=$shared_lo
785: ])
786:
787: dnl
788: dnl PHP_BUILD_STATIC
789: dnl
790: AC_DEFUN([PHP_BUILD_STATIC],[
791: PHP_BUILD_PROGRAM
792: OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
1.1.1.2 misho 793: php_sapi_module=static
1.1 misho 794: ])
795:
796: dnl
797: dnl PHP_BUILD_BUNDLE
798: dnl
799: AC_DEFUN([PHP_BUILD_BUNDLE],[
800: PHP_BUILD_PROGRAM
801: OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle]
1.1.1.2 misho 802: php_sapi_module=static
1.1 misho 803: ])
804:
805: dnl
806: dnl PHP_BUILD_PROGRAM
807: dnl
808: AC_DEFUN([PHP_BUILD_PROGRAM],[
809: php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
810: php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
811: php_c_post=
812: php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
813: php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
814: php_cxx_post=
815: php_lo=lo
816:
817: case $with_pic in
818: yes) pic_setting='-prefer-pic';;
819: no) pic_setting='-prefer-non-pic';;
820: esac
821:
822: shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
823: shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
824: shared_c_post=
825: shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
826: shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
827: shared_cxx_post=
828: shared_lo=lo
829: ])
830:
831: dnl
832: dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext)
833: dnl
834: dnl Basically sets up the link-stage for building module-name
835: dnl from object_var in build-dir.
836: dnl
837: AC_DEFUN([PHP_SHARED_MODULE],[
838: install_modules="install-modules"
839:
840: case $host_alias in
841: *aix*[)]
842: suffix=so
843: link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$3'/$1.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) && mv -f '$3'/.libs/$1.so '$3'/$1.so'
844: ;;
845: *netware*[)]
846: suffix=nlm
847: link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) ifelse($1, php5lib, , -L$(top_builddir)/netware -lphp5lib) $(translit(ifelse($1, php5lib, $1, m4_substr($1, 3)),a-z_-,A-Z__)_SHARED_LIBADD)'
848: ;;
849: *[)]
850: suffix=la
851: link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
852: ;;
853: esac
854:
855: if test "x$5" = "xyes"; then
856: PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/$1.$suffix"
857: else
858: PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
859: fi
860: PHP_SUBST($2)
861: cat >>Makefile.objects<<EOF
862: \$(phplibdir)/$1.$suffix: $3/$1.$suffix
863: \$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
864:
865: $3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
866: $link_cmd
867:
868: EOF
869: ])
870:
871: dnl
872: dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]])
873: dnl
1.1.1.2 misho 874: dnl Selects the SAPI name and type (static, shared, bundle, program)
1.1 misho 875: dnl and optionally also the source-files for the SAPI-specific
876: dnl objects.
877: dnl
878: AC_DEFUN([PHP_SELECT_SAPI],[
1.1.1.2 misho 879: if test "$2" = "program"; then
880: PHP_BINARIES="$PHP_BINARIES $1"
881: elif test "$PHP_SAPI" != "none"; then
882: AC_MSG_ERROR([
1.1 misho 883: +--------------------------------------------------------------------+
884: | *** ATTENTION *** |
885: | |
886: | You've configured multiple SAPIs to be build. You can build only |
1.1.1.2 misho 887: | one SAPI module plus CGI, CLI and FPM binaries at the same time. |
1.1 misho 888: +--------------------------------------------------------------------+
889: ])
1.1.1.2 misho 890: else
891: PHP_SAPI=$1
892: fi
1.1 misho 893:
1.1.1.2 misho 894: PHP_ADD_BUILD_DIR([sapi/$1])
895:
896: PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS $1"
897:
898: ifelse($2,program,[
899: PHP_BUILD_PROGRAM
900: install_binaries="install-binaries"
901: install_binary_targets="$install_binary_targets install-$1"
902: PHP_SUBST(PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS)
903: ifelse($3,,,[PHP_ADD_SOURCES_X([sapi/$1],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS)])
904: ],[
905: case "$2" in
906: static[)] PHP_BUILD_STATIC;;
907: shared[)] PHP_BUILD_SHARED;;
908: bundle[)] PHP_BUILD_BUNDLE;;
909: esac
910: install_sapi="install-sapi"
911: ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
912: ])
1.1 misho 913: ])
914:
915: dnl deprecated
916: AC_DEFUN([PHP_EXTENSION],[
917: sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
918:
919: PHP_NEW_EXTENSION($1, $sources, $2, $3)
920:
921: if test -r "$ext_srcdir/Makefile.frag"; then
922: PHP_ADD_MAKEFILE_FRAGMENT
923: fi
924: ])
925:
926: AC_DEFUN([PHP_ADD_BUILD_DIR],[
927: ifelse($2,,[
928: BUILD_DIR="$BUILD_DIR $1"
929: ], [
930: $php_shtool mkdir -p $1
931: ])
932: ])
933:
934: AC_DEFUN([PHP_GEN_BUILD_DIRS],[
935: $php_shtool mkdir -p $BUILD_DIR
936: ])
937:
938: dnl
939: dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]])
940: dnl
941: dnl Includes an extension in the build.
942: dnl
943: dnl "extname" is the name of the ext/ subdir where the extension resides.
944: dnl "sources" is a list of files relative to the subdir which are used
945: dnl to build the extension.
946: dnl "shared" can be set to "shared" or "yes" to build the extension as
947: dnl a dynamically loadable library. Optional parameter "sapi_class" can
948: dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
949: dnl "extra-cflags" are passed to the compiler, with
950: dnl @ext_srcdir@ and @ext_builddir@ being substituted.
951: dnl "cxx" can be used to indicate that a C++ shared module is desired.
952: dnl "zend_ext" indicates a zend extension.
953: AC_DEFUN([PHP_NEW_EXTENSION],[
954: ext_builddir=[]PHP_EXT_BUILDDIR($1)
955: ext_srcdir=[]PHP_EXT_SRCDIR($1)
956:
957: ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])
958:
959: if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
960: dnl ---------------------------------------------- Static module
961: [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
962: PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
963: EXT_STATIC="$EXT_STATIC $1"
964: if test "$3" != "nocli"; then
965: EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
966: fi
967: else
968: if test "$3" = "shared" || test "$3" = "yes"; then
969: dnl ---------------------------------------------- Shared module
970: [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
971: PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
972: case $host_alias in
973: *netware*[)]
974: PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7)
975: ;;
976: *[)]
977: PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7)
978: ;;
979: esac
980: AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
981: fi
982: fi
983:
984: if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
985: dnl ---------------------------------------------- CLI static module
986: [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
1.1.1.3 ! misho 987: case "$PHP_SAPI" in
! 988: cgi|embed[)]
! 989: PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
! 990: EXT_STATIC="$EXT_STATIC $1"
! 991: ;;
! 992: *[)]
1.1 misho 993: PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
1.1.1.3 ! misho 994: ;;
! 995: esac
1.1 misho 996: EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
997: fi
998: PHP_ADD_BUILD_DIR($ext_builddir)
999:
1000: dnl Set for phpize builds only
1001: dnl ---------------------------
1002: if test "$ext_builddir" = "."; then
1003: PHP_PECL_EXTENSION=$1
1004: PHP_SUBST(PHP_PECL_EXTENSION)
1005: fi
1006: ])
1007:
1008: dnl
1009: dnl PHP_WITH_SHARED
1010: dnl
1011: dnl Checks whether $withval is "shared" or starts with "shared,XXX"
1012: dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
1013: dnl from $withval.
1014: dnl
1015: AC_DEFUN([PHP_WITH_SHARED],[
1016: PHP_ARG_ANALYZE_EX(withval)
1017: shared=$ext_shared
1018: unset ext_shared ext_output
1019: ])
1020:
1021: dnl
1022: dnl PHP_ADD_EXTENSION_DEP(extname, depends [, depconf])
1023: dnl
1024: dnl This macro is scanned by genif.sh when it builds the internal functions
1025: dnl list, so that modules can be init'd in the correct order
1026: dnl $1 = name of extension, $2 = extension upon which it depends
1027: dnl $3 = optional: if true, it's ok for $2 to have not been configured
1028: dnl default is false and should halt the build.
1029: dnl To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION.
1030: dnl The extension on which it depends must also have been configured.
1031: dnl See ADD_EXTENSION_DEP in win32 build
1032: dnl
1033: AC_DEFUN([PHP_ADD_EXTENSION_DEP], [
1034: am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]
1035: is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED]
1036: is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__)
1037: if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
1038: AC_MSG_ERROR([
1039: You've configured extension $1 to build statically, but it
1040: depends on extension $2, which you've configured to build shared.
1041: You either need to build $1 shared or build $2 statically for the
1042: build to be successful.
1043: ])
1044: fi
1.1.1.3 ! misho 1045: if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then
! 1046: AC_MSG_ERROR([
! 1047: You've configured extension $1, which depends on extension $2,
! 1048: but you've either not enabled $2, or have disabled it.
! 1049: ])
! 1050: fi
1.1 misho 1051: dnl Some systems require that we link $2 to $1 when building
1052: ])
1053:
1054: dnl -------------------------------------------------------------------------
1055: dnl Checks for structures, typedefs, broken functions, etc.
1056: dnl -------------------------------------------------------------------------
1057:
1058: dnl Internal helper macros
1059: dnl
1060: dnl _PHP_DEF_HAVE_FILE(what, filename)
1061: AC_DEFUN([_PHP_DEF_HAVE_FILE], [
1062: php_def_have_what=HAVE_[]`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_' `
1063: echo "#define $php_def_have_what 1" >> $2
1064: ])
1065: dnl
1066: dnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]])
1067: dnl
1068: AC_DEFUN([_PHP_CHECK_SIZEOF], [
1069: php_cache_value=php_cv_sizeof_[]$1
1070: AC_CACHE_VAL(php_cv_sizeof_[]$1, [
1071: old_LIBS=$LIBS
1072: LIBS=
1073: old_LDFLAGS=$LDFLAGS
1074: LDFLAGS=
1075: AC_TRY_RUN([#include <stdio.h>
1076: #if STDC_HEADERS
1077: #include <stdlib.h>
1078: #include <stddef.h>
1079: #endif
1080: #ifdef HAVE_INTTYPES_H
1081: #include <inttypes.h>
1082: #endif
1083: #ifdef HAVE_UNISTD_H
1084: #include <unistd.h>
1085: #endif
1086: $3
1087:
1088: int main()
1089: {
1090: FILE *fp = fopen("conftestval", "w");
1091: if (!fp) return(1);
1092: fprintf(fp, "%d\n", sizeof($1));
1093: return(0);
1094: }
1095: ], [
1096: eval $php_cache_value=`cat conftestval`
1097: ], [
1098: eval $php_cache_value=0
1099: ], [
1100: ifelse([$2],,[eval $php_cache_value=0], [eval $php_cache_value=$2])
1101: ])
1102: LDFLAGS=$old_LDFLAGS
1103: LIBS=$old_LIBS
1104: ])
1105: if eval test "\$$php_cache_value" != "0"; then
1106: ifelse([$4],[],:,[$4])
1107: ifelse([$5],[],,[else $5])
1108: fi
1109: ])
1110:
1111: dnl
1112: dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)
1113: dnl
1114: AC_DEFUN([PHP_CHECK_SIZEOF], [
1115: AC_MSG_CHECKING([size of $1])
1116: _PHP_CHECK_SIZEOF($1, $2, $3, [
1117: AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1])
1118: AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), 1, [Whether $1 is available])
1119: ])
1120: AC_MSG_RESULT([[$][php_cv_sizeof_]translit($1, ,_)])
1121: ])
1122:
1123: dnl
1124: dnl PHP_CHECK_TYPES(type-list, include-file [, extra-headers])
1125: dnl
1126: AC_DEFUN([PHP_CHECK_TYPES], [
1127: for php_typename in $1; do
1128: AC_MSG_CHECKING([whether $php_typename exists])
1129: _PHP_CHECK_SIZEOF($php_typename, 0, $3, [
1130: _PHP_DEF_HAVE_FILE($php_typename, $2)
1131: AC_MSG_RESULT([yes])
1132: ], [
1133: AC_MSG_RESULT([no])
1134: ])
1135: done
1136: ])
1137:
1138: dnl
1139: dnl PHP_CHECK_IN_ADDR_T
1140: dnl
1141: AC_DEFUN([PHP_CHECK_IN_ADDR_T], [
1142: dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
1143: AC_MSG_CHECKING([for in_addr_t])
1144: AC_CACHE_VAL(ac_cv_type_in_addr_t,
1145: [AC_EGREP_CPP(dnl
1146: changequote(<<,>>)dnl
1147: <<in_addr_t[^a-zA-Z_0-9]>>dnl
1148: changequote([,]), [#include <sys/types.h>
1149: #if STDC_HEADERS
1150: #include <stdlib.h>
1151: #include <stddef.h>
1152: #endif
1153: #ifdef HAVE_NETINET_IN_H
1154: #include <netinet/in.h>
1155: #endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnl
1156: AC_MSG_RESULT([$ac_cv_type_in_addr_t])
1157: if test $ac_cv_type_in_addr_t = no; then
1158: AC_DEFINE(in_addr_t, u_int, [ ])
1159: fi
1160: ])
1161:
1162: dnl
1163: dnl PHP_TIME_R_TYPE
1164: dnl
1165: dnl Check type of reentrant time-related functions
1166: dnl Type can be: irix, hpux or POSIX
1167: dnl
1168: AC_DEFUN([PHP_TIME_R_TYPE],[
1169: AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
1170: AC_TRY_RUN([
1171: #include <time.h>
1172:
1173: main() {
1174: char buf[27];
1175: struct tm t;
1176: time_t old = 0;
1177: int r, s;
1178:
1179: s = gmtime_r(&old, &t);
1180: r = (int) asctime_r(&t, buf, 26);
1181: if (r == s && s == 0) return (0);
1182: return (1);
1183: }
1184: ],[
1185: ac_cv_time_r_type=hpux
1186: ],[
1187: AC_TRY_RUN([
1188: #include <time.h>
1189: main() {
1190: struct tm t, *s;
1191: time_t old = 0;
1192: char buf[27], *p;
1193:
1194: s = gmtime_r(&old, &t);
1195: p = asctime_r(&t, buf, 26);
1196: if (p == buf && s == &t) return (0);
1197: return (1);
1198: }
1199: ],[
1200: ac_cv_time_r_type=irix
1201: ],[
1202: ac_cv_time_r_type=POSIX
1203: ],[
1204: ac_cv_time_r_type=POSIX
1205: ])
1206: ],[
1207: ac_cv_time_r_type=POSIX
1208: ])
1209: ])
1210: case $ac_cv_time_r_type in
1211: hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;
1212: irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;
1213: esac
1214: ])
1215:
1216: dnl
1217: dnl PHP_DOES_PWRITE_WORK
1218: dnl internal
1219: AC_DEFUN([PHP_DOES_PWRITE_WORK],[
1220: AC_TRY_RUN([
1221: #include <sys/types.h>
1222: #include <sys/stat.h>
1223: #include <fcntl.h>
1224: #include <unistd.h>
1225: #include <errno.h>
1226: $1
1227: main() {
1228: int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
1229:
1230: if (fd < 0) exit(1);
1231: if (pwrite(fd, "text", 4, 0) != 4) exit(1);
1232: /* Linux glibc breakage until 2.2.5 */
1233: if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
1234: exit(0);
1235: }
1236:
1237: ],[
1238: ac_cv_pwrite=yes
1239: ],[
1240: ac_cv_pwrite=no
1241: ],[
1242: ac_cv_pwrite=no
1243: ])
1244: ])
1245:
1246: dnl PHP_DOES_PREAD_WORK
1247: dnl internal
1248: AC_DEFUN([PHP_DOES_PREAD_WORK],[
1249: echo test > conftest_in
1250: AC_TRY_RUN([
1251: #include <sys/types.h>
1252: #include <sys/stat.h>
1253: #include <fcntl.h>
1254: #include <unistd.h>
1255: #include <errno.h>
1256: $1
1257: main() {
1258: char buf[3];
1259: int fd = open("conftest_in", O_RDONLY);
1260: if (fd < 0) exit(1);
1261: if (pread(fd, buf, 2, 0) != 2) exit(1);
1262: /* Linux glibc breakage until 2.2.5 */
1263: if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
1264: exit(0);
1265: }
1266: ],[
1267: ac_cv_pread=yes
1268: ],[
1269: ac_cv_pread=no
1270: ],[
1271: ac_cv_pread=no
1272: ])
1273: rm -f conftest_in
1274: ])
1275:
1276: dnl
1277: dnl PHP_PWRITE_TEST
1278: dnl
1279: AC_DEFUN([PHP_PWRITE_TEST],[
1280: AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[
1281: PHP_DOES_PWRITE_WORK
1282: if test "$ac_cv_pwrite" = "no"; then
1283: PHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);])
1284: if test "$ac_cv_pwrite" = "yes"; then
1285: ac_cv_pwrite=64
1286: fi
1287: fi
1288: ])
1289:
1290: if test "$ac_cv_pwrite" != "no"; then
1291: AC_DEFINE(HAVE_PWRITE, 1, [ ])
1292: if test "$ac_cv_pwrite" = "64"; then
1293: AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])
1294: fi
1295: fi
1296: ])
1297:
1298: dnl
1299: dnl PHP_PREAD_TEST
1300: dnl
1301: AC_DEFUN([PHP_PREAD_TEST],[
1302: AC_CACHE_CHECK(whether pread works,ac_cv_pread,[
1303: PHP_DOES_PREAD_WORK
1304: if test "$ac_cv_pread" = "no"; then
1305: PHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);])
1306: if test "$ac_cv_pread" = "yes"; then
1307: ac_cv_pread=64
1308: fi
1309: fi
1310: ])
1311:
1312: if test "$ac_cv_pread" != "no"; then
1313: AC_DEFINE(HAVE_PREAD, 1, [ ])
1314: if test "$ac_cv_pread" = "64"; then
1315: AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])
1316: fi
1317: fi
1318: ])
1319:
1320: dnl
1321: dnl PHP_MISSING_TIME_R_DECL
1322: dnl
1323: AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
1324: AC_MSG_CHECKING([for missing declarations of reentrant functions])
1325: AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
1326: :
1327: ],[
1328: AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
1329: ])
1330: AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[
1331: :
1332: ],[
1333: AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
1334: ])
1335: AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[
1336: :
1337: ],[
1338: AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
1339: ])
1340: AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[
1341: :
1342: ],[
1343: AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
1344: ])
1345: AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[
1346: :
1347: ],[
1348: AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
1349: ])
1350: AC_MSG_RESULT([done])
1351: ])
1352:
1353: dnl
1354: dnl PHP_READDIR_R_TYPE
1355: dnl
1356: AC_DEFUN([PHP_READDIR_R_TYPE],[
1357: dnl HAVE_READDIR_R is also defined by libmysql
1358: AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
1359: if test "$ac_cv_func_readdir_r" = "yes"; then
1360: AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
1361: AC_TRY_RUN([
1362: #define _REENTRANT
1363: #include <sys/types.h>
1364: #include <dirent.h>
1365:
1366: #ifndef PATH_MAX
1367: #define PATH_MAX 1024
1368: #endif
1369:
1370: main() {
1371: DIR *dir;
1372: char entry[sizeof(struct dirent)+PATH_MAX];
1373: struct dirent *pentry = (struct dirent *) &entry;
1374:
1375: dir = opendir("/");
1376: if (!dir)
1377: exit(1);
1378: if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
1379: exit(0);
1380: exit(1);
1381: }
1382: ],[
1383: ac_cv_what_readdir_r=POSIX
1384: ],[
1385: AC_TRY_CPP([
1386: #define _REENTRANT
1387: #include <sys/types.h>
1388: #include <dirent.h>
1389: int readdir_r(DIR *, struct dirent *);
1390: ],[
1391: ac_cv_what_readdir_r=old-style
1392: ],[
1393: ac_cv_what_readdir_r=none
1394: ])
1395: ],[
1396: ac_cv_what_readdir_r=none
1397: ])
1398: ])
1399: case $ac_cv_what_readdir_r in
1400: POSIX)
1401: AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
1402: old-style)
1403: AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
1404: esac
1405: fi
1406: ])
1407:
1408: dnl
1409: dnl PHP_TM_GMTOFF
1410: dnl
1411: AC_DEFUN([PHP_TM_GMTOFF],[
1412: AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
1413: [AC_TRY_COMPILE([#include <sys/types.h>
1414: #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
1415: ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
1416:
1417: if test "$ac_cv_struct_tm_gmtoff" = yes; then
1418: AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
1419: fi
1420: ])
1421:
1422: dnl
1423: dnl PHP_STRUCT_FLOCK
1424: dnl
1425: AC_DEFUN([PHP_STRUCT_FLOCK],[
1426: AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
1427: AC_TRY_COMPILE([
1428: #include <unistd.h>
1429: #include <fcntl.h>
1430: ],
1431: [struct flock x;],
1432: [
1433: ac_cv_struct_flock=yes
1434: ],[
1435: ac_cv_struct_flock=no
1436: ])
1437: )
1438: if test "$ac_cv_struct_flock" = "yes" ; then
1439: AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
1440: fi
1441: ])
1442:
1443: dnl
1444: dnl PHP_SOCKLEN_T
1445: dnl
1446: AC_DEFUN([PHP_SOCKLEN_T],[
1447: AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
1448: AC_TRY_COMPILE([
1449: #include <sys/types.h>
1450: #include <sys/socket.h>
1451: ],[
1452: socklen_t x;
1453: ],[
1454: ac_cv_socklen_t=yes
1455: ],[
1456: ac_cv_socklen_t=no
1457: ]))
1458: if test "$ac_cv_socklen_t" = "yes"; then
1459: AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
1460: fi
1461: ])
1462:
1463: dnl
1464: dnl PHP_MISSING_FCLOSE_DECL
1465: dnl
1466: dnl See if we have broken header files like SunOS has.
1467: dnl
1468: AC_DEFUN([PHP_MISSING_FCLOSE_DECL],[
1469: AC_MSG_CHECKING([for fclose declaration])
1470: AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[
1471: AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
1472: AC_MSG_RESULT([ok])
1473: ],[
1474: AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
1475: AC_MSG_RESULT([missing])
1476: ])
1477: ])
1478:
1479: dnl
1480: dnl PHP_AC_BROKEN_SPRINTF
1481: dnl
1482: dnl Check for broken sprintf(), C99 conformance
1483: dnl
1484: AC_DEFUN([PHP_AC_BROKEN_SPRINTF],[
1485: AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
1486: AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
1487: ac_cv_broken_sprintf=no
1488: ],[
1489: ac_cv_broken_sprintf=yes
1490: ],[
1491: ac_cv_broken_sprintf=no
1492: ])
1493: ])
1494: if test "$ac_cv_broken_sprintf" = "yes"; then
1495: AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [Whether sprintf is C99 conform])
1496: else
1497: AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [Whether sprintf is C99 conform])
1498: fi
1499: ])
1500:
1501: dnl
1502: dnl PHP_AC_BROKEN_SNPRINTF
1503: dnl
1504: dnl Check for broken snprintf(), C99 conformance
1505: dnl
1506: AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[
1507: AC_CACHE_CHECK(whether snprintf is broken, ac_cv_broken_snprintf,[
1508: AC_TRY_RUN([
1509: #define NULL (0L)
1510: main() {
1511: char buf[20];
1512: int res = 0;
1513: res = res || (snprintf(buf, 2, "marcus") != 6);
1514: res = res || (buf[1] != '\0');
1515: /* Implementations may consider this as an encoding error */
1516: snprintf(buf, 0, "boerger");
1517: /* However, they MUST ignore the pointer */
1518: res = res || (buf[0] != 'm');
1519: res = res || (snprintf(NULL, 0, "boerger") != 7);
1520: res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8);
1521: exit(res);
1522: }
1523: ],[
1524: ac_cv_broken_snprintf=no
1525: ],[
1526: ac_cv_broken_snprintf=yes
1527: ],[
1528: ac_cv_broken_snprintf=no
1529: ])
1530: ])
1531: if test "$ac_cv_broken_snprintf" = "yes"; then
1532: AC_DEFINE(PHP_BROKEN_SNPRINTF, 1, [Whether snprintf is C99 conform])
1533: else
1534: AC_DEFINE(PHP_BROKEN_SNPRINTF, 0, [Whether snprintf is C99 conform])
1535: fi
1536: ])
1537:
1538: dnl
1539: dnl PHP_SOLARIS_PIC_WEIRDNESS
1540: dnl
1541: dnl Solaris requires main code to be position independent in order
1542: dnl to let shared objects find symbols. Weird. Ugly.
1543: dnl
1544: dnl Must be run after all --with-NN options that let the user
1545: dnl choose dynamic extensions, and after the gcc test.
1546: dnl
1547: AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[
1548: AC_MSG_CHECKING([whether -fPIC is required])
1549: if test -n "$EXT_SHARED"; then
1550: os=`uname -sr 2>/dev/null`
1551: case $os in
1552: "SunOS 5.6"|"SunOS 5.7"[)]
1553: case $CC in
1554: gcc*|egcs*)
1555: CFLAGS="$CFLAGS -fPIC";;
1556: *[)]
1557: CFLAGS="$CFLAGS -fpic";;
1558: esac
1559: AC_MSG_RESULT([yes]);;
1560: *[)]
1561: AC_MSG_RESULT([no]);;
1562: esac
1563: else
1564: AC_MSG_RESULT([no])
1565: fi
1566: ])
1567:
1568: dnl
1569: dnl PHP_SYS_LFS
1570: dnl
1571: dnl The problem is that the default compilation flags in Solaris 2.6 won't
1572: dnl let programs access large files; you need to tell the compiler that
1573: dnl you actually want your programs to work on large files. For more
1574: dnl details about this brain damage please see:
1575: dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
1576: dnl
1577: dnl Written by Paul Eggert <eggert@twinsun.com>.
1578: dnl
1579: AC_DEFUN([PHP_SYS_LFS],
1580: [dnl
1581: # If available, prefer support for large files unless the user specified
1582: # one of the CPPFLAGS, LDFLAGS, or LIBS variables.
1583: AC_MSG_CHECKING([whether large file support needs explicit enabling])
1584: ac_getconfs=''
1585: ac_result=yes
1586: ac_set=''
1587: ac_shellvars='CPPFLAGS LDFLAGS LIBS'
1588: for ac_shellvar in $ac_shellvars; do
1589: case $ac_shellvar in
1590: CPPFLAGS[)] ac_lfsvar=LFS_CFLAGS ;;
1591: *[)] ac_lfsvar=LFS_$ac_shellvar ;;
1592: esac
1593: eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
1594: (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
1595: ac_getconf=`getconf $ac_lfsvar`
1596: ac_getconfs=$ac_getconfs$ac_getconf
1597: eval ac_test_$ac_shellvar=\$ac_getconf
1598: done
1599: case "$ac_result$ac_getconfs" in
1600: yes[)] ac_result=no ;;
1601: esac
1602: case "$ac_result$ac_set" in
1603: yes?*[)] ac_result="yes, but $ac_set is already set, so use its settings"
1604: esac
1605: AC_MSG_RESULT([$ac_result])
1606: case $ac_result in
1607: yes[)]
1608: for ac_shellvar in $ac_shellvars; do
1609: eval $ac_shellvar=\$ac_test_$ac_shellvar
1610: done ;;
1611: esac
1612: ])
1613:
1614: dnl
1615: dnl PHP_SOCKADDR_CHECKS
1616: dnl
1617: AC_DEFUN([PHP_SOCKADDR_CHECKS], [
1618: dnl Check for struct sockaddr_storage exists
1619: AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage,
1620: [AC_TRY_COMPILE([#include <sys/types.h>
1621: #include <sys/socket.h>],
1622: [struct sockaddr_storage s; s],
1623: [ac_cv_sockaddr_storage=yes], [ac_cv_sockaddr_storage=no])
1624: ])
1625: if test "$ac_cv_sockaddr_storage" = "yes"; then
1626: AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])
1627: fi
1628: dnl Check if field sa_len exists in struct sockaddr
1629: AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
1630: AC_TRY_COMPILE([#include <sys/types.h>
1631: #include <sys/socket.h>],
1632: [static struct sockaddr sa; int n = (int) sa.sa_len; return n;],
1633: [ac_cv_sockaddr_sa_len=yes], [ac_cv_sockaddr_sa_len=no])
1634: ])
1635: if test "$ac_cv_sockaddr_sa_len" = "yes"; then
1636: AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has field sa_len])
1637: fi
1638: ])
1639:
1640: dnl
1641: dnl PHP_DECLARED_TIMEZONE
1642: dnl
1643: AC_DEFUN([PHP_DECLARED_TIMEZONE],[
1644: AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[
1645: AC_TRY_COMPILE([
1646: #include <sys/types.h>
1647: #include <time.h>
1648: #ifdef HAVE_SYS_TIME_H
1649: #include <sys/time.h>
1650: #endif
1651: ],[
1652: time_t foo = (time_t) timezone;
1653: ],[
1654: ac_cv_declared_timezone=yes
1655: ],[
1656: ac_cv_declared_timezone=no
1657: ])])
1658: if test "$ac_cv_declared_timezone" = "yes"; then
1659: AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
1660: fi
1661: ])
1662:
1663: dnl
1664: dnl PHP_EBCDIC
1665: dnl
1666: AC_DEFUN([PHP_EBCDIC], [
1667: AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
1668: AC_TRY_RUN( [
1669: int main(void) {
1670: return (unsigned char)'A' != (unsigned char)0xC1;
1671: }
1672: ],[
1673: ac_cv_ebcdic=yes
1674: ],[
1675: ac_cv_ebcdic=no
1676: ],[
1677: ac_cv_ebcdic=no
1678: ])])
1679: if test "$ac_cv_ebcdic" = "yes"; then
1680: AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
1681: fi
1682: ])
1683:
1684: dnl
1685: dnl PHP_BROKEN_GETCWD
1686: dnl
1687: dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a
1688: dnl component of the path has execute but not read permissions
1689: dnl
1690: AC_DEFUN([PHP_BROKEN_GETCWD],[
1691: AC_MSG_CHECKING([for broken getcwd])
1692: os=`uname -sr 2>/dev/null`
1693: case $os in
1694: SunOS*[)]
1695: AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])
1696: AC_MSG_RESULT([yes]);;
1697: *[)]
1698: AC_MSG_RESULT([no]);;
1699: esac
1700: ])
1701:
1702: dnl
1703: dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
1704: dnl
1705: AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
1706: AC_MSG_CHECKING([for broken libc stdio])
1707: AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
1708: AC_TRY_RUN([
1709: #include <stdio.h>
1710: int main(int argc, char *argv[])
1711: {
1712: FILE *fp;
1713: long position;
1714: char *filename = "/tmp/phpglibccheck";
1715:
1716: fp = fopen(filename, "w");
1717: if (fp == NULL) {
1718: perror("fopen");
1719: exit(2);
1720: }
1721: fputs("foobar", fp);
1722: fclose(fp);
1723:
1724: fp = fopen(filename, "a+");
1725: position = ftell(fp);
1726: fclose(fp);
1727: unlink(filename);
1728: if (position == 0)
1729: return 1;
1730: return 0;
1731: }
1732: ],
1733: [_cv_have_broken_glibc_fopen_append=no],
1734: [_cv_have_broken_glibc_fopen_append=yes ],
1735: AC_TRY_COMPILE([
1736: #include <features.h>
1737: ],[
1738: #if !__GLIBC_PREREQ(2,2)
1739: choke me
1740: #endif
1741: ],
1742: [_cv_have_broken_glibc_fopen_append=yes],
1743: [_cv_have_broken_glibc_fopen_append=no ])
1744: )])
1745:
1746: if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
1747: AC_MSG_RESULT(yes)
1748: AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
1749: else
1750: AC_MSG_RESULT(no)
1751: fi
1752: ])
1753:
1754: dnl
1755: dnl PHP_FOPENCOOKIE
1756: dnl
1757: AC_DEFUN([PHP_FOPENCOOKIE], [
1758: AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes])
1759:
1760: if test "$have_glibc_fopencookie" = "yes"; then
1761: dnl this comes in two flavors:
1762: dnl newer glibcs (since 2.1.2 ? )
1763: dnl have a type called cookie_io_functions_t
1764: AC_TRY_COMPILE([
1765: #define _GNU_SOURCE
1766: #include <stdio.h>
1767: ], [cookie_io_functions_t cookie;], [have_cookie_io_functions_t=yes], [])
1768:
1769: if test "$have_cookie_io_functions_t" = "yes"; then
1770: cookie_io_functions_t=cookie_io_functions_t
1771: have_fopen_cookie=yes
1772:
1773: dnl even newer glibcs have a different seeker definition...
1774: AC_TRY_RUN([
1775: #define _GNU_SOURCE
1776: #include <stdio.h>
1777:
1778: struct cookiedata {
1779: __off64_t pos;
1780: };
1781:
1782: __ssize_t reader(void *cookie, char *buffer, size_t size)
1783: { return size; }
1784: __ssize_t writer(void *cookie, const char *buffer, size_t size)
1785: { return size; }
1786: int closer(void *cookie)
1787: { return 0; }
1788: int seeker(void *cookie, __off64_t *position, int whence)
1789: { ((struct cookiedata*)cookie)->pos = *position; return 0; }
1790:
1791: cookie_io_functions_t funcs = {reader, writer, seeker, closer};
1792:
1793: main() {
1794: struct cookiedata g = { 0 };
1795: FILE *fp = fopencookie(&g, "r", funcs);
1796:
1797: if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192)
1798: exit(0);
1799: exit(1);
1800: }
1801:
1802: ], [
1803: cookie_io_functions_use_off64_t=yes
1804: ], [
1805: cookie_io_functions_use_off64_t=no
1806: ], [
1807: cookie_io_functions_use_off64_t=no
1808: ])
1809:
1810: else
1811:
1812: dnl older glibc versions (up to 2.1.2 ?)
1813: dnl call it _IO_cookie_io_functions_t
1814: AC_TRY_COMPILE([
1815: #define _GNU_SOURCE
1816: #include <stdio.h>
1817: ], [ _IO_cookie_io_functions_t cookie; ], [have_IO_cookie_io_functions_t=yes], [])
1818: if test "$have_cookie_io_functions_t" = "yes" ; then
1819: cookie_io_functions_t=_IO_cookie_io_functions_t
1820: have_fopen_cookie=yes
1821: fi
1822: fi
1823:
1824: if test "$have_fopen_cookie" = "yes" ; then
1825: AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
1826: AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
1827: if test "$cookie_io_functions_use_off64_t" = "yes" ; then
1828: AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ])
1829: fi
1830: fi
1831: fi
1832: ])
1833:
1834: dnl -------------------------------------------------------------------------
1.1.1.3 ! misho 1835: dnl Library/function existence and build sanity checks
1.1 misho 1836: dnl -------------------------------------------------------------------------
1837:
1838: dnl
1839: dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])
1840: dnl
1841: dnl Wrapper for AC_CHECK_LIB
1842: dnl
1843: AC_DEFUN([PHP_CHECK_LIBRARY], [
1844: save_old_LDFLAGS=$LDFLAGS
1845: ac_stuff="$5"
1846:
1847: save_ext_shared=$ext_shared
1848: ext_shared=yes
1849: PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)
1850: AC_CHECK_LIB([$1],[$2],[
1851: LDFLAGS=$save_old_LDFLAGS
1852: ext_shared=$save_ext_shared
1853: $3
1854: ],[
1855: LDFLAGS=$save_old_LDFLAGS
1856: ext_shared=$save_ext_shared
1857: unset ac_cv_lib_$1[]_$2
1858: $4
1859: ])dnl
1860: ])
1861:
1862: dnl
1863: dnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]])
1864: dnl
1865: dnl El cheapo wrapper for AC_CHECK_LIB
1866: dnl
1867: AC_DEFUN([PHP_CHECK_FRAMEWORK], [
1868: save_old_LDFLAGS=$LDFLAGS
1869: LDFLAGS="-framework $1 $LDFLAGS"
1870: dnl supplying "c" to AC_CHECK_LIB is technically cheating, but
1871: dnl rewriting AC_CHECK_LIB is overkill and this only affects
1872: dnl the "checking.." output anyway.
1873: AC_CHECK_LIB(c,[$2],[
1874: LDFLAGS=$save_old_LDFLAGS
1875: $3
1876: ],[
1877: LDFLAGS=$save_old_LDFLAGS
1878: $4
1879: ])
1880: ])
1881:
1882: dnl
1883: dnl PHP_CHECK_FUNC_LIB(func, libs)
1884: dnl
1885: dnl This macro checks whether 'func' or '__func' exists
1886: dnl in the specified library.
1887: dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1888: dnl This should be called in the ACTION-IF-NOT-FOUND part of PHP_CHECK_FUNC
1889: dnl
1890: dnl
1891: dnl autoconf undefines the builtin "shift" :-(
1892: dnl If possible, we use the builtin shift anyway, otherwise we use
1893: dnl the ubercool definition I have tested so far with FreeBSD/GNU m4
1894: ifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[
1895: define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])])
1896: ])
1897: dnl
1898: AC_DEFUN([PHP_CHECK_FUNC_LIB],[
1899: ifelse($2,,:,[
1900: unset ac_cv_lib_$2[]_$1
1901: unset ac_cv_lib_$2[]___$1
1902: unset found
1903: AC_CHECK_LIB($2, $1, [found=yes], [
1904: AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
1905: ])
1906:
1907: if test "$found" = "yes"; then
1908: ac_libs=$LIBS
1909: LIBS="$LIBS -l$2"
1910: AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no])
1911: LIBS=$ac_libs
1912: fi
1913:
1914: if test "$found" = "yes"; then
1915: PHP_ADD_LIBRARY($2)
1916: PHP_DEF_HAVE($1)
1917: PHP_DEF_HAVE(lib$2)
1918: ac_cv_func_$1=yes
1919: else
1920: PHP_CHECK_FUNC_LIB($1,phpshift(phpshift($@)))
1921: fi
1922: ])
1923: ])
1924:
1925: dnl
1926: dnl PHP_CHECK_FUNC(func, ...)
1927: dnl
1928: dnl This macro checks whether 'func' or '__func' exists
1929: dnl in the default libraries and as a fall back in the specified library.
1930: dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1931: dnl
1932: AC_DEFUN([PHP_CHECK_FUNC],[
1933: unset ac_cv_func_$1
1934: unset ac_cv_func___$1
1935: unset found
1936:
1937: AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
1938:
1939: case $found in
1940: yes[)]
1941: PHP_DEF_HAVE($1)
1942: ac_cv_func_$1=yes
1943: ;;
1944: ifelse($#,1,,[
1945: *[)] PHP_CHECK_FUNC_LIB($@) ;;
1946: ])
1947: esac
1948: ])
1949:
1950: dnl
1951: dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
1952: dnl
1953: dnl This macro checks whether build works and given function exists.
1954: dnl
1955: AC_DEFUN([PHP_TEST_BUILD], [
1956: old_LIBS=$LIBS
1957: LIBS="$4 $LIBS"
1958: AC_TRY_RUN([
1959: $5
1960: char $1();
1961: int main() {
1962: $1();
1963: return 0;
1964: }
1965: ], [
1966: LIBS=$old_LIBS
1967: $2
1968: ],[
1969: LIBS=$old_LIBS
1970: $3
1971: ],[
1972: LIBS=$old_LIBS
1973: ])
1974: ])
1975:
1976: dnl -------------------------------------------------------------------------
1977: dnl Platform characteristics checks
1978: dnl -------------------------------------------------------------------------
1979:
1980: dnl
1981: dnl PHP_SHLIB_SUFFIX_NAMES
1982: dnl
1983: dnl Determines link library suffix SHLIB_SUFFIX_NAME
1984: dnl which can be: .so, .sl or .dylib
1985: dnl
1986: dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME
1987: dnl suffix can be: .so or .sl
1988: dnl
1989: AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[
1990: AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
1991: PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
1992: PHP_SUBST_OLD(SHLIB_DL_SUFFIX_NAME)
1993: SHLIB_SUFFIX_NAME=so
1994: SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME
1995: case $host_alias in
1996: *hpux*[)]
1997: SHLIB_SUFFIX_NAME=sl
1998: SHLIB_DL_SUFFIX_NAME=sl
1999: ;;
2000: *darwin*[)]
2001: SHLIB_SUFFIX_NAME=dylib
2002: SHLIB_DL_SUFFIX_NAME=so
2003: ;;
2004: esac
2005: ])
2006:
2007: dnl
2008: dnl PHP_CHECK_64BIT([do if 32], [do if 64])
2009: dnl
2010: dnl This macro is used to detect if we're at 64-bit platform or not.
2011: dnl It could be useful for those external libs, that have different precompiled
2012: dnl versions in different directories.
2013: dnl
2014: AC_DEFUN([PHP_CHECK_64BIT],[
2015: AC_CHECK_SIZEOF(long int, 4)
2016: AC_MSG_CHECKING([checking if we're at 64-bit platform])
2017: if test "$ac_cv_sizeof_long_int" = "4" ; then
2018: AC_MSG_RESULT([no])
2019: $1
2020: else
2021: AC_MSG_RESULT([yes])
2022: $2
2023: fi
2024: ])
2025:
2026: dnl
2027: dnl PHP_C_BIGENDIAN
2028: dnl
2029: dnl Replacement macro for AC_C_BIGENDIAN
2030: dnl
2031: AC_DEFUN([PHP_C_BIGENDIAN],
2032: [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
2033: [
2034: ac_cv_c_bigendian_php=unknown
2035: AC_TRY_RUN(
2036: [
2037: int main(void)
2038: {
2039: short one = 1;
2040: char *cp = (char *)&one;
2041:
2042: if (*cp == 0) {
2043: return(0);
2044: } else {
2045: return(1);
2046: }
2047: }
2048: ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
2049: ])
2050: if test $ac_cv_c_bigendian_php = yes; then
2051: AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
2052: fi
2053: ])
2054:
2055: dnl -------------------------------------------------------------------------
2056: dnl Checks for programs: PHP_PROG_<program>
2057: dnl -------------------------------------------------------------------------
2058:
2059: dnl
2060: dnl PHP_PROG_SENDMAIL
2061: dnl
2062: dnl Search for the sendmail binary
2063: dnl
2064: AC_DEFUN([PHP_PROG_SENDMAIL], [
2065: PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
2066: AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
2067: PHP_SUBST(PROG_SENDMAIL)
2068: ])
2069:
2070: dnl
2071: dnl PHP_PROG_AWK
2072: dnl
2073: dnl Some vendors force mawk before gawk; mawk is broken so we don't like that
2074: dnl
2075: AC_DEFUN([PHP_PROG_AWK], [
2076: AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH)
2077: case "$AWK" in
2078: *mawk)
2079: AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk])
2080: ;;
2081: *gawk)
2082: ;;
2083: bork)
2084: AC_MSG_ERROR([Could not find awk; Install GNU awk])
2085: ;;
2086: *)
2087: AC_MSG_CHECKING([if $AWK is broken])
2088: if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
2089: AC_MSG_RESULT([yes])
2090: AC_MSG_ERROR([You should install GNU awk])
2091: else
2092: AC_MSG_RESULT([no])
2093: fi
2094: ;;
2095: esac
2096: PHP_SUBST(AWK)
2097: ])
2098:
2099: dnl
2100: dnl PHP_PROG_BISON
2101: dnl
2102: dnl Search for bison and check it's version
2103: dnl
2104: AC_DEFUN([PHP_PROG_BISON], [
2105: AC_PROG_YACC
2106: LIBZEND_BISON_CHECK
2107: PHP_SUBST(YACC)
2108: ])
2109:
2110: dnl
2111: dnl PHP_PROG_LEX
2112: dnl
2113: dnl Search for (f)lex and check it's version
2114: dnl
2115: AC_DEFUN([PHP_PROG_LEX], [
2116: dnl we only support certain flex versions
2117: flex_version_list="2.5.4"
2118:
2119: AC_PROG_LEX
2120: if test "$LEX" = "flex"; then
2121: dnl AC_DECL_YYTEXT is obsolete since autoconf 2.50 and merged into AC_PROG_LEX
2122: dnl this is what causes that annoying "PHP_PROG_LEX is expanded from" warning with autoconf 2.50+
2123: dnl it should be removed once we drop support of autoconf 2.13 (if ever)
2124: AC_DECL_YYTEXT
2125: :
2126: fi
2127: dnl ## Make flex scanners use const if they can, even if __STDC__ is not
2128: dnl ## true, for compilers like Sun's that only set __STDC__ true in
2129: dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
2130: AC_C_CONST
2131: if test "$ac_cv_c_const" = "yes" ; then
2132: LEX_CFLAGS="-DYY_USE_CONST"
2133: fi
2134:
2135: if test "$LEX" = "flex"; then
2136: AC_CACHE_CHECK([for flex version], php_cv_flex_version, [
2137: flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'`
2138: php_cv_flex_version=invalid
2139: for flex_check_version in $flex_version_list; do
2140: if test "$flex_version" = "$flex_check_version"; then
2141: php_cv_flex_version="$flex_check_version (ok)"
2142: fi
2143: done
2144: ])
2145: else
2146: flex_version=none
2147: fi
2148:
2149: case $php_cv_flex_version in
2150: ""|invalid[)]
2151: if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then
2152: AC_MSG_WARN([flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list (found: $flex_version)])
2153: else
2154: flex_msg="Supported flex versions are: $flex_version_list"
2155: if test "$flex_version" = "none"; then
2156: flex_msg="flex not found. flex is required to generate the Zend/PHP parsers! $flex_msg"
2157: else
2158: flex_msg="Found invalid flex version: $flex_version. $flex_msg"
2159: fi
2160: AC_MSG_ERROR([$flex_msg])
2161: fi
2162: LEX="exit 0;"
2163: ;;
2164: esac
2165: PHP_SUBST(LEX)
2166: ])
2167:
2168: dnl
2169: dnl PHP_PROG_RE2C
2170: dnl
2171: dnl Search for the re2c binary and check the version
2172: dnl
2173: AC_DEFUN([PHP_PROG_RE2C],[
2174: AC_CHECK_PROG(RE2C, re2c, re2c)
2175: if test -n "$RE2C"; then
2176: AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
2177: re2c_vernum=`$RE2C --vernum 2>/dev/null`
2178: if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
2179: php_cv_re2c_version=invalid
2180: else
2181: php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
2182: fi
2183: ])
2184: fi
2185: case $php_cv_re2c_version in
2186: ""|invalid[)]
2187: AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.])
2188: RE2C="exit 0;"
2189: ;;
2190: esac
2191: PHP_SUBST(RE2C)
2192: ])
2193:
2194: dnl -------------------------------------------------------------------------
2195: dnl Common setup macros: PHP_SETUP_<what>
2196: dnl -------------------------------------------------------------------------
2197:
2198: dnl
2199: dnl PHP_SETUP_ICU([shared-add])
2200: dnl
2201: dnl Common setup macro for ICU
2202: dnl
2203: AC_DEFUN([PHP_SETUP_ICU],[
2204: PHP_ARG_WITH(icu-dir,,
2205: [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
2206:
2207: if test "$PHP_ICU_DIR" = "no"; then
2208: PHP_ICU_DIR=DEFAULT
2209: fi
2210:
2211: if test "$PHP_ICU_DIR" = "DEFAULT"; then
2212: dnl Try to find icu-config
2213: AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
2214: else
2215: ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
2216: fi
2217:
2218: AC_MSG_CHECKING([for location of ICU headers and libraries])
2219:
2220: dnl Trust icu-config to know better what the install prefix is..
2221: icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
2222: if test "$?" != "0" || test -z "$icu_install_prefix"; then
2223: AC_MSG_RESULT([not found])
2224: AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
2225: else
2226: AC_MSG_RESULT([$icu_install_prefix])
2227:
2228: dnl Check ICU version
2229: AC_MSG_CHECKING([for ICU 3.4 or greater])
2230: icu_version_full=`$ICU_CONFIG --version`
2231: ac_IFS=$IFS
2232: IFS="."
2233: set $icu_version_full
2234: IFS=$ac_IFS
2235: icu_version=`expr [$]1 \* 1000 + [$]2`
2236: AC_MSG_RESULT([found $icu_version_full])
2237:
2238: if test "$icu_version" -lt "3004"; then
2239: AC_MSG_ERROR([ICU version 3.4 or later is required])
2240: fi
2241:
2242: ICU_VERSION=$icu_version
2243: ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
2244: ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
2245: PHP_EVAL_INCLINE($ICU_INCS)
2246: PHP_EVAL_LIBLINE($ICU_LIBS, $1)
2247: fi
2248: ])
2249:
2250: dnl
2251: dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
2252: dnl
2253: dnl Common setup macro for kerberos
2254: dnl
2255: AC_DEFUN([PHP_SETUP_KERBEROS],[
2256: found_kerberos=no
2257: unset KERBEROS_CFLAGS
2258: unset KERBEROS_LIBS
2259:
2260: dnl First try to find krb5-config
2261: if test -z "$KRB5_CONFIG"; then
2262: AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
2263: fi
2264:
2265: dnl If krb5-config is found try using it
2266: if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
2267: KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
2268: KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
2269:
2270: if test -n "$KERBEROS_LIBS"; then
2271: found_kerberos=yes
2272: PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
2273: PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
2274: fi
2275: fi
2276:
2277: dnl If still not found use old skool method
2278: if test "$found_kerberos" = "no"; then
2279:
2280: if test "$PHP_KERBEROS" = "yes"; then
2281: PHP_KERBEROS="/usr/kerberos /usr/local /usr"
2282: fi
2283:
2284: for i in $PHP_KERBEROS; do
2285: if test -f $i/$PHP_LIBDIR/libkrb5.a || test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME; then
2286: PHP_KERBEROS_DIR=$i
2287: break
2288: fi
2289: done
2290:
2291: if test "$PHP_KERBEROS_DIR"; then
2292: found_kerberos=yes
2293: PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/$PHP_LIBDIR, $1)
2294: PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
2295: PHP_ADD_LIBRARY(krb5, 1, $1)
2296: PHP_ADD_LIBRARY(k5crypto, 1, $1)
2297: PHP_ADD_LIBRARY(com_err, 1, $1)
2298: PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
2299: fi
2300: fi
2301:
2302: if test "$found_kerberos" = "yes"; then
2303: ifelse([$2],[],:,[$2])
2304: ifelse([$3],[],,[else $3])
2305: fi
2306: ])
2307:
2308: dnl
2309: dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
2310: dnl
2311: dnl Common setup macro for openssl
2312: dnl
2313: AC_DEFUN([PHP_SETUP_OPENSSL],[
2314: found_openssl=no
2315: unset OPENSSL_INCDIR
2316: unset OPENSSL_LIBDIR
2317:
2318: dnl Empty variable means 'no'
2319: test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
2320: test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
2321:
2322: dnl Fallbacks for different configure options
1.1.1.3 ! misho 2323: if test "$PHP_OPENSSL" != "no"; then
1.1 misho 2324: PHP_OPENSSL_DIR=$PHP_OPENSSL
1.1.1.3 ! misho 2325: elif test "$PHP_IMAP_SSL" != "no"; then
1.1 misho 2326: PHP_OPENSSL_DIR=$PHP_IMAP_SSL
2327: fi
2328:
2329: dnl First try to find pkg-config
2330: if test -z "$PKG_CONFIG"; then
2331: AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2332: fi
2333:
2334: dnl If pkg-config is found try using it
2335: if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
2336: if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
2337: found_openssl=yes
2338: OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
2339: OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
2340: OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
2341: else
2342: AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2343: fi
2344:
1.1.1.3 ! misho 2345: if test -n "$OPENSSL_LIBS"; then
1.1 misho 2346: PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
1.1.1.3 ! misho 2347: fi
! 2348: if test -n "$OPENSSL_INCS"; then
1.1 misho 2349: PHP_EVAL_INCLINE($OPENSSL_INCS)
2350: fi
2351: fi
2352:
2353: dnl If pkg-config fails for some reason, revert to the old method
2354: if test "$found_openssl" = "no"; then
2355:
2356: if test "$PHP_OPENSSL_DIR" = "yes"; then
2357: PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
2358: fi
2359:
2360: for i in $PHP_OPENSSL_DIR; do
2361: if test -r $i/include/openssl/evp.h; then
2362: OPENSSL_INCDIR=$i/include
2363: fi
2364: if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
2365: OPENSSL_LIBDIR=$i/$PHP_LIBDIR
2366: fi
2367: test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
2368: done
2369:
2370: if test -z "$OPENSSL_INCDIR"; then
2371: AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
2372: fi
2373:
2374: if test -z "$OPENSSL_LIBDIR"; then
2375: AC_MSG_ERROR([Cannot find OpenSSL's libraries])
2376: fi
2377:
2378: old_CPPFLAGS=$CPPFLAGS
2379: CPPFLAGS=-I$OPENSSL_INCDIR
2380: AC_MSG_CHECKING([for OpenSSL version])
2381: AC_EGREP_CPP(yes,[
2382: #include <openssl/opensslv.h>
2383: #if OPENSSL_VERSION_NUMBER >= 0x0090600fL
2384: yes
2385: #endif
2386: ],[
2387: AC_MSG_RESULT([>= 0.9.6])
2388: ],[
2389: AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2390: ])
2391: CPPFLAGS=$old_CPPFLAGS
2392:
2393: PHP_ADD_INCLUDE($OPENSSL_INCDIR)
2394:
2395: PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
2396: PHP_ADD_LIBRARY(crypto,,$1)
2397: ],[
2398: AC_MSG_ERROR([libcrypto not found!])
2399: ],[
2400: -L$OPENSSL_LIBDIR
2401: ])
2402:
2403: old_LIBS=$LIBS
2404: LIBS="$LIBS -lcrypto"
2405: PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
2406: found_openssl=yes
2407: ],[
2408: AC_MSG_ERROR([libssl not found!])
2409: ],[
2410: -L$OPENSSL_LIBDIR
2411: ])
2412: LIBS=$old_LIBS
2413: PHP_ADD_LIBRARY(ssl,,$1)
2414: PHP_ADD_LIBRARY(crypto,,$1)
2415:
2416: PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
2417: fi
2418:
2419: if test "$found_openssl" = "yes"; then
2420: dnl For apache 1.3.x static build
2421: OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
2422: AC_SUBST(OPENSSL_INCDIR_OPT)
2423:
2424: ifelse([$2],[],:,[$2])
2425: ifelse([$3],[],,[else $3])
2426: fi
2427: ])
2428:
2429: dnl
2430: dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
2431: dnl
2432: dnl Common setup macro for iconv
2433: dnl
2434: AC_DEFUN([PHP_SETUP_ICONV], [
2435: found_iconv=no
2436: unset ICONV_DIR
2437:
2438: # Create the directories for a VPATH build:
2439: $php_shtool mkdir -p ext/iconv
2440:
2441: echo > ext/iconv/php_have_bsd_iconv.h
2442: echo > ext/iconv/php_have_ibm_iconv.h
2443: echo > ext/iconv/php_have_glibc_iconv.h
2444: echo > ext/iconv/php_have_libiconv.h
2445: echo > ext/iconv/php_have_iconv.h
2446: echo > ext/iconv/php_php_iconv_impl.h
2447: echo > ext/iconv/php_iconv_aliased_libiconv.h
2448: echo > ext/iconv/php_php_iconv_h_path.h
2449: echo > ext/iconv/php_iconv_supports_errno.h
2450:
2451: dnl
2452: dnl Check libc first if no path is provided in --with-iconv
2453: dnl
1.1.1.3 ! misho 2454:
1.1 misho 2455: if test "$PHP_ICONV" = "yes"; then
1.1.1.3 ! misho 2456: dnl Reset LIBS temporarily as it may have already been included
! 2457: dnl -liconv in.
! 2458: LIBS_save="$LIBS"
! 2459: LIBS=
1.1 misho 2460: AC_CHECK_FUNC(iconv, [
2461: found_iconv=yes
2462: ],[
2463: AC_CHECK_FUNC(libiconv,[
2464: PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2465: AC_DEFINE(HAVE_LIBICONV, 1, [ ])
2466: found_iconv=yes
2467: ])
2468: ])
1.1.1.3 ! misho 2469: LIBS="$LIBS_save"
1.1 misho 2470: fi
2471:
2472: dnl
2473: dnl Check external libs for iconv funcs
2474: dnl
2475: if test "$found_iconv" = "no"; then
2476:
2477: for i in $PHP_ICONV /usr/local /usr; do
2478: if test -r $i/include/giconv.h; then
2479: AC_DEFINE(HAVE_GICONV_H, 1, [ ])
2480: ICONV_DIR=$i
2481: iconv_lib_name=giconv
2482: break
2483: elif test -r $i/include/iconv.h; then
2484: ICONV_DIR=$i
2485: iconv_lib_name=iconv
2486: break
2487: fi
2488: done
2489:
2490: if test -z "$ICONV_DIR"; then
2491: AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])
2492: fi
2493:
2494: if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
2495: test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
2496: then
2497: PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
2498: found_iconv=yes
2499: PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2500: AC_DEFINE(HAVE_LIBICONV,1,[ ])
2501: PHP_DEFINE([ICONV_ALIASED_LIBICONV],1,[ext/iconv])
2502: AC_DEFINE([ICONV_ALIASED_LIBICONV],1,[iconv() is aliased to libiconv() in -liconv])
2503: ], [
2504: PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
2505: found_iconv=yes
2506: ], [], [
2507: -L$ICONV_DIR/$PHP_LIBDIR
2508: ])
2509: ], [
2510: -L$ICONV_DIR/$PHP_LIBDIR
2511: ])
2512: fi
2513: fi
2514:
2515: if test "$found_iconv" = "yes"; then
2516: PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
2517: AC_DEFINE(HAVE_ICONV,1,[ ])
2518: if test -n "$ICONV_DIR"; then
2519: PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, $1)
2520: PHP_ADD_INCLUDE($ICONV_DIR/include)
2521: fi
2522: $2
2523: ifelse([$3],[],,[else $3])
2524: fi
2525: ])
2526:
2527: dnl
2528: dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])
2529: dnl
2530: dnl Common setup macro for libxml
2531: dnl
2532: AC_DEFUN([PHP_SETUP_LIBXML], [
2533: AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
2534: [
2535: for i in $PHP_LIBXML_DIR /usr/local /usr; do
2536: if test -x "$i/bin/xml2-config"; then
2537: ac_cv_php_xml2_config_path="$i/bin/xml2-config"
2538: break
2539: fi
2540: done
2541: ])
2542:
2543: if test -x "$ac_cv_php_xml2_config_path"; then
2544: XML2_CONFIG="$ac_cv_php_xml2_config_path"
2545: libxml_full_version=`$XML2_CONFIG --version`
2546: ac_IFS=$IFS
2547: IFS="."
2548: set $libxml_full_version
2549: IFS=$ac_IFS
2550: LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
2551: if test "$LIBXML_VERSION" -ge "2006011"; then
2552: LIBXML_LIBS=`$XML2_CONFIG --libs`
2553: LIBXML_INCS=`$XML2_CONFIG --cflags`
2554: PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
2555: PHP_EVAL_INCLINE($LIBXML_INCS)
2556:
2557: dnl Check that build works with given libs
2558: AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
2559: PHP_TEST_BUILD(xmlInitParser,
2560: [
2561: php_cv_libxml_build_works=yes
2562: ], [
2563: AC_MSG_RESULT(no)
2564: AC_MSG_ERROR([build test failed. Please check the config.log for details.])
2565: ], [
2566: [$]$1
2567: ])
2568: ])
2569: if test "$php_cv_libxml_build_works" = "yes"; then
2570: AC_DEFINE(HAVE_LIBXML, 1, [ ])
2571: fi
2572: $2
2573: else
2574: AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
2575: fi
2576: ifelse([$3],[],,[else $3])
2577: fi
2578: ])
2579:
2580: dnl -------------------------------------------------------------------------
2581: dnl Misc. macros
2582: dnl -------------------------------------------------------------------------
2583:
2584: dnl
2585: dnl PHP_INSTALL_HEADERS(path [, file ...])
2586: dnl
2587: dnl PHP header files to be installed
2588: dnl
2589: AC_DEFUN([PHP_INSTALL_HEADERS],[
2590: ifelse([$2],[],[
2591: for header_file in $1; do
2592: PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
2593: INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
2594: ])
2595: done
2596: ], [
2597: header_path=$1
2598: for header_file in $2; do
2599: hp_hf="$header_path/$header_file"
2600: PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
2601: INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
2602: ])
2603: done
2604: ])
2605: ])
2606:
2607: dnl
2608: dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
2609: dnl
2610: dnl This macro is used to get a comparable
2611: dnl version for apache1/2.
2612: dnl
2613: AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
2614: ac_output=`$1 -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
2615: ac_IFS=$IFS
2616: IFS="- /.
2617: "
2618: set $ac_output
2619: IFS=$ac_IFS
2620:
2621: APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
2622: ])
2623:
2624: dnl
2625: dnl PHP_DEBUG_MACRO(filename)
2626: dnl
2627: AC_DEFUN([PHP_DEBUG_MACRO],[
2628: DEBUG_LOG=$1
2629: cat >$1 <<X
2630: CONFIGURE: $CONFIGURE_COMMAND
2631: CC: $CC
2632: CFLAGS: $CFLAGS
2633: CPPFLAGS: $CPPFLAGS
2634: CXX: $CXX
2635: CXXFLAGS: $CXXFLAGS
2636: INCLUDES: $INCLUDES
2637: LDFLAGS: $LDFLAGS
2638: LIBS: $LIBS
2639: DLIBS: $DLIBS
2640: SAPI: $PHP_SAPI
2641: PHP_RPATHS: $PHP_RPATHS
2642: uname -a: `uname -a`
2643:
2644: X
2645: cat >conftest.$ac_ext <<X
2646: main()
2647: {
2648: exit(0);
2649: }
2650: X
2651: (eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
2652: rm -fr conftest*
2653: ])
2654:
2655: dnl
2656: dnl PHP_CONFIG_NICE(filename)
2657: dnl
2658: dnl Generates the config.nice file
2659: dnl
2660: AC_DEFUN([PHP_CONFIG_NICE],[
2661: AC_REQUIRE([AC_PROG_EGREP])
2662: AC_REQUIRE([LT_AC_PROG_SED])
2663: PHP_SUBST_OLD(EGREP)
2664: PHP_SUBST_OLD(SED)
2665: test -f $1 && mv $1 $1.old
2666: rm -f $1.old
2667: cat >$1<<EOF
2668: #! /bin/sh
2669: #
2670: # Created by configure
2671:
2672: EOF
2673:
2674: for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
2675: eval val=\$$var
2676: if test -n "$val"; then
2677: echo "$var='$val' \\" >> $1
2678: fi
2679: done
2680:
2681: echo "'[$]0' \\" >> $1
2682: if test `expr -- [$]0 : "'.*"` = 0; then
2683: CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
2684: else
2685: CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
2686: fi
2687: for arg in $ac_configure_args; do
1.1.1.2 misho 2688: if test `expr -- $arg : "'.*"` = 0; then
2689: if test `expr -- $arg : "--.*"` = 0; then
2690: break;
2691: fi
2692: echo "'[$]arg' \\" >> $1
2693: CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
2694: else
2695: if test `expr -- $arg : "'--.*"` = 0; then
2696: break;
2697: fi
2698: echo "[$]arg \\" >> $1
2699: CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
2700: fi
1.1 misho 2701: done
2702: echo '"[$]@"' >> $1
2703: chmod +x $1
2704: CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"
2705: PHP_SUBST_OLD(CONFIGURE_COMMAND)
2706: PHP_SUBST_OLD(CONFIGURE_OPTIONS)
2707: ])
2708:
2709: dnl
2710: dnl PHP_CHECK_CONFIGURE_OPTIONS
2711: dnl
2712: AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
2713: for arg in $ac_configure_args; do
2714: case $arg in
2715: --with-*[)]
2716: arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
2717: ;;
2718: --without-*[)]
2719: arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
2720: ;;
2721: --enable-*[)]
2722: arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
2723: ;;
2724: --disable-*[)]
2725: arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
2726: ;;
2727: *[)]
2728: continue
2729: ;;
2730: esac
2731: case $arg_name in
2732: # Allow --disable-all / --enable-all
2733: enable-all[)];;
2734:
2735: # Allow certain libtool options
2736: enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];;
2737:
2738: # Allow certain TSRM options
2739: with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads[)];;
2740:
2741: # Allow certain Zend options
2742: with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];;
2743:
2744: # All the rest must be set using the PHP_ARG_* macros
2745: # PHP_ARG_* macros set php_enable_<arg_name> or php_with_<arg_name>
2746: *[)]
2747: # Options that exist before PHP 6
2748: if test "$PHP_MAJOR_VERSION" -lt "6"; then
2749: case $arg_name in
2750: enable-zend-multibyte[)] continue;;
2751: esac
2752: fi
2753:
2754: is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
2755: if eval test "x\$$is_arg_set" = "x"; then
2756: PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS
2757: [$]arg"
2758: fi
2759: ;;
2760: esac
2761: done
2762: ])
2763:
2764: dnl
2765: dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
2766: dnl
2767: AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
1.1.1.2 misho 2768: AC_CACHE_CHECK([for PDO includes], pdo_cv_inc_path, [
1.1 misho 2769: AC_MSG_CHECKING([for PDO includes])
2770: if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
1.1.1.2 misho 2771: pdo_cv_inc_path=$abs_srcdir/ext
1.1 misho 2772: elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
1.1.1.2 misho 2773: pdo_cv_inc_path=$abs_srcdir/ext
1.1 misho 2774: elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
1.1.1.2 misho 2775: pdo_cv_inc_path=$prefix/include/php/ext
1.1 misho 2776: fi
2777: ])
1.1.1.2 misho 2778: if test -n "$pdo_cv_inc_path"; then
1.1 misho 2779: ifelse([$1],[],:,[$1])
2780: else
2781: ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
2782: fi
2783: ])
2784:
2785: dnl
2786: dnl PHP_DETECT_ICC
2787: dnl Detect Intel C++ Compiler and unset $GCC if ICC found
2788: AC_DEFUN([PHP_DETECT_ICC],
2789: [
2790: ICC="no"
2791: AC_MSG_CHECKING([for icc])
2792: AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
2793: ICC="no"
2794: AC_MSG_RESULT([no]),
2795: ICC="yes"
2796: GCC="no"
2797: AC_MSG_RESULT([yes])
2798: )
2799: ])
2800:
2801: dnl PHP_DETECT_SUNCC
2802: dnl Detect if the systems default compiler is suncc.
2803: dnl We also set some usefull CFLAGS if the user didn't set any
2804: AC_DEFUN([PHP_DETECT_SUNCC],[
2805: SUNCC="no"
2806: AC_MSG_CHECKING([for suncc])
2807: AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C],
2808: SUNCC="no"
2809: AC_MSG_RESULT([no]),
2810: SUNCC="yes"
2811: GCC="no"
2812: test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
2813: GCC=""
2814: AC_MSG_RESULT([yes])
2815: )
2816: ])
2817:
2818: dnl
2819: dnl PHP_CRYPT_R_STYLE
2820: dnl detect the style of crypt_r() is any is available
2821: dnl see APR_CHECK_CRYPT_R_STYLE() for original version
2822: dnl
2823: AC_DEFUN([PHP_CRYPT_R_STYLE],
2824: [
2825: AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[
2826: php_cv_crypt_r_style=none
2827: AC_TRY_COMPILE([
2828: #define _REENTRANT 1
2829: #include <crypt.h>
2830: ],[
2831: CRYPTD buffer;
2832: crypt_r("passwd", "hash", &buffer);
2833: ],
2834: php_cv_crypt_r_style=cryptd)
2835:
2836: if test "$php_cv_crypt_r_style" = "none"; then
2837: AC_TRY_COMPILE([
2838: #define _REENTRANT 1
2839: #include <crypt.h>
2840: ],[
2841: struct crypt_data buffer;
2842: crypt_r("passwd", "hash", &buffer);
2843: ],
2844: php_cv_crypt_r_style=struct_crypt_data)
2845: fi
2846:
2847: if test "$php_cv_crypt_r_style" = "none"; then
2848: AC_TRY_COMPILE([
2849: #define _REENTRANT 1
2850: #define _GNU_SOURCE
2851: #include <crypt.h>
2852: ],[
2853: struct crypt_data buffer;
2854: crypt_r("passwd", "hash", &buffer);
2855: ],
2856: php_cv_crypt_r_style=struct_crypt_data_gnu_source)
2857: fi
2858: ])
2859:
2860: if test "$php_cv_crypt_r_style" = "cryptd"; then
2861: AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])
2862: fi
2863: if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2864: AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])
2865: fi
2866: if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2867: AC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE])
2868: fi
2869: if test "$php_cv_crypt_r_style" = "none"; then
2870: AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
2871: fi
2872: ])
2873:
2874: dnl
2875: dnl PHP_TEST_WRITE_STDOUT
2876: dnl
2877: AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
2878: AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
2879: AC_TRY_RUN([
2880: #ifdef HAVE_UNISTD_H
2881: #include <unistd.h>
2882: #endif
2883:
2884: #define TEXT "This is the test message -- "
2885:
2886: main()
2887: {
2888: int n;
2889:
2890: n = write(1, TEXT, sizeof(TEXT)-1);
2891: return (!(n == sizeof(TEXT)-1));
2892: }
2893: ],[
2894: ac_cv_write_stdout=yes
2895: ],[
2896: ac_cv_write_stdout=no
2897: ],[
2898: ac_cv_write_stdout=no
2899: ])
2900: ])
2901: if test "$ac_cv_write_stdout" = "yes"; then
2902: AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
2903: fi
2904: ])
2905:
1.1.1.2 misho 2906: dnl
2907: dnl PHP_INIT_DTRACE(providerdesc, header-file, sources [, module])
2908: dnl
2909: AC_DEFUN([PHP_INIT_DTRACE],[
2910: dnl Set paths properly when called from extension
2911: case "$4" in
2912: ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir;;
2913: /*[)] ac_srcdir=`echo "$4"|cut -c 2-`"/"; ac_bdir=$ac_srcdir;;
2914: *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$4/";;
2915: esac
2916:
2917: dnl providerdesc
2918: ac_provsrc=$1
2919: old_IFS=[$]IFS
2920: IFS=.
2921: set $ac_provsrc
2922: ac_provobj=[$]1
2923: IFS=$old_IFS
2924:
2925: dnl header-file
2926: ac_hdrobj=$2
2927:
2928: dnl Add providerdesc.o into global objects when needed
2929: case $host_alias in
2930: *freebsd*)
2931: PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
2932: PHP_LDFLAGS="$PHP_LDFLAGS -lelf"
2933: ;;
2934: *solaris*)
2935: PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
2936: ;;
2937: esac
2938:
2939: dnl DTrace objects
2940: old_IFS=[$]IFS
2941: for ac_src in $3; do
2942: IFS=.
2943: set $ac_src
2944: ac_obj=[$]1
2945: IFS=$old_IFS
2946:
2947: PHP_DTRACE_OBJS="[$]PHP_DTRACE_OBJS [$]ac_bdir[$]ac_obj.lo"
2948: done;
2949:
2950: case [$]php_sapi_module in
2951: shared[)]
2952: for ac_lo in $PHP_DTRACE_OBJS; do
2953: dtrace_objs="[$]dtrace_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
2954: done;
2955: ;;
2956: *[)]
2957: dtrace_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
2958: ;;
2959: esac
2960:
2961: dnl Generate Makefile.objects entries
2962: cat>>Makefile.objects<<EOF
2963:
2964: $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc
2965: dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@ && \$(SED) -ibak 's,PHP_,DTRACE_,g' \$[]@
2966:
2967: \$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
2968:
2969: $ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)
2970: dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
2971:
2972: EOF
2973: ])
1.1 misho 2974: # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2975: ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
2976: ## 2008 Free Software Foundation, Inc.
2977: ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2978: ##
2979: ## This file is free software; the Free Software Foundation gives
2980: ## unlimited permission to copy and/or distribute it, with or without
2981: ## modifications, as long as this notice is preserved.
2982:
2983: # serial 52 AC_PROG_LIBTOOL
2984:
2985: ifdef([AC_ACVERSION],[
2986: # autoconf 2.13 compatibility
2987: # Set PATH_SEPARATOR variable
2988: # ---------------------------------
2989: # Find the correct PATH separator. Usually this is :', but
2990: # DJGPP uses ;' like DOS.
2991: if test "X${PATH_SEPARATOR+set}" != Xset; then
2992: UNAME=${UNAME-`uname 2>/dev/null`}
2993: case X$UNAME in
2994: *-DOS) lt_cv_sys_path_separator=';' ;;
2995: *) lt_cv_sys_path_separator=':' ;;
2996: esac
2997: PATH_SEPARATOR=$lt_cv_sys_path_separator
2998: fi
2999: ])
3000:
3001: # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
3002: # -----------------------------------------------------------
3003: # If this macro is not defined by Autoconf, define it here.
3004: ifdef([AC_PROVIDE_IFELSE],
3005: [],
3006: [define([AC_PROVIDE_IFELSE],
3007: [ifdef([AC_PROVIDE_$1],
3008: [$2], [$3])])])
3009:
3010: # AC_PROG_LIBTOOL
3011: # ---------------
3012: AC_DEFUN([AC_PROG_LIBTOOL],
3013: [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
3014: dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
3015: dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
3016: AC_PROVIDE_IFELSE([AC_PROG_CXX],
3017: [AC_LIBTOOL_CXX],
3018: [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
3019: ])])
3020: ])# AC_PROG_LIBTOOL
3021:
3022:
3023: # _AC_PROG_LIBTOOL
3024: # ----------------
3025: AC_DEFUN([_AC_PROG_LIBTOOL],
3026: [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
3027: AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
3028:
3029: # This can be used to rebuild libtool when needed
3030: LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
3031:
3032: # Always use our own libtool.
3033: LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3034: AC_SUBST(LIBTOOL)dnl
3035:
3036: # Prevent multiple expansion
3037: define([AC_PROG_LIBTOOL], [])
3038: ])# _AC_PROG_LIBTOOL
3039:
3040:
3041: # AC_LIBTOOL_SETUP
3042: # ----------------
3043: AC_DEFUN([AC_LIBTOOL_SETUP],
3044: [AC_PREREQ(2.13)dnl
3045: AC_REQUIRE([AC_ENABLE_SHARED])dnl
3046: AC_REQUIRE([AC_ENABLE_STATIC])dnl
3047: AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
3048: AC_REQUIRE([AC_CANONICAL_HOST])dnl
3049: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3050: AC_REQUIRE([AC_PROG_CC])dnl
3051: AC_REQUIRE([AC_PROG_LD])dnl
3052: AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
3053: AC_REQUIRE([AC_PROG_NM])dnl
3054:
3055: AC_REQUIRE([AC_PROG_LN_S])dnl
3056: AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
3057: # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
3058: AC_REQUIRE([AC_OBJEXT])dnl
3059: AC_REQUIRE([AC_EXEEXT])dnl
3060: dnl
3061: AC_LIBTOOL_SYS_MAX_CMD_LEN
3062: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3063: AC_LIBTOOL_OBJDIR
3064:
3065: AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3066: _LT_AC_PROG_ECHO_BACKSLASH
3067:
3068: case $host_os in
3069: aix3*)
3070: # AIX sometimes has problems with the GCC collect2 program. For some
3071: # reason, if we set the COLLECT_NAMES environment variable, the problems
3072: # vanish in a puff of smoke.
3073: if test "X${COLLECT_NAMES+set}" != Xset; then
3074: COLLECT_NAMES=
3075: export COLLECT_NAMES
3076: fi
3077: ;;
3078: esac
3079:
3080: # Sed substitution that helps us do robust quoting. It backslashifies
3081: # metacharacters that are still active within double-quoted strings.
3082: Xsed='sed -e 1s/^X//'
3083: [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
3084:
3085: # Same as above, but do not quote variable references.
3086: [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
3087:
3088: # Sed substitution to delay expansion of an escaped shell variable in a
3089: # double_quote_subst'ed string.
3090: delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3091:
3092: # Sed substitution to avoid accidental globbing in evaled expressions
3093: no_glob_subst='s/\*/\\\*/g'
3094:
3095: # Constants:
3096: rm="rm -f"
3097:
3098: # Global variables:
3099: default_ofile=libtool
3100: can_build_shared=yes
3101:
3102: # All known linkers require a `.a' archive for static linking (except MSVC,
3103: # which needs '.lib').
3104: libext=a
3105: ltmain="$ac_aux_dir/ltmain.sh"
3106: ofile="$default_ofile"
3107: with_gnu_ld="$lt_cv_prog_gnu_ld"
3108:
3109: AC_CHECK_TOOL(AR, ar, false)
3110: AC_CHECK_TOOL(RANLIB, ranlib, :)
3111: AC_CHECK_TOOL(STRIP, strip, :)
3112:
3113: old_CC="$CC"
3114: old_CFLAGS="$CFLAGS"
3115:
3116: # Set sane defaults for various variables
3117: test -z "$AR" && AR=ar
3118: test -z "$AR_FLAGS" && AR_FLAGS=cru
3119: test -z "$AS" && AS=as
3120: test -z "$CC" && CC=cc
3121: test -z "$LTCC" && LTCC=$CC
3122: test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
3123: test -z "$DLLTOOL" && DLLTOOL=dlltool
3124: test -z "$LD" && LD=ld
3125: test -z "$LN_S" && LN_S="ln -s"
3126: test -z "$MAGIC_CMD" && MAGIC_CMD=file
3127: test -z "$NM" && NM=nm
3128: test -z "$SED" && SED=sed
3129: test -z "$OBJDUMP" && OBJDUMP=objdump
3130: test -z "$RANLIB" && RANLIB=:
3131: test -z "$STRIP" && STRIP=:
3132: test -z "$ac_objext" && ac_objext=o
3133:
3134: # Determine commands to create old-style static archives.
3135: old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3136: old_postinstall_cmds='chmod 644 $oldlib'
3137: old_postuninstall_cmds=
3138:
3139: if test -n "$RANLIB"; then
3140: case $host_os in
3141: openbsd*)
3142: old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3143: ;;
3144: *)
3145: old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3146: ;;
3147: esac
3148: old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3149: fi
3150:
3151: _LT_CC_BASENAME([$compiler])
3152:
3153: # Only perform the check for file, if the check method requires it
3154: case $deplibs_check_method in
3155: file_magic*)
3156: if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3157: AC_PATH_MAGIC
3158: fi
3159: ;;
3160: esac
3161:
3162: _LT_REQUIRED_DARWIN_CHECKS
3163:
3164: AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
3165: AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
3166: enable_win32_dll=yes, enable_win32_dll=no)
3167:
3168: AC_ARG_ENABLE([libtool-lock],
3169: [ --disable-libtool-lock avoid locking (might break parallel builds)])
3170: test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3171:
3172: AC_ARG_WITH([pic],
3173: [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
3174: [pic_mode="$withval"],
3175: [pic_mode=default])
3176: test -z "$pic_mode" && pic_mode=default
3177:
3178: # Use C for the default configuration in the libtool script
3179: tagname=
3180: AC_LIBTOOL_LANG_C_CONFIG
3181: _LT_AC_TAGCONFIG
3182: ])# AC_LIBTOOL_SETUP
3183:
3184:
3185: # _LT_AC_SYS_COMPILER
3186: # -------------------
3187: AC_DEFUN([_LT_AC_SYS_COMPILER],
3188: [AC_REQUIRE([AC_PROG_CC])dnl
3189:
3190: # If no C compiler was specified, use CC.
3191: LTCC=${LTCC-"$CC"}
3192:
3193: # If no C compiler flags were specified, use CFLAGS.
3194: LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3195:
3196: # Allow CC to be a program name with arguments.
3197: compiler=$CC
3198: ])# _LT_AC_SYS_COMPILER
3199:
3200:
3201: # _LT_CC_BASENAME(CC)
3202: # -------------------
3203: # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
3204: AC_DEFUN([_LT_CC_BASENAME],
3205: [for cc_temp in $1""; do
3206: case $cc_temp in
3207: compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
3208: distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
3209: \-*) ;;
3210: *) break;;
3211: esac
3212: done
3213: cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
3214: ])
3215:
3216:
3217: # _LT_COMPILER_BOILERPLATE
3218: # ------------------------
3219: # Check for compiler boilerplate output or warnings with
3220: # the simple compiler test code.
3221: AC_DEFUN([_LT_COMPILER_BOILERPLATE],
3222: [AC_REQUIRE([LT_AC_PROG_SED])dnl
3223: ac_outfile=conftest.$ac_objext
3224: echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3225: eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3226: _lt_compiler_boilerplate=`cat conftest.err`
3227: $rm conftest*
3228: ])# _LT_COMPILER_BOILERPLATE
3229:
3230:
3231: # _LT_LINKER_BOILERPLATE
3232: # ----------------------
3233: # Check for linker boilerplate output or warnings with
3234: # the simple link test code.
3235: AC_DEFUN([_LT_LINKER_BOILERPLATE],
3236: [AC_REQUIRE([LT_AC_PROG_SED])dnl
3237: ac_outfile=conftest.$ac_objext
3238: echo "$lt_simple_link_test_code" >conftest.$ac_ext
3239: eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3240: _lt_linker_boilerplate=`cat conftest.err`
3241: $rm -r conftest*
3242: ])# _LT_LINKER_BOILERPLATE
3243:
3244:
3245: dnl autoconf 2.13 compatibility
3246: dnl _LT_AC_TRY_LINK()
3247: AC_DEFUN(_LT_AC_TRY_LINK, [
3248: cat > conftest.$ac_ext <<EOF
3249: dnl This sometimes fails to find confdefs.h, for some reason.
3250: dnl [#]line __oline__ "[$]0"
3251: [#]line __oline__ "configure"
3252: #include "confdefs.h"
3253: int main() {
3254: ; return 0; }
3255: EOF
3256: if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3257: ifelse([$1], , :, [$1
3258: rm -rf conftest*])
3259: else
3260: echo "configure: failed program was:" >&5
3261: cat conftest.$ac_ext >&6
3262: ifelse([$2], , , [$2
3263: rm -rf conftest*
3264: ])dnl
3265: fi
3266: rm -f conftest*])
3267:
3268: # _LT_REQUIRED_DARWIN_CHECKS
3269: # --------------------------
3270: # Check for some things on darwin
3271: AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
3272: case $host_os in
3273: rhapsody* | darwin*)
3274: AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3275: AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3276:
3277: AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3278: [lt_cv_apple_cc_single_mod=no
3279: if test -z "${LT_MULTI_MODULE}"; then
3280: # By default we will add the -single_module flag. You can override
3281: # by either setting the environment variable LT_MULTI_MODULE
3282: # non-empty at configure time, or by adding -multi_module to the
3283: # link flags.
3284: echo "int foo(void){return 1;}" > conftest.c
3285: $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3286: -dynamiclib ${wl}-single_module conftest.c
3287: if test -f libconftest.dylib; then
3288: lt_cv_apple_cc_single_mod=yes
3289: rm -rf libconftest.dylib*
3290: fi
3291: rm conftest.c
3292: fi])
3293: AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3294: [lt_cv_ld_exported_symbols_list],
3295: [lt_cv_ld_exported_symbols_list=no
3296: save_LDFLAGS=$LDFLAGS
3297: echo "_main" > conftest.sym
3298: LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3299: _LT_AC_TRY_LINK([lt_cv_ld_exported_symbols_list=yes],[lt_cv_ld_exported_symbols_list=no])
3300: LDFLAGS="$save_LDFLAGS"
3301: ])
3302: case $host_os in
3303: rhapsody* | darwin1.[[0123]])
3304: _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3305: darwin1.*)
3306: _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3307: darwin*)
3308: # if running on 10.5 or later, the deployment target defaults
3309: # to the OS version, if on x86, and 10.4, the deployment
3310: # target defaults to 10.4. Don't you love it?
3311: case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3312: 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3313: _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3314: 10.[[012]]*)
3315: _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3316: 10.*)
3317: _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3318: esac
3319: ;;
3320: esac
3321: if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3322: _lt_dar_single_mod='$single_module'
3323: fi
3324: if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3325: _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3326: else
3327: _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
3328: fi
3329: if test "$DSYMUTIL" != ":"; then
3330: _lt_dsymutil="~$DSYMUTIL \$lib || :"
3331: else
3332: _lt_dsymutil=
3333: fi
3334: ;;
3335: esac
3336: ])
3337:
3338: # _LT_AC_SYS_LIBPATH_AIX
3339: # ----------------------
3340: # Links a minimal program and checks the executable
3341: # for the system default hardcoded library path. In most cases,
3342: # this is /usr/lib:/lib, but when the MPI compilers are used
3343: # the location of the communication and MPI libs are included too.
3344: # If we don't find anything, use the default library path according
3345: # to the aix ld manual.
3346: AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
3347: [AC_REQUIRE([LT_AC_PROG_SED])dnl
3348: _LT_AC_TRY_LINK([
3349: lt_aix_libpath_sed='
3350: /Import File Strings/,/^$/ {
3351: /^0/ {
3352: s/^0 *\(.*\)$/\1/
3353: p
3354: }
3355: }'
3356: aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3357: # Check for a 64-bit object if we didn't find anything.
3358: if test -z "$aix_libpath"; then
3359: aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3360: fi],[])
3361: if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3362: ])# _LT_AC_SYS_LIBPATH_AIX
3363:
3364:
3365: # _LT_AC_SHELL_INIT(ARG)
3366: # ----------------------
3367: AC_DEFUN([_LT_AC_SHELL_INIT],
3368: [ifdef([AC_DIVERSION_NOTICE],
3369: [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3370: [AC_DIVERT_PUSH(NOTICE)])
3371: $1
3372: AC_DIVERT_POP
3373: ])# _LT_AC_SHELL_INIT
3374:
3375:
3376: # _LT_AC_PROG_ECHO_BACKSLASH
3377: # --------------------------
3378: # Add some code to the start of the generated configure script which
3379: # will find an echo command which doesn't interpret backslashes.
3380: AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
3381: [_LT_AC_SHELL_INIT([
3382: # Check that we are running under the correct shell.
3383: SHELL=${CONFIG_SHELL-/bin/sh}
3384:
3385: case X$ECHO in
3386: X*--fallback-echo)
3387: # Remove one level of quotation (which was required for Make).
3388: ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3389: ;;
3390: esac
3391:
3392: echo=${ECHO-echo}
3393: if test "X[$]1" = X--no-reexec; then
3394: # Discard the --no-reexec flag, and continue.
3395: shift
3396: elif test "X[$]1" = X--fallback-echo; then
3397: # Avoid inline document here, it may be left over
3398: :
3399: elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
3400: # Yippee, $echo works!
3401: :
3402: else
3403: # Restart under the correct shell.
3404: exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3405: fi
3406:
3407: if test "X[$]1" = X--fallback-echo; then
3408: # used as fallback echo
3409: shift
3410: cat <<EOF
3411: [$]*
3412: EOF
3413: exit 0
3414: fi
3415:
3416: # The HP-UX ksh and POSIX shell print the target directory to stdout
3417: # if CDPATH is set.
3418: (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3419:
3420: if test -z "$ECHO"; then
3421: if test "X${echo_test_string+set}" != Xset; then
3422: # find a string as large as possible, as long as the shell can cope with it
3423: for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3424: # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3425: if (echo_test_string=`eval $cmd`) 2>/dev/null &&
3426: echo_test_string=`eval $cmd` &&
3427: (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
3428: then
3429: break
3430: fi
3431: done
3432: fi
3433:
3434: if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3435: echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3436: test "X$echo_testing_string" = "X$echo_test_string"; then
3437: :
3438: else
3439: # The Solaris, AIX, and Digital Unix default echo programs unquote
3440: # backslashes. This makes it impossible to quote backslashes using
3441: # echo "$something" | sed 's/\\/\\\\/g'
3442: #
3443: # So, first we look for a working echo in the user's PATH.
3444:
3445: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3446: for dir in $PATH /usr/ucb; do
3447: IFS="$lt_save_ifs"
3448: if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3449: test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3450: echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3451: test "X$echo_testing_string" = "X$echo_test_string"; then
3452: echo="$dir/echo"
3453: break
3454: fi
3455: done
3456: IFS="$lt_save_ifs"
3457:
3458: if test "X$echo" = Xecho; then
3459: # We didn't find a better echo, so look for alternatives.
3460: if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
3461: echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
3462: test "X$echo_testing_string" = "X$echo_test_string"; then
3463: # This shell has a builtin print -r that does the trick.
3464: echo='print -r'
3465: elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
3466: test "X$CONFIG_SHELL" != X/bin/ksh; then
3467: # If we have ksh, try running configure again with it.
3468: ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3469: export ORIGINAL_CONFIG_SHELL
3470: CONFIG_SHELL=/bin/ksh
3471: export CONFIG_SHELL
3472: exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3473: else
3474: # Try using printf.
3475: echo='printf %s\n'
3476: if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3477: echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3478: test "X$echo_testing_string" = "X$echo_test_string"; then
3479: # Cool, printf works
3480: :
3481: elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3482: test "X$echo_testing_string" = 'X\t' &&
3483: echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3484: test "X$echo_testing_string" = "X$echo_test_string"; then
3485: CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3486: export CONFIG_SHELL
3487: SHELL="$CONFIG_SHELL"
3488: export SHELL
3489: echo="$CONFIG_SHELL [$]0 --fallback-echo"
3490: elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3491: test "X$echo_testing_string" = 'X\t' &&
3492: echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3493: test "X$echo_testing_string" = "X$echo_test_string"; then
3494: echo="$CONFIG_SHELL [$]0 --fallback-echo"
3495: else
3496: # maybe with a smaller string...
3497: prev=:
3498:
3499: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3500: if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
3501: then
3502: break
3503: fi
3504: prev="$cmd"
3505: done
3506:
3507: if test "$prev" != 'sed 50q "[$]0"'; then
3508: echo_test_string=`eval $prev`
3509: export echo_test_string
3510: exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3511: else
3512: # Oops. We lost completely, so just stick with echo.
3513: echo=echo
3514: fi
3515: fi
3516: fi
3517: fi
3518: fi
3519: fi
3520:
3521: # Copy echo and quote the copy suitably for passing to libtool from
3522: # the Makefile, instead of quoting the original, which is used later.
3523: ECHO=$echo
3524: if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3525: ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3526: fi
3527:
3528: AC_SUBST(ECHO)
3529: ])])# _LT_AC_PROG_ECHO_BACKSLASH
3530:
3531:
3532: # _LT_AC_LOCK
3533: # -----------
3534: AC_DEFUN([_LT_AC_LOCK],
3535: [dnl
3536: #AC_ARG_ENABLE([libtool-lock],
3537: #[ --disable-libtool-lock avoid locking (might break parallel builds)])
3538: #test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3539:
3540: # Some flags need to be propagated to the compiler or linker for good
3541: # libtool support.
3542: case $host in
3543: ia64-*-hpux*)
3544: # Find out which ABI we are using.
3545: echo 'int i;' > conftest.$ac_ext
3546: if AC_TRY_EVAL(ac_compile); then
3547: case `/usr/bin/file conftest.$ac_objext` in
3548: *ELF-32*)
3549: HPUX_IA64_MODE="32"
3550: ;;
3551: *ELF-64*)
3552: HPUX_IA64_MODE="64"
3553: ;;
3554: esac
3555: fi
3556: rm -rf conftest*
3557: ;;
3558: *-*-irix6*)
3559: # Find out which ABI we are using.
3560: echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3561: if AC_TRY_EVAL(ac_compile); then
3562: if test "$lt_cv_prog_gnu_ld" = yes; then
3563: case `/usr/bin/file conftest.$ac_objext` in
3564: *32-bit*)
3565: LD="${LD-ld} -melf32bsmip"
3566: ;;
3567: *N32*)
3568: LD="${LD-ld} -melf32bmipn32"
3569: ;;
3570: *64-bit*)
3571: LD="${LD-ld} -melf64bmip"
3572: ;;
3573: esac
3574: else
3575: case `/usr/bin/file conftest.$ac_objext` in
3576: *32-bit*)
3577: LD="${LD-ld} -32"
3578: ;;
3579: *N32*)
3580: LD="${LD-ld} -n32"
3581: ;;
3582: *64-bit*)
3583: LD="${LD-ld} -64"
3584: ;;
3585: esac
3586: fi
3587: fi
3588: rm -rf conftest*
3589: ;;
3590:
3591: x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3592: s390*-*linux*|sparc*-*linux*)
3593: # Find out which ABI we are using.
3594: echo 'int i;' > conftest.$ac_ext
3595: if AC_TRY_EVAL(ac_compile); then
3596: case `/usr/bin/file conftest.o` in
3597: *32-bit*)
3598: case $host in
3599: x86_64-*kfreebsd*-gnu)
3600: LD="${LD-ld} -m elf_i386_fbsd"
3601: ;;
3602: x86_64-*linux*)
3603: LD="${LD-ld} -m elf_i386"
3604: ;;
3605: ppc64-*linux*|powerpc64-*linux*)
3606: LD="${LD-ld} -m elf32ppclinux"
3607: ;;
3608: s390x-*linux*)
3609: LD="${LD-ld} -m elf_s390"
3610: ;;
3611: sparc64-*linux*)
3612: LD="${LD-ld} -m elf32_sparc"
3613: ;;
3614: esac
3615: ;;
3616: *64-bit*)
3617: case $host in
3618: x86_64-*kfreebsd*-gnu)
3619: LD="${LD-ld} -m elf_x86_64_fbsd"
3620: ;;
3621: x86_64-*linux*)
3622: LD="${LD-ld} -m elf_x86_64"
3623: ;;
3624: ppc*-*linux*|powerpc*-*linux*)
3625: LD="${LD-ld} -m elf64ppc"
3626: ;;
3627: s390*-*linux*)
3628: LD="${LD-ld} -m elf64_s390"
3629: ;;
3630: sparc*-*linux*)
3631: LD="${LD-ld} -m elf64_sparc"
3632: ;;
3633: esac
3634: ;;
3635: esac
3636: fi
3637: rm -rf conftest*
3638: ;;
3639:
3640: *-*-sco3.2v5*)
3641: # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3642: SAVE_CFLAGS="$CFLAGS"
3643: CFLAGS="$CFLAGS -belf"
3644: AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3645: [AC_LANG_SAVE
3646: AC_LANG_C
3647: AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3648: AC_LANG_RESTORE])
3649: if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3650: # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3651: CFLAGS="$SAVE_CFLAGS"
3652: fi
3653: ;;
3654: sparc*-*solaris*)
3655: # Find out which ABI we are using.
3656: echo 'int i;' > conftest.$ac_ext
3657: if AC_TRY_EVAL(ac_compile); then
3658: case `/usr/bin/file conftest.o` in
3659: *64-bit*)
3660: case $lt_cv_prog_gnu_ld in
3661: yes*) LD="${LD-ld} -m elf64_sparc" ;;
3662: *)
3663: if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3664: LD="${LD-ld} -64"
3665: fi
3666: ;;
3667: esac
3668: ;;
3669: esac
3670: fi
3671: rm -rf conftest*
3672: ;;
3673:
3674: AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
3675: [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
3676: AC_CHECK_TOOL(DLLTOOL, dlltool, false)
3677: AC_CHECK_TOOL(AS, as, false)
3678: AC_CHECK_TOOL(OBJDUMP, objdump, false)
3679: ;;
3680: ])
3681: esac
3682:
3683: need_locks="$enable_libtool_lock"
3684:
3685: ])# _LT_AC_LOCK
3686:
3687:
3688: # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3689: # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3690: # ----------------------------------------------------------------
3691: # Check whether the given compiler option works
3692: AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
3693: [AC_REQUIRE([LT_AC_PROG_SED])
3694: AC_CACHE_CHECK([$1], [$2],
3695: [$2=no
3696: ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3697: echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3698: lt_compiler_flag="$3"
3699: # Insert the option either (1) after the last *FLAGS variable, or
3700: # (2) before a word containing "conftest.", or (3) at the end.
3701: # Note that $ac_compile itself does not contain backslashes and begins
3702: # with a dollar sign (not a hyphen), so the echo should work correctly.
3703: # The option is referenced via a variable to avoid confusing sed.
3704: lt_compile=`echo "$ac_compile" | $SED \
3705: -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3706: -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3707: -e 's:$: $lt_compiler_flag:'`
3708: (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
3709: (eval "$lt_compile" 2>conftest.err)
3710: ac_status=$?
3711: cat conftest.err >&5
3712: echo "configure:__oline__: \$? = $ac_status" >&5
3713: if (exit $ac_status) && test -s "$ac_outfile"; then
3714: # The compiler can only warn and ignore the option if not recognized
3715: # So say no if there are warnings other than the usual output.
3716: $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3717: $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3718: if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3719: $2=yes
3720: fi
3721: fi
3722: $rm conftest*
3723: ])
3724:
3725: if test x"[$]$2" = xyes; then
3726: ifelse([$5], , :, [$5])
3727: else
3728: ifelse([$6], , :, [$6])
3729: fi
3730: ])# AC_LIBTOOL_COMPILER_OPTION
3731:
3732:
3733: # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3734: # [ACTION-SUCCESS], [ACTION-FAILURE])
3735: # ------------------------------------------------------------
3736: # Check whether the given compiler option works
3737: AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
3738: [AC_REQUIRE([LT_AC_PROG_SED])dnl
3739: AC_CACHE_CHECK([$1], [$2],
3740: [$2=no
3741: save_LDFLAGS="$LDFLAGS"
3742: LDFLAGS="$LDFLAGS $3"
3743: echo "$lt_simple_link_test_code" > conftest.$ac_ext
3744: if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3745: # The linker can only warn and ignore the option if not recognized
3746: # So say no if there are warnings
3747: if test -s conftest.err; then
3748: # Append any errors to the config.log.
3749: cat conftest.err 1>&5
3750: $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3751: $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3752: if diff conftest.exp conftest.er2 >/dev/null; then
3753: $2=yes
3754: fi
3755: else
3756: $2=yes
3757: fi
3758: fi
3759: $rm -r conftest*
3760: LDFLAGS="$save_LDFLAGS"
3761: ])
3762:
3763: if test x"[$]$2" = xyes; then
3764: ifelse([$4], , :, [$4])
3765: else
3766: ifelse([$5], , :, [$5])
3767: fi
3768: ])# AC_LIBTOOL_LINKER_OPTION
3769:
3770:
3771: # AC_LIBTOOL_SYS_MAX_CMD_LEN
3772: # --------------------------
3773: AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
3774: [# find the maximum length of command line arguments
3775: AC_MSG_CHECKING([the maximum length of command line arguments])
3776: AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3777: i=0
3778: teststring="ABCD"
3779:
3780: case $build_os in
3781: msdosdjgpp*)
3782: # On DJGPP, this test can blow up pretty badly due to problems in libc
3783: # (any single argument exceeding 2000 bytes causes a buffer overrun
3784: # during glob expansion). Even if it were fixed, the result of this
3785: # check would be larger than it should be.
3786: lt_cv_sys_max_cmd_len=12288; # 12K is about right
3787: ;;
3788:
3789: gnu*)
3790: # Under GNU Hurd, this test is not required because there is
3791: # no limit to the length of command line arguments.
3792: # Libtool will interpret -1 as no limit whatsoever
3793: lt_cv_sys_max_cmd_len=-1;
3794: ;;
3795:
3796: cygwin* | mingw*)
3797: # On Win9x/ME, this test blows up -- it succeeds, but takes
3798: # about 5 minutes as the teststring grows exponentially.
3799: # Worse, since 9x/ME are not pre-emptively multitasking,
3800: # you end up with a "frozen" computer, even though with patience
3801: # the test eventually succeeds (with a max line length of 256k).
3802: # Instead, let's just punt: use the minimum linelength reported by
3803: # all of the supported platforms: 8192 (on NT/2K/XP).
3804: lt_cv_sys_max_cmd_len=8192;
3805: ;;
3806:
3807: amigaos*)
3808: # On AmigaOS with pdksh, this test takes hours, literally.
3809: # So we just punt and use a minimum line length of 8192.
3810: lt_cv_sys_max_cmd_len=8192;
3811: ;;
3812:
3813: netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3814: # This has been around since 386BSD, at least. Likely further.
3815: if test -x /sbin/sysctl; then
3816: lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3817: elif test -x /usr/sbin/sysctl; then
3818: lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3819: else
3820: lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3821: fi
3822: # And add a safety zone
3823: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3824: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3825: ;;
3826:
3827: interix*)
3828: # We know the value 262144 and hardcode it with a safety zone (like BSD)
3829: lt_cv_sys_max_cmd_len=196608
3830: ;;
3831:
3832: osf*)
3833: # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3834: # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3835: # nice to cause kernel panics so lets avoid the loop below.
3836: # First set a reasonable default.
3837: lt_cv_sys_max_cmd_len=16384
3838: #
3839: if test -x /sbin/sysconfig; then
3840: case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3841: *1*) lt_cv_sys_max_cmd_len=-1 ;;
3842: esac
3843: fi
3844: ;;
3845: sco3.2v5*)
3846: lt_cv_sys_max_cmd_len=102400
3847: ;;
3848: sysv5* | sco5v6* | sysv4.2uw2*)
3849: kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3850: if test -n "$kargmax"; then
3851: lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3852: else
3853: lt_cv_sys_max_cmd_len=32768
3854: fi
3855: ;;
3856: *)
3857: lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3858: if test -n "$lt_cv_sys_max_cmd_len"; then
3859: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3860: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3861: else
3862: SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3863: while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
3864: = "XX$teststring") >/dev/null 2>&1 &&
3865: new_result=`expr "X$teststring" : ".*" 2>&1` &&
3866: lt_cv_sys_max_cmd_len=$new_result &&
3867: test $i != 17 # 1/2 MB should be enough
3868: do
3869: i=`expr $i + 1`
3870: teststring=$teststring$teststring
3871: done
3872: teststring=
3873: # Add a significant safety factor because C++ compilers can tack on massive
3874: # amounts of additional arguments before passing them to the linker.
3875: # It appears as though 1/2 is a usable value.
3876: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3877: fi
3878: ;;
3879: esac
3880: ])
3881: if test -n $lt_cv_sys_max_cmd_len ; then
3882: AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3883: else
3884: AC_MSG_RESULT(none)
3885: fi
3886: ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
3887:
3888:
3889: # _LT_AC_CHECK_DLFCN
3890: # ------------------
3891: AC_DEFUN([_LT_AC_CHECK_DLFCN],
3892: [AC_CHECK_HEADERS(dlfcn.h)dnl
3893: ])# _LT_AC_CHECK_DLFCN
3894:
3895:
3896: # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3897: # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3898: # ---------------------------------------------------------------------
3899: AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
3900: [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3901: if test "$cross_compiling" = yes; then :
3902: [$4]
3903: else
3904: lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3905: lt_status=$lt_dlunknown
3906: cat > conftest.$ac_ext <<EOF
3907: [#line __oline__ "configure"
3908: #include "confdefs.h"
3909:
3910: #if HAVE_DLFCN_H
3911: #include <dlfcn.h>
3912: #endif
3913:
3914: #include <stdio.h>
3915:
3916: #ifdef RTLD_GLOBAL
3917: # define LT_DLGLOBAL RTLD_GLOBAL
3918: #else
3919: # ifdef DL_GLOBAL
3920: # define LT_DLGLOBAL DL_GLOBAL
3921: # else
3922: # define LT_DLGLOBAL 0
3923: # endif
3924: #endif
3925:
3926: /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3927: find out it does not work in some platform. */
3928: #ifndef LT_DLLAZY_OR_NOW
3929: # ifdef RTLD_LAZY
3930: # define LT_DLLAZY_OR_NOW RTLD_LAZY
3931: # else
3932: # ifdef DL_LAZY
3933: # define LT_DLLAZY_OR_NOW DL_LAZY
3934: # else
3935: # ifdef RTLD_NOW
3936: # define LT_DLLAZY_OR_NOW RTLD_NOW
3937: # else
3938: # ifdef DL_NOW
3939: # define LT_DLLAZY_OR_NOW DL_NOW
3940: # else
3941: # define LT_DLLAZY_OR_NOW 0
3942: # endif
3943: # endif
3944: # endif
3945: # endif
3946: #endif
3947:
3948: #ifdef __cplusplus
3949: extern "C" void exit (int);
3950: #endif
3951:
3952: void fnord() { int i=42;}
3953: int main ()
3954: {
3955: void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3956: int status = $lt_dlunknown;
3957:
3958: if (self)
3959: {
3960: if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3961: else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3962: /* dlclose (self); */
3963: }
3964: else
3965: puts (dlerror ());
3966:
3967: exit (status);
3968: }]
3969: EOF
3970: if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3971: (./conftest; exit; ) >&5 2>/dev/null
3972: lt_status=$?
3973: case x$lt_status in
3974: x$lt_dlno_uscore) $1 ;;
3975: x$lt_dlneed_uscore) $2 ;;
3976: x$lt_dlunknown|x*) $3 ;;
3977: esac
3978: else :
3979: # compilation failed
3980: $3
3981: fi
3982: fi
3983: rm -fr conftest*
3984: ])# _LT_AC_TRY_DLOPEN_SELF
3985:
3986:
3987: # AC_LIBTOOL_DLOPEN_SELF
3988: # ----------------------
3989: AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
3990: [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3991: if test "x$enable_dlopen" != xyes; then
3992: enable_dlopen=unknown
3993: enable_dlopen_self=unknown
3994: enable_dlopen_self_static=unknown
3995: else
3996: lt_cv_dlopen=no
3997: lt_cv_dlopen_libs=
3998:
3999: case $host_os in
4000: beos*)
4001: lt_cv_dlopen="load_add_on"
4002: lt_cv_dlopen_libs=
4003: lt_cv_dlopen_self=yes
4004: ;;
4005:
4006: mingw* | pw32*)
4007: lt_cv_dlopen="LoadLibrary"
4008: lt_cv_dlopen_libs=
4009: ;;
4010:
4011: cygwin*)
4012: lt_cv_dlopen="dlopen"
4013: lt_cv_dlopen_libs=
4014: ;;
4015:
4016: darwin*)
4017: # if libdl is installed we need to link against it
4018: AC_CHECK_LIB([dl], [dlopen],
4019: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4020: lt_cv_dlopen="dyld"
4021: lt_cv_dlopen_libs=
4022: lt_cv_dlopen_self=yes
4023: ])
4024: ;;
4025:
4026: *)
4027: AC_CHECK_FUNC([shl_load],
4028: [lt_cv_dlopen="shl_load"],
4029: [AC_CHECK_LIB([dld], [shl_load],
4030: [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4031: [AC_CHECK_FUNC([dlopen],
4032: [lt_cv_dlopen="dlopen"],
4033: [AC_CHECK_LIB([dl], [dlopen],
4034: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4035: [AC_CHECK_LIB([svld], [dlopen],
4036: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4037: [AC_CHECK_LIB([dld], [dld_link],
4038: [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4039: ])
4040: ])
4041: ])
4042: ])
4043: ])
4044: ;;
4045: esac
4046:
4047: if test "x$lt_cv_dlopen" != xno; then
4048: enable_dlopen=yes
4049: else
4050: enable_dlopen=no
4051: fi
4052:
4053: case $lt_cv_dlopen in
4054: dlopen)
4055: save_CPPFLAGS="$CPPFLAGS"
4056: test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4057:
4058: save_LDFLAGS="$LDFLAGS"
4059: wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4060:
4061: save_LIBS="$LIBS"
4062: LIBS="$lt_cv_dlopen_libs $LIBS"
4063:
4064: AC_CACHE_CHECK([whether a program can dlopen itself],
4065: lt_cv_dlopen_self, [dnl
4066: _LT_AC_TRY_DLOPEN_SELF(
4067: lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4068: lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4069: ])
4070:
4071: if test "x$lt_cv_dlopen_self" = xyes; then
4072: wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4073: AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4074: lt_cv_dlopen_self_static, [dnl
4075: _LT_AC_TRY_DLOPEN_SELF(
4076: lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4077: lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
4078: ])
4079: fi
4080:
4081: CPPFLAGS="$save_CPPFLAGS"
4082: LDFLAGS="$save_LDFLAGS"
4083: LIBS="$save_LIBS"
4084: ;;
4085: esac
4086:
4087: case $lt_cv_dlopen_self in
4088: yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4089: *) enable_dlopen_self=unknown ;;
4090: esac
4091:
4092: case $lt_cv_dlopen_self_static in
4093: yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4094: *) enable_dlopen_self_static=unknown ;;
4095: esac
4096: fi
4097: ])# AC_LIBTOOL_DLOPEN_SELF
4098:
4099:
4100: # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
4101: # ---------------------------------
4102: # Check to see if options -c and -o are simultaneously supported by compiler
4103: AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
4104: [AC_REQUIRE([LT_AC_PROG_SED])dnl
4105: AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4106: AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4107: [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4108: [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4109: $rm -r conftest 2>/dev/null
4110: mkdir conftest
4111: cd conftest
4112: mkdir out
4113: echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4114:
4115: lt_compiler_flag="-o out/conftest2.$ac_objext"
4116: # Insert the option either (1) after the last *FLAGS variable, or
4117: # (2) before a word containing "conftest.", or (3) at the end.
4118: # Note that $ac_compile itself does not contain backslashes and begins
4119: # with a dollar sign (not a hyphen), so the echo should work correctly.
4120: lt_compile=`echo "$ac_compile" | $SED \
4121: -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4122: -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4123: -e 's:$: $lt_compiler_flag:'`
4124: (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
4125: (eval "$lt_compile" 2>out/conftest.err)
4126: ac_status=$?
4127: cat out/conftest.err >&5
4128: echo "configure:__oline__: \$? = $ac_status" >&5
4129: if (exit $ac_status) && test -s out/conftest2.$ac_objext
4130: then
4131: # The compiler can only warn and ignore the option if not recognized
4132: # So say no if there are warnings
4133: $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
4134: $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4135: if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4136: _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4137: fi
4138: fi
4139: chmod u+w . 2>&5
4140: $rm conftest*
4141: # SGI C++ compiler will create directory out/ii_files/ for
4142: # template instantiation
4143: test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
4144: $rm out/* && rmdir out
4145: cd ..
4146: rmdir conftest
4147: $rm conftest*
4148: ])
4149: ])# AC_LIBTOOL_PROG_CC_C_O
4150:
4151:
4152: # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
4153: # -----------------------------------------
4154: # Check to see if we can do hard links to lock some files if needed
4155: AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
4156: [AC_REQUIRE([_LT_AC_LOCK])dnl
4157:
4158: hard_links="nottested"
4159: if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4160: # do not overwrite the value of need_locks provided by the user
4161: AC_MSG_CHECKING([if we can lock with hard links])
4162: hard_links=yes
4163: $rm conftest*
4164: ln conftest.a conftest.b 2>/dev/null && hard_links=no
4165: touch conftest.a
4166: ln conftest.a conftest.b 2>&5 || hard_links=no
4167: ln conftest.a conftest.b 2>/dev/null && hard_links=no
4168: AC_MSG_RESULT([$hard_links])
4169: if test "$hard_links" = no; then
4170: AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
4171: need_locks=warn
4172: fi
4173: else
4174: need_locks=no
4175: fi
4176: ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
4177:
4178:
4179: # AC_LIBTOOL_OBJDIR
4180: # -----------------
4181: AC_DEFUN([AC_LIBTOOL_OBJDIR],
4182: [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4183: [rm -f .libs 2>/dev/null
4184: mkdir .libs 2>/dev/null
4185: if test -d .libs; then
4186: lt_cv_objdir=.libs
4187: else
4188: # MS-DOS does not allow filenames that begin with a dot.
4189: lt_cv_objdir=_libs
4190: fi
4191: rmdir .libs 2>/dev/null])
4192: objdir=$lt_cv_objdir
4193: ])# AC_LIBTOOL_OBJDIR
4194:
4195:
4196: # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
4197: # ----------------------------------------------
4198: # Check hardcoding attributes.
4199: AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
4200: [AC_MSG_CHECKING([how to hardcode library paths into programs])
4201: _LT_AC_TAGVAR(hardcode_action, $1)=
4202: if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
4203: test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
4204: test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4205:
4206: # We can hardcode non-existant directories.
4207: if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
4208: # If the only mechanism to avoid hardcoding is shlibpath_var, we
4209: # have to relink, otherwise we might link with an installed library
4210: # when we should be linking with a yet-to-be-installed one
4211: ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4212: test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
4213: # Linking always hardcodes the temporary library directory.
4214: _LT_AC_TAGVAR(hardcode_action, $1)=relink
4215: else
4216: # We can link without hardcoding, and we can hardcode nonexisting dirs.
4217: _LT_AC_TAGVAR(hardcode_action, $1)=immediate
4218: fi
4219: else
4220: # We cannot hardcode anything, or else we can only hardcode existing
4221: # directories.
4222: _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
4223: fi
4224: AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
4225:
4226: if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
4227: # Fast installation is not supported
4228: enable_fast_install=no
4229: elif test "$shlibpath_overrides_runpath" = yes ||
4230: test "$enable_shared" = no; then
4231: # Fast installation is not necessary
4232: enable_fast_install=needless
4233: fi
4234: ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
4235:
4236:
4237: # AC_LIBTOOL_SYS_LIB_STRIP
4238: # ------------------------
4239: AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
4240: [striplib=
4241: old_striplib=
4242: AC_MSG_CHECKING([whether stripping libraries is possible])
4243: if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
4244: test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4245: test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4246: AC_MSG_RESULT([yes])
4247: else
4248: # FIXME - insert some real tests, host_os isn't really good enough
4249: case $host_os in
4250: darwin*)
4251: if test -n "$STRIP" ; then
4252: striplib="$STRIP -x"
4253: old_striplib="$STRIP -S"
4254: AC_MSG_RESULT([yes])
4255: else
4256: AC_MSG_RESULT([no])
4257: fi
4258: ;;
4259: *)
4260: AC_MSG_RESULT([no])
4261: ;;
4262: esac
4263: fi
4264: ])# AC_LIBTOOL_SYS_LIB_STRIP
4265:
4266:
4267: # AC_LIBTOOL_SYS_DYNAMIC_LINKER
4268: # -----------------------------
4269: # PORTME Fill in your ld.so characteristics
4270: AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
4271: [AC_REQUIRE([LT_AC_PROG_SED])dnl
4272: AC_MSG_CHECKING([dynamic linker characteristics])
4273: library_names_spec=
4274: libname_spec='lib$name'
4275: soname_spec=
4276: shrext_cmds=".so"
4277: postinstall_cmds=
4278: postuninstall_cmds=
4279: finish_cmds=
4280: finish_eval=
4281: shlibpath_var=
4282: shlibpath_overrides_runpath=unknown
4283: version_type=none
4284: dynamic_linker="$host_os ld.so"
4285: sys_lib_dlsearch_path_spec="/lib /usr/lib"
4286: ifelse($1,[],[
4287: if test "$GCC" = yes; then
4288: case $host_os in
4289: darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4290: *) lt_awk_arg="/^libraries:/" ;;
4291: esac
4292: lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4293: if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
4294: # if the path contains ";" then we assume it to be the separator
4295: # otherwise default to the standard path separator (i.e. ":") - it is
4296: # assumed that no part of a normal pathname contains ";" but that should
4297: # okay in the real world where ";" in dirpaths is itself problematic.
4298: lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
4299: else
4300: lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4301: fi
4302: # Ok, now we have the path, separated by spaces, we can step through it
4303: # and add multilib dir if necessary.
4304: lt_tmp_lt_search_path_spec=
4305: lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4306: for lt_sys_path in $lt_search_path_spec; do
4307: if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4308: lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4309: else
4310: test -d "$lt_sys_path" && \
4311: lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4312: fi
4313: done
4314: lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
4315: BEGIN {RS=" "; FS="/|\n";} {
4316: lt_foo="";
4317: lt_count=0;
4318: for (lt_i = NF; lt_i > 0; lt_i--) {
4319: if ($lt_i != "" && $lt_i != ".") {
4320: if ($lt_i == "..") {
4321: lt_count++;
4322: } else {
4323: if (lt_count == 0) {
4324: lt_foo="/" $lt_i lt_foo;
4325: } else {
4326: lt_count--;
4327: }
4328: }
4329: }
4330: }
4331: if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4332: if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4333: }'`
4334: sys_lib_search_path_spec=`echo $lt_search_path_spec`
4335: else
4336: sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4337: fi])
4338: need_lib_prefix=unknown
4339: hardcode_into_libs=no
4340:
4341: # when you set need_version to no, make sure it does not cause -set_version
4342: # flags to be left without arguments
4343: need_version=unknown
4344:
4345: case $host_os in
4346: aix3*)
4347: version_type=linux
4348: library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4349: shlibpath_var=LIBPATH
4350:
4351: # AIX 3 has no versioning support, so we append a major version to the name.
4352: soname_spec='${libname}${release}${shared_ext}$major'
4353: ;;
4354:
4355: aix[[4-9]]*)
4356: version_type=linux
4357: need_lib_prefix=no
4358: need_version=no
4359: hardcode_into_libs=yes
4360: if test "$host_cpu" = ia64; then
4361: # AIX 5 supports IA64
4362: library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4363: shlibpath_var=LD_LIBRARY_PATH
4364: else
4365: # With GCC up to 2.95.x, collect2 would create an import file
4366: # for dependence libraries. The import file would start with
4367: # the line `#! .'. This would cause the generated library to
4368: # depend on `.', always an invalid library. This was fixed in
4369: # development snapshots of GCC prior to 3.0.
4370: case $host_os in
4371: aix4 | aix4.[[01]] | aix4.[[01]].*)
4372: if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4373: echo ' yes '
4374: echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
4375: :
4376: else
4377: can_build_shared=no
4378: fi
4379: ;;
4380: esac
4381: # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4382: # soname into executable. Probably we can add versioning support to
4383: # collect2, so additional links can be useful in future.
4384: if test "$aix_use_runtimelinking" = yes; then
4385: # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4386: # instead of lib<name>.a to let people know that these are not
4387: # typical AIX shared libraries.
4388: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4389: else
4390: # We preserve .a as extension for shared libraries through AIX4.2
4391: # and later when we are not doing run time linking.
4392: library_names_spec='${libname}${release}.a $libname.a'
4393: soname_spec='${libname}${release}${shared_ext}$major'
4394: fi
4395: shlibpath_var=LIBPATH
4396: fi
4397: ;;
4398:
4399: amigaos*)
4400: library_names_spec='$libname.ixlibrary $libname.a'
4401: # Create ${libname}_ixlibrary.a entries in /sys/libs.
4402: 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'
4403: ;;
4404:
4405: beos*)
4406: library_names_spec='${libname}${shared_ext}'
4407: dynamic_linker="$host_os ld.so"
4408: shlibpath_var=LIBRARY_PATH
4409: ;;
4410:
4411: bsdi[[45]]*)
4412: version_type=linux
4413: need_version=no
4414: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4415: soname_spec='${libname}${release}${shared_ext}$major'
4416: finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4417: shlibpath_var=LD_LIBRARY_PATH
4418: sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4419: sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4420: # the default ld.so.conf also contains /usr/contrib/lib and
4421: # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4422: # libtool to hard-code these into programs
4423: ;;
4424:
4425: cygwin* | mingw* | pw32*)
4426: version_type=windows
4427: shrext_cmds=".dll"
4428: need_version=no
4429: need_lib_prefix=no
4430:
4431: case $GCC,$host_os in
4432: yes,cygwin* | yes,mingw* | yes,pw32*)
4433: library_names_spec='$libname.dll.a'
4434: # DLL is installed to $(libdir)/../bin by postinstall_cmds
4435: postinstall_cmds='base_file=`basename \${file}`~
4436: dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
4437: dldir=$destdir/`dirname \$dlpath`~
4438: test -d \$dldir || mkdir -p \$dldir~
4439: $install_prog $dir/$dlname \$dldir/$dlname~
4440: chmod a+x \$dldir/$dlname'
4441: postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4442: dlpath=$dir/\$dldll~
4443: $rm \$dlpath'
4444: shlibpath_overrides_runpath=yes
4445:
4446: case $host_os in
4447: cygwin*)
4448: # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4449: soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4450: sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
4451: ;;
4452: mingw*)
4453: # MinGW DLLs use traditional 'lib' prefix
4454: soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4455: sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4456: if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
4457: # It is most probably a Windows format PATH printed by
4458: # mingw gcc, but we are running on Cygwin. Gcc prints its search
4459: # path with ; separators, and with drive letters. We can handle the
4460: # drive letters (cygwin fileutils understands them), so leave them,
4461: # especially as we might pass files found there to a mingw objdump,
4462: # which wouldn't understand a cygwinified path. Ahh.
4463: sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4464: else
4465: sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4466: fi
4467: ;;
4468: pw32*)
4469: # pw32 DLLs use 'pw' prefix rather than 'lib'
4470: library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4471: ;;
4472: esac
4473: ;;
4474:
4475: *)
4476: library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4477: ;;
4478: esac
4479: dynamic_linker='Win32 ld.exe'
4480: # FIXME: first we should search . and the directory the executable is in
4481: shlibpath_var=PATH
4482: ;;
4483:
4484: darwin* | rhapsody*)
4485: dynamic_linker="$host_os dyld"
4486: version_type=darwin
4487: need_lib_prefix=no
4488: need_version=no
4489: library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4490: soname_spec='${libname}${release}${major}$shared_ext'
4491: shlibpath_overrides_runpath=yes
4492: shlibpath_var=DYLD_LIBRARY_PATH
4493: shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4494: ifelse([$1], [],[
4495: sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4496: sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4497: ;;
4498:
4499: dgux*)
4500: version_type=linux
4501: need_lib_prefix=no
4502: need_version=no
4503: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4504: soname_spec='${libname}${release}${shared_ext}$major'
4505: shlibpath_var=LD_LIBRARY_PATH
4506: ;;
4507:
1.1.1.3 ! misho 4508: freebsd1*)
1.1 misho 4509: dynamic_linker=no
4510: ;;
4511:
4512: freebsd* | dragonfly*)
4513: # DragonFly does not have aout. When/if they implement a new
4514: # versioning mechanism, adjust this.
4515: if test -x /usr/bin/objformat; then
4516: objformat=`/usr/bin/objformat`
4517: else
4518: case $host_os in
1.1.1.3 ! misho 4519: freebsd[[123]]*) objformat=aout ;;
1.1 misho 4520: *) objformat=elf ;;
4521: esac
4522: fi
4523: version_type=freebsd-$objformat
4524: case $version_type in
4525: freebsd-elf*)
4526: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4527: need_version=no
4528: need_lib_prefix=no
4529: ;;
4530: freebsd-*)
4531: library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4532: need_version=yes
4533: ;;
4534: esac
4535: shlibpath_var=LD_LIBRARY_PATH
4536: case $host_os in
4537: freebsd2*)
4538: shlibpath_overrides_runpath=yes
4539: ;;
4540: freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4541: shlibpath_overrides_runpath=yes
4542: hardcode_into_libs=yes
4543: ;;
4544: freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4545: freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4546: shlibpath_overrides_runpath=no
4547: hardcode_into_libs=yes
4548: ;;
4549: *) # from 4.6 on, and DragonFly
4550: shlibpath_overrides_runpath=yes
4551: hardcode_into_libs=yes
4552: ;;
4553: esac
4554: ;;
4555:
4556: gnu*)
4557: version_type=linux
4558: need_lib_prefix=no
4559: need_version=no
4560: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4561: soname_spec='${libname}${release}${shared_ext}$major'
4562: shlibpath_var=LD_LIBRARY_PATH
4563: hardcode_into_libs=yes
4564: ;;
4565:
4566: hpux9* | hpux10* | hpux11*)
4567: # Give a soname corresponding to the major version so that dld.sl refuses to
4568: # link against other versions.
4569: version_type=sunos
4570: need_lib_prefix=no
4571: need_version=no
4572: case $host_cpu in
4573: ia64*)
4574: shrext_cmds='.so'
4575: hardcode_into_libs=yes
4576: dynamic_linker="$host_os dld.so"
4577: shlibpath_var=LD_LIBRARY_PATH
4578: shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4579: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4580: soname_spec='${libname}${release}${shared_ext}$major'
4581: if test "X$HPUX_IA64_MODE" = X32; then
4582: sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4583: else
4584: sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4585: fi
4586: sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4587: ;;
4588: hppa*64*)
4589: shrext_cmds='.sl'
4590: hardcode_into_libs=yes
4591: dynamic_linker="$host_os dld.sl"
4592: shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4593: shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4594: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4595: soname_spec='${libname}${release}${shared_ext}$major'
4596: sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4597: sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4598: ;;
4599: *)
4600: shrext_cmds='.sl'
4601: dynamic_linker="$host_os dld.sl"
4602: shlibpath_var=SHLIB_PATH
4603: shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4604: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4605: soname_spec='${libname}${release}${shared_ext}$major'
4606: ;;
4607: esac
4608: # HP-UX runs *really* slowly unless shared libraries are mode 555.
4609: postinstall_cmds='chmod 555 $lib'
4610: ;;
4611:
4612: interix[[3-9]]*)
4613: version_type=linux
4614: need_lib_prefix=no
4615: need_version=no
4616: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4617: soname_spec='${libname}${release}${shared_ext}$major'
4618: dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4619: shlibpath_var=LD_LIBRARY_PATH
4620: shlibpath_overrides_runpath=no
4621: hardcode_into_libs=yes
4622: ;;
4623:
4624: irix5* | irix6* | nonstopux*)
4625: case $host_os in
4626: nonstopux*) version_type=nonstopux ;;
4627: *)
4628: if test "$lt_cv_prog_gnu_ld" = yes; then
4629: version_type=linux
4630: else
4631: version_type=irix
4632: fi ;;
4633: esac
4634: need_lib_prefix=no
4635: need_version=no
4636: soname_spec='${libname}${release}${shared_ext}$major'
4637: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4638: case $host_os in
4639: irix5* | nonstopux*)
4640: libsuff= shlibsuff=
4641: ;;
4642: *)
4643: case $LD in # libtool.m4 will add one of these switches to LD
4644: *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4645: libsuff= shlibsuff= libmagic=32-bit;;
4646: *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4647: libsuff=32 shlibsuff=N32 libmagic=N32;;
4648: *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4649: libsuff=64 shlibsuff=64 libmagic=64-bit;;
4650: *) libsuff= shlibsuff= libmagic=never-match;;
4651: esac
4652: ;;
4653: esac
4654: shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4655: shlibpath_overrides_runpath=no
4656: sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4657: sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4658: hardcode_into_libs=yes
4659: ;;
4660:
4661: # No shared lib support for Linux oldld, aout, or coff.
4662: linux*oldld* | linux*aout* | linux*coff*)
4663: dynamic_linker=no
4664: ;;
4665:
4666: # This must be Linux ELF.
4667: linux* | k*bsd*-gnu)
4668: version_type=linux
4669: need_lib_prefix=no
4670: need_version=no
4671: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4672: soname_spec='${libname}${release}${shared_ext}$major'
4673: finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4674: shlibpath_var=LD_LIBRARY_PATH
4675: shlibpath_overrides_runpath=no
4676: # This implies no fast_install, which is unacceptable.
4677: # Some rework will be needed to allow for fast_install
4678: # before this can be enabled.
4679: hardcode_into_libs=yes
4680:
4681: # Append ld.so.conf contents to the search path
4682: if test -f /etc/ld.so.conf; then
4683: lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
4684: sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4685: fi
4686:
4687: # We used to test for /lib/ld.so.1 and disable shared libraries on
4688: # powerpc, because MkLinux only supported shared libraries with the
4689: # GNU dynamic linker. Since this was broken with cross compilers,
4690: # most powerpc-linux boxes support dynamic linking these days and
4691: # people can always --disable-shared, the test was removed, and we
4692: # assume the GNU/Linux dynamic linker is in use.
4693: dynamic_linker='GNU/Linux ld.so'
4694: ;;
4695:
4696: netbsd*)
4697: version_type=sunos
4698: need_lib_prefix=no
4699: need_version=no
4700: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4701: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4702: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4703: dynamic_linker='NetBSD (a.out) ld.so'
4704: else
4705: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4706: soname_spec='${libname}${release}${shared_ext}$major'
4707: dynamic_linker='NetBSD ld.elf_so'
4708: fi
4709: shlibpath_var=LD_LIBRARY_PATH
4710: shlibpath_overrides_runpath=yes
4711: hardcode_into_libs=yes
4712: ;;
4713:
4714: newsos6)
4715: version_type=linux
4716: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4717: shlibpath_var=LD_LIBRARY_PATH
4718: shlibpath_overrides_runpath=yes
4719: ;;
4720:
4721: nto-qnx*)
4722: version_type=linux
4723: need_lib_prefix=no
4724: need_version=no
4725: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4726: soname_spec='${libname}${release}${shared_ext}$major'
4727: shlibpath_var=LD_LIBRARY_PATH
4728: shlibpath_overrides_runpath=yes
4729: ;;
4730:
4731: openbsd*)
4732: version_type=sunos
4733: sys_lib_dlsearch_path_spec="/usr/lib"
4734: need_lib_prefix=no
4735: # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4736: case $host_os in
4737: openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4738: *) need_version=no ;;
4739: esac
4740: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4741: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4742: shlibpath_var=LD_LIBRARY_PATH
4743: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4744: case $host_os in
4745: openbsd2.[[89]] | openbsd2.[[89]].*)
4746: shlibpath_overrides_runpath=no
4747: ;;
4748: *)
4749: shlibpath_overrides_runpath=yes
4750: ;;
4751: esac
4752: else
4753: shlibpath_overrides_runpath=yes
4754: fi
4755: ;;
4756:
4757: os2*)
4758: libname_spec='$name'
4759: shrext_cmds=".dll"
4760: need_lib_prefix=no
4761: library_names_spec='$libname${shared_ext} $libname.a'
4762: dynamic_linker='OS/2 ld.exe'
4763: shlibpath_var=LIBPATH
4764: ;;
4765:
4766: osf3* | osf4* | osf5*)
4767: version_type=osf
4768: need_lib_prefix=no
4769: need_version=no
4770: soname_spec='${libname}${release}${shared_ext}$major'
4771: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4772: shlibpath_var=LD_LIBRARY_PATH
4773: sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4774: sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4775: ;;
4776:
4777: rdos*)
4778: dynamic_linker=no
4779: ;;
4780:
4781: solaris*)
4782: version_type=linux
4783: need_lib_prefix=no
4784: need_version=no
4785: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4786: soname_spec='${libname}${release}${shared_ext}$major'
4787: shlibpath_var=LD_LIBRARY_PATH
4788: shlibpath_overrides_runpath=yes
4789: hardcode_into_libs=yes
4790: # ldd complains unless libraries are executable
4791: postinstall_cmds='chmod +x $lib'
4792: ;;
4793:
4794: sunos4*)
4795: version_type=sunos
4796: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4797: finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4798: shlibpath_var=LD_LIBRARY_PATH
4799: shlibpath_overrides_runpath=yes
4800: if test "$with_gnu_ld" = yes; then
4801: need_lib_prefix=no
4802: fi
4803: need_version=yes
4804: ;;
4805:
4806: sysv4 | sysv4.3*)
4807: version_type=linux
4808: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4809: soname_spec='${libname}${release}${shared_ext}$major'
4810: shlibpath_var=LD_LIBRARY_PATH
4811: case $host_vendor in
4812: sni)
4813: shlibpath_overrides_runpath=no
4814: need_lib_prefix=no
4815: export_dynamic_flag_spec='${wl}-Blargedynsym'
4816: runpath_var=LD_RUN_PATH
4817: ;;
4818: siemens)
4819: need_lib_prefix=no
4820: ;;
4821: motorola)
4822: need_lib_prefix=no
4823: need_version=no
4824: shlibpath_overrides_runpath=no
4825: sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4826: ;;
4827: esac
4828: ;;
4829:
4830: sysv4*MP*)
4831: if test -d /usr/nec ;then
4832: version_type=linux
4833: library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4834: soname_spec='$libname${shared_ext}.$major'
4835: shlibpath_var=LD_LIBRARY_PATH
4836: fi
4837: ;;
4838:
4839: sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4840: version_type=freebsd-elf
4841: need_lib_prefix=no
4842: need_version=no
4843: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4844: soname_spec='${libname}${release}${shared_ext}$major'
4845: shlibpath_var=LD_LIBRARY_PATH
4846: hardcode_into_libs=yes
4847: if test "$with_gnu_ld" = yes; then
4848: sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4849: shlibpath_overrides_runpath=no
4850: else
4851: sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4852: shlibpath_overrides_runpath=yes
4853: case $host_os in
4854: sco3.2v5*)
4855: sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4856: ;;
4857: esac
4858: fi
4859: sys_lib_dlsearch_path_spec='/usr/lib'
4860: ;;
4861:
4862: uts4*)
4863: version_type=linux
4864: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4865: soname_spec='${libname}${release}${shared_ext}$major'
4866: shlibpath_var=LD_LIBRARY_PATH
4867: ;;
4868:
4869: *)
4870: dynamic_linker=no
4871: ;;
4872: esac
4873: AC_MSG_RESULT([$dynamic_linker])
4874: test "$dynamic_linker" = no && can_build_shared=no
4875:
4876: AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
4877: [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
4878: sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4879: AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
4880: [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
4881: sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4882:
4883: variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4884: if test "$GCC" = yes; then
4885: variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4886: fi
4887: ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
4888:
4889:
4890: # _LT_AC_TAGCONFIG
4891: # ----------------
4892: AC_DEFUN([_LT_AC_TAGCONFIG],
4893: [AC_REQUIRE([LT_AC_PROG_SED])dnl
4894: AC_ARG_WITH([tags],
4895: [ --with-tags[=TAGS] include additional configurations [automatic]
4896: ],
4897: [tagnames="$withval"])
4898:
4899: if test -f "$ltmain" && test -n "$tagnames"; then
4900: if test ! -f "${ofile}"; then
4901: AC_MSG_WARN([output file \`$ofile' does not exist])
4902: fi
4903:
4904: if test -z "$LTCC"; then
4905: eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
4906: if test -z "$LTCC"; then
4907: AC_MSG_WARN([output file \`$ofile' does not look like a libtool script])
4908: else
4909: AC_MSG_WARN([using \`LTCC=$LTCC', extracted from \`$ofile'])
4910: fi
4911: fi
4912: if test -z "$LTCFLAGS"; then
4913: eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
4914: fi
4915:
4916: # Extract list of available tagged configurations in $ofile.
4917: # Note that this assumes the entire list is on one line.
4918: available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
4919:
4920: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4921: for tagname in $tagnames; do
4922: IFS="$lt_save_ifs"
4923: # Check whether tagname contains only valid characters
4924: case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
4925: "") ;;
4926: *) AC_MSG_ERROR([invalid tag name: $tagname])
4927: ;;
4928: esac
4929:
4930: if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
4931: then
4932: AC_MSG_ERROR([tag name \"$tagname\" already exists])
4933: fi
4934:
4935: # Update the list of available tags.
4936: if test -n "$tagname"; then
4937: echo appending configuration tag \"$tagname\" to $ofile
4938:
4939: case $tagname in
4940: CXX)
4941: if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4942: ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4943: (test "X$CXX" != "Xg++"))) ; then
4944: AC_LIBTOOL_LANG_CXX_CONFIG
4945: else
4946: tagname=""
4947: fi
4948: ;;
4949:
4950: *)
4951: AC_MSG_ERROR([Unsupported tag name: $tagname])
4952: ;;
4953: esac
4954:
4955: # Append the new tag name to the list of available tags.
4956: if test -n "$tagname" ; then
4957: available_tags="$available_tags $tagname"
4958: fi
4959: fi
4960: done
4961: IFS="$lt_save_ifs"
4962:
4963: # Now substitute the updated list of available tags.
4964: if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
4965: mv "${ofile}T" "$ofile"
4966: chmod +x "$ofile"
4967: else
4968: rm -f "${ofile}T"
4969: AC_MSG_ERROR([unable to update list of available tagged configurations.])
4970: fi
4971: fi
4972: ])# _LT_AC_TAGCONFIG
4973:
4974:
4975: # AC_LIBTOOL_DLOPEN
4976: # -----------------
4977: # enable checks for dlopen support
4978: AC_DEFUN([AC_LIBTOOL_DLOPEN],
4979: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
4980: ])# AC_LIBTOOL_DLOPEN
4981:
4982:
4983: # AC_LIBTOOL_WIN32_DLL
4984: # --------------------
4985: # declare package support for building win32 DLLs
4986: AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
4987: [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
4988: ])# AC_LIBTOOL_WIN32_DLL
4989:
4990:
4991: # AC_ENABLE_SHARED([DEFAULT])
4992: # ---------------------------
4993: # implement the --enable-shared flag
4994: # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
4995: AC_DEFUN([AC_ENABLE_SHARED],
4996: [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
4997: AC_ARG_ENABLE([shared],
4998: changequote(<<, >>)dnl
4999: << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
5000: changequote([, ])dnl
5001: [p=${PACKAGE-default}
5002: case $enableval in
5003: yes) enable_shared=yes ;;
5004: no) enable_shared=no ;;
5005: *)
5006: enable_shared=no
5007: # Look at the argument we got. We use all the common list separators.
5008: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5009: for pkg in $enableval; do
5010: IFS="$lt_save_ifs"
5011: if test "X$pkg" = "X$p"; then
5012: enable_shared=yes
5013: fi
5014: done
5015: IFS="$lt_save_ifs"
5016: ;;
5017: esac],
5018: [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
5019: ])# AC_ENABLE_SHARED
5020:
5021:
5022: # AC_DISABLE_SHARED
5023: # -----------------
5024: # set the default shared flag to --disable-shared
5025: AC_DEFUN([AC_DISABLE_SHARED],
5026: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5027: AC_ENABLE_SHARED(no)
5028: ])# AC_DISABLE_SHARED
5029:
5030:
5031: # AC_ENABLE_STATIC([DEFAULT])
5032: # ---------------------------
5033: # implement the --enable-static flag
5034: # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
5035: AC_DEFUN([AC_ENABLE_STATIC],
5036: [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
5037: AC_ARG_ENABLE([static],
5038: changequote(<<, >>)dnl
5039: << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
5040: changequote([, ])dnl
5041: [p=${PACKAGE-default}
5042: case $enableval in
5043: yes) enable_static=yes ;;
5044: no) enable_static=no ;;
5045: *)
5046: enable_static=no
5047: # Look at the argument we got. We use all the common list separators.
5048: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5049: for pkg in $enableval; do
5050: IFS="$lt_save_ifs"
5051: if test "X$pkg" = "X$p"; then
5052: enable_static=yes
5053: fi
5054: done
5055: IFS="$lt_save_ifs"
5056: ;;
5057: esac],
5058: [enable_static=]AC_ENABLE_STATIC_DEFAULT)
5059: ])# AC_ENABLE_STATIC
5060:
5061:
5062: # AC_DISABLE_STATIC
5063: # -----------------
5064: # set the default static flag to --disable-static
5065: AC_DEFUN([AC_DISABLE_STATIC],
5066: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5067: AC_ENABLE_STATIC(no)
5068: ])# AC_DISABLE_STATIC
5069:
5070:
5071: # AC_ENABLE_FAST_INSTALL([DEFAULT])
5072: # ---------------------------------
5073: # implement the --enable-fast-install flag
5074: # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
5075: AC_DEFUN([AC_ENABLE_FAST_INSTALL],
5076: [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
5077: AC_ARG_ENABLE([fast-install],
5078: changequote(<<, >>)dnl
5079: << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
5080: changequote([, ])dnl
5081: [p=${PACKAGE-default}
5082: case $enableval in
5083: yes) enable_fast_install=yes ;;
5084: no) enable_fast_install=no ;;
5085: *)
5086: enable_fast_install=no
5087: # Look at the argument we got. We use all the common list separators.
5088: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5089: for pkg in $enableval; do
5090: IFS="$lt_save_ifs"
5091: if test "X$pkg" = "X$p"; then
5092: enable_fast_install=yes
5093: fi
5094: done
5095: IFS="$lt_save_ifs"
5096: ;;
5097: esac],
5098: [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
5099: ])# AC_ENABLE_FAST_INSTALL
5100:
5101:
5102: # AC_DISABLE_FAST_INSTALL
5103: # -----------------------
5104: # set the default to --disable-fast-install
5105: AC_DEFUN([AC_DISABLE_FAST_INSTALL],
5106: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5107: AC_ENABLE_FAST_INSTALL(no)
5108: ])# AC_DISABLE_FAST_INSTALL
5109:
5110:
5111: # AC_LIBTOOL_PICMODE([MODE])
5112: # --------------------------
5113: # implement the --with-pic flag
5114: # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
5115: AC_DEFUN([AC_LIBTOOL_PICMODE],
5116: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5117: pic_mode=ifelse($#,1,$1,default)
5118: ])# AC_LIBTOOL_PICMODE
5119:
5120:
5121: # AC_PROG_EGREP
5122: # -------------
5123: ifdef([AC_PROG_EGREP], [], [AC_DEFUN([AC_PROG_EGREP],
5124: [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
5125: [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5126: then ac_cv_prog_egrep='grep -E'
5127: else ac_cv_prog_egrep='egrep'
5128: fi])
5129: EGREP=$ac_cv_prog_egrep
5130: AC_SUBST([EGREP])
5131: ])])
5132:
5133:
5134: # AC_PATH_TOOL_PREFIX
5135: # -------------------
5136: # find a file program which can recognize shared library
5137: AC_DEFUN([AC_PATH_TOOL_PREFIX],
5138: [AC_REQUIRE([AC_PROG_EGREP])dnl
5139: AC_MSG_CHECKING([for $1])
5140: AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5141: [case $MAGIC_CMD in
5142: [[\\/*] | ?:[\\/]*])
5143: lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5144: ;;
5145: *)
5146: lt_save_MAGIC_CMD="$MAGIC_CMD"
5147: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5148: dnl $ac_dummy forces splitting on constant user-supplied paths.
5149: dnl POSIX.2 word splitting is done only on the output of word expansions,
5150: dnl not every word. This closes a longstanding sh security hole.
5151: ac_dummy="ifelse([$2], , $PATH, [$2])"
5152: for ac_dir in $ac_dummy; do
5153: IFS="$lt_save_ifs"
5154: test -z "$ac_dir" && ac_dir=.
5155: if test -f $ac_dir/$1; then
5156: lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5157: if test -n "$file_magic_test_file"; then
5158: case $deplibs_check_method in
5159: "file_magic "*)
5160: file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5161: MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5162: if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5163: $EGREP "$file_magic_regex" > /dev/null; then
5164: :
5165: else
5166: cat <<EOF 1>&2
5167:
5168: *** Warning: the command libtool uses to detect shared libraries,
5169: *** $file_magic_cmd, produces output that libtool cannot recognize.
5170: *** The result is that libtool may fail to recognize shared libraries
5171: *** as such. This will affect the creation of libtool libraries that
5172: *** depend on shared libraries, but programs linked with such libtool
5173: *** libraries will work regardless of this problem. Nevertheless, you
5174: *** may want to report the problem to your system manager and/or to
5175: *** bug-libtool@gnu.org
5176:
5177: EOF
5178: fi ;;
5179: esac
5180: fi
5181: break
5182: fi
5183: done
5184: IFS="$lt_save_ifs"
5185: MAGIC_CMD="$lt_save_MAGIC_CMD"
5186: ;;
5187: esac])
5188: MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5189: if test -n "$MAGIC_CMD"; then
5190: AC_MSG_RESULT($MAGIC_CMD)
5191: else
5192: AC_MSG_RESULT(no)
5193: fi
5194: ])# AC_PATH_TOOL_PREFIX
5195:
5196:
5197: # AC_PATH_MAGIC
5198: # -------------
5199: # find a file program which can recognize a shared library
5200: AC_DEFUN([AC_PATH_MAGIC],
5201: [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5202: if test -z "$lt_cv_path_MAGIC_CMD"; then
5203: if test -n "$ac_tool_prefix"; then
5204: AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5205: else
5206: MAGIC_CMD=:
5207: fi
5208: fi
5209: ])# AC_PATH_MAGIC
5210:
5211:
5212: # AC_PROG_LD
5213: # ----------
5214: # find the pathname to the GNU or non-GNU linker
5215: AC_DEFUN([AC_PROG_LD],
5216: [AC_ARG_WITH([gnu-ld],
5217: [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
5218: [test "$withval" = no || with_gnu_ld=yes],
5219: [with_gnu_ld=no])
5220: AC_REQUIRE([LT_AC_PROG_SED])dnl
5221: AC_REQUIRE([AC_PROG_CC])dnl
5222: AC_REQUIRE([AC_CANONICAL_HOST])dnl
5223: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5224: ac_prog=ld
5225: if test "$GCC" = yes; then
5226: # Check if gcc -print-prog-name=ld gives a path.
5227: AC_MSG_CHECKING([for ld used by $CC])
5228: case $host in
5229: *-*-mingw*)
5230: # gcc leaves a trailing carriage return which upsets mingw
5231: ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5232: *)
5233: ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5234: esac
5235: case $ac_prog in
5236: # Accept absolute paths.
5237: [[\\/]]* | ?:[[\\/]]*)
5238: re_direlt='/[[^/]][[^/]]*/\.\./'
5239: # Canonicalize the pathname of ld
5240: ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5241: while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5242: ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5243: done
5244: test -z "$LD" && LD="$ac_prog"
5245: ;;
5246: "")
5247: # If it fails, then pretend we aren't using GCC.
5248: ac_prog=ld
5249: ;;
5250: *)
5251: # If it is relative, then search for the first ld in PATH.
5252: with_gnu_ld=unknown
5253: ;;
5254: esac
5255: elif test "$with_gnu_ld" = yes; then
5256: AC_MSG_CHECKING([for GNU ld])
5257: else
5258: AC_MSG_CHECKING([for non-GNU ld])
5259: fi
5260: AC_CACHE_VAL(lt_cv_path_LD,
5261: [if test -z "$LD"; then
5262: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5263: for ac_dir in $PATH; do
5264: IFS="$lt_save_ifs"
5265: test -z "$ac_dir" && ac_dir=.
5266: if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5267: lt_cv_path_LD="$ac_dir/$ac_prog"
5268: # Check to see if the program is GNU ld. I'd rather use --version,
5269: # but apparently some variants of GNU ld only accept -v.
5270: # Break only if it was the GNU/non-GNU ld that we prefer.
5271: case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5272: *GNU* | *'with BFD'*)
5273: test "$with_gnu_ld" != no && break
5274: ;;
5275: *)
5276: test "$with_gnu_ld" != yes && break
5277: ;;
5278: esac
5279: fi
5280: done
5281: IFS="$lt_save_ifs"
5282: else
5283: lt_cv_path_LD="$LD" # Let the user override the test with a path.
5284: fi])
5285: LD="$lt_cv_path_LD"
5286: if test -n "$LD"; then
5287: AC_MSG_RESULT($LD)
5288: else
5289: AC_MSG_RESULT(no)
5290: fi
5291: test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5292: AC_PROG_LD_GNU
5293: ])# AC_PROG_LD
5294:
5295:
5296: # AC_PROG_LD_GNU
5297: # --------------
5298: AC_DEFUN([AC_PROG_LD_GNU],
5299: [AC_REQUIRE([AC_PROG_EGREP])dnl
5300: AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5301: [# I'd rather use --version here, but apparently some GNU lds only accept -v.
5302: case `$LD -v 2>&1 </dev/null` in
5303: *GNU* | *'with BFD'*)
5304: lt_cv_prog_gnu_ld=yes
5305: ;;
5306: *)
5307: lt_cv_prog_gnu_ld=no
5308: ;;
5309: esac])
5310: with_gnu_ld=$lt_cv_prog_gnu_ld
5311: ])# AC_PROG_LD_GNU
5312:
5313:
5314: # AC_PROG_LD_RELOAD_FLAG
5315: # ----------------------
5316: # find reload flag for linker
5317: # -- PORTME Some linkers may need a different reload flag.
5318: AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
5319: [AC_CACHE_CHECK([for $LD option to reload object files],
5320: lt_cv_ld_reload_flag,
5321: [lt_cv_ld_reload_flag='-r'])
5322: reload_flag=$lt_cv_ld_reload_flag
5323: case $reload_flag in
5324: "" | " "*) ;;
5325: *) reload_flag=" $reload_flag" ;;
5326: esac
5327: reload_cmds='$LD$reload_flag -o $output$reload_objs'
5328: case $host_os in
5329: darwin*)
5330: if test "$GCC" = yes; then
5331: reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5332: else
5333: reload_cmds='$LD$reload_flag -o $output$reload_objs'
5334: fi
5335: ;;
5336: esac
5337: ])# AC_PROG_LD_RELOAD_FLAG
5338:
5339:
5340: # AC_DEPLIBS_CHECK_METHOD
5341: # -----------------------
5342: # how to check for library dependencies
5343: # -- PORTME fill in with the dynamic library characteristics
5344: AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
5345: [AC_CACHE_CHECK([how to recognize dependent libraries],
5346: lt_cv_deplibs_check_method,
5347: [lt_cv_file_magic_cmd='$MAGIC_CMD'
5348: lt_cv_file_magic_test_file=
5349: lt_cv_deplibs_check_method='unknown'
5350: # Need to set the preceding variable on all platforms that support
5351: # interlibrary dependencies.
5352: # 'none' -- dependencies not supported.
5353: # `unknown' -- same as none, but documents that we really don't know.
5354: # 'pass_all' -- all dependencies passed with no checks.
5355: # 'test_compile' -- check by making test program.
5356: # 'file_magic [[regex]]' -- check by looking for files in library path
5357: # which responds to the $file_magic_cmd with a given extended regex.
5358: # If you have `file' or equivalent on your system and you're not sure
5359: # whether `pass_all' will *always* work, you probably want this one.
5360:
5361: case $host_os in
5362: aix[[4-9]]*)
5363: lt_cv_deplibs_check_method=pass_all
5364: ;;
5365:
5366: beos*)
5367: lt_cv_deplibs_check_method=pass_all
5368: ;;
5369:
5370: bsdi[[45]]*)
5371: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5372: lt_cv_file_magic_cmd='/usr/bin/file -L'
5373: lt_cv_file_magic_test_file=/shlib/libc.so
5374: ;;
5375:
5376: cygwin*)
5377: # func_win32_libid is a shell function defined in ltmain.sh
5378: lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5379: lt_cv_file_magic_cmd='func_win32_libid'
5380: ;;
5381:
5382: mingw* | pw32*)
5383: # Base MSYS/MinGW do not provide the 'file' command needed by
5384: # func_win32_libid shell function, so use a weaker test based on 'objdump',
5385: # unless we find 'file', for example because we are cross-compiling.
5386: if ( file / ) >/dev/null 2>&1; then
5387: lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5388: lt_cv_file_magic_cmd='func_win32_libid'
5389: else
5390: lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5391: lt_cv_file_magic_cmd='$OBJDUMP -f'
5392: fi
5393: ;;
5394:
5395: darwin* | rhapsody*)
5396: lt_cv_deplibs_check_method=pass_all
5397: ;;
5398:
5399: freebsd* | dragonfly*)
5400: if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5401: case $host_cpu in
5402: i*86 )
5403: # Not sure whether the presence of OpenBSD here was a mistake.
5404: # Let's accept both of them until this is cleared up.
5405: lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5406: lt_cv_file_magic_cmd=/usr/bin/file
5407: lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5408: ;;
5409: esac
5410: else
5411: lt_cv_deplibs_check_method=pass_all
5412: fi
5413: ;;
5414:
5415: gnu*)
5416: lt_cv_deplibs_check_method=pass_all
5417: ;;
5418:
5419: hpux10.20* | hpux11*)
5420: lt_cv_file_magic_cmd=/usr/bin/file
5421: case $host_cpu in
5422: ia64*)
5423: lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5424: lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5425: ;;
5426: hppa*64*)
5427: [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]']
5428: lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5429: ;;
5430: *)
5431: lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
5432: lt_cv_file_magic_test_file=/usr/lib/libc.sl
5433: ;;
5434: esac
5435: ;;
5436:
5437: interix[[3-9]]*)
5438: # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5439: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5440: ;;
5441:
5442: irix5* | irix6* | nonstopux*)
5443: case $LD in
5444: *-32|*"-32 ") libmagic=32-bit;;
5445: *-n32|*"-n32 ") libmagic=N32;;
5446: *-64|*"-64 ") libmagic=64-bit;;
5447: *) libmagic=never-match;;
5448: esac
5449: lt_cv_deplibs_check_method=pass_all
5450: ;;
5451:
5452: # This must be Linux ELF.
5453: linux* | k*bsd*-gnu)
5454: lt_cv_deplibs_check_method=pass_all
5455: ;;
5456:
5457: netbsd*)
5458: if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5459: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5460: else
5461: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5462: fi
5463: ;;
5464:
5465: newos6*)
5466: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5467: lt_cv_file_magic_cmd=/usr/bin/file
5468: lt_cv_file_magic_test_file=/usr/lib/libnls.so
5469: ;;
5470:
5471: nto-qnx*)
5472: lt_cv_deplibs_check_method=unknown
5473: ;;
5474:
5475: openbsd*)
5476: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5477: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5478: else
5479: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5480: fi
5481: ;;
5482:
5483: osf3* | osf4* | osf5*)
5484: lt_cv_deplibs_check_method=pass_all
5485: ;;
5486:
5487: rdos*)
5488: lt_cv_deplibs_check_method=pass_all
5489: ;;
5490:
5491: solaris*)
5492: lt_cv_deplibs_check_method=pass_all
5493: ;;
5494:
5495: sysv4 | sysv4.3*)
5496: case $host_vendor in
5497: motorola)
5498: 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]]'
5499: lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5500: ;;
5501: ncr)
5502: lt_cv_deplibs_check_method=pass_all
5503: ;;
5504: sequent)
5505: lt_cv_file_magic_cmd='/bin/file'
5506: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5507: ;;
5508: sni)
5509: lt_cv_file_magic_cmd='/bin/file'
5510: lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5511: lt_cv_file_magic_test_file=/lib/libc.so
5512: ;;
5513: siemens)
5514: lt_cv_deplibs_check_method=pass_all
5515: ;;
5516: pc)
5517: lt_cv_deplibs_check_method=pass_all
5518: ;;
5519: esac
5520: ;;
5521:
5522: sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5523: lt_cv_deplibs_check_method=pass_all
5524: ;;
5525: esac
5526: ])
5527: file_magic_cmd=$lt_cv_file_magic_cmd
5528: deplibs_check_method=$lt_cv_deplibs_check_method
5529: test -z "$deplibs_check_method" && deplibs_check_method=unknown
5530: ])# AC_DEPLIBS_CHECK_METHOD
5531:
5532:
5533: # AC_PROG_NM
5534: # ----------
5535: # find the pathname to a BSD-compatible name lister
5536: AC_DEFUN([AC_PROG_NM],
5537: [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
5538: [if test -n "$NM"; then
5539: # Let the user override the test.
5540: lt_cv_path_NM="$NM"
5541: else
5542: lt_nm_to_check="${ac_tool_prefix}nm"
5543: if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5544: lt_nm_to_check="$lt_nm_to_check nm"
5545: fi
5546: for lt_tmp_nm in $lt_nm_to_check; do
5547: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5548: for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5549: IFS="$lt_save_ifs"
5550: test -z "$ac_dir" && ac_dir=.
5551: tmp_nm="$ac_dir/$lt_tmp_nm"
5552: if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5553: # Check to see if the nm accepts a BSD-compat flag.
5554: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5555: # nm: unknown option "B" ignored
5556: # Tru64's nm complains that /dev/null is an invalid object file
5557: case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5558: */dev/null* | *'Invalid file or object type'*)
5559: lt_cv_path_NM="$tmp_nm -B"
5560: break
5561: ;;
5562: *)
5563: case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5564: */dev/null*)
5565: lt_cv_path_NM="$tmp_nm -p"
5566: break
5567: ;;
5568: *)
5569: lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5570: continue # so that we can try to find one that supports BSD flags
5571: ;;
5572: esac
5573: ;;
5574: esac
5575: fi
5576: done
5577: IFS="$lt_save_ifs"
5578: done
5579: test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5580: fi])
5581: NM="$lt_cv_path_NM"
5582: ])# AC_PROG_NM
5583:
5584:
5585: # AC_CHECK_LIBM
5586: # -------------
5587: # check for math library
5588: AC_DEFUN([AC_CHECK_LIBM],
5589: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5590: LIBM=
5591: case $host in
5592: *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
5593: # These system don't have libm, or don't need it
5594: ;;
5595: *-ncr-sysv4.3*)
5596: AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5597: AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5598: ;;
5599: *)
5600: AC_CHECK_LIB(m, cos, LIBM="-lm")
5601: ;;
5602: esac
5603: ])# AC_CHECK_LIBM
5604:
5605:
5606: # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
5607: # -----------------------------------
5608: # sets LIBLTDL to the link flags for the libltdl convenience library and
5609: # LTDLINCL to the include flags for the libltdl header and adds
5610: # --enable-ltdl-convenience to the configure arguments. Note that
5611: # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
5612: # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
5613: # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
5614: # (note the single quotes!). If your package is not flat and you're not
5615: # using automake, define top_builddir and top_srcdir appropriately in
5616: # the Makefiles.
5617: AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
5618: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5619: case $enable_ltdl_convenience in
5620: no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
5621: "") enable_ltdl_convenience=yes
5622: ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
5623: esac
5624: LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
5625: LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5626: # For backwards non-gettext consistent compatibility...
5627: INCLTDL="$LTDLINCL"
5628: ])# AC_LIBLTDL_CONVENIENCE
5629:
5630:
5631: # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
5632: # -----------------------------------
5633: # sets LIBLTDL to the link flags for the libltdl installable library and
5634: # LTDLINCL to the include flags for the libltdl header and adds
5635: # --enable-ltdl-install to the configure arguments. Note that
5636: # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
5637: # and an installed libltdl is not found, it is assumed to be `libltdl'.
5638: # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
5639: # '${top_srcdir}/' (note the single quotes!). If your package is not
5640: # flat and you're not using automake, define top_builddir and top_srcdir
5641: # appropriately in the Makefiles.
5642: # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
5643: AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
5644: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5645: AC_CHECK_LIB(ltdl, lt_dlinit,
5646: [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
5647: [if test x"$enable_ltdl_install" = xno; then
5648: AC_MSG_WARN([libltdl not installed, but installation disabled])
5649: else
5650: enable_ltdl_install=yes
5651: fi
5652: ])
5653: if test x"$enable_ltdl_install" = x"yes"; then
5654: ac_configure_args="$ac_configure_args --enable-ltdl-install"
5655: LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
5656: LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5657: else
5658: ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
5659: LIBLTDL="-lltdl"
5660: LTDLINCL=
5661: fi
5662: # For backwards non-gettext consistent compatibility...
5663: INCLTDL="$LTDLINCL"
5664: ])# AC_LIBLTDL_INSTALLABLE
5665:
5666:
5667: # AC_LIBTOOL_CXX
5668: # --------------
5669: # enable support for C++ libraries
5670: AC_DEFUN([AC_LIBTOOL_CXX],
5671: [AC_REQUIRE([_LT_AC_LANG_CXX])
5672: ])# AC_LIBTOOL_CXX
5673:
5674:
5675: # _LT_AC_LANG_CXX
5676: # ---------------
5677: AC_DEFUN([_LT_AC_LANG_CXX],
5678: [AC_REQUIRE([AC_PROG_CXX])
5679: AC_REQUIRE([_LT_AC_PROG_CXXCPP])
5680: _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
5681: ])# _LT_AC_LANG_CXX
5682:
5683: # _LT_AC_PROG_CXXCPP
5684: # ------------------
5685: AC_DEFUN([_LT_AC_PROG_CXXCPP],
5686: [
5687: AC_REQUIRE([AC_PROG_CXX])
5688: if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5689: ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5690: (test "X$CXX" != "Xg++"))) ; then
5691: AC_PROG_CXXCPP
5692: fi
5693: ])# _LT_AC_PROG_CXXCPP
5694:
5695: # AC_LIBTOOL_LANG_C_CONFIG
5696: # ------------------------
5697: # Ensure that the configuration vars for the C compiler are
5698: # suitably defined. Those variables are subsequently used by
5699: # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5700: AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
5701: AC_DEFUN([_LT_AC_LANG_C_CONFIG],
5702: [lt_save_CC="$CC"
5703: AC_LANG_SAVE
5704: AC_LANG_C
5705:
5706: # Source file extension for C test sources.
5707: ac_ext=c
5708:
5709: # Object file extension for compiled C test sources.
5710: objext=o
5711: _LT_AC_TAGVAR(objext, $1)=$objext
5712:
5713: # Code to be used in simple compile tests
5714: lt_simple_compile_test_code="int some_variable = 0;"
5715:
5716: # Code to be used in simple link tests
5717: lt_simple_link_test_code='int main(){return(0);}'
5718:
5719: _LT_AC_SYS_COMPILER
5720:
5721: # save warnings/boilerplate of simple test code
5722: _LT_COMPILER_BOILERPLATE
5723: _LT_LINKER_BOILERPLATE
5724:
5725: ## CAVEAT EMPTOR:
5726: ## There is no encapsulation within the following macros, do not change
5727: ## the running order or otherwise move them around unless you know exactly
5728: ## what you are doing...
5729: AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5730: AC_LIBTOOL_PROG_COMPILER_PIC($1)
5731: AC_LIBTOOL_PROG_CC_C_O($1)
5732: AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5733: AC_LIBTOOL_PROG_LD_SHLIBS($1)
5734: AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5735: AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5736: AC_LIBTOOL_SYS_LIB_STRIP
5737: AC_LIBTOOL_DLOPEN_SELF
5738:
5739: # Report which library types will actually be built
5740: AC_MSG_CHECKING([if libtool supports shared libraries])
5741: AC_MSG_RESULT([$can_build_shared])
5742:
5743: AC_MSG_CHECKING([whether to build shared libraries])
5744: test "$can_build_shared" = "no" && enable_shared=no
5745:
5746: # On AIX, shared libraries and static libraries use the same namespace, and
5747: # are all built from PIC.
5748: case $host_os in
5749: aix3*)
5750: test "$enable_shared" = yes && enable_static=no
5751: if test -n "$RANLIB"; then
5752: archive_cmds="$archive_cmds~\$RANLIB \$lib"
5753: postinstall_cmds='$RANLIB $lib'
5754: fi
5755: ;;
5756:
5757: aix[[4-9]]*)
5758: if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5759: test "$enable_shared" = yes && enable_static=no
5760: fi
5761: ;;
5762: esac
5763: AC_MSG_RESULT([$enable_shared])
5764:
5765: AC_MSG_CHECKING([whether to build static libraries])
5766: # Make sure either enable_shared or enable_static is yes.
5767: test "$enable_shared" = yes || enable_static=yes
5768: AC_MSG_RESULT([$enable_static])
5769:
5770: AC_LIBTOOL_CONFIG($1)
5771:
5772: AC_LANG_RESTORE
5773: CC="$lt_save_CC"
5774: ])# AC_LIBTOOL_LANG_C_CONFIG
5775:
5776:
5777: # AC_LIBTOOL_LANG_CXX_CONFIG
5778: # --------------------------
5779: # Ensure that the configuration vars for the C compiler are
5780: # suitably defined. Those variables are subsequently used by
5781: # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5782: AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
5783: AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
5784: [AC_LANG_SAVE
5785: AC_LANG_CPLUSPLUS
5786: AC_REQUIRE([AC_PROG_CXX])
5787: AC_REQUIRE([_LT_AC_PROG_CXXCPP])
5788:
5789: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5790: _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5791: _LT_AC_TAGVAR(always_export_symbols, $1)=no
5792: _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5793: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5794: _LT_AC_TAGVAR(hardcode_direct, $1)=no
5795: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5796: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5797: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5798: _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5799: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5800: _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5801: _LT_AC_TAGVAR(module_cmds, $1)=
5802: _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5803: _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5804: _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5805: _LT_AC_TAGVAR(no_undefined_flag, $1)=
5806: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5807: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5808:
5809: # Dependencies to place before and after the object being linked:
5810: _LT_AC_TAGVAR(predep_objects, $1)=
5811: _LT_AC_TAGVAR(postdep_objects, $1)=
5812: _LT_AC_TAGVAR(predeps, $1)=
5813: _LT_AC_TAGVAR(postdeps, $1)=
5814: _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
5815: _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
5816:
5817: # Source file extension for C++ test sources.
5818: ac_ext=cpp
5819:
5820: # Object file extension for compiled C++ test sources.
5821: objext=o
5822: _LT_AC_TAGVAR(objext, $1)=$objext
5823:
5824: # Code to be used in simple compile tests
5825: lt_simple_compile_test_code="int some_variable = 0;"
5826:
5827: # Code to be used in simple link tests
5828: lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5829:
5830: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5831: _LT_AC_SYS_COMPILER
5832:
5833: # save warnings/boilerplate of simple test code
5834: _LT_COMPILER_BOILERPLATE
5835: _LT_LINKER_BOILERPLATE
5836:
5837: # Allow CC to be a program name with arguments.
5838: lt_save_CC=$CC
5839: lt_save_LD=$LD
5840: lt_save_GCC=$GCC
5841: GCC=$GXX
5842: lt_save_with_gnu_ld=$with_gnu_ld
5843: lt_save_path_LD=$lt_cv_path_LD
5844: if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5845: lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5846: else
5847: unset lt_cv_prog_gnu_ld
5848: fi
5849: if test -n "${lt_cv_path_LDCXX+set}"; then
5850: lt_cv_path_LD=$lt_cv_path_LDCXX
5851: else
5852: unset lt_cv_path_LD
5853: fi
5854: test -z "${LDCXX+set}" || LD=$LDCXX
5855: CC=${CXX-"c++"}
5856: compiler=$CC
5857: _LT_AC_TAGVAR(compiler, $1)=$CC
5858: _LT_CC_BASENAME([$compiler])
5859:
5860: # We don't want -fno-exception wen compiling C++ code, so set the
5861: # no_builtin_flag separately
5862: if test "$GXX" = yes; then
5863: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5864: else
5865: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5866: fi
5867:
5868: if test "$GXX" = yes; then
5869: # Set up default GNU C++ configuration
5870:
5871: AC_PROG_LD
5872:
5873: # Check if GNU C++ uses GNU ld as the underlying linker, since the
5874: # archiving commands below assume that GNU ld is being used.
5875: if test "$with_gnu_ld" = yes; then
5876: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5877: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5878:
5879: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5880: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5881:
5882: # If archive_cmds runs LD, not CC, wlarc should be empty
5883: # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5884: # investigate it a little bit more. (MM)
5885: wlarc='${wl}'
5886:
5887: # ancient GNU ld didn't support --whole-archive et. al.
5888: if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
5889: grep 'no-whole-archive' > /dev/null; then
5890: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5891: else
5892: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5893: fi
5894: else
5895: with_gnu_ld=no
5896: wlarc=
5897:
5898: # A generic and very simple default shared library creation
5899: # command for GNU C++ for the case where it uses the native
5900: # linker, instead of GNU ld. If possible, this setting should
5901: # overridden to take advantage of the native linker features on
5902: # the platform it is being used on.
5903: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5904: fi
5905:
5906: # Commands to make compiler produce verbose output that lists
5907: # what "hidden" libraries, object files and flags are used when
5908: # linking a shared library.
5909: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5910:
5911: else
5912: GXX=no
5913: with_gnu_ld=no
5914: wlarc=
5915: fi
5916:
5917: # PORTME: fill in a description of your system's C++ link characteristics
5918: AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5919: _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5920: case $host_os in
5921: aix3*)
5922: # FIXME: insert proper C++ library support
5923: _LT_AC_TAGVAR(ld_shlibs, $1)=no
5924: ;;
5925: aix[[4-9]]*)
5926: if test "$host_cpu" = ia64; then
5927: # On IA64, the linker does run time linking by default, so we don't
5928: # have to do anything special.
5929: aix_use_runtimelinking=no
5930: exp_sym_flag='-Bexport'
5931: no_entry_flag=""
5932: else
5933: aix_use_runtimelinking=no
5934:
5935: # Test if we are trying to use run time linking or normal
5936: # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5937: # need to do runtime linking.
5938: case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5939: for ld_flag in $LDFLAGS; do
5940: case $ld_flag in
5941: *-brtl*)
5942: aix_use_runtimelinking=yes
5943: break
5944: ;;
5945: esac
5946: done
5947: ;;
5948: esac
5949:
5950: exp_sym_flag='-bexport'
5951: no_entry_flag='-bnoentry'
5952: fi
5953:
5954: # When large executables or shared objects are built, AIX ld can
5955: # have problems creating the table of contents. If linking a library
5956: # or program results in "error TOC overflow" add -mminimal-toc to
5957: # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5958: # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5959:
5960: _LT_AC_TAGVAR(archive_cmds, $1)=''
5961: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5962: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5963: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5964:
5965: if test "$GXX" = yes; then
5966: case $host_os in aix4.[[012]]|aix4.[[012]].*)
5967: # We only want to do this on AIX 4.2 and lower, the check
5968: # below for broken collect2 doesn't work under 4.3+
5969: collect2name=`${CC} -print-prog-name=collect2`
5970: if test -f "$collect2name" && \
5971: strings "$collect2name" | grep resolve_lib_name >/dev/null
5972: then
5973: # We have reworked collect2
5974: :
5975: else
5976: # We have old collect2
5977: _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5978: # It fails to find uninstalled libraries when the uninstalled
5979: # path is not listed in the libpath. Setting hardcode_minus_L
5980: # to unsupported forces relinking
5981: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5982: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5983: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5984: fi
5985: ;;
5986: esac
5987: shared_flag='-shared'
5988: if test "$aix_use_runtimelinking" = yes; then
5989: shared_flag="$shared_flag "'${wl}-G'
5990: fi
5991: else
5992: # not using gcc
5993: if test "$host_cpu" = ia64; then
5994: # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5995: # chokes on -Wl,-G. The following line is correct:
5996: shared_flag='-G'
5997: else
5998: if test "$aix_use_runtimelinking" = yes; then
5999: shared_flag='${wl}-G'
6000: else
6001: shared_flag='${wl}-bM:SRE'
6002: fi
6003: fi
6004: fi
6005:
6006: # It seems that -bexpall does not export symbols beginning with
6007: # underscore (_), so it is better to generate a list of symbols to export.
6008: _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6009: if test "$aix_use_runtimelinking" = yes; then
6010: # Warning - without using the other runtime loading flags (-brtl),
6011: # -berok will link without error, but may produce a broken library.
6012: _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6013: # Determine the default libpath from the value encoded in an empty executable.
6014: _LT_AC_SYS_LIBPATH_AIX
6015: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6016:
6017: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6018: else
6019: if test "$host_cpu" = ia64; then
6020: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6021: _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6022: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6023: else
6024: # Determine the default libpath from the value encoded in an empty executable.
6025: _LT_AC_SYS_LIBPATH_AIX
6026: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6027: # Warning - without using the other run time loading flags,
6028: # -berok will link without error, but may produce a broken library.
6029: _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6030: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6031: # Exported symbols can be pulled into shared objects from archives
6032: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6033: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6034: # This is similar to how AIX traditionally builds its shared libraries.
6035: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6036: fi
6037: fi
6038: ;;
6039:
6040: beos*)
6041: if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6042: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6043: # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6044: # support --undefined. This deserves some investigation. FIXME
6045: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6046: else
6047: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6048: fi
6049: ;;
6050:
6051: chorus*)
6052: case $cc_basename in
6053: *)
6054: # FIXME: insert proper C++ library support
6055: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6056: ;;
6057: esac
6058: ;;
6059:
6060: cygwin* | mingw* | pw32*)
6061: # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6062: # as there is no search path for DLLs.
6063: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6064: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6065: _LT_AC_TAGVAR(always_export_symbols, $1)=no
6066: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6067:
6068: if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6069: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6070: # If the export-symbols file already is a .def file (1st line
6071: # is EXPORTS), use it as is; otherwise, prepend...
6072: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6073: cp $export_symbols $output_objdir/$soname.def;
6074: else
6075: echo EXPORTS > $output_objdir/$soname.def;
6076: cat $export_symbols >> $output_objdir/$soname.def;
6077: fi~
6078: $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6079: else
6080: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6081: fi
6082: ;;
6083: darwin* | rhapsody*)
6084: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6085: _LT_AC_TAGVAR(hardcode_direct, $1)=no
6086: _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6087: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6088: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6089: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6090: _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
6091: if test "$GXX" = yes ; then
6092: output_verbose_link_cmd='echo'
6093: _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
6094: _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6095: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
6096: _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
6097: if test "$lt_cv_apple_cc_single_mod" != "yes"; then
6098: _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
6099: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
6100: fi
6101: else
6102: case $cc_basename in
6103: xlc*)
6104: output_verbose_link_cmd='echo'
6105: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6106: _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6107: # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6108: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6109: _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6110: ;;
6111: *)
6112: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6113: ;;
6114: esac
6115: fi
6116: ;;
6117:
6118: dgux*)
6119: case $cc_basename in
6120: ec++*)
6121: # FIXME: insert proper C++ library support
6122: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6123: ;;
6124: ghcx*)
6125: # Green Hills C++ Compiler
6126: # FIXME: insert proper C++ library support
6127: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6128: ;;
6129: *)
6130: # FIXME: insert proper C++ library support
6131: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6132: ;;
6133: esac
6134: ;;
1.1.1.3 ! misho 6135: freebsd[[12]]*)
1.1 misho 6136: # C++ shared libraries reported to be fairly broken before switch to ELF
6137: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6138: ;;
6139: freebsd-elf*)
6140: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6141: ;;
6142: freebsd* | dragonfly*)
6143: # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6144: # conventions
6145: _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6146: ;;
6147: gnu*)
6148: ;;
6149: hpux9*)
6150: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6151: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6152: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6153: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6154: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6155: # but as the default
6156: # location of the library.
6157:
6158: case $cc_basename in
6159: CC*)
6160: # FIXME: insert proper C++ library support
6161: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6162: ;;
6163: aCC*)
6164: _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6165: # Commands to make compiler produce verbose output that lists
6166: # what "hidden" libraries, object files and flags are used when
6167: # linking a shared library.
6168: #
6169: # There doesn't appear to be a way to prevent this compiler from
6170: # explicitly linking system object files so we need to strip them
6171: # from the output so that they don't get included in the library
6172: # dependencies.
6173: 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'
6174: ;;
6175: *)
6176: if test "$GXX" = yes; then
6177: _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6178: else
6179: # FIXME: insert proper C++ library support
6180: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6181: fi
6182: ;;
6183: esac
6184: ;;
6185: hpux10*|hpux11*)
6186: if test $with_gnu_ld = no; then
6187: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6188: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6189:
6190: case $host_cpu in
6191: hppa*64*|ia64*) ;;
6192: *)
6193: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6194: ;;
6195: esac
6196: fi
6197: case $host_cpu in
6198: hppa*64*|ia64*)
6199: _LT_AC_TAGVAR(hardcode_direct, $1)=no
6200: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6201: ;;
6202: *)
6203: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6204: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6205: # but as the default
6206: # location of the library.
6207: ;;
6208: esac
6209:
6210: case $cc_basename in
6211: CC*)
6212: # FIXME: insert proper C++ library support
6213: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6214: ;;
6215: aCC*)
6216: case $host_cpu in
6217: hppa*64*)
6218: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6219: ;;
6220: ia64*)
6221: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6222: ;;
6223: *)
6224: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6225: ;;
6226: esac
6227: # Commands to make compiler produce verbose output that lists
6228: # what "hidden" libraries, object files and flags are used when
6229: # linking a shared library.
6230: #
6231: # There doesn't appear to be a way to prevent this compiler from
6232: # explicitly linking system object files so we need to strip them
6233: # from the output so that they don't get included in the library
6234: # dependencies.
6235: 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'
6236: ;;
6237: *)
6238: if test "$GXX" = yes; then
6239: if test $with_gnu_ld = no; then
6240: case $host_cpu in
6241: hppa*64*)
6242: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6243: ;;
6244: ia64*)
6245: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6246: ;;
6247: *)
6248: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6249: ;;
6250: esac
6251: fi
6252: else
6253: # FIXME: insert proper C++ library support
6254: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6255: fi
6256: ;;
6257: esac
6258: ;;
6259: interix[[3-9]]*)
6260: _LT_AC_TAGVAR(hardcode_direct, $1)=no
6261: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6262: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6263: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6264: # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6265: # Instead, shared libraries are loaded at an image base (0x10000000 by
6266: # default) and relocated if they conflict, which is a slow very memory
6267: # consuming and fragmenting process. To avoid this, we pick a random,
6268: # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6269: # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6270: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6271: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6272: ;;
6273: irix5* | irix6*)
6274: case $cc_basename in
6275: CC*)
6276: # SGI C++
6277: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6278:
6279: # Archives containing C++ object files must be created using
6280: # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6281: # necessary to make sure instantiated templates are included
6282: # in the archive.
6283: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6284: ;;
6285: *)
6286: if test "$GXX" = yes; then
6287: if test "$with_gnu_ld" = no; then
6288: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6289: else
6290: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
6291: fi
6292: fi
6293: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6294: ;;
6295: esac
6296: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6297: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6298: ;;
6299: linux* | k*bsd*-gnu)
6300: case $cc_basename in
6301: KCC*)
6302: # Kuck and Associates, Inc. (KAI) C++ Compiler
6303:
6304: # KCC will only create a shared library if the output file
6305: # ends with ".so" (or ".sl" for HP-UX), so rename the library
6306: # to its proper name (with version) after linking.
6307: _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6308: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6309: # Commands to make compiler produce verbose output that lists
6310: # what "hidden" libraries, object files and flags are used when
6311: # linking a shared library.
6312: #
6313: # There doesn't appear to be a way to prevent this compiler from
6314: # explicitly linking system object files so we need to strip them
6315: # from the output so that they don't get included in the library
6316: # dependencies.
6317: 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'
6318:
6319: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
6320: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6321:
6322: # Archives containing C++ object files must be created using
6323: # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6324: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6325: ;;
6326: icpc*)
6327: # Intel C++
6328: with_gnu_ld=yes
6329: # version 8.0 and above of icpc choke on multiply defined symbols
6330: # if we add $predep_objects and $postdep_objects, however 7.1 and
6331: # earlier do not add the objects themselves.
6332: case `$CC -V 2>&1` in
6333: *"Version 7."*)
6334: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6335: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6336: ;;
6337: *) # Version 8.0 or newer
6338: tmp_idyn=
6339: case $host_cpu in
6340: ia64*) tmp_idyn=' -i_dynamic';;
6341: esac
6342: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6343: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6344: ;;
6345: esac
6346: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6347: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6348: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6349: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6350: ;;
6351: pgCC* | pgcpp*)
6352: # Portland Group C++ compiler
6353: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6354: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6355:
6356: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6357: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6358: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6359: ;;
6360: cxx*)
6361: # Compaq C++
6362: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6363: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6364:
6365: runpath_var=LD_RUN_PATH
6366: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6367: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6368:
6369: # Commands to make compiler produce verbose output that lists
6370: # what "hidden" libraries, object files and flags are used when
6371: # linking a shared library.
6372: #
6373: # There doesn't appear to be a way to prevent this compiler from
6374: # explicitly linking system object files so we need to strip them
6375: # from the output so that they don't get included in the library
6376: # dependencies.
6377: 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'
6378: ;;
6379: *)
6380: case `$CC -V 2>&1 | sed 5q` in
6381: *Sun\ C*)
6382: # Sun C++ 5.9
6383: _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6384: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6385: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6386: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6387: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6388:
6389: # Not sure whether something based on
6390: # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6391: # would be better.
6392: output_verbose_link_cmd='echo'
6393:
6394: # Archives containing C++ object files must be created using
6395: # "CC -xar", where "CC" is the Sun C++ compiler. This is
6396: # necessary to make sure instantiated templates are included
6397: # in the archive.
6398: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6399: ;;
6400: esac
6401: ;;
6402: esac
6403: ;;
6404: lynxos*)
6405: # FIXME: insert proper C++ library support
6406: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6407: ;;
6408: m88k*)
6409: # FIXME: insert proper C++ library support
6410: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6411: ;;
6412: mvs*)
6413: case $cc_basename in
6414: cxx*)
6415: # FIXME: insert proper C++ library support
6416: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6417: ;;
6418: *)
6419: # FIXME: insert proper C++ library support
6420: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6421: ;;
6422: esac
6423: ;;
6424: netbsd*)
6425: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6426: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6427: wlarc=
6428: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6429: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6430: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6431: fi
6432: # Workaround some broken pre-1.5 toolchains
6433: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6434: ;;
6435: openbsd2*)
6436: # C++ shared libraries are fairly broken
6437: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6438: ;;
6439: openbsd*)
6440: if test -f /usr/libexec/ld.so; then
6441: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6442: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6443: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6444: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6445: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6446: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6447: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6448: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6449: fi
6450: output_verbose_link_cmd='echo'
6451: else
6452: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6453: fi
6454: ;;
6455: osf3*)
6456: case $cc_basename in
6457: KCC*)
6458: # Kuck and Associates, Inc. (KAI) C++ Compiler
6459:
6460: # KCC will only create a shared library if the output file
6461: # ends with ".so" (or ".sl" for HP-UX), so rename the library
6462: # to its proper name (with version) after linking.
6463: _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6464:
6465: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6466: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6467:
6468: # Archives containing C++ object files must be created using
6469: # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6470: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6471:
6472: ;;
6473: RCC*)
6474: # Rational C++ 2.4.1
6475: # FIXME: insert proper C++ library support
6476: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6477: ;;
6478: cxx*)
6479: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6480: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6481:
6482: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6483: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6484:
6485: # Commands to make compiler produce verbose output that lists
6486: # what "hidden" libraries, object files and flags are used when
6487: # linking a shared library.
6488: #
6489: # There doesn't appear to be a way to prevent this compiler from
6490: # explicitly linking system object files so we need to strip them
6491: # from the output so that they don't get included in the library
6492: # dependencies.
6493: 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'
6494: ;;
6495: *)
6496: if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6497: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6498: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6499:
6500: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6501: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6502:
6503: # Commands to make compiler produce verbose output that lists
6504: # what "hidden" libraries, object files and flags are used when
6505: # linking a shared library.
6506: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
6507:
6508: else
6509: # FIXME: insert proper C++ library support
6510: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6511: fi
6512: ;;
6513: esac
6514: ;;
6515: osf4* | osf5*)
6516: case $cc_basename in
6517: KCC*)
6518: # Kuck and Associates, Inc. (KAI) C++ Compiler
6519:
6520: # KCC will only create a shared library if the output file
6521: # ends with ".so" (or ".sl" for HP-UX), so rename the library
6522: # to its proper name (with version) after linking.
6523: _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6524:
6525: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6526: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6527:
6528: # Archives containing C++ object files must be created using
6529: # the KAI C++ compiler.
6530: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
6531: ;;
6532: RCC*)
6533: # Rational C++ 2.4.1
6534: # FIXME: insert proper C++ library support
6535: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6536: ;;
6537: cxx*)
6538: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6539: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6540: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6541: echo "-hidden">> $lib.exp~
6542: $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
6543: $rm $lib.exp'
6544:
6545: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6546: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6547:
6548: # Commands to make compiler produce verbose output that lists
6549: # what "hidden" libraries, object files and flags are used when
6550: # linking a shared library.
6551: #
6552: # There doesn't appear to be a way to prevent this compiler from
6553: # explicitly linking system object files so we need to strip them
6554: # from the output so that they don't get included in the library
6555: # dependencies.
6556: 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'
6557: ;;
6558: *)
6559: if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6560: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6561: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6562:
6563: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6564: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6565:
6566: # Commands to make compiler produce verbose output that lists
6567: # what "hidden" libraries, object files and flags are used when
6568: # linking a shared library.
6569: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
6570:
6571: else
6572: # FIXME: insert proper C++ library support
6573: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6574: fi
6575: ;;
6576: esac
6577: ;;
6578: psos*)
6579: # FIXME: insert proper C++ library support
6580: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6581: ;;
6582: sunos4*)
6583: case $cc_basename in
6584: CC*)
6585: # Sun C++ 4.x
6586: # FIXME: insert proper C++ library support
6587: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6588: ;;
6589: lcc*)
6590: # Lucid
6591: # FIXME: insert proper C++ library support
6592: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6593: ;;
6594: *)
6595: # FIXME: insert proper C++ library support
6596: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6597: ;;
6598: esac
6599: ;;
6600: solaris*)
6601: case $cc_basename in
6602: CC*)
6603: # Sun C++ 4.2, 5.x and Centerline C++
6604: _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
6605: _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6606: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6607: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6608: $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6609:
6610: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6611: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6612: case $host_os in
6613: solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6614: *)
6615: # The compiler driver will combine and reorder linker options,
6616: # but understands `-z linker_flag'.
6617: # Supported since Solaris 2.6 (maybe 2.5.1?)
6618: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6619: ;;
6620: esac
6621: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6622:
6623: output_verbose_link_cmd='echo'
6624:
6625: # Archives containing C++ object files must be created using
6626: # "CC -xar", where "CC" is the Sun C++ compiler. This is
6627: # necessary to make sure instantiated templates are included
6628: # in the archive.
6629: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6630: ;;
6631: gcx*)
6632: # Green Hills C++ Compiler
6633: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6634:
6635: # The C++ compiler must be used to create the archive.
6636: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6637: ;;
6638: *)
6639: # GNU C++ compiler with Solaris linker
6640: if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6641: _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6642: if $CC --version | grep -v '^2\.7' > /dev/null; then
6643: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6644: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6645: $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6646:
6647: # Commands to make compiler produce verbose output that lists
6648: # what "hidden" libraries, object files and flags are used when
6649: # linking a shared library.
6650: output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6651: else
6652: # g++ 2.7 appears to require `-G' NOT `-shared' on this
6653: # platform.
6654: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6655: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6656: $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6657:
6658: # Commands to make compiler produce verbose output that lists
6659: # what "hidden" libraries, object files and flags are used when
6660: # linking a shared library.
6661: output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6662: fi
6663:
6664: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6665: case $host_os in
6666: solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6667: *)
6668: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6669: ;;
6670: esac
6671: fi
6672: ;;
6673: esac
6674: ;;
6675: sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6676: _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6677: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6678: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6679: runpath_var='LD_RUN_PATH'
6680:
6681: case $cc_basename in
6682: CC*)
6683: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6684: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6685: ;;
6686: *)
6687: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6688: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6689: ;;
6690: esac
6691: ;;
6692: sysv5* | sco3.2v5* | sco5v6*)
6693: # Note: We can NOT use -z defs as we might desire, because we do not
6694: # link with -lc, and that would cause any symbols used from libc to
6695: # always be unresolved, which means just about no library would
6696: # ever link correctly. If we're not using GNU ld we use -z text
6697: # though, which does catch some bad symbols but isn't as heavy-handed
6698: # as -z defs.
6699: # For security reasons, it is highly recommended that you always
6700: # use absolute paths for naming shared libraries, and exclude the
6701: # DT_RUNPATH tag from executables and libraries. But doing so
6702: # requires that you compile everything twice, which is a pain.
6703: # So that behaviour is only enabled if SCOABSPATH is set to a
6704: # non-empty value in the environment. Most likely only useful for
6705: # creating official distributions of packages.
6706: # This is a hack until libtool officially supports absolute path
6707: # names for shared libraries.
6708: _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6709: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6710: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6711: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6712: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6713: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6714: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6715: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6716: runpath_var='LD_RUN_PATH'
6717:
6718: case $cc_basename in
6719: CC*)
6720: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6721: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6722: ;;
6723: *)
6724: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6725: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6726: ;;
6727: esac
6728: ;;
6729: tandem*)
6730: case $cc_basename in
6731: NCC*)
6732: # NonStop-UX NCC 3.20
6733: # FIXME: insert proper C++ library support
6734: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6735: ;;
6736: *)
6737: # FIXME: insert proper C++ library support
6738: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6739: ;;
6740: esac
6741: ;;
6742: vxworks*)
6743: # FIXME: insert proper C++ library support
6744: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6745: ;;
6746: *)
6747: # FIXME: insert proper C++ library support
6748: _LT_AC_TAGVAR(ld_shlibs, $1)=no
6749: ;;
6750: esac
6751: AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6752: test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6753:
6754: _LT_AC_TAGVAR(GCC, $1)="$GXX"
6755: _LT_AC_TAGVAR(LD, $1)="$LD"
6756:
6757: ## CAVEAT EMPTOR:
6758: ## There is no encapsulation within the following macros, do not change
6759: ## the running order or otherwise move them around unless you know exactly
6760: ## what you are doing...
6761: AC_LIBTOOL_POSTDEP_PREDEP($1)
6762: AC_LIBTOOL_PROG_COMPILER_PIC($1)
6763: AC_LIBTOOL_PROG_CC_C_O($1)
6764: AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6765: AC_LIBTOOL_PROG_LD_SHLIBS($1)
6766: AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6767: AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6768:
6769: AC_LIBTOOL_CONFIG($1)
6770:
6771: AC_LANG_RESTORE
6772: CC=$lt_save_CC
6773: LDCXX=$LD
6774: LD=$lt_save_LD
6775: GCC=$lt_save_GCC
6776: with_gnu_ldcxx=$with_gnu_ld
6777: with_gnu_ld=$lt_save_with_gnu_ld
6778: lt_cv_path_LDCXX=$lt_cv_path_LD
6779: lt_cv_path_LD=$lt_save_path_LD
6780: lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6781: lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6782: ])# AC_LIBTOOL_LANG_CXX_CONFIG
6783:
6784: # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
6785: # ------------------------------------
6786: # Figure out "hidden" library dependencies from verbose
6787: # compiler output when linking a shared library.
6788: # Parse the compiler output and extract the necessary
6789: # objects, libraries and library flags.
6790: AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
6791: [AC_REQUIRE([LT_AC_PROG_SED])dnl
6792: dnl we can't use the lt_simple_compile_test_code here,
6793: dnl because it contains code intended for an executable,
6794: dnl not a library. It's possible we should let each
6795: dnl tag define a new lt_????_link_test_code variable,
6796: dnl but it's only used here...
6797: ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
6798: int a;
6799: void foo (void) { a = 0; }
6800: EOF
6801: ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
6802: class Foo
6803: {
6804: public:
6805: Foo (void) { a = 0; }
6806: private:
6807: int a;
6808: };
6809: EOF
6810: ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
6811: subroutine foo
6812: implicit none
6813: integer*4 a
6814: a=0
6815: return
6816: end
6817: EOF
6818: ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
6819: public class foo {
6820: private int a;
6821: public void bar (void) {
6822: a = 0;
6823: }
6824: };
6825: EOF
6826: ])
6827: dnl Parse the compiler output and extract the necessary
6828: dnl objects, libraries and library flags.
6829: if AC_TRY_EVAL(ac_compile); then
6830: # Parse the compiler output and extract the necessary
6831: # objects, libraries and library flags.
6832:
6833: # Sentinel used to keep track of whether or not we are before
6834: # the conftest object file.
6835: pre_test_object_deps_done=no
6836:
6837: # The `*' in the case matches for architectures that use `case' in
6838: # $output_verbose_cmd can trigger glob expansion during the loop
6839: # eval without this substitution.
6840: output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
6841:
6842: for p in `eval $output_verbose_link_cmd`; do
6843: case $p in
6844:
6845: -L* | -R* | -l*)
6846: # Some compilers place space between "-{L,R}" and the path.
6847: # Remove the space.
6848: if test $p = "-L" \
6849: || test $p = "-R"; then
6850: prev=$p
6851: continue
6852: else
6853: prev=
6854: fi
6855:
6856: if test "$pre_test_object_deps_done" = no; then
6857: case $p in
6858: -L* | -R*)
6859: # Internal compiler library paths should come after those
6860: # provided the user. The postdeps already come after the
6861: # user supplied libs so there is no need to process them.
6862: if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
6863: _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6864: else
6865: _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6866: fi
6867: ;;
6868: # The "-l" case would never come before the object being
6869: # linked, so don't bother handling this case.
6870: esac
6871: else
6872: if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
6873: _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
6874: else
6875: _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
6876: fi
6877: fi
6878: ;;
6879:
6880: *.$objext)
6881: # This assumes that the test object file only shows up
6882: # once in the compiler output.
6883: if test "$p" = "conftest.$objext"; then
6884: pre_test_object_deps_done=yes
6885: continue
6886: fi
6887:
6888: if test "$pre_test_object_deps_done" = no; then
6889: if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
6890: _LT_AC_TAGVAR(predep_objects, $1)="$p"
6891: else
6892: _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
6893: fi
6894: else
6895: if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
6896: _LT_AC_TAGVAR(postdep_objects, $1)="$p"
6897: else
6898: _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
6899: fi
6900: fi
6901: ;;
6902:
6903: *) ;; # Ignore the rest.
6904:
6905: esac
6906: done
6907:
6908: # Clean up.
6909: rm -f a.out a.exe
6910: else
6911: echo "libtool.m4: error: problem compiling $1 test program"
6912: fi
6913:
6914: $rm -f confest.$objext
6915:
6916: _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
6917: if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
6918: _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6919: fi
6920:
6921: # PORTME: override above test on systems where it is broken
6922: ifelse([$1],[CXX],
6923: [case $host_os in
6924: interix[[3-9]]*)
6925: # Interix 3.5 installs completely hosed .la files for C++, so rather than
6926: # hack all around it, let's just trust "g++" to DTRT.
6927: _LT_AC_TAGVAR(predep_objects,$1)=
6928: _LT_AC_TAGVAR(postdep_objects,$1)=
6929: _LT_AC_TAGVAR(postdeps,$1)=
6930: ;;
6931:
6932: linux*)
6933: case `$CC -V 2>&1 | sed 5q` in
6934: *Sun\ C*)
6935: # Sun C++ 5.9
6936: #
6937: # The more standards-conforming stlport4 library is
6938: # incompatible with the Cstd library. Avoid specifying
6939: # it if it's in CXXFLAGS. Ignore libCrun as
6940: # -library=stlport4 depends on it.
6941: case " $CXX $CXXFLAGS " in
6942: *" -library=stlport4 "*)
6943: solaris_use_stlport4=yes
6944: ;;
6945: esac
6946: if test "$solaris_use_stlport4" != yes; then
6947: _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6948: fi
6949: ;;
6950: esac
6951: ;;
6952:
6953: solaris*)
6954: case $cc_basename in
6955: CC*)
6956: # The more standards-conforming stlport4 library is
6957: # incompatible with the Cstd library. Avoid specifying
6958: # it if it's in CXXFLAGS. Ignore libCrun as
6959: # -library=stlport4 depends on it.
6960: case " $CXX $CXXFLAGS " in
6961: *" -library=stlport4 "*)
6962: solaris_use_stlport4=yes
6963: ;;
6964: esac
6965:
6966: # Adding this requires a known-good setup of shared libraries for
6967: # Sun compiler versions before 5.6, else PIC objects from an old
6968: # archive will be linked into the output, leading to subtle bugs.
6969: if test "$solaris_use_stlport4" != yes; then
6970: _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6971: fi
6972: ;;
6973: esac
6974: ;;
6975: esac
6976: ])
6977: case " $_LT_AC_TAGVAR(postdeps, $1) " in
6978: *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6979: esac
6980: ])# AC_LIBTOOL_POSTDEP_PREDEP
6981:
6982: # AC_LIBTOOL_CONFIG([TAGNAME])
6983: # ----------------------------
6984: # If TAGNAME is not passed, then create an initial libtool script
6985: # with a default configuration from the untagged config vars. Otherwise
6986: # add code to config.status for appending the configuration named by
6987: # TAGNAME from the matching tagged config vars.
6988: AC_DEFUN([AC_LIBTOOL_CONFIG],
6989: [# The else clause should only fire when bootstrapping the
6990: # libtool distribution, otherwise you forgot to ship ltmain.sh
6991: # with your package, and you will get complaints that there are
6992: # no rules to generate ltmain.sh.
6993: if test -f "$ltmain"; then
6994: # See if we are running on zsh, and set the options which allow our commands through
6995: # without removal of \ escapes.
6996: if test -n "${ZSH_VERSION+set}" ; then
6997: setopt NO_GLOB_SUBST
6998: fi
6999: # Now quote all the things that may contain metacharacters while being
7000: # careful not to overquote the AC_SUBSTed values. We take copies of the
7001: # variables and quote the copies for generation of the libtool script.
7002: for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
7003: SED SHELL STRIP \
7004: libname_spec library_names_spec soname_spec extract_expsyms_cmds \
7005: old_striplib striplib file_magic_cmd finish_cmds finish_eval \
7006: deplibs_check_method reload_flag reload_cmds need_locks \
7007: lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
7008: lt_cv_sys_global_symbol_to_c_name_address \
7009: sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7010: old_postinstall_cmds old_postuninstall_cmds \
7011: _LT_AC_TAGVAR(compiler, $1) \
7012: _LT_AC_TAGVAR(CC, $1) \
7013: _LT_AC_TAGVAR(LD, $1) \
7014: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
7015: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
7016: _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
7017: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
7018: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
7019: _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
7020: _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
7021: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
7022: _LT_AC_TAGVAR(old_archive_cmds, $1) \
7023: _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
7024: _LT_AC_TAGVAR(predep_objects, $1) \
7025: _LT_AC_TAGVAR(postdep_objects, $1) \
7026: _LT_AC_TAGVAR(predeps, $1) \
7027: _LT_AC_TAGVAR(postdeps, $1) \
7028: _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
7029: _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
7030: _LT_AC_TAGVAR(archive_cmds, $1) \
7031: _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
7032: _LT_AC_TAGVAR(postinstall_cmds, $1) \
7033: _LT_AC_TAGVAR(postuninstall_cmds, $1) \
7034: _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
7035: _LT_AC_TAGVAR(allow_undefined_flag, $1) \
7036: _LT_AC_TAGVAR(no_undefined_flag, $1) \
7037: _LT_AC_TAGVAR(export_symbols_cmds, $1) \
7038: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
7039: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
7040: _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
7041: _LT_AC_TAGVAR(hardcode_automatic, $1) \
7042: _LT_AC_TAGVAR(module_cmds, $1) \
7043: _LT_AC_TAGVAR(module_expsym_cmds, $1) \
7044: _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
7045: _LT_AC_TAGVAR(fix_srcfile_path, $1) \
7046: _LT_AC_TAGVAR(exclude_expsyms, $1) \
7047: _LT_AC_TAGVAR(include_expsyms, $1); do
7048:
7049: case $var in
7050: _LT_AC_TAGVAR(old_archive_cmds, $1) | \
7051: _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
7052: _LT_AC_TAGVAR(archive_cmds, $1) | \
7053: _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
7054: _LT_AC_TAGVAR(module_cmds, $1) | \
7055: _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
7056: _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
7057: _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
7058: extract_expsyms_cmds | reload_cmds | finish_cmds | \
7059: postinstall_cmds | postuninstall_cmds | \
7060: old_postinstall_cmds | old_postuninstall_cmds | \
7061: sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7062: # Double-quote double-evaled strings.
7063: eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7064: ;;
7065: *)
7066: eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7067: ;;
7068: esac
7069: done
7070:
7071: case $lt_echo in
7072: *'\[$]0 --fallback-echo"')
7073: lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
7074: ;;
7075: esac
7076:
7077: ifelse([$1], [],
7078: [cfgfile="${ofile}T"
7079: trap "$rm \"$cfgfile\"; exit 1" 1 2 15
7080: $rm -f "$cfgfile"
7081: AC_MSG_RESULT([
7082: creating $ofile])],
7083: [cfgfile="$ofile"])
7084:
7085: cat <<__EOF__ >> "$cfgfile"
7086: ifelse([$1], [],
7087: [#! $SHELL
7088:
7089: # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7090: # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7091: # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7092: #
7093: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
7094: # Free Software Foundation, Inc.
7095: #
7096: # This file is part of GNU Libtool:
7097: # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7098: #
7099: # This program is free software; you can redistribute it and/or modify
7100: # it under the terms of the GNU General Public License as published by
7101: # the Free Software Foundation; either version 2 of the License, or
7102: # (at your option) any later version.
7103: #
7104: # This program is distributed in the hope that it will be useful, but
7105: # WITHOUT ANY WARRANTY; without even the implied warranty of
7106: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7107: # General Public License for more details.
7108: #
7109: # You should have received a copy of the GNU General Public License
7110: # along with this program; if not, write to the Free Software
7111: # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
7112: #
7113: # As a special exception to the GNU General Public License, if you
7114: # distribute this file as part of a program that contains a
7115: # configuration script generated by Autoconf, you may include it under
7116: # the same distribution terms that you use for the rest of that program.
7117:
7118: # A sed program that does not truncate output.
7119: SED=$lt_SED
7120:
7121: # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7122: Xsed="$SED -e 1s/^X//"
7123:
7124: # The HP-UX ksh and POSIX shell print the target directory to stdout
7125: # if CDPATH is set.
7126: (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
7127:
7128: # The names of the tagged configurations supported by this script.
7129: available_tags=
7130:
7131: # ### BEGIN LIBTOOL CONFIG],
7132: [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
7133:
7134: # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7135:
7136: # Shell to use when invoking shell scripts.
7137: SHELL=$lt_SHELL
7138:
7139: # Whether or not to build shared libraries.
7140: build_libtool_libs=$enable_shared
7141:
7142: # Whether or not to build static libraries.
7143: build_old_libs=$enable_static
7144:
7145: # Whether or not to add -lc for building shared libraries.
7146: build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
7147:
7148: # Whether or not to disallow shared libs when runtime libs are static
7149: allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
7150:
7151: # Whether or not to optimize for fast installation.
7152: fast_install=$enable_fast_install
7153:
7154: # The host system.
7155: host_alias=$host_alias
7156: host=$host
7157: host_os=$host_os
7158:
7159: # The build system.
7160: build_alias=$build_alias
7161: build=$build
7162: build_os=$build_os
7163:
7164: # An echo program that does not interpret backslashes.
7165: echo=$lt_echo
7166:
7167: # The archiver.
7168: AR=$lt_AR
7169: AR_FLAGS=$lt_AR_FLAGS
7170:
7171: # A C compiler.
7172: LTCC=$lt_LTCC
7173:
7174: # LTCC compiler flags.
7175: LTCFLAGS=$lt_LTCFLAGS
7176:
7177: # A language-specific compiler.
7178: CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
7179:
7180: # Is the compiler the GNU C compiler?
7181: with_gcc=$_LT_AC_TAGVAR(GCC, $1)
7182:
7183: # An ERE matcher.
7184: EGREP=$lt_EGREP
7185:
7186: # The linker used to build libraries.
7187: LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
7188:
7189: # Whether we need hard or soft links.
7190: LN_S=$lt_LN_S
7191:
7192: # A BSD-compatible nm program.
7193: NM=$lt_NM
7194:
7195: # A symbol stripping program
7196: STRIP=$lt_STRIP
7197:
7198: # Used to examine libraries when file_magic_cmd begins "file"
7199: MAGIC_CMD=$MAGIC_CMD
7200:
7201: # Used on cygwin: DLL creation program.
7202: DLLTOOL="$DLLTOOL"
7203:
7204: # Used on cygwin: object dumper.
7205: OBJDUMP="$OBJDUMP"
7206:
7207: # Used on cygwin: assembler.
7208: AS="$AS"
7209:
7210: # The name of the directory that contains temporary libtool files.
7211: objdir=$objdir
7212:
7213: # How to create reloadable object files.
7214: reload_flag=$lt_reload_flag
7215: reload_cmds=$lt_reload_cmds
7216:
7217: # How to pass a linker flag through the compiler.
7218: wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7219:
7220: # Object file suffix (normally "o").
7221: objext="$ac_objext"
7222:
7223: # Old archive suffix (normally "a").
7224: libext="$libext"
7225:
7226: # Shared library suffix (normally ".so").
7227: shrext_cmds='$shrext_cmds'
7228:
7229: # Executable file suffix (normally "").
7230: exeext="$exeext"
7231:
7232: # Additional compiler flags for building library objects.
7233: pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7234: pic_mode=$pic_mode
7235:
7236: # What is the maximum length of a command?
7237: max_cmd_len=$lt_cv_sys_max_cmd_len
7238:
7239: # Does compiler simultaneously support -c and -o options?
7240: compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
7241:
7242: # Must we lock files when doing compilation?
7243: need_locks=$lt_need_locks
7244:
7245: # Do we need the lib prefix for modules?
7246: need_lib_prefix=$need_lib_prefix
7247:
7248: # Do we need a version for libraries?
7249: need_version=$need_version
7250:
7251: # Whether dlopen is supported.
7252: dlopen_support=$enable_dlopen
7253:
7254: # Whether dlopen of programs is supported.
7255: dlopen_self=$enable_dlopen_self
7256:
7257: # Whether dlopen of statically linked programs is supported.
7258: dlopen_self_static=$enable_dlopen_self_static
7259:
7260: # Compiler flag to prevent dynamic linking.
7261: link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
7262:
7263: # Compiler flag to turn off builtin functions.
7264: no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
7265:
7266: # Compiler flag to allow reflexive dlopens.
7267: export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
7268:
7269: # Compiler flag to generate shared objects directly from archives.
7270: whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
7271:
7272: # Compiler flag to generate thread-safe objects.
7273: thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
7274:
7275: # Library versioning type.
7276: version_type=$version_type
7277:
7278: # Format of library name prefix.
7279: libname_spec=$lt_libname_spec
7280:
7281: # List of archive names. First name is the real one, the rest are links.
7282: # The last name is the one that the linker finds with -lNAME.
7283: library_names_spec=$lt_library_names_spec
7284:
7285: # The coded name of the library, if different from the real name.
7286: soname_spec=$lt_soname_spec
7287:
7288: # Commands used to build and install an old-style archive.
7289: RANLIB=$lt_RANLIB
7290: old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
7291: old_postinstall_cmds=$lt_old_postinstall_cmds
7292: old_postuninstall_cmds=$lt_old_postuninstall_cmds
7293:
7294: # Create an old-style archive from a shared archive.
7295: old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
7296:
7297: # Create a temporary old-style archive to link instead of a shared archive.
7298: old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
7299:
7300: # Commands used to build and install a shared archive.
7301: archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
7302: archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
7303: postinstall_cmds=$lt_postinstall_cmds
7304: postuninstall_cmds=$lt_postuninstall_cmds
7305:
7306: # Commands used to build a loadable module (assumed same as above if empty)
7307: module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
7308: module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
7309:
7310: # Commands to strip libraries.
7311: old_striplib=$lt_old_striplib
7312: striplib=$lt_striplib
7313:
7314: # Dependencies to place before the objects being linked to create a
7315: # shared library.
7316: predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
7317:
7318: # Dependencies to place after the objects being linked to create a
7319: # shared library.
7320: postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
7321:
7322: # Dependencies to place before the objects being linked to create a
7323: # shared library.
7324: predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
7325:
7326: # Dependencies to place after the objects being linked to create a
7327: # shared library.
7328: postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
7329:
7330: # The directories searched by this compiler when creating a shared
7331: # library
7332: compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
7333:
7334: # The library search path used internally by the compiler when linking
7335: # a shared library.
7336: compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
7337:
7338: # Method to check whether dependent libraries are shared objects.
7339: deplibs_check_method=$lt_deplibs_check_method
7340:
7341: # Command to use when deplibs_check_method == file_magic.
7342: file_magic_cmd=$lt_file_magic_cmd
7343:
7344: # Flag that allows shared libraries with undefined symbols to be built.
7345: allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
7346:
7347: # Flag that forces no undefined symbols.
7348: no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
7349:
7350: # Commands used to finish a libtool library installation in a directory.
7351: finish_cmds=$lt_finish_cmds
7352:
7353: # Same as above, but a single script fragment to be evaled but not shown.
7354: finish_eval=$lt_finish_eval
7355:
7356: # Take the output of nm and produce a listing of raw symbols and C names.
7357: global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
7358:
7359: # Transform the output of nm in a proper C declaration
7360: global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
7361:
7362: # Transform the output of nm in a C name address pair
7363: global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
7364:
7365: # This is the shared library runtime path variable.
7366: runpath_var=$runpath_var
7367:
7368: # This is the shared library path variable.
7369: shlibpath_var=$shlibpath_var
7370:
7371: # Is shlibpath searched before the hard-coded library search path?
7372: shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7373:
7374: # How to hardcode a shared library path into an executable.
7375: hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
7376:
7377: # Whether we should hardcode library paths into libraries.
7378: hardcode_into_libs=$hardcode_into_libs
7379:
7380: # Flag to hardcode \$libdir into a binary during linking.
7381: # This must work even if \$libdir does not exist.
7382: hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
7383:
7384: # If ld is used when linking, flag to hardcode \$libdir into
7385: # a binary during linking. This must work even if \$libdir does
7386: # not exist.
7387: hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
7388:
7389: # Whether we need a single -rpath flag with a separated argument.
7390: hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
7391:
7392: # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
7393: # resulting binary.
7394: hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
7395:
7396: # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7397: # resulting binary.
7398: hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
7399:
7400: # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7401: # the resulting binary.
7402: hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
7403:
7404: # Set to yes if building a shared library automatically hardcodes DIR into the library
7405: # and all subsequent libraries and executables linked against it.
7406: hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
7407:
7408: # Variables whose values should be saved in libtool wrapper scripts and
7409: # restored at relink time.
7410: variables_saved_for_relink="$variables_saved_for_relink"
7411:
7412: # Whether libtool must link a program against all its dependency libraries.
7413: link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
7414:
7415: # Compile-time system search path for libraries
7416: sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7417:
7418: # Run-time system search path for libraries
7419: sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7420:
7421: # Fix the shell variable \$srcfile for the compiler.
7422: fix_srcfile_path=$lt_fix_srcfile_path
7423:
7424: # Set to yes if exported symbols are required.
7425: always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
7426:
7427: # The commands to list exported symbols.
7428: export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
7429:
7430: # The commands to extract the exported symbol list from a shared archive.
7431: extract_expsyms_cmds=$lt_extract_expsyms_cmds
7432:
7433: # Symbols that should not be listed in the preloaded symbols.
7434: exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
7435:
7436: # Symbols that must always be exported.
7437: include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
7438:
7439: ifelse([$1],[],
7440: [# ### END LIBTOOL CONFIG],
7441: [# ### END LIBTOOL TAG CONFIG: $tagname])
7442:
7443: __EOF__
7444:
7445: ifelse([$1],[], [
7446: case $host_os in
7447: aix3*)
7448: cat <<\EOF >> "$cfgfile"
7449:
7450: # AIX sometimes has problems with the GCC collect2 program. For some
7451: # reason, if we set the COLLECT_NAMES environment variable, the problems
7452: # vanish in a puff of smoke.
7453: if test "X${COLLECT_NAMES+set}" != Xset; then
7454: COLLECT_NAMES=
7455: export COLLECT_NAMES
7456: fi
7457: EOF
7458: ;;
7459: esac
7460:
7461: # We use sed instead of cat because bash on DJGPP gets confused if
7462: # if finds mixed CR/LF and LF-only lines. Since sed operates in
7463: # text mode, it properly converts lines to CR/LF. This bash problem
7464: # is reportedly fixed, but why not run on old versions too?
7465: sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
7466:
7467: mv -f "$cfgfile" "$ofile" || \
7468: (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7469: chmod +x "$ofile"
7470: ])
7471: else
7472: # If there is no Makefile yet, we rely on a make rule to execute
7473: # `config.status --recheck' to rerun these tests and create the
7474: # libtool script then.
7475: ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
7476: if test -f "$ltmain_in"; then
7477: test -f Makefile && make "$ltmain"
7478: fi
7479: fi
7480: ])# AC_LIBTOOL_CONFIG
7481:
7482:
7483: # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
7484: # -------------------------------------------
7485: AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
7486: [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
7487:
7488: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7489:
7490: if test "$GCC" = yes; then
7491: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7492:
7493: AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
7494: lt_cv_prog_compiler_rtti_exceptions,
7495: [-fno-rtti -fno-exceptions], [],
7496: [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
7497: fi
7498: ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
7499:
7500:
7501: # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
7502: # ---------------------------------
7503: AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
7504: [AC_REQUIRE([AC_CANONICAL_HOST])
7505: AC_REQUIRE([LT_AC_PROG_SED])
7506: AC_REQUIRE([AC_PROG_NM])
7507: AC_REQUIRE([AC_OBJEXT])
7508: # Check for command to grab the raw symbol name followed by C symbol from nm.
7509: AC_MSG_CHECKING([command to parse $NM output from $compiler object])
7510: AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
7511: [
7512: # These are sane defaults that work on at least a few old systems.
7513: # [They come from Ultrix. What could be older than Ultrix?!! ;)]
7514:
7515: # Character class describing NM global symbol codes.
7516: symcode='[[BCDEGRST]]'
7517:
7518: # Regexp to match symbols that can be accessed directly from C.
7519: sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
7520:
7521: # Transform an extracted symbol line into a proper C declaration
7522: lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7523:
7524: # Transform an extracted symbol line into symbol name and symbol address
7525: 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'"
7526:
7527: # Define system-specific variables.
7528: case $host_os in
7529: aix*)
7530: symcode='[[BCDT]]'
7531: ;;
7532: cygwin* | mingw* | pw32*)
7533: symcode='[[ABCDGISTW]]'
7534: ;;
7535: hpux*) # Its linker distinguishes data from code symbols
7536: if test "$host_cpu" = ia64; then
7537: symcode='[[ABCDEGRST]]'
7538: fi
7539: lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7540: 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'"
7541: ;;
7542: linux* | k*bsd*-gnu)
7543: if test "$host_cpu" = ia64; then
7544: symcode='[[ABCDGIRSTW]]'
7545: lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7546: 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'"
7547: fi
7548: ;;
7549: irix* | nonstopux*)
7550: symcode='[[BCDEGRST]]'
7551: ;;
7552: osf*)
7553: symcode='[[BCDEGQRST]]'
7554: ;;
7555: solaris*)
7556: symcode='[[BDRT]]'
7557: ;;
7558: sco3.2v5*)
7559: symcode='[[DT]]'
7560: ;;
7561: sysv4.2uw2*)
7562: symcode='[[DT]]'
7563: ;;
7564: sysv5* | sco5v6* | unixware* | OpenUNIX*)
7565: symcode='[[ABDT]]'
7566: ;;
7567: sysv4)
7568: symcode='[[DFNSTU]]'
7569: ;;
7570: esac
7571:
7572: # Handle CRLF in mingw tool chain
7573: opt_cr=
7574: case $build_os in
7575: mingw*)
7576: opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7577: ;;
7578: esac
7579:
7580: # If we're using GNU nm, then use its standard symbol codes.
7581: case `$NM -V 2>&1` in
7582: *GNU* | *'with BFD'*)
7583: symcode='[[ABCDGIRSTW]]' ;;
7584: esac
7585:
7586: # Try without a prefix undercore, then with it.
7587: for ac_symprfx in "" "_"; do
7588:
7589: # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7590: symxfrm="\\1 $ac_symprfx\\2 \\2"
7591:
7592: # Write the raw and C identifiers.
7593: lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7594:
7595: # Check to see that the pipe works correctly.
7596: pipe_works=no
7597:
7598: rm -f conftest*
7599: cat > conftest.$ac_ext <<EOF
7600: #ifdef __cplusplus
7601: extern "C" {
7602: #endif
7603: char nm_test_var;
7604: void nm_test_func(){}
7605: #ifdef __cplusplus
7606: }
7607: #endif
7608: int main(){nm_test_var='a';nm_test_func();return(0);}
7609: EOF
7610:
7611: if AC_TRY_EVAL(ac_compile); then
7612: # Now try to grab the symbols.
7613: nlist=conftest.nm
7614: if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
7615: # Try sorting and uniquifying the output.
7616: if sort "$nlist" | uniq > "$nlist"T; then
7617: mv -f "$nlist"T "$nlist"
7618: else
7619: rm -f "$nlist"T
7620: fi
7621:
7622: # Make sure that we snagged all the symbols we need.
7623: if grep ' nm_test_var$' "$nlist" >/dev/null; then
7624: if grep ' nm_test_func$' "$nlist" >/dev/null; then
7625: cat <<EOF > conftest.$ac_ext
7626: #ifdef __cplusplus
7627: extern "C" {
7628: #endif
7629:
7630: EOF
7631: # Now generate the symbol file.
7632: eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7633:
7634: cat <<EOF >> conftest.$ac_ext
7635: #if defined (__STDC__) && __STDC__
7636: # define lt_ptr_t void *
7637: #else
7638: # define lt_ptr_t char *
7639: # define const
7640: #endif
7641:
7642: /* The mapping between symbol names and symbols. */
7643: const struct {
7644: const char *name;
7645: lt_ptr_t address;
7646: }
7647: lt_preloaded_symbols[[]] =
7648: {
7649: EOF
7650: $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7651: cat <<\EOF >> conftest.$ac_ext
7652: {0, (lt_ptr_t) 0}
7653: };
7654:
7655: #ifdef __cplusplus
7656: }
7657: #endif
7658: EOF
7659: # Now try linking the two files.
7660: mv conftest.$ac_objext conftstm.$ac_objext
7661: lt_save_LIBS="$LIBS"
7662: lt_save_CFLAGS="$CFLAGS"
7663: LIBS="conftstm.$ac_objext"
7664: CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
7665: if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
7666: pipe_works=yes
7667: fi
7668: LIBS="$lt_save_LIBS"
7669: CFLAGS="$lt_save_CFLAGS"
7670: else
7671: echo "cannot find nm_test_func in $nlist" >&5
7672: fi
7673: else
7674: echo "cannot find nm_test_var in $nlist" >&5
7675: fi
7676: else
7677: echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7678: fi
7679: else
7680: echo "$progname: failed program was:" >&5
7681: cat conftest.$ac_ext >&5
7682: fi
7683: rm -rf conftest* conftst*
7684:
7685: # Do not use the global_symbol_pipe unless it works.
7686: if test "$pipe_works" = yes; then
7687: break
7688: else
7689: lt_cv_sys_global_symbol_pipe=
7690: fi
7691: done
7692: ])
7693: if test -z "$lt_cv_sys_global_symbol_pipe"; then
7694: lt_cv_sys_global_symbol_to_cdecl=
7695: fi
7696: if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7697: AC_MSG_RESULT(failed)
7698: else
7699: AC_MSG_RESULT(ok)
7700: fi
7701: ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
7702:
7703:
7704: # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
7705: # ---------------------------------------
7706: AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
7707: [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
7708: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7709: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
7710:
7711: AC_MSG_CHECKING([for $compiler option to produce PIC])
7712: ifelse([$1],[CXX],[
7713: # C++ specific cases for pic, static, wl, etc.
7714: if test "$GXX" = yes; then
7715: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7716: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7717:
7718: case $host_os in
7719: aix*)
7720: # All AIX code is PIC.
7721: if test "$host_cpu" = ia64; then
7722: # AIX 5 now supports IA64 processor
7723: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7724: fi
7725: ;;
7726: amigaos*)
7727: # FIXME: we need at least 68020 code to build shared libraries, but
7728: # adding the `-m68020' flag to GCC prevents building anything better,
7729: # like `-m68040'.
7730: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7731: ;;
7732: beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7733: # PIC is the default for these OSes.
7734: ;;
7735: mingw* | cygwin* | os2* | pw32*)
7736: # This hack is so that the source file can tell whether it is being
7737: # built for inclusion in a dll (and should export symbols for example).
7738: # Although the cygwin gcc ignores -fPIC, still need this for old-style
7739: # (--disable-auto-import) libraries
7740: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7741: ;;
7742: darwin* | rhapsody*)
7743: # PIC is the default on this platform
7744: # Common symbols not allowed in MH_DYLIB files
7745: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7746: ;;
7747: *djgpp*)
7748: # DJGPP does not support shared libraries at all
7749: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7750: ;;
7751: interix[[3-9]]*)
7752: # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7753: # Instead, we relocate shared libraries at runtime.
7754: ;;
7755: sysv4*MP*)
7756: if test -d /usr/nec; then
7757: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7758: fi
7759: ;;
7760: hpux*)
7761: # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7762: # not for PA HP-UX.
7763: case $host_cpu in
7764: hppa*64*|ia64*)
7765: ;;
7766: *)
7767: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7768: ;;
7769: esac
7770: ;;
7771: *)
7772: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7773: ;;
7774: esac
7775: else
7776: case $host_os in
7777: aix[[4-9]]*)
7778: # All AIX code is PIC.
7779: if test "$host_cpu" = ia64; then
7780: # AIX 5 now supports IA64 processor
7781: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7782: else
7783: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7784: fi
7785: ;;
7786: chorus*)
7787: case $cc_basename in
7788: cxch68*)
7789: # Green Hills C++ Compiler
7790: # _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"
7791: ;;
7792: esac
7793: ;;
7794: darwin*)
7795: # PIC is the default on this platform
7796: # Common symbols not allowed in MH_DYLIB files
7797: case $cc_basename in
7798: xlc*)
7799: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
7800: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7801: ;;
7802: esac
7803: ;;
7804: dgux*)
7805: case $cc_basename in
7806: ec++*)
7807: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7808: ;;
7809: ghcx*)
7810: # Green Hills C++ Compiler
7811: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7812: ;;
7813: *)
7814: ;;
7815: esac
7816: ;;
7817: freebsd* | dragonfly*)
7818: # FreeBSD uses GNU C++
7819: ;;
7820: hpux9* | hpux10* | hpux11*)
7821: case $cc_basename in
7822: CC*)
7823: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7824: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7825: if test "$host_cpu" != ia64; then
7826: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7827: fi
7828: ;;
7829: aCC*)
7830: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7831: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7832: case $host_cpu in
7833: hppa*64*|ia64*)
7834: # +Z the default
7835: ;;
7836: *)
7837: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7838: ;;
7839: esac
7840: ;;
7841: *)
7842: ;;
7843: esac
7844: ;;
7845: interix*)
7846: # This is c89, which is MS Visual C++ (no shared libs)
7847: # Anyone wants to do a port?
7848: ;;
7849: irix5* | irix6* | nonstopux*)
7850: case $cc_basename in
7851: CC*)
7852: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7853: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7854: # CC pic flag -KPIC is the default.
7855: ;;
7856: *)
7857: ;;
7858: esac
7859: ;;
7860: linux* | k*bsd*-gnu)
7861: case $cc_basename in
7862: KCC*)
7863: # KAI C++ Compiler
7864: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7865: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7866: ;;
7867: ecpc*)
7868: # old Intel C++ for x86_64 which still supported -KPIC.
7869: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7870: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7871: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7872: ;;
7873: icpc*)
7874: # Intel C++, used to be incompatible with GCC.
7875: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7876: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7877: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7878: ;;
7879: pgCC* | pgcpp*)
7880: # Portland Group C++ compiler.
7881: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7882: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7883: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7884: ;;
7885: cxx*)
7886: # Compaq C++
7887: # Make sure the PIC flag is empty. It appears that all Alpha
7888: # Linux and Compaq Tru64 Unix objects are PIC.
7889: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7890: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7891: ;;
7892: *)
7893: case `$CC -V 2>&1 | sed 5q` in
7894: *Sun\ C*)
7895: # Sun C++ 5.9
7896: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7897: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7898: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7899: ;;
7900: esac
7901: ;;
7902: esac
7903: ;;
7904: lynxos*)
7905: ;;
7906: m88k*)
7907: ;;
7908: mvs*)
7909: case $cc_basename in
7910: cxx*)
7911: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
7912: ;;
7913: *)
7914: ;;
7915: esac
7916: ;;
7917: netbsd*)
7918: ;;
7919: osf3* | osf4* | osf5*)
7920: case $cc_basename in
7921: KCC*)
7922: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7923: ;;
7924: RCC*)
7925: # Rational C++ 2.4.1
7926: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7927: ;;
7928: cxx*)
7929: # Digital/Compaq C++
7930: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7931: # Make sure the PIC flag is empty. It appears that all Alpha
7932: # Linux and Compaq Tru64 Unix objects are PIC.
7933: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7934: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7935: ;;
7936: *)
7937: ;;
7938: esac
7939: ;;
7940: psos*)
7941: ;;
7942: solaris*)
7943: case $cc_basename in
7944: CC*)
7945: # Sun C++ 4.2, 5.x and Centerline C++
7946: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7947: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7948: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7949: ;;
7950: gcx*)
7951: # Green Hills C++ Compiler
7952: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7953: ;;
7954: *)
7955: ;;
7956: esac
7957: ;;
7958: sunos4*)
7959: case $cc_basename in
7960: CC*)
7961: # Sun C++ 4.x
7962: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7963: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7964: ;;
7965: lcc*)
7966: # Lucid
7967: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7968: ;;
7969: *)
7970: ;;
7971: esac
7972: ;;
7973: tandem*)
7974: case $cc_basename in
7975: NCC*)
7976: # NonStop-UX NCC 3.20
7977: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7978: ;;
7979: *)
7980: ;;
7981: esac
7982: ;;
7983: sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7984: case $cc_basename in
7985: CC*)
7986: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7987: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7988: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7989: ;;
7990: esac
7991: ;;
7992: vxworks*)
7993: ;;
7994: *)
7995: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7996: ;;
7997: esac
7998: fi
7999: ],
8000: [
8001: if test "$GCC" = yes; then
8002: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8003: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
8004:
8005: case $host_os in
8006: aix*)
8007: # All AIX code is PIC.
8008: if test "$host_cpu" = ia64; then
8009: # AIX 5 now supports IA64 processor
8010: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8011: fi
8012: ;;
8013:
8014: amigaos*)
8015: # FIXME: we need at least 68020 code to build shared libraries, but
8016: # adding the `-m68020' flag to GCC prevents building anything better,
8017: # like `-m68040'.
8018: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
8019: ;;
8020:
8021: beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8022: # PIC is the default for these OSes.
8023: ;;
8024:
8025: mingw* | cygwin* | pw32* | os2*)
8026: # This hack is so that the source file can tell whether it is being
8027: # built for inclusion in a dll (and should export symbols for example).
8028: # Although the cygwin gcc ignores -fPIC, still need this for old-style
8029: # (--disable-auto-import) libraries
8030: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
8031: ;;
8032:
8033: darwin* | rhapsody*)
8034: # PIC is the default on this platform
8035: # Common symbols not allowed in MH_DYLIB files
8036: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8037: ;;
8038:
8039: interix[[3-9]]*)
8040: # Interix 3.x gcc -fpic/-fPIC options generate broken code.
8041: # Instead, we relocate shared libraries at runtime.
8042: ;;
8043:
8044: msdosdjgpp*)
8045: # Just because we use GCC doesn't mean we suddenly get shared libraries
8046: # on systems that don't support them.
8047: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8048: enable_shared=no
8049: ;;
8050:
8051: sysv4*MP*)
8052: if test -d /usr/nec; then
8053: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
8054: fi
8055: ;;
8056:
8057: hpux*)
8058: # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8059: # not for PA HP-UX.
8060: case $host_cpu in
8061: hppa*64*|ia64*)
8062: # +Z the default
8063: ;;
8064: *)
8065: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8066: ;;
8067: esac
8068: ;;
8069:
8070: *)
8071: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8072: ;;
8073: esac
8074: else
8075: # PORTME Check for flag to pass linker flags through the system compiler.
8076: case $host_os in
8077: aix*)
8078: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8079: if test "$host_cpu" = ia64; then
8080: # AIX 5 now supports IA64 processor
8081: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8082: else
8083: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
8084: fi
8085: ;;
8086: darwin*)
8087: # PIC is the default on this platform
8088: # Common symbols not allowed in MH_DYLIB files
8089: case $cc_basename in
8090: xlc*)
8091: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
8092: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8093: ;;
8094: esac
8095: ;;
8096:
8097: mingw* | cygwin* | pw32* | os2*)
8098: # This hack is so that the source file can tell whether it is being
8099: # built for inclusion in a dll (and should export symbols for example).
8100: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
8101: ;;
8102:
8103: hpux9* | hpux10* | hpux11*)
8104: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8105: # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8106: # not for PA HP-UX.
8107: case $host_cpu in
8108: hppa*64*|ia64*)
8109: # +Z the default
8110: ;;
8111: *)
8112: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8113: ;;
8114: esac
8115: # Is there a better lt_prog_compiler_static that works with the bundled CC?
8116: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
8117: ;;
8118:
8119: irix5* | irix6* | nonstopux*)
8120: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8121: # PIC (with -KPIC) is the default.
8122: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8123: ;;
8124:
8125: newsos6)
8126: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8127: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8128: ;;
8129:
8130: linux* | k*bsd*-gnu)
8131: case $cc_basename in
8132: # old Intel for x86_64 which still supported -KPIC.
8133: ecc*)
8134: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8135: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8136: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
8137: ;;
8138: # icc used to be incompatible with GCC.
8139: # ICC 10 doesn't accept -KPIC any more.
8140: icc*)
8141: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8142: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8143: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
8144: ;;
8145: pgcc* | pgf77* | pgf90* | pgf95*)
8146: # Portland Group compilers (*not* the Pentium gcc compiler,
8147: # which looks to be a dead project)
8148: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8149: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8150: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8151: ;;
8152: ccc*)
8153: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8154: # All Alpha code is PIC.
8155: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8156: ;;
8157: *)
8158: case `$CC -V 2>&1 | sed 5q` in
8159: *Sun\ C*)
8160: # Sun C 5.9
8161: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8162: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8163: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8164: ;;
8165: *Sun\ F*)
8166: # Sun Fortran 8.3 passes all unrecognized flags to the linker
8167: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8168: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8169: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
8170: ;;
8171: esac
8172: ;;
8173: esac
8174: ;;
8175:
8176: osf3* | osf4* | osf5*)
8177: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8178: # All OSF/1 code is PIC.
8179: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8180: ;;
8181:
8182: rdos*)
8183: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8184: ;;
8185:
8186: solaris*)
8187: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8188: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8189: case $cc_basename in
8190: f77* | f90* | f95*)
8191: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
8192: *)
8193: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
8194: esac
8195: ;;
8196:
8197: sunos4*)
8198: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8199: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8200: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8201: ;;
8202:
8203: sysv4 | sysv4.2uw2* | sysv4.3*)
8204: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8205: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8206: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8207: ;;
8208:
8209: sysv4*MP*)
8210: if test -d /usr/nec ;then
8211: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
8212: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8213: fi
8214: ;;
8215:
8216: sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8217: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8218: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8219: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8220: ;;
8221:
8222: unicos*)
8223: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8224: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8225: ;;
8226:
8227: uts4*)
8228: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8229: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8230: ;;
8231:
8232: *)
8233: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8234: ;;
8235: esac
8236: fi
8237: ])
8238: AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
8239:
8240: #
8241: # Check to make sure the PIC flag actually works.
8242: #
8243: if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
8244: AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
8245: _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
8246: [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
8247: [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
8248: "" | " "*) ;;
8249: *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
8250: esac],
8251: [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8252: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
8253: fi
8254: case $host_os in
8255: # For platforms which do not support PIC, -DPIC is meaningless:
8256: *djgpp*)
8257: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8258: ;;
8259: *)
8260: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
8261: ;;
8262: esac
8263:
8264: #
8265: # Check to make sure the static flag actually works.
8266: #
8267: wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
8268: AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
8269: _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
8270: $lt_tmp_static_flag,
8271: [],
8272: [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
8273: ])
8274:
8275:
8276: # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
8277: # ------------------------------------
8278: # See if the linker supports building shared libraries.
8279: AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
8280: [AC_REQUIRE([LT_AC_PROG_SED])dnl
8281: AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8282: ifelse([$1],[CXX],[
8283: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8284: case $host_os in
8285: aix[[4-9]]*)
8286: # If we're using GNU nm, then we don't want the "-C" option.
8287: # -C means demangle to AIX nm, but means don't demangle with GNU nm
8288: if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8289: _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'
8290: else
8291: _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'
8292: fi
8293: ;;
8294: pw32*)
8295: _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
8296: ;;
8297: cygwin* | mingw*)
8298: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
8299: ;;
8300: *)
8301: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8302: ;;
8303: esac
8304: _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8305: ],[
8306: runpath_var=
8307: _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8308: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8309: _LT_AC_TAGVAR(archive_cmds, $1)=
8310: _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8311: _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
8312: _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
8313: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8314: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8315: _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
8316: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8317: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8318: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8319: _LT_AC_TAGVAR(hardcode_direct, $1)=no
8320: _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8321: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8322: _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8323: _LT_AC_TAGVAR(hardcode_automatic, $1)=no
8324: _LT_AC_TAGVAR(module_cmds, $1)=
8325: _LT_AC_TAGVAR(module_expsym_cmds, $1)=
8326: _LT_AC_TAGVAR(always_export_symbols, $1)=no
8327: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8328: # include_expsyms should be a list of space-separated symbols to be *always*
8329: # included in the symbol list
8330: _LT_AC_TAGVAR(include_expsyms, $1)=
8331: # exclude_expsyms can be an extended regexp of symbols to exclude
8332: # it will be wrapped by ` (' and `)$', so one must not match beginning or
8333: # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8334: # as well as any symbol that contains `d'.
8335: _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8336: # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8337: # platforms (ab)use it in PIC code, but their linkers get confused if
8338: # the symbol is explicitly referenced. Since portable code cannot
8339: # rely on this symbol name, it's probably fine to never include it in
8340: # preloaded symbol tables.
8341: # Exclude shared library initialization/finalization symbols.
8342: dnl Note also adjust exclude_expsyms for C++ above.
8343: extract_expsyms_cmds=
8344: # Just being paranoid about ensuring that cc_basename is set.
8345: _LT_CC_BASENAME([$compiler])
8346: case $host_os in
8347: cygwin* | mingw* | pw32*)
8348: # FIXME: the MSVC++ port hasn't been tested in a loooong time
8349: # When not using gcc, we currently assume that we are using
8350: # Microsoft Visual C++.
8351: if test "$GCC" != yes; then
8352: with_gnu_ld=no
8353: fi
8354: ;;
8355: interix*)
8356: # we just hope/assume this is gcc and not c89 (= MSVC++)
8357: with_gnu_ld=yes
8358: ;;
8359: openbsd*)
8360: with_gnu_ld=no
8361: ;;
8362: esac
8363:
8364: _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8365: if test "$with_gnu_ld" = yes; then
8366: # If archive_cmds runs LD, not CC, wlarc should be empty
8367: wlarc='${wl}'
8368:
8369: # Set some defaults for GNU ld with shared library support. These
8370: # are reset later if shared libraries are not supported. Putting them
8371: # here allows them to be overridden if necessary.
8372: runpath_var=LD_RUN_PATH
8373: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8374: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8375: # ancient GNU ld didn't support --whole-archive et. al.
8376: if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8377: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8378: else
8379: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8380: fi
8381: supports_anon_versioning=no
8382: case `$LD -v 2>/dev/null` in
8383: *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
8384: *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8385: *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8386: *\ 2.11.*) ;; # other 2.11 versions
8387: *) supports_anon_versioning=yes ;;
8388: esac
8389:
8390: # See if GNU ld supports shared libraries.
8391: case $host_os in
8392: aix[[3-9]]*)
8393: # On AIX/PPC, the GNU linker is very broken
8394: if test "$host_cpu" != ia64; then
8395: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8396: cat <<EOF 1>&2
8397:
8398: *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8399: *** to be unable to reliably create shared libraries on AIX.
8400: *** Therefore, libtool is disabling shared libraries support. If you
8401: *** really care for shared libraries, you may want to modify your PATH
8402: *** so that a non-GNU linker is found, and then restart.
8403:
8404: EOF
8405: fi
8406: ;;
8407:
8408: amigaos*)
8409: _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)'
8410: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8411: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8412:
8413: # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8414: # that the semantics of dynamic libraries on AmigaOS, at least up
8415: # to version 4, is to share data among multiple programs linked
8416: # with the same dynamic library. Since this doesn't match the
8417: # behavior of shared libraries on other platforms, we can't use
8418: # them.
8419: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8420: ;;
8421:
8422: beos*)
8423: if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8424: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8425: # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8426: # support --undefined. This deserves some investigation. FIXME
8427: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8428: else
8429: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8430: fi
8431: ;;
8432:
8433: cygwin* | mingw* | pw32*)
8434: # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8435: # as there is no search path for DLLs.
8436: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8437: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8438: _LT_AC_TAGVAR(always_export_symbols, $1)=no
8439: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8440: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
8441:
8442: if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8443: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8444: # If the export-symbols file already is a .def file (1st line
8445: # is EXPORTS), use it as is; otherwise, prepend...
8446: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8447: cp $export_symbols $output_objdir/$soname.def;
8448: else
8449: echo EXPORTS > $output_objdir/$soname.def;
8450: cat $export_symbols >> $output_objdir/$soname.def;
8451: fi~
8452: $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8453: else
8454: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8455: fi
8456: ;;
8457:
8458: interix[[3-9]]*)
8459: _LT_AC_TAGVAR(hardcode_direct, $1)=no
8460: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8461: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8462: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8463: # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8464: # Instead, shared libraries are loaded at an image base (0x10000000 by
8465: # default) and relocated if they conflict, which is a slow very memory
8466: # consuming and fragmenting process. To avoid this, we pick a random,
8467: # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8468: # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8469: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8470: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8471: ;;
8472:
8473: gnu* | linux* | k*bsd*-gnu)
8474: if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8475: tmp_addflag=
8476: case $cc_basename,$host_cpu in
8477: pgcc*) # Portland Group C compiler
8478: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8479: tmp_addflag=' $pic_flag'
8480: ;;
8481: pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
8482: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8483: tmp_addflag=' $pic_flag -Mnomain' ;;
8484: ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8485: tmp_addflag=' -i_dynamic' ;;
8486: efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8487: tmp_addflag=' -i_dynamic -nofor_main' ;;
8488: ifc* | ifort*) # Intel Fortran compiler
8489: tmp_addflag=' -nofor_main' ;;
8490: esac
8491: case `$CC -V 2>&1 | sed 5q` in
8492: *Sun\ C*) # Sun C 5.9
8493: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8494: tmp_sharedflag='-G' ;;
8495: *Sun\ F*) # Sun Fortran 8.3
8496: tmp_sharedflag='-G' ;;
8497: *)
8498: tmp_sharedflag='-shared' ;;
8499: esac
8500: _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8501:
8502: if test $supports_anon_versioning = yes; then
8503: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
8504: cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8505: $echo "local: *; };" >> $output_objdir/$libname.ver~
8506: $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8507: fi
8508: else
8509: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8510: fi
8511: ;;
8512:
8513: netbsd*)
8514: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8515: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8516: wlarc=
8517: else
8518: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8519: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8520: fi
8521: ;;
8522:
8523: solaris*)
8524: if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8525: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8526: cat <<EOF 1>&2
8527:
8528: *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8529: *** create shared libraries on Solaris systems. Therefore, libtool
8530: *** is disabling shared libraries support. We urge you to upgrade GNU
8531: *** binutils to release 2.9.1 or newer. Another option is to modify
8532: *** your PATH or compiler configuration so that the native linker is
8533: *** used, and then restart.
8534:
8535: EOF
8536: elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8537: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8538: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8539: else
8540: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8541: fi
8542: ;;
8543:
8544: sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8545: case `$LD -v 2>&1` in
8546: *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
8547: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8548: cat <<_LT_EOF 1>&2
8549:
8550: *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
8551: *** reliably create shared libraries on SCO systems. Therefore, libtool
8552: *** is disabling shared libraries support. We urge you to upgrade GNU
8553: *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
8554: *** your PATH or compiler configuration so that the native linker is
8555: *** used, and then restart.
8556:
8557: _LT_EOF
8558: ;;
8559: *)
8560: if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8561: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
8562: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
8563: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
8564: else
8565: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8566: fi
8567: ;;
8568: esac
8569: ;;
8570:
8571: sunos4*)
8572: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8573: wlarc=
8574: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8575: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8576: ;;
8577:
8578: *)
8579: if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8580: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8581: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8582: else
8583: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8584: fi
8585: ;;
8586: esac
8587:
8588: if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
8589: runpath_var=
8590: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8591: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8592: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8593: fi
8594: else
8595: # PORTME fill in a description of your system's linker (not GNU ld)
8596: case $host_os in
8597: aix3*)
8598: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8599: _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8600: _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'
8601: # Note: this linker hardcodes the directories in LIBPATH if there
8602: # are no directories specified by -L.
8603: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8604: if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
8605: # Neither direct hardcoding nor static linking is supported with a
8606: # broken collect2.
8607: _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8608: fi
8609: ;;
8610:
8611: aix[[4-9]]*)
8612: if test "$host_cpu" = ia64; then
8613: # On IA64, the linker does run time linking by default, so we don't
8614: # have to do anything special.
8615: aix_use_runtimelinking=no
8616: exp_sym_flag='-Bexport'
8617: no_entry_flag=""
8618: else
8619: # If we're using GNU nm, then we don't want the "-C" option.
8620: # -C means demangle to AIX nm, but means don't demangle with GNU nm
8621: if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8622: _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'
8623: else
8624: _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'
8625: fi
8626: aix_use_runtimelinking=no
8627:
8628: # Test if we are trying to use run time linking or normal
8629: # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8630: # need to do runtime linking.
8631: case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8632: for ld_flag in $LDFLAGS; do
8633: if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8634: aix_use_runtimelinking=yes
8635: break
8636: fi
8637: done
8638: ;;
8639: esac
8640:
8641: exp_sym_flag='-bexport'
8642: no_entry_flag='-bnoentry'
8643: fi
8644:
8645: # When large executables or shared objects are built, AIX ld can
8646: # have problems creating the table of contents. If linking a library
8647: # or program results in "error TOC overflow" add -mminimal-toc to
8648: # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8649: # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8650:
8651: _LT_AC_TAGVAR(archive_cmds, $1)=''
8652: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8653: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8654: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8655:
8656: if test "$GCC" = yes; then
8657: case $host_os in aix4.[[012]]|aix4.[[012]].*)
8658: # We only want to do this on AIX 4.2 and lower, the check
8659: # below for broken collect2 doesn't work under 4.3+
8660: collect2name=`${CC} -print-prog-name=collect2`
8661: if test -f "$collect2name" && \
8662: strings "$collect2name" | grep resolve_lib_name >/dev/null
8663: then
8664: # We have reworked collect2
8665: :
8666: else
8667: # We have old collect2
8668: _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8669: # It fails to find uninstalled libraries when the uninstalled
8670: # path is not listed in the libpath. Setting hardcode_minus_L
8671: # to unsupported forces relinking
8672: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8673: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8674: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8675: fi
8676: ;;
8677: esac
8678: shared_flag='-shared'
8679: if test "$aix_use_runtimelinking" = yes; then
8680: shared_flag="$shared_flag "'${wl}-G'
8681: fi
8682: else
8683: # not using gcc
8684: if test "$host_cpu" = ia64; then
8685: # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8686: # chokes on -Wl,-G. The following line is correct:
8687: shared_flag='-G'
8688: else
8689: if test "$aix_use_runtimelinking" = yes; then
8690: shared_flag='${wl}-G'
8691: else
8692: shared_flag='${wl}-bM:SRE'
8693: fi
8694: fi
8695: fi
8696:
8697: # It seems that -bexpall does not export symbols beginning with
8698: # underscore (_), so it is better to generate a list of symbols to export.
8699: _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8700: if test "$aix_use_runtimelinking" = yes; then
8701: # Warning - without using the other runtime loading flags (-brtl),
8702: # -berok will link without error, but may produce a broken library.
8703: _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8704: # Determine the default libpath from the value encoded in an empty executable.
8705: _LT_AC_SYS_LIBPATH_AIX
8706: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8707: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8708: else
8709: if test "$host_cpu" = ia64; then
8710: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8711: _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8712: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
8713: else
8714: # Determine the default libpath from the value encoded in an empty executable.
8715: _LT_AC_SYS_LIBPATH_AIX
8716: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8717: # Warning - without using the other run time loading flags,
8718: # -berok will link without error, but may produce a broken library.
8719: _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8720: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8721: # Exported symbols can be pulled into shared objects from archives
8722: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8723: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8724: # This is similar to how AIX traditionally builds its shared libraries.
8725: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8726: fi
8727: fi
8728: ;;
8729:
8730: amigaos*)
8731: _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)'
8732: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8733: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8734: # see comment about different semantics on the GNU ld section
8735: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8736: ;;
8737:
8738: bsdi[[45]]*)
8739: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
8740: ;;
8741:
8742: cygwin* | mingw* | pw32*)
8743: # When not using gcc, we currently assume that we are using
8744: # Microsoft Visual C++.
8745: # hardcode_libdir_flag_spec is actually meaningless, as there is
8746: # no search path for DLLs.
8747: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8748: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8749: # Tell ltmain to make .lib files, not .a files.
8750: libext=lib
8751: # Tell ltmain to make .dll files, not .so files.
8752: shrext_cmds=".dll"
8753: # FIXME: Setting linknames here is a bad hack.
8754: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8755: # The linker will automatically build a .lib file if we build a DLL.
8756: _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
8757: # FIXME: Should let the user specify the lib program.
8758: _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
8759: _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
8760: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8761: ;;
8762:
8763: darwin* | rhapsody*)
8764: case $host_os in
8765: rhapsody* | darwin1.[[012]])
8766: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
8767: ;;
8768: *) # Darwin 1.3 on
8769: if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8770: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8771: else
8772: case ${MACOSX_DEPLOYMENT_TARGET} in
8773: 10.[[012]])
8774: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8775: ;;
8776: 10.*)
8777: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
8778: ;;
8779: esac
8780: fi
8781: ;;
8782: esac
8783: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8784: _LT_AC_TAGVAR(hardcode_direct, $1)=no
8785: _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8786: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8787: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
8788: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8789: if test "$GCC" = yes ; then
8790: output_verbose_link_cmd='echo'
8791: _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
8792: _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
8793: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
8794: _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
8795: else
8796: case $cc_basename in
8797: xlc*)
8798: output_verbose_link_cmd='echo'
8799: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
8800: _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8801: # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8802: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8803: _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8804: ;;
8805: *)
8806: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8807: ;;
8808: esac
8809: fi
8810: ;;
8811:
8812: dgux*)
8813: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8814: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8815: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8816: ;;
8817:
1.1.1.3 ! misho 8818: freebsd1*)
1.1 misho 8819: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8820: ;;
8821:
8822: # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8823: # support. Future versions do this automatically, but an explicit c++rt0.o
8824: # does not break anything, and helps significantly (at the cost of a little
8825: # extra space).
8826: freebsd2.2*)
8827: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8828: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8829: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8830: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8831: ;;
8832:
8833: # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8834: freebsd2*)
8835: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8836: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8837: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8838: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8839: ;;
8840:
8841: # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8842: freebsd* | dragonfly*)
8843: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8844: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8845: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8846: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8847: ;;
8848:
8849: hpux9*)
8850: if test "$GCC" = yes; then
8851: _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8852: else
8853: _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'
8854: fi
8855: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8856: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8857: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8858:
8859: # hardcode_minus_L: Not really in the search PATH,
8860: # but as the default location of the library.
8861: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8862: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8863: ;;
8864:
8865: hpux10*)
8866: if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8867: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8868: else
8869: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8870: fi
8871: if test "$with_gnu_ld" = no; then
8872: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8873: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8874:
8875: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8876: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8877:
8878: # hardcode_minus_L: Not really in the search PATH,
8879: # but as the default location of the library.
8880: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8881: fi
8882: ;;
8883:
8884: hpux11*)
8885: if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8886: case $host_cpu in
8887: hppa*64*)
8888: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8889: ;;
8890: ia64*)
8891: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8892: ;;
8893: *)
8894: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8895: ;;
8896: esac
8897: else
8898: case $host_cpu in
8899: hppa*64*)
8900: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8901: ;;
8902: ia64*)
8903: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8904: ;;
8905: *)
8906: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8907: ;;
8908: esac
8909: fi
8910: if test "$with_gnu_ld" = no; then
8911: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8912: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8913:
8914: case $host_cpu in
8915: hppa*64*|ia64*)
8916: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8917: _LT_AC_TAGVAR(hardcode_direct, $1)=no
8918: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8919: ;;
8920: *)
8921: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8922: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8923:
8924: # hardcode_minus_L: Not really in the search PATH,
8925: # but as the default location of the library.
8926: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8927: ;;
8928: esac
8929: fi
8930: ;;
8931:
8932: irix5* | irix6* | nonstopux*)
8933: if test "$GCC" = yes; then
8934: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8935: else
8936: _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'
8937: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
8938: fi
8939: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8940: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8941: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8942: ;;
8943:
8944: netbsd*)
8945: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8946: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
8947: else
8948: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
8949: fi
8950: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8951: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8952: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8953: ;;
8954:
8955: newsos6)
8956: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8957: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8958: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8959: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8960: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8961: ;;
8962:
8963: openbsd*)
8964: if test -f /usr/libexec/ld.so; then
8965: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8966: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8967: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8968: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8969: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8970: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8971: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8972: else
8973: case $host_os in
8974: openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
8975: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8976: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8977: ;;
8978: *)
8979: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8980: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8981: ;;
8982: esac
8983: fi
8984: else
8985: _LT_AC_TAGVAR(ld_shlibs, $1)=no
8986: fi
8987: ;;
8988:
8989: os2*)
8990: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8991: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8992: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8993: _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
8994: _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8995: ;;
8996:
8997: osf3*)
8998: if test "$GCC" = yes; then
8999: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9000: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9001: else
9002: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9003: _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'
9004: fi
9005: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9006: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9007: ;;
9008:
9009: osf4* | osf5*) # as osf3* with the addition of -msym flag
9010: if test "$GCC" = yes; then
9011: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9012: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9013: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9014: else
9015: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9016: _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'
9017: _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~
9018: $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
9019:
9020: # Both c and cxx compiler support -rpath directly
9021: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9022: fi
9023: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9024: ;;
9025:
9026: solaris*)
9027: _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
9028: if test "$GCC" = yes; then
9029: wlarc='${wl}'
9030: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9031: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9032: $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9033: else
9034: wlarc=''
9035: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9036: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9037: $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9038: fi
9039: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9040: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9041: case $host_os in
9042: solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9043: *)
9044: # The compiler driver will combine and reorder linker options,
9045: # but understands `-z linker_flag'. GCC discards it without `$wl',
9046: # but is careful enough not to reorder.
9047: # Supported since Solaris 2.6 (maybe 2.5.1?)
9048: if test "$GCC" = yes; then
9049: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9050: else
9051: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9052: fi
9053: ;;
9054: esac
9055: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9056: ;;
9057:
9058: sunos4*)
9059: if test "x$host_vendor" = xsequent; then
9060: # Use $CC to link under sequent, because it throws in some extra .o
9061: # files that make .init and .fini sections work.
9062: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9063: else
9064: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9065: fi
9066: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9067: _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9068: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9069: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9070: ;;
9071:
9072: sysv4)
9073: case $host_vendor in
9074: sni)
9075: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9076: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
9077: ;;
9078: siemens)
9079: ## LD is ld it makes a PLAMLIB
9080: ## CC just makes a GrossModule.
9081: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9082: _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
9083: _LT_AC_TAGVAR(hardcode_direct, $1)=no
9084: ;;
9085: motorola)
9086: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9087: _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
9088: ;;
9089: esac
9090: runpath_var='LD_RUN_PATH'
9091: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9092: ;;
9093:
9094: sysv4.3*)
9095: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9096: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9097: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
9098: ;;
9099:
9100: sysv4*MP*)
9101: if test -d /usr/nec; then
9102: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9103: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9104: runpath_var=LD_RUN_PATH
9105: hardcode_runpath_var=yes
9106: _LT_AC_TAGVAR(ld_shlibs, $1)=yes
9107: fi
9108: ;;
9109:
9110: sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9111: _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9112: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9113: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9114: runpath_var='LD_RUN_PATH'
9115:
9116: if test "$GCC" = yes; then
9117: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9118: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9119: else
9120: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9121: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9122: fi
9123: ;;
9124:
9125: sysv5* | sco3.2v5* | sco5v6*)
9126: # Note: We can NOT use -z defs as we might desire, because we do not
9127: # link with -lc, and that would cause any symbols used from libc to
9128: # always be unresolved, which means just about no library would
9129: # ever link correctly. If we're not using GNU ld we use -z text
9130: # though, which does catch some bad symbols but isn't as heavy-handed
9131: # as -z defs.
9132: _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9133: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
9134: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9135: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9136: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
9137: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
9138: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9139: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
9140: runpath_var='LD_RUN_PATH'
9141:
9142: if test "$GCC" = yes; then
9143: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9144: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9145: else
9146: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9147: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9148: fi
9149: ;;
9150:
9151: uts4*)
9152: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9153: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9154: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9155: ;;
9156:
9157: *)
9158: _LT_AC_TAGVAR(ld_shlibs, $1)=no
9159: ;;
9160: esac
9161: fi
9162: ])
9163: AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9164: test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9165:
9166: #
9167: # Do we need to explicitly link libc?
9168: #
9169: case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
9170: x|xyes)
9171: # Assume -lc should be added
9172: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
9173:
9174: if test "$enable_shared" = yes && test "$GCC" = yes; then
9175: case $_LT_AC_TAGVAR(archive_cmds, $1) in
9176: *'~'*)
9177: # FIXME: we may have to deal with multi-command sequences.
9178: ;;
9179: '$CC '*)
9180: # Test whether the compiler implicitly links with -lc since on some
9181: # systems, -lgcc has to come before -lc. If gcc already passes -lc
9182: # to ld, don't add -lc before -lgcc.
9183: AC_MSG_CHECKING([whether -lc should be explicitly linked in])
9184: $rm conftest*
9185: echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9186:
9187: if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
9188: soname=conftest
9189: lib=conftest
9190: libobjs=conftest.$ac_objext
9191: deplibs=
9192: wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9193: pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9194: compiler_flags=-v
9195: linker_flags=-v
9196: verstring=
9197: output_objdir=.
9198: libname=conftest
9199: lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
9200: _LT_AC_TAGVAR(allow_undefined_flag, $1)=
9201: if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
9202: then
9203: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9204: else
9205: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
9206: fi
9207: _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
9208: else
9209: cat conftest.err 1>&5
9210: fi
9211: $rm conftest*
9212: AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
9213: ;;
9214: esac
9215: fi
9216: ;;
9217: esac
9218: ])# AC_LIBTOOL_PROG_LD_SHLIBS
9219:
9220:
9221: # _LT_AC_FILE_LTDLL_C
9222: # -------------------
9223: # Be careful that the start marker always follows a newline.
9224: AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
9225: # /* ltdll.c starts here */
9226: # #define WIN32_LEAN_AND_MEAN
9227: # #include <windows.h>
9228: # #undef WIN32_LEAN_AND_MEAN
9229: # #include <stdio.h>
9230: #
9231: # #ifndef __CYGWIN__
9232: # # ifdef __CYGWIN32__
9233: # # define __CYGWIN__ __CYGWIN32__
9234: # # endif
9235: # #endif
9236: #
9237: # #ifdef __cplusplus
9238: # extern "C" {
9239: # #endif
9240: # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
9241: # #ifdef __cplusplus
9242: # }
9243: # #endif
9244: #
9245: # #ifdef __CYGWIN__
9246: # #include <cygwin/cygwin_dll.h>
9247: # DECLARE_CYGWIN_DLL( DllMain );
9248: # #endif
9249: # HINSTANCE __hDllInstance_base;
9250: #
9251: # BOOL APIENTRY
9252: # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
9253: # {
9254: # __hDllInstance_base = hInst;
9255: # return TRUE;
9256: # }
9257: # /* ltdll.c ends here */
9258: ])# _LT_AC_FILE_LTDLL_C
9259:
9260:
9261: # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
9262: # ---------------------------------
9263: AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
9264:
9265:
9266: # old names
9267: AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
9268: AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9269: AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9270: AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9271: AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9272: AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
9273: AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
9274:
9275: # This is just to silence aclocal about the macro not being used
9276: ifelse([AC_DISABLE_FAST_INSTALL])
9277:
9278: ############################################################
9279: # NOTE: This macro has been submitted for inclusion into #
9280: # GNU Autoconf as AC_PROG_SED. When it is available in #
9281: # a released version of Autoconf we should remove this #
9282: # macro and use it instead. #
9283: ############################################################
9284: # LT_AC_PROG_SED
9285: # --------------
9286: # Check for a fully-functional sed program, that truncates
9287: # as few characters as possible. Prefer GNU sed if found.
9288: AC_DEFUN([LT_AC_PROG_SED],
9289: [AC_MSG_CHECKING([for a sed that does not truncate output])
9290: AC_CACHE_VAL(lt_cv_path_SED,
9291: [# Loop through the user's path and test for sed and gsed.
9292: # Then use that list of sed's as ones to test for truncation.
9293: as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9294: for as_dir in $PATH
9295: do
9296: IFS=$as_save_IFS
9297: test -z "$as_dir" && as_dir=.
9298: for lt_ac_prog in sed gsed; do
9299: for ac_exec_ext in '' $ac_executable_extensions; do
9300: if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9301: lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9302: fi
9303: done
9304: done
9305: done
9306: lt_ac_max=0
9307: lt_ac_count=0
9308: # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9309: # along with /bin/sed that truncates output.
9310: for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9311: test ! -f $lt_ac_sed && continue
9312: cat /dev/null > conftest.in
9313: lt_ac_count=0
9314: echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9315: # Check for GNU sed and select it if it is found.
9316: if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9317: lt_cv_path_SED=$lt_ac_sed
9318: break
9319: fi
9320: while true; do
9321: cat conftest.in conftest.in >conftest.tmp
9322: mv conftest.tmp conftest.in
9323: cp conftest.in conftest.nl
9324: echo >>conftest.nl
9325: $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9326: cmp -s conftest.out conftest.nl || break
9327: # 10000 chars as input seems more than enough
9328: test $lt_ac_count -gt 10 && break
9329: lt_ac_count=`expr $lt_ac_count + 1`
9330: if test $lt_ac_count -gt $lt_ac_max; then
9331: lt_ac_max=$lt_ac_count
9332: lt_cv_path_SED=$lt_ac_sed
9333: fi
9334: done
9335: done
9336: ])
9337: SED=$lt_cv_path_SED
9338: AC_MSG_RESULT([$SED])
9339: ])
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>