From c6846de5003bed0321be2dcb73f8924c9096e249 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Fri, 28 Feb 2020 02:01:49 +0100 Subject: [PATCH] Use AS_HELP_STRING macro for optional autoconf parameters --- m4/am_path_sdl.m4 | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/m4/am_path_sdl.m4 b/m4/am_path_sdl.m4 index f08270e1..2b5d2c8e 100644 --- a/m4/am_path_sdl.m4 +++ b/m4/am_path_sdl.m4 @@ -1,16 +1,26 @@ dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS -dnl -AC_DEFUN([AM_PATH_SDL], -[dnl -dnl Get the cflags and libraries from the sdl2-config script -dnl -AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], - sdl_prefix="$withval", sdl_prefix="") -AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], - sdl_exec_prefix="$withval", sdl_exec_prefix="") -AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], - , enable_sdltest=yes) + +AC_DEFUN([AM_PATH_SDL], [dnl + + dnl Get the cflags and libraries from the sdl2-config script + + AC_ARG_WITH(sdl-prefix, + AS_HELP_STRING([--with-sdl-prefix=PFX], + [Prefix where SDL is installed (optional)]), + sdl_prefix="$withval", + sdl_prefix="") + + AC_ARG_WITH(sdl-exec-prefix, + AS_HELP_STRING([--with-sdl-exec-prefix=PFX], + [Exec prefix where SDL is installed (optional)]), + sdl_exec_prefix="$withval", + sdl_exec_prefix="") + + AC_ARG_ENABLE(sdltest, + AS_HELP_STRING([--disable-sdltest], + [Do not try to compile and run a test SDL program]),, + enable_sdltest=yes) if test x$sdl_exec_prefix != x ; then sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"