summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2013-02-02 20:48:04 -0800
committerDwayne Litzenberger <dlitz@dlitz.net>2013-02-16 13:09:44 -0800
commit8ef5b687050fab4411275cfc3292829849ff11a3 (patch)
tree2420daac68bb5b03b3d634166d22175cf27efe71 /configure.ac
parent95918a1a86bc1e4c5045801b4bdb83359e033c6a (diff)
downloadpycrypto-8ef5b687050fab4411275cfc3292829849ff11a3.tar.gz
OpenBSD: Automatically look for libgmp in /usr/local
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2957608..614005a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,19 @@ AM_INIT_AUTOMAKE([foreign no-define no-dist])
# Checks for programs.
AC_PROG_CC_C99
+AC_CANONICAL_HOST()
+case "$host_os" in # XXX - Does this break cross-compiling?
+openbsd*)
+ # According to gcc-local(1), OpenBSD's gcc is modified to ignore /usr/local
+ # by default. However, libgmp is usually installed to /usr/local, so we
+ # want to look there for the libraries.
+ CFLAGS="$CFLAGS -I/usr/local/include"
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ ;;
+*)
+ ;;
+esac
+
AX_CHECK_COMPILE_FLAG([-Wall], [AX_APPEND_FLAG([-Wall])])
AX_CHECK_COMPILE_FLAG([-Wextra], [AX_APPEND_FLAG([-Wextra])])
AX_CHECK_COMPILE_FLAG([-Wno-missing-field-initializers], [AX_APPEND_FLAG([-Wno-missing-field-initializers])])