diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-06-23 21:55:03 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-06-24 14:44:00 +0200 |
commit | e2e1b8debb889ddeaae669e5fcfedadbc2d383e4 (patch) | |
tree | a537f84de375700f79e111539ce44a39ad96541e /configure.ac | |
parent | 62f081828221741fb945927ae85c496c431c9f84 (diff) | |
download | mxs-utils-e2e1b8debb889ddeaae669e5fcfedadbc2d383e4.tar.gz mxs-utils-e2e1b8debb889ddeaae669e5fcfedadbc2d383e4.tar.xz |
add autotools build-system
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..590513f --- /dev/null +++ b/configure.ac @@ -0,0 +1,62 @@ +AC_PREREQ(2.59) + +AC_INIT([mxs-utils], 0000.00.0, [bugs@pengutronix.de]) +AC_CONFIG_SRCDIR([elftosb2/elftosb.cpp]) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST + +AM_MAINTAINER_MODE +AM_SILENT_RULES([yes]) + +CXXFLAGS="${CXXFLAGS} -W -Wall" + +# +# libtool library versioning stuff +# +# Library code modified: REVISION++ +# Interfaces changed/added/removed: CURRENT++ REVISION=0 +# Interfaces added: AGE++ +# Interfaces removed: AGE=0 +LT_CURRENT=0 +LT_REVISION=0 +LT_AGE=0 +AC_SUBST(LT_CURRENT) +AC_SUBST(LT_REVISION) +AC_SUBST(LT_AGE) +LT_INIT() + + +# +# Checks for programs. +# +AC_PROG_CXX + +AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2]) + + +# +# Debugging +# +AC_MSG_CHECKING([whether to enable debugging]) +AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], [enable debugging @<:@default=yes@:>@]), + [case "$enableval" in + y | yes) CONFIG_DEBUG=yes ;; + *) CONFIG_DEBUG=no ;; + esac], + [CONFIG_DEBUG=yes]) +AC_MSG_RESULT([${CONFIG_DEBUG}]) +if test "${CONFIG_DEBUG}" = "yes"; then + CXXFLAGS="${CXXFLAGS} -Werror -Wsign-compare -Wfloat-equal -Wformat-security -Wno-unknown-pragmas -g -O1" +else + CXXFLAGS="${CXXFLAGS} -O2 -DNDEBUG" +fi +AC_SUBST(CONFIG_DEBUG) + + +AC_CONFIG_FILES([ + Makefile +]) + +AC_OUTPUT + |