From 85a3fb13cc2ac8a32502f452b4f8bcd51b174151 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Fri, 2 Jan 2015 10:34:31 +0100 Subject: [PATCH] configure: minor updates on quoting for consistency with Autoconf's syntax Using the appropriate quoting (with [xxx]) can spare us some problem, so for maintainability of the script the proper quoting was added in a few places to have a consistent file. Signed-off-by: Christophe CURIS --- configure.ac | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/configure.ac b/configure.ac index 2d336a02..8462a73f 100644 --- a/configure.ac +++ b/configure.ac @@ -35,12 +35,16 @@ AC_PREREQ([2.69]) dnl Configuration for Autoconf and Automake dnl ======================================= AC_INIT([WindowMaker],[0.95.6],[wmaker-dev@lists.windowmaker.org],[WindowMaker],[http://www.windowmaker.org/]) -AC_CONFIG_SRCDIR(src/WindowMaker.h) AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_HEADERS(config.h) +AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.11 silent-rules]) -AH_BOTTOM([#include "config-paths.h"]) +dnl Reference file used by 'configure' to make sure the path to sources is valid +AC_CONFIG_SRCDIR([src/WindowMaker.h]) + +dnl Include at the end of 'config.h', this file is generated by top-level Makefile +AH_BOTTOM([@%:@include "config-paths.h"]) + dnl libtool library versioning dnl ========================== @@ -95,7 +99,7 @@ LT_INIT dnl Debugging Options dnl ================= -AC_ARG_ENABLE(debug, +AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [enable debugging options, @<:@default=no@:>@])], [AS_CASE(["$enableval"], [yes], [debug=yes], @@ -121,8 +125,8 @@ AS_IF([test "x$debug" = "xyes"], ]) -AX_CFLAGS_GCC_OPTION(-Wall) -AX_CFLAGS_GCC_OPTION(-Wextra -Wno-sign-compare) +AX_CFLAGS_GCC_OPTION([-Wall]) +AX_CFLAGS_GCC_OPTION([-Wextra -Wno-sign-compare]) dnl dnl The use of trampolines cause code that can crash on some secured OS, it is dnl also known to be a source of crash if not used properly, in a more general @@ -374,7 +378,8 @@ dnl Check for inotify dnl ================= dnl It is used by WindowMaker to reload automatically the configuration when the dnl user changed it using WPref or wdwrite -AC_CHECK_HEADERS(sys/inotify.h, AC_DEFINE(HAVE_INOTIFY, 1, Check for inotify)) +AC_CHECK_HEADERS([sys/inotify.h], + [AC_DEFINE([HAVE_INOTIFY], [1], [Check for inotify])]) dnl Check for syslog @@ -403,7 +408,7 @@ WM_TYPE_SIGNAL dnl pkg-config dnl ========== -AC_CHECK_PROG(PKGCONFIG, pkg-config, pkg-config) +AC_CHECK_PROG([PKGCONFIG], [pkg-config], [pkg-config]) dnl gettext @@ -535,11 +540,10 @@ dnl =========================================== AC_PATH_XTRA -if test $no_x; then - AC_MSG_ERROR([The path for the X11 files not found! +AS_IF([test "x$no_x" = "xyes"], + [AC_MSG_ERROR([The path for the X11 files not found! Make sure you have X and it's headers and libraries (the -devel packages -in Linux) installed.]) -fi +in Linux) installed.])]) X_LIBRARY_PATH=$x_libraries XCFLAGS="$X_CFLAGS" @@ -568,16 +572,18 @@ fi dnl Check whether XInternAtoms() exist dnl ================================== -AC_CHECK_LIB(X11, XInternAtoms, - AC_DEFINE(HAVE_XINTERNATOMS, 1, [define if your X server has XInternAtoms() (set by configure)]),, - $XLFLAGS $XLIBS) +AC_CHECK_LIB([X11], [XInternAtoms], + [AC_DEFINE([HAVE_XINTERNATOMS], [1], + [define if your X server has XInternAtoms() (set by configure)])], + [], [$XLFLAGS $XLIBS]) dnl Check whether XConvertCase() exist dnl ================================== -AC_CHECK_LIB(X11, XConvertCase, - AC_DEFINE(HAVE_XCONVERTCASE, 1, [define if your X server has XConvertCase() (set by configure)]),, - $XLFLAGS $XLIBS) +AC_CHECK_LIB([X11], [XConvertCase], + [AC_DEFINE([HAVE_XCONVERTCASE], [1], + [define if your X server has XConvertCase() (set by configure)])], + [], [$XLFLAGS $XLIBS]) dnl XKB keyboard language status -- 2.11.4.GIT