summaryrefslogtreecommitdiff
path: root/www/ap-auth-mysql/patches/patch-ab
blob: e0eed3ae680414b107944e4df88ecd00b7783114 (plain)
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
$NetBSD: patch-ab,v 1.2 2006/02/23 01:02:21 ben Exp $

--- configure.ac.orig	2004-05-11 05:18:38.000000000 +0000
+++ configure.ac	2006-02-23 00:54:51.000000000 +0000
@@ -137,12 +137,18 @@
 
 # Checks for header files.
 AC_CHECK_HEADERS([crypt.h])
+AC_CHECK_LIB([crypt], [crypt])
 
-if test -n $HAVE_CRYPT_H; then
+if test -n $HAVE_CRYPT_H -a $HAVE_LIBCRYPT; then
 	AC_TRY_RUN(
 [
+#ifdef HAVE_CRYPT_H
 #include <crypt.h>
+#endif
 #include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 int main()
 {
@@ -154,8 +160,13 @@
 ,,)
 	AC_TRY_RUN(
 [
+#ifdef HAVE_CRYPT_H
 #include <crypt.h>
+#endif
 #include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 int main()
 {