Barry version 0.18.2
[barry.git] / gui / configure.ac
blob59d1841b471771b207abcd4fb0cd72b30c22c0b4
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.61)
5 AC_INIT([barry-backup], [0.18.2], [barry-devel@lists.sourceforge.net])
6 #AM_CONFIG_HEADER(config.h)
7 AC_CONFIG_SRCDIR([src/main.cc])
8 AC_CONFIG_HEADERS([config.h:config.h.in])
9 AC_CONFIG_AUX_DIR([.])
10 AC_CONFIG_MACRO_DIR([m4])
11 AM_INIT_AUTOMAKE
13 AM_GNU_GETTEXT([external])
14 AM_GNU_GETTEXT_VERSION([0.17])
17 # Checks for programs.
19 AC_PROG_CC
20 AC_PROG_CXX
21 AC_PROG_MAKE_SET
22 AC_PROG_LIBTOOL
24 AC_LANG([C++])
26 PKG_CHECK_MODULES([BARRY], [libbarry-18])
27 PKG_CHECK_MODULES([BARRYBACKUP], [libbarrybackup-18])
28 PKG_CHECK_MODULES([GTKMM], [gtkmm-2.4 libglademm-2.4 gthread-2.0])
30 # Carry the special tree build environment variables from parent configure,
31 # just in case user is doing a complete tree build with --enable-gui
32 AC_SUBST(TREE_BUILD_CXXFLAGS)
33 AC_SUBST(TREE_BUILD_LDFLAGS)
35 # Setup gladedir, so src/Makefile.am can use it for the compile
36 # and for the glade file installations. (glade_DATA)
37 gladedir="$datadir/barry/glade/"
38 AC_SUBST(gladedir)
40 # Checks for libraries.
41 #AC_CHECK_LIB([IOKit], [main])
42 AC_CHECK_LIB([pthread], [main])
43 #AC_CHECK_LIB([libusb], [libusb_init])
45 # Checks for header files.
46 AC_HEADER_DIRENT
47 AC_HEADER_STDC
48 AC_CHECK_HEADERS([assert.h stdint.h time.h])
50 # Checks for typedefs, structures, and compiler characteristics.
51 #AC_TYPE_SIZE_T
52 AC_HEADER_TIME
53 AC_STRUCT_TM
55 # Checks for library functions.
56 AC_FUNC_CLOSEDIR_VOID
57 AC_PROG_GCC_TRADITIONAL
58 AC_FUNC_MALLOC
59 AC_FUNC_MKTIME
60 AC_FUNC_REALLOC
61 AC_FUNC_SELECT_ARGTYPES
62 AC_FUNC_STAT
63 AC_CHECK_FUNCS([bzero gettimeofday memset select strcasecmp strchr strerror strtol strtoul])
65 AC_CONFIG_FILES([Makefile 
66                  po/Makefile.in
67                  src/Makefile
68                  man/Makefile])
69 AC_OUTPUT
73 # Add a special hack at the end, to let the user disable RPATH if he wants.
75 # http://wiki.debian.org/RpathIssue
76 # http://lists.debian.org/debian-devel/2003/debian-devel-200306/msg00569.html
77 # http://fedoraproject.org/wiki/Packaging:Guidelines#Removing_Rpath
79 AC_ARG_ENABLE([rpathhack],
80         [AC_HELP_STRING([--enable-rpathhack], [patch libtool to remove RPATH])],
81         [
82 AC_MSG_RESULT([patching libtool to fix HIDEOUS BREAKAGE])
83 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
84 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
85         ],
86         [])