Commit 847107c6 authored by Javier Jardón's avatar Javier Jardón

Modernize autotools configuration a bit

Replace all obsolete macros. New requirements:
- autoconf >= 2.64
parent b4a6d65d
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_PREREQ([2.64])
m4_define(anjuta_major_version, 2)
m4_define(anjuta_minor_version, 32)
......@@ -8,8 +8,16 @@ m4_define(anjuta_micro_version, 0)
m4_define(anjuta_nano_version, 0)
m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version.anjuta_nano_version)
AC_INIT(anjuta, anjuta_version, http://bugzilla.gnome.org/enter_bug.cgi?product=anjuta)
AC_CONFIG_SRCDIR(src/main.c)
AC_INIT([anjuta],
[anjuta_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=anjuta],
[anjuta],
[http://www.anjuta.org/])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_MACRO_DIR([m4])
AC_DEFINE(ANJUTA_MAJOR_VERSION, anjuta_major_version, [Anjuta major version])
AC_SUBST(ANJUTA_MAJOR_VERSION, anjuta_major_version)
......@@ -62,26 +70,23 @@ SVN_PATCH=0
SUBVERSION_REQUIRED=$SVN_MAJOR.$SVN_MINOR.$SVN_PATCH
AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-dist-gzip])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS(config.h)
AC_DISABLE_STATIC
AM_MAINTAINER_MODE
GNOME_DOC_INIT
dnl Check for C Compiler
AC_PROG_CC
AC_PROG_CPP
AC_LANG_C
AC_PROG_CXX
AM_PROG_CC_C_O
GNOME_COMPILE_WARNINGS(maximum)
GNOME_COMPILE_WARNINGS([maximum])
AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS"
dnl Enable debugging mode
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],[Enable debug messages]),
AS_HELP_STRING([--enable-debug],[Enable debug messages]),
[if test "x$enableval" = "xyes"; then
AM_CFLAGS="$AM_CFLAGS -DDEBUG"
fi]
......@@ -102,7 +107,7 @@ dnl fi
dnl Enable versioned user preferences directory
AC_ARG_WITH(pref-suffix,
AC_HELP_STRING([--with-pref-suffix=VALUE],[Suffix to add to user preferences dir.]),
AS_HELP_STRING([--with-pref-suffix=VALUE],[Suffix to add to user preferences dir.]),
PREF_SUFFIX="$withval")
AC_SUBST(PREF_SUFFIX)
......@@ -110,10 +115,11 @@ AC_DEFINE_UNQUOTED(PREF_SUFFIX,
"${PREF_SUFFIX}",
[Suffix to add to preferences directory])
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
# Initialize libtool
LT_PREREQ([2.2])
LT_INIT([disable-static])
AC_TYPE_SIGNAL
dnl ***************************************************************************
dnl Check for GConf stuff to handle schema installation
......@@ -191,7 +197,7 @@ dnl Check for Devhelp
dnl -----------------
AC_ARG_ENABLE(plugin-devhelp,
AC_HELP_STRING([--disable-plugin-devhelp],[Disable devhelp plugin support in Anjuta.]),
AS_HELP_STRING([--disable-plugin-devhelp],[Disable devhelp plugin support in Anjuta.]),
[ if test "$enableval" = "no"; then
user_disabled_devhelp=1
fi ],
......@@ -218,7 +224,7 @@ dnl Check for Glade3
dnl ---------------------
AC_ARG_ENABLE(plugin-glade,
AC_HELP_STRING([--disable-plugin-glade],[Disable glade plugin support in Anjuta.]),
AS_HELP_STRING([--disable-plugin-glade],[Disable glade plugin support in Anjuta.]),
[ if test "$enableval" = "no"; then
user_disabled_glade=1
fi ],
......@@ -245,7 +251,7 @@ dnl Check for gtksourceview
dnl -------------------------------------------------------------
AC_ARG_ENABLE(plugin-sourceview,
AC_HELP_STRING([--disable-plugin-sourceview],[Disable gtksourceview based editor in Anjuta]),
AS_HELP_STRING([--disable-plugin-sourceview],[Disable gtksourceview based editor in Anjuta]),
[ if test "$enableval" = "no"; then
user_disabled_sourceview=1
fi ],
......@@ -374,6 +380,11 @@ dnl Check for gtk-doc.
dnl ***************************************************************************
GTK_DOC_CHECK([1.4])
dnl ***************************************************************************
dnl User manual
dnl ***************************************************************************
GNOME_DOC_INIT([0.18])
dnl Define convenience macros
dnl -------------------------
dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
......@@ -400,9 +411,14 @@ AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Disable cygwin check until someone fixes that stupid autoconf warnings.
dnl AC_CYGWIN
dnl AC_MINGW
AC_CANONICAL_HOST
CYGWIN=no
MINGW32=no
case $host_os in
*cygwin* ) CYGWIN=yes;;
*mingw32* ) MINGW32=yes;;
esac
AC_C_CONST
AC_OBJEXT
......@@ -432,12 +448,13 @@ CHECK_HEADER_DEFINE(INT_MAX, limits.h,,
AC_DEFINE(INT_MAX, MAXINT, [Maximum int size]), AC_DEFINE(INT_MAX, 32767, [Maximum int size])))
AC_MSG_CHECKING(if struct stat contains st_ino)
AC_TRY_COMPILE([#include <sys/stat.h>], [
AC_LANG([C])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[
struct stat st;
stat(".", &st);
if (st.st_ino > 0)
exit(0);
], have_st_ino=yes, have_st_ino=no)
]])],[have_st_ino=yes],[have_st_ino=no])
AC_MSG_RESULT($have_st_ino)
if test yes = "$have_st_ino"; then
AC_DEFINE(HAVE_STAT_ST_INO,,[Have stat st_ino])
......@@ -534,7 +551,7 @@ if test `uname -s` = "FreeBSD" ; then
AC_SUBST(FREEBSD_BUILD)
AC_PATH_PROG(GMAKE, gmake, no)
if test "x$GMAKE" = "xno"; then
AC_ERROR(You need gmake installed to build Anjuta!)
AC_MSG_ERROR(You need gmake installed to build Anjuta!)
fi
else
AC_MSG_RESULT(no)
......@@ -545,7 +562,7 @@ AC_SUBST(GMAKE)
dnl Checks for missing prototypes
dnl -----------------------------
AC_CHECKING("for missing prototypes")
AC_MSG_NOTICE([checking for missing prototypes...])
AC_DEFUN([CHECK_PROTO], [AC_EGREP_HEADER([[^A-Za-z0-9_]$1([ ]+[A-Za-z0-9_]*)?\(], $2,, AC_DEFINE(patsubst([NEED_PROTO_NAME], [NAME], translit($1, [a-z], [A-Z])),,[Do not know]) AC_MSG_RESULT(adding prototype for $1))])
......@@ -575,7 +592,7 @@ dnl **********************************************************
AC_MSG_CHECKING(for Subversion svn-config)
AC_ARG_WITH(subversion-dir,
AC_HELP_STRING([--with-subversion-dir=DIR],[Where Subversion is installed ]),
AS_HELP_STRING([--with-subversion-dir=DIR],[Where Subversion is installed ]),
[
SVNCONFIG="$withval/bin/svn-config"
])
......@@ -654,7 +671,7 @@ dnl FIXME: This should actually be done by subversion and not by us.
dnl ******************************************************************
AC_ARG_ENABLE(plugin-subversion,
AC_HELP_STRING([--disable-plugin-subversion],[Disable subversion support in Anjuta.]),
AS_HELP_STRING([--disable-plugin-subversion],[Disable subversion support in Anjuta.]),
[ if test "$enableval" = "no"; then
user_disabled_subversion=1
fi ],
......@@ -703,7 +720,7 @@ if test -n "$SVN_INCLUDE" ; then
dnl Make sure our SVN version is high enough
dnl Eww, eww, eww, this is dirty
AC_MSG_CHECKING([for subversion >= $SUBVERSION_REQUIRED])
AC_LANG(C)
AC_LANG([C])
dnl Temporarily set CFLAGS so that include dirs are found
CFLAGS_TMP=$CFLAGS
CFLAGS="-I$SVN_INCLUDE $APR_CFLAGS"
......@@ -748,7 +765,7 @@ SYMBOL_DB_SHM="/dev/shm"
user_specified_shm=0
AC_MSG_CHECKING(for symbol-db shared memory)
AC_ARG_WITH(symbol-db-shm,
AC_HELP_STRING([--with-symbol-db-shm=DIR],[Where shared memory is placed ]),
AS_HELP_STRING([--with-symbol-db-shm=DIR],[Where shared memory is placed ]),
[
user_specified_shm=1
SYMBOL_DB_SHM="$withval"
......@@ -764,7 +781,7 @@ AC_SUBST(SYMBOL_DB_SHM)
dnl Check for graphviz (class inheritance and profiler plugins)
AC_ARG_ENABLE(graphviz,
AC_HELP_STRING([--disable-graphviz],[Disable GraphViz support in Anjuta]),
AS_HELP_STRING([--disable-graphviz],[Disable GraphViz support in Anjuta]),
[ if test "$enableval" = "no"; then
user_disabled_graphviz=1
fi ],
......@@ -784,7 +801,7 @@ fi
AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
AC_OUTPUT([
AC_CONFIG_FILES([
Makefile
po/Makefile.in
libfoocanvas/Makefile
......@@ -924,6 +941,7 @@ manuals/anjuta-faqs/Makefile
manuals/anjuta-build-tutorial/Makefile
mime/Makefile
])
AC_OUTPUT
chmod +x ${ac_top_build_dir}plugins/gbf-am/gbf-am-parse
chmod +x ${ac_top_build_dir}plugins/gbf-mkfile/gbf-mkfile-parse
echo " "
......
codeset.m4
file.txt
gettext.m4
glibc21.m4
glibc2.m4
gtk-doc.m4
iconv.m4
intdiv0.m4
intldir.m4
intl.m4
intlmacosx.m4
intmax.m4
inttypes_h.m4
inttypes-pri.m4
lcmessage.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
libtool.m4
lock.m4
longlong.m4
lt~obsolete.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
nls.m4
po.m4
printf-posix.m4
progtest.m4
size_max.m4
stdint_h.m4
uintmax_t.m4
visibility.m4
wchar_t.m4
wint_t.m4
xsize.m4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment