Properly clean up when comment decoding is interrupted.
[xiph/unicode.git] / icecast2yp / configure.in
blob79bcbd3b8ebbd26478c25eeff370d4d3eb248ac1
1 AC_INIT([icecast2_yp], [0.2.0], [icecast@xiph.org])
3 AC_CANONICAL_HOST
4 AC_PREREQ(2.54)
5 AC_CONFIG_SRCDIR(src/yp_cgi.c)
6 dnl Process this file with autoconf to produce a configure script.
8 AM_INIT_AUTOMAKE
9 AM_CONFIG_HEADER(config.h)
10 AM_MAINTAINER_MODE
12 AC_PROG_CC
13 AM_PROG_LIBTOOL
15 dnl Set some options based on environment
17 DEBUG="-g"
18 if test -z "$GCC"; then
19     XIPH_CPPFLAGS="-D_REENTRANT"
20     case $host in 
21         *-*-irix*)
22                 XIPH_CPPFLAGS="$XIPH_CPPFLAGS -w -signed"
23                 PROFILE="-p -g3 -O2 -signed -D_REENTRANT"
24                 ;;
25         *-*-solaris*)
26                 XIPH_CFLAGS="-xO4 -xcg92"
27                 XIPH_CPPFLAGS="$XIPH_CPPFLAGS -v -w -fsimple -fast"
28                 PROFILE="-xpg -g -Dsuncc"
29                 ;;
30         *)
31                 XIPH_CFLAGS="-O"
32                 PROFILE="-g -p"
33                 ;;
34     esac
36     case "$host" in
37         *openbsd* | *irix*)
38         ;;
39         *) AC_DEFINE([_XOPEN_SOURCE], 600, [Define if you have POSIX and XPG specifications])
40         ;;
41     esac
43 else
44     XIPH_CPPFLAGS="-Wall -ffast-math -fsigned-char"
45     PROFILE="-pg -g"
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.
54 AC_HEADER_STDC
56 dnl Checks for typedefs, structures, and compiler characteristics.
58 dnl Check for types
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))
70 OLDCFLAGS=${CFLAGS}
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}
76 CFLAGS=${OLDCFLAGS} 
79 LIBS="-L/usr/local/lib -L/usr/lib $LIBS -lcgi"
81 dnl Make substitutions
83 AC_SUBST(LIBTOOL_DEPS)
84 AC_SUBST(LIBS)
85 AC_SUBST(DEBUG)
86 AC_SUBST(CFLAGS)
87 AC_SUBST(XML_CFLAGS)
88 AC_SUBST(PROFILE)
90 AC_OUTPUT([Makefile src/Makefile sql/Makefile])