X-Git-Url: https://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=configure.in;h=827924ece39a81c893eea0c15b0901a027d624b1;hp=87ea3156704ac96f5d69a23989169cdb10a03f26;hb=c383a7c19fe5db4b7b7ec3b8b5bba21dda7ce3d1;hpb=833e1c7c90e13ceaba3dde8e7a36fcc8dfb1db3c diff --git a/configure.in b/configure.in index 87ea315..827924e 100644 --- a/configure.in +++ b/configure.in @@ -15,13 +15,20 @@ AC_CANONICAL_SYSTEM 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 +if test -z "$AS";then + AC_PATH_PROG(AS, as, no) +fi AC_PATH_PROG(RM, rm, no) AC_PATH_PROG(FIND, find, no) AC_CHECK_PROGS(MAKE, gmake make) @@ -30,9 +37,25 @@ AC_PROG_INSTALL 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" ] @@ -70,9 +93,9 @@ AC_ARG_WITH(libintl, ) 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 @@ -222,7 +245,7 @@ if test "x$PTHREAD_LIBS" = xerror; 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 @@ -444,8 +467,8 @@ LIBS="$LIBS $NLS_LIBS" 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 @@ -465,6 +488,8 @@ AC_CONFIG_HEADER(include/config.h) AC_SUBST(PACKAGE) AC_SUBST(VERSION) +AC_SUBST(AR) +AC_SUBST(AS) AC_SUBST(XVERSION) AC_SUBST(XPACKAGE) AC_SUBST(XGNOKIIDIR) @@ -482,7 +507,6 @@ AC_SUBST(USE_UNIX98PTYS) AC_SUBST(HAVE_XGNOKII) AC_OUTPUT( - include/config.h.in Makefile.global po/Makefile.in packaging/RedHat/gnokii.spec