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
|
AC_PREREQ(2.57)
AC_INIT([libcompizconfig],esyscmd(. ./VERSION;echo -n $VERSION), [dev@opencompositing.org])
#AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([1.9 dist-bzip2])
AC_PROG_CXX
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=libcompizconfig
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
PKG_CHECK_MODULES(LIBX11, "x11")
PKG_CHECK_MODULES(COMPIZ, "compiz")
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" != "no" ; then
PLUGINDIR=`$PKG_CONFIG --variable=libdir compiz`/compiz
AC_SUBST(PLUGINDIR)
METADATADIR=`$PKG_CONFIG --variable=prefix compiz`/share/compiz
AC_SUBST(METADATADIR)
fi
plugindir=$libdir/compiz
AC_SUBST(plugindir)
PKG_CHECK_MODULES(LIBXML2, "libxml-2.0")
AC_SUBST(LIBXML2_REQUIRES)
AC_ARG_ENABLE(protobuf,
[ --disable-protobuf Disable Protocol Buffers],
[use_protobuf=$enableval], [use_protobuf=yes])
if test "x$use_protobuf" = "xyes"; then
protobuf_error_msg="\nWARNING: You need to install Protocol Buffers to get faster program startup.\n Sources are available at http://code.google.com/p/protobuf/downloads/list\n Package names for Ubuntu/Debian: libprotobuf0, libprotobuf-dev, protobuf-compiler\n Package names for other distributions: protobuf, protobuf-devel\n Disabling protobuf.\n"
AC_CHECK_PROG(have_protoc, protoc, yes, no)
if test "x$have_protoc" = "xno"; then
echo -e $protobuf_error_msg; use_protobuf=no
else
AC_CHECK_LIB(protobuf, _ZN6google8protobuf7MessageD2Ev, [], [
echo -e $protobuf_error_msg; use_protobuf=no ], -lpthread)
if test "x$use_protobuf" = "xyes"; then
AC_LANG([C++])
AC_CHECK_HEADER([google/protobuf/message.h],,[
echo -e $protobuf_error_msg; use_protobuf=no ])
AC_LANG([C])
fi
fi
fi
AM_CONDITIONAL([USE_PROTOBUF], [test "x$use_protobuf" = "xyes"])
AC_CHECK_HEADERS([sys/inotify.h], [have_inotify=yes], [have_inotify=no])
AC_ARG_ENABLE(debug,
[ --enable-debug[=none,normal,full] Enable output of debug messages],
[enable_debug=$enableval], [enable_debug=none])
if test "x$enable_debug" = "xnone"; then
AC_DEFINE(DEBUGLEVEL, 0, [Debug level])
elif test "x$enable_debug" = "xfull"; then
AC_DEFINE(DEBUGLEVEL, 2, [Debug level])
else
AC_DEFINE(DEBUGLEVEL, 1, [Debug level])
fi
AC_CONFIG_FILES([
libcompizconfig.pc
Makefile
src/Makefile
backend/Makefile
plugin/Makefile
include/Makefile
metadata/Makefile
po/Makefile.in
config/Makefile
])
AC_OUTPUT
if test "x$have_inotify" = xno; then
echo ""
echo "NOTE: "
echo "======"
echo ""
echo "Inotify header files not found. While this library might work" \
"without them, user experience is degraded as settings won't be" \
"applied instantly. We strongly suggest installing the inotify" \
"header files."
fi
|