1 AC_INIT([icecast2_yp], [0.2.0], [icecast@xiph.org])
5 AC_CONFIG_SRCDIR(src/yp_cgi.c)
6 dnl Process this file with autoconf to produce a configure script.
9 AM_CONFIG_HEADER(config.h)
15 dnl Set some options based on environment
18 if test -z "$GCC"; then
19 XIPH_CPPFLAGS="-D_REENTRANT"
22 XIPH_CPPFLAGS="$XIPH_CPPFLAGS -w -signed"
23 PROFILE="-p -g3 -O2 -signed -D_REENTRANT"
26 XIPH_CFLAGS="-xO4 -xcg92"
27 XIPH_CPPFLAGS="$XIPH_CPPFLAGS -v -w -fsimple -fast"
28 PROFILE="-xpg -g -Dsuncc"
39 *) AC_DEFINE([_XOPEN_SOURCE], 600, [Define if you have POSIX and XPG specifications])
44 XIPH_CPPFLAGS="-Wall -ffast-math -fsigned-char"
46 AC_DEFINE([_GNU_SOURCE], 1, [Define to include GNU extensions to POSIX])
49 dnl Checks for programs.
51 dnl Checks for libraries.
53 dnl Checks for header files.
56 dnl Checks for typedefs, structures, and compiler characteristics.
60 dnl Checks for library functions.
62 dnl -- configure options --
64 AM_PATH_MYSQL(, , AC_MSG_ERROR(Cannot find mysql client library))
65 AM_PATH_XML2(, , AC_MSG_ERROR(Cannot find libxml2))
67 #CFLAGS="$CFLAGS -I/usr/include/libcgi -I${prefix}/include"
68 #LIBS="-L${prefix}/lib $LIBS -lcgi"
69 #AC_CHECK_HEADERS(cgi.h,CFLAGS="$CFLAGS -I${prefix}/include" LIBS="-L${prefix}/lib $LIBS -lcgi",AC_MSG_ERROR(Cannot find libcgi))
71 OLDCPPFLAGS=${CPPFLAGS}
72 CFLAGS="${CFLAGS} -I/usr/include/libcgi -I$prefix/include"
73 CPPFLAGS="${CPPFLAGS} -I$prefix/include"
74 AC_CHECK_HEADERS(cgi.h,,AC_MSG_ERROR(Cannot find libcgi))
75 CPPFLAGS=${OLDCPPFLAGS}
79 LIBS="-L/usr/local/lib -L/usr/lib $LIBS -lcgi"
81 dnl Make substitutions
83 AC_SUBST(LIBTOOL_DEPS)
90 AC_OUTPUT([Makefile src/Makefile sql/Makefile])