1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
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
|