7 # NEURO_MICRO_VERSION += 1 when bug fixes were done or small changes
8 # NEURO_MINOR_VERSION += 1 when new functions and or modules were added, anything more than mere bug fixes or small changes
9 # NEURO_MAJOR_VERSION += 1 when set goals for the whole projects are met, example when neuro will be done, we will raise that by 1. After it is 1, it only raise when most(like more than half) of the code was changes.
12 NEURO_MINOR_VERSION=49
17 NEURO_VERSION=$NEURO_MAJOR_VERSION.$NEURO_MINOR_VERSION.$NEURO_MICRO_VERSION
19 AC_SUBST(NEURO_MAJOR_VERSION)
20 AC_SUBST(NEURO_MINOR_VERSION)
21 AC_SUBST(NEURO_MICRO_VERSION)
22 AC_SUBST(NEURO_INTERFACE_AGE)
23 AC_SUBST(NEURO_BINARY_AGE)
24 AC_SUBST(NEURO_VERSION)
28 LT_CURRENT=$NEURO_INTERFACE_AGE
29 LT_REVISION=$NEURO_REVISION
30 LT_AGE=$NEURO_BINARY_AGE
36 #AC_INIT(Neuro, $NEURO_VERSION)
37 AC_CONFIG_SRCDIR([src/neuro_main.c])
40 AM_INIT_AUTOMAKE(neuro, $NEURO_VERSION)
42 # call canonical host to get valuable informations about the current system
44 AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
47 #dnl ----- set some variables ------
57 # check for cygwin stuff
65 CFLAGS="$CFLAGS -ansi -Wall -pedantic -I\$(top_srcdir)/src"
66 NEUROFLAGS="-D__USE_GNU -I\${top_srcdir}/include -I\${top_srcdir}/include/neuro"
67 NEUROLIBFLAGS="--enable-realtime-pseudo-reloc"
68 SDLFLAGS="`sdl-config --libs`"
70 dnl ------ Configure Arguments ------
72 AC_ARG_ENABLE(Debug, [ --enable-Debug enable the debugging of this program [[default=no]]], , enable_Debug=no)
75 [ --with-lowlib=<lowlib> the low library Neuro will use;]
76 [ only a single value is valid here;]
78 [ Possible low libraries are :]
80 lowlib="$withval", lowlib="sdl")
84 # host related checkings
86 AC_MSG_CHECKING([if we need -no-undefined])
88 *-*-cygwin | *-*-mingw* | *-*-pw32*)
89 NEUROFLAGS="$NEUROFLAGS -DWIN32"
90 NEUROLIBFLAGS="$NEUROLIBFLAGS -no-undefined"
93 #LIBS="$LIBS -lc -lgcc_s -ldl"
100 AC_MSG_RESULT($need_no_undefined)
101 AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
105 AC_CHECK_HEADERS([windows.h], , [AC_MSG_ERROR([the required header windows is missing.])])
106 #AC_CHECK_FUNCS([GetTickCount], , [AC_MSG_ERROR([a required function is missing.])])
113 AC_CHECK_HEADERS([unistd.h], , [AC_MSG_ERROR([the required header unistd is missing.])])
114 AC_CHECK_FUNCS([gettimeofday], , [AC_MSG_ERROR([a required function is missing.])])
118 dnl --------- Checks -------------
121 dnl check for header files.
124 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h], , [AC_MSG_ERROR([a required header is missing.])])
126 # Checks for typedefs, structures, and compiler characteristics.
132 # Checks for library functions.
134 AC_CHECK_FUNCS([memchr memset strchr], , [AC_MSG_ERROR([a required function is missing.])])
137 dnl List of libraries Neuro can use
139 SELECTED_LOWLIB=`echo $lowlib`
145 AM_CONDITIONAL(USE_SDL, test x$SELECTED_LOWLIB = xsdl)
146 if test $SELECTED_LOWLIB = sdl; then
147 if test $targ = unix; then
148 AC_CHECK_LIB(SDL, SDL_Init,
149 [AC_DEFINE(USE_SDL, 1) LIBS="$LIBS $SDLFLAGS"
150 NEUROFLAGS="$NEUROFLAGS `sdl-config --cflags`"],
151 [AC_MSG_ERROR(You don't have libSDL you can get it from http://www.libsdl.org)
156 AC_CHECK_LIB(SDL, SDL_Init,
157 [AC_DEFINE(USE_SDL, 1) LIBS="$LIBS -lSDL"],
158 [AC_MSG_ERROR(You don't have libSDL you can get it from http://www.libsdl.org)
166 cp include/extlib.h include/neuro
167 cat include/extlib_sdl.h >> include/neuro/extlib.h
172 AC_CHECK_LIB(z, gzgetc,
173 [AC_DEFINE(USE_ZLIB, 1) LIBS="$LIBS -lz"],
174 [AC_MSG_ERROR(You don't have the Z library)])
180 AM_CONDITIONAL(USE_X11, test x$SELECTED_LOWLIB = xX11)
181 if test $SELECTED_LOWLIB = X11; then
184 LDFLAGS="$CFLAGS $X_LIBS"
185 CFLAGS="$CFLAGS $X_CFLAGS"
186 AC_CHECK_LIB(X11, XCreateGC,
187 [AC_DEFINE(USE_X11, 1) LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"],
188 [AC_MSG_ERROR(You don't have libX11)])
189 # LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"
190 # NEUROFLAGS="$NEUROFLAGS $X_CFLAGS"
191 AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
192 [LIBS="$LIBS -lXpm"],
193 [AC_MSG_ERROR(You don't have libXpm)])
197 cp include/extlib.h include/neuro
203 AC_CHECK_LIB(m, log10, , [AC_MSG_ERROR(You don't have libm -- math)])
209 if test x$freetype_enable = xyes; then
210 AC_CHECK_LIB(freetype, FT_New_Face,
211 [LIBS="$LIBS `freetype-config --libs`" CFLAGS="$CFLAGS `freetype-config --cflags`"],
212 [AC_MSG_ERROR(You don't have the libfreetype2 library you can get it from freetype.sourceforge.net)])
219 if test x$enable_Debug = xyes; then
220 #NEUROFLAGS="$NEUROFLAGS -g"
223 #NEUROFLAGS="$NEUROFLAGS -O2 -s"
224 CFLAGS="$CFLAGS -Os -s"
228 AC_SUBST(NEUROLIBFLAGS)
230 # set the installation path for the headers
231 includedir=$includedir/neuro
235 # enumerate the Makefiles to be created
246 #add those above when they are started
250 #src/sound/music/Makefile
254 #AC_MSG_NOTICE([This is the low library Neuro will use : $SELECTED_LOWLIB])
259 echo "This is the low library Neuro will use : $SELECTED_LOWLIB"