summaryrefslogtreecommitdiff
path: root/devel/gnu-libtool/files/patch-ac
blob: 3a1894e10003e5957be80b113f8b785efccee88e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
$FreeBSD$

--- ltconfig.orig	Tue Dec  7 23:50:48 1999
+++ ltconfig	Sat Jun  8 11:48:12 2002
@@ -169,7 +169,7 @@
 # Constants:
 PROGRAM=ltconfig
 PACKAGE=libtool
-VERSION=1.3.4
+VERSION=1.3.4-freebsd-ports
 TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
@@ -185,6 +185,8 @@
 # which needs '.lib').
 enable_static=yes
 enable_fast_install=yes
+install_ltlibs=yes
+release_suffix=yes
 enable_dlopen=unknown
 enable_win32_dll=no
 ltmain=
@@ -242,10 +244,14 @@
 
 Generate a system-specific libtool script.
 
+    --build                no-op to keep compatability with configure scripts generated for 1.4
     --debug                enable verbose shell tracing
     --disable-shared       do not build shared libraries
     --disable-static       do not build static libraries
     --disable-fast-install do not optimize for fast installation
+    --disable-ltlibs       don't install the .la archives
+    --release-ignore       don't use -release specification
+    --release-suffix       use -release suffix for all files
     --enable-dlopen        enable dlopen support
     --enable-win32-dll     enable building dlls on win32 hosts
     --help                 display this help and exit
@@ -268,6 +274,8 @@
   exit 0
   ;;
 
+  --build=*) ;;
+
   --debug)
     echo "$progname: enabling shell trace mode"
     set -x
@@ -279,6 +287,12 @@
 
   --disable-fast-install) enable_fast_install=no ;;
 
+  --disable-ltlibs) install_ltlibs=no ;;
+
+  --release-ignore) release_suffix=no ;;
+
+  --release-suffix) release_suffix=all ;;
+
   --enable-dlopen) enable_dlopen=yes ;;
 
   --enable-win32-dll) enable_win32_dll=yes ;;
@@ -971,11 +985,11 @@
   $rm conftest.dat
   if ln -s X conftest.dat 2>/dev/null; then
     $rm conftest.dat
-    LN_S="ln -s"
+    LN_S="ln -sf"
   else
     LN_S=ln
   fi
-  if test "$LN_S" = "ln -s"; then
+  if test "$LN_S" = "ln -sf"; then
     echo "$ac_t"yes 1>&6
   else
     echo "$ac_t"no 1>&6
@@ -1226,8 +1240,8 @@
 
   *)
     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     else
       ld_shlibs=no
     fi
@@ -1353,14 +1367,6 @@
     hardcode_shlibpath_var=no
     ;;
 
-  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-  freebsd*)
-    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
   hpux9* | hpux10* | hpux11*)
     case "$host_os" in
     hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
@@ -1775,7 +1781,7 @@
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+sys_lib_search_path_spec="/lib /usr/lib"
 file_magic_cmd=
 file_magic_test_file=
 deplibs_check_method='unknown'
@@ -1873,19 +1879,22 @@
   version_type=freebsd-$objformat
   case "$version_type" in
     freebsd-elf*)
-      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
-      file_magic_cmd=/usr/bin/file
-      file_magic_test_file=`echo /usr/lib/libc.so*`
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-      need_version=no
-      need_lib_prefix=no
+      deplibs_check_method='file_magic (ELF [0-9][0-9]*-bit [LM]SB shared object|current ar archive)'
       ;;
     freebsd-*)
-      deplibs_check_method=unknown
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
-      need_version=yes
+      deplibs_check_method='file_magic FreeBSD.* shared library'
       ;;
   esac
+  file_magic_cmd=/usr/bin/file
+  file_magic_test_file=`echo /usr/lib/libc.so.*`
+  if test "$release_suffix" = all; then
+    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so'
+  else
+    library_names_spec='${libname}${release}.so$versuffix ${libname}.so'
+  fi 
+  need_version=no
+  need_lib_prefix=no
+  finish_cmds='/usr/bin/env OBJFORMAT="'"$objformat"'" /sbin/ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   case "$host_os" in
   freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
@@ -2776,6 +2785,15 @@
 
 # Shell to use when invoking shell scripts.
 SHELL=$LTSHELL
+
+# Whether to waste disk space.
+install_ltlibs=$install_ltlibs 
+
+# What to do with -release.
+#  yes - only for shared archive
+#  no  - ingnore
+#  all - for all archives
+release_suffix=$release_suffix
 
 # Whether or not to build shared libraries.
 build_libtool_libs=$enable_shared