1 dnl Process this file with autoconf to produce a configure script.
4 AM_CONFIG_HEADER(src/autoconf.h)
8 dnl Checks for programs.
11 AM_INIT_AUTOMAKE(hengband, 1.0.8)
13 AC_ARG_ENABLE(japanese,
14 [ --disable-japanese disable japanese [**NOT WORK**]],use_japanese=no ,[AC_DEFINE(JP) AC_DEFINE(EUC)])
17 [ --disable-xim disable xim support], use_xim=no, use_xim=yes)
18 AC_ARG_ENABLE(fontset,
19 [ --disable-fontset disable fontset support], use_fontset=no, use_fontset=yes)
20 AC_ARG_ENABLE(worldscore,
21 [ --disable-worldscore disable worldscore support], ,AC_DEFINE(WORLD_SCORE))
22 AC_ARG_ENABLE(chuukei,
23 [ --enable-chuukei enable internet chuukei support], AC_DEFINE(CHUUKEI))
25 dnl Checks for libraries.
26 dnl Replace `main' with a function in -lncurses:
27 AC_CHECK_LIB(ncurses, initscr, [AC_DEFINE(USE_GCU) AC_DEFINE(USE_NCURSES) LIBS="$LIBS -lncurses"])
28 if test "$ac_cv_lib_ncurses_initscr" != yes; then
29 AC_CHECK_LIB(curses, initscr, [AC_DEFINE(USE_GCU) LIBS="$LIBS -lcurses"])
30 if test "$ac_cv_lib_curses_initscr" != yes; then
31 AC_CHECK_LIB(termcap, tgetent, [AC_DEFINE(USE_CAP) LIBS="$LIBS -ltermcap"])
35 dnl Checks for header files.
37 if test "$have_x" = yes; then
40 CFLAGS="$X_CFLAGS $CFLAGS"
41 LDFLAGS="$X_LIBS $LDFLAGS"
42 if test "$use_japanese" != no; then
43 if test "$use_fontset" = yes; then
44 AC_DEFINE(USE_FONTSET)
46 if test "$use_xim" = yes; then
49 if test "$use_fontset" = yes || "$use_xim" = yes; then
51 AC_DEFINE(DEFAULT_LOCALE, "ja_JP.eucJP", Default Japanese Locale)
52 AC_CHECK_LIB(X11, _Xsetlocale, AC_DEFINE(X_LOCALE))
60 AC_CHECK_HEADERS(fcntl.h strings.h sys/file.h sys/ioctl.h sys/time.h termio.h unistd.h)
62 dnl Checks for typedefs, structures, and compiler characteristics.
69 dnl Checks for library functions.
70 AC_PROG_GCC_TRADITIONAL
75 AC_CHECK_FUNCS(gethostname mkdir select socket strdup strstr strtol)
77 AC_OUTPUT(Makefile src/Makefile lib/Makefile lib/apex/Makefile lib/bone/Makefile lib/data/Makefile lib/edit/Makefile lib/file/Makefile lib/help/Makefile lib/info/Makefile lib/pref/Makefile lib/save/Makefile lib/script/Makefile lib/user/Makefile lib/xtra/Makefile lib/xtra/font/Makefile lib/xtra/graf/Makefile lib/xtra/music/Makefile lib/xtra/sound/Makefile)