1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-31 13:05:52 +01:00

configure: Use AS_HELP_STRING macro to print messages

According to the autoconf manual, using AS_HELP_STRING is recommended
to avoid having to manually adjust the alignment of help text
in ./configure --help
This commit is contained in:
Carlos R. Mafra
2010-08-24 15:10:44 +02:00
parent b17077ede0
commit be05b0f01e

View File

@@ -13,17 +13,14 @@ dnl
AC_INIT(src/WindowMaker.h) AC_INIT(src/WindowMaker.h)
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE(WindowMaker, 0.94.0-crm) AM_INIT_AUTOMAKE(WindowMaker, 0.94.0-crm)
AM_CONFIG_HEADER(src/config.h) AM_CONFIG_HEADER(src/config.h)
dnl Checks for host/os name dnl Checks for host/os name
dnl ======================= dnl =======================
dnl AC_CANONICAL_HOST -- already done by AC_PROG_LIBTOOL dnl AC_CANONICAL_HOST -- already done by AC_PROG_LIBTOOL
dnl Checks for programs. dnl Checks for programs.
dnl =================== dnl ===================
AC_ISC_POSIX AC_ISC_POSIX
@@ -93,20 +90,17 @@ lib_search_path="-L$_libdir"
inc_search_path=`eval echo $includedir` inc_search_path=`eval echo $includedir`
inc_search_path="-I`eval echo $inc_search_path`" inc_search_path="-I`eval echo $inc_search_path`"
dnl dnl ===============================================
dnl Specify paths to look for libraries and headers dnl Specify paths to look for libraries and headers
dnl =============================================== dnl ===============================================
AC_ARG_WITH(libs-from, AC_ARG_WITH(libs-from, AS_HELP_STRING([--with-libs-from], [pass compiler flags to look for libraries]),
[ --with-libs-from pass compiler flags to look for libraries],
[lib_search_path="$withval $lib_search_path"]) [lib_search_path="$withval $lib_search_path"])
AC_ARG_WITH(incs-from, AC_ARG_WITH(incs-from, AS_HELP_STRING([--with-incs-from], [pass compiler flags to look for header files]),
[ --with-incs-from pass compiler flags to look for header files],
[inc_search_path="$withval $inc_search_path"]) [inc_search_path="$withval $inc_search_path"])
dnl ============================
dnl Checks for library functions
dnl Checks for library functions.
dnl ============================ dnl ============================
dnl not used anywhere dnl not used anywhere
dnl AC_FUNC_MEMCMP dnl AC_FUNC_MEMCMP
@@ -207,8 +201,7 @@ asm_support=no
mmx_support=no mmx_support=no
check_for_mmx_support=yes check_for_mmx_support=yes
AC_ARG_ENABLE(mmx, AC_ARG_ENABLE(mmx, AS_HELP_STRING([--disable-mmx], [disable compilation of MMX inline assembly]),
[ --disable-mmx disable compilation of MMX inline assembly ],
[if test x$enableval != xyes; then [if test x$enableval != xyes; then
check_for_mmx_support=no check_for_mmx_support=no
fi]) fi])
@@ -250,19 +243,15 @@ AC_SUBST(NOSTRICTALIASING)
dnl pkg-config dnl pkg-config
dnl ---------- dnl ==========
dnl AC_ARG_VAR(PKGCONFIG, [pkg-config command]) dnl AC_ARG_VAR(PKGCONFIG, [pkg-config command])
AC_CHECK_PROG(PKGCONFIG, pkg-config, pkg-config) AC_CHECK_PROG(PKGCONFIG, pkg-config, pkg-config)
dnl gettext dnl gettext
dnl ------- dnl =======
dnl AM_GNU_GETTEXT dnl AM_GNU_GETTEXT
INTLIBS="" INTLIBS=""
AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"], AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
@@ -301,7 +290,7 @@ dnl The Tower of Babel
dnl ================== dnl ==================
dnl List of supported locales dnl List of supported locales
dnl ------------------------- dnl =========================
supported_locales="be bg bs ca cs da de el es et fi fr gl hr hu hy it ja ko ms nl no pl pt ro ru sk sv tr zh_CN zh_TW" supported_locales="be bg bs ca cs da de el es et fi fr gl hr hu hy it ja ko ms nl no pl pt ro ru sk sv tr zh_CN zh_TW"
supported_wprefs_locales="bg ca cs de es et fi fr hr hu it ja ko pt ru sk zh_CN zh_TW" supported_wprefs_locales="bg ca cs de es et fi fr hr hu it ja ko pt ru sk zh_CN zh_TW"
supported_wings_locales="bg ca cs de fr sk" supported_wings_locales="bg ca cs de fr sk"
@@ -353,11 +342,9 @@ for lang in $LINGUAS; do
done done
dnl Added by Oliver - Support for NLSDIR option, Hi Oliver! dnl Added by Oliver - Support for NLSDIR option
dnl =========================================== dnl ===========================================
AC_ARG_WITH(nlsdir, AC_ARG_WITH(nlsdir, AS_HELP_STRING([--with-nlsdir=PATH], [specify where the locale stuff should go]))
[ --with-nlsdir=PATH specify where the locale stuff should go ])
if test "x$NLSDIR" = "x"; then if test "x$NLSDIR" = "x"; then
if test "x$with_nlsdir" != "x"; then if test "x$with_nlsdir" != "x"; then
@@ -367,8 +354,6 @@ if test "x$NLSDIR" = "x"; then
fi fi
fi fi
AC_SUBST(INTLIBS) AC_SUBST(INTLIBS)
AC_SUBST(NLSDIR) AC_SUBST(NLSDIR)
AC_SUBST(MOFILES) AC_SUBST(MOFILES)
@@ -377,16 +362,13 @@ AC_SUBST(UTILMOFILES)
AC_SUBST(WINGSMOFILES) AC_SUBST(WINGSMOFILES)
AC_SUBST(supported_locales) AC_SUBST(supported_locales)
dnl Support for various hint things dnl Support for various hint things
dnl =============================== dnl ===============================
dnl
dnl Beautify compilation messages dnl Beautify compilation messages
dnl --------------------------------------------- dnl =============================
AC_ARG_ENABLE(verbose-compile, AS_HELP_STRING([--disable-verbose-compile], AC_ARG_ENABLE(verbose-compile, AS_HELP_STRING([--disable-verbose-compile],
[Streamline compilation messages (default off)]), [Streamline compilation messages]),
[ [
QUIET='@echo " CC" $@;' QUIET='@echo " CC" $@;'
QUIET_AR='@echo " AR" $@;' QUIET_AR='@echo " AR" $@;'
@@ -412,29 +394,21 @@ in Linux) installed.])
fi fi
X_LIBRARY_PATH=$x_libraries X_LIBRARY_PATH=$x_libraries
XCFLAGS="$X_CFLAGS" XCFLAGS="$X_CFLAGS"
XLFLAGS="$X_LIBS" XLFLAGS="$X_LIBS"
XLIBS="-lX11 -lXmu $X_EXTRA_LIBS" XLIBS="-lX11 -lXmu $X_EXTRA_LIBS"
lib_search_path="$lib_search_path $XLFLAGS" lib_search_path="$lib_search_path $XLFLAGS"
inc_search_path="$inc_search_path $XCFLAGS" inc_search_path="$inc_search_path $XCFLAGS"
AC_SUBST(X_LIBRARY_PATH) AC_SUBST(X_LIBRARY_PATH)
dnl Decide which locale function to use, setlocale() or _Xsetlocale() dnl Decide which locale function to use, setlocale() or _Xsetlocale()
dnl by MANOME Tomonori dnl by MANOME Tomonori
dnl =========================================== dnl ===========================================
use_locale=yes use_locale=yes
AC_ARG_ENABLE(locale, AC_ARG_ENABLE(locale, AS_HELP_STRING([--disable-locale], [disable use of X locale support]),
[ --disable-locale disable use of X locale support], use_locale=no)
use_locale=no)
if test "$use_locale" = yes; then if test "$use_locale" = yes; then
AC_CHECK_LIB(X11, _Xsetlocale, AC_CHECK_LIB(X11, _Xsetlocale,
@@ -442,7 +416,6 @@ if test "$use_locale" = yes; then
$XLFLAGS $XLIBS) $XLFLAGS $XLIBS)
fi fi
dnl Check whether XInternAtoms() exist dnl Check whether XInternAtoms() exist
dnl ================================== dnl ==================================
AC_CHECK_LIB(X11, XInternAtoms, AC_CHECK_LIB(X11, XInternAtoms,
@@ -455,22 +428,16 @@ AC_CHECK_LIB(X11, XConvertCase,
AC_DEFINE(HAVE_XCONVERTCASE, 1, [define if your X server has XConvertCase() (set by configure)]),, AC_DEFINE(HAVE_XCONVERTCASE, 1, [define if your X server has XConvertCase() (set by configure)]),,
$XLFLAGS $XLIBS) $XLFLAGS $XLIBS)
dnl XKB keyboard language status dnl XKB keyboard language status
dnl ============================ dnl ============================
AC_ARG_ENABLE(modelock, AC_ARG_ENABLE(modelock, AS_HELP_STRING([--enable-modelock], [XKB keyboard language status support]),
[ --enable-modelock XKB keyboard language status support],
AC_DEFINE(XKB_MODELOCK, 1, [whether XKB language MODELOCK should be enabled])) AC_DEFINE(XKB_MODELOCK, 1, [whether XKB language MODELOCK should be enabled]))
dnl Shape support dnl Shape support
dnl ============= dnl =============
shape=yes shape=yes
AC_ARG_ENABLE(shape, AC_ARG_ENABLE(shape, AS_HELP_STRING([--disable-shape], [disable shaped window extension support]),
[ --disable-shape disable shaped window extension support],
shape=$enableval, shape=yes) shape=$enableval, shape=yes)
added_xext=no added_xext=no
if test "$shape" = yes; then if test "$shape" = yes; then
@@ -483,10 +450,8 @@ fi
dnl XRandR support dnl XRandR support
dnl ============= dnl =============
xrandr=yes xrandr=yes
AC_ARG_ENABLE(XRandR, AC_ARG_ENABLE(XRandR, AS_HELP_STRING([--disable-xrandr], [disable XRandR window extension support]),
[ --disable-xrandr disable XRandR window extension support],
xrandr=$enableval, xrandr=yes) xrandr=$enableval, xrandr=yes)
added_xext=no added_xext=no
if test "$xrandr" = yes; then if test "$xrandr" = yes; then
@@ -572,8 +537,7 @@ AC_SUBST(XFTLIBS)
dnl XINERAMA support dnl XINERAMA support
dnl ================ dnl ================
xinerama=no xinerama=no
AC_ARG_ENABLE(xinerama, AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--enable-xinerama], [enable Xinerama extension support]),
[ --enable-xinerama enable Xinerama extension support],
xinerama=$enableval, xinerama=no) xinerama=$enableval, xinerama=no)
if test "$xinerama" = yes; then if test "$xinerama" = yes; then
@@ -607,8 +571,7 @@ fi
dnl MIT-SHM support dnl MIT-SHM support
dnl =============== dnl ===============
shm=yes shm=yes
AC_ARG_ENABLE(shm, AC_ARG_ENABLE(shm, AS_HELP_STRING([--disable-shm], [disable usage of MIT-SHM extension]),
[ --disable-shm disable usage of MIT-SHM extension],
shm=$enableval, shm=yes) shm=$enableval, shm=yes)
if test "$shm" = yes; then if test "$shm" = yes; then
@@ -641,15 +604,10 @@ dnl ==============================================
dnl Graphic Format Libraries dnl Graphic Format Libraries
dnl ============================================== dnl ==============================================
dnl XPM Support dnl XPM Support
dnl =========== dnl ===========
xpm=yes xpm=yes
AC_ARG_ENABLE(xpm, AC_ARG_ENABLE(xpm, AS_HELP_STRING([--disable-xpm], [disable use of XPM pixmaps through libXpm]),
[ --disable-xpm disable use of XPM pixmaps through libXpm],
xpm=$enableval, xpm=yes) xpm=$enableval, xpm=yes)
if test "$xpm" = yes; then if test "$xpm" = yes; then
@@ -675,16 +633,12 @@ dnl ===============================================
dnl End of stuff that uses X dnl End of stuff that uses X
dnl =============================================== dnl ===============================================
dnl PNG Support dnl PNG Support
dnl =========== dnl ===========
png=yes png=yes
AC_ARG_ENABLE(png, AC_ARG_ENABLE(png, AS_HELP_STRING([--disable-png], [disable PNG support through libpng]),
[ --disable-png disable PNG support through libpng],
png=$enableval, png=yes, png=no) png=$enableval, png=yes, png=no)
if test "$png" = yes ; then if test "$png" = yes ; then
WM_CHECK_LIB(png, png_get_valid, [-lz -lm]) WM_CHECK_LIB(png, png_get_valid, [-lz -lm])
@@ -703,8 +657,7 @@ dnl JPEG Support
dnl ============ dnl ============
jpeg=yes jpeg=yes
ljpeg="" ljpeg=""
AC_ARG_ENABLE(jpeg, AC_ARG_ENABLE(jpeg, AS_HELP_STRING([--disable-jpeg], [disable JPEG support through libjpeg]),
[ --disable-jpeg disable JPEG support through libjpeg],
jpeg=$enableval, jpeg=yes, jpeg=no) jpeg=$enableval, jpeg=yes, jpeg=no)
if test "$jpeg" = yes; then if test "$jpeg" = yes; then
@@ -727,8 +680,7 @@ fi
dnl GIF Support dnl GIF Support
dnl ============ dnl ============
gif=yes gif=yes
AC_ARG_ENABLE(gif, AC_ARG_ENABLE(gif, AS_HELP_STRING([--disable-gif], [disable GIF support through libgif or libungif]),
[ --disable-gif disable GIF support through libgif or libungif],
gif=$enableval, gif=yes, gif=no) gif=$enableval, gif=yes, gif=no)
if test "$gif" = yes; then if test "$gif" = yes; then
@@ -762,7 +714,7 @@ fi
dnl TIFF Support dnl TIFF Support
dnl ============ dnl ============
AC_ARG_ENABLE(tiff, AC_ARG_ENABLE(tiff,
[ --disable-tiff disable use of TIFF images through libtiff], AS_HELP_STRING([--disable-tiff], [disable use of TIFF images through libtiff]),
tif=$enableval, tif=yes, tif=no) tif=$enableval, tif=yes, tif=no)
# #
@@ -835,8 +787,7 @@ AC_CHECK_HEADERS(stdlib.h)
dnl Support for PIXMAPDIR option dnl Support for PIXMAPDIR option
dnl ============================ dnl ============================
AC_ARG_WITH(pixmapdir, AC_ARG_WITH(pixmapdir, AS_HELP_STRING([--with-pixmapdir=PATH], [specify where pixmaps are located [DATADIR/pixmaps]]))
[ --with-pixmapdir=PATH specify where pixmaps are located [DATADIR/pixmaps]])
if test "x$with_pixmapdir" != "x"; then if test "x$with_pixmapdir" != "x"; then
pixmapdir=$with_pixmapdir pixmapdir=$with_pixmapdir
@@ -856,8 +807,7 @@ AC_DEFINE_UNQUOTED(SYSCONFDIR, "$_sysconfdir", [where the configuration is store
dnl Support for GNUSTEP_LOCAL_ROOT, for WPrefs.app dnl Support for GNUSTEP_LOCAL_ROOT, for WPrefs.app
dnl ============================================== dnl ==============================================
AC_ARG_WITH(appspath, AC_ARG_WITH(appspath, AS_HELP_STRING([--with-gnustepdir=PATH], [specify the directory for GNUstep applications]))
[ --with-gnustepdir=PATH specify the directory for GNUstep applications])
if test "x`echo $with_gnustepdir | grep ^/`" != "x"; then if test "x`echo $with_gnustepdir | grep ^/`" != "x"; then
appspath=$with_gnustepdir appspath=$with_gnustepdir
@@ -886,15 +836,12 @@ AC_SUBST(wprefs_bindir)
dnl Enable User Defined Menu thing dnl Enable User Defined Menu thing
dnl ================================== dnl ==================================
AC_ARG_ENABLE(usermenu, AC_ARG_ENABLE(usermenu, AS_HELP_STRING([--enable-usermenu], [user defined menus for applications]),
[ --enable-usermenu user defined menus for applications
],
if test "$enableval" = yes; then if test "$enableval" = yes; then
AC_DEFINE(USER_MENU, 1, [define if you want user defined menus for applications]) AC_DEFINE(USER_MENU, 1, [define if you want user defined menus for applications])
fi fi
) )
AC_OUTPUT(Makefile po/Makefile util/Makefile util/po/Makefile \ AC_OUTPUT(Makefile po/Makefile util/Makefile util/po/Makefile \
WINGs/Makefile WINGs/WINGs/Makefile WINGs/Documentation/Makefile \ WINGs/Makefile WINGs/WINGs/Makefile WINGs/Documentation/Makefile \
WINGs/Examples/Makefile WINGs/Resources/Makefile WINGs/Tests/Makefile \ WINGs/Examples/Makefile WINGs/Resources/Makefile WINGs/Tests/Makefile \
@@ -911,11 +858,8 @@ AC_OUTPUT(Makefile po/Makefile util/Makefile util/po/Makefile \
WPrefs.app/po/Makefile ) WPrefs.app/po/Makefile )
dnl
dnl Output some helpful data for compiling wraster and WINGs/WUtil apps dnl Output some helpful data for compiling wraster and WINGs/WUtil apps
dnl =================================================================== dnl ===================================================================
dnl
dnl echo "WFLAGS=\"$LIBPL_INC_PATH -I$prefix/include\"" > WINGs-flags dnl echo "WFLAGS=\"$LIBPL_INC_PATH -I$prefix/include\"" > WINGs-flags
dnl echo "WLIBS=\"-L$exec_prefix/lib -lWINGs -lwraster $LIBPL_LIBS $GFXLIBS -lm\""\ dnl echo "WLIBS=\"-L$exec_prefix/lib -lWINGs -lwraster $LIBPL_LIBS $GFXLIBS -lm\""\