configure.ac 5.72 KB
Newer Older
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
1 2
AC_PREREQ(2.57)

3
AC_INIT([compiz-plugins-experimental], [0.8.15], [chat-to-me@raveit.de])
4
AM_INIT_AUTOMAKE([1.9 foreign dist-xz no-dist-gzip check-news])
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
5 6 7 8 9 10
AC_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
ShadowKyogre's avatar
ShadowKyogre committed
11
AC_PROG_CXX
12
LT_INIT
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
13 14
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
15
IT_PROG_INTLTOOL([0.35.0])
Wolfgang Ulbrich's avatar
Wolfgang Ulbrich committed
16
AC_CONFIG_MACRO_DIR([m4])
17
AM_GNU_GETTEXT([external])
18
AM_GNU_GETTEXT_VERSION([0.19])
19
GETTEXT_PACKAGE=compiz-plugins-experimental
20 21
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
AC_SUBST(GETTEXT_PACKAGE)
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
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

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)

83 84
compdatadir=$datadir/compiz
AC_SUBST(compdatadir)
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
85

Scott Moreau's avatar
Scott Moreau committed
86
pluginiconsdir=$datadir/compiz/icons/hicolor
87 88
AC_SUBST(pluginiconsdir)

Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
89 90 91
dnl ============================================================
dnl Check for the pkg-config path.
if test x"$PKG_CONFIG_PATH" = x; then
ShadowKyogre's avatar
ShadowKyogre committed
92
    PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
93
        else
ShadowKyogre's avatar
ShadowKyogre committed
94
    PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig:${PKG_CONFIG_PATH}
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
95 96 97 98 99 100
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)
101
PKG_CHECK_MODULES(BCOP, bcop >= 0.7.3, [bcop_found=yes])
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
102 103 104
if test "$bcop_found" = yes; then
  if test -z "$PKG_CONFIG"; then
      AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
105
  fi
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
  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)

127 128 129 130 131

PKG_CHECK_MODULES(CAIRO, cairo-xlib cairo >= 1.0, [have_cairo=yes], [have_cairo=no])
AM_CONDITIONAL(FREEWINS_PLUGIN, test "x$have_cairo" = "xyes")

PKG_CHECK_MODULES(COMPIZTEXT, compiz-text, [have_compiz_text=yes], [have_compiz_text=no])
132
AM_CONDITIONAL(ELEMENTS_PLUGIN, test "x$have_compiz_text" = "xyes")
133 134 135 136 137 138 139 140 141 142 143 144 145 146
AM_CONDITIONAL(STACKSWITCH_PLUGIN, test "x$have_compiz_text" = "xyes")
AM_CONDITIONAL(WORKSPACENAMES_PLUGIN, test "x$have_compiz_text" = "xyes")

PKG_CHECK_MODULES(COMPIZCUBE, compiz-cube, [have_compiz_cube=yes], [have_compiz_cube=no])
AM_CONDITIONAL(ATLANTIS_PLUGIN, test "x$have_compiz_cube" = "xyes")
AM_CONDITIONAL(CUBEMODEL_PLUGIN, test "x$have_compiz_cube" = "xyes")
AM_CONDITIONAL(PHOTOWHEEL_PLUGIN, test "x$have_compiz_cube" = "xyes")
AM_CONDITIONAL(SNOWGLOBE_PLUGIN, test "x$have_compiz_cube" = "xyes")

PKG_CHECK_MODULES(COMPIZMOUSEPOLL, compiz-mousepoll, [have_compiz_mousepoll=yes], [have_compiz_mousepoll=no])
AM_CONDITIONAL(GHOST_PLUGIN, test "x$have_compiz_mousepoll" = "xyes")
AM_CONDITIONAL(WIZARD_PLUGIN, test "x$have_compiz_mousepoll" = "xyes")

PKG_CHECK_MODULES(XSCRNSAVER, xscrnsaver, [have_xscrnsaver=yes], [have_xscrnsaver=no])
147
AM_CONDITIONAL(SCREENSAVER_PLUGIN, test "x$have_compiz_text" = "xyes" && test "x$have_xscrnsaver" = "xyes")
148 149 150 151 152 153 154

PKG_CHECK_MODULES(COMPIZANIMATION, compiz-animation, [have_compiz_animation=yes], [have_compiz_animation=no])
AM_CONDITIONAL(ANIMATIONSIM_PLUGIN, test "x$have_compiz_animation" = "xyes")

PKG_CHECK_MODULES(COMPIZANIMATIONADDON, compiz-animationaddon, [have_compiz_animationaddon=yes], [have_compiz_animationaddon=no])
AM_CONDITIONAL(ANIMATIONPLUS_PLUGIN, test "x$have_compiz_animationaddon" = "xyes")

Scott Moreau's avatar
Scott Moreau committed
155 156 157 158
PKG_CHECK_MODULES(GLEW, glew, [have_glew=yes], [have_glew=no])
PKG_CHECK_MODULES(LIBCURL, libcurl, [have_libcurl=yes], [have_libcurl=no])
AM_CONDITIONAL(EARTH_PLUGIN, test "x$have_glew" = "xyes" && test "x$have_libcurl" = "xyes")

Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
159 160
AC_OUTPUT([
Makefile
161
icons/Makefile
Scott Moreau's avatar
Scott Moreau committed
162 163
data/Makefile
data/earth/Makefile
164
images/Makefile
Scott Moreau's avatar
Scott Moreau committed
165
images/earth/Makefile
ShadowKyogre's avatar
ShadowKyogre committed
166
images/elements/Makefile
Scott Moreau's avatar
Scott Moreau committed
167
images/fireflies/Makefile
ShadowKyogre's avatar
ShadowKyogre committed
168
images/snow/Makefile
Scott Moreau's avatar
Scott Moreau committed
169
images/stars/Makefile
170
include/Makefile
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
171 172
metadata/Makefile
src/Makefile
Scott Moreau's avatar
Scott Moreau committed
173
src/anaglyph/Makefile
174
src/atlantis/Makefile
175
src/cubemodel/Makefile
Scott Moreau's avatar
Scott Moreau committed
176
src/dialog/Makefile
Scott Moreau's avatar
Scott Moreau committed
177
src/earth/Makefile
178
src/elements/Makefile
Scott Moreau's avatar
Scott Moreau committed
179
src/extra-animations/Makefile
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
180
src/fakeargb/Makefile
Scott Moreau's avatar
Scott Moreau committed
181 182 183
src/fireflies/Makefile
src/freewins/Makefile
src/ghost/Makefile
184
src/mswitch/Makefile
Scott Moreau's avatar
Scott Moreau committed
185 186 187 188 189 190
src/photowheel/Makefile
src/putplus/Makefile
src/screensaver/Makefile
src/simple-animations/Makefile
src/smartput/Makefile
src/snowglobe/Makefile
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
191
src/snow/Makefile
Scott Moreau's avatar
Scott Moreau committed
192 193 194 195 196
src/stackswitch/Makefile
src/stars/Makefile
src/static/Makefile
src/swap/Makefile
src/throw/Makefile
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
197
src/tile/Makefile
Scott Moreau's avatar
Scott Moreau committed
198 199 200
src/toggle-decoration/Makefile
src/wizard/Makefile
src/workspacenames/Makefile
201
po/Makefile.in
Dennis Kasprzyk's avatar
Dennis Kasprzyk committed
202
])