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(libxml2, [ --enable-libxml2 enable the use of libxml2 for use with the xmltools [[default=yes]]], , enable_libxml2=yes)
74 AC_ARG_ENABLE(Debug, [ --enable-Debug enable the debugging of this program [[default=no]]], , enable_Debug=no)
77 [ --with-lowlib=<lowlib> the low library Neuro will use;]
78 [ only a single value is valid here;]
80 [ Possible low libraries are :]
82 lowlib="$withval", lowlib="sdl")
85 # host related checkings
87 AC_MSG_CHECKING([if we need -no-undefined])
89 *-*-cygwin | *-*-mingw* | *-*-pw32*)
90 NEUROFLAGS="$NEUROFLAGS -DWIN32"
91 NEUROLIBFLAGS="$NEUROLIBFLAGS -no-undefined"
94 #LIBS="$LIBS -lc -lgcc_s -ldl"
101 AC_MSG_RESULT($need_no_undefined)
102 AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
106 AC_CHECK_HEADERS([windows.h], , [AC_MSG_ERROR([the required header windows is missing.])])
107 #AC_CHECK_FUNCS([GetTickCount], , [AC_MSG_ERROR([a required function is missing.])])
114 AC_CHECK_HEADERS([unistd.h], , [AC_MSG_ERROR([the required header unistd is missing.])])
115 AC_CHECK_FUNCS([gettimeofday], , [AC_MSG_ERROR([a required function is missing.])])
119 dnl --------- Checks -------------
122 dnl check for header files.
125 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h], , [AC_MSG_ERROR([a required header is missing.])])
127 # Checks for typedefs, structures, and compiler characteristics.
133 # Checks for library functions.
135 AC_CHECK_FUNCS([memchr memset strchr], , [AC_MSG_ERROR([a required function is missing.])])
140 if test x$enable_libxml2 = xyes; then
143 [NEUROFLAGS="$NEUROFLAGS -I/usr/include/libxml2 -I/usr/local/include/libxml2" NEUROLIBS="$NEUROLIBS -lxml2" LIBS="$LIBS -lxml2"] ,
144 AC_MSG_ERROR([You must have libxml2])
147 AM_CONDITIONAL(USE_XML, test x$enable_libxml2 = xyes)
150 dnl List of libraries Neuro can use
152 SELECTED_LOWLIB=`echo $lowlib`
158 AM_CONDITIONAL(USE_SDL, test x$SELECTED_LOWLIB = xsdl)
159 if test $SELECTED_LOWLIB = sdl; then
160 if test $targ = unix; then
161 AC_CHECK_LIB(SDL, SDL_Init,
162 [AC_DEFINE(USE_SDL, 1) LIBS="$LIBS $SDLFLAGS"
163 NEUROFLAGS="$NEUROFLAGS `sdl-config --cflags`"],
164 [AC_MSG_ERROR(You don't have libSDL you can get it from http://www.libsdl.org)
169 AC_CHECK_LIB(SDL, SDL_Init,
170 [AC_DEFINE(USE_SDL, 1) LIBS="$LIBS -lSDL"],
171 [AC_MSG_ERROR(You don't have libSDL you can get it from http://www.libsdl.org)
177 AC_CHECK_LIB(SDL_ttf, TTF_RenderUNICODE_Solid, ,
178 [AC_MSG_ERROR(You don't have libSDL_ttf you can get it from http://libsdl.org)])
180 cp include/extlib.h include/neuro
181 cat include/extlib_sdl.h >> include/neuro/extlib.h
186 AC_CHECK_LIB(z, gzgetc,
187 [AC_DEFINE(USE_ZLIB, 1) LIBS="$LIBS -lz"],
188 [AC_MSG_ERROR(You don't have the Z library)])
194 AM_CONDITIONAL(USE_X11, test x$SELECTED_LOWLIB = xX11)
195 if test $SELECTED_LOWLIB = X11; then
198 LDFLAGS="$CFLAGS $X_LIBS"
199 CFLAGS="$CFLAGS $X_CFLAGS"
200 AC_CHECK_LIB(X11, XCreateGC,
201 [AC_DEFINE(USE_X11, 1) LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"],
202 [AC_MSG_ERROR(You don't have libX11)])
203 # LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"
204 # NEUROFLAGS="$NEUROFLAGS $X_CFLAGS"
205 AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
206 [LIBS="$LIBS -lXpm"],
207 [AC_MSG_ERROR(You don't have libXpm)])
208 cp include/extlib.h include/neuro
215 if test x$enable_Debug = xyes; then
216 NEUROFLAGS="$NEUROFLAGS -g"
218 NEUROFLAGS="$NEUROFLAGS -O2 -s"
222 AC_SUBST(NEUROLIBFLAGS)
224 # set the installation path for the headers
225 includedir=$includedir/neuro
229 # enumerate the Makefiles to be created
240 #add those above when they are started
244 #src/sound/music/Makefile
248 #AC_MSG_NOTICE([This is the low library Neuro will use : $SELECTED_LOWLIB])
253 echo "This is the low library Neuro will use : $SELECTED_LOWLIB"