]> code.delx.au - pulseaudio/commitdiff
Create an m4 directory for common macros and use it.
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 8 Aug 2008 10:18:53 +0000 (12:18 +0200)
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 8 Aug 2008 10:18:53 +0000 (12:18 +0200)
Split acinclude.m4 in multiple macro files.

Let it be known to autoconf and aclocal to use the m4 directory.
Ignore macro files copied or linked by libtool and intltool.

Makefile.am
bootstrap.sh
configure.ac
m4/.gitignore [new file with mode: 0644]
m4/acx_libwrap.m4 [new file with mode: 0644]
m4/acx_lirc.m4 [new file with mode: 0644]
m4/acx_pthread.m4 [moved from acinclude.m4 with 92% similarity]
m4/check_define.m4 [new file with mode: 0644]

index 63c04ee1534832e443ff2925a21e6e68c0c3da09..facce0df51051692bb8ee7789f307d06b4bf916d 100644 (file)
@@ -15,7 +15,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA.
 
-ACLOCAL_AMFLAGS = -I common
+ACLOCAL_AMFLAGS = -I m4
 
 EXTRA_DIST = bootstrap.sh LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
 SUBDIRS=src doxygen man po
index 6f060c8559f84ccc3b94033e271c846fd04ebb18..e5f1ac593e8641c86480703f6765633ec22ce816 100755 (executable)
@@ -58,7 +58,7 @@ else
 
     intltoolize --copy --force --automake
     "$LIBTOOLIZE" -c --force --ltdl
-    run_versioned aclocal "$VERSION" -I common
+    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
index 661890771b4c16642f2101e55474d30b452acd83..4fa171f382bf086a61134a733e4b63579f6122f6 100644 (file)
@@ -28,6 +28,7 @@ m4_define(PA_MICRO, [11])
 
 AC_INIT([pulseaudio], PA_MAJOR.PA_MINOR.PA_MICRO,[mzchyfrnhqvb (at) 0pointer (dot) net])
 AC_CONFIG_SRCDIR([src/daemon/main.c])
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([foreign 1.10 -Wall])
 
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644 (file)
index 0000000..ac5d140
--- /dev/null
@@ -0,0 +1,8 @@
+argz.m4
+intltool.m4
+libtool.m4
+ltdl.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+lt~obsolete.m4
diff --git a/m4/acx_libwrap.m4 b/m4/acx_libwrap.m4
new file mode 100644 (file)
index 0000000..e160214
--- /dev/null
@@ -0,0 +1,19 @@
+AC_DEFUN([ACX_LIBWRAP], [
+LIBWRAP_LIBS=
+saved_LIBS="$LIBS"
+LIBS="$LIBS -lwrap"
+AC_MSG_CHECKING([for tcpwrap library and headers])
+AC_LINK_IFELSE(
+AC_LANG_PROGRAM(
+[#include <tcpd.h>
+#include <syslog.h>
+int allow_severity = LOG_INFO;
+int deny_severity = LOG_WARNING;],
+[struct request_info *req;
+return hosts_access (req);]),
+[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
+LIBWRAP_LIBS="-lwrap"
+AC_MSG_RESULT(yes)],
+[AC_MSG_RESULT(no)])
+LIBS="$saved_LIBS"
+])
diff --git a/m4/acx_lirc.m4 b/m4/acx_lirc.m4
new file mode 100644 (file)
index 0000000..d3f8ea7
--- /dev/null
@@ -0,0 +1,6 @@
+AC_DEFUN([ACX_LIRC], [
+LIRC_CFLAGS=
+LIRC_LIBS=
+AC_CHECK_HEADER(lirc/lirc_client.h,[AC_CHECK_LIB(lirc_client,lirc_init,[HAVE_LIRC=1
+LIRC_LIBS=-llirc_client],HAVE_LIRC=0)],HAVE_LIRC=0)
+])
similarity index 92%
rename from acinclude.m4
rename to m4/acx_pthread.m4
index 02c051868dc79ff39b27a7baf2ebb90f54121d01..cbd6bfa06a6359ee7e9c2331da1e11c64271a103 100644 (file)
@@ -346,43 +346,3 @@ else
 fi
 AC_LANG_RESTORE
 ])dnl ACX_PTHREAD
-AC_DEFUN([AC_CHECK_DEFINE],[
-AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1_$2])dnl
-AC_CACHE_CHECK([for $1 in $2], ac_var,
-AC_TRY_COMPILE([#include <$2>],[
-  #ifdef $1
-  int ok;
-  #else
-  choke me
-  #endif
-],AS_VAR_SET(ac_var, yes),AS_VAR_SET(ac_var, no)))
-AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
-AS_VAR_POPDEF([ac_var])dnl
-])
-
-AC_DEFUN([ACX_LIBWRAP], [
-LIBWRAP_LIBS=
-saved_LIBS="$LIBS"
-LIBS="$LIBS -lwrap"
-AC_MSG_CHECKING([for tcpwrap library and headers])
-AC_LINK_IFELSE(
-AC_LANG_PROGRAM(
-[#include <tcpd.h>
-#include <syslog.h>
-int allow_severity = LOG_INFO;
-int deny_severity = LOG_WARNING;],
-[struct request_info *req;
-return hosts_access (req);]),
-[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
-LIBWRAP_LIBS="-lwrap"
-AC_MSG_RESULT(yes)],
-[AC_MSG_RESULT(no)])
-LIBS="$saved_LIBS"
-])
-
-AC_DEFUN([ACX_LIRC], [
-LIRC_CFLAGS=
-LIRC_LIBS=
-AC_CHECK_HEADER(lirc/lirc_client.h,[AC_CHECK_LIB(lirc_client,lirc_init,[HAVE_LIRC=1
-LIRC_LIBS=-llirc_client],HAVE_LIRC=0)],HAVE_LIRC=0)
-])
diff --git a/m4/check_define.m4 b/m4/check_define.m4
new file mode 100644 (file)
index 0000000..43edc78
--- /dev/null
@@ -0,0 +1,13 @@
+AC_DEFUN([AC_CHECK_DEFINE],[
+AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1_$2])dnl
+AC_CACHE_CHECK([for $1 in $2], ac_var,
+AC_TRY_COMPILE([#include <$2>],[
+  #ifdef $1
+  int ok;
+  #else
+  choke me
+  #endif
+],AS_VAR_SET(ac_var, yes),AS_VAR_SET(ac_var, no)))
+AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
+AS_VAR_POPDEF([ac_var])dnl
+])