3 dnl# $Id: configure.in,v 1.4 2003/02/27 08:27:51 leo Exp $
5 dnl# Process this file with autoconf to produce a configure script.
9 if test -z "${CFLAGS}"; then
10 if test -z "${CCOPTS}"; then
16 dnl# Checks for programs.
21 ARCH=`echo $host | sed 's/\([^-]*\)-[^-]*-\([^-]*\)/\1-\2/'`
24 dnl Checks for programs.
25 AC_PREFIX_DEFAULT(/usr)
35 AC_PATH_PROG(RM, rm, rm)
36 AC_PATH_PROG(CP, cp, cp)
39 AC_SUBST(LD_SHAREFLAGS)
46 dnl ****************************************************************
47 dnl On SCO Unix, there are ELF and COFF binaries. We want elf to
48 dnl provide for dlopen() and friends. With help from Tamas Laufer!
49 dnl ****************************************************************
53 AC_MSG_CHECKING("SCO-Unix. See if we need -belf")
55 CFLAGS="$CFLAGS -belf"
61 CMFLAGS="$CMFLAGS -belf"
69 dnl Checks for header files.
74 AC_CHECK_HEADERS(fcntl.h \
91 AC_CHECK_FUNCS(setlocale)
93 dnl --------------------------------------------------------------------------
94 dnl Additional configure options added for xnc
96 AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging output],
100 if test "$xncdebug" = "yes"; then
107 AC_ARG_WITH(sdl, [ --with-sdl Turn on SDL support instead of X11],
111 if test "x$sdl_support" = "xyes"; then
112 echo "SDL is ENABLED *******************"
113 IFACEOBJS='$(SDLOBJS)'
114 IFACELIBS='`sdl-config --libs` -lSDL_image'
115 IFACEINC='`sdl-config --cflags` -I./sdl'
117 echo "X11 is ENABLED *******************"
120 IFACEOBJS='$(X11OBJS) $(X11IMAGE)'
122 IFACEINC='$(XINC) -I./x11'
129 dnl Checks for typedefs, structures, and compiler characteristics.
142 dnl ---------------------- Checks for library functions -----------------
144 AC_PROG_GCC_TRADITIONAL
147 AC_CHECK_FUNCS( getcwd \
161 LDFLAGS=${LDFLAGS--O}
167 dnl# common parts of the Makefile
168 MCOMMON=./src/Make.common
169 AC_SUBST_FILE(MCOMMON)
172 dnl Some specific OS stuff
179 if test "$GCC" = "yes"; then
180 AC_MSG_CHECKING("whether we need -fpermissive")
182 CFLAGS="-fpermissive $CFLAGS"
187 if grep 'option `-fpermissive'"'" config.log >/dev/null; then
191 CFLAGS="$old_cflags -fpermissive"
195 CFLAGS="$old_cflags",
197 CFLAGS="$old_cflags")
213 AC_CONFIG_HEADER(src/include/config.h)
217 src/include/globals.h \
221 echo "ZINC=" >>src/make.conf
222 echo "ZLIB=" >>src/make.conf
223 echo "ZDEP=" >>src/make.conf
224 echo "PNG=" >>src/make.conf
225 echo "OPNGS=" >>src/make.conf
226 echo "PNGINC=" >>src/make.conf
227 echo "PNGLIB=" >>src/make.conf
228 echo "PNGDEP=" >>src/make.conf
231 echo "PSEUDO=-DPSEUDOCOLOR" >>src/make.conf
232 echo "OPSEUDO=" >>src/make.conf
233 pse="PseudoColor; TrueColor;"
236 echo "XBM=" >>src/make.conf
237 echo "OXBM=" >>src/make.conf
240 echo "BMP=" >>src/make.conf
241 echo "OBMP=" >>src/make.conf
244 echo "XPM=" >>src/make.conf
245 echo "OXPM=" >>src/make.conf
248 echo "PCX=" >>src/make.conf
249 echo "OPCX=" >>src/make.conf
252 echo "TGA=" >>src/make.conf
253 echo "OTGA=" >>src/make.conf
256 echo "TIFF=" >>src/make.conf
257 echo "OTIFF=" >>src/make.conf
258 echo "TLIB=" >>src/make.conf
261 echo "PCD=" >>src/make.conf
262 echo "OPCDS=" >>src/make.conf
265 echo "--------------- X Welltris Project ----------------------"
270 Source code location: ${srcdir}
272 C Compiler flags: ${CFLAGS}
274 Libraries: ${out_lib}
275 Install path: ${prefix}/bin
276 Man pages path: ${prefix}/man
277 X11 versions: ${X_LIBS}
281 echo "-----------------------------------------------------------"
283 echo "Type 'make' for building XWelltris binaries, and after that"
284 echo "do 'make install' as 'root'."