Minor changes, mostly to documentation. Several bug fixes.
[xuni.git] / configure.ac
blob1c07d21818533a67d5ef906c981f18948c4bbb60
1 # Process this file with autoconf to produce a "configure" script.
3 AC_INIT(src/xuni.c)
5 PACKAGE=xuni
7 SVNVERSION='$(shell $(top_srcdir)/svnversion.sh)'
8 AC_SUBST(SVNVERSION)
9 VERSION='$(shell $(top_srcdir)/version.sh)'
10 DIST_FILES='$(shell $(top_srcdir)/dist_files.sh)'
12 if test -z "$DIST_FILES" -o "$DIST_FILES" == "  "; then
13     DIST_FILES=`find`
15 AC_SUBST(DIST_FILES)
17 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
19 AC_CONFIG_HEADER([src/config.h])
21 INITIAL_CFLAGS="-W -Wall -Wno-unused-parameter -ansi -pedantic \
22     -Wno-endif-labels -g -fPIC -DSVNVERSION='\"$SVNVERSION\"'"
23 AC_SUBST(INITIAL_CFLAGS)
25 # Find various programs
26 AC_PROG_CC
27 AC_PROG_RANLIB
28 AC_PROG_LEX
29 AC_PROG_YACC
30 AC_PROG_MAKE_SET
31 AC_PROG_INSTALL
33 # Test the C compiler
34 AC_LANG_C
36 # Check for required libraries
37 AC_CHECK_LIB([SDL], [SDL_Init])
38 AC_CHECK_LIB([SDL_gfx], [zoomSurface])
39 AC_CHECK_LIB([SDL_image], [IMG_Load])
40 AC_CHECK_LIB([SDL_ttf], [TTF_Init])
42 #AC_CHECK_LIB([SGE], [sge_transform_surface])
44 AC_CHECK_LIB([expat], [XML_ParserCreate])
45 AC_CHECK_LIB([mxml], [mxmlLoadFile])
47 # AC_CHECK_HEADER(SDL.h, , AC_MSG_ERROR(SDL 1.2 required))
49 SDL_CFLAGS=`sdl-config --cflags`
50 AC_SUBST(SDL_CFLAGS)
51 SDL_LIBS="`sdl-config --libs` -lSDL_image -lSDL_gfx -lSDL_ttf \
52     -lexpat -lmxml"
53 AC_SUBST(SDL_LIBS)
55 # Checks for C language features and supported data types
56 AC_C_CONST
57 AC_TYPE_SIZE_T
58 AC_STRUCT_TM
60 # Checks for required standard C functions
61 AC_FUNC_MALLOC
62 AC_FUNC_REALLOC
63 AC_FUNC_STRTOD
64 AC_FUNC_VPRINTF
65 AC_CHECK_FUNCS([memmove pow strchr strtol])
67 AM_CONDITIONAL(DYNAMIC_HANDLERS, test -z "")
69 if test -n ""; then
70     CONFIG_CFLAGS="-DLOADSO_STATIC_VERSION="
71 else
72     CONFIG_CFLAGS=""
74 AC_SUBST(CONFIG_CFLAGS)
76 # Read Makefile.in's and write Makefile's
77 AC_CONFIG_FILES([
78     Makefile
79     src/Makefile
80     src/editor/Makefile
81     src/resource/Makefile
82     src/test/Makefile
83     src/widget/Makefile])
85 AC_OUTPUT