X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=configure.ac;h=97c2d002f720c847a7108d81e4a375d3ff362225;hb=4d100caa72e08296204e787bce6af8f0bcfebaec;hp=8285fb020f412ca6599248b923c6e0a7351e350e;hpb=818559e1809acf08190dab5ff1602a2cb9b001f0;p=xboard.git diff --git a/configure.ac b/configure.ac index 8285fb0..97c2d00 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,23 @@ dnl| configure.in dnl| +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 +dnl| the Free Software Foundation, either version 3 of the License, or (at +dnl| your option) any later version. +dnl| +dnl| GNU XBoard is distributed in the hope that it will be useful, but +dnl| WITHOUT ANY WARRANTY; without even the implied warranty of +dnl| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl| General Public License for more details. +dnl| +dnl| You should have received a copy of the GNU General Public License +dnl| along with this program. If not, see http://www.gnu.org/licenses/. +dnl| +dnl| -------------------------------------------------------------------- +dnl| dnl| You can process this file with autoconf to produce a configure script. dnl| However, normally the supplied configure script will work fine. dnl| @@ -9,12 +27,8 @@ dnl| it portable to sites and systems other than your own), and run autoconf dnl| to regenerate configure. Then submit your changes to be folded into dnl| the standard version of xboard. -dnl| need to change these here and in AC_INIT -PRODUCT=xboard -VERSION=4.4 -PATCHLEVEL=0e - -AC_INIT([xboard],[4.4.0e],[bug-xboard@gnu.org]) +dnl| define second argument as VERSION.PATCHLEVEL. e.g. 4.4.0j +AC_INIT([xboard],[4.4.0k],[bug-xboard@gnu.org]) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS([config.h]) @@ -28,8 +42,6 @@ AH_TEMPLATE([HAVE_RANDOM],[template]) AH_TEMPLATE([HAVE_SYS_SOCKET_H],[template]) AH_TEMPLATE([IBMRTAIX],[template]) AH_TEMPLATE([LAST_PTY_LETTER],[template]) -AH_TEMPLATE([PATCHLEVEL],[template]) -AH_TEMPLATE([PRODUCT],[template]) AH_TEMPLATE([PTY_ITERATION],[template]) AH_TEMPLATE([PTY_NAME_SPRINTF],[template]) AH_TEMPLATE([PTY_OPEN],[template]) @@ -38,7 +50,6 @@ AH_TEMPLATE([REMOTE_SHELL],[template]) AH_TEMPLATE([RTU],[template]) AH_TEMPLATE([UNIPLUS],[template]) AH_TEMPLATE([USE_PTYS],[template]) -AH_TEMPLATE([VERSION],[template]) AH_TEMPLATE([X_WCHAR],[template]) AH_TEMPLATE([ATTENTION],[template]) AH_TEMPLATE([DEFINED_SYS_ERRLIST],[template]) @@ -98,7 +109,7 @@ AC_CHECK_LIB(seq, getpseudotty) AC_PATH_XTRA if test -n "$no_x" ; then - echo $PRODUCT requires the X Window System header files and libraries! + echo $PACKAGE requires the X Window System header files and libraries! echo They were not found on your system. See FAQ topic C.2. echo configure failed exit 1 @@ -111,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 @@ -390,13 +398,6 @@ AC_ARG_ENABLE(sigint, fi], [AC_DEFINE(ATTENTION, 1)]) -AC_DEFINE_UNQUOTED(PRODUCT, "$PRODUCT") -AC_DEFINE_UNQUOTED(VERSION, "$VERSION") -AC_DEFINE_UNQUOTED(PATCHLEVEL, "$PATCHLEVEL") -AC_SUBST(PRODUCT) -AC_SUBST(VERSION) -AC_SUBST(PATCHLEVEL) - AC_CONFIG_FILES([Makefile cmail]) AC_CONFIG_COMMANDS([test-stamp-h],[test -z "$CONFIG_HEADERS" || date > stamp-h]) AC_CONFIG_COMMANDS([chmod-cmail],[chmod 755 cmail])