diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 75 |
1 files changed, 29 insertions, 46 deletions
diff --git a/configure.ac b/configure.ac index 1f6ec61..da211d0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,16 +1,14 @@ #------------------------------------------------------------------------------- # Init #------------------------------------------------------------------------------- -AC_PREREQ(2.59) -AC_INIT([calcurse], - m4_esyscmd([build-aux/git-version-gen .version]), - [bugs@calcurse.org]) +AC_PREREQ([2.71]) +AC_INIT([calcurse],[m4_esyscmd(build-aux/git-version-gen .version)],[bugs@calcurse.org]) AM_INIT_AUTOMAKE #m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.14.1]) +AM_GNU_GETTEXT_VERSION([0.19.8]) AC_CONFIG_SRCDIR([src/calcurse.c]) -AC_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADERS([config.h]) #------------------------------------------------------------------------------- # Checks for system type #------------------------------------------------------------------------------- @@ -19,37 +17,22 @@ AC_CANONICAL_HOST # Checks for programs #------------------------------------------------------------------------------- AC_PROG_CC +AC_C_BIGENDIAN #------------------------------------------------------------------------------- # Checks for header files #------------------------------------------------------------------------------- -AC_HEADER_STDC AC_CHECK_HEADERS([ctype.h getopt.h locale.h math.h signal.h stdio.h stdlib.h \ string.h sys/stat.h sys/types.h sys/wait.h time.h unistd.h \ fcntl.h paths.h errno.h limits.h regex.h]) #------------------------------------------------------------------------------- # Checks for system libs #------------------------------------------------------------------------------- -AC_CHECK_FUNC(initscr,, -[ - available_ncurses="none" - for lib in ncursesw ncurses - do - AC_CHECK_LIB($lib, initscr, - [available_ncurses="$lib"; break]) - done - if test "$available_ncurses" = none; then - AC_MSG_ERROR(Either ncurses or ncursesw library is required to build calcurse!) - elif test "$available_ncurses" = ncursesw; then - AC_CHECK_HEADERS([ncursesw/ncurses.h],, - [AC_CHECK_HEADERS([ncurses.h],, - AC_MSG_ERROR([Missing ncursesw header file]))]) - else - AC_CHECK_HEADERS([ncurses/ncurses.h],, - [AC_CHECK_HEADERS([ncurses.h],, - AC_MSG_ERROR([Missing ncurses header file]))]) - fi - LIBS="$LIBS -l$available_ncurses" -]) +AX_WITH_CURSES +if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then + AC_MSG_ERROR(Either ncurses or ncursesw library is required to build calcurse!) +fi + +LIBS="$LIBS $CURSES_LIBS" AC_CHECK_HEADERS([pthread.h], [ AC_CHECK_LIB(pthread, pthread_create, [ @@ -76,7 +59,6 @@ AC_ARG_ENABLE(docs, [enabledocs=$enableval], [enabledocs=yes]) if test x"$enabledocs" != x"yes"; then enabledocs=no - AC_MSG_WARN([Skipping documentation!]) fi AC_MSG_CHECKING([whether to include documentation]) AC_MSG_RESULT($enabledocs) @@ -87,7 +69,21 @@ AC_ARG_WITH(asciidoc, [use AsciiDoc to regenerate documentation]), [use_asciidoc=$withval], [use_asciidoc="auto"]) -if test x"$use_asciidoc" = x"auto"; then +if test x"$enabledocs" = x"no" -o x"$use_asciidoc" = x"no"; then + AC_MSG_WARN([Will not rebuild documentation!]) + have_asciidoc=no + have_a2x=no +elif test x"$use_asciidoc" = x"yes"; then + AC_PATH_PROG([ASCIIDOC], [asciidoc]) + if test -z "$ASCIIDOC"; then + AC_MSG_ERROR([AsciiDoc not found and "--with-asciidoc" specified!]) + fi + AC_PATH_PROG([A2X], [a2x]) + if test -z "$A2X"; then + AC_MSG_ERROR([a2x not found and "--with-asciidoc" specified!]) + fi + have_asciidoc=yes +elif test x"$use_asciidoc" = x"auto"; then AC_PATH_PROG([ASCIIDOC], [asciidoc]) if test -z "$ASCIIDOC"; then have_asciidoc=no @@ -112,20 +108,6 @@ if test x"$use_asciidoc" = x"auto"; then else have_a2x=yes fi -elif test x"$use_asciidoc" = x"yes"; then - AC_PATH_PROG([ASCIIDOC], [asciidoc]) - if test -z "$ASCIIDOC"; then - AC_MSG_ERROR([AsciiDoc not found and "--with-asciidoc" specified!]) - fi - AC_PATH_PROG([A2X], [a2x]) - if test -z "$A2X"; then - AC_MSG_ERROR([a2x not found and "--with-asciidoc" specified!]) - fi - have_asciidoc=yes -elif test x"$use_asciidoc" = x"no"; then - AC_MSG_WARN([Will not rebuild documentation!]) - have_asciidoc=no - have_a2x=no fi AM_CONDITIONAL(HAVE_ASCIIDOC, test $have_asciidoc = yes) AM_CONDITIONAL(HAVE_A2X, test $have_a2x = yes) @@ -152,9 +134,10 @@ AM_CONDITIONAL(CALCURSE_MEMORY_DEBUG, test x$memdebug = xyes) #------------------------------------------------------------------------------- # Create Makefiles #------------------------------------------------------------------------------- -AC_OUTPUT(Makefile doc/Makefile src/Makefile test/Makefile \ +AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile test/Makefile \ scripts/Makefile po/Makefile.in po/Makefile \ - contrib/caldav/Makefile contrib/vdir/Makefile) + contrib/caldav/Makefile contrib/vdir/Makefile]) +AC_OUTPUT #------------------------------------------------------------------------------- # Summary #------------------------------------------------------------------------------- |