summaryrefslogtreecommitdiff
blob: 645c80d0279bcc14d617163be7b6d37b6162f144 (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
39
40
41
42
43
44
45
46
47
48
49
1) Use pkg-config to figure out openssl libraries (also fixes underlinking with
   ld.gold, bug #371893).
2) Respect CFLAGS/LDFLAGS.

-jer


--- a/lib/configure.ac
+++ b/lib/configure.ac
@@ -113,7 +113,7 @@
 AC_CHECK_LIB([pcre],[pcre_compile],,[AC_MSG_ERROR(Required library -lpcre not found. You may want to download it from http://www.pcre.org or locate it and include directory in LD_LIBRARY_PATH to support this build.)])
 AC_CHECK_LIB([readline],[readline],,[AC_MSG_ERROR(Required library -lreadline not found. You may want to download it from http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html or locate it and include directory in LD_LIBRARY_PATH to support this build.)])
 AC_CHECK_LIB(history,add_history,,[AC_MSG_ERROR(Required library -lhistory not found. You may want to download it from http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html or locate it and include directory in LD_LIBRARY_PATH to support this build.)])
-AC_CHECK_LIB(ssl,SSL_library_init,,[AC_MSG_ERROR(Required library -lssl not found. You may want to download it from http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html or locate it and include directory in LD_LIBRARY_PATH to support this build.)])
+PKG_CHECK_MODULES(libssl,openssl,LIBS="$LIBS `$PKG_CONFIG --cflags --libs openssl`",[AC_MSG_ERROR(Required library -lssl not found. You may want to download it from http://www.openssl.org/ or locate it and include directory in LD_LIBRARY_PATH to support this build.)])
 
 AC_SEARCH_LIBS(socket,socket)
 AC_SEARCH_LIBS(inet_ntoa,nsl)
@@ -152,8 +152,6 @@
 # define a release date variable
 AC_DEFINE_UNQUOTED(NB_COMPILE_PLATFORM,"$host",[Define compile platform])
 
-CFLAGS="-Wall -I/usr/local/include -I/usr/local/ssl/include"
-LDFLAGS="-L/usr/local/ssl/lib"
 case "$host" in
   *-netbsd*)
     AC_DEFINE(NETBSD,,[Define if NetBSD])
--- a/module/configure.ac
+++ b/module/configure.ac
@@ -100,8 +100,6 @@
 
 AC_SUBST([NB_MOD_PATH],[../.libs])
 
-CFLAGS="-Wall -I/usr/local/include -I/usr/local/ssl/include"
-LDFLAGS="-L/usr/local/ssl/lib"
 
 #=====================================
 # Checks for header files.
--- a/module/webster/configure.ac
+++ b/module/webster/configure.ac
@@ -87,8 +87,6 @@
 #  AC_PATH_PROGS([NB],[nb-0.7.5 nb-0.7.4 nb-0.7.3 nb-0.7.2 nb-0.7.1 nb])
 #fi
 
-CFLAGS="-I/usr/local/include -I/usr/local/ssl/include"
-LDFLAGS="-L/usr/local/ssl/lib"
 
 #=====================================
 # Checks for libraries.