File: configure.ac

package info (click to toggle)
synce-multisync-plugin 0.9.0-4.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,648 kB
  • ctags: 151
  • sloc: sh: 8,158; ansic: 1,778; makefile: 71
file content (111 lines) | stat: -rw-r--r-- 2,676 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT(multisync_plugin,YOU_DID_NOT_RUN_THE_BOOTSTRAP_SCRIPT)
AC_CONFIG_SRCDIR(src/public.c)

dnl GNOME_INIT
pkg_modules="gtk+-2.0 glib-2.0 libgnomeui-2.0 libglade-2.0"
PKG_CHECK_MODULES(GTK2, [$pkg_modules])
AC_SUBST(GTK2_CFLAGS)
AC_SUBST(GTK2_LIBS)

AC_CANONICAL_TARGET

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, 0.9.0)
AM_CONFIG_HEADER(multisync_plugin_config.h)

AC_SUBST(APPLE_CFLAGS)
case $target in

	powerpc-apple-*)
		dnl Prevent "Undefined Macro argument list" error.
		APPLE_CFLAGS="-no-cpp-precomp"
		;;

	*)
		APPLE_CFLAGS=""
		;;

esac

dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET

dnl Check for SynCE libs
AM_PATH_LIBSYNCE
AM_PATH_LIBRAPI2
AM_PATH_RRA

AC_SUBST(MULTISYNC_INCLUDE)

# default value
MULTISYNC_INCLUDE=/usr/local/include/multisync

AC_ARG_WITH(multisync-source,
	AC_HELP_STRING(
		[--with-multisync-source[=DIR]],
		[Search for Multisync source in DIR]),
		[
			MULTISYNC_INCLUDE=${withval}/src
		]
	)

AC_ARG_WITH(multisync-include,
	AC_HELP_STRING(
		[--with-multisync-include[=DIR]],
		[Search for Multisync header files in DIR]),
		[
			MULTISYNC_INCLUDE=${withval}
		]
	)

AC_CHECK_FILES(${MULTISYNC_INCLUDE}/multisync.h,,[
	AC_MSG_ERROR([Can't find Multisync header multisync.h.
Use one of the ---with-multisync-source or -with-multisync-include parameters.])
	])

dnl Prevent "NONE" used as prefix!
if test "x$prefix" = xNONE; then
  prefix=$ac_default_prefix
fi
GLADEFILE="${datadir}/synce/synce_multisync_plugin.glade"
eval SYNCE_MULTISYNC_GLADEFILE="$GLADEFILE"
AC_DEFINE_UNQUOTED(SYNCE_MULTISYNC_GLADEFILE, "$SYNCE_MULTISYNC_GLADEFILE",[The glade file used by the plugin])

dnl Checks for header files.

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)


dnl i18n stuff
ALL_LINGUAS=""
                                                                                
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [foo])
                                                                                
AM_GLIB_GNU_GETTEXT
AC_PROG_INTLTOOL
                                                                                
if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(LOCALEDIR, "${ac_default_prefix}/${DATADIRNAME}/locale", [Locale dir])
    else
        AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/${DATADIRNAME}/locale", [Locale dir])
fi

AC_OUTPUT([Makefile
           src/Makefile
           data/Makefile
		   po/Makefile.in
])