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=46
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)
164 AC_CHECK_LIB(SDL_ttf, TTF_RenderUNICODE_Solid, ,
165 [AC_MSG_ERROR(You don't have libSDL_ttf you can get it from http://libsdl.org)])
167 cp include/extlib.h include/neuro
168 cat include/extlib_sdl.h >> include/neuro/extlib.h
173 AC_CHECK_LIB(z, gzgetc,
174 [AC_DEFINE(USE_ZLIB, 1) LIBS="$LIBS -lz"],
175 [AC_MSG_ERROR(You don't have the Z library)])
181 AM_CONDITIONAL(USE_X11, test x$SELECTED_LOWLIB = xX11)
182 if test $SELECTED_LOWLIB = X11; then
185 LDFLAGS="$CFLAGS $X_LIBS"
186 CFLAGS="$CFLAGS $X_CFLAGS"
187 AC_CHECK_LIB(X11, XCreateGC,
188 [AC_DEFINE(USE_X11, 1) LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"],
189 [AC_MSG_ERROR(You don't have libX11)])
190 # LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"
191 # NEUROFLAGS="$NEUROFLAGS $X_CFLAGS"
192 AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
193 [LIBS="$LIBS -lXpm"],
194 [AC_MSG_ERROR(You don't have libXpm)])
198 cp include/extlib.h include/neuro
204 AC_CHECK_LIB(m, log10, , [AC_MSG_ERROR(You don't have libm -- math)])
210 if test x$freetype_enable = xyes; then
211 AC_CHECK_LIB(freetype, FT_New_Face,
212 [LIBS="$LIBS `freetype-config --libs`" CFLAGS="$CFLAGS `freetype-config --cflags`"],
213 [AC_MSG_ERROR(You don't have the libfreetype2 library you can get it from freetype.sourceforge.net)])
220 if test x$enable_Debug = xyes; then
221 #NEUROFLAGS="$NEUROFLAGS -g"
224 #NEUROFLAGS="$NEUROFLAGS -O2 -s"
225 CFLAGS="$CFLAGS -Os -s"
229 AC_SUBST(NEUROLIBFLAGS)
231 # set the installation path for the headers
232 includedir=$includedir/neuro
236 # enumerate the Makefiles to be created
247 #add those above when they are started
251 #src/sound/music/Makefile
255 #AC_MSG_NOTICE([This is the low library Neuro will use : $SELECTED_LOWLIB])
260 echo "This is the low library Neuro will use : $SELECTED_LOWLIB"