chiark / gitweb /
build system: provide configure option --enable-hacky-parallel
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jun 2011 19:20:20 +0000 (20:20 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Jun 2011 11:07:27 +0000 (12:07 +0100)
This allows -DHACKY_PARALLEL to be turned on with an option to configure.
The corresponding comments in the Makefile.in, suggesting to edit it by
hand there, are therefore removed.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile.in
configure
configure.in

index 630ff2d9ff02a8a7a116cb15632eea90fea8ffe7..e5ea84b013e9146131f97303963c1911f4ef5ac8 100644 (file)
@@ -31,9 +31,6 @@ CC:=@CC@
 INSTALL:=@INSTALL@
 INSTALL_PROGRAM:=@INSTALL_PROGRAM@
 
 INSTALL:=@INSTALL@
 INSTALL_PROGRAM:=@INSTALL_PROGRAM@
 
-# Use -DHACKY_PARALLEL if you are compiling secnet for an extremely
-# slow machine
-#CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@ -DHACKY_PARALLEL
 CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@ -Werror \
        -W -Wno-unused \
        -Wno-pointer-sign -Wstrict-prototypes -Wmissing-prototypes \
 CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@ -Werror \
        -W -Wno-unused \
        -Wno-pointer-sign -Wstrict-prototypes -Wmissing-prototypes \
index 85a58643b3d6e83d1af347f401db6f173359c968..8417ccc18ec87ac460e186acb8d117430935c6ff 100755 (executable)
--- a/configure
+++ b/configure
@@ -654,6 +654,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_hacky_parallel
 '
       ac_precious_vars='build_alias
 host_alias
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1271,6 +1272,12 @@ if test -n "$ac_init_help"; then
    esac
   cat <<\_ACEOF
 
    esac
   cat <<\_ACEOF
 
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-hacky-parallel parallelise slow cryptography (default is no)
+
 Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags
 Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags
@@ -4186,6 +4193,18 @@ $as_echo "$ac_cv_prog_cc_no_writeable_strings" >&6; }
 
 
 
 
 
 
+# Check whether --enable-hacky-parallel was given.
+if test "${enable_hacky_parallel+set}" = set; then :
+  enableval=$enable_hacky_parallel;
+  case "$enableval" in
+  n|0|no) ;;
+  y|1|yes) CFLAGS="$CFLAGS -DHACKY_PARALLEL" ;;
+  *) ;;
+  esac
+
+fi
+
+
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpz_init_set_str in -lgmp" >&5
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpz_init_set_str in -lgmp" >&5
index 3970809c095fa623a25101e958bd0d67061779ab..0f88daca5a920a273b97b8ea1cc0a9ff13b3ce08 100644 (file)
@@ -33,6 +33,16 @@ AC_CHECK_SIZEOF(unsigned short)
 AC_CHECK_SIZEOF(unsigned char)
 AC_PROG_CC_NO_WRITEABLE_STRINGS(WRITESTRINGS)
 
 AC_CHECK_SIZEOF(unsigned char)
 AC_PROG_CC_NO_WRITEABLE_STRINGS(WRITESTRINGS)
 
+AC_ARG_ENABLE(hacky-parallel,
+  [AS_HELP_STRING([--enable-hacky-parallel],
+                  [parallelise slow cryptography (default is no)])], [
+  case "$enableval" in
+  n|0|no) ;;
+  y|1|yes) CFLAGS="$CFLAGS -DHACKY_PARALLEL" ;;
+  *) ;;
+  esac
+])
+
 AC_DEFUN([REQUIRE_HEADER],[AC_CHECK_HEADER($1,,[AC_MSG_ERROR($1 not found)])])
 
 dnl the order in which libraries is checked is important
 AC_DEFUN([REQUIRE_HEADER],[AC_CHECK_HEADER($1,,[AC_MSG_ERROR($1 not found)])])
 
 dnl the order in which libraries is checked is important