shlibpath.m4 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. # shlibpath.m4 - Define LTDL_SHLIBPATH_VAR. -*-Autoconf-*-
  2. ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2011
  3. ## Free Software Foundation, Inc.
  4. ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  5. ##
  6. ## This program is free software; you can redistribute it and/or modify
  7. ## it under the terms of the GNU General Public License as published by
  8. ## the Free Software Foundation; either version 2 of the License, or
  9. ## (at your option) any later version.
  10. ##
  11. ## This program is distributed in the hope that it will be useful, but
  12. ## WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. ## General Public License for more details.
  15. ##
  16. ## You should have received a copy of the GNU General Public License
  17. ## along with this program; if not, write to the Free Software
  18. ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. ##
  20. ## As a special exception to the GNU General Public License, if you
  21. ## distribute this file as part of a program that contains a
  22. ## configuration script generated by Autoconf, you may include it under
  23. ## the same distribution terms that you use for the rest of that program.
  24. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  25. # -----------------------------
  26. # PORTME Fill in your ld.so characteristics
  27. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  28. [AC_MSG_CHECKING([dynamic linker characteristics])
  29. library_names_spec=
  30. libname_spec='lib$name'
  31. soname_spec=
  32. shrext=".so"
  33. postinstall_cmds=
  34. postuninstall_cmds=
  35. finish_cmds=
  36. finish_eval=
  37. shlibpath_var=
  38. shlibpath_overrides_runpath=unknown
  39. version_type=none
  40. dynamic_linker="$host_os ld.so"
  41. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  42. if test "$GCC" = yes; then
  43. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
  44. if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
  45. # if the path contains ";" then we assume it to be the separator
  46. # otherwise default to the standard path separator (i.e. ":") - it is
  47. # assumed that no part of a normal pathname contains ";" but that should
  48. # okay in the real world where ";" in dirpaths is itself problematic.
  49. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
  50. else
  51. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
  52. fi
  53. else
  54. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  55. fi
  56. need_lib_prefix=unknown
  57. hardcode_into_libs=no
  58. # when you set need_version to no, make sure it does not cause -set_version
  59. # flags to be left without arguments
  60. need_version=unknown
  61. case $host_os in
  62. aix3*)
  63. version_type=linux
  64. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  65. shlibpath_var=LIBPATH
  66. # AIX 3 has no versioning support, so we append a major version to the name.
  67. soname_spec='${libname}${release}${shared_ext}$major'
  68. ;;
  69. aix[[4-9]]*)
  70. version_type=linux
  71. need_lib_prefix=no
  72. need_version=no
  73. hardcode_into_libs=yes
  74. if test "$host_cpu" = ia64; then
  75. # AIX 5 supports IA64
  76. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  77. shlibpath_var=LD_LIBRARY_PATH
  78. else
  79. # With GCC up to 2.95.x, collect2 would create an import file
  80. # for dependence libraries. The import file would start with
  81. # the line `#! .'. This would cause the generated library to
  82. # depend on `.', always an invalid library. This was fixed in
  83. # development snapshots of GCC prior to 3.0.
  84. case $host_os in
  85. aix4 | aix4.[[01]] | aix4.[[01]].*)
  86. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  87. echo ' yes '
  88. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  89. :
  90. else
  91. can_build_shared=no
  92. fi
  93. ;;
  94. esac
  95. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  96. # soname into executable. Probably we can add versioning support to
  97. # collect2, so additional links can be useful in future.
  98. if test "$aix_use_runtimelinking" = yes; then
  99. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  100. # instead of lib<name>.a to let people know that these are not
  101. # typical AIX shared libraries.
  102. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  103. else
  104. # We preserve .a as extension for shared libraries through AIX4.2
  105. # and later when we are not doing run time linking.
  106. library_names_spec='${libname}${release}.a $libname.a'
  107. soname_spec='${libname}${release}${shared_ext}$major'
  108. fi
  109. shlibpath_var=LIBPATH
  110. fi
  111. ;;
  112. amigaos*)
  113. library_names_spec='$libname.ixlibrary $libname.a'
  114. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  115. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
  116. ;;
  117. beos*)
  118. library_names_spec='${libname}${shared_ext}'
  119. dynamic_linker="$host_os ld.so"
  120. shlibpath_var=LIBRARY_PATH
  121. ;;
  122. bsdi4*)
  123. version_type=linux
  124. need_version=no
  125. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  126. soname_spec='${libname}${release}${shared_ext}$major'
  127. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  128. shlibpath_var=LD_LIBRARY_PATH
  129. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  130. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  131. # the default ld.so.conf also contains /usr/contrib/lib and
  132. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  133. # libtool to hard-code these into programs
  134. ;;
  135. cygwin* | mingw* | pw32*)
  136. version_type=windows
  137. shrext=".dll"
  138. need_version=no
  139. need_lib_prefix=no
  140. case $GCC,$host_os in
  141. yes,cygwin* | yes,mingw* | yes,pw32*)
  142. library_names_spec='$libname.dll.a'
  143. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  144. postinstall_cmds='base_file=`basename \${file}`~
  145. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  146. dldir=$destdir/`dirname \$dlpath`~
  147. test -d \$dldir || mkdir -p \$dldir~
  148. $install_prog $dir/$dlname \$dldir/$dlname'
  149. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  150. dlpath=$dir/\$dldll~
  151. $rm \$dlpath'
  152. shlibpath_overrides_runpath=yes
  153. case $host_os in
  154. cygwin*)
  155. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  156. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  157. sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
  158. ;;
  159. mingw*)
  160. # MinGW DLLs use traditional 'lib' prefix
  161. soname_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  162. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
  163. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  164. # It is most probably a Windows format PATH printed by
  165. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  166. # path with ; separators, and with drive letters. We can handle the
  167. # drive letters (cygwin fileutils understands them), so leave them,
  168. # especially as we might pass files found there to a mingw objdump,
  169. # which wouldn't understand a cygwinified path. Ahh.
  170. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
  171. else
  172. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
  173. fi
  174. ;;
  175. pw32*)
  176. # pw32 DLLs use 'pw' prefix rather than 'lib'
  177. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}${shared_ext}'
  178. ;;
  179. esac
  180. ;;
  181. *)
  182. library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  183. ;;
  184. esac
  185. dynamic_linker='Win32 ld.exe'
  186. # FIXME: first we should search . and the directory the executable is in
  187. shlibpath_var=PATH
  188. ;;
  189. darwin* | rhapsody*)
  190. dynamic_linker="$host_os dyld"
  191. version_type=darwin
  192. need_lib_prefix=no
  193. need_version=no
  194. # FIXME: Relying on posixy $() will cause problems for
  195. # cross-compilation, but unfortunately the echo tests do not
  196. # yet detect zsh echo's removal of \ escapes.
  197. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  198. soname_spec='${libname}${release}${major}$shared_ext'
  199. shlibpath_overrides_runpath=yes
  200. shlibpath_var=DYLD_LIBRARY_PATH
  201. shrext='$(test .$module = .yes && echo .so || echo .dylib)'
  202. # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
  203. if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
  204. sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
  205. fi
  206. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  207. ;;
  208. dgux*)
  209. version_type=linux
  210. need_lib_prefix=no
  211. need_version=no
  212. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  213. soname_spec='${libname}${release}${shared_ext}$major'
  214. shlibpath_var=LD_LIBRARY_PATH
  215. ;;
  216. freebsd*)
  217. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  218. version_type=freebsd-$objformat
  219. case $version_type in
  220. freebsd-elf*)
  221. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  222. need_version=no
  223. need_lib_prefix=no
  224. ;;
  225. freebsd-*)
  226. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  227. need_version=yes
  228. ;;
  229. esac
  230. shlibpath_var=LD_LIBRARY_PATH
  231. case $host_os in
  232. freebsd2*)
  233. shlibpath_overrides_runpath=yes
  234. ;;
  235. freebsd3.[01]* | freebsdelf3.[01]*)
  236. shlibpath_overrides_runpath=yes
  237. hardcode_into_libs=yes
  238. ;;
  239. *) # from 3.2 on
  240. shlibpath_overrides_runpath=no
  241. hardcode_into_libs=yes
  242. ;;
  243. esac
  244. ;;
  245. gnu*)
  246. version_type=linux
  247. need_lib_prefix=no
  248. need_version=no
  249. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  250. soname_spec='${libname}${release}${shared_ext}$major'
  251. shlibpath_var=LD_LIBRARY_PATH
  252. hardcode_into_libs=yes
  253. ;;
  254. hpux9* | hpux10* | hpux11*)
  255. # Give a soname corresponding to the major version so that dld.sl refuses to
  256. # link against other versions.
  257. version_type=sunos
  258. need_lib_prefix=no
  259. need_version=no
  260. case "$host_cpu" in
  261. ia64*)
  262. shrext='.so'
  263. hardcode_into_libs=yes
  264. dynamic_linker="$host_os dld.so"
  265. shlibpath_var=LD_LIBRARY_PATH
  266. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  267. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  268. soname_spec='${libname}${release}${shared_ext}$major'
  269. if test "X$HPUX_IA64_MODE" = X32; then
  270. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  271. else
  272. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  273. fi
  274. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  275. ;;
  276. hppa*64*)
  277. shrext='.sl'
  278. hardcode_into_libs=yes
  279. dynamic_linker="$host_os dld.sl"
  280. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  281. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  282. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  283. soname_spec='${libname}${release}${shared_ext}$major'
  284. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  285. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  286. ;;
  287. *)
  288. shrext='.sl'
  289. dynamic_linker="$host_os dld.sl"
  290. shlibpath_var=SHLIB_PATH
  291. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  292. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  293. soname_spec='${libname}${release}${shared_ext}$major'
  294. ;;
  295. esac
  296. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  297. postinstall_cmds='chmod 555 $lib'
  298. ;;
  299. irix5* | irix6* | nonstopux*)
  300. case $host_os in
  301. nonstopux*) version_type=nonstopux ;;
  302. *)
  303. if test "$lt_cv_prog_gnu_ld" = yes; then
  304. version_type=linux
  305. else
  306. version_type=irix
  307. fi ;;
  308. esac
  309. need_lib_prefix=no
  310. need_version=no
  311. soname_spec='${libname}${release}${shared_ext}$major'
  312. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  313. case $host_os in
  314. irix5* | nonstopux*)
  315. libsuff= shlibsuff=
  316. ;;
  317. *)
  318. case $LD in # libtool.m4 will add one of these switches to LD
  319. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  320. libsuff= shlibsuff= libmagic=32-bit;;
  321. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  322. libsuff=32 shlibsuff=N32 libmagic=N32;;
  323. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  324. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  325. *) libsuff= shlibsuff= libmagic=never-match;;
  326. esac
  327. ;;
  328. esac
  329. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  330. shlibpath_overrides_runpath=no
  331. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  332. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  333. hardcode_into_libs=yes
  334. ;;
  335. # No shared lib support for Linux oldld, aout, or coff.
  336. linux*oldld* | linux*aout* | linux*coff*)
  337. dynamic_linker=no
  338. ;;
  339. # This must be Linux ELF.
  340. linux*|k*bsd*-gnu)
  341. version_type=linux
  342. need_lib_prefix=no
  343. need_version=no
  344. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  345. soname_spec='${libname}${release}${shared_ext}$major'
  346. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  347. shlibpath_var=LD_LIBRARY_PATH
  348. shlibpath_overrides_runpath=no
  349. # This implies no fast_install, which is unacceptable.
  350. # Some rework will be needed to allow for fast_install
  351. # before this can be enabled.
  352. hardcode_into_libs=yes
  353. # We used to test for /lib/ld.so.1 and disable shared libraries on
  354. # powerpc, because MkLinux only supported shared libraries with the
  355. # GNU dynamic linker. Since this was broken with cross compilers,
  356. # most powerpc-linux boxes support dynamic linking these days and
  357. # people can always --disable-shared, the test was removed, and we
  358. # assume the GNU/Linux dynamic linker is in use.
  359. dynamic_linker='GNU/Linux ld.so'
  360. ;;
  361. netbsd*)
  362. version_type=sunos
  363. need_lib_prefix=no
  364. need_version=no
  365. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  366. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  367. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  368. dynamic_linker='NetBSD (a.out) ld.so'
  369. else
  370. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
  371. soname_spec='${libname}${release}${shared_ext}$major'
  372. dynamic_linker='NetBSD ld.elf_so'
  373. fi
  374. shlibpath_var=LD_LIBRARY_PATH
  375. shlibpath_overrides_runpath=yes
  376. hardcode_into_libs=yes
  377. ;;
  378. newsos6)
  379. version_type=linux
  380. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  381. shlibpath_var=LD_LIBRARY_PATH
  382. shlibpath_overrides_runpath=yes
  383. ;;
  384. nto-qnx)
  385. version_type=linux
  386. need_lib_prefix=no
  387. need_version=no
  388. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  389. soname_spec='${libname}${release}${shared_ext}$major'
  390. shlibpath_var=LD_LIBRARY_PATH
  391. shlibpath_overrides_runpath=yes
  392. ;;
  393. openbsd*)
  394. version_type=sunos
  395. need_lib_prefix=no
  396. need_version=no
  397. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  398. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  399. shlibpath_var=LD_LIBRARY_PATH
  400. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  401. case $host_os in
  402. openbsd2.[[89]] | openbsd2.[[89]].*)
  403. shlibpath_overrides_runpath=no
  404. ;;
  405. *)
  406. shlibpath_overrides_runpath=yes
  407. ;;
  408. esac
  409. else
  410. shlibpath_overrides_runpath=yes
  411. fi
  412. ;;
  413. os2*)
  414. libname_spec='$name'
  415. shrext=".dll"
  416. need_lib_prefix=no
  417. library_names_spec='$libname${shared_ext} $libname.a'
  418. dynamic_linker='OS/2 ld.exe'
  419. shlibpath_var=LIBPATH
  420. ;;
  421. osf3* | osf4* | osf5*)
  422. version_type=osf
  423. need_lib_prefix=no
  424. need_version=no
  425. soname_spec='${libname}${release}${shared_ext}$major'
  426. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  427. shlibpath_var=LD_LIBRARY_PATH
  428. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  429. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  430. ;;
  431. sco3.2v5*)
  432. version_type=osf
  433. soname_spec='${libname}${release}${shared_ext}$major'
  434. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  435. shlibpath_var=LD_LIBRARY_PATH
  436. ;;
  437. solaris*)
  438. version_type=linux
  439. need_lib_prefix=no
  440. need_version=no
  441. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  442. soname_spec='${libname}${release}${shared_ext}$major'
  443. shlibpath_var=LD_LIBRARY_PATH
  444. shlibpath_overrides_runpath=yes
  445. hardcode_into_libs=yes
  446. # ldd complains unless libraries are executable
  447. postinstall_cmds='chmod +x $lib'
  448. ;;
  449. sunos4*)
  450. version_type=sunos
  451. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  452. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  453. shlibpath_var=LD_LIBRARY_PATH
  454. shlibpath_overrides_runpath=yes
  455. if test "$with_gnu_ld" = yes; then
  456. need_lib_prefix=no
  457. fi
  458. need_version=yes
  459. ;;
  460. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  461. version_type=linux
  462. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  463. soname_spec='${libname}${release}${shared_ext}$major'
  464. shlibpath_var=LD_LIBRARY_PATH
  465. case $host_vendor in
  466. sni)
  467. shlibpath_overrides_runpath=no
  468. need_lib_prefix=no
  469. export_dynamic_flag_spec='${wl}-Blargedynsym'
  470. runpath_var=LD_RUN_PATH
  471. ;;
  472. siemens)
  473. need_lib_prefix=no
  474. ;;
  475. motorola)
  476. need_lib_prefix=no
  477. need_version=no
  478. shlibpath_overrides_runpath=no
  479. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  480. ;;
  481. esac
  482. ;;
  483. sysv4*MP*)
  484. if test -d /usr/nec ;then
  485. version_type=linux
  486. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  487. soname_spec='$libname${shared_ext}.$major'
  488. shlibpath_var=LD_LIBRARY_PATH
  489. fi
  490. ;;
  491. uts4*)
  492. version_type=linux
  493. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  494. soname_spec='${libname}${release}${shared_ext}$major'
  495. shlibpath_var=LD_LIBRARY_PATH
  496. ;;
  497. *)
  498. dynamic_linker=no
  499. ;;
  500. esac
  501. AC_MSG_RESULT([$dynamic_linker])
  502. test "$dynamic_linker" = no && can_build_shared=no
  503. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  504. # AC_LTDL_SHLIBPATH
  505. # -----------------
  506. AC_DEFUN([AC_LTDL_SHLIBPATH],
  507. [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
  508. AC_CACHE_CHECK([which variable specifies run-time library path],
  509. [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"])
  510. if test -n "$libltdl_cv_shlibpath_var"; then
  511. AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
  512. [Define to the name of the environment variable that determines the dynamic library search path.])
  513. fi
  514. ])# AC_LTDL_SHLIBPATH