diff options
author | 2011-12-11 05:46:11 +0000 | |
---|---|---|
committer | 2011-12-11 05:46:11 +0000 | |
commit | 11ceccb22536d8ac75a92ebabc1fbbe0d20ef8e2 (patch) | |
tree | 0c500e4918db74e4126a5bde111f9fd464e4d7c3 /configure.ac | |
parent | initial autotool support (diff) | |
download | portage-utils-11ceccb22536d8ac75a92ebabc1fbbe0d20ef8e2.tar.gz portage-utils-11ceccb22536d8ac75a92ebabc1fbbe0d20ef8e2.tar.bz2 portage-utils-11ceccb22536d8ac75a92ebabc1fbbe0d20ef8e2.zip |
improve autotools support, and integrate gnulib
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 13f572cb..618d6fc8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,13 +1,45 @@ AC_PREREQ([2.65]) -AC_INIT([portage-utils], [0.6]) +AC_INIT([portage-utils], [cvs]) AC_CONFIG_AUX_DIR([autotools]) AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip silent-rules -Wall]) AM_SILENT_RULES([yes]) # AM_INIT_AUTOMAKE([silent-rules]) is broken atm AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([autotools/m4]) -AC_PROG_CC +AC_PROG_CC_C99 AC_USE_SYSTEM_EXTENSIONS -AC_CONFIG_FILES([Makefile]) +gl_EARLY +gl_INIT + +AC_ARG_WITH([eprefix], [AS_HELP_STRING([--with-eprefix], [path for Gentoo/Prefix project])]) +AC_DEFINE_UNQUOTED([EPREFIX], ["$with_eprefix"], [path for Gentoo/Prefix project]) + +AX_CFLAGS_WARN_ALL +AC_DEFUN([PT_CHECK_CFLAG],[AX_CHECK_COMPILER_FLAGS([$1],[CFLAGS="$CFLAGS $1"])]) +m4_foreach_w([flag], [ + -Wunused + -Wimplicit + -Wshadow + -Wformat=2 + -Wmissing-declarations + -Wno-missing-prototypes + -Wwrite-strings + -Wbad-function-cast + -Wnested-externs + -Wcomment + -Winline + -Wchar-subscripts + -Wcast-align + -Wno-format-nonliteral + -Wsequence-point + -Wextra +], [ + AX_CHECK_COMPILER_FLAGS(flag, AS_VAR_APPEND([CFLAGS], " flag")) +]) + +AC_CONFIG_FILES([ + Makefile + autotools/gnulib/Makefile +]) AC_OUTPUT |