Commit 4815976d authored by Colomban Wendling's avatar Colomban Wendling

Update and fix the build systems

parent e8937ccb
......@@ -12,8 +12,10 @@ AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
pkgconfigdir="${libdir}/pkgconfig"
vapidir="${datadir}/vala/vapi"
ovccincludedir="${includedir}/ovcc"
AC_SUBST(pkgconfigdir)
AC_SUBST(vapidir)
AC_SUBST(ovccincludedir)
# Checks for programs.
......
......@@ -19,6 +19,7 @@ libovcc_la_SOURCES = board.vala \
tilesdef.vala \
utils.vala
ovccinclude_HEADERS = ovcc.h
vapi_DATA = ovcc.vapi
test_LDADD = libovcc.la -lpthread
test_SOURCES = test.c
......
SUBDIRS = src doc
SUBDIRS = src
ACLOCAL_AMFLAGS = -I build/m4
......
......@@ -12,9 +12,11 @@ AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
pkgconfigdir="${libdir}/pkgconfig"
ovccincludedir="${includedir}/ovcc"
vapidir="${datadir}/vala/vapi"
ovccclientincludedir="${includedir}/ovcc"
AC_SUBST(pkgconfigdir)
AC_SUBST(ovccincludedir)
AC_SUBST(vapidir)
AC_SUBST(ovccclientincludedir)
# Checks for programs.
AC_PROG_CC
......@@ -24,14 +26,14 @@ AC_PROG_LIBTOOL
# Checks for libraries.
GLIB_REQUIRE=2.12
GIO_REQUIRE=2.0
LIBXML_REQUIRE=2.0
PKG_CHECK_MODULES([LIBOVCC], [glib-2.0 >= ${GLIB_REQUIRE}
gio-2.0 >= ${GIO_REQUIRE}
libxml-2.0 >= ${LIBXML_REQUIRE}])
CFLAGS="${CFLAGS} ${LIBOVCC_CFLAGS} -Werror-implicit-function-declaration"
LIBS="${LIBS} ${LIBOVCC_LIBS}"
VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg libxml-2.0"
OVCC_REQUIRE=0.0
PKG_CHECK_MODULES([LIBOVCCCLIENT], [glib-2.0 >= ${GLIB_REQUIRE}
gio-2.0 >= ${GIO_REQUIRE}
ovcc >= ${OVCC_REQUIRE}])
CFLAGS="${CFLAGS} ${LIBOVCCCLIENT_CFLAGS} -Werror-implicit-function-declaration"
LIBS="${LIBS} ${LIBOVCCCLIENT_LIBS}"
VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg ovcc"
AC_SUBST([VALAFLAGS])
# Checks for header files.
......
......@@ -8,7 +8,8 @@ libovccclient_la_VALAFLAGS = $(VALAFLAGS) --library=ovccclient --header=ovccclie
libovccclient_la_SOURCES = client.vala \
server.vala \
game.vala
ovccinclude_HEADERS = ovccclient.h
ovccclientinclude_HEADERS = ovccclient.h
vapi_DATA = ovccclient.vapi
test_LDADD = libovccclient.la -lpthread
test_SOURCES = test.c
......@@ -18,12 +18,14 @@ AM_PROG_VALAC([0.11.1])
# Checks for libraries.
GLIB_REQUIRE=2.12
GIO_REQUIRE=2.0
OVCC_REQUIRE=0.0
PKG_CHECK_MODULES([OVCCSERVER], [glib-2.0 >= ${GLIB_REQUIRE}
gio-2.0 >= ${GIO_REQUIRE}])
gio-2.0 >= ${GIO_REQUIRE}
ovcc >= ${OVCC_REQUIRE}])
CFLAGS="${CFLAGS} ${OVCCSERVER_CFLAGS} -Werror-implicit-function-declaration"
LIBS="${LIBS} ${OVCCSERVER_LIBS}"
VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0"
VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg ovcc"
AC_SUBST([VALAFLAGS])
# Checks for header files.
......
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