summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-07-20 21:06:40 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-07-20 21:06:40 +0000
commit84ce9696f8acf38540a6151aa2963827c32b6e61 (patch)
tree88a14f73a01a15771c098473203bf9bc6ff8f8ba
parentcc968fd408127707b8d885ebee2b141416aaf362 (diff)
downloadpica-pica-84ce9696f8acf38540a6151aa2963827c32b6e61.tar.gz
pica-pica-84ce9696f8acf38540a6151aa2963827c32b6e61.zip
fixes for enabling build on FreeBSD
git-svn-id: svn://localhost/project_picapica/trunk@252 fb96df88-216d-11de-830c-f3023f12d8ac
-rw-r--r--configure.ac15
1 files changed, 12 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 9451d1a..2172958 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,14 +6,23 @@ AC_INIT([Pica Pica Messenger], [0.5.4dev], [http://picapica.im/bugzilla/], [pica
AM_INIT_AUTOMAKE([-Wall foreign])
AC_CONFIG_SRCDIR([PICA_node.c])
+AC_CANONICAL_HOST
+
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
+# Platform-specific environment settings
+AS_CASE([$host],
+ [*-*-freebsd*], [LDFLAGS="$LDFLAGS -L/usr/local/lib" CPPFLAGS="$CPPFLAGS -I/usr/local/include"],
+ []
+)
+
# Checks for common libraries, required by both pica-node and pica-client
-AC_CHECK_LIB([crypto], [RAND_add],[],[AC_MSG_ERROR(["libcrypto from OpenSSL package not found"])],[ -ldl -lz ])
-AC_CHECK_LIB([ssl], [SSL_library_init],[],[AC_MSG_ERROR(["libssl from OpenSSL package not found"])], [ -lcrypto -ldl -lz ])
+AC_SEARCH_LIBS([dlopen], [dl])
+AC_CHECK_LIB([crypto], [RAND_add],[],[AC_MSG_ERROR(["libcrypto from OpenSSL package not found"])],[ -lz ])
+AC_CHECK_LIB([ssl], [SSL_library_init],[],[AC_MSG_ERROR(["libssl from OpenSSL package not found"])])
AC_CHECK_LIB([pthread], [pthread_create])
#checking if pica-node is disabled
@@ -46,7 +55,7 @@ AM_CONDITIONAL([PICA_CLIENT], [test "x$PICA_CLIENT_ENABLED" = "xyes"])
#pica-node tests
AS_IF([test "x$PICA_NODE_ENABLED" = "xyes"],[
-AC_CHECK_LIB([sqlite3], [sqlite3_open])
+AC_CHECK_LIB([sqlite3], [sqlite3_open], [], [AC_MSG_ERROR(["libsqlite3 library not found"])])
AC_CHECK_PROG([SQLITE3], [sqlite3], [yes], [no])