summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-04-03 06:20:54 +0000
committerMarcel Holtmann <marcel@holtmann.org>2004-04-03 06:20:54 +0000
commit138996fe1350b28f551edc24ecc6c498d20c64f5 (patch)
treefe9a34e16cb6e57b2abad9fe2c376b4587f8ad7c
parentf06f701cd50b80c01081b40e69943adbb405e665 (diff)
Simplify autoconf stuff
-rw-r--r--acinclude.m421
-rw-r--r--configure.in19
2 files changed, 22 insertions, 18 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index ea030ae2..67506577 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2,7 +2,28 @@ dnl
dnl $Id$
dnl
+AC_DEFUN(AC_PREFIX_BLUEZ, [
+ AC_PREFIX_DEFAULT(/usr)
+
+ if test "$prefix" = "NONE"; then
+ dnl no prefix and no sysconfdir, so default to /etc
+ if test "$sysconfdir" = '${prefix}/etc'; then
+ AC_SUBST([sysconfdir], ['/etc'])
+ fi
+
+ dnl no prefix and no mandir, so use ${prefix}/share/man as default
+ if test "$mandir" = '${prefix}/man'; then
+ AC_SUBST([mandir], ['${prefix}/share/man'])
+ fi
+ fi
+])
+
AC_DEFUN(AC_PATH_BLUEZ, [
+ AC_ARG_WITH(bluez, [ --with-bluez=DIR BlueZ library is installed in DIR], [
+ bluez_includes=$withval/include
+ bluez_libraries=$withval/lib
+ ])
+
BLUEZ_INCLUDES=""
BLUEZ_LDFLAGS=""
BLUEZ_LIBS=""
diff --git a/configure.in b/configure.in
index 0c26d6a3..e0211d39 100644
--- a/configure.in
+++ b/configure.in
@@ -10,19 +10,7 @@ AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
-AC_PREFIX_DEFAULT(/usr)
-
-if test "$prefix" = "NONE"; then
- dnl no prefix and no sysconfdir, so default to /etc
- if test "$sysconfdir" = '${prefix}/etc'; then
- AC_SUBST([sysconfdir], ['/etc'])
- fi
-
- dnl no prefix and no mandir, so use ${prefix}/share/man as default
- if test "$mandir" = '${prefix}/man'; then
- AC_SUBST([mandir], ['${prefix}/share/man'])
- fi
-fi
+AC_PREFIX_BLUEZ
CFLAGS="-Wall -g -O2"
@@ -33,11 +21,6 @@ AC_PROG_INSTALL
AC_PROG_YACC
AM_PROG_LEX
-AC_ARG_WITH(bluez, [ --with-bluez=DIR BlueZ library is installed in DIR], [
- bluez_includes=$withval/include
- bluez_libraries=$withval/lib
-])
-
AC_PATH_BLUEZ
AC_ARG_ENABLE(dbus, [ --enable-dbus use D-BUS],