dnl Process this file with autoconf to produce a configure script. AC_INIT(smssend.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(smssend, 2.9) AM_MAINTAINER_MODE AM_PROG_LIBTOOL dnl Version of SkyUtils and function to search dnl When upgrading skyutils, replace LAST occurence of SU_VERSION in this file with REAL value, then autoconf, automake SU_VERSION="skyutils-1.15" SU_FUNCTION=SU_Dummy115 dnl Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET AC_ISC_POSIX if test "$GCC" = "yes" then CFLAGS="$CFLAGS -Wall" fi AC_ARG_ENABLE(debug, [ --enable-debug Enables debug option (default=no)], [case "${enableval}" in yes) debug=true ;; no) debug=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac],[debug=false]) if test "$debug" = "true"; then CFLAGS="$CFLAGS ""-DDEBUG " fi AC_ARG_ENABLE(dump, [ --enable-dump Enables dump option (default=no)], [case "${enableval}" in yes) dump=true ;; no) dump=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-dump) ;; esac],[dump=false]) if test "$dump" = "true"; then CFLAGS="$CFLAGS ""-DDUMP " fi AC_ARG_ENABLE(skyutils, [ --enable-skyutils Uses archive copy of skyutils (default=no)], [case "${enableval}" in yes) skyutils=true ;; no) skyutils=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-skyutils) ;; esac],[skyutils=false]) dnl Checks for libraries. if test "$skyutils" = "false"; then AC_CHECK_LIB(skyutils, $SU_FUNCTION,O_SKYUTILS_LIB="-lskyutils") fi dnl Check for SUN-OS AC_CHECK_LIB(socket, socket,O_SOCKET_LIB="-lsocket -lnsl") if test "$O_SOCKET_LIB"; then LIBS="$LIBS $O_SOCKET_LIB " fi if test ! "$O_SKYUTILS_LIB"; then AC_MSG_WARN("Using archive copy of skyutils") O_SKYUTILS_FLAGS="-I $SU_VERSION" AC_SUBST(O_SKYUTILS_FLAGS) O_SKYUTILS_LIB="$SU_VERSION/libskyutils.a" AC_SUBST(O_SKYUTILS_LIB) O_LIB_SKYUTILS="libskyutils.a" fi AC_SUBST(O_LIB_SKYUTILS) AC_SUBST(SU_VERSION) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_CHECK_FUNCS(mkdir strdup strstr select socket snprintf) LIBS="$LIBS $O_SKYUTILS_LIB" AC_OUTPUT([ skyutils-1.15/Makefile Makefile smssend.h scripts/Makefile lycos/Makefile docs/Makefile docs/en/Makefile docs/en/smssend.1 docs/en/smssend.scripting.1 docs/fr/Makefile docs/fr/smssend.1 docs/fr/smssend.scripting.1 ]) echo "" echo "*************************" echo "* Compilation options *" echo "*************************" if test "$debug" = "true"; then tmp="ON" else tmp="OFF" fi echo "Debug mode : $tmp" if test "$dump" = "true"; then tmp="ON" else tmp="OFF" fi echo "Dump mode : $tmp" echo echo