dnl Process this file with autoconf to produce a configure script. AC_INIT(src/shout.c) AM_INIT_AUTOMAKE(libshout,2.0) AC_PROG_CC AM_PROG_LIBTOOL dnl Set some options based on environment if test -z "$GCC"; then case $host in *-*-irix*) DEBUG="-g -signed" CFLAGS="-O2 -w -signed" PROFILE="-p -g3 -O2 -signed" ;; sparc-sun-solaris*) DEBUG="-v -g" CFLAGS="-xO4 -fast -w -fsimple -native -xcg92" PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;; *) DEBUG="-g" CFLAGS="-O" PROFILE="-g -p" ;; esac else case $host in *-*-linux*) DEBUG="-g -Wall -W -fsigned-char -D_REENTRANT -D_GNU_SOURCE" CFLAGS="-Wall -W -O20 -ffast-math -fsigned-char -D_REENTRANT -D_GNU_SOURCE" PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char -D_REENTRANT -D_GNU_SOURCE" ;; sparc-sun-*) DEBUG="-g -Wall -fsigned-char -mv8" CFLAGS="-O20 -ffast-math -fsigned-char -mv8" PROFILE="-pg -g -O20 -fsigned-char -mv8" ;; *) DEBUG="-g -Wall -fsigned-char" CFLAGS="-O20 -fsigned-char" PROFILE="-O20 -g -pg -fsigned-char" ;; esac fi dnl Checks for programs. dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl Check for types AC_CHECK_HEADERS(stdint.h inttypes.h) AC_MSG_CHECKING(for C99 integer types) dnl This is from autoconf-2.50's AC_CHECK_TYPE macro AC_TRY_COMPILE([ #include #ifdef HAVE_STDINT_H # include #elif defined (HAVE_INTTYPES_H) # include #endif], [ if ((uint32_t *) 0) return 0; if (sizeof (uint32_t)) return 0; ], [ AC_DEFINE(HAVE_C99_INTTYPES, 1, [Define if you have the C99 integer types]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long long) ]) dnl Checks for library functions. dnl Make substitutions AC_SUBST(LIBTOOL_DEPS) AC_SUBST(OPT) AC_SUBST(LIBS) AC_SUBST(DEBUG) AC_SUBST(CFLAGS) AC_SUBST(PROFILE) AC_OUTPUT(Makefile include/Makefile include/shout/Makefile src/Makefile src/net/Makefile src/timing/Makefile src/thread/Makefile src/avl/Makefile src/httpp/Makefile examples/Makefile)