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:42 -0800
commit95918a1a86bc1e4c5045801b4bdb83359e033c6a (patch)
treec594383bae412a70e930c6f37040fb8d34572de2 /configure.ac
parent6e3d2bdcc0e2a97f56f69c77b8acd1fbd80eaa45 (diff)
downloadpycrypto-95918a1a86bc1e4c5045801b4bdb83359e033c6a.tar.gz
Use autoconf to generate compiler options
Hopefully this means we'll break on fewer platforms. Also, remove some of the extra optimization flags (e.g. -O3 -fomit-frame-pointer), which don't really do much.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
1 files changed, 28 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b45655d..2957608 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,13 +1,40 @@
# -*- Autoconf -*-
+# PyCrypto's configure.ac file.
# Process this file with autoconf to produce a configure script.
+#
+# The contents of this file are dedicated to the public domain. To
+# the extent that dedication to the public domain is not available,
+# everyone is granted a worldwide, perpetual, royalty-free,
+# non-exclusive license to exercise all rights associated with the
+# contents of this file for any purpose whatsoever.
+# No rights are reserved.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
AC_PREREQ([2.67])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AC_CONFIG_SRCDIR([src/pycrypto_compat.h])
AC_CONFIG_HEADERS([src/config.h])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_FILES([buildenv])
+
+AM_INIT_AUTOMAKE([foreign no-define no-dist])
# Checks for programs.
-AC_PROG_CC
+AC_PROG_CC_C99
+
+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])])
+AX_CHECK_COMPILE_FLAG([-Wno-unused-parameter], [AX_APPEND_FLAG([-Wno-unused-parameter])])
# Checks for libraries.
AC_ARG_WITH([gmp], AS_HELP_STRING([--without-gmp], [Build without gmp library (default: test)]))