1 dnl Process this file with autoconf to produce a configure script.
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 pkg_modules="opensync-1.0 glib-2.0"
10 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
11 AC_SUBST(PACKAGE_CFLAGS)
12 AC_SUBST(PACKAGE_LIBS)
22 AX_C_CHECK_FLAG([-fvisibility=hidden], [], [],
23 [HAVE_C_GCCVISIBILITY=1],
24 [HAVE_C_GCCVISIBILITY=0])
25 AX_CXX_CHECK_FLAG([-fvisibility=hidden], [], [],
26 [HAVE_CXX_GCCVISIBILITY=1],
27 [HAVE_CXX_GCCVISIBILITY=0])
28 AM_CONDITIONAL([WITH_GCCVISIBILITY], [test "$HAVE_C_GCCVISIBILITY" = "1" -a "$HAVE_CXX_GCCVISIBILITY" = "1"])
32 PKG_CHECK_MODULES([BARRY], [libbarry-0 libusb])
34 # Carry the special tree build environment variables from parent configure,
35 # just in case user is doing a complete tree build with --enable-opensync-plugin
36 AC_SUBST(TREE_BUILD_CXXFLAGS)
37 AC_SUBST(TREE_BUILD_LDFLAGS)
39 OPENSYNC_CONFIGDIR=$(pkg-config --variable=configdir opensync-1.0)
40 OPENSYNC_PLUGINDIR=$(pkg-config --variable=plugindir opensync-1.0)
41 OPENSYNC_FORMATSDIR=$(pkg-config --variable=formatsdir opensync-1.0)
42 OPENSYNC_HEADERDIR=$(pkg-config --variable=headerdir opensync-1.0)
44 AC_SUBST(OPENSYNC_CONFIGDIR) ## This is the place where you can install the default configuration files of your plugin
45 AC_SUBST(OPENSYNC_PLUGINDIR) ## This is the dir where you plugin will be installed
46 AC_SUBST(OPENSYNC_FORMATSDIR) ## Here are format plugins installed (if any)
47 AC_SUBST(OPENSYNC_HEADERDIR) ## Here are the headers that a user interface may need (if any)