menu: added new Keywords tag to .desktop files
[barry.git] / opensync-plugin-0.4x / configure.ac
bloba2743df4285d98019abc871a20bc8a9fad2eefdd
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.61)
4 AC_INIT([Barry OpenSync Plugin 0.4x], [0.19.0], [barry-devel@lists.sourceforge.net])
5 AC_CONFIG_SRCDIR(src/barry_sync.cc)
6 AC_CONFIG_HEADER(config.h)
7 AC_CONFIG_AUX_DIR([.])
8 AC_CONFIG_MACRO_DIR([m4])
9 AM_INIT_AUTOMAKE(foreign)
11 AM_GNU_GETTEXT([external])
12 # this is the version of gettext, not barry
13 AM_GNU_GETTEXT_VERSION([0.18.1])
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 AX_C_CHECK_FLAG([-fvisibility=hidden], [], [],
24         [HAVE_C_GCCVISIBILITY=1],
25         [HAVE_C_GCCVISIBILITY=0])
26 AX_CXX_CHECK_FLAG([-fvisibility=hidden], [], [],
27         [HAVE_CXX_GCCVISIBILITY=1],
28         [HAVE_CXX_GCCVISIBILITY=0])
29 AM_CONDITIONAL([WITH_GCCVISIBILITY], [test "$HAVE_C_GCCVISIBILITY" = "1" -a "$HAVE_CXX_GCCVISIBILITY" = "1"])
31 AC_LANG([C++])
33 PKG_CHECK_MODULES([GLIB2], [glib-2.0])
34 PKG_CHECK_MODULES([OPENSYNC4X], [libopensync1])
35 PKG_CHECK_MODULES([BARRY], [libbarry-19])
36 PKG_CHECK_MODULES([BARRYSYNC], [libbarrysync-19])
38 # Carry the special tree build environment variables from parent configure,
39 # just in case user is doing a complete tree build with --enable-opensync-plugin
40 AC_SUBST(TREE_BUILD_CXXFLAGS)
41 AC_SUBST(TREE_BUILD_LDFLAGS)
43 OPENSYNC_CONFIGDIR=$(pkg-config --variable=configdir libopensync1)
44 OPENSYNC_PLUGINDIR=$(pkg-config --variable=plugindir libopensync1)
45 OPENSYNC_FORMATSDIR=$(pkg-config --variable=formatsdir libopensync1)
46 OPENSYNC_HEADERDIR=$(pkg-config --variable=headerdir libopensync1)
48 AC_SUBST(OPENSYNC_CONFIGDIR) ## This is the place where you can install the default configuration files of your plugin
49 AC_SUBST(OPENSYNC_PLUGINDIR) ## This is the dir where you plugin will be installed
50 AC_SUBST(OPENSYNC_FORMATSDIR) ## Here are format plugins installed (if any)
51 AC_SUBST(OPENSYNC_HEADERDIR) ## Here are the headers that a user interface may need (if any)
53 AC_OUTPUT([
54 Makefile
55 po/Makefile.in
56 src/Makefile
60 # Add a special hack at the end, to let the user disable RPATH if he wants.
62 # http://wiki.debian.org/RpathIssue
63 # http://lists.debian.org/debian-devel/2003/debian-devel-200306/msg00569.html
64 # http://fedoraproject.org/wiki/Packaging:Guidelines#Removing_Rpath
66 AC_ARG_ENABLE([rpathhack],
67         [AC_HELP_STRING([--enable-rpathhack], [patch libtool to remove RPATH])],
68         [
69 AC_MSG_RESULT([patching libtool to fix HIDEOUS BREAKAGE])
70 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
71 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
72         ],
73         [])