aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2016-10-17 19:09:38 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2016-10-17 19:09:38 +0100
commit733185d0a93b608f5c2f5396e48643b1f97b2c23 (patch)
tree138b1895c91bad0d53e85758aa76633cb028eeb4
parentd54e990c4ffb576aa3d82306b970dc64bdd4cda6 (diff)
downloadrtmux-733185d0a93b608f5c2f5396e48643b1f97b2c23.tar.gz
rtmux-733185d0a93b608f5c2f5396e48643b1f97b2c23.tar.bz2
rtmux-733185d0a93b608f5c2f5396e48643b1f97b2c23.zip
Can use enable_* rather than adding our own found_* variables, from Dilyan Palauzov.
-rw-r--r--configure.ac54
1 files changed, 23 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac
index 77c82d5e..c172d6b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,37 +24,33 @@ PKG_PROG_PKG_CONFIG
test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
# Is this --enable-debug?
-found_debug=yes
+enable_debug=yes
AC_ARG_ENABLE(
debug,
AC_HELP_STRING(--enable-debug, enable debug build flags),
- found_debug=$enable_debug
)
-AM_CONDITIONAL(IS_DEBUG, test "x$found_debug" = xyes)
+AM_CONDITIONAL(IS_DEBUG, test "x$enable_debug" = xyes)
# Is this --enable-coverage?
AC_ARG_ENABLE(
coverage,
- AC_HELP_STRING(--enable-coverage, enable coverage build flags),
- found_coverage=$enable_coverage
+ AC_HELP_STRING(--enable-coverage, enable coverage build flags)
)
-AM_CONDITIONAL(IS_COVERAGE, test "x$found_coverage" = xyes)
+AM_CONDITIONAL(IS_COVERAGE, test "x$enable_coverage" = xyes)
# Is this --enable-profile?
AC_ARG_ENABLE(
profile,
- AC_HELP_STRING(--enable-profile, enable profile build flags),
- found_profile=$enable_profile
+ AC_HELP_STRING(--enable-profile, enable profile build flags)
)
-AM_CONDITIONAL(IS_PROFILE, test "x$found_profile" = xyes)
+AM_CONDITIONAL(IS_PROFILE, test "x$enable_profile" = xyes)
# Is this a static build?
AC_ARG_ENABLE(
static,
- AC_HELP_STRING(--enable-static, create a static build),
- found_static=$enable_static
+ AC_HELP_STRING(--enable-static, create a static build)
)
-if test "x$found_static" = xyes; then
+if test "x$enable_static" = xyes; then
LDFLAGS="$LDFLAGS -static"
test "x$PKG_CONFIG" != x && PKG_CONFIG="$PKG_CONFIG --static"
fi
@@ -205,20 +201,18 @@ fi
# Look for utempter.
AC_ARG_ENABLE(
utempter,
- AC_HELP_STRING(--enable-utempter, use utempter if it is installed),
- found_utempter=$enable_utempter,
- found_utempter=yes
+ AC_HELP_STRING(--enable-utempter, use utempter if it is installed)
)
-if test "x$found_utempter" = xyes; then
- AC_CHECK_HEADER(utempter.h, found_utempter=yes, found_utempter=no)
- if test "x$found_utempter" = xyes; then
+if test "x$enable_utempter" = xyes; then
+ AC_CHECK_HEADER(utempter.h, enable_utempter=yes, enable_utempter=no)
+ if test "x$enable_utempter" = xyes; then
AC_SEARCH_LIBS(
utempter_add_record,
utempter,
- found_utempter=yes,
- found_utempter=no
+ enable_utempter=yes,
+ enable_utempter=no
)
- if test "x$found_utempter" = xyes; then
+ if test "x$enable_utempter" = xyes; then
AC_DEFINE(HAVE_UTEMPTER)
fi
fi
@@ -227,25 +221,23 @@ fi
# Look for utf8proc.
AC_ARG_ENABLE(
utf8proc,
- AC_HELP_STRING(--enable-utf8proc, use utf8proc if it is installed),
- found_utf8proc=$enable_utf8proc,
- found_utf8proc=no
+ AC_HELP_STRING(--enable-utf8proc, use utf8proc if it is installed)
)
-if test "x$found_utf8proc" = xyes; then
- AC_CHECK_HEADER(utf8proc.h, found_utf8proc=yes, found_utf8proc=no)
- if test "x$found_utf8proc" = xyes; then
+if test "x$enable_utf8proc" = xyes; then
+ AC_CHECK_HEADER(utf8proc.h, enable_utf8proc=yes, enable_utf8proc=no)
+ if test "x$enable_utf8proc" = xyes; then
AC_SEARCH_LIBS(
utf8proc_charwidth,
utf8proc,
- found_utf8proc=yes,
- found_utf8proc=no
+ enable_utf8proc=yes,
+ enable_utf8proc=no
)
- if test "x$found_utf8proc" = xyes; then
+ if test "x$enable_utf8proc" = xyes; then
AC_DEFINE(HAVE_UTF8PROC)
fi
fi
fi
-AM_CONDITIONAL(HAVE_UTF8PROC, [test "x$found_utf8proc" = xyes])
+AM_CONDITIONAL(HAVE_UTF8PROC, [test "x$enable_utf8proc" = xyes])
# Check for b64_ntop.
AC_MSG_CHECKING(for b64_ntop)