Commit 572d5908 authored by Iñigo Martínez's avatar Iñigo Martínez

build: Remove autotools

To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=792699
parent 7f5a50cb
SUBDIRS = libgit2-glib docs examples tests
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgit2-glib-1.0.pc
EXTRA_DIST=libgit2-glib-1.0.pc.in
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
dist-hook:
@if test -d "$(srcdir)/.git"; \
then \
echo Creating ChangeLog && \
(GIT_DIR=$(top_srcdir)/.git \
./missing --run git log --stat -M -C --name-status --date=short --no-color) | \
fmt --split-only > ChangeLog.tmp \
&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
|| ( rm -f ChangeLog.tmp ; \
echo Failed to generate ChangeLog >&2 ); \
else \
echo A git clone is required to generate a ChangeLog >&2; \
fi
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
olddir=`pwd`
cd $srcdir
(test -f configure.ac) || {
echo "*** ERROR: Directory "\`$srcdir\'" does not look like the top-level project directory ***"
exit 1
}
PKG_NAME=`autoconf --trace 'AC_INIT:$1' configure.ac`
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
echo "*** WARNING: I am going to run \`configure' with no arguments." >&2
echo "*** If you wish to pass any to it, please specify them on the" >&2
echo "*** \`$0\' command line." >&2
echo "" >&2
fi
aclocal --install || exit 1
type gtkdocize >/dev/null 2>&1 && {
gtkdocize --copy || exit 1
}
autoreconf --verbose --force --install -Wno-portability || exit 1
cd $olddir
if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure "$@" || exit 1
if [ "$1" = "--help" ]; then exit 0 else
echo "Now type \`make\' to compile $PKG_NAME" || exit 1
fi
else
echo "Skipping configure process."
fi
AC_PREREQ([2.63])
m4_define(libgit2_glib_major_version, 0)
m4_define(libgit2_glib_minor_version, 26)
m4_define(libgit2_glib_micro_version, 3)
m4_define(libgit2_glib_version, libgit2_glib_major_version.libgit2_glib_minor_version.libgit2_glib_micro_version)
AC_INIT([libgit2-glib],
[libgit2_glib_version],
[https://bugzilla.gnome.org/enter_bug.cgi?product=gitg],
[libgit2-glib])
# Libtool versioning
#
# For development releases, keep the same numbers.
#
# For stable releases, apply the following algorithm step by step:
# 1. If the library source code has changed at all since the last
# update, then increment REVISION.
# 2. If any exported functions or data have been added, removed, or
# changed since the last update, increment CURRENT and set REVISION
# to 0.
# 3. If any exported functions or data have been added since the last
# public release, increment AGE.
# 4. If any exported functions or data have been removed since the last
# public release, set AGE to 0.
LIBGIT2_GLIB_LT_CURRENT=0
LIBGIT2_GLIB_LT_REVISION=0
LIBGIT2_GLIB_LT_AGE=0
LIBGIT2_GLIB_LT_VERSION="$LIBGIT2_GLIB_LT_CURRENT:$LIBGIT2_GLIB_LT_REVISION:$LIBGIT2_GLIB_LT_AGE"
AC_SUBST(LIBGIT2_GLIB_LT_VERSION)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([libgit2-glib/ggit-repository.c])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
AX_CHECK_ENABLE_DEBUG([no])
# Initialize libtool
LT_PREREQ([2.2])
LT_INIT([disable-static])
AM_INIT_AUTOMAKE
AC_PROG_LIBTOOL
AC_PROG_CC
# GLib enums
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
# Documentation
GTK_DOC_CHECK([1.11], [--flavour=no-tmpl])
INTROSPECTION_REQUIRED=0.10.1
GLIB_REQUIRED=2.44.0
GIT2_REQUIRED=0.25.0
PKG_CHECK_MODULES(LIBGIT2_GLIB, [
gobject-2.0 >= $GLIB_REQUIRED
glib-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
libgit2 >= $GIT2_REQUIRED
])
LIBGIT2_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir libgit2)
LIBGIT2_GLIB_CFLAGS="${LIBGIT2_GLIB_CFLAGS} -I$LIBGIT2_INCLUDE_DIR"
GOBJECT_INTROSPECTION_REQUIRE($INTROSPECTION_REQUIRED)
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GIT2_REQUIRED)
dnl ===========================================================================
dnl Check for libgit2 ssh support
dnl ===========================================================================
AC_ARG_ENABLE([ssh],
AS_HELP_STRING([--enable-ssh[=@<:@no/auto/yes@:>@]],[Build with libgit2 ssh support]),
[enable_ssh=$enableval],
[enable_ssh="auto"])
git_ssh=no
if test "x$enable_ssh" != "xno"; then
AC_MSG_CHECKING([for libgit2 ssh support])
cflags_save="${CFLAGS}"
libs_save="${LIBS}"
CFLAGS="${CFLAGS} ${LIBGIT2_GLIB_CFLAGS}"
LIBS="${LIBS} ${LIBGIT2_GLIB_LIBS}"
AC_TRY_RUN([
#include <git2.h>
int
main(int argc, const char *argv[])
{
git_libgit2_init ();
return ((git_libgit2_features() & GIT_FEATURE_SSH) != 0) ? 0 : 1;
}
],[
AC_MSG_RESULT([yes])
git_ssh=yes
],[
AC_MSG_RESULT([no])
git_ssh=no
if test "x$enable_ssh" = "xyes"; then
AC_MSG_ERROR([libgit2 ssh support was requested, but not found])
fi
])
CFLAGS="${cflags_save}"
LIBS="${libs_save}"
fi
if test "x$git_ssh" = "xyes"; then
LIBGIT2_GLIB_CFLAGS="${LIBGIT2_GLIB_CFLAGS} -DGIT_SSH=1"
LIBGIT2_GLIB_PCCFLAGS="-DGIT_SSH=1"
GGIT_SSH_INCLUDES="
#include <libgit2-glib/ggit-cred-ssh-key-from-agent.h>
#include <libgit2-glib/ggit-cred-ssh-interactive.h>
"
fi
AC_SUBST(GGIT_SSH_INCLUDES)
AC_SUBST(LIBGIT2_GLIB_PCCFLAGS)
AM_CONDITIONAL(GIT_SSH, test x"$git_ssh" = "xyes")
dnl ===========================================================================
dnl Check for python
dnl ===========================================================================
PYGOBJECT_REQUIRED=3.0.0
AC_ARG_ENABLE([python],
AS_HELP_STRING([--enable-python[=@<:@no/auto/yes@:>@]],[Build with python support]),
[enable_python=$enableval],
[enable_python="auto"])
if test "x$enable_python" = "xauto"; then
PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
[enable_python=yes],[enable_python=no])
fi
if test "x$enable_python" = "xyes"; then
AM_PATH_PYTHON(3.2.3)
PKG_CHECK_MODULES(PYTHON, [pygobject-3.0 >= $PYGOBJECT_REQUIRED])
pyoverridesdir="\$(pyexecdir)/gi/overrides"
AC_SUBST(pyoverridesdir)
fi
AM_CONDITIONAL(ENABLE_PYTHON, test x"$enable_python" = "xyes")
# Vala
VAPIGEN_CHECK
AC_CHECK_HEADER([termios.h],
[has_termios=yes],
[has_termios=no])
AM_CONDITIONAL(HAS_TERMIOS, test x"$has_termios" = "xyes")
GNOME_COMPILE_WARNINGS([maximum])
AC_OUTPUT([
libgit2-glib-1.0.pc
Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/version.xml
examples/Makefile
libgit2-glib/Makefile
libgit2-glib/ggit.h
tests/Makefile
])
if test "x$git_ssh" != "xyes"; then
echo "*** libgit2-glib will be built without SSH support! ***"
fi
SUBDIRS = reference
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = 1.7
# The name of the module.
DOC_MODULE = libgit2-glib-1.0
# The top-level SGML file.
DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS = --rebuild-types
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR = $(top_srcdir)/libgit2-glib
# Used for dependencies
HFILE_GLOB = $(top_srcdir)/libgit2-glib/*.h
CFILE_GLOB = $(top_srcdir)/libgit2-glib/*.c
# Headers to ignore
IGNORE_HFILES = \
config.h \
ggit-convert.h \
ggit-utils.h
if GIT_SSH
else
IGNORE_HFILES += \
ggit-cred-ssh-interactive.h \
ggit-cred-ssh-key-from-agent.h
endif
update-sections: $(HFILE_GLOB)
@echo 'gtk-doc: Scanning header files'
cp $(DOC_MODULE)-sections.txt $(DOC_MODULE)-sections.txt.old && \
(cd $(srcdir) && \
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" --rebuild-sections $(SCAN_OPTIONS) $(EXTRA_HFILES)) && \
cp $(DOC_MODULE)-sections.txt $(DOC_MODULE)-sections.txt.new && \
mv $(DOC_MODULE)-sections.txt.old $(DOC_MODULE)-sections.txt
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = --xml-mode --output-format=xml
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
# signals and properties.
GTKDOC_CFLAGS = \
-I$(top_srcdir) \
$(LIBGIT2_GLIB_CFLAGS)
GTKDOC_LIBS = \
$(top_builddir)/libgit2-glib/libgit2-glib-1.0.la \
$(LIBGIT2_GLIB_LIBS)
# Images to copy into HTML directory
HTML_IMAGES =
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
version.xml
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS= \
--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gobject \
--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/glib \
--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gio
# include common portion ...
include $(top_srcdir)/gtk-doc.make
# Other files to distribute
EXTRA_DIST +=
# ex:set ts=8 noet:
AM_CPPFLAGS = \
-g \
-I$(top_srcdir) \
-I$(top_builddir) \
$(LIBGIT2_GLIB_CFLAGS)
noinst_PROGRAMS = $(EXAMPLE_PROGS)
progs_ldadd = $(top_builddir)/libgit2-glib/libgit2-glib-1.0.la $(LIBGIT2_GLIB_LIBS)
EXAMPLE_PROGS = general
general_SOURCES = general.c
general_LDADD = $(progs_ldadd)
EXAMPLE_PROGS += walk
walk_SOURCES = walk.c
walk_LDADD = $(progs_ldadd)
if HAS_TERMIOS
EXAMPLE_PROGS += clone
clone_SOURCES = clone.c
clone_LDADD = $(progs_ldadd)
endif
# ex:set ts=8 noet:
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: libgit2-glib
Description: libgit2-glib, a a glib wrapper library around the libgit2 git access library.
Requires: libgit2 >= @GIT2_REQUIRED@, glib-2.0 >= @GLIB_REQUIRED@, gobject-2.0 >= @GLIB_REQUIRED@, gio-2.0 >= @GLIB_REQUIRED@
Version: @VERSION@
Cflags: -I${includedir}/libgit2-glib-1.0 @LIBGIT2_GLIB_PCCFLAGS@
Libs: -L${libdir} -lgit2-glib-1.0
lib_LTLIBRARIES = libgit2-glib-1.0.la
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(srcdir) \
$(LIBGIT2_GLIB_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS)
libgit2_glib_1_0_la_LDFLAGS = \
-version-info $(LIBGIT2_GLIB_LT_VERSION) \
-export-dynamic \
-no-undefined \
-export-symbols-regex "^[^_].*"
libgit2_glib_1_0_la_LIBADD = $(LIBGIT2_GLIB_LIBS)
H_FILES = \
ggit-annotated-commit.h \
ggit-blame.h \
ggit-blame-options.h \
ggit-blob.h \
ggit-blob-output-stream.h \
ggit-branch.h \
ggit-branch-enumerator.h \
ggit-checkout-options.h \
ggit-cherry-pick-options.h \
ggit-clone-options.h \
ggit-commit.h \
ggit-commit-parents.h \
ggit-config.h \
ggit-config-entry.h \
ggit-cred.h \
ggit-cred-plaintext.h \
ggit-diff.h \
ggit-diff-binary.h \
ggit-diff-binary-file.h \
ggit-diff-delta.h \
ggit-diff-file.h \
ggit-diff-find-options.h \
ggit-diff-format-email-options.h \
ggit-diff-hunk.h \
ggit-diff-line.h \
ggit-diff-options.h \
ggit-diff-similarity-metric.h \
ggit-error.h \
ggit-fetch-options.h \
ggit-index.h \
ggit-index-entry.h \
ggit-index-entry-resolve-undo.h \
ggit-main.h \
ggit-message.h \
ggit-merge-options.h \
ggit-native.h \
ggit-note.h \
ggit-object.h \
ggit-object-factory.h \
ggit-object-factory-base.h \
ggit-oid.h \
ggit-patch.h \
ggit-proxy-options.h \
ggit-push-options.h \
ggit-rebase-operation.h \
ggit-rebase-options.h \
ggit-rebase.h \
ggit-ref.h \
ggit-ref-spec.h \
ggit-reflog.h \
ggit-reflog-entry.h \
ggit-remote.h \
ggit-remote-callbacks.h \
ggit-repository.h \
ggit-revert-options.h \
ggit-revision-walker.h \
ggit-signature.h \
ggit-status-options.h \
ggit-submodule.h \
ggit-submodule-update-options.h \
ggit-tag.h \
ggit-transfer-progress.h \
ggit-tree.h \
ggit-tree-builder.h \
ggit-tree-entry.h \
ggit-types.h
BUILT_H_FILES = ggit.h
BUILT_H_FILES_ENUMS = ggit-enum-types.h
C_FILES = \
ggit-annotated-commit.c \
ggit-blame.c \
ggit-blame-options.c \
ggit-blob.c \
ggit-blob-output-stream.c \
ggit-branch.c \
ggit-branch-enumerator.c \
ggit-checkout-options.c \
ggit-cherry-pick-options.c \
ggit-clone-options.c \
ggit-commit.c \
ggit-commit-parents.c \
ggit-config.c \
ggit-config-entry.c \
ggit-convert.c \
ggit-cred.c \
ggit-cred-plaintext.c \
ggit-diff.c \
ggit-diff-binary.c \
ggit-diff-binary-file.c \
ggit-diff-delta.c \
ggit-diff-file.c \
ggit-diff-find-options.c \
ggit-diff-format-email-options.c \
ggit-diff-hunk.c \
ggit-diff-line.c \
ggit-diff-options.c \
ggit-diff-similarity-metric.c \
ggit-error.c \
ggit-fetch-options.c \
ggit-index.c \
ggit-index-entry.c \
ggit-index-entry-resolve-undo.c \
ggit-main.c \
ggit-message.c \
ggit-merge-options.c \
ggit-native.c \
ggit-note.c \
ggit-object.c \
ggit-object-factory.c \
ggit-object-factory-base.c \
ggit-oid.c \
ggit-patch.c \
ggit-proxy-options.c \
ggit-push-options.c \
ggit-rebase-operation.c \
ggit-rebase-options.c \
ggit-rebase.c \
ggit-ref.c \
ggit-ref-spec.c \
ggit-reflog.c \
ggit-reflog-entry.c \
ggit-remote.c \
ggit-remote-callbacks.c \
ggit-repository.c \
ggit-revert-options.c \
ggit-revision-walker.c \
ggit-signature.c \
ggit-status-options.c \
ggit-submodule.c \
ggit-submodule-update-options.c \
ggit-tag.c \
ggit-transfer-progress.c \
ggit-tree.c \
ggit-tree-builder.c \
ggit-tree-entry.c \
ggit-types.c \
ggit-utils.c
BUILT_C_FILES =
BUILT_C_FILES_ENUMS = ggit-enum-types.c
if GIT_SSH
C_FILES += \
ggit-cred-ssh-interactive.c \
ggit-cred-ssh-key-from-agent.c
H_FILES += \
ggit-cred-ssh-interactive.h \
ggit-cred-ssh-key-from-agent.h
endif
BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_C_FILES_ENUMS) $(BUILT_H_FILES) $(BUILT_H_FILES_ENUMS)
INST_H_FILES = $(H_FILES) $(BUILT_H_FILES) $(BUILT_H_FILES_ENUMS)
NOINST_H_FILES = \
ggit-convert.h \
ggit-utils.h
ENUM_TYPES = \
$(H_FILES)
ggit-enum-types.h: ggit-enum-types.h.template $(H_FILES) $(BUILT_H_FILES) $(GLIB_MKENUMS)
$(AM_V_GEN) (cd $(builddir) && $(GLIB_MKENUMS) --template $(srcdir)/ggit-enum-types.h.template $(addprefix $(srcdir)/,$(H_FILES)) $(BUILT_H_FILES)) > $@
ggit-enum-types.c: ggit-enum-types.c.template $(H_FILES) $(BUILT_H_FILES) $(GLIB_MKENUMS)
$(AM_V_GEN) (cd $(builddir) && $(GLIB_MKENUMS) --template $(srcdir)/ggit-enum-types.c.template $(addprefix $(srcdir)/,$(H_FILES)) $(BUILT_H_FILES)) > $@
libgit2_glib_1_0_la_SOURCES = \
$(INST_H_FILES) \
$(NOINST_H_FILES) \
$(BUILT_C_FILES) \
$(BUILT_C_FILES_ENUMS) \
$(C_FILES)
headerdir = $(prefix)/include/libgit2-glib-1.0/libgit2-glib
header_DATA = $(INST_H_FILES)
if ENABLE_PYTHON
overridesdir = $(pyoverridesdir)
overrides_PYTHON = \
Ggit.py
endif
EXTRA_DIST = \
Ggit.py \
ggit-enum-types.h.template \
ggit-enum-types.c.template \
ggit.h.in
CLEANFILES = $(BUILT_SOURCES)
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS = Ggit-1.0.gir
INTROSPECTION_SCANNER_ENV = CC="$(CC)"
INTROSPECTION_SCANNER_ARGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
--identifier-prefix=Ggit \
--c-include=libgit2-glib/ggit.h \
--warn-all
introspection_src_sources = $(H_FILES) $(C_FILES)
introspection_built_sources = $(BUILT_SOURCES)
Ggit-1.0.gir: libgit2-glib-1.0.la
Ggit_1_0_gir_NAMESPACE = Ggit
Ggit_1_0_gir_INCLUDES = GObject-2.0 GLib-2.0 Gio-2.0
Ggit_1_0_gir_CFLAGS = $(LIBGIT2_GLIB_CFLAGS)
Ggit_1_0_gir_LIBS = libgit2-glib-1.0.la
Ggit_1_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_src_sources)) $(introspection_built_sources)
Ggit_1_0_gir_PACKAGES = gobject-2.0 glib-2.0 libgit2 gio-2.0
Ggit_1_0_gir_EXPORT_PACKAGES = libgit2-glib-1.0
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += \
$(gir_DATA) \
$(typelib_DATA)
if ENABLE_VAPIGEN
include $(VAPIGEN_MAKEFILE)
ggit-1.0.vapi: Ggit-1.0.gir
VAPIGEN_VAPIS = ggit-1.0.vapi
ggit_1_0_vapi_DEPS = gio-2.0
ggit_1_0_vapi_METADATADIRS = $(top_srcdir)
ggit_1_0_vapi_FILES = Ggit-1.0.gir
vapidir = $(datadir)/vala/vapi
vapi_DATA = $(VAPIGEN_VAPIS) ggit-1.0.deps
ggit-1.0.deps:
$(AM_V_GEN) echo $(ggit_1_0_vapi_DEPS) | tr ' ' '\n' > $@
CLEANFILES += $(VAPIGEN_VAPIS) ggit-1.0.deps
endif # ENABLE_VAPIGEN
endif # HAVE_INTROSPECTION
coverage:
$(AM_V_GEN) LIBGIT2_INCLUDE_DIR=$(shell $(PKG_CONFIG) --variable=includedir libgit2)/git2 $(top_srcdir)/tools/coverage.py $(AM_CPPFLAGS) -isystem $(shell llvm-clang -print-file-name=include) -- $(C_FILES)
.PHONY: coverage
# ex:set ts=8 noet:
dnl vapigen.m4
dnl
dnl Copyright 2012 Evan Nemerson
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND_INTROSPECTION], [DEFAULT])
# --------------------------------------
# Check vapigen existence and version
#
# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
AC_DEFUN([VAPIGEN_CHECK],
[
AS_IF([test "x$3" != "xyes"], [
m4_provide_if([GOBJECT_INTROSPECTION_CHECK], [], [
m4_provide_if([GOBJECT_INTROSPECTION_REQUIRE], [], [
AC_MSG_ERROR([[You must call GOBJECT_INTROSPECTION_CHECK or GOBJECT_INTROSPECTION_REQUIRE before using VAPIGEN_CHECK unless using the FOUND_INTROSPECTION argument is "yes"]])
])
])
])
AC_ARG_ENABLE([vala],
[AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
AS_IF([test "x$4" = "x"], [
enable_vala=auto
], [
enable_vala=$4
])
])
AS_CASE([$enable_vala], [no], [enable_vala=no],
[yes], [
AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
AC_MSG_ERROR([Vala bindings require GObject Introspection])
])
], [auto], [
AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
enable_vala=no
])
], [
AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
])
AS_IF([test "x$2" = "x"], [
vapigen_pkg_name=vapigen
], [
vapigen_pkg_name=vapigen-$2
])
AS_IF([test "x$1" = "x"], [
vapigen_pkg="$vapigen_pkg_name"
], [
vapigen_pkg="$vapigen_pkg_name >= $1"
])
PKG_PROG_PKG_CONFIG
PKG_CHECK_EXISTS([$vapigen_pkg], [
AS_IF([test "$enable_vala" = "auto"], [
enable_vala=yes
])
], [
AS_CASE([$enable_vala], [yes], [
AC_MSG_ERROR([$vapigen_pkg not found])
], [auto], [
enable_vala=no
])
])
AC_MSG_CHECKING([for vapigen])
AS_CASE([$enable_vala],
[yes], [
VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
AS_IF([test "x$2" = "x"], [
VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
], [
VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
])
])
AC_MSG_RESULT([$enable_vala])
AC_SUBST([VAPIGEN])
AC_SUBST([VAPIGEN_VAPIDIR])
AC_SUBST([VAPIGEN_MAKEFILE])
AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
])
AM_CPPFLAGS = \
-g \
-I$(top_srcdir) \
-I$(top_builddir) \
$(LIBGIT2_GLIB_CFLAGS)
noinst_PROGRAMS = $(TEST_PROGS)
progs_ldadd = $(top_builddir)/libgit2-glib/libgit2-glib-1.0.la $(LIBGIT2_GLIB_LIBS)
TESTS = $(TEST_PROGS)
TEST_PROGS = repository
repository_SOURCES = repository.c
repository_LDADD = $(progs_ldadd)
# ex:set ts=8 noet:
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