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>
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 \
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_hacky_parallel
'
ac_precious_vars='build_alias
host_alias
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
+# 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
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