1dnl Process this file with autoconf to produce a configure script.
2dnl This config.in requires autoconf 2.0 or greater.
3dnl
4dnl  $Id: configure.in,v 1.9 2000/01/08 17:01:21 ejb Exp $
5dnl  $Source: /home/ejb/source/magiccube4d/CVSroot/src/configure.in,v $
6dnl  $Author: ejb $
7dnl
8AC_INIT(MagicCube.h)
9AC_REVISION($Revision: 1.9 $)dnl
10AC_SUBST(WFLAGS)
11AC_SUBST(DFLAGS)
12AC_SUBST(XLIBS)
13AC_SUBST(XINCS)
14AC_SUBST(LIBS)
15AC_SUBST(OS)
16AC_SUBST(DOTVERSION)
17AC_SUBST(VERSION)
18AC_PROG_CXX
19AC_ARG_ENABLE(debugging,
20              [  --enable-debugging      support debugging in binaries],
21              [DFLAGS="-g"],
22              [DFLAGS="-O"])
23
24if test "$GXX" = "yes" ; then
25   WFLAGS="$WFLAGS -pedantic -Wall -W -Wunused -Werror"
26fi
27AC_PATH_X
28
29if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
30  XLIBS=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
31fi
32if test "${x_includes}" != NONE && test -n "${x_includes}"; then
33  XINCS=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
34fi
35OS=`uname -s | tr A-Z a-z`
36DOTVERSION=`grep VERSION MagicCube.h | awk -F\" '{print $2}'`
37VERSION=`echo $DOTVERSION | sed -e 's/\./_/g'`
38
39OTHERLIBS=""
40AC_CHECK_LIB(ICE, IceAcceptConnection,,,${XLIBS} -lm -lXaw -lXmu -lXt -lXext -lX11)
41AC_CHECK_LIB(SM, SmcOpenConnection,,,${XLIBS} -lm -lXaw -lXmu -lXt -lXext -lX11)
42AC_OUTPUT(Makefile magiccube4d.spec)
43