From 4d199031c5167687365df3d108347913412680af Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Sun, 8 Sep 2024 21:36:18 +0000 Subject: Quote all the variable expansions Squashed with: * More quoting, but these are likely unnecessary [^"x]$[a-zA-Z] [^"]x$[a-zA-Z] **** mana/plus!98 --- configure.ac | 120 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/configure.ac b/configure.ac index 11a42ce78..f6e2290d8 100755 --- a/configure.ac +++ b/configure.ac @@ -95,7 +95,7 @@ AC_ARG_ENABLE(werror, *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; esac],[werror_enabled=false]) -AM_CONDITIONAL(ENABLE_WERROR, test x$werror_enabled = xtrue) +AM_CONDITIONAL(ENABLE_WERROR, test "x$werror_enabled" = xtrue) # Enable asserts AC_ARG_ENABLE(asserts, @@ -108,7 +108,7 @@ AC_ARG_ENABLE(asserts, *) AC_MSG_ERROR(bad value ${enableval} for --enable-asserts) ;; esac],[asserts_enabled=true]) -AM_CONDITIONAL(ENABLE_ASSERTS, test x$asserts_enabled = xtrue) +AM_CONDITIONAL(ENABLE_ASSERTS, test "x$asserts_enabled" = xtrue) # Enable -D_GLIBCXX_DEBUG AC_ARG_ENABLE(glibcdebug, @@ -121,7 +121,7 @@ AC_ARG_ENABLE(glibcdebug, *) AC_MSG_ERROR(bad value ${enableval} for --enable-glibcdebug) ;; esac],[glibcdebug_enabled=false]) -AM_CONDITIONAL(ENABLE_GLIBCDEBUG, test x$glibcdebug_enabled = xtrue) +AM_CONDITIONAL(ENABLE_GLIBCDEBUG, test "x$glibcdebug_enabled" = xtrue) # Enable mse classes replacements for stl AC_ARG_ENABLE(stldebug, @@ -134,7 +134,7 @@ AC_ARG_ENABLE(stldebug, *) AC_MSG_ERROR(bad value ${enableval} for --enable-stldebug) ;; esac],[stldebug_enabled=false]) -AM_CONDITIONAL(ENABLE_STLDEBUG, test x$stldebug_enabled = xtrue) +AM_CONDITIONAL(ENABLE_STLDEBUG, test "x$stldebug_enabled" = xtrue) # Enable OpenGL error reporting AC_ARG_ENABLE(openglerrors, @@ -147,7 +147,7 @@ AC_ARG_ENABLE(openglerrors, *) AC_MSG_ERROR(bad value ${enableval} for --enable-openglerrors) ;; esac],[openglerrors_enabled=false]) -AM_CONDITIONAL(ENABLE_OPENGLERRORS, test x$openglerrors_enabled = xtrue) +AM_CONDITIONAL(ENABLE_OPENGLERRORS, test "x$openglerrors_enabled" = xtrue) # Enable password from command line AC_ARG_ENABLE(commandlinepassword, @@ -160,7 +160,7 @@ AC_ARG_ENABLE(commandlinepassword, *) AC_MSG_ERROR(bad value ${enableval} for --enable-commandlinepassword) ;; esac],[commandlinepassword_enabled=false]) -AM_CONDITIONAL(ENABLE_COMMANDLINEPASSWORD, test x$commandlinepassword_enabled = xtrue) +AM_CONDITIONAL(ENABLE_COMMANDLINEPASSWORD, test "x$commandlinepassword_enabled" = xtrue) # Checks for android. AC_ARG_ENABLE(androidbuild, @@ -186,7 +186,7 @@ else fi fi -AM_CONDITIONAL(ENABLE_DYECMD, test x$with_dyecmd = xyes) +AM_CONDITIONAL(ENABLE_DYECMD, test "x$with_dyecmd" = xyes) # Option to enable ManaPlus game AC_ARG_WITH(manaplusgame,[ --without-manaplusgame don't build ManaPlus game ] ) @@ -195,7 +195,7 @@ if test "x$with_manaplusgame" = "xno"; then else with_manaplusgame=yes fi -AM_CONDITIONAL(ENABLE_MANAPLUSGAME, test x$with_manaplusgame = xyes) +AM_CONDITIONAL(ENABLE_MANAPLUSGAME, test "x$with_manaplusgame" = xyes) # Enable nacl build AC_ARG_ENABLE(naclbuild, @@ -262,7 +262,7 @@ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libpng`" AM_GNU_GETTEXT([external],[need-ngettext]) AM_GNU_GETTEXT_VERSION([0.16.1]) -case $host in +case "$host" in (*mingw*) skip_check_lib="yes" mingw=true @@ -274,7 +274,7 @@ case $host in ;; esac -AM_CONDITIONAL(MINGW, test x$mingw = xtrue) +AM_CONDITIONAL(MINGW, test "x$mingw" = xtrue) # Option to enable internal sdl-gfx for SDL2 (for now it enabled by default) @@ -303,7 +303,7 @@ if test "x$with_sdl2" = "xyes"; then LIBS="$LIBS `$PKG_CONFIG --libs SDL2_ttf`" CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags SDL2_ttf`" - if test "$skip_check_lib" = "no"; then + if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB([SDL2], [SDL_Init], , AC_MSG_ERROR([ *** Unable to find SDL2 library (http://www.libsdl.org/)])) @@ -338,7 +338,7 @@ else CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags SDL_ttf`" if test "x$naclbuild_enabled" = "xfalse"; then - if test "$skip_check_lib" = "no"; then + if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB([SDL], [SDL_Init], , AC_MSG_ERROR([ *** Unable to find SDL library (http://www.libsdl.org/)])) @@ -363,16 +363,16 @@ else with_sdl2=no fi -AM_CONDITIONAL(USE_SDL2, test x$with_sdl2 = xyes) +AM_CONDITIONAL(USE_SDL2, test "x$with_sdl2" = xyes) AC_CHECK_GLXEXT(have_glext) -AM_CONDITIONAL(HAVE_GLEXT, test x$have_glext = xyes) +AM_CONDITIONAL(HAVE_GLEXT, test "x$have_glext" = xyes) # Option to enable internal sdl-gfx for SDL2 (for now it enabled by default) if test "x$with_internalsdlgfx" = "xno"; then with_internalsdlgfx=no - if test "$skip_check_lib" = "no"; then + if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB(SDL2_gfx, rotozoomSurfaceXY, , AC_MSG_ERROR([ *** Unable to find SDL2_gfx library (http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx)])) fi @@ -381,7 +381,7 @@ else with_internalsdlgfx=yes AC_DEFINE(USE_INTERNALSDLGFX, 1, [Defines if ManaPlus should use internal sdlgfx2]) fi -AM_CONDITIONAL(USE_INTERNALSDLGFX, test x$with_internalsdlgfx = xyes) +AM_CONDITIONAL(USE_INTERNALSDLGFX, test "x$with_internalsdlgfx" = xyes) AC_CHECK_HEADERS([SDL.h], , AC_MSG_ERROR([ *** SDL library found but cannot find headers (http://www.libsdl.org/)])) @@ -397,7 +397,7 @@ if test "x$with_pthread" = "xno"; then without_pthread=yes else if test "x$androidbuild_enabled" = "xfalse"; then - if test "$skip_check_lib" = "no"; then + if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB([pthread], [pthread_create], , AC_MSG_ERROR([ *** Unable to find pthread library])) fi @@ -405,7 +405,7 @@ else withoud_pthread=no fi -if test "$skip_check_lib" = "no"; then +if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB([z], [inflate], , AC_MSG_ERROR([ *** Unable to find zlib (http://www.gzip.org/zlib/)])) fi @@ -414,7 +414,7 @@ if test -n "$CURL_CONFIG"; then LIBS="$LIBS `$CURL_CONFIG --libs`" CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`" fi -if test "$skip_check_lib" = "no"; then +if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB([curl], [curl_global_init], , AC_MSG_ERROR([ *** Unable to find CURL library (http://curl.haxx.se/)])) fi @@ -434,7 +434,7 @@ AC_ARG_ENABLE(libxml, ] ) -case $xmllib in +case "$xmllib" in "libxml") AM_CONDITIONAL(ENABLE_LIBXML, true) AM_CONDITIONAL(ENABLE_PUGIXML, false) @@ -455,12 +455,12 @@ case $xmllib in ;; esac -if test "$xmllib" = "libxml"; then +if test "x$xmllib" = "xlibxml"; then if test -n "$PKG_CONFIG"; then LIBS="$LIBS `$PKG_CONFIG --libs libxml-2.0`" CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libxml-2.0`" fi - if test "$skip_check_lib" = "no"; then + if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB([xml2], [xmlInitParser], , AC_MSG_ERROR([ *** Unable to find libxml2 library (http://xmlsoft.org/)])) fi @@ -474,7 +474,7 @@ if test "$xmllib" = "libxml"; then icu_bug=yes $as_unset ac_cv_header_libxml_xmlreader_h ) - if test "$icu_bug" = "yes"; then + if test "x$icu_bug" = "xyes"; then AC_CHECK_HEADERS( [libxml/xmlreader.h], , @@ -483,8 +483,8 @@ if test "$xmllib" = "libxml"; then fi fi -if test "$xmllib" = "pugixml"; then - if test "$skip_check_lib" = "no"; then +if test "x$xmllib" = "xpugixml"; then + if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB([pugixml], [main], , AC_MSG_ERROR([ *** Unable to find pugixml library (http://pugixml.org/)])) fi @@ -494,8 +494,8 @@ fi # hack for support unversioned api change in tinyxml2 (master branch) tinyxml2_old=yes -if test "$xmllib" = "tinyxml2"; then - if test "$skip_check_lib" = "no"; then +if test "x$xmllib" = "xtinyxml2"; then + if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB([tinyxml2], [main], , AC_MSG_ERROR([ *** Unable to find tinyxml2 library (http://grinninglizard.com/tinyxml2/)])) AC_MSG_CHECKING([whether tinyxml supports old error api]) @@ -556,9 +556,9 @@ if test "$xmllib" = "tinyxml2"; then AC_MSG_ERROR([ *** tinyxml2 library found but cannot find headers (http://grinninglizard.com/tinyxml2/)])) fi -AM_CONDITIONAL(USE_TINYXML_OLD, test x$tinyxml2_old = xyes) +AM_CONDITIONAL(USE_TINYXML_OLD, test "x$tinyxml2_old" = xyes) -if test "$skip_check_lib" = "no"; then +if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB(png, png_write_info, , AC_MSG_ERROR([ *** Unable to find png library])) fi @@ -566,15 +566,15 @@ fi use_x11=no # === Check for X11 (check borrowed from Wormux) ======================== # Deactivated on purpose under OSX (in case X11 SDK is installed) -if test "x$OSX" != "xyes" ; then +if test "x$OSX" != "xyes"; then AC_CHECK_HEADER(X11/Xlib.h, check_x11="yes",check_x11="no") - if test x${check_x11} = xno ; then + if test "x${check_x11}" = "xno"; then AC_CHECK_HEADER(X11R6/Xlib.h, [ check_x11="yes" LDFLAGS="-L/usr/X11R6/include $CFLAGS"], check_x11="no") fi - if test x${check_x11} = xyes ; then + if test "x${check_x11}" = "xyes"; then AC_CHECK_LIB(X11, XOpenDisplay, [ LIBS="$LIBS -lX11" AC_DEFINE(USE_X11, 1, [Define to use X11 copy'n'paste]) @@ -584,7 +584,7 @@ if test "x$OSX" != "xyes" ; then fi fi -AM_CONDITIONAL(USE_X11, test x$use_x11 = xyes) +AM_CONDITIONAL(USE_X11, test "x$use_x11" = xyes) # Checks for header files. AC_HEADER_STDC @@ -611,7 +611,7 @@ if test "x$with_gcov" = "xyes"; then else with_gcov=no fi -AM_CONDITIONAL(USE_GCOV, test x$with_gcov = xyes) +AM_CONDITIONAL(USE_GCOV, test "x$with_gcov" = xyes) # Option to enable OpenGL AC_ARG_WITH(opengl,[ --without-opengl don't use OpenGL ] ) @@ -622,7 +622,7 @@ else if test "x$applebuild_enabled" = "xfalse"; then if test "x$androidbuild_enabled" = "xfalse"; then if test "x$naclbuild_enabled" = "xfalse"; then - if test "$skip_check_lib" = "no"; then + if test "x$skip_check_lib" = "xno"; then AC_CHECK_LIB([GL], [glBegin], , AC_MSG_ERROR([ *** Unable to find OpenGL library])) fi @@ -633,12 +633,12 @@ else else LDFLAGS="$LDFLAGS -framework OpenGL" fi -case $host in +case "$host" in (*mingw*) LIBS="$LIBS `$PKG_CONFIG --libs gl`" esac fi -AM_CONDITIONAL(USE_OPENGL, test x$with_opengl = xyes) +AM_CONDITIONAL(USE_OPENGL, test "x$with_opengl" = xyes) # Option to enable mumble support AC_ARG_WITH(mumble,[ --without-mumble don't use mumble integration ] ) @@ -651,7 +651,7 @@ else with_mumble=no fi fi -AM_CONDITIONAL(USE_MUMBLE, test x$with_mumble = xyes) +AM_CONDITIONAL(USE_MUMBLE, test "x$with_mumble" = xyes) AC_ARG_WITH(librt,[ --without-librt don't link to librt ] ) @@ -670,7 +670,7 @@ else without_librt=no fi -AM_CONDITIONAL(USE_LIBRT, test x$use_librt = xyes) +AM_CONDITIONAL(USE_LIBRT, test "x$use_librt" = xyes) # Enable tmwA AC_ARG_ENABLE(tmwa, @@ -681,7 +681,7 @@ AC_ARG_ENABLE(tmwa, *) AC_MSG_ERROR(bad value ${enableval} for --enable-tmwa) ;; esac],[with_tmwa=true]) -AM_CONDITIONAL(ENABLE_TMWA, test x$with_tmwa = xtrue) +AM_CONDITIONAL(ENABLE_TMWA, test "x$with_tmwa" = xtrue) # Enable checks AC_ARG_ENABLE(checks, @@ -692,7 +692,7 @@ AC_ARG_ENABLE(checks, *) AC_MSG_ERROR(bad value ${enableval} for --enable-checks) ;; esac],[with_checks=false]) -AM_CONDITIONAL(ENABLE_CHECKS, test x$with_checks = xtrue) +AM_CONDITIONAL(ENABLE_CHECKS, test "x$with_checks" = xtrue) # Enable portable AC_ARG_ENABLE(portable, @@ -703,7 +703,7 @@ AC_ARG_ENABLE(portable, *) AC_MSG_ERROR(bad value ${enableval} for --enable-portable) ;; esac],[portable_enabled=false]) -AM_CONDITIONAL(ENABLE_PORTABLE, test x$portable_enabled = xtrue) +AM_CONDITIONAL(ENABLE_PORTABLE, test "x$portable_enabled" = xtrue) # Enable debug AC_ARG_ENABLE(memdebug, @@ -714,7 +714,7 @@ AC_ARG_ENABLE(memdebug, *) AC_MSG_ERROR(bad value ${enableval} for --enable-memdebug) ;; esac],[memdebug_enabled=false]) -AM_CONDITIONAL(ENABLE_MEM_DEBUG, test x$memdebug_enabled = xtrue) +AM_CONDITIONAL(ENABLE_MEM_DEBUG, test "x$memdebug_enabled" = xtrue) # Enable unit tests AC_ARG_ENABLE(unittests, @@ -757,10 +757,10 @@ AC_ARG_ENABLE(unittests, *) AC_MSG_ERROR(bad value ${enableval} for --enable-unittests) ;; esac],[unittests_enabled=false]) -AM_CONDITIONAL(ENABLE_UNITTESTS, test x$unittests_enabled = xtrue) -AM_CONDITIONAL(ENABLE_UNITTESTS_CATCH, test x$unittests_catch = xtrue) -AM_CONDITIONAL(ENABLE_UNITTESTS_DOCTEST, test x$unittests_doctest = xtrue) -AM_CONDITIONAL(ENABLE_UNITTESTS_EMBED, test x$unittests_embed = xtrue) +AM_CONDITIONAL(ENABLE_UNITTESTS, test "x$unittests_enabled" = xtrue) +AM_CONDITIONAL(ENABLE_UNITTESTS_CATCH, test "x$unittests_catch" = xtrue) +AM_CONDITIONAL(ENABLE_UNITTESTS_DOCTEST, test "x$unittests_doctest" = xtrue) +AM_CONDITIONAL(ENABLE_UNITTESTS_EMBED, test "x$unittests_embed" = xtrue) # Enable unit tests binaries only AC_ARG_ENABLE(unittestsbin, @@ -803,17 +803,17 @@ AC_ARG_ENABLE(unittestsbin, *) AC_MSG_ERROR(bad value ${enableval} for --enable-unittestsbin) ;; esac],[unittestsbin_enabled=false]) -AM_CONDITIONAL(ENABLE_UNITTESTSBIN, test x$unittestsbin_enabled = xtrue) -AM_CONDITIONAL(ENABLE_UNITTESTSBIN_CATCH, test x$unittestsbin_catch = xtrue) -AM_CONDITIONAL(ENABLE_UNITTESTSBIN_DOCTEST, test x$unittestsbin_doctest = xtrue) -AM_CONDITIONAL(ENABLE_UNITTESTSBIN_EMBED, test x$unittestsbin_embed = xtrue) +AM_CONDITIONAL(ENABLE_UNITTESTSBIN, test "x$unittestsbin_enabled" = xtrue) +AM_CONDITIONAL(ENABLE_UNITTESTSBIN_CATCH, test "x$unittestsbin_catch" = xtrue) +AM_CONDITIONAL(ENABLE_UNITTESTSBIN_DOCTEST, test "x$unittestsbin_doctest" = xtrue) +AM_CONDITIONAL(ENABLE_UNITTESTSBIN_EMBED, test "x$unittestsbin_embed" = xtrue) # Override home directory for unit tests AC_ARG_WITH(unittestsdir, [ --with-unittestsdir override home directory for unit tests ], [ if test "x$withval" != "xno"; then - with_unittestsdir=$withval + with_unittestsdir="$withval" CXXFLAGS="$CXXFLAGS -DUNITESTSDIR=\\\"$withval\\\"" fi ]) @@ -840,7 +840,7 @@ LIBS="$LIBS -lprofiler" *) AC_MSG_ERROR(bad value ${enableval} for --enable-googleprofiler) ;; esac],[googleprofiler_enabled=false]) -AM_CONDITIONAL(ENABLE_GOOGLE_PROFILER, test x$googleprofiler_enabled = xtrue) +AM_CONDITIONAL(ENABLE_GOOGLE_PROFILER, test "x$googleprofiler_enabled" = xtrue) # Enable gcc check plugin AC_ARG_ENABLE(checkplugin, @@ -851,7 +851,7 @@ AC_ARG_ENABLE(checkplugin, *) AC_MSG_ERROR(bad value ${enableval} for --enable-checkplugin) ;; esac],[checkplugin_enabled=false]) -AM_CONDITIONAL(ENABLE_CHECKPLUGIN, test x$checkplugin_enabled = xtrue) +AM_CONDITIONAL(ENABLE_CHECKPLUGIN, test "x$checkplugin_enabled" = xtrue) # Enable custom NLS AC_ARG_ENABLE(customnls, @@ -862,14 +862,14 @@ AC_ARG_ENABLE(customnls, *) AC_MSG_ERROR(bad value ${enableval} for --enable-customnls) ;; esac],[customnls_enabled=false]) -AM_CONDITIONAL(ENABLE_CUSTOMNLS, test x$customnls_enabled = xtrue) +AM_CONDITIONAL(ENABLE_CUSTOMNLS, test "x$customnls_enabled" = xtrue) if test "x$naclbuild_enabled" = "xtrue"; then AC_CHECK_SDL() fi AC_CHECK_LD_FLAG(-rdynamic, have_rdynamic) -AM_CONDITIONAL(HAVE_RDYNAMIC, test x$have_rdynamic = xyes) +AM_CONDITIONAL(HAVE_RDYNAMIC, test "x$have_rdynamic" = xyes) AC_CHECK_HEADERS([execinfo.h], [ @@ -885,7 +885,7 @@ AC_CHECK_HEADERS([execinfo.h], ], [] ) -AM_CONDITIONAL(HAVE_EXECINFO, test x$have_execinfo = xyes) +AM_CONDITIONAL(HAVE_EXECINFO, test "x$have_execinfo" = xyes) AC_CONFIG_FILES([ manaplus.spec @@ -940,13 +940,13 @@ AC_CONFIG_FILES([data/tmw/tmw], [chmod +x data/tmw/tmw]) AC_OUTPUT echo -if test "$with_manaplusgame" = "yes"; then +if test "x$with_manaplusgame" = "xyes"; then echo "Enabled building manaplus game." fi -if test "$with_dyecmd" = "yes"; then +if test "x$with_dyecmd" = "xyes"; then echo "Enabled building dyecmd tool." fi -if test "$unittests_enabled" = true; then +if test "x$unittests_enabled" = "xtrue"; then echo "Enabled building unit tests." fi -- cgit v1.2.3-70-g09d2