r1273@mlap: muntyan | 2006-02-20 00:00:57 -0600

Cleaned up configure a bit
master
Yevgen Muntyan 2006-02-20 12:32:04 +00:00
parent 60374f71b9
commit 1b33fe6d3c
4 changed files with 104 additions and 123 deletions

View File

@ -12,22 +12,7 @@ AM_INIT_AUTOMAKE(libmoo, [moo_version])
AC_CANONICAL_HOST
AC_CONFIG_HEADERS(config.h)
MOO_VERSION=\"moo_version\"
MOO_VERSION_UNQUOTED=moo_version
MOO_VERSION_MAJOR=moo_major_version
MOO_VERSION_MINOR=moo_minor_version
MOO_VERSION_MICRO=moo_micro_version
AC_SUBST(MOO_VERSION)
AC_SUBST(MOO_VERSION_UNQUOTED)
AC_SUBST(MOO_VERSION_MAJOR)
AC_SUBST(MOO_VERSION_MINOR)
AC_SUBST(MOO_VERSION_MICRO)
AC_DEFINE(MOO_VERSION, ["moo_version"], "libmoo version")
AC_DEFINE(MOO_VERSION_MAJOR, [moo_major_version], "libmoo major version")
AC_DEFINE(MOO_VERSION_MINOR, [moo_minor_version], "libmoo minor version")
AC_DEFINE(MOO_VERSION_MICRO, [moo_micro_version], "libmoo micro version")
MOO_DEFINE_VERSIONS
AC_PROG_CC
AC_PROG_CC_STDC
@ -67,88 +52,10 @@ MOO_AC_PYGTK
MOO_AC_PCRE
################################################################################
# Components
#
AC_ARG_WITH([mooapp],
AC_HELP_STRING([--without-mooapp], [disable building mooapp]),
[build_mooapp=$withval],
[build_mooapp=yes]
)
AC_ARG_WITH([mooedit],
AC_HELP_STRING([--without-mooedit], [disable building mooedit]),
[build_mooedit=$withval],
[build_mooedit=yes]
)
AC_ARG_WITH([mooutils],
AC_HELP_STRING([--without-mooutils], [disable building mooutils]),
[build_mooutils=$withval],
[build_mooutils=yes]
)
AC_ARG_WITH([mooterm],
AC_HELP_STRING([--without-mooterm], [disable building mooterm]),
[build_mooterm=$withval],
[build_mooterm=yes]
)
# Components
MOO_COMPONENTS
if test x$MOO_OS_CYGWIN = "xyes"; then
build_mooutils="no"
build_mooedit="no"
build_mooapp="no"
fi
if test "x$build_mooapp" != "xno"; then
build_mooedit="yes"
fi
if test "x$build_mooedit" != "xno"; then
build_mooutils="yes"
fi
if test "x$build_mooterm" != "xno" -a x$MOO_OS_CYGWIN != "xyes"; then
build_mooutils="yes"
fi
AM_CONDITIONAL(MOO_BUILD_UTILS, test "x$build_mooutils" != "xno")
AM_CONDITIONAL(MOO_BUILD_EDIT, test "x$build_mooedit" != "xno")
AM_CONDITIONAL(MOO_BUILD_TERM, test "x$build_mooterm" != "xno")
AM_CONDITIONAL(MOO_BUILD_APP, test "x$build_mooapp" != "xno")
MOO_BUILD_UTILS=0
MOO_BUILD_EDIT=0
MOO_BUILD_TERM=0
MOO_BUILD_APP=0
MOO_BUILD_COMPS=
if test "x$build_mooutils" != "xno"; then
AC_DEFINE(MOO_BUILD_UTILS,, [build mooutils])
MOO_BUILD_UTILS=1
MOO_BUILD_COMPS="mooutils $MOO_BUILD_COMPS"
fi
if test "x$build_mooedit" != "xno"; then
AC_DEFINE(MOO_BUILD_EDIT,, [build mooedit])
MOO_BUILD_EDIT=1
MOO_BUILD_COMPS="mooedit $MOO_BUILD_COMPS"
fi
if test "x$build_mooterm" != "xno"; then
AC_DEFINE(MOO_BUILD_TERM,, [build mooterm])
MOO_BUILD_TERM=1
if test "x$MOO_OS_BSD" = "xyes"; then
MOO_LIBS="-lutil $MOO_LIBS"
fi
MOO_BUILD_COMPS="mooterm $MOO_BUILD_COMPS"
fi
if test "x$build_mooapp" != "xno"; then
AC_DEFINE(MOO_BUILD_APP,, [build mooapp])
MOO_BUILD_APP=1
MOO_BUILD_COMPS="mooapp $MOO_BUILD_COMPS"
fi
AC_SUBST(MOO_BUILD_UTILS)
AC_SUBST(MOO_BUILD_EDIT)
AC_SUBST(MOO_BUILD_TERM)
AC_SUBST(MOO_BUILD_APP)
moo_top_src_dir=`cd $srcdir && pwd`
moo_top_build_dir=`cd ./$ac_top_builddir && pwd`
MOO_CFLAGS="-I$moo_top_src_dir/moo $GTK_CFLAGS -DXDG_PREFIX=_moo_edit_xdg -DG_LOG_DOMAIN=\\\"Moo\\\" -D__MOO__ -DMOO_MARSHALS_H=\\\"mooutils/moomarshals.h\\\""
@ -209,7 +116,6 @@ AC_SUBST(MOO_PLUGINS_DIR)
AC_DEFINE_UNQUOTED(MOO_PLUGINS_DIR, "${mooprefix}/${moolibdir}/plugins", [plugins dir])
AM_CONDITIONAL(MOO_STANDALONE, true)
AM_CONDITIONAL(MOO_BUILD_LIB, false)

81
m4/moo-comps.m4 Normal file
View File

@ -0,0 +1,81 @@
##############################################################################
# MOO_COMPONENTS()
#
AC_DEFUN([MOO_COMPONENTS],[
AC_ARG_WITH([mooapp],
AC_HELP_STRING([--without-mooapp], [disable building mooapp]),
[build_mooapp=$withval],
[build_mooapp=yes]
)
AC_ARG_WITH([mooedit],
AC_HELP_STRING([--without-mooedit], [disable building mooedit]),
[build_mooedit=$withval],
[build_mooedit=yes]
)
AC_ARG_WITH([mooutils],
AC_HELP_STRING([--without-mooutils], [disable building mooutils]),
[build_mooutils=$withval],
[build_mooutils=yes]
)
AC_ARG_WITH([mooterm],
AC_HELP_STRING([--without-mooterm], [disable building mooterm]),
[build_mooterm=$withval],
[build_mooterm=yes]
)
if test x$MOO_OS_CYGWIN = "xyes"; then
build_mooutils="no"
build_mooedit="no"
build_mooapp="no"
fi
if test "x$build_mooapp" != "xno"; then
build_mooedit="yes"
fi
if test "x$build_mooedit" != "xno"; then
build_mooutils="yes"
fi
if test "x$build_mooterm" != "xno" -a x$MOO_OS_CYGWIN != "xyes"; then
build_mooutils="yes"
fi
AM_CONDITIONAL(MOO_BUILD_UTILS, test "x$build_mooutils" != "xno")
AM_CONDITIONAL(MOO_BUILD_EDIT, test "x$build_mooedit" != "xno")
AM_CONDITIONAL(MOO_BUILD_TERM, test "x$build_mooterm" != "xno")
AM_CONDITIONAL(MOO_BUILD_APP, test "x$build_mooapp" != "xno")
MOO_BUILD_UTILS=0
MOO_BUILD_EDIT=0
MOO_BUILD_TERM=0
MOO_BUILD_APP=0
MOO_BUILD_COMPS=
if test "x$build_mooutils" != "xno"; then
AC_DEFINE(MOO_BUILD_UTILS,, [build mooutils])
MOO_BUILD_UTILS=1
MOO_BUILD_COMPS="mooutils $MOO_BUILD_COMPS"
fi
if test "x$build_mooedit" != "xno"; then
AC_DEFINE(MOO_BUILD_EDIT,, [build mooedit])
MOO_BUILD_EDIT=1
MOO_BUILD_COMPS="mooedit $MOO_BUILD_COMPS"
fi
if test "x$build_mooterm" != "xno"; then
AC_DEFINE(MOO_BUILD_TERM,, [build mooterm])
MOO_BUILD_TERM=1
if test "x$MOO_OS_BSD" = "xyes"; then
MOO_LIBS="-lutil $MOO_LIBS"
fi
MOO_BUILD_COMPS="mooterm $MOO_BUILD_COMPS"
fi
if test "x$build_mooapp" != "xno"; then
AC_DEFINE(MOO_BUILD_APP,, [build mooapp])
MOO_BUILD_APP=1
MOO_BUILD_COMPS="mooapp $MOO_BUILD_COMPS"
fi
AC_SUBST(MOO_BUILD_UTILS)
AC_SUBST(MOO_BUILD_EDIT)
AC_SUBST(MOO_BUILD_TERM)
AC_SUBST(MOO_BUILD_APP)
])

20
m4/moo-version.m4 Normal file
View File

@ -0,0 +1,20 @@
##############################################################################
# MOO_DEFINE_VERSIONS()
#
AC_DEFUN([MOO_DEFINE_VERSIONS],[
MOO_VERSION=\"moo_version\"
MOO_VERSION_UNQUOTED=moo_version
MOO_VERSION_MAJOR=moo_major_version
MOO_VERSION_MINOR=moo_minor_version
MOO_VERSION_MICRO=moo_micro_version
AC_SUBST(MOO_VERSION)
AC_SUBST(MOO_VERSION_UNQUOTED)
AC_SUBST(MOO_VERSION_MAJOR)
AC_SUBST(MOO_VERSION_MINOR)
AC_SUBST(MOO_VERSION_MICRO)
AC_DEFINE(MOO_VERSION, ["moo_version"], "libmoo version")
AC_DEFINE(MOO_VERSION_MAJOR, [moo_major_version], "libmoo major version")
AC_DEFINE(MOO_VERSION_MINOR, [moo_minor_version], "libmoo minor version")
AC_DEFINE(MOO_VERSION_MICRO, [moo_micro_version], "libmoo micro version")
])

View File

@ -1,26 +0,0 @@
/*
* moo-config.h
*
* Copyright (C) 2004-2005 by Yevgen Muntyan <muntyan@math.tamu.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* See COPYING file that comes with this distribution.
*/
#ifndef __MOO_CONFIG_H__
#define __MOO_CONFIG_H__
#define MOO_VERSION @MOO_VERSION@
#define MOO_VERSION_UNQUOTED @MOO_VERSION_UNQUOTED@
#define MOO_API_VERSION "@MOO_API_VERSION@"
#define MOO_VERSION_MAJOR @MOO_VERSION_MAJOR@
#define MOO_VERSION_MINOR @MOO_VERSION_MINOR@
#define MOO_VERSION_MICRO @MOO_VERSION_MICRO@
#endif /* __MOO_CONFIG_H__ */