- fixed the configure scripts and makefiles so that when building
[barry.git] / opensync-plugin / configure.ac
blob8fe1afc9ee3c254bdd156d874370076c8380c317
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.59)
4 AC_INIT([Barry OpenSync Plugin], 0.2, [], barryplugin)
5 AM_INIT_AUTOMAKE(foreign)
6 AC_CONFIG_SRCDIR(src/barry_sync.cc)
7 AC_CONFIG_HEADER(config.h)
9 export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib/pkgconfig:$prefix/lib/pkgconfig:/usr/local/lib/pkgconfig
10 pkg_modules="opensync-1.0 glib-2.0"
11 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
12 AC_SUBST(PACKAGE_CFLAGS)
13 AC_SUBST(PACKAGE_LIBS)
15 AC_ISC_POSIX
16 AC_PROG_CC
17 AM_PROG_CC_STDC
18 AC_HEADER_STDC
19 AC_PROG_CXX
20 AC_DISABLE_STATIC
21 AC_PROG_LIBTOOL
23 AC_LANG([C++])
25 PKG_CHECK_MODULES([BARRY], [libbarry-0 libusb])
27 # Carry the special tree build environment variables from parent configure,
28 # just in case user is doing a complete tree build with --enable-opensync-plugin
29 AC_SUBST(TREE_BUILD_CXXFLAGS)
30 AC_SUBST(TREE_BUILD_LDFLAGS)
32 OPENSYNC_CONFIGDIR=$(pkg-config --variable=configdir opensync-1.0)
33 OPENSYNC_PLUGINDIR=$(pkg-config --variable=plugindir opensync-1.0)
34 OPENSYNC_FORMATSDIR=$(pkg-config --variable=formatsdir opensync-1.0)
35 OPENSYNC_HEADERDIR=$(pkg-config --variable=headerdir opensync-1.0)
37 AC_SUBST(OPENSYNC_CONFIGDIR) ## This is the place where you can install the default configuration files of your plugin
38 AC_SUBST(OPENSYNC_PLUGINDIR) ## This is the dir where you plugin will be installed
39 AC_SUBST(OPENSYNC_FORMATSDIR) ## Here are format plugins installed (if any)
40 AC_SUBST(OPENSYNC_HEADERDIR) ## Here are the headers that a user interface may need (if any)
42 AC_OUTPUT([
43 Makefile
44 src/Makefile