diff options
-rw-r--r-- | acinclude.m4 | 21 | ||||
-rw-r--r-- | configure.in | 19 |
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], |