commit 139ce8035d387b7775ff75c21b97d4c3d6ec2f82
parent 44ed20e1ac3c3431d8d39fc5e29f35b6bceba10a
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 13 May 2019 07:33:01 +0200
use AS_CASE/AS_IF
Diffstat:
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -259,15 +259,13 @@ AC_MSG_CHECKING(for libltdl)
AC_ARG_WITH(ltdl,
[ --with-ltdl=PFX base of libltdl installation],
[AC_MSG_RESULT([$with_ltdl])
- case $with_ltdl in
- no)
- ;;
- yes)
+ AS_CASE([$with_ltdl],
+ [no],[],
+ [yes],[
AC_CHECK_HEADERS(ltdl.h,
AC_CHECK_LIB([ltdl], [lt_dlopenext],
ltdl=1))
- ;;
- *)
+ ],[
OLD_LIBS="$LIBS"
LIBS="-L$with_ltdl/lib $LIBS"
AM_CPPFLAGS="-I$with_ltdl/include $AM_CPPFLAGS"
@@ -276,8 +274,7 @@ AC_ARG_WITH(ltdl,
EXT_LIB_PATH="-L$with_ltdl/lib $EXT_LIB_PATH"
ltdl=1))
LIBS="$OLD_LIBS"
- ;;
- esac
+ ])
],
[AC_MSG_RESULT([--with-ltdl not specified])
AC_CHECK_HEADERS(ltdl.h,
@@ -655,14 +652,14 @@ new_ffmpeg=0
AC_ARG_ENABLE(ffmpeg,
[AC_HELP_STRING([--enable-ffmpeg],[Enable FFmpeg support])
AC_HELP_STRING([--disable-ffmpeg],[Disable FFmpeg support])],
- [case "$enableval" in
- no) AC_MSG_RESULT(no)
- ffmpeg_enabled=0
- ;;
- *) AC_MSG_RESULT(yes)
- ffmpeg_enabled=1
- ;;
- esac],
+ [AS_CASE(["$enableval"],
+ [no],[
+ AC_MSG_RESULT(no)
+ ffmpeg_enabled=0
+ ],[
+ AC_MSG_RESULT(yes)
+ ffmpeg_enabled=1
+ ])],
[ AC_MSG_RESULT(yes)
ffmpeg_enabled=1])
AS_IF([test x$ffmpeg_enabled = x1],