X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=configure.ac;h=97c2d002f720c847a7108d81e4a375d3ff362225;hb=e8c13b2b64ef54f41e659b97c16968c2c136c937;hp=ece13560bfe89b8b96b463a8c0ec86151b733c5a;hpb=f00b56b34a1d43c6cc3e7489fdde4f284d776420;p=xboard.git diff --git a/configure.ac b/configure.ac index ece1356..97c2d00 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl| configure.in dnl| -dnl| Copyright 1992-2001,2002,2003,2004,2005,2006,2007,2008,2009 Free Software -dnl| Foundation, Inc. +dnl| Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, 2007, +dnl| 2008, 2009 Free Software Foundation, Inc. dnl| dnl| GNU XBoard is free software: you can redistribute it and/or modify dnl| it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ dnl| to regenerate configure. Then submit your changes to be folded into dnl| the standard version of xboard. dnl| define second argument as VERSION.PATCHLEVEL. e.g. 4.4.0j -AC_INIT([xboard],[4.4.0j],[bug-xboard@gnu.org]) +AC_INIT([xboard],[4.4.0k],[bug-xboard@gnu.org]) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS([config.h]) @@ -122,34 +122,31 @@ if test "$xt" == "no" ; then exit 1 fi -AC_ARG_WITH(Xaw3d, [ --with-Xaw3d use Xaw3d instead of Xaw], - with_xaw3d="yes", with_xaw3d="no") - - -xaw_headers="no" -if test "$with_xaw3d" == "yes" ; then - XAW_LIBS="-lXaw3d" - AC_CHECK_LIB([Xaw3d], [XawTextReplace], xaw3d_lib="yes", xaw3d_lib="no") - if test "$xaw3d_lib" == "no" ; then - echo Xaw3d libraries not found - exit 1 - else - AC_CHECK_HEADER(X11/Xaw3d/Dialog.h,xaw3d_headers="yes",xaw3d_headers="no") - if test "$xaw3d_headers" == "yes" ; then - AC_DEFINE(USE_XAW3D) - xaw_headers="yes" - else - AC_CHECK_HEADER(X11/Xaw/Dialog.h,xaw_headers="yes") - fi - fi -else +dnl | test if user wants ot use Xaw3d headers +AC_ARG_WITH([Xaw3d], + [AS_HELP_STRING([--with-Xaw3d], + [use Xaw3d instead of Xaw])], + [with_xaw3d=yes], + [with_xaw3d=no]) + +XAW_LIBS= +AS_IF([test "x$with_xaw3d" != xno], + [AC_CHECK_LIB([Xaw3d], + [XawTextReplace], + [AC_SUBST([XAW_LIBS], + ["-lXaw3d"]) + AC_DEFINE([USE_XAW3D], [1], + [Define if you want to use Xaw3d])], + [AC_CHECK_HEADER(X11/Xaw/Dialog.h,xaw_headers="yes") + AC_MSG_FAILURE( + [--with-Xaw3d was given, but test for Xaw3d failed])], + [-lXaw])]) +if test "$with_xaw3d" == "no" ; then XAW_LIBS="-lXaw" - AC_CHECK_HEADER(X11/Xaw/Dialog.h,xaw_headers="yes") fi - AC_SUBST(XAW_LIBS) - +dnl | end Xaw3d test if test "$xaw_headers" == "no" ; then echo Xaw headers not found