From: Diego 'Flameeyes' Pettenò Date: Fri, 8 Aug 2008 10:18:53 +0000 (+0200) Subject: Create an m4 directory for common macros and use it. X-Git-Tag: 1.0_branch~2478^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2da79d5ade92c476326e3167d0a56986a9d96200;p=profile%2Fivi%2Fpulseaudio.git Create an m4 directory for common macros and use it. 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. --- diff --git a/Makefile.am b/Makefile.am index 63c04ee..facce0d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/bootstrap.sh b/bootstrap.sh index 6f060c8..e5f1ac5 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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 diff --git a/configure.ac b/configure.ac index 6618907..4fa171f 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 0000000..ac5d140 --- /dev/null +++ b/m4/.gitignore @@ -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 index 0000000..e160214 --- /dev/null +++ b/m4/acx_libwrap.m4 @@ -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 +#include +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 index 0000000..d3f8ea7 --- /dev/null +++ b/m4/acx_lirc.m4 @@ -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) +]) diff --git a/acinclude.m4 b/m4/acx_pthread.m4 similarity index 92% rename from acinclude.m4 rename to m4/acx_pthread.m4 index 02c0518..cbd6bfa 100644 --- a/acinclude.m4 +++ b/m4/acx_pthread.m4 @@ -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 -#include -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 index 0000000..43edc78 --- /dev/null +++ b/m4/check_define.m4 @@ -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 +])