diff --git a/configure.ac b/configure.ac index a47ef2e..c2e0f7c 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,14 @@ dnl check for build configurat dnl PACKAGE=cln dnl libtool wants PACKAGE +case $host_os in + *mingw32*) + AC_LIBTOOL_WIN32_DLL + ;; + *) + ;; +esac + dnl convince libtool to build win32 dll AC_PROG_LIBTOOL dnl sets variable LIBTOOL @@ -94,12 +102,12 @@ CL_VERSION_MAJOR=1 CL_VERSION_MINOR=1 CL_VERSION_PATCHLEVEL=12 dnl release version for cln/config.h, so it can be tested by the preprocessor -AC_DEFINE_UNQUOTED(CL_VERSION_MAJOR, $CL_VERSION_MAJOR) -AC_DEFINE_UNQUOTED(CL_VERSION_MINOR, $CL_VERSION_MINOR) -AC_DEFINE_UNQUOTED(CL_VERSION_PATCHLEVEL, $CL_VERSION_PATCHLEVEL) +AC_DEFINE_UNQUOTED(CL_VERSION_MAJOR, $CL_VERSION_MAJOR, [CLN major version]) +AC_DEFINE_UNQUOTED(CL_VERSION_MINOR, $CL_VERSION_MINOR, [CLN minor version]) +AC_DEFINE_UNQUOTED(CL_VERSION_PATCHLEVEL, $CL_VERSION_PATCHLEVEL, [CLN patchlevel version]) dnl concatenated release version CL_VERSION=$CL_VERSION_MAJOR.$CL_VERSION_MINOR.$CL_VERSION_PATCHLEVEL -AC_DEFINE_UNQUOTED(CL_VERSION, $CL_VERSION) +AC_DEFINE_UNQUOTED(CL_VERSION, $CL_VERSION, [CLN version]) AC_SUBST(CL_VERSION) dnl @@ -151,8 +159,10 @@ CL_MACHINE([floating-point types and beh dnl dnl interfacing to GNU gmp (must be at least version 3) dnl -AC_ARG_WITH(gmp, [ --with-gmp use external fast low-level functions from GNU MP 3. - [default=yes]], ,with_gmp="yes") +AC_ARG_WITH(gmp, AS_HELP_STRING([--with-gmp], + [use external fast low-level functions from GNU MP 3 (default: yes).]), + with_gmp="$withval", + with_gmp="yes") if test "$with_gmp" = yes; then CL_GMP_H_VERSION if test "$cl_cv_new_gmp_h" = no; then with_gmp="no"; fi @@ -163,7 +173,7 @@ if test "$with_gmp" = yes; then fi if test "$with_gmp" = yes; then CL_GMP_SET_UINTD - AC_DEFINE(CL_USE_GMP) + AC_DEFINE(CL_USE_GMP, ,[Define if GNU MP library is available]) else AC_MSG_WARN([disabling external GNU MP library]) fi diff --git a/m4/c++-constructors.m4 b/m4/c++-constructors.m4 index 2eb9889..48df183 100644 --- a/m4/c++-constructors.m4 +++ b/m4/c++-constructors.m4 @@ -37,7 +37,7 @@ rm -f conftest* ]) if test "$cl_cv_cplusplus_ctorprefix" '!=' unknown; then ac_value='"'"$cl_cv_cplusplus_ctorprefix"'"' - AC_DEFINE_UNQUOTED(CL_GLOBAL_CONSTRUCTOR_PREFIX,$ac_value) + AC_DEFINE_UNQUOTED(CL_GLOBAL_CONSTRUCTOR_PREFIX,$ac_value, [Global ctor prefix]) AC_CACHE_CHECK(for the global destructors function prefix, cl_cv_cplusplus_dtorprefix, [ cat > conftest.cc << EOF @@ -63,7 +63,7 @@ rm -f conftest* ]) if test "$cl_cv_cplusplus_dtorprefix" '!=' none; then ac_value='"'"$cl_cv_cplusplus_ctorprefix"'"' - AC_DEFINE_UNQUOTED(CL_GLOBAL_DESTRUCTOR_PREFIX,$ac_value) + AC_DEFINE_UNQUOTED(CL_GLOBAL_DESTRUCTOR_PREFIX,$ac_value, [Global dtor prefix]) fi dnl Check whether the global constructors/destructors functions are file-scope dnl only by default. This is the case in egcs-1.1.2 or newer. @@ -93,7 +93,7 @@ fi rm -f conftest* ]) if test "$cl_cv_cplusplus_ctorexport" = yes; then - AC_DEFINE(CL_NEED_GLOBALIZE_CTORDTOR) + AC_DEFINE(CL_NEED_GLOBALIZE_CTORDTOR, ,[Define if global ctor/dtors are file-scope by default]) fi fi fi diff --git a/m4/general.m4 b/m4/general.m4 index 0c550af..3a0b403 100644 --- a/m4/general.m4 +++ b/m4/general.m4 @@ -129,6 +129,64 @@ AC_CANONICAL_HOST AC_DEFUN([CL_CANONICAL_HOST_CPU], [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC]) +AH_TOP([ +#ifndef _CL_CONFIG_H +#define _CL_CONFIG_H +/* CLN's idea about CPU model */ +#ifndef __i386__ +#undef __i386__ +#endif +#ifndef __m68k__ +#undef __m68k__ +#endif +/* NB: GCC def's __mips__ both on big-endian and little-endian systems. */ +#ifndef __mips__ +#undef __mips__ +#endif +#ifndef __mipsel__ +#undef __mipsel__ +#endif +#ifndef __mips64__ +#undef __mips64__ +#endif +#ifndef __sparc__ +#undef __sparc__ +#endif +#ifndef __sparc64__ +#undef __sparc64__ +#endif +#ifndef __alpha__ +#undef __alpha__ +#endif +#ifndef __hppa__ +#undef __hppa__ +#endif +#ifndef __arm__ +#undef __arm__ +#endif +#ifndef __rs6000__ +#undef __rs6000__ +#endif +#ifndef __m88k__ +#undef __m88k__ +#endif +#ifndef __convex__ +#undef __convex__ +#endif +#ifndef __ia64__ +#undef __ia64__ +#endif +#ifndef __x86_64__ +#undef __x86_64__ +#endif +#ifndef __s390__ +#undef __s390__ +#endif +]) +AH_BOTTOM([ +#endif /* _CL_CONFIG_H */ +]) + case "$host_cpu" in changequote(,)dnl i[4567]86 ) @@ -182,6 +240,7 @@ else fi ;; esac + dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this cat >> confdefs.h < conftest.h + ./conftest${ac_exeext} > conftest.h if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then # The file exists and we would not be changing it rm -f conftest.h