1AC_PREREQ(2.57) 2 3m4_define([plugins_extra_version], [esyscmd(. ./VERSION;echo -n $VERSION)]) 4 5AC_INIT([compiz-plugins-extra], [plugins_extra_version], [maniac@opencompositing.org]) 6 7#AC_CONFIG_AUX_DIR(config) 8 9AM_INIT_AUTOMAKE([1.9 dist-bzip2]) 10AC_CONFIG_HEADER([config.h]) 11AM_MAINTAINER_MODE 12 13AC_ISC_POSIX 14AC_PROG_CC 15AC_PROG_CPP 16AC_PROG_LIBTOOL 17AC_HEADER_STDC 18AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h]) 19IT_PROG_INTLTOOL([0.35.0]) 20AC_SUBST(ALL_LINGUAS) 21AM_GLIB_GNU_GETTEXT 22GETTEXT_PACKAGE=compiz-plugins-extra 23AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.]) 24AC_SUBST(GETTEXT_PACKAGE) 25 26if test "x$GCC" = "xyes"; then 27 case " $CFLAGS " in 28 *[[\ \ ]]-Wall[[\ \ ]]*) ;; 29 *) CFLAGS="$CFLAGS -Wall" ;; 30 esac 31 32 case " $CFLAGS " in 33 *[[\ \ ]]-Wpointer-arith[[\ \ ]]*) ;; 34 *) CFLAGS="$CFLAGS -Wpointer-arith" ;; 35 esac 36 37 case " $CFLAGS " in 38 *[[\ \ ]]-Wstrict-prototypes[[\ \ ]]*) ;; 39 *) CFLAGS="$CFLAGS -Wstrict-prototypes" ;; 40 esac 41 42 case " $CFLAGS " in 43 *[[\ \ ]]-Wmissing-prototypes[[\ \ ]]*) ;; 44 *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;; 45 esac 46 47 case " $CFLAGS " in 48 *[[\ \ ]]-Wmissing-declarations[[\ \ ]]*) ;; 49 *) CFLAGS="$CFLAGS -Wmissing-declarations" ;; 50 esac 51 52 case " $CFLAGS " in 53 *[[\ \ ]]-Wnested-externs[[\ \ ]]*) ;; 54 *) CFLAGS="$CFLAGS -Wnested-externs" ;; 55 esac 56 57 case " $CFLAGS " in 58 *[[\ \ ]]-fno-strict-aliasing[[\ \ ]]*) ;; 59 *) CFLAGS="$CFLAGS -fno-strict-aliasing" ;; 60 esac 61 62 if test "x$enable_ansi" = "xyes"; then 63 case " $CFLAGS " in 64 *[[\ \ ]]-ansi[[\ \ ]]*) ;; 65 *) CFLAGS="$CFLAGS -ansi" ;; 66 esac 67 68 case " $CFLAGS " in 69 *[[\ \ ]]-pedantic[[\ \ ]]*) ;; 70 *) CFLAGS="$CFLAGS -pedantic" ;; 71 esac 72 fi 73fi 74 75AC_C_BIGENDIAN 76 77plugindir=$libdir/compiz 78AC_SUBST(plugindir) 79 80imagedir=$datadir/compiz 81AC_SUBST(imagedir) 82 83metadatadir=$datadir/compiz 84AC_SUBST(metadatadir) 85 86 87dnl ============================================================ 88dnl Check for the pkg-config path. 89if test x"$PKG_CONFIG_PATH" = x; then 90 PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig 91 else 92 PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig:${PKG_CONFIG_PATH} 93fi 94export PKG_CONFIG_PATH 95AC_SUBST(PKG_CONFIG_PATH) 96AC_MSG_NOTICE([Using PKG_CONFIG_PATH=$PKG_CONFIG_PATH]) 97 98PKG_CHECK_MODULES(COMPIZ, compiz) 99PKG_CHECK_MODULES(BCOP, bcop >= 0.7.3, [bcop_found=yes]) 100if test "$bcop_found" = yes; then 101 if test -z "$PKG_CONFIG"; then 102 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 103 fi 104 if test "$PKG_CONFIG" != "no" ; then 105 BCOP_BIN=`$PKG_CONFIG --variable=bin bcop` 106 AC_SUBST(BCOP_BIN) 107 fi 108fi 109 110AC_MSG_CHECKING(for GL_CFLAGS) 111AC_ARG_WITH(gl-cflags, [ --with-gl-cflags=CFLAGS ], 112 [GL_CFLAGS="$withval"], 113 [GL_CFLAGS=""]) 114 115AC_MSG_RESULT($GL_CFLAGS) 116AC_MSG_CHECKING(for GL_LIBS) 117AC_ARG_WITH(gl-libs, [ --with-gl-libs=LIBS ], 118 [GL_LIBS="$withval"], 119 [GL_LIBS="-lGL"]) 120AC_MSG_RESULT($GL_LIBS) 121 122AC_SUBST(GL_CFLAGS) 123AC_SUBST(GL_LIBS) 124 125 126PKG_CHECK_MODULES(GROUP, compiz-text cairo >= 1.0, [use_group=yes], [use_group=no]) 127AM_CONDITIONAL(GROUP_PLUGIN, test "x$use_group" = "xyes") 128 129PKG_CHECK_MODULES(SCALEFILTER, compiz-text compiz-scale, [use_scalefilter=yes], [use_scalefilter=no]) 130AM_CONDITIONAL(SCALEFILTER_PLUGIN, test "x$use_scalefilter" = "xyes") 131 132PKG_CHECK_MODULES(COMPIZCUBE, compiz-cube, [have_compiz_cube=yes], [have_compiz_cube=no]) 133AM_CONDITIONAL(CUBEADDON_PLUGIN, test "x$have_compiz_cube" = "xyes") 134AM_CONDITIONAL(THREED_PLUGIN, test "x$have_compiz_cube" = "xyes") 135 136PKG_CHECK_MODULES(COMPIZMOUSEPOLL, compiz-mousepoll, [have_compiz_mousepoll=yes], [have_compiz_mousepoll=no]) 137AM_CONDITIONAL(SHOWMOUSE_PLUGIN, test "x$have_compiz_mousepoll" = "xyes") 138 139PKG_CHECK_MODULES(LIBNOTIFY, libnotify gtk+-2.0, [have_libnotify=yes], [have_libnotify=no]) 140AM_CONDITIONAL(NOTIFICATION_PLUGIN, test "x$have_libnotify" = "xyes") 141if test "$have_libnotify" = yes; then 142 AC_DEFINE(USE_NOTIFICATION, 1, [Build notification plugin]) 143 PKG_CHECK_EXISTS(libnotify >= 0.6.1, [have_libnotify_0_6_1=yes], [have_libnotify_0_6_1=no]) 144 if test "$have_libnotify_0_6_1" = yes; then 145 AC_DEFINE(HAVE_LIBNOTIFY_0_6_1, 1, [libnotify >= 0.6.1 present]) 146 fi 147fi 148 149PKG_CHECK_MODULES(COMPIZANIMATION, compiz-animation, [have_compiz_animation=yes], [have_compiz_animation=no]) 150AM_CONDITIONAL(ANIMATIONADDON_PLUGIN, test "x$have_compiz_animation" = "xyes") 151 152AC_ARG_ENABLE(schemas, 153 [ --enable-schemas Build gconf schemas], 154 [use_schemas=$enableval], [use_schemas=no]) 155 156if test x"$use_schemas" = x"yes"; then 157 AC_PATH_PROG(GCONFTOOL, gconftool-2, no) 158 PKG_CHECK_MODULES(SCHEMAS, compiz-gconf, [use_schemas=yes], [use_schemas=no]) 159 if test x"$GCONFTOOL" = xno; then 160 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) 161 fi 162 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 163 if test x"$PKG_CONFIG" = xno ; then 164 AC_MSG_ERROR([pkg-config executable not found in your path, unable to determine schema directory]) 165 fi 166 xsltdir=`$PKG_CONFIG --variable=xsltdir compiz-gconf` 167 AC_SUBST(xsltdir) 168fi 169 170AM_GCONF_SOURCE_2 171 172 173AM_CONDITIONAL(USE_SCHEMAS, test "x$use_schemas" = "xyes") 174if test "$use_schemas" = yes; then 175 AC_DEFINE(USE_SCHEMAS, 1, [Build gconf schemas]) 176fi 177 178AC_OUTPUT([ 179compiz-animationaddon.pc 180Makefile 181images/Makefile 182include/Makefile 183metadata/Makefile 184src/Makefile 185src/3d/Makefile 186src/addhelper/Makefile 187src/animationaddon/Makefile 188src/bench/Makefile 189src/bicubic/Makefile 190src/crashhandler/Makefile 191src/cubeaddon/Makefile 192src/extrawm/Makefile 193src/fadedesktop/Makefile 194src/firepaint/Makefile 195src/gears/Makefile 196src/grid/Makefile 197src/group/Makefile 198src/maximumize/Makefile 199src/mblur/Makefile 200src/notification/Makefile 201src/reflex/Makefile 202src/scalefilter/Makefile 203src/shelf/Makefile 204src/showdesktop/Makefile 205src/splash/Makefile 206src/trailfocus/Makefile 207src/widget/Makefile 208src/showmouse/Makefile 209src/loginout/Makefile 210src/wallpaper/Makefile 211po/Makefile.in 212]) 213