Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/pulseaudio-module-xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2018-08-08 06:47:55 +0300
committerKoichiro IWAO <meta@vmeta.jp>2018-08-08 06:47:55 +0300
commit2763238982bad1ceee80f20e7a0751d276dbccfe (patch)
treea691c6ac0780291559e38993ccc52db85caf635e
parent0d80384dd9a0e9fbe82679b4ccdcba002b39016d (diff)
brush up use of autotools
* name bootstrap script bootstrap as well as other xrdp repos * use pkg-config to get pulseaudio version and module directories * guess prefix by checking for pulseaudio executable * simplify message then PULSE_DIR not specified as m4_text_box doesn't support multiple lines
-rwxr-xr-xbootstrap (renamed from bootstrap.sh)0
-rw-r--r--configure.ac33
2 files changed, 21 insertions, 12 deletions
diff --git a/bootstrap.sh b/bootstrap
index 3b076d1..3b076d1 100755
--- a/bootstrap.sh
+++ b/bootstrap
diff --git a/configure.ac b/configure.ac
index 91c812f..87877fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,11 +13,20 @@ AM_PROG_AR
AM_INIT_AUTOMAKE([-Wall foreign silent-rules])
AM_SILENT_RULES([yes])
+PKG_PROG_PKG_CONFIG
+if test "x$PKG_CONFIG" = "x"; then
+ AC_MSG_ERROR([pkg-config not found])
+fi
+
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# get system's pulseaudio version
-m4_define([pa_major], [`echo $(pulseaudio --version) | cut -d' ' -f2 | cut -d. -f1`])
-m4_define([pa_minor], [`echo $(pulseaudio --version) | cut -d' ' -f2 | cut -d. -f2`])
+m4_define([pa_major], [`$PKG_CONFIG --modversion libpulse | cut -d. -f1`])
+m4_define([pa_minor], [`$PKG_CONFIG --modversion libpulse | cut -d. -f2`])
+# pulseaudio module/lib directory
+PA_LIBDIR=`$PKG_CONFIG --variable=libdir libpulse`
+PA_MODDIR=`$PKG_CONFIG --variable=modlibexecdir libpulse`
+PA_PREFIX=`$PKG_CONFIG --variable=prefix libpulse`
AC_SUBST([PA_MAJOR], [pa_major])
AC_SUBST([PA_MINOR], [pa_minor])
@@ -39,25 +48,25 @@ AC_PROG_MAKE_SET
PKG_CHECK_MODULES([XRDP], [xrdp >= 0.9.0])
AC_SUBST(XRDP_CFLAGS)
-m4_define([PULSE_MSG], [pulseaudio source code directory not specified.
- please download the required sources from:
- https://freedesktop.org/software/pulseaudio/releases/
- and run ./configure PULSE_DIR=<path to sources>])
+m4_define([PULSE_MSG], [PULSE_DIR not specified. Follow the instructions in README.md.])
AC_ARG_VAR([PULSE_DIR], [pulseaudio source code directory])
AS_IF([test x"$PULSE_DIR" == x""],
- AC_MSG_ERROR([m4_text_box([PULSE_MSG])])
- )
+cat <<__MSG__
+m4_text_box([PULSE_MSG])
+__MSG__
+AC_MSG_ERROR([PULSE_DIR not specified])
+)
-# change default prefix so modules will be installed where system pulseaudio is
-AC_PREFIX_DEFAULT(["/usr"])
+# use the prefix as same as pulseaudio
+AC_PREFIX_PROGRAM(pulseaudio)
# copied from pulseaudio
AC_ARG_WITH(
[module-dir],
[AS_HELP_STRING([--with-module-dir],
- [Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules)])],
- [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules"])
+ [Directory where to install the modules to (defaults to `pkg-config --variable=modlibexecdir libpulse`)])],
+ [modlibexecdir=$withval], [modlibexecdir="${PA_MODDIR}"])
AC_SUBST(modlibexecdir)
# Checks for header files.