libtool.m4.in
上传用户:center1979
上传日期:2022-07-26
资源大小:50633k
文件大小:203k
源码类别:

OpenGL

开发平台:

Visual C++

  1.     esac
  2.     ;;
  3.   freebsd[12]*)
  4.     # C++ shared libraries reported to be fairly broken before switch to ELF
  5.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6.     ;;
  7.   freebsd-elf*)
  8.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  9.     ;;
  10.   freebsd* | kfreebsd*-gnu)
  11.     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  12.     # conventions
  13.     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  14.     ;;
  15.   gnu*)
  16.     ;;
  17.   hpux9*)
  18.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  19.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  20.     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  21.     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  22.     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  23. # but as the default
  24. # location of the library.
  25.     case $cc_basename in
  26.     CC)
  27.       # FIXME: insert proper C++ library support
  28.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  29.       ;;
  30.     aCC)
  31.       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  32.       # Commands to make compiler produce verbose output that lists
  33.       # what "hidden" libraries, object files and flags are used when
  34.       # linking a shared library.
  35.       #
  36.       # There doesn't appear to be a way to prevent this compiler from
  37.       # explicitly linking system object files so we need to strip them
  38.       # from the output so that they don't get included in the library
  39.       # dependencies.
  40.       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  41.       ;;
  42.     *)
  43.       if test "$GXX" = yes; then
  44.         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  45.       else
  46.         # FIXME: insert proper C++ library support
  47.         _LT_AC_TAGVAR(ld_shlibs, $1)=no
  48.       fi
  49.       ;;
  50.     esac
  51.     ;;
  52.   hpux10*|hpux11*)
  53.     if test $with_gnu_ld = no; then
  54.       case "$host_cpu" in
  55.       hppa*64*)
  56. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  57. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  58. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  59.         ;;
  60.       ia64*)
  61. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  62.         ;;
  63.       *)
  64. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  65. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  66. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  67.         ;;
  68.       esac
  69.     fi
  70.     case "$host_cpu" in
  71.     hppa*64*)
  72.       _LT_AC_TAGVAR(hardcode_direct, $1)=no
  73.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  74.       ;;
  75.     ia64*)
  76.       _LT_AC_TAGVAR(hardcode_direct, $1)=no
  77.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  78.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  79.       # but as the default
  80.       # location of the library.
  81.       ;;
  82.     *)
  83.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  84.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  85.       # but as the default
  86.       # location of the library.
  87.       ;;
  88.     esac
  89.     case $cc_basename in
  90.       CC)
  91. # FIXME: insert proper C++ library support
  92. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  93. ;;
  94.       aCC)
  95. case "$host_cpu" in
  96. hppa*64*|ia64*)
  97.   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  98.   ;;
  99. *)
  100.   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
  101.   ;;
  102. esac
  103. # Commands to make compiler produce verbose output that lists
  104. # what "hidden" libraries, object files and flags are used when
  105. # linking a shared library.
  106. #
  107. # There doesn't appear to be a way to prevent this compiler from
  108. # explicitly linking system object files so we need to strip them
  109. # from the output so that they don't get included in the library
  110. # dependencies.
  111. 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'
  112. ;;
  113.       *)
  114. if test "$GXX" = yes; then
  115.   if test $with_gnu_ld = no; then
  116.     case "$host_cpu" in
  117.     ia64*|hppa*64*)
  118.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  119.       ;;
  120.     *)
  121.       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
  122.       ;;
  123.     esac
  124.   fi
  125. else
  126.   # FIXME: insert proper C++ library support
  127.   _LT_AC_TAGVAR(ld_shlibs, $1)=no
  128. fi
  129. ;;
  130.     esac
  131.     ;;
  132.   irix5* | irix6*)
  133.     case $cc_basename in
  134.       CC)
  135. # SGI C++
  136. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  137. # Archives containing C++ object files must be created using
  138. # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
  139. # necessary to make sure instantiated templates are included
  140. # in the archive.
  141. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  142. ;;
  143.       *)
  144. if test "$GXX" = yes; then
  145.   if test "$with_gnu_ld" = no; then
  146.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  147.   else
  148.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  149.   fi
  150. fi
  151. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  152. ;;
  153.     esac
  154.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  155.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  156.     ;;
  157.   linux*)
  158.     case $cc_basename in
  159.       KCC)
  160. # Kuck and Associates, Inc. (KAI) C++ Compiler
  161. # KCC will only create a shared library if the output file
  162. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  163. # to its proper name (with version) after linking.
  164. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '''s/([[^()0-9A-Za-z{}]])/\\1/g'''`; templib=`echo $lib | $SED -e "s/${tempext}..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o $templib; mv $templib $lib'
  165. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '''s/([[^()0-9A-Za-z{}]])/\\1/g'''`; templib=`echo $lib | $SED -e "s/${tempext}..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o $templib ${wl}-retain-symbols-file,$export_symbols; mv $templib $lib'
  166. # Commands to make compiler produce verbose output that lists
  167. # what "hidden" libraries, object files and flags are used when
  168. # linking a shared library.
  169. #
  170. # There doesn't appear to be a way to prevent this compiler from
  171. # explicitly linking system object files so we need to strip them
  172. # from the output so that they don't get included in the library
  173. # dependencies.
  174. 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'
  175. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  176. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  177. # Archives containing C++ object files must be created using
  178. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  179. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  180. ;;
  181.       icpc)
  182. # Intel C++
  183. with_gnu_ld=yes
  184. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  185. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
  186. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  187. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  188. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  189. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  190. ;;
  191.       cxx)
  192. # Compaq C++
  193. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
  194. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
  195. runpath_var=LD_RUN_PATH
  196. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  197. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  198. # Commands to make compiler produce verbose output that lists
  199. # what "hidden" libraries, object files and flags are used when
  200. # linking a shared library.
  201. #
  202. # There doesn't appear to be a way to prevent this compiler from
  203. # explicitly linking system object files so we need to strip them
  204. # from the output so that they don't get included in the library
  205. # dependencies.
  206. 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'
  207. ;;
  208.     esac
  209.     ;;
  210.   lynxos*)
  211.     # FIXME: insert proper C++ library support
  212.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  213.     ;;
  214.   m88k*)
  215.     # FIXME: insert proper C++ library support
  216.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  217.     ;;
  218.   mvs*)
  219.     case $cc_basename in
  220.       cxx)
  221. # FIXME: insert proper C++ library support
  222. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  223. ;;
  224.       *)
  225. # FIXME: insert proper C++ library support
  226. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  227. ;;
  228.     esac
  229.     ;;
  230.   netbsd*)
  231.     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  232.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  233.       wlarc=
  234.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  235.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  236.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  237.     fi
  238.     # Workaround some broken pre-1.5 toolchains
  239.     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  240.     ;;
  241.   osf3*)
  242.     case $cc_basename in
  243.       KCC)
  244. # Kuck and Associates, Inc. (KAI) C++ Compiler
  245. # KCC will only create a shared library if the output file
  246. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  247. # to its proper name (with version) after linking.
  248. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '''s/([[^()0-9A-Za-z{}]])/\\1/g'''`; templib=`echo $lib | $SED -e "s/${tempext}..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o $templib; mv $templib $lib'
  249. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  250. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  251. # Archives containing C++ object files must be created using
  252. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  253. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  254. ;;
  255.       RCC)
  256. # Rational C++ 2.4.1
  257. # FIXME: insert proper C++ library support
  258. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  259. ;;
  260.       cxx)
  261. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}*'
  262. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  263. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  264. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  265. # Commands to make compiler produce verbose output that lists
  266. # what "hidden" libraries, object files and flags are used when
  267. # linking a shared library.
  268. #
  269. # There doesn't appear to be a way to prevent this compiler from
  270. # explicitly linking system object files so we need to strip them
  271. # from the output so that they don't get included in the library
  272. # dependencies.
  273. 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'
  274. ;;
  275.       *)
  276. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  277.   _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}*'
  278.   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  279.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  280.   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  281.   # Commands to make compiler produce verbose output that lists
  282.   # what "hidden" libraries, object files and flags are used when
  283.   # linking a shared library.
  284.   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "-L"'
  285. else
  286.   # FIXME: insert proper C++ library support
  287.   _LT_AC_TAGVAR(ld_shlibs, $1)=no
  288. fi
  289. ;;
  290.     esac
  291.     ;;
  292.   osf4* | osf5*)
  293.     case $cc_basename in
  294.       KCC)
  295. # Kuck and Associates, Inc. (KAI) C++ Compiler
  296. # KCC will only create a shared library if the output file
  297. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  298. # to its proper name (with version) after linking.
  299. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '''s/([[^()0-9A-Za-z{}]])/\\1/g'''`; templib=`echo $lib | $SED -e "s/${tempext}..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o $templib; mv $templib $lib'
  300. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  301. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  302. # Archives containing C++ object files must be created using
  303. # the KAI C++ compiler.
  304. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  305. ;;
  306.       RCC)
  307. # Rational C++ 2.4.1
  308. # FIXME: insert proper C++ library support
  309. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  310. ;;
  311.       cxx)
  312. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved *'
  313. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  314. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\n" -exported_symbol "$i" >> $lib.exp; done~
  315.   echo "-hidden">> $lib.exp~
  316.   $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
  317.   $rm $lib.exp'
  318. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  319. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  320. # Commands to make compiler produce verbose output that lists
  321. # what "hidden" libraries, object files and flags are used when
  322. # linking a shared library.
  323. #
  324. # There doesn't appear to be a way to prevent this compiler from
  325. # explicitly linking system object files so we need to strip them
  326. # from the output so that they don't get included in the library
  327. # dependencies.
  328. 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'
  329. ;;
  330.       *)
  331. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  332.   _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}*'
  333.  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  334.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  335.   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  336.   # Commands to make compiler produce verbose output that lists
  337.   # what "hidden" libraries, object files and flags are used when
  338.   # linking a shared library.
  339.   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "-L"'
  340. else
  341.   # FIXME: insert proper C++ library support
  342.   _LT_AC_TAGVAR(ld_shlibs, $1)=no
  343. fi
  344. ;;
  345.     esac
  346.     ;;
  347.   psos*)
  348.     # FIXME: insert proper C++ library support
  349.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  350.     ;;
  351.   sco*)
  352.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  353.     case $cc_basename in
  354.       CC)
  355. # FIXME: insert proper C++ library support
  356. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  357. ;;
  358.       *)
  359. # FIXME: insert proper C++ library support
  360. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  361. ;;
  362.     esac
  363.     ;;
  364.   sunos4*)
  365.     case $cc_basename in
  366.       CC)
  367. # Sun C++ 4.x
  368. # FIXME: insert proper C++ library support
  369. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  370. ;;
  371.       lcc)
  372. # Lucid
  373. # FIXME: insert proper C++ library support
  374. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  375. ;;
  376.       *)
  377. # FIXME: insert proper C++ library support
  378. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  379. ;;
  380.     esac
  381.     ;;
  382.   solaris*)
  383.     case $cc_basename in
  384.       CC)
  385. # Sun C++ 4.2, 5.x and Centerline C++
  386. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  387. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
  388. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/(.*)/1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  389. $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
  390. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  391. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  392. case $host_os in
  393.   solaris2.[0-5] | solaris2.[0-5].*) ;;
  394.   *)
  395.     # The C++ compiler is used as linker so we must use $wl
  396.     # flag to pass the commands to the underlying system
  397.     # linker.
  398.     # Supported since Solaris 2.6 (maybe 2.5.1?)
  399.     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  400.     ;;
  401. esac
  402. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  403. # Commands to make compiler produce verbose output that lists
  404. # what "hidden" libraries, object files and flags are used when
  405. # linking a shared library.
  406. #
  407. # There doesn't appear to be a way to prevent this compiler from
  408. # explicitly linking system object files so we need to strip them
  409. # from the output so that they don't get included in the library
  410. # dependencies.
  411. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  412. # Archives containing C++ object files must be created using
  413. # "CC -xar", where "CC" is the Sun C++ compiler.  This is
  414. # necessary to make sure instantiated templates are included
  415. # in the archive.
  416. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  417. ;;
  418.       gcx)
  419. # Green Hills C++ Compiler
  420. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
  421. # The C++ compiler must be used to create the archive.
  422. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  423. ;;
  424.       *)
  425. # GNU C++ compiler with Solaris linker
  426. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  427.   _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  428.   if $CC --version | grep -v '^2.7' > /dev/null; then
  429.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
  430.     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/(.*)/1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  431. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
  432.     # Commands to make compiler produce verbose output that lists
  433.     # what "hidden" libraries, object files and flags are used when
  434.     # linking a shared library.
  435.     output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "-L""
  436.   else
  437.     # g++ 2.7 appears to require `-G' NOT `-shared' on this
  438.     # platform.
  439.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
  440.     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/(.*)/1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  441. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
  442.     # Commands to make compiler produce verbose output that lists
  443.     # what "hidden" libraries, object files and flags are used when
  444.     # linking a shared library.
  445.     output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "-L""
  446.   fi
  447.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  448. fi
  449. ;;
  450.     esac
  451.     ;;
  452.   sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  453.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  454.     ;;
  455.   tandem*)
  456.     case $cc_basename in
  457.       NCC)
  458. # NonStop-UX NCC 3.20
  459. # FIXME: insert proper C++ library support
  460. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  461. ;;
  462.       *)
  463. # FIXME: insert proper C++ library support
  464. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  465. ;;
  466.     esac
  467.     ;;
  468.   vxworks*)
  469.     # FIXME: insert proper C++ library support
  470.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  471.     ;;
  472.   *)
  473.     # FIXME: insert proper C++ library support
  474.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  475.     ;;
  476. esac
  477. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  478. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  479. _LT_AC_TAGVAR(GCC, $1)="$GXX"
  480. _LT_AC_TAGVAR(LD, $1)="$LD"
  481. ## CAVEAT EMPTOR:
  482. ## There is no encapsulation within the following macros, do not change
  483. ## the running order or otherwise move them around unless you know exactly
  484. ## what you are doing...
  485. AC_LIBTOOL_POSTDEP_PREDEP($1)
  486. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  487. AC_LIBTOOL_PROG_CC_C_O($1)
  488. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  489. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  490. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  491. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  492. AC_LIBTOOL_SYS_LIB_STRIP
  493. AC_LIBTOOL_DLOPEN_SELF($1)
  494. AC_LIBTOOL_CONFIG($1)
  495. AC_LANG_POP
  496. CC=$lt_save_CC
  497. LDCXX=$LD
  498. LD=$lt_save_LD
  499. GCC=$lt_save_GCC
  500. with_gnu_ldcxx=$with_gnu_ld
  501. with_gnu_ld=$lt_save_with_gnu_ld
  502. lt_cv_path_LDCXX=$lt_cv_path_LD
  503. lt_cv_path_LD=$lt_save_path_LD
  504. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  505. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  506. ])# AC_LIBTOOL_LANG_CXX_CONFIG
  507. # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  508. # ------------------------
  509. # Figure out "hidden" library dependencies from verbose
  510. # compiler output when linking a shared library.
  511. # Parse the compiler output and extract the necessary
  512. # objects, libraries and library flags.
  513. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
  514. dnl we can't use the lt_simple_compile_test_code here,
  515. dnl because it contains code intended for an executable,
  516. dnl not a library.  It's possible we should let each
  517. dnl tag define a new lt_????_link_test_code variable,
  518. dnl but it's only used here...
  519. ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
  520. int a;
  521. void foo (void) { a = 0; }
  522. EOF
  523. ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
  524. class Foo
  525. {
  526. public:
  527.   Foo (void) { a = 0; }
  528. private:
  529.   int a;
  530. };
  531. EOF
  532. ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
  533.       subroutine foo
  534.       implicit none
  535.       integer*4 a
  536.       a=0
  537.       return
  538.       end
  539. EOF
  540. ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
  541. public class foo {
  542.   private int a;
  543.   public void bar (void) {
  544.     a = 0;
  545.   }
  546. };
  547. EOF
  548. ])
  549. dnl Parse the compiler output and extract the necessary
  550. dnl objects, libraries and library flags.
  551. if AC_TRY_EVAL(ac_compile); then
  552.   # Parse the compiler output and extract the necessary
  553.   # objects, libraries and library flags.
  554.   # Sentinel used to keep track of whether or not we are before
  555.   # the conftest object file.
  556.   pre_test_object_deps_done=no
  557.   # The `*' in the case matches for architectures that use `case' in
  558.   # $output_verbose_cmd can trigger glob expansion during the loop
  559.   # eval without this substitution.
  560.   output_verbose_link_cmd="`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`"
  561.   for p in `eval $output_verbose_link_cmd`; do
  562.     case $p in
  563.     -L* | -R* | -l*)
  564.        # Some compilers place space between "-{L,R}" and the path.
  565.        # Remove the space.
  566.        if test $p = "-L" 
  567.   || test $p = "-R"; then
  568.  prev=$p
  569.  continue
  570.        else
  571.  prev=
  572.        fi
  573.        if test "$pre_test_object_deps_done" = no; then
  574.  case $p in
  575.  -L* | -R*)
  576.    # Internal compiler library paths should come after those
  577.    # provided the user.  The postdeps already come after the
  578.    # user supplied libs so there is no need to process them.
  579.    if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  580.      _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  581.    else
  582.      _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  583.    fi
  584.    ;;
  585.  # The "-l" case would never come before the object being
  586.  # linked, so don't bother handling this case.
  587.  esac
  588.        else
  589.  if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
  590.    _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
  591.  else
  592.    _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
  593.  fi
  594.        fi
  595.        ;;
  596.     *.$objext|*.$libext)
  597.        # This assumes that the test object file only shows up
  598.        # once in the compiler output.
  599.        if test "$p" = "conftest.$objext"; then
  600.  pre_test_object_deps_done=yes
  601.  continue
  602.        fi
  603.        if test "$pre_test_object_deps_done" = no; then
  604.  if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
  605.    _LT_AC_TAGVAR(predep_objects, $1)="$p"
  606.  else
  607.    _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
  608.  fi
  609.        else
  610.  if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
  611.    _LT_AC_TAGVAR(postdep_objects, $1)="$p"
  612.  else
  613.    _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
  614.  fi
  615.        fi
  616.        ;;
  617.     *) ;; # Ignore the rest.
  618.     esac
  619.   done
  620.   # Clean up.
  621.   rm -f a.out a.exe
  622. else
  623.   echo "libtool.m4: error: problem compiling $1 test program"
  624. fi
  625. $rm -f confest.$objext
  626. case " $_LT_AC_TAGVAR(postdeps, $1) " in
  627. *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  628. esac
  629. ])# AC_LIBTOOL_POSTDEP_PREDEP
  630. # AC_LIBTOOL_LANG_F77_CONFIG
  631. # ------------------------
  632. # Ensure that the configuration vars for the C compiler are
  633. # suitably defined.  Those variables are subsequently used by
  634. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  635. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
  636. AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
  637. [AC_REQUIRE([AC_PROG_F77])
  638. AC_LANG_PUSH(Fortran 77)
  639. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  640. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  641. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  642. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  643. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  644. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  645. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  646. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  647. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  648. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  649. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  650. _LT_AC_TAGVAR(module_cmds, $1)=
  651. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  652. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  653. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  654. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  655. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  656. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  657. # Source file extension for f77 test sources.
  658. ac_ext=f
  659. # Object file extension for compiled f77 test sources.
  660. objext=o
  661. _LT_AC_TAGVAR(objext, $1)=$objext
  662. # Code to be used in simple compile tests
  663. lt_simple_compile_test_code="      subroutine tn      returnn      endn"
  664. # Code to be used in simple link tests
  665. lt_simple_link_test_code="      program tn      endn"
  666. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  667. _LT_AC_SYS_COMPILER
  668. # Allow CC to be a program name with arguments.
  669. lt_save_CC="$CC"
  670. CC=${F77-"f77"}
  671. compiler=$CC
  672. _LT_AC_TAGVAR(compiler, $1)=$CC
  673. cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
  674. AC_MSG_CHECKING([if libtool supports shared libraries])
  675. AC_MSG_RESULT([$can_build_shared])
  676. AC_MSG_CHECKING([whether to build shared libraries])
  677. test "$can_build_shared" = "no" && enable_shared=no
  678. # On AIX, shared libraries and static libraries use the same namespace, and
  679. # are all built from PIC.
  680. case "$host_os" in
  681. aix3*)
  682.   test "$enable_shared" = yes && enable_static=no
  683.   if test -n "$RANLIB"; then
  684.     archive_cmds="$archive_cmds~$RANLIB $lib"
  685.     postinstall_cmds='$RANLIB $lib'
  686.   fi
  687.   ;;
  688. aix4*)
  689.   test "$enable_shared" = yes && enable_static=no
  690.   ;;
  691. esac
  692. AC_MSG_RESULT([$enable_shared])
  693. AC_MSG_CHECKING([whether to build static libraries])
  694. # Make sure either enable_shared or enable_static is yes.
  695. test "$enable_shared" = yes || enable_static=yes
  696. AC_MSG_RESULT([$enable_static])
  697. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  698. _LT_AC_TAGVAR(GCC, $1)="$G77"
  699. _LT_AC_TAGVAR(LD, $1)="$LD"
  700. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  701. AC_LIBTOOL_PROG_CC_C_O($1)
  702. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  703. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  704. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  705. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  706. AC_LIBTOOL_SYS_LIB_STRIP
  707. AC_LIBTOOL_CONFIG($1)
  708. AC_LANG_POP
  709. CC="$lt_save_CC"
  710. ])# AC_LIBTOOL_LANG_F77_CONFIG
  711. # AC_LIBTOOL_LANG_GCJ_CONFIG
  712. # --------------------------
  713. # Ensure that the configuration vars for the C compiler are
  714. # suitably defined.  Those variables are subsequently used by
  715. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  716. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
  717. AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
  718. [AC_LANG_SAVE
  719. # Source file extension for Java test sources.
  720. ac_ext=java
  721. # Object file extension for compiled Java test sources.
  722. objext=o
  723. _LT_AC_TAGVAR(objext, $1)=$objext
  724. # Code to be used in simple compile tests
  725. lt_simple_compile_test_code="class foo {}n"
  726. # Code to be used in simple link tests
  727. lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }n'
  728. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  729. _LT_AC_SYS_COMPILER
  730. # Allow CC to be a program name with arguments.
  731. lt_save_CC="$CC"
  732. CC=${GCJ-"gcj"}
  733. compiler=$CC
  734. _LT_AC_TAGVAR(compiler, $1)=$CC
  735. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  736. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  737. ## CAVEAT EMPTOR:
  738. ## There is no encapsulation within the following macros, do not change
  739. ## the running order or otherwise move them around unless you know exactly
  740. ## what you are doing...
  741. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  742. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  743. AC_LIBTOOL_PROG_CC_C_O($1)
  744. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  745. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  746. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  747. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  748. AC_LIBTOOL_SYS_LIB_STRIP
  749. AC_LIBTOOL_DLOPEN_SELF($1)
  750. AC_LIBTOOL_CONFIG($1)
  751. AC_LANG_RESTORE
  752. CC="$lt_save_CC"
  753. ])# AC_LIBTOOL_LANG_GCJ_CONFIG
  754. # AC_LIBTOOL_LANG_RC_CONFIG
  755. # --------------------------
  756. # Ensure that the configuration vars for the Windows resource compiler are
  757. # suitably defined.  Those variables are subsequently used by
  758. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  759. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
  760. AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
  761. [AC_LANG_SAVE
  762. # Source file extension for RC test sources.
  763. ac_ext=rc
  764. # Object file extension for compiled RC test sources.
  765. objext=o
  766. _LT_AC_TAGVAR(objext, $1)=$objext
  767. # Code to be used in simple compile tests
  768. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }n'
  769. # Code to be used in simple link tests
  770. lt_simple_link_test_code="$lt_simple_compile_test_code"
  771. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  772. _LT_AC_SYS_COMPILER
  773. # Allow CC to be a program name with arguments.
  774. lt_save_CC="$CC"
  775. CC=${RC-"windres"}
  776. compiler=$CC
  777. _LT_AC_TAGVAR(compiler, $1)=$CC
  778. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  779. AC_LIBTOOL_CONFIG($1)
  780. AC_LANG_RESTORE
  781. CC="$lt_save_CC"
  782. ])# AC_LIBTOOL_LANG_RC_CONFIG
  783. # AC_LIBTOOL_CONFIG([TAGNAME])
  784. # ----------------------------
  785. # If TAGNAME is not passed, then create an initial libtool script
  786. # with a default configuration from the untagged config vars.  Otherwise
  787. # add code to config.status for appending the configuration named by
  788. # TAGNAME from the matching tagged config vars.
  789. AC_DEFUN([AC_LIBTOOL_CONFIG],
  790. [# The else clause should only fire when bootstrapping the
  791. # libtool distribution, otherwise you forgot to ship ltmain.sh
  792. # with your package, and you will get complaints that there are
  793. # no rules to generate ltmain.sh.
  794. if test -f "$ltmain"; then
  795.   # See if we are running on zsh, and set the options which allow our commands through
  796.   # without removal of  escapes.
  797.   if test -n "${ZSH_VERSION+set}" ; then
  798.     setopt NO_GLOB_SUBST
  799.   fi  
  800.   # Now quote all the things that may contain metacharacters while being
  801.   # careful not to overquote the AC_SUBSTed values.  We take copies of the
  802.   # variables and quote the copies for generation of the libtool script.
  803.   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL 
  804.     libname_spec library_names_spec soname_spec extract_expsyms_cmds 
  805.     old_striplib striplib file_magic_cmd finish_cmds finish_eval 
  806.     deplibs_check_method reload_flag reload_cmds need_locks 
  807.     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl 
  808.     lt_cv_sys_global_symbol_to_c_name_address 
  809.     sys_lib_search_path_spec sys_lib_dlsearch_path_spec 
  810.     old_postinstall_cmds old_postuninstall_cmds 
  811.     _LT_AC_TAGVAR(compiler, $1) 
  812.     _LT_AC_TAGVAR(CC, $1) 
  813.     _LT_AC_TAGVAR(LD, $1) 
  814.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 
  815.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 
  816.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) 
  817.     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 
  818.     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 
  819.     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) 
  820.     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) 
  821.     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 
  822.     _LT_AC_TAGVAR(old_archive_cmds, $1) 
  823.     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 
  824.     _LT_AC_TAGVAR(predep_objects, $1) 
  825.     _LT_AC_TAGVAR(postdep_objects, $1) 
  826.     _LT_AC_TAGVAR(predeps, $1) 
  827.     _LT_AC_TAGVAR(postdeps, $1) 
  828.     _LT_AC_TAGVAR(compiler_lib_search_path, $1) 
  829.     _LT_AC_TAGVAR(archive_cmds, $1) 
  830.     _LT_AC_TAGVAR(archive_expsym_cmds, $1) 
  831.     _LT_AC_TAGVAR(postinstall_cmds, $1) 
  832.     _LT_AC_TAGVAR(postuninstall_cmds, $1) 
  833.     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 
  834.     _LT_AC_TAGVAR(allow_undefined_flag, $1) 
  835.     _LT_AC_TAGVAR(no_undefined_flag, $1) 
  836.     _LT_AC_TAGVAR(export_symbols_cmds, $1) 
  837.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 
  838.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 
  839.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) 
  840.     _LT_AC_TAGVAR(hardcode_automatic, $1) 
  841.     _LT_AC_TAGVAR(module_cmds, $1) 
  842.     _LT_AC_TAGVAR(module_expsym_cmds, $1) 
  843.     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 
  844.     _LT_AC_TAGVAR(exclude_expsyms, $1) 
  845.     _LT_AC_TAGVAR(include_expsyms, $1); do
  846.     case $var in
  847.     _LT_AC_TAGVAR(old_archive_cmds, $1) | 
  848.     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | 
  849.     _LT_AC_TAGVAR(archive_cmds, $1) | 
  850.     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | 
  851.     _LT_AC_TAGVAR(module_cmds, $1) | 
  852.     _LT_AC_TAGVAR(module_expsym_cmds, $1) |    
  853.     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | 
  854.     _LT_AC_TAGVAR(export_symbols_cmds, $1) | 
  855.     extract_expsyms_cmds | reload_cmds | finish_cmds | 
  856.     postinstall_cmds | postuninstall_cmds | 
  857.     old_postinstall_cmds | old_postuninstall_cmds | 
  858.     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  859.       # Double-quote double-evaled strings.
  860.       eval "lt_$var=\"`$echo "X$$var" | $Xsed -e "$double_quote_subst" -e "$sed_quote_subst" -e "$delay_variable_subst"`\""
  861.       ;;
  862.     *)
  863.       eval "lt_$var=\"`$echo "X$$var" | $Xsed -e "$sed_quote_subst"`\""
  864.       ;;
  865.     esac
  866.   done
  867.   case $lt_echo in
  868.   *'[$]0 --fallback-echo"')
  869.     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
  870.     ;;
  871.   esac
  872. ifelse([$1], [],
  873.   [cfgfile="${ofile}T"
  874.   trap "$rm "$cfgfile"; exit 1" 1 2 15
  875.   $rm -f "$cfgfile"
  876.   AC_MSG_NOTICE([creating $ofile])],
  877.   [cfgfile="$ofile"])
  878.   cat <<__EOF__ >> "$cfgfile"
  879. ifelse([$1], [],
  880. [#! $SHELL
  881. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  882. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  883. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  884. #
  885. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  886. # Free Software Foundation, Inc.
  887. #
  888. # This file is part of GNU Libtool:
  889. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  890. #
  891. # This program is free software; you can redistribute it and/or modify
  892. # it under the terms of the GNU General Public License as published by
  893. # the Free Software Foundation; either version 2 of the License, or
  894. # (at your option) any later version.
  895. #
  896. # This program is distributed in the hope that it will be useful, but
  897. # WITHOUT ANY WARRANTY; without even the implied warranty of
  898. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  899. # General Public License for more details.
  900. #
  901. # You should have received a copy of the GNU General Public License
  902. # along with this program; if not, write to the Free Software
  903. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  904. #
  905. # As a special exception to the GNU General Public License, if you
  906. # distribute this file as part of a program that contains a
  907. # configuration script generated by Autoconf, you may include it under
  908. # the same distribution terms that you use for the rest of that program.
  909. # A sed program that does not truncate output.
  910. SED=$lt_SED
  911. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  912. Xsed="$SED -e s/^X//"
  913. # The HP-UX ksh and POSIX shell print the target directory to stdout
  914. # if CDPATH is set.
  915. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  916. # The names of the tagged configurations supported by this script.
  917. available_tags=
  918. # ### BEGIN LIBTOOL CONFIG],
  919. [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  920. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  921. # Shell to use when invoking shell scripts.
  922. SHELL=$lt_SHELL
  923. # Whether or not to build shared libraries.
  924. build_libtool_libs=$enable_shared
  925. # Whether or not to build static libraries.
  926. build_old_libs=$enable_static
  927. # Whether or not to add -lc for building shared libraries.
  928. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
  929. # Whether or not to disallow shared libs when runtime libs are static
  930. allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
  931. # Whether or not to optimize for fast installation.
  932. fast_install=$enable_fast_install
  933. # The host system.
  934. host_alias=$host_alias
  935. host=$host
  936. # An echo program that does not interpret backslashes.
  937. echo=$lt_echo
  938. # The archiver.
  939. AR=$lt_AR
  940. AR_FLAGS=$lt_AR_FLAGS
  941. # A C compiler.
  942. LTCC=$lt_LTCC
  943. # A language-specific compiler.
  944. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  945. # Is the compiler the GNU C compiler?
  946. with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  947. # An ERE matcher.
  948. EGREP=$lt_EGREP
  949. # The linker used to build libraries.
  950. LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
  951. # Whether we need hard or soft links.
  952. LN_S=$lt_LN_S
  953. # A BSD-compatible nm program.
  954. NM=$lt_NM
  955. # A symbol stripping program
  956. STRIP=$STRIP
  957. # Used to examine libraries when file_magic_cmd begins "file"
  958. MAGIC_CMD=$MAGIC_CMD
  959. # Used on cygwin: DLL creation program.
  960. DLLTOOL="$DLLTOOL"
  961. # Used on cygwin: object dumper.
  962. OBJDUMP="$OBJDUMP"
  963. # Used on cygwin: assembler.
  964. AS="$AS"
  965. # The name of the directory that contains temporary libtool files.
  966. objdir=$objdir
  967. # How to create reloadable object files.
  968. reload_flag=$lt_reload_flag
  969. reload_cmds=$lt_reload_cmds
  970. # How to pass a linker flag through the compiler.
  971. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  972. # Object file suffix (normally "o").
  973. objext="$ac_objext"
  974. # Old archive suffix (normally "a").
  975. libext="$libext"
  976. # Shared library suffix (normally ".so").
  977. shrext='$shrext'
  978. # Executable file suffix (normally "").
  979. exeext="$exeext"
  980. # Additional compiler flags for building library objects.
  981. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  982. pic_mode=$pic_mode
  983. # What is the maximum length of a command?
  984. max_cmd_len=$lt_cv_sys_max_cmd_len
  985. # Does compiler simultaneously support -c and -o options?
  986. compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  987. # Must we lock files when doing compilation ?
  988. need_locks=$lt_need_locks
  989. # Do we need the lib prefix for modules?
  990. need_lib_prefix=$need_lib_prefix
  991. # Do we need a version for libraries?
  992. need_version=$need_version
  993. # Whether dlopen is supported.
  994. dlopen_support=$enable_dlopen
  995. # Whether dlopen of programs is supported.
  996. dlopen_self=$enable_dlopen_self
  997. # Whether dlopen of statically linked programs is supported.
  998. dlopen_self_static=$enable_dlopen_self_static
  999. # Compiler flag to prevent dynamic linking.
  1000. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
  1001. # Compiler flag to turn off builtin functions.
  1002. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
  1003. # Compiler flag to allow reflexive dlopens.
  1004. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
  1005. # Compiler flag to generate shared objects directly from archives.
  1006. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
  1007. # Compiler flag to generate thread-safe objects.
  1008. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
  1009. # Library versioning type.
  1010. version_type=$version_type
  1011. # Format of library name prefix.
  1012. libname_spec=$lt_libname_spec
  1013. # List of archive names.  First name is the real one, the rest are links.
  1014. # The last name is the one that the linker finds with -lNAME.
  1015. library_names_spec=$lt_library_names_spec
  1016. # The coded name of the library, if different from the real name.
  1017. soname_spec=$lt_soname_spec
  1018. # Commands used to build and install an old-style archive.
  1019. RANLIB=$lt_RANLIB
  1020. old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
  1021. old_postinstall_cmds=$lt_old_postinstall_cmds
  1022. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  1023. # Create an old-style archive from a shared archive.
  1024. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
  1025. # Create a temporary old-style archive to link instead of a shared archive.
  1026. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
  1027. # Commands used to build and install a shared archive.
  1028. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
  1029. archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
  1030. postinstall_cmds=$lt_postinstall_cmds
  1031. postuninstall_cmds=$lt_postuninstall_cmds
  1032. # Commands used to build a loadable module (assumed same as above if empty)
  1033. module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
  1034. module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
  1035. # Commands to strip libraries.
  1036. old_striplib=$lt_old_striplib
  1037. striplib=$lt_striplib
  1038. # Dependencies to place before the objects being linked to create a
  1039. # shared library.
  1040. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
  1041. # Dependencies to place after the objects being linked to create a
  1042. # shared library.
  1043. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
  1044. # Dependencies to place before the objects being linked to create a
  1045. # shared library.
  1046. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
  1047. # Dependencies to place after the objects being linked to create a
  1048. # shared library.
  1049. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
  1050. # The library search path used internally by the compiler when linking
  1051. # a shared library.
  1052. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
  1053. # Method to check whether dependent libraries are shared objects.
  1054. deplibs_check_method=$lt_deplibs_check_method
  1055. # Command to use when deplibs_check_method == file_magic.
  1056. file_magic_cmd=$lt_file_magic_cmd
  1057. # Flag that allows shared libraries with undefined symbols to be built.
  1058. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
  1059. # Flag that forces no undefined symbols.
  1060. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
  1061. # Commands used to finish a libtool library installation in a directory.
  1062. finish_cmds=$lt_finish_cmds
  1063. # Same as above, but a single script fragment to be evaled but not shown.
  1064. finish_eval=$lt_finish_eval
  1065. # Take the output of nm and produce a listing of raw symbols and C names.
  1066. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  1067. # Transform the output of nm in a proper C declaration
  1068. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  1069. # Transform the output of nm in a C name address pair
  1070. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  1071. # This is the shared library runtime path variable.
  1072. runpath_var=$runpath_var
  1073. # This is the shared library path variable.
  1074. shlibpath_var=$shlibpath_var
  1075. # Is shlibpath searched before the hard-coded library search path?
  1076. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  1077. # How to hardcode a shared library path into an executable.
  1078. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
  1079. # Whether we should hardcode library paths into libraries.
  1080. hardcode_into_libs=$hardcode_into_libs
  1081. # Flag to hardcode $libdir into a binary during linking.
  1082. # This must work even if $libdir does not exist.
  1083. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
  1084. # If ld is used when linking, flag to hardcode $libdir into
  1085. # a binary during linking. This must work even if $libdir does
  1086. # not exist.
  1087. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
  1088. # Whether we need a single -rpath flag with a separated argument.
  1089. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
  1090. # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  1091. # resulting binary.
  1092. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
  1093. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  1094. # resulting binary.
  1095. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
  1096. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  1097. # the resulting binary.
  1098. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
  1099. # Set to yes if building a shared library automatically hardcodes DIR into the library
  1100. # and all subsequent libraries and executables linked against it.
  1101. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
  1102. # Variables whose values should be saved in libtool wrapper scripts and
  1103. # restored at relink time.
  1104. variables_saved_for_relink="$variables_saved_for_relink"
  1105. # Whether libtool must link a program against all its dependency libraries.
  1106. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
  1107. # Compile-time system search path for libraries
  1108. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  1109. # Run-time system search path for libraries
  1110. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  1111. # Fix the shell variable $srcfile for the compiler.
  1112. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
  1113. # Set to yes if exported symbols are required.
  1114. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
  1115. # The commands to list exported symbols.
  1116. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
  1117. # The commands to extract the exported symbol list from a shared archive.
  1118. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  1119. # Symbols that should not be listed in the preloaded symbols.
  1120. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
  1121. # Symbols that must always be exported.
  1122. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
  1123. ifelse([$1],[],
  1124. [# ### END LIBTOOL CONFIG],
  1125. [# ### END LIBTOOL TAG CONFIG: $tagname])
  1126. __EOF__
  1127. ifelse([$1],[], [
  1128.   case $host_os in
  1129.   aix3*)
  1130.     cat <<EOF >> "$cfgfile"
  1131. # AIX sometimes has problems with the GCC collect2 program.  For some
  1132. # reason, if we set the COLLECT_NAMES environment variable, the problems
  1133. # vanish in a puff of smoke.
  1134. if test "X${COLLECT_NAMES+set}" != Xset; then
  1135.   COLLECT_NAMES=
  1136.   export COLLECT_NAMES
  1137. fi
  1138. EOF
  1139.     ;;
  1140.   esac
  1141.   # We use sed instead of cat because bash on DJGPP gets confused if
  1142.   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
  1143.   # text mode, it properly converts lines to CR/LF.  This bash problem
  1144.   # is reportedly fixed, but why not run on old versions too?
  1145.   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
  1146.   mv -f "$cfgfile" "$ofile" || 
  1147.     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  1148.   chmod +x "$ofile"
  1149. ])
  1150. else
  1151.   # If there is no Makefile yet, we rely on a make rule to execute
  1152.   # `config.status --recheck' to rerun these tests and create the
  1153.   # libtool script then.
  1154.   test -f Makefile && make "$ltmain"
  1155. fi
  1156. ])# AC_LIBTOOL_CONFIG
  1157. # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
  1158. # -------------------------------------------
  1159. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
  1160. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  1161. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  1162. if test "$GCC" = yes; then
  1163.   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  1164.   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  1165.     lt_cv_prog_compiler_rtti_exceptions,
  1166.     [-fno-rtti -fno-exceptions], [],
  1167.     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  1168. fi
  1169. ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
  1170. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  1171. # ---------------------------------
  1172. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  1173. [AC_REQUIRE([AC_CANONICAL_HOST])
  1174. AC_REQUIRE([AC_PROG_NM])
  1175. AC_REQUIRE([AC_OBJEXT])
  1176. # Check for command to grab the raw symbol name followed by C symbol from nm.
  1177. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  1178. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  1179. [
  1180. # These are sane defaults that work on at least a few old systems.
  1181. # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
  1182. # Character class describing NM global symbol codes.
  1183. symcode='[[BCDEGRST]]'
  1184. # Regexp to match symbols that can be accessed directly from C.
  1185. sympat='([[_A-Za-z]][[_A-Za-z0-9]]*)'
  1186. # Transform the above into a raw symbol and a C symbol.
  1187. symxfrm='1 23 3'
  1188. # Transform an extracted symbol line into a proper C declaration
  1189. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* (.*)$/extern int 1;/p'"
  1190. # Transform an extracted symbol line into symbol name and symbol address
  1191. 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'"
  1192. # Define system-specific variables.
  1193. case $host_os in
  1194. aix*)
  1195.   symcode='[[BCDT]]'
  1196.   ;;
  1197. cygwin* | mingw* | pw32*)
  1198.   symcode='[[ABCDGISTW]]'
  1199.   ;;
  1200. hpux*) # Its linker distinguishes data from code symbols
  1201.   if test "$host_cpu" = ia64; then
  1202.     symcode='[[ABCDEGRST]]'
  1203.   fi
  1204.   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* (.*)$/extern int 1();/p' -e 's/^$symcode* .* (.*)$/extern char 1;/p'"
  1205.   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'"
  1206.   ;;
  1207. irix* | nonstopux*)
  1208.   symcode='[[BCDEGRST]]'
  1209.   ;;
  1210. osf*)
  1211.   symcode='[[BCDEGQRST]]'
  1212.   ;;
  1213. solaris* | sysv5*)
  1214.   symcode='[[BDT]]'
  1215.   ;;
  1216. sysv4)
  1217.   symcode='[[DFNSTU]]'
  1218.   ;;
  1219. esac
  1220. # Handle CRLF in mingw tool chain
  1221. opt_cr=
  1222. case $build_os in
  1223. mingw*)
  1224.   opt_cr=`echo 'x{0,1}' | tr x '15'` # option cr in regexp
  1225.   ;;
  1226. esac
  1227. # If we're using GNU nm, then use its standard symbol codes.
  1228. case `$NM -V 2>&1` in
  1229. *GNU* | *'with BFD'*)
  1230.   symcode='[[ABCDGISTW]]' ;;
  1231. esac
  1232. # Try without a prefix undercore, then with it.
  1233. for ac_symprfx in "" "_"; do
  1234.   # Write the raw and C identifiers.
  1235.   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[  ]]($symcode$symcode*)[[  ]][[  ]]*($ac_symprfx)$sympat$opt_cr$/$symxfrm/p'"
  1236.   # Check to see that the pipe works correctly.
  1237.   pipe_works=no
  1238.   rm -f conftest*
  1239.   cat > conftest.$ac_ext <<EOF
  1240. #ifdef __cplusplus
  1241. extern "C" {
  1242. #endif
  1243. char nm_test_var;
  1244. void nm_test_func(){}
  1245. #ifdef __cplusplus
  1246. }
  1247. #endif
  1248. int main(){nm_test_var='a';nm_test_func();return(0);}
  1249. EOF
  1250.   if AC_TRY_EVAL(ac_compile); then
  1251.     # Now try to grab the symbols.
  1252.     nlist=conftest.nm
  1253.     if AC_TRY_EVAL(NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist) && test -s "$nlist"; then
  1254.       # Try sorting and uniquifying the output.
  1255.       if sort "$nlist" | uniq > "$nlist"T; then
  1256. mv -f "$nlist"T "$nlist"
  1257.       else
  1258. rm -f "$nlist"T
  1259.       fi
  1260.       # Make sure that we snagged all the symbols we need.
  1261.       if grep ' nm_test_var$' "$nlist" >/dev/null; then
  1262. if grep ' nm_test_func$' "$nlist" >/dev/null; then
  1263.   cat <<EOF > conftest.$ac_ext
  1264. #ifdef __cplusplus
  1265. extern "C" {
  1266. #endif
  1267. EOF
  1268.   # Now generate the symbol file.
  1269.   eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
  1270.   cat <<EOF >> conftest.$ac_ext
  1271. #if defined (__STDC__) && __STDC__
  1272. # define lt_ptr_t void *
  1273. #else
  1274. # define lt_ptr_t char *
  1275. # define const
  1276. #endif
  1277. /* The mapping between symbol names and symbols. */
  1278. const struct {
  1279.   const char *name;
  1280.   lt_ptr_t address;
  1281. }
  1282. lt_preloaded_symbols[[]] =
  1283. {
  1284. EOF
  1285.   $SED "s/^$symcode$symcode* (.*) (.*)$/  {"2", (lt_ptr_t) &2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
  1286.   cat <<EOF >> conftest.$ac_ext
  1287.   {0, (lt_ptr_t) 0}
  1288. };
  1289. #ifdef __cplusplus
  1290. }
  1291. #endif
  1292. EOF
  1293.   # Now try linking the two files.
  1294.   mv conftest.$ac_objext conftstm.$ac_objext
  1295.   lt_save_LIBS="$LIBS"
  1296.   lt_save_CFLAGS="$CFLAGS"
  1297.   LIBS="conftstm.$ac_objext"
  1298.   CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  1299.   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  1300.     pipe_works=yes
  1301.   fi
  1302.   LIBS="$lt_save_LIBS"
  1303.   CFLAGS="$lt_save_CFLAGS"
  1304. else
  1305.   echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  1306. fi
  1307.       else
  1308. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  1309.       fi
  1310.     else
  1311.       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  1312.     fi
  1313.   else
  1314.     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  1315.     cat conftest.$ac_ext >&5
  1316.   fi
  1317.   rm -f conftest* conftst*
  1318.   # Do not use the global_symbol_pipe unless it works.
  1319.   if test "$pipe_works" = yes; then
  1320.     break
  1321.   else
  1322.     lt_cv_sys_global_symbol_pipe=
  1323.   fi
  1324. done
  1325. ])
  1326. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  1327.   lt_cv_sys_global_symbol_to_cdecl=
  1328. fi
  1329. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  1330.   AC_MSG_RESULT(failed)
  1331. else
  1332.   AC_MSG_RESULT(ok)
  1333. fi
  1334. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  1335. # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
  1336. # ---------------------------------------
  1337. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
  1338. [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
  1339. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  1340. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
  1341. AC_MSG_CHECKING([for $compiler option to produce PIC])
  1342.  ifelse([$1],[CXX],[
  1343.   # C++ specific cases for pic, static, wl, etc.
  1344.   if test "$GXX" = yes; then
  1345.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1346.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  1347.     case $host_os in
  1348.     aix*)
  1349.       # All AIX code is PIC.
  1350.       if test "$host_cpu" = ia64; then
  1351. # AIX 5 now supports IA64 processor
  1352. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1353.       fi
  1354.       ;;
  1355.     amigaos*)
  1356.       # FIXME: we need at least 68020 code to build shared libraries, but
  1357.       # adding the `-m68020' flag to GCC prevents building anything better,
  1358.       # like `-m68040'.
  1359.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  1360.       ;;
  1361.     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  1362.       # PIC is the default for these OSes.
  1363.       ;;
  1364.     mingw* | os2* | pw32*)
  1365.       # This hack is so that the source file can tell whether it is being
  1366.       # built for inclusion in a dll (and should export symbols for example).
  1367.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  1368.       ;;
  1369.     darwin* | rhapsody*)
  1370.       # PIC is the default on this platform
  1371.       # Common symbols not allowed in MH_DYLIB files
  1372.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  1373.       ;;
  1374.     *djgpp*)
  1375.       # DJGPP does not support shared libraries at all
  1376.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  1377.       ;;
  1378.     sysv4*MP*)
  1379.       if test -d /usr/nec; then
  1380. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  1381.       fi
  1382.       ;;
  1383.     hpux*)
  1384.       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  1385.       # not for PA HP-UX.
  1386.       case "$host_cpu" in
  1387.       hppa*64*|ia64*)
  1388. ;;
  1389.       *)
  1390. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  1391. ;;
  1392.       esac
  1393.       ;;
  1394.     *)
  1395.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  1396.       ;;
  1397.     esac
  1398.   else
  1399.     case $host_os in
  1400.       aix4* | aix5*)
  1401. # All AIX code is PIC.
  1402. if test "$host_cpu" = ia64; then
  1403.   # AIX 5 now supports IA64 processor
  1404.   _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1405. else
  1406.   _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  1407. fi
  1408. ;;
  1409.       chorus*)
  1410. case $cc_basename in
  1411. cxch68)
  1412.   # Green Hills C++ Compiler
  1413.   # _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"
  1414.   ;;
  1415. esac
  1416. ;;
  1417.       dgux*)
  1418. case $cc_basename in
  1419.   ec++)
  1420.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1421.     ;;
  1422.   ghcx)
  1423.     # Green Hills C++ Compiler
  1424.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1425.     ;;
  1426.   *)
  1427.     ;;
  1428. esac
  1429. ;;
  1430.       freebsd* | kfreebsd*-gnu)
  1431. # FreeBSD uses GNU C++
  1432. ;;
  1433.       hpux9* | hpux10* | hpux11*)
  1434. case $cc_basename in
  1435.   CC)
  1436.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1437.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  1438.     if test "$host_cpu" != ia64; then
  1439.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  1440.     fi
  1441.     ;;
  1442.   aCC)
  1443.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1444.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  1445.     case "$host_cpu" in
  1446.     hppa*64*|ia64*)
  1447.       # +Z the default
  1448.       ;;
  1449.     *)
  1450.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  1451.       ;;
  1452.     esac
  1453.     ;;
  1454.   *)
  1455.     ;;
  1456. esac
  1457. ;;
  1458.       irix5* | irix6* | nonstopux*)
  1459. case $cc_basename in
  1460.   CC)
  1461.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1462.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  1463.     # CC pic flag -KPIC is the default.
  1464.     ;;
  1465.   *)
  1466.     ;;
  1467. esac
  1468. ;;
  1469.       linux*)
  1470. case $cc_basename in
  1471.   KCC)
  1472.     # KAI C++ Compiler
  1473.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  1474.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  1475.     ;;
  1476.   icpc)
  1477.     # Intel C++
  1478.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1479.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1480.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  1481.     ;; 
  1482.   cxx)
  1483.     # Compaq C++
  1484.     # Make sure the PIC flag is empty.  It appears that all Alpha
  1485.     # Linux and Compaq Tru64 Unix objects are PIC.
  1486.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  1487.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  1488.     ;;
  1489.   *)
  1490.     ;;
  1491. esac
  1492. ;;
  1493.       lynxos*)
  1494. ;;
  1495.       m88k*)
  1496. ;;
  1497.       mvs*)
  1498. case $cc_basename in
  1499.   cxx)
  1500.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  1501.     ;;
  1502.   *)
  1503.     ;;
  1504. esac
  1505. ;;
  1506.       netbsd*)
  1507. ;;
  1508.       osf3* | osf4* | osf5*)
  1509. case $cc_basename in
  1510.   KCC)
  1511.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  1512.     ;;
  1513.   RCC)
  1514.     # Rational C++ 2.4.1
  1515.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1516.     ;;
  1517.   cxx)
  1518.     # Digital/Compaq C++
  1519.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1520.     # Make sure the PIC flag is empty.  It appears that all Alpha
  1521.     # Linux and Compaq Tru64 Unix objects are PIC.
  1522.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  1523.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  1524.     ;;
  1525.   *)
  1526.     ;;
  1527. esac
  1528. ;;
  1529.       psos*)
  1530. ;;
  1531.       sco*)
  1532. case $cc_basename in
  1533.   CC)
  1534.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  1535.     ;;
  1536.   *)
  1537.     ;;
  1538. esac
  1539. ;;
  1540.       solaris*)
  1541. case $cc_basename in
  1542.   CC)
  1543.     # Sun C++ 4.2, 5.x and Centerline C++
  1544.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1545.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1546.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  1547.     ;;
  1548.   gcx)
  1549.     # Green Hills C++ Compiler
  1550.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  1551.     ;;
  1552.   *)
  1553.     ;;
  1554. esac
  1555. ;;
  1556.       sunos4*)
  1557. case $cc_basename in
  1558.   CC)
  1559.     # Sun C++ 4.x
  1560.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1561.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1562.     ;;
  1563.   lcc)
  1564.     # Lucid
  1565.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1566.     ;;
  1567.   *)
  1568.     ;;
  1569. esac
  1570. ;;
  1571.       tandem*)
  1572. case $cc_basename in
  1573.   NCC)
  1574.     # NonStop-UX NCC 3.20
  1575.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1576.     ;;
  1577.   *)
  1578.     ;;
  1579. esac
  1580. ;;
  1581.       unixware*)
  1582. ;;
  1583.       vxworks*)
  1584. ;;
  1585.       *)
  1586. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  1587. ;;
  1588.     esac
  1589.   fi
  1590. ],
  1591. [
  1592.   if test "$GCC" = yes; then
  1593.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1594.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  1595.     case $host_os in
  1596.       aix*)
  1597.       # All AIX code is PIC.
  1598.       if test "$host_cpu" = ia64; then
  1599. # AIX 5 now supports IA64 processor
  1600. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1601.       fi
  1602.       ;;
  1603.     amigaos*)
  1604.       # FIXME: we need at least 68020 code to build shared libraries, but
  1605.       # adding the `-m68020' flag to GCC prevents building anything better,
  1606.       # like `-m68040'.
  1607.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  1608.       ;;
  1609.     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  1610.       # PIC is the default for these OSes.
  1611.       ;;
  1612.     mingw* | pw32* | os2*)
  1613.       # This hack is so that the source file can tell whether it is being
  1614.       # built for inclusion in a dll (and should export symbols for example).
  1615.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  1616.       ;;
  1617.     darwin* | rhapsody*)
  1618.       # PIC is the default on this platform
  1619.       # Common symbols not allowed in MH_DYLIB files
  1620.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  1621.       ;;
  1622.     msdosdjgpp*)
  1623.       # Just because we use GCC doesn't mean we suddenly get shared libraries
  1624.       # on systems that don't support them.
  1625.       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  1626.       enable_shared=no
  1627.       ;;
  1628.     sysv4*MP*)
  1629.       if test -d /usr/nec; then
  1630. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  1631.       fi
  1632.       ;;
  1633.     hpux*)
  1634.       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  1635.       # not for PA HP-UX.
  1636.       case "$host_cpu" in
  1637.       hppa*64*|ia64*)
  1638. # +Z the default
  1639. ;;
  1640.       *)
  1641. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  1642. ;;
  1643.       esac
  1644.       ;;
  1645.     *)
  1646.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  1647.       ;;
  1648.     esac
  1649.   else
  1650.     # PORTME Check for flag to pass linker flags through the system compiler.
  1651.     case $host_os in
  1652.     aix*)
  1653.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1654.       if test "$host_cpu" = ia64; then
  1655. # AIX 5 now supports IA64 processor
  1656. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1657.       else
  1658. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  1659.       fi
  1660.       ;;
  1661.     mingw* | pw32* | os2*)
  1662.       # This hack is so that the source file can tell whether it is being
  1663.       # built for inclusion in a dll (and should export symbols for example).
  1664.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  1665.       ;;
  1666.     hpux9* | hpux10* | hpux11*)
  1667.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1668.       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  1669.       # not for PA HP-UX.
  1670.       case "$host_cpu" in
  1671.       hppa*64*|ia64*)
  1672. # +Z the default
  1673. ;;
  1674.       *)
  1675. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  1676. ;;
  1677.       esac
  1678.       # Is there a better lt_prog_compiler_static that works with the bundled CC?
  1679.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  1680.       ;;
  1681.     irix5* | irix6* | nonstopux*)
  1682.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1683.       # PIC (with -KPIC) is the default.
  1684.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  1685.       ;;
  1686.     newsos6)
  1687.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1688.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1689.       ;;
  1690.     linux*)
  1691.       case $CC in
  1692.       icc* | ecc*)
  1693. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1694. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1695. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  1696.         ;;
  1697.       ccc*)
  1698.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1699.         # All Alpha code is PIC.
  1700.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  1701.         ;;
  1702.       esac
  1703.       ;;
  1704.     osf3* | osf4* | osf5*)
  1705.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1706.       # All OSF/1 code is PIC.
  1707.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  1708.       ;;
  1709.     sco3.2v5*)
  1710.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
  1711.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
  1712.       ;;
  1713.     solaris*)
  1714.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1715.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1716.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1717.       ;;
  1718.     sunos4*)
  1719.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  1720.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  1721.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1722.       ;;
  1723.     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1724.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1725.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1726.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1727.       ;;
  1728.     sysv4*MP*)
  1729.       if test -d /usr/nec ;then
  1730. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  1731. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1732.       fi
  1733.       ;;
  1734.     uts4*)
  1735.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1736.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1737.       ;;
  1738.     *)
  1739.       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  1740.       ;;
  1741.     esac
  1742.   fi
  1743. ])
  1744. AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
  1745. #
  1746. # Check to make sure the PIC flag actually works.
  1747. #
  1748. if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
  1749.   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
  1750.     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
  1751.     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
  1752.     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  1753.      "" | " "*) ;;
  1754.      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  1755.      esac],
  1756.     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  1757.      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  1758. fi
  1759. case "$host_os" in
  1760.   # For platforms which do not support PIC, -DPIC is meaningless:
  1761.   *djgpp*)
  1762.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  1763.     ;;
  1764.   *)
  1765.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  1766.     ;;
  1767. esac
  1768. ])
  1769. # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  1770. # ------------------------------------
  1771. # See if the linker supports building shared libraries.
  1772. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
  1773. [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  1774. ifelse([$1],[CXX],[
  1775.   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '''s/.* //''' | sort | uniq > $export_symbols'
  1776.   case $host_os in
  1777.   aix4* | aix5*)
  1778.     # If we're using GNU nm, then we don't want the "-C" option.
  1779.     # -C means demangle to AIX nm, but means don't demangle with GNU nm
  1780.     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  1781.       _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'
  1782.     else
  1783.       _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'
  1784.     fi
  1785.     ;;
  1786.   pw32*)
  1787.     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  1788.   ;;
  1789.   cygwin* | mingw*)
  1790.     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '''/^[[BCDGS]] /s/.* ([[^ ]]*)/1 DATA/''' | $SED -e '''/^[[AITW]] /s/.* //''' | sort | uniq > $export_symbols'
  1791.   ;;
  1792.   *)
  1793.     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '''s/.* //''' | sort | uniq > $export_symbols'
  1794.   ;;
  1795.   esac
  1796. ],[
  1797.   runpath_var=
  1798.   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  1799.   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  1800.   _LT_AC_TAGVAR(archive_cmds, $1)=
  1801.   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  1802.   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
  1803.   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  1804.   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  1805.   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  1806.   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
  1807.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  1808.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  1809.   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  1810.   _LT_AC_TAGVAR(hardcode_direct, $1)=no
  1811.   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  1812.   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  1813.   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  1814.   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  1815.   _LT_AC_TAGVAR(module_cmds, $1)=
  1816.   _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
  1817.   _LT_AC_TAGVAR(always_export_symbols, $1)=no
  1818.   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '''s/.* //''' | sort | uniq > $export_symbols'
  1819.   # include_expsyms should be a list of space-separated symbols to be *always*
  1820.   # included in the symbol list
  1821.   _LT_AC_TAGVAR(include_expsyms, $1)=
  1822.   # exclude_expsyms can be an extended regexp of symbols to exclude
  1823.   # it will be wrapped by ` (' and `)$', so one must not match beginning or
  1824.   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  1825.   # as well as any symbol that contains `d'.
  1826.   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
  1827.   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  1828.   # platforms (ab)use it in PIC code, but their linkers get confused if
  1829.   # the symbol is explicitly referenced.  Since portable code cannot
  1830.   # rely on this symbol name, it's probably fine to never include it in
  1831.   # preloaded symbol tables.
  1832.   extract_expsyms_cmds=
  1833.   case $host_os in
  1834.   cygwin* | mingw* | pw32*)
  1835.     # FIXME: the MSVC++ port hasn't been tested in a loooong time
  1836.     # When not using gcc, we currently assume that we are using
  1837.     # Microsoft Visual C++.
  1838.     if test "$GCC" != yes; then
  1839.       with_gnu_ld=no
  1840.     fi
  1841.     ;;
  1842.   openbsd*)
  1843.     with_gnu_ld=no
  1844.     ;;
  1845.   esac
  1846.   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  1847.   if test "$with_gnu_ld" = yes; then
  1848.     # If archive_cmds runs LD, not CC, wlarc should be empty
  1849.     wlarc='${wl}'
  1850.     # See if GNU ld supports shared libraries.
  1851.     case $host_os in
  1852.     aix3* | aix4* | aix5*)
  1853.       # On AIX/PPC, the GNU linker is very broken
  1854.       if test "$host_cpu" != ia64; then
  1855. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1856. cat <<EOF 1>&2
  1857. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  1858. *** to be unable to reliably create shared libraries on AIX.
  1859. *** Therefore, libtool is disabling shared libraries support.  If you
  1860. *** really care for shared libraries, you may want to modify your PATH
  1861. *** so that a non-GNU linker is found, and then restart.
  1862. EOF
  1863.       fi
  1864.       ;;
  1865.     amigaos*)
  1866.       _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)'
  1867.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  1868.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  1869.       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  1870.       # that the semantics of dynamic libraries on AmigaOS, at least up
  1871.       # to version 4, is to share data among multiple programs linked
  1872.       # with the same dynamic library.  Since this doesn't match the
  1873.       # behavior of shared libraries on other platforms, we can't use
  1874.       # them.
  1875.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1876.       ;;
  1877.     beos*)
  1878.       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  1879. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  1880. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  1881. # support --undefined.  This deserves some investigation.  FIXME
  1882. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
  1883.       else
  1884. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1885.       fi
  1886.       ;;
  1887.     cygwin* | mingw* | pw32*)
  1888.       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  1889.       # as there is no search path for DLLs.
  1890.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  1891.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
  1892.       _LT_AC_TAGVAR(always_export_symbols, $1)=no
  1893.       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  1894.       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '''/^[[BCDGS]] /s/.* ([[^ ]]*)/1 DATA/''' | $SED -e '''/^[[AITW]] /s/.* //''' | sort | uniq > $export_symbols'
  1895.       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  1896.         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  1897. # If the export-symbols file already is a .def file (1st line
  1898. # is EXPORTS), use it as is; otherwise, prepend...
  1899. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  1900.   cp $export_symbols $output_objdir/$soname.def;
  1901. else
  1902.   echo EXPORTS > $output_objdir/$soname.def;
  1903.   cat $export_symbols >> $output_objdir/$soname.def;
  1904. fi~
  1905. $CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
  1906.       else
  1907. ld_shlibs=no
  1908.       fi
  1909.       ;;
  1910.     netbsd*)
  1911.       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1912. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  1913. wlarc=
  1914.       else
  1915. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
  1916. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1917.       fi
  1918.       ;;
  1919.     solaris* | sysv5*)
  1920.       if $LD -v 2>&1 | grep 'BFD 2.8' > /dev/null; then
  1921. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1922. cat <<EOF 1>&2
  1923. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  1924. *** create shared libraries on Solaris systems.  Therefore, libtool
  1925. *** is disabling shared libraries support.  We urge you to upgrade GNU
  1926. *** binutils to release 2.9.1 or newer.  Another option is to modify
  1927. *** your PATH or compiler configuration so that the native linker is
  1928. *** used, and then restart.
  1929. EOF
  1930.       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  1931. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
  1932. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1933.       else
  1934. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1935.       fi
  1936.       ;;
  1937.     sunos4*)
  1938.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1939.       wlarc=
  1940.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  1941.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1942.       ;;
  1943.     *)
  1944.       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  1945. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
  1946. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1947.       else
  1948. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1949.       fi
  1950.       ;;
  1951.     esac
  1952.     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
  1953.       runpath_var=LD_RUN_PATH
  1954.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  1955.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  1956.       # ancient GNU ld didn't support --whole-archive et. al.
  1957.       if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  1958.   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1959.       else
  1960.    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  1961.       fi
  1962.     fi
  1963.   else
  1964.     # PORTME fill in a description of your system's linker (not GNU ld)
  1965.     case $host_os in
  1966.     aix3*)
  1967.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  1968.       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  1969.       _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'
  1970.       # Note: this linker hardcodes the directories in LIBPATH if there
  1971.       # are no directories specified by -L.
  1972.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  1973.       if test "$GCC" = yes && test -z "$link_static_flag"; then
  1974. # Neither direct hardcoding nor static linking is supported with a
  1975. # broken collect2.
  1976. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  1977.       fi
  1978.       ;;
  1979.     aix4* | aix5*)
  1980.       if test "$host_cpu" = ia64; then
  1981. # On IA64, the linker does run time linking by default, so we don't
  1982. # have to do anything special.
  1983. aix_use_runtimelinking=no
  1984. exp_sym_flag='-Bexport'
  1985. no_entry_flag=""
  1986.       else
  1987. # If we're using GNU nm, then we don't want the "-C" option.
  1988. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  1989. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  1990.   _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'
  1991. else
  1992.   _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'
  1993. fi
  1994. # KDE requires run time linking.  Make it the default.
  1995. aix_use_runtimelinking=yes
  1996. exp_sym_flag='-bexport'
  1997. no_entry_flag='-bnoentry'
  1998.       fi
  1999.       # When large executables or shared objects are built, AIX ld can
  2000.       # have problems creating the table of contents.  If linking a library
  2001.       # or program results in "error TOC overflow" add -mminimal-toc to
  2002.       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
  2003.       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  2004.       _LT_AC_TAGVAR(archive_cmds, $1)=''
  2005.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2006.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  2007.       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2008.       if test "$GCC" = yes; then
  2009. case $host_os in aix4.[012]|aix4.[012].*)
  2010. # We only want to do this on AIX 4.2 and lower, the check
  2011. # below for broken collect2 doesn't work under 4.3+
  2012.   collect2name=`${CC} -print-prog-name=collect2`
  2013.   if test -f "$collect2name" && 
  2014.       strings "$collect2name" | grep resolve_lib_name >/dev/null
  2015.   then
  2016.      # We have reworked collect2
  2017.      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2018.   else
  2019.      # We have old collect2
  2020.      _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  2021.      # It fails to find uninstalled libraries when the uninstalled
  2022.      # path is not listed in the libpath.  Setting hardcode_minus_L
  2023.      # to unsupported forces relinking
  2024.      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2025.      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2026.      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2027.   fi
  2028. esac
  2029. shared_flag='-shared'
  2030.       else
  2031. # not using gcc
  2032. if test "$host_cpu" = ia64; then
  2033.    # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  2034.    # chokes on -Wl,-G. The following line is correct:
  2035.   shared_flag='-G'
  2036. else
  2037.    if test "$aix_use_runtimelinking" = yes; then
  2038.     shared_flag='-qmkshrobj ${wl}-G'
  2039.   else
  2040.     shared_flag='-qmkshrobj'
  2041.    fi
  2042. fi
  2043.       fi
  2044.       # Let the compiler handle the export list.
  2045.       _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2046.       if test "$aix_use_runtimelinking" = yes; then
  2047. # Warning - without using the other runtime loading flags (-brtl),
  2048. # -berok will link without error, but may produce a broken library.
  2049. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  2050.        # Determine the default libpath from the value encoded in an empty executable.
  2051. _LT_AC_SYS_LIBPATH_AIX
  2052. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2053. _LT_AC_TAGVAR(archive_cmds, $1)="$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
  2054. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"${wl}$exp_sym_flag:$export_symbols $shared_flag"
  2055.        else
  2056. if test "$host_cpu" = ia64; then
  2057.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  2058.   _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  2059.   _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"${wl}$no_entry_flag ${wl}$exp_sym_flag:$export_symbols"
  2060. else
  2061.  # Determine the default libpath from the value encoded in an empty executable.
  2062.  _LT_AC_SYS_LIBPATH_AIX
  2063.  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2064.   # Warning - without using the other run time loading flags,
  2065.   # -berok will link without error, but may produce a broken library.
  2066.   _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  2067.   _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  2068.   # -bexpall does not export symbols beginning with underscore (_)
  2069.   _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2070.   # Exported symbols can be pulled into shared objects from archives
  2071.   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  2072.   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  2073.   # This is similar to how AIX traditionally builds it's shared libraries.
  2074.   _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  2075. fi
  2076.       fi
  2077.       ;;
  2078.     amigaos*)
  2079.       _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)'
  2080.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2081.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2082.       # see comment about different semantics on the GNU ld section
  2083.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2084.       ;;
  2085.     bsdi4*)
  2086.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  2087.       ;;
  2088.     cygwin* | mingw* | pw32*)
  2089.       # When not using gcc, we currently assume that we are using
  2090.       # Microsoft Visual C++.
  2091.       # hardcode_libdir_flag_spec is actually meaningless, as there is
  2092.       # no search path for DLLs.
  2093.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  2094.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
  2095.       # Tell ltmain to make .lib files, not .a files.
  2096.       libext=lib
  2097.       # Tell ltmain to make .dll files, not .so files.
  2098.       shrext=".dll"
  2099.       # FIXME: Setting linknames here is a bad hack.
  2100.       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '''s/ -lc$//'''` -link -dll~linknames='
  2101.       # The linker will automatically build a .lib file if we build a DLL.
  2102.       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  2103.       # FIXME: Should let the user specify the lib program.
  2104.       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
  2105.       fix_srcfile_path='`cygpath -w "$srcfile"`'
  2106.       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  2107.       ;;
  2108.     darwin* | rhapsody*)
  2109.     if test "$GXX" = yes ; then
  2110.       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2111.       case "$host_os" in
  2112.       rhapsody* | darwin1.[[012]])
  2113. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
  2114. ;;
  2115.       *) # Darwin 1.3 on
  2116. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  2117.   _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
  2118. else
  2119.   case ${MACOSX_DEPLOYMENT_TARGET} in
  2120.     10.[012])
  2121.       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
  2122.       ;;
  2123.     10.*)
  2124.       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
  2125.       ;;
  2126.   esac
  2127. fi
  2128. ;;
  2129.       esac
  2130.      lt_int_apple_cc_single_mod=no
  2131.      output_verbose_link_cmd='echo'
  2132.      if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
  2133.        lt_int_apple_cc_single_mod=yes
  2134.      fi
  2135.      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2136.        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
  2137.      else
  2138.         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
  2139.       fi
  2140.       _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
  2141.       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  2142.         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2143.           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^(..*),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2144.         else
  2145.           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^(..*),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2146.         fi
  2147.           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^(..*),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2148.       _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2149.       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  2150.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2151.       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  2152.       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2153.     else  
  2154.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2155.     fi  
  2156.       ;;
  2157.     dgux*)
  2158.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2159.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2160.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2161.       ;;
  2162.     freebsd1*)
  2163.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2164.       ;;
  2165.     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  2166.     # support.  Future versions do this automatically, but an explicit c++rt0.o
  2167.     # does not break anything, and helps significantly (at the cost of a little
  2168.     # extra space).
  2169.     freebsd2.2*)
  2170.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  2171.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  2172.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2173.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2174.       ;;
  2175.     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  2176.     freebsd2*)
  2177.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  2178.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2179.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2180.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2181.       ;;
  2182.     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  2183.     freebsd* | kfreebsd*-gnu)
  2184.       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
  2185.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  2186.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2187.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2188.       ;;
  2189.     hpux9*)
  2190.       if test "$GCC" = yes; then
  2191. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  2192.       else
  2193. _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'
  2194.       fi
  2195.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2196.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2197.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2198.       # hardcode_minus_L: Not really in the search PATH,
  2199.       # but as the default location of the library.
  2200.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2201.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2202.       ;;
  2203.     hpux10* | hpux11*)
  2204.       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  2205. case "$host_cpu" in
  2206. hppa*64*|ia64*)
  2207.   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
  2208.   ;;
  2209. *)
  2210.   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
  2211.   ;;
  2212. esac
  2213.       else
  2214. case "$host_cpu" in
  2215. hppa*64*|ia64*)
  2216.   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
  2217.   ;;
  2218. *)
  2219.   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  2220.   ;;
  2221. esac
  2222.       fi
  2223.       if test "$with_gnu_ld" = no; then
  2224. case "$host_cpu" in
  2225. hppa*64*)
  2226.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2227.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  2228.   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2229.   _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2230.   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2231.   ;;
  2232. ia64*)
  2233.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2234.   _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2235.   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2236.   # hardcode_minus_L: Not really in the search PATH,
  2237.   # but as the default location of the library.
  2238.   _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2239.   ;;
  2240. *)
  2241.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2242.   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2243.   _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2244.   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2245.   # hardcode_minus_L: Not really in the search PATH,
  2246.   # but as the default location of the library.
  2247.   _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2248.   ;;
  2249. esac
  2250.       fi
  2251.       ;;
  2252.     irix5* | irix6* | nonstopux*)
  2253.       if test "$GCC" = yes; then
  2254. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  2255.       else
  2256. _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'
  2257. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  2258.       fi
  2259.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2260.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2261.       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2262.       ;;
  2263.     netbsd*)
  2264.       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2265. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
  2266.       else
  2267. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
  2268.       fi
  2269.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  2270.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2271.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2272.       ;;
  2273.     newsos6)
  2274.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2275.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2276.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2277.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2278.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2279.       ;;
  2280.     openbsd*)
  2281.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2282.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2283.       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2284. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
  2285. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2286. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2287.       else
  2288.        case $host_os in
  2289.  openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  2290.    _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  2291.    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  2292.    ;;
  2293.  *)
  2294.    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
  2295.    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2296.    ;;
  2297.        esac
  2298.       fi
  2299.       ;;
  2300.     os2*)
  2301.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2302.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2303.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  2304.       _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION "$libname"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
  2305.       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  2306.       ;;
  2307.     osf3*)
  2308.       if test "$GCC" = yes; then
  2309. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}*'
  2310. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  2311.       else
  2312. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved *'
  2313. _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'
  2314.       fi
  2315.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2316.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2317.       ;;
  2318.     osf4* | osf5*) # as osf3* with the addition of -msym flag
  2319.       if test "$GCC" = yes; then
  2320. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}*'
  2321. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  2322. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2323.       else
  2324. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved *'
  2325. _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'
  2326. _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~
  2327. $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
  2328. # Both c and cxx compiler support -rpath directly
  2329. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  2330.       fi
  2331.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2332.       ;;
  2333.     sco3.2v5*)
  2334.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2335.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2336.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  2337.       runpath_var=LD_RUN_PATH
  2338.       hardcode_runpath_var=yes
  2339.       ;;
  2340.     solaris*)
  2341.       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  2342.       if test "$GCC" = yes; then
  2343. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
  2344. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/(.*)/1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  2345.   $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
  2346.       else
  2347. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2348. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/(.*)/1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  2349.    $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  2350.       fi
  2351.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  2352.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2353.       case $host_os in
  2354.       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  2355.       *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  2356. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
  2357.       esac
  2358.       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2359.       ;;
  2360.     sunos4*)
  2361.       if test "x$host_vendor" = xsequent; then
  2362. # Use $CC to link under sequent, because it throws in some extra .o
  2363. # files that make .init and .fini sections work.
  2364. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
  2365.       else
  2366. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  2367.       fi
  2368.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2369.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2370.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2371.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2372.       ;;
  2373.     sysv4)
  2374.       case $host_vendor in
  2375. sni)
  2376.   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2377.   _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  2378. ;;
  2379. siemens)
  2380.   ## LD is ld it makes a PLAMLIB
  2381.   ## CC just makes a GrossModule.
  2382.   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  2383.   _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  2384.   _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2385.         ;;
  2386. motorola)
  2387.   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2388.   _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  2389. ;;
  2390.       esac
  2391.       runpath_var='LD_RUN_PATH'
  2392.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2393.       ;;
  2394.     sysv4.3*)
  2395.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2396.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2397.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  2398.       ;;
  2399.     sysv4*MP*)
  2400.       if test -d /usr/nec; then
  2401. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2402. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2403. runpath_var=LD_RUN_PATH
  2404. hardcode_runpath_var=yes
  2405. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2406.       fi
  2407.       ;;
  2408.     sysv4.2uw2*)
  2409.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  2410.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2411.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  2412.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2413.       hardcode_runpath_var=yes
  2414.       runpath_var=LD_RUN_PATH
  2415.       ;;
  2416.    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
  2417.       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
  2418.       if test "$GCC" = yes; then
  2419. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
  2420.       else
  2421. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
  2422.       fi
  2423.       runpath_var='LD_RUN_PATH'
  2424.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2425.       ;;
  2426.     sysv5*)
  2427.       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  2428.       # $CC -shared without GNU ld will not create a library from C++
  2429.       # object files and a static libstdc++, better avoid it by now
  2430.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2431.       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/(.*)/1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  2432.    $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  2433.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  2434.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2435.       runpath_var='LD_RUN_PATH'
  2436.       ;;
  2437.     uts4*)
  2438.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2439.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2440.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2441.       ;;
  2442.     *)
  2443.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2444.       ;;
  2445.     esac
  2446.   fi
  2447. ])
  2448. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  2449. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  2450. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2451. if test "$GCC" = yes; then
  2452.   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2453. fi
  2454. #
  2455. # Do we need to explicitly link libc?
  2456. #
  2457. case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
  2458. x|xyes)
  2459.   # Assume -lc should be added
  2460.   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  2461.   if test "$enable_shared" = yes && test "$GCC" = yes; then
  2462.     case $_LT_AC_TAGVAR(archive_cmds, $1) in
  2463.     *'~'*)
  2464.       # FIXME: we may have to deal with multi-command sequences.
  2465.       ;;
  2466.     '$CC '*)
  2467.       # Test whether the compiler implicitly links with -lc since on some
  2468.       # systems, -lgcc has to come before -lc. If gcc already passes -lc
  2469.       # to ld, don't add -lc before -lgcc.
  2470.       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  2471.       $rm conftest*
  2472.       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  2473.   
  2474.       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  2475.         soname=conftest
  2476.         lib=conftest
  2477.         libobjs=conftest.$ac_objext
  2478.         deplibs=
  2479.         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  2480.         compiler_flags=-v
  2481.         linker_flags=-v
  2482.         verstring=
  2483.         output_objdir=.
  2484.         libname=conftest
  2485.         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
  2486.         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  2487.         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2>&1 | grep " -lc " >/dev/null 2>&1)
  2488.         then
  2489.   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2490.         else
  2491.   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  2492.         fi
  2493.         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  2494.       else
  2495.         cat conftest.err 1>&5
  2496.       fi
  2497.       $rm conftest*
  2498.       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
  2499.       ;;
  2500.     esac
  2501.   fi
  2502.   ;;
  2503. esac
  2504. ])# AC_LIBTOOL_PROG_LD_SHLIBS
  2505. # _LT_AC_FILE_LTDLL_C
  2506. # -------------------
  2507. # Be careful that the start marker always follows a newline.
  2508. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
  2509. # /* ltdll.c starts here */
  2510. # #define WIN32_LEAN_AND_MEAN
  2511. # #include <windows.h>
  2512. # #undef WIN32_LEAN_AND_MEAN
  2513. # #include <stdio.h>
  2514. #
  2515. # #ifndef __CYGWIN__
  2516. # #  ifdef __CYGWIN32__
  2517. # #    define __CYGWIN__ __CYGWIN32__
  2518. # #  endif
  2519. # #endif
  2520. #
  2521. # #ifdef __cplusplus
  2522. # extern "C" {
  2523. # #endif
  2524. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  2525. # #ifdef __cplusplus
  2526. # }
  2527. # #endif
  2528. #
  2529. # #ifdef __CYGWIN__
  2530. # #include <cygwin/cygwin_dll.h>
  2531. # DECLARE_CYGWIN_DLL( DllMain );
  2532. # #endif
  2533. # HINSTANCE __hDllInstance_base;
  2534. #
  2535. # BOOL APIENTRY
  2536. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  2537. # {
  2538. #   __hDllInstance_base = hInst;
  2539. #   return TRUE;
  2540. # }
  2541. # /* ltdll.c ends here */
  2542. ])# _LT_AC_FILE_LTDLL_C
  2543. # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
  2544. # ---------------------------------
  2545. AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
  2546. # old names
  2547. AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
  2548. AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
  2549. AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
  2550. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  2551. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  2552. AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
  2553. AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
  2554. # This is just to silence aclocal about the macro not being used
  2555. ifelse([AC_DISABLE_FAST_INSTALL])
  2556. AC_DEFUN([LT_AC_PROG_GCJ],
  2557. [AC_CHECK_TOOL(GCJ, gcj, no)
  2558.   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  2559.   AC_SUBST(GCJFLAGS)
  2560. ])
  2561. AC_DEFUN([LT_AC_PROG_RC],
  2562. [AC_CHECK_TOOL(RC, windres, no)
  2563. ])
  2564. ############################################################
  2565. # NOTE: This macro has been submitted for inclusion into   #
  2566. #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
  2567. #  a released version of Autoconf we should remove this    #
  2568. #  macro and use it instead.                               #
  2569. ############################################################
  2570. # LT_AC_PROG_SED
  2571. # --------------
  2572. # Check for a fully-functional sed program, that truncates
  2573. # as few characters as possible.  Prefer GNU sed if found.
  2574. AC_DEFUN([LT_AC_PROG_SED],
  2575. [AC_MSG_CHECKING([for a sed that does not truncate output])
  2576. AC_CACHE_VAL(lt_cv_path_SED,
  2577. [# Loop through the user's path and test for sed and gsed.
  2578. # Then use that list of sed's as ones to test for truncation.
  2579. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2580. for as_dir in $PATH
  2581. do
  2582.   IFS=$as_save_IFS
  2583.   test -z "$as_dir" && as_dir=.
  2584.   for lt_ac_prog in sed gsed; do
  2585.     for ac_exec_ext in '' $ac_executable_extensions; do
  2586.       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  2587.         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  2588.       fi
  2589.     done
  2590.   done
  2591. done
  2592. lt_ac_max=0
  2593. lt_ac_count=0
  2594. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  2595. # along with /bin/sed that truncates output.
  2596. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  2597.   test ! -f $lt_ac_sed && break
  2598.   cat /dev/null > conftest.in
  2599.   lt_ac_count=0
  2600.   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  2601.   # Check for GNU sed and select it if it is found.
  2602.   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  2603.     lt_cv_path_SED=$lt_ac_sed
  2604.     break
  2605.   fi
  2606.   while true; do
  2607.     cat conftest.in conftest.in >conftest.tmp
  2608.     mv conftest.tmp conftest.in
  2609.     cp conftest.in conftest.nl
  2610.     echo >>conftest.nl
  2611.     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  2612.     cmp -s conftest.out conftest.nl || break
  2613.     # 10000 chars as input seems more than enough
  2614.     test $lt_ac_count -gt 10 && break
  2615.     lt_ac_count=`expr $lt_ac_count + 1`
  2616.     if test $lt_ac_count -gt $lt_ac_max; then
  2617.       lt_ac_max=$lt_ac_count
  2618.       lt_cv_path_SED=$lt_ac_sed
  2619.     fi
  2620.   done
  2621. done
  2622. ])
  2623. SED=$lt_cv_path_SED
  2624. AC_MSG_RESULT([$SED])
  2625. ])