]> code.delx.au - pulseaudio/blobdiff - configure.ac
move modules to ${libdir}/polypaudio-${PA_MAJORMINOR}/modules/
[pulseaudio] / configure.ac
index 87dc2aab24a0b5007a8ceee1a0b1b976fdc6b821..157c01a4b82d038967685aeba7a7624347355576 100644 (file)
 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 
 AC_PREREQ(2.57)
-AC_INIT([polypaudio],[0.8],[mzcbylcnhqvb (at) 0pointer (dot) de])
+
+m4_define(PA_MAJOR, [0])
+m4_define(PA_MINOR, [9])
+m4_define(PA_MICRO, [0])
+
+AC_INIT([polypaudio], PA_MAJOR.PA_MINOR.PA_MICRO,[mzcbylcnhqvb (at) 0pointer (dot) de])
 AC_CONFIG_SRCDIR([src/daemon/main.c])
 AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([foreign -Wall])
 
-AC_SUBST(PA_MAJORMINOR, "$PACKAGE_VERSION")
+AC_SUBST(PA_MAJORMINOR, "PA_MAJOR.PA_MINOR")
 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/polypaudio/])
 
-AC_SUBST(PA_API_VERSION, 8)
+AC_SUBST(PA_API_VERSION, 9)
 AC_SUBST(PA_PROTOCOL_VERSION, 8)
 
+AC_SUBST(LIBPOLYP_VERSION_INFO, [0:0:0])
+AC_SUBST(LIBPOLYPCORE_VERSION_INFO, [0:0:0])
+AC_SUBST(LIBPOLYP_SIMPLE_VERSION_INFO, [0:0:0])
+AC_SUBST(LIBPOLYP_BROWSE_VERSION_INFO, [0:0:0])
+AC_SUBST(LIBPOLYP_MAINLOOP_GLIB_VERSION_INFO, [0:0:0])
+
 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}"
@@ -76,7 +87,7 @@ 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 -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
+    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"
 
     for flag in $DESIRED_FLAGS ; do
         AC_MSG_CHECKING([whether $CC accepts $flag])
@@ -150,7 +161,7 @@ AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1")
 AC_HEADER_STDC
 
 # POSIX
-AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
+AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h iconv.h netdb.h netinet/in.h \
     netinet/in_systm.h netinet/ip.h netinet/tcp.h pwd.h sched.h \
     sys/resource.h sys/select.h sys/socket.h sys/wait.h \
     syslog.h])
@@ -203,6 +214,7 @@ AC_SEARCH_LIBS([pow], [m])
 
 # POSIX
 AC_SEARCH_LIBS([sched_setscheduler], [rt])
+AC_SEARCH_LIBS([dlopen], [dl])
 
 # BSD
 AC_SEARCH_LIBS([connect], [socket])
@@ -220,7 +232,7 @@ AC_FUNC_FORK
 AC_FUNC_GETGROUPS
 AC_FUNC_SELECT_ARGTYPES
 AC_CHECK_FUNCS([chmod chown getaddrinfo getgrgid_r getpwuid_r gettimeofday \
-    getuid inet_ntop inet_pton nanosleep setpgid setsid sigaction sleep])
+    getuid inet_ntop inet_pton nanosleep pipe setpgid setsid sigaction sleep])
 AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
 
 AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")
@@ -231,6 +243,9 @@ AC_CHECK_FUNCS([readlink])
 # SUSv2
 AC_CHECK_FUNCS([ctime_r usleep])
 
+# SUSv3
+AC_CHECK_FUNCS([strerror_r])
+
 # BSD
 AC_CHECK_FUNCS([lstat])
 
@@ -420,6 +435,13 @@ if test "x$PREOPEN_MODS" != "xall" ; then
     AC_SUBST(PREOPEN_MODS)
 fi
 
+AC_ARG_WITH(
+        [module-dir],
+        AC_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/polypaudio-${PA_MAJORMINOR}/modules/]),
+        [modlibexecdir=$withval], [modlibexecdir="${libdir}/polypaudio-${PA_MAJORMINOR}/modules/"])
+
+AC_SUBST(modlibexecdir)
+
 AC_ARG_ENABLE(
         [force-preopen],
         AC_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]),