diff --git a/ase/cmn/makefile.in b/ase/cmn/makefile.in index a5cdf411..920855ac 100644 --- a/ase/cmn/makefile.in +++ b/ase/cmn/makefile.in @@ -5,10 +5,12 @@ C_OBJS = $(C_SRCS:.c=.o) CC = @CC@ AR = ar +MAKE = @MAKE@ RANLIB = @RANLIB@ CFLAGS = @CFLAGS@ -I@abs_top_builddir@/.. LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ +BUILDMODE = @BUILDMODE@ all: lib diff --git a/ase/configure b/ase/configure index 14d5ae22..1233e620 100755 --- a/ase/configure +++ b/ase/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.77 . +# From configure.ac Revision: 1.78 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for ase deb-0.1.0. # @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB CPP EGREP LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB CPP EGREP BUILDMODE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -844,6 +844,7 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-wchar use wchar_t a default charater type when enabled (default. yes) + --enable-debug build the library in the debug mode (default. no) --enable-reentrant define _REENTRANT (default. yes) Some influential environment variables: @@ -2320,7 +2321,18 @@ else fi -# Checks for libraries. +# Overrides the default CFLAGS setting +if test "$ac_test_CFLAGS" = "set" +then + CFLAGS=$ac_save_CFLAGS +else + if test "$GCC" = "yes" + then + CFLAGS="-O2" + else + CFLAGS= + fi +fi # Checks for header files. @@ -9869,7 +9881,8 @@ cat >>confdefs.h <<_ACEOF _ACEOF -# Checks for library functions. +# Defines extra options + # Check whether --enable-wchar or --disable-wchar was given. if test "${enable_wchar+set}" = set; then enableval="$enable_wchar" @@ -9892,6 +9905,25 @@ _ACEOF fi +# Check whether --enable-mode or --disable-mode was given. +if test "${enable_mode+set}" = set; then + enableval="$enable_mode" + enable_debug_is=$enableval +else + enable_debug_is=no +fi; +if test "$enable_debug_is" = "yes" +then + CFLAGS="$CFLAGS -g -D_DEBUG -UNDEBUG" + BUILDMODE="debug" + +else + CFLAGS="$CFLAGS -DNDEBUG -U_DEBUG" + BUILDMODE="release" + +fi + +# Configure makefiles # Check whether --enable-reentrant or --disable-reentrant was given. if test "${enable_reentrant+set}" = set; then enableval="$enable_reentrant" @@ -10533,6 +10565,7 @@ s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t +s,@BUILDMODE@,$BUILDMODE,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/ase/configure.ac b/ase/configure.ac index 2b7c7ce8..78e8d750 100644 --- a/ase/configure.ac +++ b/ase/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.53) AC_INIT([ase], [deb-0.1.0]) -AC_REVISION([$Revision: 1.78 $]) +AC_REVISION([$Revision: 1.79 $]) AC_CONFIG_HEADER([cmn/conf_unx.h]) # Checks for programs. @@ -8,7 +8,18 @@ AC_CONFIG_HEADER([cmn/conf_unx.h]) AC_PROG_CC AC_PROG_RANLIB -# Checks for libraries. +# Overrides the default CFLAGS setting +if test "$ac_test_CFLAGS" = "set" +then + CFLAGS=$ac_save_CFLAGS +else + if test "$GCC" = "yes" + then + CFLAGS="-O2" + else + CFLAGS= + fi +fi # Checks for header files. AC_HEADER_STDC @@ -57,7 +68,8 @@ AC_DEFINE_UNQUOTED(ASE_SIZEOF_DOUBLE,${ac_cv_sizeof_double}) AC_DEFINE_UNQUOTED(ASE_SIZEOF_LONG_DOUBLE,${ac_cv_sizeof_long_double}) AC_DEFINE_UNQUOTED(ASE_SIZEOF_WCHAR_T,${ac_cv_sizeof_wchar_t}) -# Checks for library functions. +# Defines extra options + AC_ARG_ENABLE([wchar], [AC_HELP_STRING([--enable-wchar], [use wchar_t a default charater type when enabled (default. yes)])], enable_wchar_is=$enableval,enable_wchar_is=yes) @@ -68,6 +80,19 @@ else AC_DEFINE([ASE_CHAR_IS_MCHAR],[],[char is mchar]) fi +AC_ARG_ENABLE([mode], [AC_HELP_STRING([--enable-debug], + [build the library in the debug mode (default. no)])], + enable_debug_is=$enableval,enable_debug_is=no) +if test "$enable_debug_is" = "yes" +then + [CFLAGS="$CFLAGS -g -D_DEBUG -UNDEBUG"] + AC_SUBST(BUILDMODE, "debug") +else + [CFLAGS="$CFLAGS -DNDEBUG -U_DEBUG"] + AC_SUBST(BUILDMODE, "release") +fi + +# Configure makefiles AC_ARG_ENABLE([reentrant], [AC_HELP_STRING([--enable-reentrant], [define _REENTRANT (default. yes)])], enable_reentrant_is=$enableval,enable_reentrant_is=yes)