aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in133
1 files changed, 66 insertions, 67 deletions
diff --git a/configure.in b/configure.in
index a56847ae8..290ebbc23 100644
--- a/configure.in
+++ b/configure.in
@@ -15,15 +15,16 @@ AM_CONFIG_HEADER(config.h)
VERSION=`cat $srcdir/VERSION`
PACKAGE=gnupg
-ALL_LINGUAS="de es_ES fr it pl pt_BR pt_PT ru"
+ALL_LINGUAS="de eo es_ES fr id it ja nl pl pt_BR pt_PT ru sv"
static_modules="sha1 md5 rmd160"
+static_random_module=""
AC_SUBST(VERSION)
AC_SUBST(PACKAGE)
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-MODULES_IN_CIPHER=`awk '/# MODULES: / { for(i=3;i<=NF;i++) print $i}' \
- $srcdir/cipher/Makefile.am`
+MODULES_IN_CIPHER=`awk '/^EXTRA_PROGRAMS/ { for(i=3;i<=NF;i++) print $i}' \
+ $srcdir/cipher/Makefile.am`
dnl
dnl Check for random module options
@@ -104,29 +105,6 @@ AC_ARG_WITH(included-zlib,
[g10_force_zlib=yes], [g10_force_zlib=no] )
AC_MSG_RESULT($g10_force_zlib)
-dnl
-dnl Check wether we want to compile libgcrypt
-dnl
-AC_MSG_CHECKING([whether compilation of libgcrypt is requested])
-AC_ARG_ENABLE(libgcrypt,
- [ --enable-libgcrypt compile the libgcrypt [default=no]],
-[compile_libgcrypt="$enableval"],[compile_libgcrypt=no])
-AC_MSG_RESULT($compile_libgcrypt)
-if test x$compile_libgcrypt = xyes ; then
- if test -f $srcdir/gcrypt/gcrypt.h; then
- :
- else
- compile_libgcrypt=no
- AC_MSG_WARN([[
-***
-*** LIBGCRYPT is not yet ready for public testing.
-*** Maybe you have more luck with the next release of GnuPG
-*** Watch the gnupg-announce mailing list or the webpage.
-***]])
- fi
-fi
-AM_CONDITIONAL(COMPILE_LIBGCRYPT, test x$compile_libgcrypt = xyes)
-
dnl
dnl Check whether we want to use Linux capabilities
@@ -154,12 +132,13 @@ case "${target}" in
# special stuff for Windoze NT
# Do we need to set cross_compiling here or is it sufficient
# to rely on AC_PROG_CC which is called later?
- cross_compiling=yes
CC="${target}-gcc"
CPP="${target}-gcc -E"
RANLIB="${target}-ranlib"
+ disallowed_modules="rndunix rndlinux rndegd"
;;
*)
+ disallowed_modules="rndw32"
;;
esac
@@ -181,19 +160,7 @@ AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, yes, no)
AM_CONDITIONAL(HAVE_DOCBOOK_TO_MAN, test "$ac_cv_prog_DOCBOOK_TO_MAN" = yes)
-dnl
-dnl Build shared libraries only when compilation of libgcrypt
-dnl has been requested
-dnl
-AM_DISABLE_SHARED
-enable_shared="$compile_libgcrypt"
-AM_PROG_LIBTOOL
-
-
MPI_OPT_FLAGS=""
-if test "$GCC" = yes; then
- CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
-fi
try_gettext=yes
@@ -227,6 +194,12 @@ case "${target}" in
try_gdbm="no"
;;
+ *-*-freebsd*)
+ # FreeBSD
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ ;;
+
*-*-hpux*)
if test -z "$GCC" ; then
CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
@@ -279,13 +252,19 @@ esac
AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME")
dnl Fixme: Are these the best flags for OpenBSD????
-dnl (I have removed the -lc from * ...CFLAGS for test purposes.)
case "${target}" in
*-openbsd*)
NAME_OF_DEV_RANDOM="/dev/srandom"
NAME_OF_DEV_URANDOM="/dev/urandom"
DYNLINK_MOD_CFLAGS="-shared -rdynamic -fpic -Wl,-Bshareable -Wl,-x"
;;
+
+ *-netbsd*)
+ NAME_OF_DEV_RANDOM="/dev/random"
+ NAME_OF_DEV_URANDOM="/dev/urandom"
+ DYNLINK_MOD_CFLAGS="-shared -rdynamic -fpic -Wl,-Bshareable -Wl,-x"
+ ;;
+
*)
NAME_OF_DEV_RANDOM="/dev/random"
NAME_OF_DEV_URANDOM="/dev/urandom"
@@ -344,8 +323,8 @@ if test "$try_dynload" = yes ; then
DYNLINK_LDFLAGS="$CFLAGS_RDYNAMIC"
use_gnupg_extensions=yes
else
- AC_CHECK_LIB(c,dlopen)
- if test "$ac_cv_lib_c_dlopen" = "yes"; then
+ AC_CHECK_FUNCS(dlopen)
+ if test "$ac_cv_func_dlopen" = "yes"; then
AC_DEFINE(USE_DYNAMIC_LINKING)
AC_DEFINE(HAVE_DL_DLOPEN)
DYNLINK_LDFLAGS="$CFLAGS_RDYNAMIC"
@@ -407,6 +386,7 @@ GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
AC_CHECK_SIZEOF(unsigned short, 2)
AC_CHECK_SIZEOF(unsigned int, 4)
AC_CHECK_SIZEOF(unsigned long, 4)
+AC_CHECK_SIZEOF(unsigned long long, 0)
if test "$ac_cv_sizeof_unsigned_short" = "0" \
|| test "$ac_cv_sizeof_unsigned_int" = "0" \
@@ -419,7 +399,7 @@ fi
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror stpcpy strlwr stricmp tcgetattr rand strtoul mmap)
-AC_CHECK_FUNCS(memmove gettimeofday getrusage gethrtime setrlimit)
+AC_CHECK_FUNCS(memmove gettimeofday getrusage gethrtime setrlimit clock_gettime)
AC_CHECK_FUNCS(memicmp atexit raise getpagesize strftime nl_langinfo)
GNUPG_CHECK_MLOCK
@@ -435,6 +415,7 @@ if test "$ac_cv_header_sys_capability_h" = "yes" ; then
AC_CHECK_LIB(cap, cap_init, ac_need_libcap=1)
if test "$ac_cv_lib_cap_cap_init" = "yes"; then
AC_DEFINE(USE_CAPABILITIES)
+ LIBS="$LIBS -lcap"
use_capabilities=yes
fi
fi
@@ -494,31 +475,29 @@ fi
dnl
-dnl Figure out the default linkage mode for cipher modules
+dnl Figure out the default linkage mode for random modules
dnl
-dnl (We always need a static rmd160)
print_egd_notice=no
-static_modules="$static_modules rmd160"
if test "$use_static_rnd" = default; then
if test "$ac_cv_have_dev_random" = yes; then
- static_modules="$static_modules rndlinux"
+ static_random_module="rndlinux"
else
case "${target}" in
*-*-mingw32)
- static_modules="$static_modules rndw32"
+ static_random_module="rndw32"
AC_DEFINE(USE_STATIC_RNDW32)
;;
i?86-emx-os2|i?86-*-os2*emx)
- static_modules="$static_modules rndos2"
+ static_random_module="rndos2"
;;
m68k-atari-mint)
- static_modules="$static_modules rndatari"
+ static_random_module="rndatari"
;;
i?86-*-msdosdjgpp*)
- static_modules="$static_modules"
+ :
;;
*)
- static_modules="$static_modules rndunix"
+ static_random_module="rndunix"
print_egd_notice=yes
;;
esac
@@ -527,7 +506,7 @@ else
if test "$use_static_rnd" = none; then
:
else
- static_modules="$static_modules rnd$use_static_rnd"
+ static_random_module="rnd$use_static_rnd"
if test "$use_static_rnd" = "unix"; then
print_egd_notice=yes
fi
@@ -560,23 +539,31 @@ dnl
dnl Parse the modules list and build the list
dnl of static and dymically linked modules
dnl
+dnl (We always need a static rmd160)
+static_modules="$static_modules rmd160 $static_random_module"
STATIC_CIPHER_NAMES=""
STATIC_CIPHER_OBJS=""
DYNAMIC_CIPHER_MODS=""
GNUPG_MSG_PRINT([dynamically linked cipher modules:])
for name in $MODULES_IN_CIPHER; do
- x="no"
- for i in $static_modules; do
- if test "$name" = "$i" ; then
- x="yes"
- fi
+ x="yes"
+ for i in $disallowed_modules; do
+ if test "$name" = "$i" ; then x="no" ; fi
done;
if test $x = yes; then
- STATIC_CIPHER_NAMES="$STATIC_CIPHER_NAMES $name"
- STATIC_CIPHER_OBJS="$STATIC_CIPHER_OBJS $name.lo"
- else
- DYNAMIC_CIPHER_MODS="$DYNAMIC_CIPHER_MODS $name"
- GNUPG_MSG_PRINT([$name])
+ x="no"
+ for i in $static_modules; do
+ if test "$name" = "$i" ; then
+ x="yes"
+ fi
+ done;
+ if test $x = yes; then
+ STATIC_CIPHER_NAMES="$STATIC_CIPHER_NAMES $name"
+ STATIC_CIPHER_OBJS="$STATIC_CIPHER_OBJS $name.o"
+ else
+ DYNAMIC_CIPHER_MODS="$DYNAMIC_CIPHER_MODS $name"
+ GNUPG_MSG_PRINT([$name])
+ fi
fi
done
AC_MSG_RESULT()
@@ -643,7 +630,7 @@ if test "$ac_cv_mpi_extra_asm_modules" != ""; then
GNUPG_MSG_PRINT([mpi extra asm functions:])
for i in $ac_cv_mpi_extra_asm_modules; do
GNUPG_MSG_PRINT([$i])
- MPI_EXTRA_ASM_OBJS="$MPI_EXTRA_ASM_OBJS $i.lo"
+ MPI_EXTRA_ASM_OBJS="$MPI_EXTRA_ASM_OBJS $i.o"
done
AC_MSG_RESULT()
fi
@@ -676,15 +663,29 @@ fi
AC_SUBST(ZLIBS)
+# Allow users to append something to the version string without
+# flagging it as development version. The user version parts is
+# considered everything after a dash.
changequote(,)dnl
tmp_pat='[a-zA-Z]'
changequote([,])dnl
-if echo "$VERSION" | grep $tmp_pat >/dev/null ; then
+if echo "$VERSION" | sed 's/-.*//' | grep "$tmp_pat" >/dev/null ; then
AC_DEFINE(IS_DEVELOPMENT_VERSION)
fi
+AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
+
GNUPG_DO_LINK_FILES
+GNUPG_CHECK_GNUMAKE
+
+if test "$GCC" = yes; then
+ if test "$MAINTAINER_MODE" = "yes"; then
+ CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
+ else
+ CFLAGS="$CFLAGS -Wall"
+ fi
+fi
AC_OUTPUT_COMMANDS([
cat >g10defs.tmp <<G10EOF
@@ -725,11 +726,9 @@ mpi/Makefile
cipher/Makefile
g10/Makefile
doc/Makefile
-doc/gph/Makefile
tools/Makefile
zlib/Makefile
checks/Makefile
-gcrypt/Makefile
])
dnl *-*wedit:notab*-* Please keep this as the last line.