Skip to content

Commit

Permalink
cleaned up configure script
Browse files Browse the repository at this point in the history
  • Loading branch information
bmuller committed Jan 5, 2012
1 parent 2c9be9d commit 5e8b3ff
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
22 changes: 8 additions & 14 deletions configure.ac
@@ -1,4 +1,4 @@
AC_INIT([mod_auth_openid], [0.6], [bmuller@butterfat.net])
AC_INIT([mod_auth_openid], [0.7], [bamuller@gmail.com])
AC_DEFINE([PACKAGE_URL],["http://findingscience.com/mod_auth_openid"],[project url])
AM_CONFIG_HEADER(src/config.h)
AM_INIT_AUTOMAKE()
Expand All @@ -15,15 +15,14 @@ AM_PROG_LIBTOOL
AC_HEADER_STDC

# provide flag --enable-debug
AC_ARG_ENABLE(debug, AC_HELP_STRING([[--enable-debug]], [enable debugging output to Apache error log]),
[if test "$enableval" = "yes"; then
DEBUG="yes"
CPPFLAGS="$CPPFLAGS -DDEBUG"
fi]
AC_ARG_ENABLE(debug,
AC_HELP_STRING([[--enable-debug]], [enable debugging output to Apache error log]),
AM_CONDITIONAL(DEBUG, test x$enableval = xyes)
)

# this will look for apxs command - put it in $APXS, fail on failure
AX_WITH_APXS()

# find apr-config binary
AC_ARG_WITH(apr_config, AC_HELP_STRING([[--with-apr-config=FILE]], [Path to apr-config program]),
[ apr_config="$withval" ],
Expand Down Expand Up @@ -72,16 +71,11 @@ AC_SUBST(CURL_LIBS)
# Idea taken from libopekele
nitpick=false
AC_ARG_ENABLE([nitpicking],
AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]),
AC_HELP_STRING([--enable-nitpicking],[make compiler warn about possible problems]),
[ test "$enableval" = "no" || nitpick=true ]
)
if $nitpick ; then
CPP_NITPICK="-Wall -Wextra -Wundef -Wshadow -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute"
CPP_NITPICK="$CPP_NITPICK -Wredundant-decls -ansi -Wmissing-noreturn"
CPPFLAGS="$CPPFLAGS $CPP_NITPICK"
# CFLAGS="$CFLAGS $CPP_NITPICK"
# CXXFLAGS="$CXXFLAGS $CPP_NITPICK"
fi
AM_CONDITIONAL(NITPICK, test x$nitpick = xtrue)


AC_CONFIG_FILES([
Makefile
Expand Down
13 changes: 12 additions & 1 deletion src/Makefile.am
Expand Up @@ -13,9 +13,20 @@ db_info_SOURCES = db_info.cpp
db_info_LDFLAGS = -lmodauthopenid
db_info_DEPENDENCIES = libmodauthopenid.la

AM_CXXFLAGS = -Wall

if NITPICK
AM_CXXFLAGS += -Wextra -Wundef -Wshadow -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute
AM_CXXFLAGS += -Wredundant-decls -ansi -Wmissing-noreturn
endif

if DEBUG
AM_CXXFLAGS += -DDEBUG
endif

install-exec-local:
${APXS} -i -a -n 'authopenid' mod_auth_openid.la

mod_auth_openid.la: libmodauthopenid.la
${APXS} -c -o $@ $< ${APACHE_CFLAGS} ${OPKELE_CFLAGS} ${OPKELE_LIBS} \
${SQLITE3_CFLAGS} ${PCRE_LIBS} ${CURL_LIBS}
${SQLITE3_CFLAGS} ${PCRE_LIBS} ${CURL_LIBS}

0 comments on commit 5e8b3ff

Please sign in to comment.