Skip to content

Commit

Permalink
change configure.ac to find Apache flags correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
  • Loading branch information
zandbelt committed Jul 1, 2021
1 parent 481aabe commit 597d5d8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 23 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
@@ -1,3 +1,6 @@
07/01/2021
- change configure.ac to find Apache flags correctly

06/07/2021
- depend on liboauth2 1.4.2.1 with fixed iat slack validation defaults
- set WWW-Authenticate environment variable to allow for complex Require logic; see
Expand Down
4 changes: 2 additions & 2 deletions Makefile.am
Expand Up @@ -16,7 +16,7 @@ includesub_HEADERS = \

lib_LTLIBRARIES = @PACKAGE_NAME@.la

@PACKAGE_NAME@_la_CFLAGS = @OAUTH2_CFLAGS@ @OAUTH2_APACHE_CFLAGS@ @APR_CFLAGS@
@PACKAGE_NAME@_la_CFLAGS = @OAUTH2_CFLAGS@ @OAUTH2_APACHE_CFLAGS@ @APACHE_CFLAGS@
@PACKAGE_NAME@_la_LIBADD = @OAUTH2_LIBS@ @OAUTH2_APACHE_LIBS@ @APR_LIBS@
@PACKAGE_NAME@_la_SOURCES = src/@PACKAGE_NAME@.c
@PACKAGE_NAME@_la_LDFLAGS = -module
Expand All @@ -27,4 +27,4 @@ clang-format:
clang-format -style=file -i `find . -name *.[ch]`

install:
@APXS2@ @APXS2_OPTS@ -i -n @PACKAGE_NAME@ @PACKAGE_NAME@.la
@APXS@ @APXS_OPTS@ -i -n @PACKAGE_NAME@ @PACKAGE_NAME@.la
37 changes: 16 additions & 21 deletions configure.ac
Expand Up @@ -8,29 +8,24 @@ AC_PROG_CC

AX_CODE_COVERAGE


AC_ARG_WITH([apxs2], AS_HELP_STRING([--with-apxs2=PATH], [full path to the apxs2 executable]), [ APXS2=${withval} ],)
if test "x$APXS2" = "x"; then
AC_PATH_PROG(APXS2, apxs2,, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
if test "x$APXS2" = "x"; then
AC_PATH_PROG(APXS2, apxs,, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
fi
fi
if test ! -x "$APXS2"; then
AC_MSG_ERROR([
Could not find apxs2. Please specify the path to apxs2
using the --with-apxs2=/full/path/to/apxs2 option.
The executable may also be named 'apxs'.
])
AC_ARG_WITH([apache], AS_HELP_STRING([--with-apache], [build with Apache support [default=autodetect]]),)
AC_ARG_WITH([apxs],
[AS_HELP_STRING([--with-apxs=PATH/NAME],[path to the apxs binary for Apache [[apxs]]])],
[AC_SUBST(APXS, $with_apxs)],
[AC_PATH_PROGS(APXS, [apxs2 apxs])])
if test "x$with_apache" != "xno"; then
PKG_CHECK_MODULES([APR], [apr-1, apr-util-1], [have_apache="yes"], [have_apache="no"])

AS_IF([test "x${APXS}" != "x" -a -x "${APXS}"],
[AC_MSG_NOTICE([apxs found at $APXS])],
[AC_MSG_FAILURE(["apxs not found. Use --with-apxs"])])

APACHE_CFLAGS="`${APXS} -q CFLAGS` `${APXS} -q EXTRA_CPPFLAGS` -I`${APXS} -q INCLUDEDIR` ${APR_CFLAGS}"
fi

AC_SUBST(APXS2)
AC_ARG_VAR(APXS2_OPTS, [additional command line options to pass to apxs2])


PKG_CHECK_MODULES(APR, [apr-1, apr-util-1])
AC_SUBST(APR_CFLAGS)
AM_CONDITIONAL(HAVE_APACHE, [test x"$have_apache" = "xyes"])
AC_SUBST(APR_LIBS)
AC_SUBST(APACHE_CFLAGS)
AC_ARG_VAR(APXS_OPTS, [additional command line options to pass to apxs])

PKG_CHECK_MODULES(OAUTH2, [liboauth2 >= 1.4.2.1])
AC_SUBST(OAUTH2_CFLAGS)
Expand Down

0 comments on commit 597d5d8

Please sign in to comment.