dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.am)

AM_INIT_AUTOMAKE(libmodplug, 0.7)
AM_CONFIG_HEADER(src/config.h)

dnl Checks for programs.
dnl  I am disabling static libraries here because otherwise libtool insists on
dnl  compiling everything twice -- once with and once without -fPIC.  Pisses me
dnl  off.  Just do everything with -fPIC, damnit!  Compiling everything twice
dnl  probably wastes more cycles than not using -fPIC saves.
AC_DISABLE_STATIC
AM_DISABLE_STATIC
AC_PROG_CC
AC_PROG_CXX
AC_C_BIGENDIAN     #this will cause problems when cross-compiling...
AM_PROG_LIBTOOL
AC_HEADER_STDC

CXXFLAGS="$CXXFLAGS -fno-exceptions -Wall -ffast-math -D_REENTRANT"
# CXXFLAGS="-fno-exceptions -g -Wall -ffast-math -D_REENTRANT `glib-config --cflags`"

case ${target_os} in
	*sun* | *solaris*)
		CXXFLAGS="$CXXFLAGS -fpermissive"
		;;
esac

AC_OUTPUT(Makefile
          src/Makefile
	  libmodplug.pc)
