dnl Process this file with autoconf to produce a configure script.
dnl
dnl current : the interface : MAJOR + MINOR
dnl revision : of the same interface : MICRO
dnl age : MINOR
dnl
dnl 1: when releasing a changed version : MICRO++
dnl 2: when the interface has changes (adding functions) : MINOR++, MICRO=0
dnl 3: when the interface has changes (removing functions) : MAJOR++, MINOR=0, MICRO=0
dnl
dnl Initialise the autoconf/automake tool
AC_INIT([gitk-renderer-phone],[0.0.1], [sast@users.sourceforge.net])
AC_CONFIG_SRCDIR([ChangeLog])
AM_CONFIG_HEADER(config.h)
LIBGITK_RENDERER_PHONE_MAJOR_VERSION=0
LIBGITK_RENDERER_PHONE_MINOR_VERSION=0
LIBGITK_RENDERER_PHONE_MICRO_VERSION=1
LIBGITK_RENDERER_PHONE_VERSION=$LIBGITK_RENDERER_PHONE_MAJOR_VERSION.$LIBGITK_RENDERER_PHONE_MINOR_VERSION.$LIBGITK_RENDERER_PHONE_MICRO_VERSION
LIBGITK_RENDERER_PHONE_VERSION_INFO=`expr $LIBGITK_RENDERER_PHONE_MAJOR_VERSION + $LIBGITK_RENDERER_PHONE_MINOR_VERSION`:$LIBGITK_RENDERER_PHONE_MICRO_VERSION:$LIBGITK_MINOR_VERSION
LIBGITK_RENDERER_PHONE_VERSION_NUMBER=`expr $LIBGITK_RENDERER_PHONE_MAJOR_VERSION \* 10000 + $LIBGITK_RENDERER_PHONE_MINOR_VERSION \* 100 + $LIBGITK_RENDERER_PHONE_MICRO_VERSION`
AC_SUBST(LIBGITK_RENDERER_PHONE_MAJOR_VERSION)
AC_SUBST(LIBGITK_RENDERER_PHONE_MINOR_VERSION)
AC_SUBST(LIBGITK_RENDERER_PHONE_MICRO_VERSION)
AC_SUBST(LIBGITK_RENDERER_PHONE_VERSION)
AC_SUBST(LIBGITK_RENDERER_PHONE_VERSION_INFO)
AC_SUBST(LIBGITK_RENDERER_PHONE_VERSION_NUMBER)
VERSION=${LIBGITK_RENDERER_PHONE_VERSION}
dnl Initialise the automake tool
AM_INIT_AUTOMAKE([check-news])
dnl i18n
ALL_LINGUAS="de en_GB"
localedir='${datadir}/locale'
AC_SUBST(localedir)
dnl Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_ISC_POSIX
AC_PROG_LIBTOOL
AM_PROG_CC_STDC
dnl Initialize gettext
AM_GNU_GETTEXT([external],[need-ngettext])
AM_GNU_GETTEXT_VERSION(0.12.1)
dnl enable runtime debugging code
AC_MSG_CHECKING(whether to use runtime debugging code)
AC_ARG_ENABLE(
debug,
AC_HELP_STRING([--enable-debug],[use runtime debugging code (default=no)]),
,
[enable_debug="no"])
AC_MSG_RESULT($enable_debug)
if test "$enable_debug" = "yes"; then
AC_DEFINE(APP_DEBUG, [1], [enable runtime debugging code (optional, default=no)])
else
AC_DEFINE(G_DISABLE_ASSERT, [1], [if no runtime debugging, don not enable g_asserts])
fi
dnl enable ansi colored reports
AC_MSG_CHECKING(whether to use ansi-colored reports)
AC_ARG_ENABLE(
ansi_color,
AC_HELP_STRING([--enable-ansi-color],[use ansi colored reports (optional, default=yes)]),
,
[enable_ansi_color="yes"])
AC_MSG_RESULT($enable_ansi_color)
if test "$enable_ansi_color" = "yes"; then
AC_DEFINE(USE_ANSI_COLOR, [1], [enable ansi colored reports])
fi
dnl enable festival speech output
dnl eigendlich muss das Ding immer 1 sein
AC_MSG_CHECKING(wheter to use festival)
AC_ARG_ENABLE(
speech_festival,
AC_HELP_STRING([--enable-speech-festival],[compile with festival speech-output (optional, default=yes)]),
,
[enable_speech_festival="yes"])
AC_MSG_RESULT($enable_speech_festival)
if test "$enable_speech_festival" = "yes"; then
AC_DEFINE(HAVE_SPEECH, [1], [enable speech output])
AC_DEFINE(USE_SPEECH_FESTIVAL, [1], [enable speech output with festival])
fi
dnl enable capi TODO
dnl AC_CHECK_HEADERS(capi20.h)
dnl if test "$with-libcapi20" = "yes"; then
dnl AC_DEFINE(HAVE_CAPI20, [1], [enable isdn in/out])
dnl fi
##################################
AC_MSG_CHECKING(wheter to use capi20)
search_libcapi20=false
AC_ARG_WITH(libcapi20,
AC_HELP_STRING([--with-libcapi20=PFX],[enable capi using over libcapi20 base dir (optional)]),
[if test x$withval = xyes
then
search_libcapi20=true
AC_DEFINE(HAVE_CAPI20, [1], [enable isdn in/out])
else
if test x$withval = x
then
AC_MSG_RESULT([not used])
else
AC_MSG_RESULT([use libcapi on $withval])
LIBCAPI20_LIBS="-L$withval/lib -lcapi20"
LIBCAPI20_CFLAGS="-I$withval/include"
search_libcapi20=false
AC_DEFINE(USE_LIBCAPI20, [1], [Define if you have libcapi20])
AC_DEFINE(HAVE_CAPI20, [1], [enable isdn in/out])
fi
fi
],AC_MSG_RESULT([not used])
)
if $search_libcapi20
then
LIBCAPI20_LIBS=""
LIBCAPI20_CFLAGS=""
dnl Parameters: directory filename LIBCAPI20_LIBS_append LIBCAPI20_CFLAGS_append nicename
AC_DEFUN([AC_CHECK_LIBCAPI20], [
if $search_libcapi20
then
if test -f $1/$2
then
AC_MSG_RESULT([found libcapi20 on $1/$2])
LIBCAPI20_LIBS="$LIBCAPI20_LIBS $3"
LIBCAPI20_CFLAGS="$LIBCAPI20_CFLAGS $4"
search_libcapi20=false
AC_DEFINE(USE_LIBCAPI20)
fi
fi
])
AC_MSG_CHECKING(location of capi20.h file)
AC_CHECK_LIBCAPI20(/usr/include, capi20.h, -lcapi20,, "libcapi20 on /usr")
AC_CHECK_LIBCAPI20(/usr/local/include, capi20.h, -L/usr/local/lib -lcapi20, -I/usr/local/include, "libcapi20 on /usr/local")
AC_CHECK_LIBCAPI20(/opt/include, capi20.h, -L/opt/lib -lcapi20, -I/opt/include, "libcapi20 on /opt")
if $search_libcapi20
then
AC_MSG_RESULT([not found])
fi
fi
AC_SUBST(LIBCAPI20_LIBS)
AC_SUBST(LIBCAPI20_CFLAGS)
##################################
dnl specify which ncurses installation to use
AC_MSG_CHECKING(which curses incarnation to use)
search_ncurses=true
AC_ARG_WITH(ncurses,
AC_HELP_STRING([--with-ncurses=PFX],[compile with ncurses/locate base dir (optional)]),
[if test x$withval = xyes
then
search_ncurses=true
else
if test x$withval = x
then
AC_MSG_RESULT([not used])
else
AC_MSG_RESULT([use ncurses on $withval])
CURSES_LIBS="-L$withval/lib -lncurses"
CURSES_CFLAGS="-I$withval/include"
search_ncurses=false
AC_DEFINE(USE_NCURSES, [1], [Define if you have ncurses ?])
fi
fi
],AC_MSG_RESULT([not used])
)
if $search_ncurses
then
CURSES_LIBS=""
CURSES_CFLAGS=""
dnl Parameters: directory filename CURSES_LIBS_append CURSES_CFLAGS_append nicename
AC_DEFUN([AC_CHECK_NCURSES], [
if $search_ncurses
then
if test -f $1/$2
then
AC_MSG_RESULT([found ncurses on $1/$2])
CURSES_LIBS="$CURSES_LIBS $3"
CURSES_CFLAGS="$CURSES_CFLAGS $4"
search_ncurses=false
AC_DEFINE(USE_NCURSES)
fi
fi
])
AC_MSG_CHECKING(location of ncurses.h file)
AC_CHECK_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include")
AC_CHECK_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses")
AC_CHECK_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local/include")
AC_CHECK_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses")
AC_CHECK_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses")
AC_CHECK_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses")
if $search_ncurses
then
AC_MSG_RESULT([not found])
fi
fi
AC_SUBST(CURSES_LIBS)
AC_SUBST(CURSES_CFLAGS)
dnl Checks for libraries.
dnl AM_PATH_GLIB(1.3.13,,AC_MSG_ERROR(glib not found or too old),gmodule)
dnl AM_PATH_XML2(2.4.0,,AC_MSG_ERROR(libxml2 not found or too old))
dnl AM_PATH_GITK(0.0.1,,AC_MSG_ERROR(libgitk not found or too old))
PKG_CHECK_MODULES(BASE_DEPS, libgitk >= 0.0.1 glib-2.0 >= 1.3.13 libxml-2.0 >= 2.4.0)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(X11/Xlocale.h)
dnl AC_CHECK_HEADERS(sys/ioctl.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AM_C_PROTOTYPES
test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)
AC_C_CONST
dnl Checks for library functions.
dnl Extra vars
GITK_RENDERER_PHONE_CFLAGS=""
GITK_RENDERER_PHONE_LIBDIR='-L${libdir}'
GITK_RENDERER_PHONE_LIBS="-lm $LIBS"
GITK_RENDERER_PHONE_INCLUDEDIR='-I${includedir}'
dnl Substitutes
AC_SUBST(GITK_RENDERER_PHONE_CFLAGS)
AC_SUBST(GITK_RENDERER_PHONE_LIBDIR)
AC_SUBST(GITK_RENDERER_PHONE_LIBS)
AC_SUBST(GITK_RENDERER_PHONE_INCLUDEDIR)
AC_SUBST(BASE_DEPS_LIBS)
AC_SUBST(BASE_DEPS_CFLAGS)
dnl What files to output
AC_CONFIG_FILES(Makefile gitkr-phoneConf.sh \
tests/Makefile po/Makefile.in \
)
AC_OUTPUT