Updated efl-launcher to netbook-launcher-efl 0.3.3
[efl-launcher.git] / efl-launcher / configure.ac
blob660460ff268adea9fe06580dbfce13410de10779
1 # -*- Mode: m4; indent-tabs-mode: nil; tab-width: 2 -*-
2
3 #  Copyright (C) 2009,2010 Canonical Ltd.
4 #  Authors:
5 #   Gustavo Sverzut Barbieri <gustavo.barbieri@canonical.com>
6 #   Michael Terry <michael.terry@canonical.com>
7
8 #  This file is part of Netbook Launcher EFL.
9
10 #  Netbook Launcher EFL is free software: you can redistribute it and/or modify
11 #  it under the terms of the GNU General Public License as published by
12 #  the Free Software Foundation, version 3 of the License.
13
14 #  Netbook Launcher EFL is distributed in the hope that it will be useful,
15 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 #  GNU General Public License for more details.
18
19 #  You should have received a copy of the GNU General Public License
20 #  along with Netbook Launcher EFL.  If not, see <http://www.gnu.org/licenses/>.
22 AC_INIT([Netbook Launcher EFL],[0.3.3],[oem-services@canonical.com])
23 AC_PREREQ(2.64)
24 AC_CONFIG_SRCDIR([configure.ac])
25 AC_CONFIG_MACRO_DIR([m4])
26 AC_CANONICAL_HOST
28 AM_INIT_AUTOMAKE(1.6 dist-bzip2)
29 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
30 AM_CONFIG_HEADER(config.h)
32 AC_USE_SYSTEM_EXTENSIONS
33 AC_PROG_CC_C99
34 AM_PROG_CC_C_O
35 AC_C_CONST
36 AC_FUNC_ALLOCA
37 AC_C___ATTRIBUTE__
39 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])
40 define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])
41 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
42 AC_DISABLE_STATIC
43 AC_PROG_LIBTOOL
45 GETTEXT_PACKAGE=netbook-launcher-efl
46 AC_SUBST(GETTEXT_PACKAGE)
47 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
48 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the Gettext package name])
49 ALL_LINGUAS="`cat "$srcdir/po/LINGUAS" | grep -v '^#'`"
51 IT_PROG_INTLTOOL([0.34])
52 AM_GLIB_GNU_GETTEXT
54 EFL_VER=0.9.9.49898
55 ELM_VER=0.7.0.49898
56 EET_VER=1.2.3
57 NOTIFY_VER=0.7
59 PKG_CHECK_MODULES(
60         [NETBOOK_LAUNCHER],
61         [eina-0 >= $EFL_VER
62          ecore >= $EFL_VER
63          evas >= $EFL_VER
64          ecore-evas >= $EFL_VER
65          ecore-x >= $EFL_VER
66          ecore-file >= $EFL_VER
67          ecore-input >= $EFL_VER
68          edje >= $EFL_VER
69          elementary >= $ELM_VER
70          eet >= $EET_VER
71          glib-2.0
72          gthread-2.0
73          gconf-2.0
74          gtk+-2.0
75          gio-2.0
76          launcher-0.3
77          libnotify >= $NOTIFY_VER
78          libcanberra
79          unique-1.0])
81 AC_ARG_ENABLE([google-gadgets],
82     AS_HELP_STRING([--enable-google-gadgets],[enable google gadgets]),
83     [
84      if test "x${enableval}" = "xyes"; then
85         use_ggadgets="yes"
86      else
87         use_ggadgets="no"
88     fi
89     ], [use_ggadgets="no"])
91 if test "x${use_ggadgets}" = "xyes"; then
92     PKG_CHECK_MODULES(
93             [GOOGLE_GADGETS],
94             [cairo gdk-2.0 gadget],
95             [AC_DEFINE(HAVE_GOOGLE_GADGETS, 1, [have google gadgets.])])
98 AM_CONDITIONAL(USE_GOOGLE_GADGETS, test "x${use_ggadgets}" = "xyes")
100 AC_ARG_ENABLE([quit],
101     AS_HELP_STRING([--enable-quit],[enable quit button (yes, no, gnome)]),
102     [
103      if test "x${enableval}" = "xyes"; then
104         use_quit="yes"
105      elif test "x${enableval}" = "xgnome"; then
106         use_quit="gnome"
107      else
108         use_quit="no"
109     fi
110     ], [use_quit="no"])
112 if test "x${use_quit}" = "xyes"; then
113   quit_val=1
114 elif test "x${use_quit}" = "xgnome"; then
115   quit_val=2
116 else
117   quit_val=0
120 AC_DEFINE_UNQUOTED([USE_QUIT], $quit_val, [whether to use a quit button])
121 AM_CONDITIONAL(BUILD_QUIT, test "x${use_quit}" = "xyes")
123 if test "x${use_quit}" = "xyes"; then
124   PKG_CHECK_MODULES(
125           [NETBOOK_LAUNCHER_QUIT],
126           [gtk+-2.0 dbus-glib-1 libgnome-2.0 libgnomeui-2.0  xau])
129 AC_ARG_WITH([edje-cc],
130 [AS_HELP_STRING([--with-edje-cc=PATH],
131         [specify a specific path to edje_cc])],
133   edje_cc=$withval
134   AC_MSG_NOTICE([edje_cc explicitly set to $edje_cc])
136   edje_cc=$(pkg-config --variable=prefix edje)/bin/edje_cc
138 AC_SUBST(edje_cc)
140 # use --as-needed if supported
141 LDFLAGS_SAVE="${LDFLAGS}"
142 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
143 AC_LINK_IFELSE(
144    [AC_LANG_PROGRAM([[]], [])],
145    [],
146    [LDFLAGS="${LDFLAGS_SAVE}"]
149 # use --fvisibility=hidden if supported
150 LDFLAGS_SAVE="${LDFLAGS}"
151 CFLAGS_SAVE="${CFLAGS}"
152 LDFLAGS="${LDFLAGS} -fvisibility=hidden"
153 CFLAGS="${CFLAGS} -fvisibility=hidden"
154 AC_LINK_IFELSE(
155    [AC_LANG_PROGRAM([[]], [])],
156    [],
157    [
158    LDFLAGS="${LDFLAGS_SAVE}"
159    CFLAGS="${CFLAGS_SAVE}"
160    ]
163 AC_PATH_PROG(GCONFTOOL, gconftool-2)
164 AM_GCONF_SOURCE_2
167 AC_CONFIG_FILES([
168 Makefile
169 m4/Makefile
170 data/Makefile
171 data/themes/Makefile
172 data/themes/default/Makefile
173 data/themes/alternative/Makefile
174 data/desktop/Makefile
175 data/schemas/Makefile
176 src/Makefile
177 src/launcher/Makefile
178 src/quit/Makefile
179 po/Makefile.in
182 AC_OUTPUT
184 cat <<EOF
186 PROJECT: $PACKAGE_NAME $PACKAGE_VERSION
188 Summary:
189    * prefix.: $prefix
190    * CFLAGS.: $CFLAGS
191    * LDFLAGS: $LDFLAGS
192    * Google gadgets: $use_ggadgets
193    * Quit button: $use_quit
195 Type 'make all' to compile.