Apply more common style for AC_ARG_ENABLE parameters, drop
AC_CANONICAL_TARGET that is unnecessary for a non-compiler package, and
drop workarounds that seem to be there for very old autoconf versions.
---
 configure.in |   79 +++++++++++++++++++++++++--------------------------------
 1 files changed, 35 insertions(+), 44 deletions(-)

diff --git a/configure.in b/configure.in
index 19a920a..6087bc6 100644
--- a/configure.in
+++ b/configure.in
@@ -1,16 +1,8 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT([openCryptoki], [2.3.3], [[email protected]])
 
-dnl Backup CFLAGS so that once the auto tools set it to "-g -O2",
-dnl (which we want to avoid), we can restore them to whatever the
-dnl user might have wanted below.
-cmdline_CFLAGS="$CFLAGS"
-
 AM_INIT_AUTOMAKE([foreign 1.6])
 
-dnl Get the canonical host type
-AC_CANONICAL_TARGET
-
 dnl Checks for header files.
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
@@ -47,29 +39,29 @@ dnl ---
 
 dnl --- Debugging support
 AC_ARG_ENABLE([debug],
-       AC_HELP_STRING([--enable-debug=no/yes],
-       [enable debugging build [[default=no]]]),
+       AC_HELP_STRING([--enable-debug],
+       [enable debugging build @<:@default=no@:>@]),
        [],
        [enable_debug=no])
 
 dnl --- build testcases
 AC_ARG_ENABLE([testcases],
-       AC_HELP_STRING([--enable-testcases=no/yes],
-       [build the test cases [[default=no]]]),
+       AC_HELP_STRING([--enable-testcases],
+       [build the test cases @<:@default=no@:>@]),
        [],
        [enable_testcases=no])
 
 dnl --- Check if building daemon
 AC_ARG_ENABLE([daemon],
-       AC_HELP_STRING([--enable-daemon=no/yes],
-       [build pkcsslotd daemon [[default=yes]]]),
+       AC_HELP_STRING([--enable-daemon],
+       [build pkcsslotd daemon @<:@default=yes@:>@]),
        [],
        [enable_daemon=yes])
 
 dnl --- Check if building library
 AC_ARG_ENABLE([library],
-       AC_HELP_STRING([--enable-library=no/yes],
-       [build opencryptoki libraries [[default=yes]]]),
+       AC_HELP_STRING([--enable-library],
+       [build opencryptoki libraries @<:@default=yes@:>@]),
        [],
        [enable_library=yes])
 
@@ -79,65 +71,65 @@ dnl --- that it will enable it by default it dependencies 
are met
 
 dnl --- ICA token
 AC_ARG_ENABLE([icatok],
-       AC_HELP_STRING([--enable-icatok=no/yes],
-       [build ica token (enabled by default if libica is present)]),
+       AC_HELP_STRING([--enable-icatok],
+       [build ica token @<:@default=enabled if libica is present@:>@]),
        [],
        [enable_icatok=check])
 
 dnl --- CCA token
 AC_ARG_ENABLE([ccatok],
-       AC_HELP_STRING([--enable-ccatok=no/yes],
-       [build cca token (enabled by default in s390 arch)]),
+       AC_HELP_STRING([--enable-ccatok],
+       [build cca token (IBM Common Cryptographic Architecture) 
@<:@default=enabled in s390 arch@:>@]),
        [],
        [enable_ccatok=check])
 
 dnl --- software token
 AC_ARG_ENABLE([swtok],
-       AC_HELP_STRING([--enable-swtok=no/yes],
-       [build software token (enabled by default)]),
+       AC_HELP_STRING([--enable-swtok],
+       [build software token @<:@default=enabled@:>@]),
        [],
        [enable_swtok=yes])
 
 dnl --- TPM token
 AC_ARG_ENABLE([tpmtok],
-       AC_HELP_STRING([--enable-tpmtok=no/yes],
-       [build tpm token (Trusted Platform Module, enabled by default if 
TrouSerS is present)]),
+       AC_HELP_STRING([--enable-tpmtok],
+       [build tpm token (Trusted Platform Module) @<:@default=enabled if 
TrouSerS is present@:>@]),
        [],
        [enable_tpmtok=check])
 
 dnl --- icc token (IBM 4758 PCICC hardware)
 AC_ARG_ENABLE([icctok],
-       AC_HELP_STRING([--enable-icctok=no/yes],
-       [build icc token (IBM 4758 hardware, enabled by default if SCC library 
is present)]),
+       AC_HELP_STRING([--enable-icctok],
+       [build icc token (IBM 4758 hardware) @<:@default=enabled if SCC library 
is present@:>@]),
        [],
        [enable_icctok=check])
 
 dnl --- aep token (AEP Crypto Accelerator hardware)
 AC_ARG_ENABLE([aeptok],
-       AC_HELP_STRING([--enable-aeptok=no/yes],
-       [build aep token (AEP Crypto Accelerator, enabled by default if AEP 
library is present)]),
+       AC_HELP_STRING([--enable-aeptok],
+       [build aep token (AEP Crypto Accelerator) @<:@default=enabled if AEP 
library is present@:>@]),
        [],
        [enable_aeptok=check])
 
 dnl --- bcom token (Broadcom Crypto Accelerator hardware)
 AC_ARG_ENABLE([bcomtok],
-       AC_HELP_STRING([--enable-bcomtok=no/yes],
-       [build bcom token (Broadcom Crypto Accelerator, enabled by default if 
uBSec library is present)]),
+       AC_HELP_STRING([--enable-bcomtok],
+       [build bcom token (Broadcom Crypto Accelerator) @<:@default=enabled if 
uBSec library is present@:>@]),
        [],
        [enable_bcomtok=check])
 
 dnl -- cr token (Corrent Crypto Accelerator hardware)
 AC_ARG_ENABLE([crtok],
-       AC_HELP_STRING([--enable-crtok=no/yes],
-       [build cr token (Corrent Crypto Accelerator, enabled by default if 
SocketArmor library is present)]),
+       AC_HELP_STRING([--enable-crtok],
+       [build cr token (Corrent Crypto Accelerator) @<:@default=enabled if 
SocketArmor library is present@:>@]),
        [],
        [enable_crtok=check])
 
 dnl --- token-specific stuff
 dnl --- pkcscca_migrate
 AC_ARG_ENABLE([pkcscca_migrate],
-       AC_HELP_STRING([--enable-pkcscca_migrate=no/yes],
-       [build pkcscca_migrate (CCA token key migration tool, enabled by 
default if CCA library is present)]),
+       AC_HELP_STRING([--enable-pkcscca_migrate],
+       [build pkcscca_migrate (CCA token key migration tool) 
@<:@default=enabled if CCA library is present@:>@]),
        [],
        [enable_pkcscca_migrate=check])
 
@@ -147,49 +139,49 @@ dnl --- Define what to check based on enabled features
 
 dnl --- Openssl development files
 AC_ARG_WITH([openssl],
-       AC_HELP_STRING([--with-openssl[[=DIR]]], [OpenSSL development files 
location]),
+       AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [OpenSSL development files 
location]),
        [],
        [with_openssl=check])
 
 dnl --- Libica development files
 AC_ARG_WITH([libica],
-       AC_HELP_STRING([--with-libica[[=DIR]]], [libica development files 
location]),
+       AC_HELP_STRING([--with-libica@<:@=DIR@:>@], [libica development files 
location]),
        [],
        [with_libica=check])
 
 dnl --- TSS (TrouSerS) development files
 AC_ARG_WITH([tss],
-       AC_HELP_STRING([--with-tss[[=DIR]]], [TrouSerS development files 
location]),
+       AC_HELP_STRING([--with-tss@<:@=DIR@:>@], [TrouSerS development files 
location]),
        [],
        [with_tss=check])
 
 dnl --- SCC development files (IBM 4758 PCI Cryptographic Coprocessor)
 AC_ARG_WITH([scc],
-       AC_HELP_STRING([--with-scc[[=DIR]]], [SCC library location]),
+       AC_HELP_STRING([--with-scc@<:@=DIR@:>@], [SCC library location]),
        [],
        [with_scc=check])
 
 dnl --- AEP development files (AEP crypto hardware)
 AC_ARG_WITH([aep],
-       AC_HELP_STRING([--with-aep[[=DIR]]], [AEP development files location]),
+       AC_HELP_STRING([--with-aep@<:@=DIR@:>@], [AEP development files 
location]),
        [],
        [with_aep=check])
 
 dnl --- uBSec development files (Broadcom crypto hardware)
 AC_ARG_WITH([ubsec],
-       AC_HELP_STRING([--with-ubsec[[=DIR]]], [uBSec library location]),
+       AC_HELP_STRING([--with-ubsec@<:@=DIR@:>@], [uBSec library location]),
        [],
        [with_ubsec=check])
 
 dnl --- Socketarmor development files (Corrent crypto hardware)
 AC_ARG_WITH([socketarmor],
-       AC_HELP_STRING([--with-socketarmor[[=DIR]]], [Socketarmor library 
location]),
+       AC_HELP_STRING([--with-socketarmor@<:@=DIR@:>@], [Socketarmor library 
location]),
        [],
        [with_socketarmor=check])
 
 dnl --- xcryptolinz development files (IBM CCA development files)
 AC_ARG_WITH([xcryptolinz],
-       AC_HELP_STRING([--with-xcryptolinz[[=DIR]]], [CCA library (xcryptolinz) 
location]),
+       AC_HELP_STRING([--with-xcryptolinz@<:@=DIR@:>@], [CCA library 
(xcryptolinz) location]),
        [],
        [with_xcryptolinz=check])
 
@@ -199,9 +191,8 @@ dnl --- Now that we have all the options, let's check for a 
valid build
 dnl ---
 
 dnl --- enable_debug
-AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = "xyes"])
 if test "x$enable_debug" = "xyes"; then
-       CFLAGS="$cmdline_CFLAGS -gdwarf-2 -g3 -O0 -DDEBUG"
+       CFLAGS="$CFLAGS -gdwarf-2 -g3 -O0 -DDEBUG"
 fi
 
 dnl --- first, check what external software is present or specified
-- 
1.7.4.rc1


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to