1
dnl Process this file with autoconf to produce a configure script.
4
dnl Check for C++ and C compiler
10
dnl Checks for header files.
12
AC_PREFIX_DEFAULT(/usr/local)
13
AC_CONFIG_HEADER(config.h)
14
AC_CHECK_HEADERS(sys/time.h unistd.h limits.h)
16
dnl Checks for typedefs, structures, and compiler characteristics.
21
dnl Checks for library functions.
22
AC_CHECK_FUNCS(gettimeofday mktime usleep select strdup strstr strcasecmp strncasecmp drand48 random rand)
24
dnl Check for X11 libraries.
27
LIBS="${LIBS} ${X_PRE_LIBS} -lXt ${X_LIBS} ${X_EXTRA_LIBS}"
28
CPPFLAGS="${CPPFLAGS} -I${x_includes}"
29
LDFLAGS="${LDFLAGS} -L${x_libraries}"
30
AC_CHECK_LIB(X11, main)
31
AC_ARG_WITH(xpm-include,
32
[ --with-xpm-include=DIR XPM include files are in DIR],
33
CPPFLAGS="-I${with_xpm_include} ${CPPFLAGS}")
35
[ --with-xpm-lib=DIR XPM library file is in DIR],
36
LDFLAGS="-L${with_xpm_lib} ${LDFLAGS}")
37
AC_CHECK_LIB(Xpm, main)
38
AC_CHECK_LIB(Xmu, main)
39
AC_ARG_WITH(motif-include,
40
[ --with-motif-include=DIR Motif include files are in DIR],
41
CPPFLAGS="-I${with_motif_include} ${CPPFLAGS}")
42
AC_ARG_WITH(motif-lib,
43
[ --with-motif-lib=DIR Motif library files are in DIR],
44
LDFLAGS="-L${with_motif_lib} ${LDFLAGS}")
46
[ --with-motif Use Motif Tool kit],
47
AC_CHECK_LIB(Xm, main),
48
AC_CHECK_LIB(Xaw, main))
49
AC_ARG_WITH(x11-resource,
50
[ --with-x11-resource=DIR The root of X11 resource files
51
(Default \${x_libraries}/X11)],
52
XAD_DIR="${with_x11_resource}")
54
dnl Configurarion for duplicated high-score
55
AC_ARG_ENABLE(dupscore,
56
[ --enable-dupscore Allow one user to register multiple high score],
57
AC_DEFINE(ALLOW_DUPSCORE))
59
dnl Data directory and version
60
AC_DEFINE(XSHISEN_VERSION, "1.51")
61
CPPFLAGS="${CPPFLAGS} -DLIB_DIR=\\\"\$(XSHISENLIB)\\\" -DDAT_DIR=\\\"\$(XSHISENDAT)\\\""
63
dnl Check for internationalized resources
64
[for i in lang/XShisen.ad.*; do
65
lang="`echo $i | sed 's/^.*XShisen\.ad\.//'`"
69
dnl Check for app-defaults directory
70
[if [ -z "${XAD_DIR}" ]; then
71
if [ -d "${x_libraries}/X11/app-defaults" ]; then
72
XAD_DIR="${x_libraries}/X11"
73
elif [ -d "${x_libraries}/app-defaults" ]; then
74
XAD_DIR="${x_libraries}"
75
elif [ -d "/etc/X11/app-defaults" ]; then
78
XAD_DIR="/usr/lib/X11"
82
dnl Do you have mkdirhier?
83
AC_PATH_PROG(MKDIR, mkdirhier, mkdir -p)