File: configure.in

package info (click to toggle)
csmash 0.6.6-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,548 kB
  • ctags: 1,687
  • sloc: cpp: 19,531; sh: 3,515; makefile: 439; ansic: 120; sed: 16
file content (107 lines) | stat: -rw-r--r-- 3,025 bytes parent folder | download | duplicates (6)
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
107
dnl Process this file with autoconf to produce a configure script.
dnl AC_INIT(ShakeCut.h)
AC_PREREQ(2.50)
AC_INIT(csmash, 0.6.6, nan@utmc.or.jp)
AC_CONFIG_SRCDIR(main.cpp)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(csmash, 0.6.6)
AM_CONFIG_HEADER(config.h)
AM_GNU_GETTEXT([external])

AC_CHECK_FUNCS(bind_textdomain_codeset)

dnl this must be defined before AM_GNU_GETTEXT
ALL_LINGUAS="de fr ja"

dnl Checks for programs.
AC_PROG_CXX
AC_PATH_PROG(GZIP, gzip)

AC_PATH_X

CFLAGS="-I $x_includes"
LDFLAGS="-L/usr/local/lib -L$x_libraries -L$libdir"
CXXFLAGS="$CFLAGS -Wall"

dnl Checks for libraries.
AC_CHECK_LIB(Xmu, main)
AC_CHECK_LIB(Xt, main)
AC_CHECK_LIB(ICE, main)
AC_CHECK_LIB(X11, main)
AC_CHECK_LIB(Xext, main)
AC_CHECK_LIB(Xi, main)
AC_CHECK_LIB(m, fabs)
AC_CHECK_LIB(GL, glLoadIdentity, , [AC_CHECK_LIB(MesaGL, glLoadIdentity, , [AC_CHECK_LIB(OpenGL32, main, , AC_MSG_ERROR(OpenGL library not found.))])])
AC_CHECK_LIB(GLU, gluPerspective, , [AC_CHECK_LIB(MesaGLU, gluPerspective, , [AC_CHECK_LIB(GLU32, main, , AC_MSG_ERROR(GLU library not found))])])
AC_CHECK_LIB(z, gzdopen)

dnl Check for SDL
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION,
            :,
        AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"

AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio)
AC_CHECK_LIB(SDL_image, IMG_Load, ,AC_MSG_ERROR(SDL_image not found))

AM_PATH_GTK_2_0(2.0.0, [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"], )
dnl AM_PATH_GTK( 2.0.0, [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"], )
dnl PKG_CHECK_MODULES(CSMASH, gtk+-2.0 >= 1.3, [CFLAGS="$CFLAGS $CSMASH__CFLAGS" CPPFLAGS="$CPPFLAGS $CSMASH_CFLAGS" LIBS="$LIBS $CSMASH_LIBS"], )

if test x$ac_cv_lib_z_gzdopen = xyes; then
  PKGDATA=.gz
else
  PKGDATA=
fi
AC_SUBST(PKGDATA)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/time.h unistd.h)

AC_CHECK_HEADER(windows.h, [AC_DEFINE(WIN32,,[Are we on Windows?])
			LIBS="$LIBS -lwinmm"])

AC_MSG_CHECKING(if --enable-ipv6 option specified)
AC_ARG_ENABLE(ipv6,[  --enable-ipv6            trun on ipv6 [default no]],,
	[enable_ipv6="no"])
AC_MSG_RESULT($enable_ipv6)

if test x$enable_ipv6 = xyes; then
  AC_DEFINE(ENABLE_IPV6,,[Define to enable IPv6.])
fi


case "$target" in
	*-*-cygwin* | *-*-mingw32*)
		LIBS="$LIBS -lws2_32 -liberty"
		CFLAGS="$CFLAGS -fnative-struct"
		CPPFLAGS="$CPPFLAGS -fnative-struct"
		;;
esac

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.

dnl moved to makefile.am
dnl AC_DEFINE_UNQUOTED(CANNONSMASH_DATADIR, "@prefix@/share/$PACKAGE/")

AC_OUTPUT([Makefile  m4/Makefile \
	Parts/Makefile \
	Parts/Bcut/Makefile \
	Parts/Bnormal/Makefile \
	Parts/Bpeck/Makefile \
	Parts/Fcut/Makefile \
	Parts/Fdrive/Makefile \
	Parts/Fnormal/Makefile \
	Parts/Fpeck/Makefile \
	Parts/Fsmash/Makefile \
	images/Makefile \
	wav/Makefile \
	win32/Makefile \
	po/Makefile.in ])