X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=configure.ac;h=ec02ff1bae715ff39ade7faf956b7965aff248fe;hp=36214e2eeb770ad6fd1dfd3db2b51ae7880831a6;hb=e59e35708b4ad66c99f908c5226cb232931e1791;hpb=2ecaa1f82dbf0731319fa917821d08f470133829 diff --git a/configure.ac b/configure.ac index 36214e2..ec02ff1 100644 --- a/configure.ac +++ b/configure.ac @@ -15,12 +15,12 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# major/minor/release must be numbers +# The major, minor, and release fields MUST be numbers. Packagers can +# add extra information using --with-extra="..." which may be any +# freeform string. m4_define([libguestfs_major], [1]) m4_define([libguestfs_minor], [13]) -m4_define([libguestfs_release], [4]) -# extra can be any string -m4_define([libguestfs_extra], []) +m4_define([libguestfs_release], [18]) AC_INIT([libguestfs],libguestfs_major.libguestfs_minor.libguestfs_release) AC_CONFIG_AUX_DIR([build-aux]) @@ -31,12 +31,6 @@ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. AC_CONFIG_MACRO_DIR([m4]) -dnl Split up the version string. -AC_DEFINE([PACKAGE_VERSION_MAJOR],[libguestfs_major],[Major version number]) -AC_DEFINE([PACKAGE_VERSION_MINOR],[libguestfs_minor],[Minor version number]) -AC_DEFINE([PACKAGE_VERSION_RELEASE],[libguestfs_release],[Release number]) -AC_DEFINE([PACKAGE_VERSION_EXTRA],["libguestfs_extra"],[Extra version string]) - dnl Stable or unstable version? AC_MSG_CHECKING([if this is a stable or unstable branch of libguestfs]) AS_IF([test "$((libguestfs_minor % 2))" -eq 0 ],[ @@ -53,12 +47,30 @@ please see the section "LIBGUESTFS VERSION NUMBERS" in guestfs(3). ***]) ]) +dnl Extra string, a freeform string defined by packagers. +AC_ARG_WITH([extra], + [AS_HELP_STRING([--with-extra], + [extra version string (for use by packagers)])], + [libguestfs_extra="$withval"], + [libguestfs_extra=] +) + +AC_MSG_NOTICE([libguestfs version libguestfs_major.libguestfs_minor.libguestfs_release$libguestfs_extra]) + +dnl Split up the version string. +AC_DEFINE([PACKAGE_VERSION_MAJOR],[libguestfs_major],[Major version number]) +AC_DEFINE([PACKAGE_VERSION_MINOR],[libguestfs_minor],[Minor version number]) +AC_DEFINE([PACKAGE_VERSION_RELEASE],[libguestfs_release],[Release number]) +AC_DEFINE_UNQUOTED([PACKAGE_VERSION_EXTRA],["$libguestfs_extra"],[Extra version string]) + dnl Early gnulib initialization. gl_EARLY gl_INIT AC_PROG_LIBTOOL +AC_PROG_SED + dnl Check for basic C environment. AC_PROG_CC_STDC AC_PROG_INSTALL @@ -647,11 +659,11 @@ AS_IF([test "x$enable_python" != "xno"], if test "x$PYTHON" != "xno"; then AC_MSG_CHECKING([Python prefix]) - PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"` + PYTHON_PREFIX=`$PYTHON -c "import sys; print (sys.prefix)"` AC_MSG_RESULT([$PYTHON_PREFIX]) AC_MSG_CHECKING([Python version]) - PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` + PYTHON_VERSION=`$PYTHON -c "import sys; print (sys.version[[0:3]])"` AC_MSG_RESULT([$PYTHON_VERSION]) AC_MSG_CHECKING([for Python include path]) @@ -874,6 +886,23 @@ AS_IF([test "x$enable_php" != "xno"], ]) AM_CONDITIONAL([HAVE_PHP], [test "x$PHP" != "xno" && test "x$PHPIZE" != "xno"]) +dnl Erlang +AC_ARG_ENABLE([erlang], + AS_HELP_STRING([--disable-erlang], [Disable Erlang language bindings]), + [], + [enable_erlang=yes]) +AS_IF([test "x$enable_erlang" != "xno"], + [ + AC_ERLANG_PATH_ERLC([no]) + + if test "x$ERLC" != "xno"; then + AC_ERLANG_CHECK_LIB([erl_interface], [], + [AC_MSG_FAILURE([Erlang erl_interface library not installed. Use --disable-erlang to disable.])]) + AC_ERLANG_SUBST_LIB_DIR + fi + ]) +AM_CONDITIONAL([HAVE_ERLANG], [test "x$ERLC" != "xno"]) + dnl Check for Perl modules needed by Perl virt tools (virt-df, etc.) AS_IF([test "x$PERL" != "xno"], [ @@ -909,7 +938,10 @@ AC_CONFIG_HEADERS([config.h]) dnl http://www.mail-archive.com/automake@gnu.org/msg10204.html AC_CONFIG_FILES([podwrapper.sh], [chmod +x podwrapper.sh]) +AC_CONFIG_FILES([run], + [chmod +x run]) AC_CONFIG_FILES([Makefile + align/Makefile appliance/Makefile capitests/Makefile cat/Makefile @@ -919,6 +951,8 @@ AC_CONFIG_FILES([Makefile debian/changelog df/Makefile edit/Makefile + erlang/Makefile + erlang/examples/Makefile examples/Makefile fish/Makefile fuse/Makefile @@ -950,6 +984,7 @@ AC_CONFIG_FILES([Makefile ruby/Makefile ruby/Rakefile ruby/examples/Makefile + sparsify/Makefile src/Makefile test-tool/Makefile tools/Makefile]) @@ -980,6 +1015,8 @@ echo -n "Haskell bindings .................... " if test "x$HAVE_HASKELL_TRUE" = "x"; then echo "yes"; else echo "no"; fi echo -n "PHP bindings ........................ " if test "x$HAVE_PHP_TRUE" = "x"; then echo "yes"; else echo "no"; fi +echo -n "Erlang bindings ..................... " +if test "x$HAVE_ERLANG_TRUE" = "x"; then echo "yes"; else echo "no"; fi echo "guestfish and C virt tools .......... yes" echo -n "Perl virt tools ..................... " if test "x$HAVE_TOOLS_TRUE" = "x"; then echo "yes"; else echo "no"; fi