1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
|
dnl# -*- sh -*-
dnl#
dnl# $Id: configure.in,v 1.4 2003/02/27 08:27:51 leo Exp $
dnl#
dnl# Process this file with autoconf to produce a configure script.
dnl#
AC_INIT(src/main.cxx)
if test -z "${CFLAGS}"; then
if test -z "${CCOPTS}"; then
CCOPTS='-O'
fi
CFLAGS="$CCOPTS"
fi
dnl# Checks for programs.
dnl AC_MAKE_SET
AC_CANONICAL_HOST
changequote(,)dnl
ARCH=`echo $host | sed 's/\([^-]*\)-[^-]*-\([^-]*\)/\1-\2/'`
changequote([,])dnl
dnl Checks for programs.
AC_PREFIX_DEFAULT(/usr)
AC_ISC_POSIX
AC_AIX
AC_MINIX
dnl AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PATH_PROG(RM, rm, rm)
AC_PATH_PROG(CP, cp, cp)
AC_SUBST(SHAREFLAGS)
AC_SUBST(LD_SHAREFLAGS)
AC_SUBST(PLUGINS)
AC_SUBST(DEB)
AC_SUBST(IFACEOBJS)
AC_SUBST(IFACELIBS)
AC_SUBST(IFACEINC)
dnl ****************************************************************
dnl On SCO Unix, there are ELF and COFF binaries. We want elf to
dnl provide for dlopen() and friends. With help from Tamas Laufer!
dnl ****************************************************************
case "$ARCH" in
*sco*|*SCO*)
AC_MSG_CHECKING("SCO-Unix. See if we need -belf")
old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_TRY_COMPILE(
[
],
[
],
CMFLAGS="$CMFLAGS -belf"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
CFLAGS="$old_cflags")
;;
esac
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS(fcntl.h \
sys/select.h \
sys/time.h \
sys/sigevent.h \
sys/types.h \
sys/stat.h \
sys/utsname.h \
sys/param.h \
sys/wait.h \
limits.h \
unistd.h \
errno.h \
strings.h \
math.h)
AC_CHECK_LIB(m, pow)
AC_CHECK_FUNCS(setlocale)
dnl --------------------------------------------------------------------------
dnl Additional configure options added for xnc
AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging output],
xncdebug=yes,
xncdebug=no)
if test "$xncdebug" = "yes"; then
DEB="-g -DDEBUG_XNC"
else
DEB=""
fi
AC_ARG_WITH(sdl, [ --with-sdl Turn on SDL support instead of X11],
sdl_support=yes,
sdl_support=no)
if test "x$sdl_support" = "xyes"; then
echo "SDL is ENABLED *******************"
IFACEOBJS='$(SDLOBJS)'
IFACELIBS='`sdl-config --libs` -lSDL_image'
IFACEINC='`sdl-config --cflags` -I./sdl'
else
echo "X11 is ENABLED *******************"
AC_PATH_X
AC_PATH_XTRA
IFACEOBJS='$(X11OBJS) $(X11IMAGE)'
IFACELIBS='$(XLIBS)'
IFACEINC='$(XINC) -I./x11'
fi
out_lib=${LIBS}
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_TYPE_SIGNAL
dnl ---------------------- Checks for library functions -----------------
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS( getcwd \
mkdir \
putenv \
select \
socket \
seteuid \
unsetenv \
setutent \
atexit
)
CFLAGS=${CFLAGS--O}
LDFLAGS=${LDFLAGS--O}
CPPFLAGS="$CPPFLAGS"
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
dnl# common parts of the Makefile
MCOMMON=./src/Make.common
AC_SUBST_FILE(MCOMMON)
dnl Some specific OS stuff
case "$ARCH" in
*hppa*|*hpux*)
# do nothing
;;
*solaris*)
if test "$GCC" = "yes"; then
AC_MSG_CHECKING("whether we need -fpermissive")
old_cflags="$CFLAGS"
CFLAGS="-fpermissive $CFLAGS"
AC_TRY_RUN(
main()
{ exit(0);
},
if grep 'option `-fpermissive'"'" config.log >/dev/null; then
AC_MSG_RESULT(no)
CFLAGS="$old_cflags"
else
CFLAGS="$old_cflags -fpermissive"
AC_MSG_RESULT(yes)
fi,
AC_MSG_RESULT(no)
CFLAGS="$old_cflags",
AC_MSG_RESULT(no)
CFLAGS="$old_cflags")
fi
;;
*aix*)
# do nothing
;;
*darwin*)
# do nothing
;;
*)
# do nothing
;;
esac
AC_CONFIG_HEADER(src/include/config.h)
AC_OUTPUT( \
src/Make.common \
src/makefile \
src/include/globals.h \
src/image/makefile \
Makefile)
echo "ZINC=" >>src/make.conf
echo "ZLIB=" >>src/make.conf
echo "ZDEP=" >>src/make.conf
echo "PNG=" >>src/make.conf
echo "OPNGS=" >>src/make.conf
echo "PNGINC=" >>src/make.conf
echo "PNGLIB=" >>src/make.conf
echo "PNGDEP=" >>src/make.conf
echo "PSEUDO=-DPSEUDOCOLOR" >>src/make.conf
echo "OPSEUDO=" >>src/make.conf
pse="PseudoColor; TrueColor;"
echo "XBM=" >>src/make.conf
echo "OXBM=" >>src/make.conf
xbm=""
echo "BMP=" >>src/make.conf
echo "OBMP=" >>src/make.conf
bmp=""
echo "XPM=" >>src/make.conf
echo "OXPM=" >>src/make.conf
xpm=""
echo "PCX=" >>src/make.conf
echo "OPCX=" >>src/make.conf
pcx=""
echo "TGA=" >>src/make.conf
echo "OTGA=" >>src/make.conf
targa=""
echo "TIFF=" >>src/make.conf
echo "OTIFF=" >>src/make.conf
echo "TLIB=" >>src/make.conf
tiff=""
echo "PCD=" >>src/make.conf
echo "OPCDS=" >>src/make.conf
pcd=""
echo "--------------- X Welltris Project ----------------------"
echo "
Configuration:
Source code location: ${srcdir}
C Compiler: ${CC}
C Compiler flags: ${CFLAGS}
C++ Compiler: ${CXX}
Libraries: ${out_lib}
Install path: ${prefix}/bin
Man pages path: ${prefix}/man
X11 versions: ${X_LIBS}
X Visuals: ${pse}
Image library: GIF
"
echo "-----------------------------------------------------------"
echo ""
echo "Type 'make' for building XWelltris binaries, and after that"
echo "do 'make install' as 'root'."
echo ""
echo "Thank you..."
|