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