Commit 8418b8a7 authored by Jonathan Michalon's avatar Jonathan Michalon
Browse files

Initial skeleton for libovccclient

parent 895ead72
SUBDIRS = src doc
ACLOCAL_AMFLAGS = -I build/m4
.PHONY: doc
pkgconfig_DATA=ovccclient.pc
doc:
$(AM_V_GEN) \
test -d "$(DOC_OUTPUT_DIR)" || $(MKDIR_P) "$(DOC_OUTPUT_DIR)"; \
$(DOXYGEN) $(DOXYFILE)
clean-doc:
-rm -rf $(DOC_OUTPUT_DIR)
clean-local: clean-doc
#!/bin/bash
## have() check for a program
# Usage: have [-r|-o] [-m <error message>] <program>
#
# Options:
# -o: The <program> is optional; don't exit on failure [default]
# -r: The <program> is required; exit if not found
# -m <message>: Message to show if program is not found in place of the
# default one.
have () {
local optional=true, message=""
for o; do
case "$o" in
-o) optional=true;;
-r) optional=false;;
-m) message="$1"; shift;;
*) break;;
esac
shift
done
echo -n "checking for \`$1'... "
cmd="`which "$1" 2>/dev/null`"
if [ "x$cmd" = "x" ]; then
echo "not found!" >&2
if [ "x$message" != "x" ]; then
echo "$message" >&2
else
echo "The program \`$1' cannot be found on your system." >&2
if $optional; then
echo "Continuing without." >&2
else
echo "Cannot continue without it;" \
"please fix this problem and retry." >&2
fi
fi
$optional && return 1 || exit 127
else
echo "ok, \`$cmd'."
fi
return 0
}
# check for needed autotools
have -r automake
have -r autoconf
have -r autoheader
have -r autoreconf
have -r libtool
have -r libtoolize
mkdir -p build/aux || exit 1
mkdir -p build/m4 || exit 1
autoreconf -vfi || exit 1
#~ ./configure "$@"
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
AC_INIT([libovccclient], [0.0], [dev@ovcc.tuxfamily.org])
AC_CONFIG_SRCDIR([src/client.vala])
AC_CONFIG_AUX_DIR([build/aux])
AC_CONFIG_MACRO_DIR([build/m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
pkgconfigdir="${libdir}/pkgconfig"
ovccincludedir="${includedir}/ovcc"
AC_SUBST(pkgconfigdir)
AC_SUBST(ovccincludedir)
# Checks for programs.
AC_PROG_CC
AM_PROG_VALAC([0.8.0])
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"
AC_SUBST([VALAFLAGS])
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([Makefile
src/Makefile
ovccclient.pc
])
AC_OUTPUT
prefix=@prefix@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: LibOVCCClient
Description: OpenVCC Client library
Version: @VERSION@
Requires: glib-2.0
Libs: -L${libdir} -lovcc -lovccclient
Libs.private:
Cflags: -I${includedir}
lib_LTLIBRARIES = libovccclient.la
noinst_PROGRAMS = test
libovccclient_la_CPPFLAGS = -DG_LOG_DOMAIN=\"LibOVCCClient\"
libovccclient_la_VALAFLAGS = $(VALAFLAGS) --library=ovccclient --header=ovccclient.h \
--vapidir=.
libovccclient_la_SOURCES = client.vala \
server.vala
ovccinclude_HEADERS = ovccclient.h
test_LDADD = libovccclient.la -lpthread
test_SOURCES = test.c
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