mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 19:12:04 +00:00
autotool rejig
This commit is contained in:
parent
d95ce956ee
commit
3b342b81b7
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2005-04-13 mallum,,, <mallum@openedhand.com>
|
||||
|
||||
* bootstrap-autotools.sh:
|
||||
* clutter/Makefile.am:
|
||||
* clutter/cltr.c:
|
||||
* configure.ac:
|
||||
* examples/Makefile.am:
|
||||
* examples/scratch.c:
|
||||
Initial autotooling of everything.
|
||||
|
||||
2005-04-07 mallum,,, <mallum@openedhand.com>
|
||||
|
||||
* Makefile:
|
||||
|
1
Makefile.am
Normal file
1
Makefile.am
Normal file
@ -0,0 +1 @@
|
||||
SUBDIRS=clutter examples
|
3
bootstrap-autotools.sh
Executable file
3
bootstrap-autotools.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/sh
|
||||
autoreconf -v --install || exit 1
|
||||
./configure --enable-maintainer-mode "$@"
|
36
clutter/Makefile.am
Normal file
36
clutter/Makefile.am
Normal file
@ -0,0 +1,36 @@
|
||||
source_h = pixbuf.h util.h fonts.h \
|
||||
cltr.h \
|
||||
cltr-private.h \
|
||||
cltr-glu.h \
|
||||
cltr-events.h \
|
||||
cltr-texture.h \
|
||||
cltr-widget.h \
|
||||
cltr-window.h \
|
||||
cltr-photo-grid.h \
|
||||
cltr-list.h \
|
||||
cltr-scratch.h
|
||||
|
||||
source_c = pixbuf.c util.c fonts.c \
|
||||
cltr-core.c \
|
||||
cltr-glu.c \
|
||||
cltr-texture.c \
|
||||
cltr-widget.c \
|
||||
cltr-events.c \
|
||||
cltr-window.c \
|
||||
cltr-photo-grid.c \
|
||||
cltr-list.c \
|
||||
cltr-scratch.c
|
||||
|
||||
AM_CFLAGS = @GCC_FLAGS@ @CLTR_CFLAGS@
|
||||
|
||||
lib_LTLIBRARIES = libclutter.la
|
||||
libclutter_la_SOURCES = $(source_c) $(source_h)
|
||||
libclutter_la_LIBADD = @CLTR_LIBS@
|
||||
|
||||
# http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91
|
||||
# current : revision : age
|
||||
|
||||
libclutter_la_LDFLAGS = -version-info 0:0:0
|
||||
|
||||
clutterheadersdir = $(includedir)/clutter
|
||||
clutterheaders_DATA = $(source_h)
|
123
configure.ac
Normal file
123
configure.ac
Normal file
@ -0,0 +1,123 @@
|
||||
AC_PREREQ(2.53)
|
||||
AC_INIT([clutter], 0.0.1, [mallum@o-hand.com])
|
||||
AC_CONFIG_SRCDIR([clutter/cltr.h])
|
||||
|
||||
AM_INIT_AUTOMAKE()
|
||||
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MMAP
|
||||
AC_CHECK_FUNCS([memset munmap strcasecmp strdup])
|
||||
|
||||
dnl ------ X + GL -------------------------------------------------------------
|
||||
|
||||
AC_PATH_XTRA
|
||||
|
||||
# below is broken
|
||||
|
||||
if test "x$have_x" = "xyes"; then
|
||||
GLX_LIBS="$X_LIBS -lX11 -lGL"
|
||||
GLX_CFLAGS="$X_CFLAGS"
|
||||
|
||||
save_LIBS="$LIBS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $GLX_CFLAGS"
|
||||
LIBS="$LIBS $GLX_LIBS"
|
||||
|
||||
AC_MSG_CHECKING([for XTHREADS in Xlib])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <X11/Xlib.h>]],
|
||||
[[return XInitThreads() == 0 ? 0 : 1;]])],
|
||||
[xthreads=no],
|
||||
[xthreads=yes],
|
||||
[xthreads=yes])
|
||||
|
||||
AC_MSG_RESULT($xthreads)
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "x$xthreads" = "xyes"
|
||||
then
|
||||
GLX_LIBS="$GLX_LIBS -lpthread"
|
||||
AC_DEFINE([XTHREADS], [], [1])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([*** Cannot find X + GL****])
|
||||
fi
|
||||
|
||||
dnl ----- Pango, glib etc ---------------------------------------------------
|
||||
|
||||
pkg_modules="pangoft2 pango glib-2.0 gthread-2.0"
|
||||
PKG_CHECK_MODULES(CLTR, pangoft2 pango glib-2.0 gthread-2.0)
|
||||
|
||||
dnl ----- Gstreamer ---------------------------------------------------------
|
||||
|
||||
pkg_modules="gstreamer-0.8 gstreamer-interfaces-0.8 gthread-2.0"
|
||||
PKG_CHECK_MODULES(GST, [$pkg_modules])
|
||||
|
||||
dnl ------ Check for PNG ---------------------------------------------------
|
||||
|
||||
AC_MSG_CHECKING(for libpng12)
|
||||
|
||||
if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists libpng12; then
|
||||
AC_MSG_RESULT(yes)
|
||||
PNG_LIBS=`$PKG_CONFIG --libs libpng12`
|
||||
PNG_CFLAGS=`$PKG_CONFIG --cflags libpng12`
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_CHECK_LIB([png], [png_create_read_struct],
|
||||
[have_png="yes"], [have_png="no"])
|
||||
|
||||
if test x$have_png=xyes && test x$have_png_h=xyes; then
|
||||
PNG_LIBS="-lpng -lz"
|
||||
else
|
||||
AC_MSG_ERROR([*** Cannot find libpng12 ****])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ------ Check for JPEG ---------------------------------------------------
|
||||
|
||||
AC_CHECK_LIB([jpeg], [jpeg_read_header], [have_jpg="yes"], [have_jpg="no"])
|
||||
|
||||
if test x$have_jpg=xyes && test x$have_jpg_h=xyes; then
|
||||
JPEG_LIBS="-ljpeg"
|
||||
else
|
||||
AC_MSG_ERROR([*** Cannot find libjpeg ****])
|
||||
fi
|
||||
|
||||
dnl ----- GCC ---------------------------------------------------------------
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
GCC_FLAGS="-g -Wall"
|
||||
fi
|
||||
|
||||
AC_SUBST(GCC_FLAGS)
|
||||
|
||||
AC_SUBST(GST_CFLAGS)
|
||||
AC_SUBST(GST_LIBS)
|
||||
|
||||
CLTR_CFLAGS="$GLX_CLAGS $CLTR_CFLAGS"
|
||||
CLTR_LIBS="$GLX_LIBS $PNG_LIBS $JPEG_LIBS $CLTR_LIBS"
|
||||
|
||||
AC_SUBST(CLTR_CFLAGS)
|
||||
AC_SUBST(CLTR_LIBS)
|
||||
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
clutter/Makefile
|
||||
examples/Makefile
|
||||
])
|
7
examples/Makefile.am
Normal file
7
examples/Makefile.am
Normal file
@ -0,0 +1,7 @@
|
||||
noinst_PROGRAMS = scratch
|
||||
|
||||
scratch_SOURCES = scratch.c
|
||||
scratch_CFLAGS = $(CLTR_CFLAGS)
|
||||
scratch_LDFLAGS = \
|
||||
$(CLTR_LIBS) \
|
||||
$(top_builddir)/clutter/libclutter.la
|
@ -1,4 +1,4 @@
|
||||
#include "cltr.h"
|
||||
#include <clutter/cltr.h>
|
||||
|
||||
int
|
||||
usage(char *progname)
|
Loading…
Reference in New Issue
Block a user