Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
Set up initial autotools project
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsie committed Feb 13, 2012
1 parent 25e5d6c commit 09261c0
Show file tree
Hide file tree
Showing 17 changed files with 421 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Richard Hughes <richard@hughsie.com>
56 changes: 56 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = \
doc \
printerd \
data \
tools \
po \
src

MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/ABOUT-NLS \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/compile \
$(srcdir)/config.guess \
$(srcdir)/config.rpath \
$(srcdir)/config.h.in \
$(srcdir)/config.sub \
$(srcdir)/configure.scan \
$(srcdir)/depcomp \
$(srcdir)/install-sh \
$(srcdir)/ltmain.sh \
$(srcdir)/missing \
$(srcdir)/mkinstalldirs \
$(srcdir)/omf.make \
$(srcdir)/xmldocs.make \
$(srcdir)/gtk-doc.make \
$(srcdir)/ChangeLog \
$(srcdir)/po/Makefile.in.in~ \
$(srcdir)/printerd-*.tar.* \
`find "$(srcdir)" -type f -name Makefile.in -print`

distclean-local:
if test $(srdcir) = .; then :; else \
rm -f ChangeLog; \
fi

ChangeLog:
@echo Creating $@
@if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log e197d80c8937c622f21f569457d1bbd05746d951.. --stat -M -C --name-status --date=short --no-color) | fmt --split-only > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi

.PHONY: ChangeLog

-include $(top_srcdir)/git.mk
Empty file added NEWS
Empty file.
20 changes: 20 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

PKG_NAME="printerd"

(test -f $srcdir/src/Makefile.am) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}

which gnome-autogen.sh || {
echo "You need to install gnome-common"
exit 1
}

. gnome-autogen.sh --enable-gtk-doc $*
116 changes: 116 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
AC_INIT([printerd],[0.0.1],[http://bugs.freedesktop.org/enter_bug.cgi?product=printerd],[printerd])

AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz tar-ustar])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADERS([config.h])

AM_MAINTAINER_MODE

AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AC_PROG_LIBTOOL

m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

# Initialization
#

GNOME_COMMON_INIT
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES

AC_PATH_PROG([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then
AC_MSG_ERROR([xsltproc is needed])
fi

GTK_DOC_CHECK([1.3])

GOBJECT_INTROSPECTION_CHECK([0.6.2])

# Libraries
#

PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= 147])
AC_SUBST(GUDEV_CFLAGS)
AC_SUBST(GUDEV_LIBS)

PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.31.13])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

PKG_CHECK_MODULES(GIO, [gio-unix-2.0 >= 2.31.13])
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)

PKG_CHECK_MODULES(POLKIT_GOBJECT_1, [polkit-gobject-1 >= 0.92])
AC_SUBST(POLKIT_GOBJECT_1_CFLAGS)
AC_SUBST(POLKIT_GOBJECT_1_LIBS)

PKG_CHECK_MODULES(POLKIT_AGENT_1, [polkit-agent-1 >= 0.92])
AC_SUBST(POLKIT_AGENT_1_CFLAGS)
AC_SUBST(POLKIT_AGENT_1_LIBS)

# systemd
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
[],
[with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
if test "x$with_systemdsystemunitdir" != "xno"; then
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"])

# Internationalization
#

IT_PROG_INTLTOOL([$INTLTOOL_REQUIRED])
GETTEXT_PACKAGE=printerd
AC_SUBST([GETTEXT_PACKAGE])
AM_GLIB_GNU_GETTEXT
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])

# Generate
#

AC_OUTPUT([
Makefile
data/Makefile
printerd/Makefile
printerd/printerd.pc
src/Makefile
tools/Makefile
doc/Makefile
doc/version.xml
doc/man/Makefile
po/Makefile.in
])

dnl ==========================================================================
echo "
printerd $VERSION
================

prefix: ${prefix}
libdir: ${libdir}
libexecdir: ${libexecdir}
bindir: ${bindir}
sbindir: ${sbindir}
datadir: ${datadir}
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
docdir: ${docdir}
privlibdir: ${privlibdir}
introspection: ${found_introspection}
systemdsystemunitdir: ${systemdsystemunitdir}

compiler: ${CC}
cflags: ${CFLAGS}
cppflags: ${CPPFLAGS}

Maintainer mode: ${USE_MAINTAINER_MODE}
Building api docs: ${enable_gtk_doc}
"
2 changes: 2 additions & 0 deletions data/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

-include $(top_srcdir)/git.mk
5 changes: 5 additions & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

SUBDIRS = \
man

-include $(top_srcdir)/git.mk
Empty file added doc/TODO
Empty file.
2 changes: 2 additions & 0 deletions doc/man/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

-include $(top_srcdir)/git.mk
1 change: 1 addition & 0 deletions doc/version.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@VERSION@
Loading

0 comments on commit 09261c0

Please sign in to comment.