summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-10-21 17:54:45 +0200
committerLennart Poettering <lennart@poettering.net>2007-10-21 17:54:45 +0200
commit31f26c2915caa6320af74ba73ebf71491ab80fa3 (patch)
tree08ad71473267f9a7d3cf24de044c92d2fef0992c
parent02ff678b9ec7f36c9c18fa2c0e6b1f388d0c106e (diff)
Basic autoconfization
-rw-r--r--Makefile.am75
-rwxr-xr-xbootstrap.sh69
-rw-r--r--configure.ac141
-rw-r--r--src/lassi-avahi.c (renamed from lassi-avahi.c)0
-rw-r--r--src/lassi-avahi.h (renamed from lassi-avahi.h)0
-rw-r--r--src/lassi-clipboard.c (renamed from lassi-clipboard.c)0
-rw-r--r--src/lassi-clipboard.h (renamed from lassi-clipboard.h)0
-rw-r--r--src/lassi-grab.c (renamed from lassi-grab.c)0
-rw-r--r--src/lassi-grab.h (renamed from lassi-grab.h)0
-rw-r--r--src/lassi-order.c (renamed from lassi-order.c)0
-rw-r--r--src/lassi-order.h (renamed from lassi-order.h)0
-rw-r--r--src/lassi-osd.c (renamed from lassi-osd.c)0
-rw-r--r--src/lassi-osd.h (renamed from lassi-osd.h)0
-rw-r--r--src/lassi-prefs.c (renamed from lassi-prefs.c)0
-rw-r--r--src/lassi-prefs.h (renamed from lassi-prefs.h)0
-rw-r--r--src/lassi-server.c (renamed from lassi-server.c)0
-rw-r--r--src/lassi-server.h (renamed from lassi-server.h)0
-rw-r--r--src/lassi-tray.c (renamed from lassi-tray.c)0
-rw-r--r--src/lassi-tray.h (renamed from lassi-tray.h)0
-rw-r--r--src/mango-lassi.glade (renamed from mango-lassi.glade)0
-rwxr-xr-xsrc/x (renamed from x)0
-rw-r--r--src/xinput.c (renamed from xinput.c)0
22 files changed, 285 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..c151499
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,75 @@
+# This file is part of Mango Lassi.
+#
+# Copyright 207 Lennart Poettering
+#
+# Mango Lassi is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Mango Lassi is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with Mango Lassi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+gladedir = $(pkgdatadir)
+localedir = $(datadir)/locale
+
+SUBDIRS = po
+
+bin_PROGRAMS = \
+ mango-lassi
+
+mango_lassi_SOURCES = \
+ src/lassi-server.c src/lassi-server.h \
+ src/lassi-grab.c src/lassi-grab.h \
+ src/lassi-osd.c src/lassi-osd.h \
+ src/lassi-order.c src/lassi-order.h \
+ src/lassi-clipboard.c src/lassi-clipboard.h \
+ src/lassi-avahi.c src/lassi-avahi.h \
+ src/lassi-tray.c src/lassi-avahi.h \
+ src/lassi-prefs.c src/lassi-prefs.h
+
+mango_lassi_LDADD = \
+ $(AM_LDADD) \
+ $(AVAHI_LIBS) \
+ $(DBUS_LIBS) \
+ $(GTK_LIBS) \
+ $(XTEST_LIBS) \
+ $(AVAHI_LIBS) \
+ $(AVAHI_UI_LIBS) \
+ $(LIBNOTIFY_LIBS) \
+ $(LIBGLADE_LIBS)
+
+mango_lassi_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(AVAHI_CFLAGS) \
+ $(DBUS_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(XTEST_CFLAGS) \
+ $(AVAHI_CFLAGS) \
+ $(AVAHI_UI_CFLAGS) \
+ $(LIBNOTIFY_CFLAGS) \
+ $(LIBGLADE_CFLAGS) \
+ -DGLADE_FILE=\"$(gladedir)/mango-lassi.glade\"
+
+glade_DATA = \
+ src/mango-lassi.glade
+
+EXTRA_DIST = \
+ intltool-merge.in \
+ intltool-update.in \
+ intltool-extract.in \
+ src/mango-lassi.glade
+
+DISTCLEANFILES = \
+ intltool-extract \
+ intltool-merge \
+ intltool-update
+
+ACLOCAL_AMFLAGS = -I m4
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 0000000..089d445
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+# This file is part of Mango Lassi.
+#
+# Copyright 2007 Lennart Poettering
+#
+# Mango Lassi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Mango Lassi is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with Mango Lassi; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+VERSION=1.9
+
+run_versioned() {
+ local P
+ local V
+
+ V=$(echo "$2" | sed -e 's,\.,,g')
+
+ if [ -e "`which $1$V 2> /dev/null`" ] ; then
+ P="$1$V"
+ else
+ if [ -e "`which $1-$2 2> /dev/null`" ] ; then
+ P="$1-$2"
+ else
+ P="$1"
+ fi
+ fi
+
+ shift 2
+ "$P" "$@"
+}
+
+set -ex
+
+if [ "x$1" = "xam" ] ; then
+ run_versioned automake "$VERSION" -a -c --foreign
+ ./config.status
+else
+ rm -rf autom4te.cache
+ rm -f config.cache
+
+ touch config.rpath
+
+ rm -f Makefile.am~ configure.ac~
+ echo "no" | gettextize --copy --force
+ test -f Makefile.am~ && mv Makefile.am~ Makefile.am
+ test -f configure.ac~ && mv configure.ac~ configure.ac
+
+ intltoolize --copy --force --automake
+ run_versioned aclocal "$VERSION" -I m4
+ run_versioned autoconf 2.59 -Wall
+ run_versioned autoheader 2.59
+ run_versioned automake "$VERSION" --copy --foreign --add-missing
+
+ if test "x$NOCONFIGURE" = "x"; then
+ CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var "$@"
+ make clean
+ fi
+fi
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..324170f
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,141 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+# This file is part of Mango Lassi.
+#
+# Copyright 2007 Lennart Poettering
+#
+# Mango Lassi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Mango Lassi is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with Mango Lassi; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+AC_PREREQ(2.57)
+
+AC_INIT([mango-lassi], 000,[mzcbylcnhqvb (at) 0pointer (dot) net])
+AC_CONFIG_SRCDIR([src/lassi-server.c])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([foreign -Wall])
+
+AC_SUBST(PACKAGE_URL, [http://git.0pointer.de/?p=mango-lassi.git])
+
+if type -p stow > /dev/null && test -d /usr/local/stow ; then
+ AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
+ ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
+fi
+
+# CC
+
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_GCC_TRADITIONAL
+AC_GNU_SOURCE
+
+# GCC flags
+
+test_gcc_flag() {
+ AC_LANG_CONFTEST([int main(int argc, char*argv[]) {}])
+ $CC -c conftest.c $CFLAGS -o conftest.o > /dev/null 2> /dev/null
+ ret=$?
+ rm -f conftest.o
+ return $ret
+}
+
+# If using GCC specify some additional parameters
+if test "x$GCC" = "xyes" ; then
+
+ # We use gnu99 instead of c99 because many have interpreted the standard
+ # in a way that int64_t isn't defined on non-64 bit platforms.
+ DESIRED_FLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math"
+
+ for flag in $DESIRED_FLAGS ; do
+ AC_MSG_CHECKING([whether $CC accepts $flag])
+ if test_gcc_flag $flag ; then
+ CFLAGS="$CFLAGS $flag"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ done
+fi
+
+#### Checks for header files. ####
+
+# ISO
+AC_HEADER_STDC
+
+#### Typdefs, structures, etc. ####
+
+AC_C_CONST
+
+#### Large File-Support (LFS) ####
+
+AC_SYS_LARGEFILE
+
+#### pkg-config ####
+
+# Check for pkg-config manually first, as if its not installed the
+# PKG_PROG_PKG_CONFIG macro won't be defined.
+AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
+
+if test x"$have_pkg_config" = "xno"; then
+ AC_MSG_ERROR(pkg-config is required to install this program)
+fi
+
+PKG_PROG_PKG_CONFIG
+
+#### D-Bus ####
+
+PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.1.1 dbus-glib-1 ])
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+
+PKG_CHECK_MODULES(GTK, [ gtk+-2.0 ])
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
+
+PKG_CHECK_MODULES(XTEST, [ xtst ])
+AC_SUBST(XTEST_CFLAGS)
+AC_SUBST(XTEST_LIBS)
+
+PKG_CHECK_MODULES(AVAHI, [ avahi-glib avahi-client ])
+AC_SUBST(AVAHI_CFLAGS)
+AC_SUBST(AVAHI_LIBS)
+
+PKG_CHECK_MODULES(AVAHI_UI, [ avahi-ui ])
+AC_SUBST(AVAHI_UI_CFLAGS)
+AC_SUBST(AVAHI_UI_LIBS)
+
+PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify ])
+AC_SUBST(LIBNOTIFY_CFLAGS)
+AC_SUBST(LIBNOTIFY_LIBS)
+
+PKG_CHECK_MODULES(LIBGLADE, [ libglade-2.0 ])
+AC_SUBST(LIBGLADE_CFLAGS)
+AC_SUBST(LIBGLADE_LIBS)
+
+
+AM_GNU_GETTEXT([external])
+
+IT_PROG_INTLTOOL([0.35.0])
+GETTEXT_PACKAGE=mango-lassi
+AC_SUBST([GETTEXT_PACKAGE])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
+AM_GLIB_GNU_GETTEXT
+
+
+AC_CONFIG_FILES([
+Makefile
+po/Makefile.in
+])
+
+AC_OUTPUT
diff --git a/lassi-avahi.c b/src/lassi-avahi.c
index 258c199..258c199 100644
--- a/lassi-avahi.c
+++ b/src/lassi-avahi.c
diff --git a/lassi-avahi.h b/src/lassi-avahi.h
index 04b634c..04b634c 100644
--- a/lassi-avahi.h
+++ b/src/lassi-avahi.h
diff --git a/lassi-clipboard.c b/src/lassi-clipboard.c
index bdfeff4..bdfeff4 100644
--- a/lassi-clipboard.c
+++ b/src/lassi-clipboard.c
diff --git a/lassi-clipboard.h b/src/lassi-clipboard.h
index f5574e3..f5574e3 100644
--- a/lassi-clipboard.h
+++ b/src/lassi-clipboard.h
diff --git a/lassi-grab.c b/src/lassi-grab.c
index e2bda77..e2bda77 100644
--- a/lassi-grab.c
+++ b/src/lassi-grab.c
diff --git a/lassi-grab.h b/src/lassi-grab.h
index a9366e0..a9366e0 100644
--- a/lassi-grab.h
+++ b/src/lassi-grab.h
diff --git a/lassi-order.c b/src/lassi-order.c
index ceeb3f1..ceeb3f1 100644
--- a/lassi-order.c
+++ b/src/lassi-order.c
diff --git a/lassi-order.h b/src/lassi-order.h
index e41a0d7..e41a0d7 100644
--- a/lassi-order.h
+++ b/src/lassi-order.h
diff --git a/lassi-osd.c b/src/lassi-osd.c
index ae9a21c..ae9a21c 100644
--- a/lassi-osd.c
+++ b/src/lassi-osd.c
diff --git a/lassi-osd.h b/src/lassi-osd.h
index 2a792eb..2a792eb 100644
--- a/lassi-osd.h
+++ b/src/lassi-osd.h
diff --git a/lassi-prefs.c b/src/lassi-prefs.c
index c3adf68..c3adf68 100644
--- a/lassi-prefs.c
+++ b/src/lassi-prefs.c
diff --git a/lassi-prefs.h b/src/lassi-prefs.h
index a948709..a948709 100644
--- a/lassi-prefs.h
+++ b/src/lassi-prefs.h
diff --git a/lassi-server.c b/src/lassi-server.c
index f160279..f160279 100644
--- a/lassi-server.c
+++ b/src/lassi-server.c
diff --git a/lassi-server.h b/src/lassi-server.h
index 55849d4..55849d4 100644
--- a/lassi-server.h
+++ b/src/lassi-server.h
diff --git a/lassi-tray.c b/src/lassi-tray.c
index 72fc310..72fc310 100644
--- a/lassi-tray.c
+++ b/src/lassi-tray.c
diff --git a/lassi-tray.h b/src/lassi-tray.h
index d316092..d316092 100644
--- a/lassi-tray.h
+++ b/src/lassi-tray.h
diff --git a/mango-lassi.glade b/src/mango-lassi.glade
index 2be70a0..2be70a0 100644
--- a/mango-lassi.glade
+++ b/src/mango-lassi.glade
diff --git a/x b/src/x
index c3b6d95..c3b6d95 100755
--- a/x
+++ b/src/x
diff --git a/xinput.c b/src/xinput.c
index 66f0e3e..66f0e3e 100644
--- a/xinput.c
+++ b/src/xinput.c