Do not make assumptions about where the files should be installed based on architecture or bit-mode - leave that to the packager/user.
Avoid relying on customized, non-standard directory variables. Defer directory resolution to build time via CFLAGS define (note the single quotes, avoiding expansion at build-time) Signed-off-by: Klaus Heinrich Kiwi <[email protected]> --- configure.in | 39 ++++----------------------------------- 1 files changed, 4 insertions(+), 35 deletions(-) diff --git a/configure.in b/configure.in index 3ecde6f..a5965b3 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(openCryptoki, 2.3.0, [email protected],) +AC_INIT([openCryptoki], [2.3.0], [[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 @@ -20,7 +20,7 @@ AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/file.h syslog.h unistd.h) +AC_CHECK_HEADERS([fcntl.h limits.h strings.h sys/file.h syslog.h unistd.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -44,13 +44,6 @@ AC_PATH_PROG([CHMOD], [chmod], [/bin/chmod]) AC_PATH_PROG([CHGRP], [chgrp], [/bin/chgrp]) AC_PROG_SED AC_PROG_MKDIR_P -dnl i.e., /usr/local or /usr -if test "x$prefix" = xNONE; then - prefix=$ac_default_prefix -fi -if test "x$exec_prefix" = xNONE; then - exec_prefix='${prefix}' -fi CFLAGS="$cmdline_CFLAGS" @@ -58,39 +51,18 @@ s390=0 # Arch specific stuff case $target in - *64*) - lib="lib64" - AM_CONDITIONAL(S390, false) ;; *s390x*) s390=1 - lib="lib64" AM_CONDITIONAL(S390, true) ;; *s390*) s390=1 - lib="lib" AM_CONDITIONAL(S390, true) ;; *) - lib="lib" AM_CONDITIONAL(S390, false) ;; esac -if test "x$prefix" == x/usr; then - AC_SUBST(CONFIG_PATH, /var/lib/opencryptoki) - AC_SUBST(CONFIG_PATH_ETC, /etc) - AC_SUBST(SBIN_PATH, /usr/sbin) - AC_SUBST(DB_PATH, /var/lib/opencryptoki) -else - AC_SUBST(CONFIG_PATH, $prefix/var/lib/opencryptoki) - AC_SUBST(CONFIG_PATH_ETC, $prefix/etc) - AC_SUBST(SBIN_PATH, $prefix/sbin) - AC_SUBST(DB_PATH, $prefix/var/lib/opencryptoki) fi -AC_SUBST(LIB_PATH, $prefix/$lib/opencryptoki) -AC_SUBST(STDLL_PATH, $LIB_PATH/stdll) -AC_SUBST(CONFIG_FILE, pk_config_data) -AC_SUBST(METHOD_PATH, $prefix/sbin) -AC_SUBST(HEADER_PATH, $prefix/include) # Debugging support AC_ARG_ENABLE(debug, [ --enable-debug turn on all openCryptoki debugging flags], @@ -281,11 +253,8 @@ AC_ARG_ENABLE(testcases, [AM_CONDITIONAL(TESTS, false)]) -CFLAGS="$CFLAGS -DPKCS64 \ - -DCONFIG_PATH=\\\"$CONFIG_PATH\\\" \ - -DSBIN_PATH=\\\"$SBIN_PATH\\\" \ - -DLIB_PATH=\\\"$LIB_PATH\\\" \ - -D_XOPEN_SOURCE=500" +CFLAGS+=' -DCONFIG_PATH=\"$(localstatedir)/lib/opencryptoki\" \ + -DSBIN_PATH=\"$(sbindir)\" -DLIB_PATH=\"$(libdir)\"' # At this point, CFLAGS is set to something sensible AC_PROG_CC -- 1.6.2.5 ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Opencryptoki-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech
