-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.in
93 lines (69 loc) · 2.92 KB
/
configure.in
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([src])
AC_CANONICAL_SYSTEM
#VERSION=`cat $srcdir/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'`
VERSION=`cat src/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'`
AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little]))
AC_SUBST(VERSION)
AM_INIT_AUTOMAKE(iwar, ${VERSION})
AC_CONFIG_HEADER(config.h)
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_LANG_C
AC_PROG_MAKE_SET
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
#AC_CHECK_HEADERS([stdio.h stdlib.h sys/types.h unistd.h stdint.h inttypes.h pthread.h ctype.h errno.h fcntl.h sys/stat.h string.h getopt.h time.h pcre.h stdarg.h limits.h arpa/inet.h netinet/in.h sys/time.h sys/socket.h])
AC_CHECK_HEADERS([stdio.h stdlib.h curses.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_TIME
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STAT
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_FUNC_FORK
AC_FUNC_REALLOC
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_CHECK_FUNCS([strlcpy strlcat])
#AC_CHECK_FUNCS([select strstr strchr strcmp strlen sizeof write snprintf strncat strlcat strlcpy getopt_long gethostbyname socket htons connect send recv dup2 strspn strdup])
AC_CHECK_LIB(curses, main,,AC_MSG_ERROR(iWar needs ncurses installed.))
AC_CHECK_LIB(pthread, main,,AC_MSG_ERROR(iWar needs pthreads installed.))
#AC_CHECK_LIB(pcre, main,,AC_MSG_ERROR(Sagan needs PCRE installed. Please see http://www.pcre.org.))
#AC_CHECK_LIB(m, main,,AC_MSG_ERROR(Sagan needs libm!))
#if test "$MYSQL" = "yes"; then
# AC_MSG_RESULT([------- MySQL support is enabled -------])
# AC_CHECK_HEADER([mysql/mysql.h])
# AC_CHECK_HEADER([mysql/errmsg.h])
# AC_CHECK_LIB(mysqlclient_r, main,,AC_MSG_ERROR(The MySQL library libmysqlclient_r is missing!
#If you're not interested in MySQL support use the --disable-mysql flag.))
# fi
#test "x$prefix" = x. || test "x$prefix" = xNONE && prefix=/usr/local
#AC_DEFINE_UNQUOTED(CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/sagan.conf"`", [Sagan configuration file])
AC_DEFINE_UNQUOTED(PACKAGE_NAME, "iwar" )
AC_DEFINE_UNQUOTED(PACKAGE_STRING, "iWar $VERSION")
AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "[email protected]" )
AC_DEFINE_UNQUOTED(PACKAGE_TARNAME, "iWar" )
AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$VERSION" )
AC_CONFIG_FILES([ \
Makefile \
src/Makefile])
# AC_OUTPUT(Makefile)
AC_OUTPUT
AC_MSG_RESULT([])
AC_MSG_RESULT([ .__ __ __ ________ ])
AC_MSG_RESULT([ |__/ \ / \_____ _______\_____ \ ])
AC_MSG_RESULT([ | \ \/\/ /\__ \\_ __ \/ ____/ ])
AC_MSG_RESULT([ | |\ / / __ \| | \/ \ ])
AC_MSG_RESULT([ |__| \__/\ / (____ /__| \_______ \ ])
AC_MSG_RESULT([ \/ \/ \/ ])
AC_MSG_RESULT([])