config.libpath 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. #! /bin/sh
  2. # Output a system dependent set of variables, describing how to set the
  3. # run time search path of shared libraries in an executable at run time.
  4. #
  5. # Copyright 1996-2005 Free Software Foundation, Inc.
  6. # Taken from GNU libtool, 2003
  7. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; either version 2 of the License, or
  12. # (at your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful, but
  15. # WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. # General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with this program; if not, write to the Free Software Foundation,
  21. # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  22. #
  23. # As a special exception to the GNU General Public License, if you
  24. # distribute this file as part of a program that contains a
  25. # configuration script generated by Autoconf, you may include it under
  26. # the same distribution terms that you use for the rest of that program.
  27. #
  28. # The first argument passed to this file is the canonical host specification,
  29. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  30. # or
  31. # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  32. # The environment variable LD should be set by the caller.
  33. #
  34. # The set of defined variables is at the end of this script.
  35. host="$1"
  36. host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  37. host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  38. host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  39. shlibpath_var=
  40. case $host_os in
  41. aix3*)
  42. shlibpath_var=LIBPATH
  43. ;;
  44. aix4* | aix5*)
  45. if test "$host_cpu" = ia64; then
  46. # AIX 5 supports IA64
  47. shlibpath_var=LD_LIBRARY_PATH
  48. else
  49. shlibpath_var=LIBPATH
  50. fi
  51. ;;
  52. beos*)
  53. shlibpath_var=LIBRARY_PATH
  54. ;;
  55. bsdi4*)
  56. shlibpath_var=LD_LIBRARY_PATH
  57. ;;
  58. cygwin* | mingw* | pw32*)
  59. # FIXME: first we should search . and the directory the executable is in
  60. shlibpath_var=PATH
  61. ;;
  62. darwin* | rhapsody*)
  63. shlibpath_var=DYLD_LIBRARY_PATH
  64. ;;
  65. freebsd1*)
  66. ;;
  67. kfreebsd*-gnu)
  68. shlibpath_var=LD_LIBRARY_PATH
  69. ;;
  70. freebsd*)
  71. shlibpath_var=LD_LIBRARY_PATH
  72. ;;
  73. gnu*)
  74. shlibpath_var=LD_LIBRARY_PATH
  75. ;;
  76. hpux9* | hpux10* | hpux11*)
  77. shlibpath_var=SHLIB_PATH
  78. ;;
  79. irix5* | irix6* | nonstopux*)
  80. case $host_os in
  81. irix5* | nonstopux*)
  82. shlibsuff=
  83. ;;
  84. *)
  85. case $LD in # libtool.m4 will add one of these switches to LD
  86. *-32|*"-32 ") shlibsuff= ;;
  87. *-n32|*"-n32 ") shlibsuff=N32 ;;
  88. *-64|*"-64 ") shlibsuff=64 ;;
  89. *) shlibsuff= ;;
  90. esac
  91. ;;
  92. esac
  93. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  94. ;;
  95. linux-gnu*)
  96. shlibpath_var=LD_LIBRARY_PATH
  97. ;;
  98. knetbsd*-gnu)
  99. shlibpath_var=LD_LIBRARY_PATH
  100. ;;
  101. netbsd*)
  102. shlibpath_var=LD_LIBRARY_PATH
  103. ;;
  104. newsos6)
  105. shlibpath_var=LD_LIBRARY_PATH
  106. ;;
  107. openbsd*)
  108. shlibpath_var=LD_LIBRARY_PATH
  109. ;;
  110. os2*)
  111. shlibpath_var=LIBPATH
  112. ;;
  113. osf3* | osf4* | osf5*)
  114. shlibpath_var=LD_LIBRARY_PATH
  115. ;;
  116. sco3.2v5*)
  117. shlibpath_var=LD_LIBRARY_PATH
  118. ;;
  119. solaris*)
  120. shlibpath_var=LD_LIBRARY_PATH
  121. ;;
  122. sunos4*)
  123. shlibpath_var=LD_LIBRARY_PATH
  124. ;;
  125. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  126. shlibpath_var=LD_LIBRARY_PATH
  127. ;;
  128. uts4*)
  129. shlibpath_var=LD_LIBRARY_PATH
  130. ;;
  131. dgux*)
  132. shlibpath_var=LD_LIBRARY_PATH
  133. ;;
  134. sysv4*MP*)
  135. if test -d /usr/nec ;then
  136. shlibpath_var=LD_LIBRARY_PATH
  137. fi
  138. ;;
  139. esac
  140. LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
  141. # This is the shared library path variable.
  142. shlibpath_var=$shlibpath_var
  143. EOF