summaryrefslogtreecommitdiff
path: root/configure.ac
blob: c2be4fd95ac1c3cdf59fa30afaf776c6a32f0cb6 (plain)
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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.50)
AC_INIT([mogltk], [0.0.1], [pixel@nobis-crew.org])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(mogltk, 0.0.1)
AC_CONFIG_SRCDIR([intl/bindtextdom.c])
AM_CONFIG_HEADER(config.h)


AM_MAINTAINER_MODE

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_YACC
AM_PROG_LIBTOOL
AC_C_BIGENDIAN

# Checks for libraries.
AC_CHECK_LIB([c], [printf])
AM_PATH_SDL(1.2.0, , AC_MSG_ERROR([SDL needed.]))
AM_PATH_BALTISOT(, AC_MSG_ERROR([Baltisot needed.]))
AC_SEARCH_LIBS(glVertex3d, GL, , [
    unset ac_cv_search_glVertex3d
    AC_MSG_NOTICE([OpenGL not found in standard path. Looking in /usr/X11R6/lib])
    LDFLAGS="-L/usr/X11R6/lib $LDFLAGS"
    AC_SEARCH_LIBS(glVertex3d, GL, , AC_MSG_ERROR([can't find OpenGL]))
])
AC_SEARCH_LIBS(gluPerspective, GLU, , [
    unset ac_cv_search_gluPerspective
    AC_MSG_NOTICE([GLU not found in standard path. Looking in /usr/X11R6/lib])
    LDFLAGS="-L/usr/X11R6/lib $LDFLAGS"
    AC_SEARCH_LIBS(gluPerspective, GLU, , AC_MSG_ERROR([can't find GLU]))
])

# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_STDC
AC_CHECK_HEADERS([argz.h fcntl.h inttypes.h langinfo.h libintl.h limits.h locale.h malloc.h stddef.h stdint.h stdio_ext.h stdlib.h string.h strings.h sys/param.h unistd.h])
AC_HEADER_STDBOOL

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_C_VOLATILE

# Checks for library functions.
AM_GNU_GETTEXT()
AC_SUBST(USE_INCLUDED_LIBINTL)
ALL_LINGUAS="fr"
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify getcwd mempcpy munmap nl_langinfo setlocale stpcpy strcasecmp strchr strcspn strdup strstr strtoul atexit])

AC_ARG_ENABLE([debug],
              [  --enable-debug          enable verbose debugging],
	      AC_DEFINE(DEBUG, 1, [Enable verbose debugging]))

AC_ARG_ENABLE([efence],
              [  --enable-efence         enable compiling with electic-fence],
	      AC_SEARCH_LIBS(EF_Print, efence))

AC_PATH_PROG(gmakepath, gmake)
AC_PATH_PROG(unamepath, uname)

if test "x$unamepath" = x; then
    system="unknown"
else
    AC_MSG_CHECKING(system type)
    system=`$unamepath -s`
    AC_MSG_RESULT($system)
fi

AC_CONFIG_FILES([Makefile
		 mogltk-config
		 intl/Makefile
		 m4/Makefile
		 include/Makefile
		 po/Makefile.in
		 lib/Makefile
		 src/Makefile])
AC_OUTPUT

echo
echo \-\-\= $PACKAGE $VERSION \=\-\-
echo

echo Build System .................... : $system
echo Build Host ...................... : $host
echo Install Prefix .................. : $prefix
echo

if test _"$gmakepath" = _; then
    echo configure complete, now type \'make\'
else
    echo configure complete, now type \'gmake\'
fi