File: configure.in

package info (click to toggle)
xshisen 1:1.51-4.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,124 kB
  • sloc: cpp: 4,007; sh: 152; perl: 146; makefile: 114
file content (88 lines) | stat: -rw-r--r-- 2,647 bytes parent folder | download | duplicates (8)
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(body.h)

dnl Check for C++ and C compiler
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
dnl AC_LANG_CPLUSPLUS

dnl Checks for header files.
AC_HEADER_STDC
AC_PREFIX_DEFAULT(/usr/local)
AC_CONFIG_HEADER(config.h)
AC_CHECK_HEADERS(sys/time.h unistd.h limits.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_SIZE_T

dnl Checks for library functions.
AC_CHECK_FUNCS(gettimeofday mktime usleep select strdup strstr strcasecmp strncasecmp drand48 random rand)

dnl Check for X11 libraries.
AC_PATH_X
AC_PATH_XTRA
LIBS="${LIBS} ${X_PRE_LIBS} -lXt ${X_LIBS} ${X_EXTRA_LIBS}"
CPPFLAGS="${CPPFLAGS} -I${x_includes}"
LDFLAGS="${LDFLAGS} -L${x_libraries}"
AC_CHECK_LIB(X11, main)
AC_ARG_WITH(xpm-include,
  [  --with-xpm-include=DIR    XPM include files are in DIR],
  CPPFLAGS="-I${with_xpm_include} ${CPPFLAGS}")
AC_ARG_WITH(xpm-lib,
  [  --with-xpm-lib=DIR        XPM library file is in DIR],
  LDFLAGS="-L${with_xpm_lib} ${LDFLAGS}")
AC_CHECK_LIB(Xpm, main)
AC_CHECK_LIB(Xmu, main)
AC_ARG_WITH(motif-include,
  [  --with-motif-include=DIR  Motif include files are in DIR],
  CPPFLAGS="-I${with_motif_include} ${CPPFLAGS}")
AC_ARG_WITH(motif-lib,
  [  --with-motif-lib=DIR      Motif library files are in DIR],
  LDFLAGS="-L${with_motif_lib} ${LDFLAGS}")
AC_ARG_WITH(motif,
  [  --with-motif              Use Motif Tool kit],
  AC_CHECK_LIB(Xm,  main),
  AC_CHECK_LIB(Xaw, main))
AC_ARG_WITH(x11-resource,
  [  --with-x11-resource=DIR   The root of X11 resource files
                            (Default \${x_libraries}/X11)],
  XAD_DIR="${with_x11_resource}")

dnl Configurarion for duplicated high-score
AC_ARG_ENABLE(dupscore,
  [  --enable-dupscore         Allow one user to register multiple high score],
  AC_DEFINE(ALLOW_DUPSCORE))

dnl Data directory and version
AC_DEFINE(XSHISEN_VERSION, "1.51")
CPPFLAGS="${CPPFLAGS} -DLIB_DIR=\\\"\$(XSHISENLIB)\\\" -DDAT_DIR=\\\"\$(XSHISENDAT)\\\""

dnl Check for internationalized resources
[for i in lang/XShisen.ad.*; do
  lang="`echo $i | sed 's/^.*XShisen\.ad\.//'`"
  LANGS="$LANGS $lang"
done]

dnl Check for app-defaults directory
[if [ -z "${XAD_DIR}" ]; then
  if [ -d "${x_libraries}/X11/app-defaults" ]; then
    XAD_DIR="${x_libraries}/X11"
  elif [ -d "${x_libraries}/app-defaults" ]; then
    XAD_DIR="${x_libraries}"
  elif [ -d "/etc/X11/app-defaults" ]; then
    XAD_DIR="/etc/X11"
  else
    XAD_DIR="/usr/lib/X11"
  fi
fi]

dnl Do you have mkdirhier?
AC_PATH_PROG(MKDIR, mkdirhier, mkdir -p)

AC_SUBST(XAD_DIR)
AC_SUBST(LANGS)
AC_SUBST(MKDIR)
AC_OUTPUT(Makefile)