AC_PREFIX_DEFAULT("/usr/local")
dnl ======================== Default setting
-CFLAGS="-O2 -Wall"
+test -n "$CFLAGS" || export CFLAGS="-O2 -Wall"
ALL_LINGUAS="cs de et fi nl sk pl it"
dnl ======================== Checks for programs.
AC_PROG_CC
+AC_LANG_C
AC_PROG_CPP
AC_PROG_LEX
+if test -z "$AR";then
+ AC_PATH_PROG(AR, ar, no)
+fi
AC_PATH_PROG(RM, rm, no)
AC_PATH_PROG(FIND, find, no)
AC_CHECK_PROGS(MAKE, gmake make)
dnl Let us have $prefix variable aviable here
test x"$prefix" = xNONE && prefix="$ac_default_prefix"
+AC_ARG_WITH(cfg_model,
+ [ --with-cfg-model=5110 specifies the mobile phone model],,
+ [ with_cfg_model="5110" ])
+AC_DEFINE_UNQUOTED(CONFIG_CFG_MODEL, "$with_cfg_model")
+AC_ARG_WITH(cfg_port,
+ [ --with-cfg-port=/dev/ttyS0 specifies the mobile phone port],,
+ [ with_cfg_port="/dev/ttyS0" ])
+AC_DEFINE_UNQUOTED(CONFIG_CFG_PORT, "$with_cfg_port")
+AC_ARG_WITH(cfg_initlength,
+ [ --with-cfg-initlength=default specifies the mobile phone initlength],,
+ [ with_cfg_initlength="default" ])
+AC_DEFINE_UNQUOTED(CONFIG_CFG_INITLENGTH, "$with_cfg_initlength")
+
AC_ARG_ENABLE(debug,
[ --enable-debug compile with debug code],
- [ CFLAGS="-g -Wall"
+ [
+changequote({,})dnl
+ CFLAGS="-ggdb3 `echo " $CFLAGS "|sed 's/ -O[0-9]* / /g'`" #CFLAGS="-g -Wall"
+changequote([,])dnl
AC_DEFINE(DEBUG)
debug="yes" ],
[ debug="no" ]
)
AC_ARG_ENABLE(nls,
- [ --disable-nls do not use NLS],
+ [ --enable-nls force use of NLS],
[ USE_NLS=$enableval ],
- [ USE_NLS=yes ]
+ [ USE_NLS=no ]
)
if test "$USE_NLS" = "yes"; then
fi
dnl FIXME: do we really test here if libc contains this function?
-if test "x$PTHREAD_LIBS" = xerror; then
+if test "x$PTHREAD_LIBS" = xerror -a "x$cross_compiling" = xno; then
AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="",
AC_MSG_ERROR(not found library: pthread !!!))
fi
PACKAGE=gnokii
XPACKAGE=xgnokii
-VERSION=`cat VERSION`
-XVERSION=`cat xgnokii/VERSION`
+AC_DEFINE_UNQUOTED(VERSION, "`cat VERSION`")
+AC_DEFINE_UNQUOTED(XVERSION, "`cat xgnokii/VERSION`")
HAVE_XGNOKII=$x_support
case "$INSTALL" in
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
+AC_SUBST(AR)
AC_SUBST(XVERSION)
AC_SUBST(XPACKAGE)
AC_SUBST(XGNOKIIDIR)
AC_SUBST(HAVE_XGNOKII)
AC_OUTPUT(
- include/config.h.in
Makefile.global
po/Makefile.in
packaging/RedHat/gnokii.spec