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])
111 AC_CHECK_HEADERS([unistd.h])
116 dnl --------- Checks -------------
119 dnl check for header files.
122 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h])
124 # Checks for typedefs, structures, and compiler characteristics.
130 # Checks for library functions.
132 AC_CHECK_FUNCS([gettimeofday memchr memset strchr])
137 if test x$enable_libxml2 = xyes; then
140 [NEUROFLAGS="$NEUROFLAGS -I/usr/include/libxml2 -I/usr/local/include/libxml2" NEUROLIBS="$NEUROLIBS -lxml2" LIBS="$LIBS -lxml2"] ,
141 AC_MSG_ERROR([You must have libxml2])
144 AM_CONDITIONAL(USE_XML, test x$enable_libxml2 = xyes)
147 dnl List of libraries Neuro can use
149 SELECTED_LOWLIB=`echo $lowlib`
155 AM_CONDITIONAL(USE_SDL, test x$SELECTED_LOWLIB = xsdl)
156 if test $SELECTED_LOWLIB = sdl; then
157 if test $targ = unix; then
158 AC_CHECK_LIB(SDL, SDL_Init,
159 [AC_DEFINE(USE_SDL, 1) LIBS="$LIBS $SDLFLAGS"
160 NEUROFLAGS="$NEUROFLAGS `sdl-config --cflags`"],
161 [AC_MSG_ERROR(You don't have libSDL you can get it from http://www.libsdl.org)
164 AC_CHECK_LIB(SDL, SDL_Init,
165 [AC_DEFINE(USE_SDL, 1) LIBS="$LIBS -lSDL"],
166 [AC_MSG_ERROR(You don't have libSDL you can get it from http://www.libsdl.org)
170 cp include/extlib.h include/neuro
171 cat include/extlib_sdl.h >> include/neuro/extlib.h
176 AC_CHECK_LIB(z, gzgetc,
177 [AC_DEFINE(USE_ZLIB, 1) LIBS="$LIBS -lz"],
178 [AC_MSG_ERROR(You don't have the Z library)])
184 AM_CONDITIONAL(USE_X11, test x$SELECTED_LOWLIB = xX11)
185 if test $SELECTED_LOWLIB = X11; then
188 #AC_CHECK_LIB(X11, XCopyArea,
189 # [AC_DEFINE(USE_X11, 1) LIBS="$LIBS -lX11"
190 # NEUROFLAGS="$NEUROFLAGS -L/usr/X11R6/lib -I/usr/X11R6/include"],
191 # [AC_MSG_ERROR(You don't have libX11)])
192 LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lXpm $X_EXTRA_LIBS"
193 NEUROFLAGS="$NEUROFLAGS $X_CFLAGS"
194 #AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
195 # [LIBS="$LIBS -lXpm"],
196 # [AC_MSG_ERROR(You don't have libXpm)])
197 cp include/extlib.h include/neuro
204 if test x$enable_Debug = xyes; then
205 NEUROFLAGS="$NEUROFLAGS -g"
207 NEUROFLAGS="$NEUROFLAGS -O2 -s"
211 AC_SUBST(NEUROLIBFLAGS)
213 # set the installation path for the headers
214 includedir=$includedir/neuro
218 # enumerate the Makefiles to be created
229 #add those above when they are started
233 #src/sound/music/Makefile
237 #AC_MSG_NOTICE([This is the low library Neuro will use : $SELECTED_LOWLIB])
242 echo "This is the low library Neuro will use : $SELECTED_LOWLIB"