1
diff -Nur libgcrypt11-1.2.4/configure libgcrypt11-1.2.4.new/configure
2
--- libgcrypt11-1.2.4/configure 2007-09-19 13:29:41.000000000 +0100
3
+++ libgcrypt11-1.2.4.new/configure 2007-09-19 13:30:02.000000000 +0100
4
@@ -23754,100 +23754,12 @@
6
# Solaris needs -lsocket and -lnsl. Unisys system includes
7
# gethostbyname in libsocket but needs libnsl for socket.
9
-{ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
10
-echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
11
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12
- echo $ECHO_N "(cached) $ECHO_C" >&6
14
- ac_check_lib_save_LIBS=$LIBS
16
-cat >conftest.$ac_ext <<_ACEOF
19
-cat confdefs.h >>conftest.$ac_ext
20
-cat >>conftest.$ac_ext <<_ACEOF
21
-/* end confdefs.h. */
23
-/* Override any GCC internal prototype to avoid an error.
24
- Use char because int might match the return type of a GCC
25
- builtin and then its argument prototype would still apply. */
29
-char gethostbyname ();
33
-return gethostbyname ();
38
-rm -f conftest.$ac_objext conftest$ac_exeext
39
-if { (ac_try="$ac_link"
41
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
42
- *) ac_try_echo=$ac_try;;
44
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
45
- (eval "$ac_link") 2>conftest.er1
47
- grep -v '^ *+' conftest.er1 >conftest.err
49
- cat conftest.err >&5
50
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
51
- (exit $ac_status); } &&
52
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
53
- { (case "(($ac_try" in
54
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
55
- *) ac_try_echo=$ac_try;;
57
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
58
- (eval "$ac_try") 2>&5
60
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
61
- (exit $ac_status); }; } &&
62
- { ac_try='test -s conftest$ac_exeext'
63
- { (case "(($ac_try" in
64
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
65
- *) ac_try_echo=$ac_try;;
67
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
68
- (eval "$ac_try") 2>&5
70
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
71
- (exit $ac_status); }; }; then
72
- ac_cv_lib_nsl_gethostbyname=yes
74
- echo "$as_me: failed program was:" >&5
75
-sed 's/^/| /' conftest.$ac_ext >&5
77
- ac_cv_lib_nsl_gethostbyname=no
80
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
81
- conftest$ac_exeext conftest.$ac_ext
82
-LIBS=$ac_check_lib_save_LIBS
84
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
85
-echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
86
-if test $ac_cv_lib_nsl_gethostbyname = yes; then
87
- cat >>confdefs.h <<_ACEOF
88
-#define HAVE_LIBNSL 1
95
-{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
96
-echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
97
-if test "${ac_cv_lib_socket_socket+set}" = set; then
98
+{ echo "$as_me:$LINENO: checking for library containing socket" >&5
99
+echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6; }
100
+if test "${ac_cv_search_socket+set}" = set; then
101
echo $ECHO_N "(cached) $ECHO_C" >&6
103
- ac_check_lib_save_LIBS=$LIBS
104
-LIBS="-lsocket $LIBS"
105
+ ac_func_search_save_LIBS=$LIBS
106
cat >conftest.$ac_ext <<_ACEOF
109
@@ -23870,7 +23782,14 @@
113
-rm -f conftest.$ac_objext conftest$ac_exeext
114
+for ac_lib in '' socket; do
115
+ if test -z "$ac_lib"; then
116
+ ac_res="none required"
119
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
121
+ rm -f conftest.$ac_objext conftest$ac_exeext
122
if { (ac_try="$ac_link"
124
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
125
@@ -23904,37 +23823,42 @@
127
echo "$as_me:$LINENO: \$? = $ac_status" >&5
128
(exit $ac_status); }; }; then
129
- ac_cv_lib_socket_socket=yes
130
+ ac_cv_search_socket=$ac_res
132
echo "$as_me: failed program was:" >&5
133
sed 's/^/| /' conftest.$ac_ext >&5
135
- ac_cv_lib_socket_socket=no
139
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
140
- conftest$ac_exeext conftest.$ac_ext
141
-LIBS=$ac_check_lib_save_LIBS
143
+ if test "${ac_cv_search_socket+set}" = set; then
146
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
147
-echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
148
-if test $ac_cv_lib_socket_socket = yes; then
149
- ac_need_libsocket=1
151
+if test "${ac_cv_search_socket+set}" = set; then
155
+ ac_cv_search_socket=no
158
+LIBS=$ac_func_search_save_LIBS
160
+{ echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
161
+echo "${ECHO_T}$ac_cv_search_socket" >&6; }
162
+ac_res=$ac_cv_search_socket
163
+if test "$ac_res" != no; then
164
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
166
-if test x$ac_need_libsocket = x1; then
167
- LIBS="$LIBS -lsocket"
169
-if test x$ac_try_nsl = x1; then
170
- { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
171
-echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
172
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
174
+{ echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
175
+echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6; }
176
+if test "${ac_cv_search_gethostbyname+set}" = set; then
177
echo $ECHO_N "(cached) $ECHO_C" >&6
179
- ac_check_lib_save_LIBS=$LIBS
181
+ ac_func_search_save_LIBS=$LIBS
182
cat >conftest.$ac_ext <<_ACEOF
185
@@ -23957,7 +23881,14 @@
189
-rm -f conftest.$ac_objext conftest$ac_exeext
190
+for ac_lib in '' nsl; do
191
+ if test -z "$ac_lib"; then
192
+ ac_res="none required"
195
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
197
+ rm -f conftest.$ac_objext conftest$ac_exeext
198
if { (ac_try="$ac_link"
200
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
201
@@ -23991,30 +23922,37 @@
203
echo "$as_me:$LINENO: \$? = $ac_status" >&5
204
(exit $ac_status); }; }; then
205
- ac_cv_lib_nsl_gethostbyname=yes
206
+ ac_cv_search_gethostbyname=$ac_res
208
echo "$as_me: failed program was:" >&5
209
sed 's/^/| /' conftest.$ac_ext >&5
211
- ac_cv_lib_nsl_gethostbyname=no
215
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
216
- conftest$ac_exeext conftest.$ac_ext
217
-LIBS=$ac_check_lib_save_LIBS
219
+ if test "${ac_cv_search_gethostbyname+set}" = set; then
222
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
223
-echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
224
-if test $ac_cv_lib_nsl_gethostbyname = yes; then
227
+if test "${ac_cv_search_gethostbyname+set}" = set; then
230
+ ac_cv_search_gethostbyname=no
233
+LIBS=$ac_func_search_save_LIBS
235
+{ echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
236
+echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6; }
237
+ac_res=$ac_cv_search_gethostbyname
238
+if test "$ac_res" != no; then
239
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
241
- if test x$ac_need_libnsl = x1
248
##################################
249
#### Checks for header files. ####
250
##################################
251
diff -Nur libgcrypt11-1.2.4/configure.ac libgcrypt11-1.2.4.new/configure.ac
252
--- libgcrypt11-1.2.4/configure.ac 2007-02-01 18:41:06.000000000 +0000
253
+++ libgcrypt11-1.2.4.new/configure.ac 2007-09-19 13:29:43.000000000 +0100
256
# Solaris needs -lsocket and -lnsl. Unisys system includes
257
# gethostbyname in libsocket but needs libnsl for socket.
258
-AC_CHECK_LIB(nsl, gethostbyname)
259
-AC_CHECK_LIB(socket, socket, ac_need_libsocket=1, ac_try_nsl=1)
260
-if test x$ac_need_libsocket = x1; then
261
- LIBS="$LIBS -lsocket"
263
-if test x$ac_try_nsl = x1; then
264
- AC_CHECK_LIB(nsl, gethostbyname, ac_need_libnsl=1)
265
- if test x$ac_need_libnsl = x1
270
+AC_SEARCH_LIBS([socket], [socket])
271
+AC_SEARCH_LIBS([gethostbyname], [nsl])
273
##################################
274
#### Checks for header files. ####