summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-11-18 00:35:06 +0100
committerSimon Josefsson <simon@josefsson.org>2008-11-18 00:35:06 +0100
commit35d89293222a0e8930dc2752b0e5e85e4d088800 (patch)
tree0054123bf1ba0b0ee6ad8a568a5a1701040ae197
parent60859fa9e71f85af96ab0951a4d681813705b761 (diff)
downloadgnutls-35d89293222a0e8930dc2752b0e5e85e4d088800.tar.gz
Move C++ and -output-def detection.
-rw-r--r--configure.ac14
-rw-r--r--lib/configure.ac5
-rw-r--r--lib/m4/hooks.m414
-rw-r--r--libextra/configure.ac1
-rw-r--r--m4/output-def.m4 (renamed from lib/m4/output-def.m4)0
5 files changed, 20 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 59d55696b7..c5c9a25088 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,17 @@ if test "x$GAA" = "x"; then
***]])
fi
+AC_ARG_ENABLE(cxx,
+ AS_HELP_STRING([--disable-cxx], [unconditionally disable the C++ library]),
+ use_cxx=$enableval, use_cxx=yes)
+if test "$use_cxx" != "no"; then
+ AC_PROG_CXX
+ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], use_cxx=yes, use_cxx=no)
+ AC_LANG_POP(C++)
+fi
+AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
+
gl_EARLY
AC_C_INLINE
@@ -67,6 +78,7 @@ AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
sj_VALGRIND
sj_LINKER_SCRIPT([$srcdir/lib/libgnutls.vers])
+sj_OUTPUT_DEF
AC_CHECK_TYPES(uint,,, [
# include <sys/types.h>
@@ -207,6 +219,8 @@ gl_WARN_ADD([-fdiagnostics-show-option])
# Export things for */configure.ac.
export WARN_CFLAGS
export have_ld_version_script
+export output_def
+export use_cxx
AC_CONFIG_SUBDIRS([lib])
AC_CONFIG_SUBDIRS([libextra])
diff --git a/lib/configure.ac b/lib/configure.ac
index f2cbcc9c45..19a005311f 100644
--- a/lib/configure.ac
+++ b/lib/configure.ac
@@ -89,6 +89,11 @@ AC_SUBST(LIBGNUTLS_CFLAGS)
# Finish things from ../configure.ac.
AC_SUBST([WARN_CFLAGS])
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+AM_CONDITIONAL(HAVE_LD_OUTPUT_DEF, test "$output_def" = "yes")
+AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
+if test "$use_cxx" != "no"; then
+ AC_PROG_CXX
+fi
AC_CONFIG_FILES([
Makefile
diff --git a/lib/m4/hooks.m4 b/lib/m4/hooks.m4
index cce7145abf..81cfd0b12c 100644
--- a/lib/m4/hooks.m4
+++ b/lib/m4/hooks.m4
@@ -34,18 +34,6 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
SOVERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
AC_SUBST(SOVERSION)
- AC_ARG_ENABLE(cxx,
- AS_HELP_STRING([--disable-cxx],
- [unconditionally disable the C++ library]),
- use_cxx=$enableval, use_cxx=yes)
- if test "$use_cxx" != "no"; then
- AC_PROG_CXX
- AC_LANG_PUSH(C++)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], use_cxx=yes, use_cxx=no)
- AC_LANG_POP(C++)
- fi
- AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
-
AC_LIB_HAVE_LINKFLAGS(gcrypt,, [#include <gcrypt.h>],
[enum gcry_cipher_algos i = GCRY_CIPHER_CAMELLIA128])
if test "$ac_cv_libgcrypt" != yes; then
@@ -226,8 +214,6 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
fi
AM_CONDITIONAL(ENABLE_OPENPGP, test "$ac_enable_openpgp" = "yes")
- sj_OUTPUT_DEF
-
# For storing integers in pointers without warnings
# http://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html#desc
AC_CHECK_SIZEOF(void *)
diff --git a/libextra/configure.ac b/libextra/configure.ac
index 40e6a4ead7..3e3e0330b3 100644
--- a/libextra/configure.ac
+++ b/libextra/configure.ac
@@ -48,6 +48,7 @@ AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
# Finish things from ../configure.ac.
AC_SUBST([WARN_CFLAGS])
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+AM_CONDITIONAL(HAVE_LD_OUTPUT_DEF, test "$output_def" = "yes")
AC_CONFIG_FILES([
Makefile
diff --git a/lib/m4/output-def.m4 b/m4/output-def.m4
index 3fb666282c..3fb666282c 100644
--- a/lib/m4/output-def.m4
+++ b/m4/output-def.m4