summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 0c54ccb7e55fff34b4a49d9cf0c1e6c7a6194b51 (plain)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
AC_PREREQ(2.57)

AC_INIT([compiz-plugins-beryl],esyscmd(. ./VERSION;echo -n $VERSION), [maniac@beryl-project.org])

AC_DEFINE_UNQUOTED(VERSION,"$VERSION",[Version])

#AC_CONFIG_AUX_DIR(config)

AM_INIT_AUTOMAKE([1.9 dist-bzip2])
AC_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_LIBTOOL
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
IT_PROG_INTLTOOL([0.35.0])
AC_SUBST(ALL_LINGUAS)
AM_GLIB_GNU_GETTEXT
GETTEXT_PACKAGE=compiz-plugins-beryl
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
AC_SUBST(GETTEXT_PACKAGE)

if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[[\ \	]]-Wall[[\ \	]]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac

  case " $CFLAGS " in
  *[[\ \	]]-Wpointer-arith[[\ \	]]*) ;;
  *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
  esac

  case " $CFLAGS " in
  *[[\ \	]]-Wstrict-prototypes[[\ \	]]*) ;;
  *) CFLAGS="$CFLAGS -Wstrict-prototypes" ;;
  esac

  case " $CFLAGS " in
  *[[\ \	]]-Wmissing-prototypes[[\ \	]]*) ;;
  *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
  esac

  case " $CFLAGS " in
  *[[\ \	]]-Wmissing-declarations[[\ \	]]*) ;;
  *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
  esac

  case " $CFLAGS " in
  *[[\ \	]]-Wnested-externs[[\ \	]]*) ;;
  *) CFLAGS="$CFLAGS -Wnested-externs" ;;
  esac

  case " $CFLAGS " in
  *[[\ \	]]-fno-strict-aliasing[[\ \	]]*) ;;
  *) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
  esac

  if test "x$enable_ansi" = "xyes"; then
    case " $CFLAGS " in
    *[[\ \	]]-ansi[[\ \	]]*) ;;
    *) CFLAGS="$CFLAGS -ansi" ;;
    esac

    case " $CFLAGS " in
    *[[\ \	]]-pedantic[[\ \	]]*) ;;
    *) CFLAGS="$CFLAGS -pedantic" ;;
    esac
  fi
fi

AC_C_BIGENDIAN

plugindir=$libdir/compiz
AC_SUBST(plugindir)

imagedir=$datadir/compiz
AC_SUBST(imagedir)

metadatadir=$datadir/compiz
AC_SUBST(metadatadir)


dnl ============================================================
dnl Check for the pkg-config path.
if test x"$PKG_CONFIG_PATH" = x; then
    PKG_CONFIG_PATH=${prefix}/lib/pkgconfig
        else
    PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${PKG_CONFIG_PATH}
fi
export PKG_CONFIG_PATH
AC_SUBST(PKG_CONFIG_PATH)
AC_MSG_NOTICE([Using PKG_CONFIG_PATH=$PKG_CONFIG_PATH])

PKG_CHECK_MODULES(COMPIZ, compiz)
PKG_CHECK_MODULES(BCOP, bcop >= 0.1, [bcop_found=yes])
if test "$bcop_found" = yes; then
  if test -z "$PKG_CONFIG"; then
      AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  fi  
  if test "$PKG_CONFIG" != "no" ; then
      BCOP_BIN=`$PKG_CONFIG --variable=bin bcop`
      AC_SUBST(BCOP_BIN)
  fi
fi

AC_MSG_CHECKING(for GL_CFLAGS)
AC_ARG_WITH(gl-cflags, [  --with-gl-cflags=CFLAGS ],
		       [GL_CFLAGS="$withval"],
		       [GL_CFLAGS=""])

AC_MSG_RESULT($GL_CFLAGS)
AC_MSG_CHECKING(for GL_LIBS)
AC_ARG_WITH(gl-libs, [  --with-gl-libs=LIBS ],
		     [GL_LIBS="$withval"],
		     [GL_LIBS="-lGL"])
AC_MSG_RESULT($GL_LIBS)

AC_SUBST(GL_CFLAGS)
AC_SUBST(GL_LIBS)

AC_ARG_ENABLE(text,
  [  --disable-text      Disable text plugin],
  [use_texte=$enableval], [use_text=yes])

if test "x$use_text" = "xyes"; then
  PKG_CHECK_MODULES(TEXT, cairo-xlib-xrender pangocairo cairo >= 1.0, [use_text=yes], [use_text=no])
fi

AM_CONDITIONAL(TEXT_PLUGIN, test "x$use_text" = "xyes")
if test "$use_text" = yes; then
  AC_DEFINE(USE_TEXT, 1, [Build text plugin])
fi

AC_ARG_ENABLE(wall,
  [  --disable-wall      Disable wall plugin],
  [use_walle=$enableval], [use_wall=yes])

if test "x$use_wall" = "xyes"; then
  PKG_CHECK_MODULES(WALL, cairo-xlib-xrender cairo >= 1.0, [use_wall=yes], [use_wall=no])
fi

AM_CONDITIONAL(WALL_PLUGIN, test "x$use_wall" = "xyes")
if test "$use_wall" = yes; then
  AC_DEFINE(USE_WALL, 1, [Build wall plugin])
fi

AC_ARG_ENABLE(group,
  [  --disable-group      Disable group plugin],
  [use_groupe=$enableval], [use_group=yes])

if test "x$use_group" = "xyes"; then
  PKG_CHECK_MODULES(GROUP, cairo-xlib-xrender cairo >= 1.0, [use_group=yes], [use_group=no])
fi

AM_CONDITIONAL(GROUP_PLUGIN, test "x$use_group" = "xyes")
if test "$use_group" = yes; then
  AC_DEFINE(USE_GROUP, 1, [Build group plugin])
fi

AC_ARG_ENABLE(jpeg,
  [  --disable-jpeg      Disable jpeg plugin],
  [use_jpege=$enableval], [use_jpeg=yes])

AM_CONDITIONAL(JPEG_PLUGIN, test "x$use_jpeg" = "xyes")
if test "$use_jpeg" = yes; then
  AC_DEFINE(USE_JPEG, 1, [Build jpeg plugin])
fi

AC_ARG_ENABLE(schemas,
  [  --enable-schemas         Build gconf schemas],
  [use_schemas=$enableval], [use_schemas=no])

if test x"$use_schemas" = x"yes"; then
  AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
  PKG_CHECK_MODULES(SCHEMAS, compiz-gconf, [use_schemas=yes], [use_schemas=no])
  if test x"$GCONFTOOL" = xno; then
    AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
  fi
  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  if test x"$PKG_CONFIG" = xno ; then
    AC_MSG_ERROR([pkg-config executable not found in your path, unable to determine schema directory])
  fi
  xsltdir=`$PKG_CONFIG --variable=xsltdir compiz-gconf`
  AC_SUBST(xsltdir)
fi

AM_GCONF_SOURCE_2


AM_CONDITIONAL(USE_SCHEMAS, test "x$use_schemas" = "xyes")
if test "$use_schemas" = yes; then
  AC_DEFINE(USE_SCHEMAS, 1, [Build gconf schemas])
fi

AC_OUTPUT([
Makefile
metadata/Makefile
src/Makefile
src/group/Makefile
po/Makefile.in
])