[beast: 3/4] BUILD: provide BSEINCLUDEDIR via bse API and bse.pc for IDL code headers



commit c736ad1d9f7a2f21b4e839b0a1c9e4a7c972d480
Author: Tim Janik <timj gnu org>
Date:   Wed Nov 4 15:08:38 2015 +0100

    BUILD: provide BSEINCLUDEDIR via bse API and bse.pc for IDL code headers
    
    Reported-by: Stefan Westerfeld <stefan space twc de>
    Signed-off-by: Tim Janik <timj gnu org>

 bse/Makefile.am      |    2 +-
 configure.ac         |   13 +++++++++----
 data/bse.pc.in       |    5 ++---
 sfi/Makefile.am      |    2 +-
 sfi/glib-extra.cc    |    2 +-
 sfi/glib-extra.hh    |    2 +-
 sfi/sfidl-options.cc |    2 +-
 7 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/bse/Makefile.am b/bse/Makefile.am
index b1c69e5..f2eac38 100644
--- a/bse/Makefile.am
+++ b/bse/Makefile.am
@@ -135,7 +135,7 @@ EXTRA_DIST += $(strip \
 # BSE library
 #
 lib_LTLIBRARIES                      = libbse- MAJOR@.la
-libbse_ MAJOR@includedir             = $(includedir)/bse- MAJOR@/bse
+libbse_ MAJOR@includedir             = $(bseincludedir)/bse
 libbse_ MAJOR@include_HEADERS        = $(bse_public_headers) bse.idl $(bse_idl_sources) bsehack.idl 
$(idl_dummy_files)
 nodist_libbse_ MAJOR@include_HEADERS = bsebasics.genidl.hh
 libbse_ MAJOR@_la_SOURCES            = $(bse_sources) $(bse_proc_gen_sources)
diff --git a/configure.ac b/configure.ac
index ee6fa50..074a04f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,18 +73,22 @@ LT_VERSION_INFO="$lt_current:$lt_revision:$lt_age"
 AC_SUBST(LT_VERSION_INFO)
 
 # Define package directories per major/minor version
+bseincludedir="\${includedir}/bse-$MAJOR"
 bselibdir="\${libdir}/bse-$MAJOR.$MINOR.$MICRO"
 datadir="\${datarootdir}/beast"
 docdir="${datarootdir}/doc/beast" # "beast-$MAJOR"
 # Substitute directories in Makefiles
+AC_SUBST(bseincludedir)
 AC_SUBST(bselibdir)
 AC_SUBST(datadir)
 AC_SUBST(docdir)
 # Provide directories for C++
-bak_prefix="$prefix" ; bak_exec_prefix="$exec_prefix" ; bak_libdir="$libdir" ; 
bak_datarootdir="$datarootdir" ; bak_datadir="$datadir"
+bak_prefix="$prefix"; bak_exec_prefix="$exec_prefix"; bak_libdir="$libdir"
+bak_datarootdir="$datarootdir"; bak_datadir="$datadir"; bak_includedir="$includedir"
 test "x$prefix" = xNONE && prefix="$ac_default_prefix" ; test "x$exec_prefix" = xNONE && 
exec_prefix="$prefix"
-libdir=`eval echo "${libdir}"` ; datarootdir=`eval echo "${datarootdir}"` ; datadir=`eval echo "${datadir}"`
-AC_DEFINE_UNQUOTED(INSTALLPATH_INCLUDES, ["`eval echo "${includedir}"`"], [Base directory for standard 
include files])
+libdir=`eval echo "${libdir}"` ; datarootdir=`eval echo "${datarootdir}"` ;
+datadir=`eval echo "${datadir}"`; bseincludedir=`eval echo "${bseincludedir}"`
+AC_DEFINE_UNQUOTED(INSTALLPATH_BSEINCLUDEDIR, ["`eval echo "${bseincludedir}"`"], [Sfidl standard include 
directory])
 AC_DEFINE_UNQUOTED(INSTALLPATH_BINDIR, ["`eval echo "${bindir}"`"], [Directory to install and execute 
programs])
 AC_DEFINE_UNQUOTED(INSTALLPATH_LOCALEBASE, ["`eval echo ${localedir}`"], [Base directory for locale specific 
message catalogs])
 AC_DEFINE_UNQUOTED(INSTALLPATH_LADSPA, ["`eval echo ${libdir}/ladspa`"], [Searchpath for LADSPA plugins])
@@ -92,7 +96,8 @@ AC_DEFINE_UNQUOTED(INSTALLPATH_BSELIBDIR, ["`eval echo ${bselibdir}`"], [Directo
 AC_DEFINE_UNQUOTED(INSTALLPATH_DATADIR, ["`eval echo ${datadir}`"], [Directory to install samples, effects, 
scripts, etc])
 AC_DEFINE_UNQUOTED(INSTALLPATH_DOCDIR, ["`eval echo ${docdir}`"], [Directory to install documentation])
 AC_DEFINE_UNQUOTED(INSTALLPATH_USER_DATA, ["~/beast"], [Searchpath for user owned Beast resources])
-prefix="$bak_prefix" ; exec_prefix="$bak_exec_prefix" ; libdir="$bak_libdir" ; 
datarootdir="$bak_datarootdir" ; datadir="$bak_datadir"
+prefix="$bak_prefix"; exec_prefix="$bak_exec_prefix"; libdir="$bak_libdir"
+datarootdir="$bak_datarootdir"; datadir="$bak_datadir"; includedir="$bak_includedir"
 
 # Build tree checks
 AC_MSG_CHECKING([for git repository])
diff --git a/data/bse.pc.in b/data/bse.pc.in
index 5d1f005..4fd115d 100644
--- a/data/bse.pc.in
+++ b/data/bse.pc.in
@@ -3,8 +3,7 @@ exec_prefix= exec_prefix@
 libdir= libdir@
 datarootdir= datarootdir@
 datadir= datadir@
-includedir= includedir@
-pkgincludedir= includedir@/bse- MAJOR@
+bseincludedir= bseincludedir@
 
 sfidl= exec_prefix@/sfidl
 demodir= datadir@/demo
@@ -20,4 +19,4 @@ Description: Beast & Bse are an audio tracker and audio synthesis engine.
 Requires: @BSE_PC_REQUIRE@ gobject-2.0 gmodule-2.0 rapicorn
 Version: @PACKAGE_VERSION@
 Libs: -L${libdir} -lbse- MAJOR@ @BSE_PC_LIBS@
-Cflags: -I${pkgincludedir} @BSE_PC_CFLAGS@
+Cflags: -I${bseincludedir} @BSE_PC_CFLAGS@
diff --git a/sfi/Makefile.am b/sfi/Makefile.am
index fa2201f..6df570f 100644
--- a/sfi/Makefile.am
+++ b/sfi/Makefile.am
@@ -35,7 +35,7 @@ $(sfi_all_sources): $(sfi_built_sources)
 
 # SFI library
 noinst_LTLIBRARIES            = libsfi- MAJOR@.la
-libsfi_ MAJOR@includedir      = $(includedir)/bse- MAJOR@/sfi
+libsfi_ MAJOR@includedir      = $(bseincludedir)/sfi
 libsfi_ MAJOR@include_HEADERS = $(sfi_public_headers)
 libsfi_ MAJOR@_la_SOURCES     = $(sfi_all_sources)
 libsfi_ MAJOR@_la_LIBADD      = $(SFI_LIBS) -lm
diff --git a/sfi/glib-extra.cc b/sfi/glib-extra.cc
index 22ebce0..78e9363 100644
--- a/sfi/glib-extra.cc
+++ b/sfi/glib-extra.cc
@@ -1033,7 +1033,7 @@ bse_installpath (BseInstallpathType installpath_type)
 {
   switch (installpath_type)
     {
-    case BSE_INSTALLPATH_INCLUDES:                      return INSTALLPATH_INCLUDES;
+    case BSE_INSTALLPATH_BSEINCLUDEDIR:                 return INSTALLPATH_BSEINCLUDEDIR;
     case BSE_INSTALLPATH_BINDIR:                        return INSTALLPATH_BINDIR;
     case BSE_INSTALLPATH_LOCALEBASE:                    return INSTALLPATH_LOCALEBASE;
     case BSE_INSTALLPATH_LADSPA:                        return INSTALLPATH_LADSPA;
diff --git a/sfi/glib-extra.hh b/sfi/glib-extra.hh
index 1c98990..0b23034 100644
--- a/sfi/glib-extra.hh
+++ b/sfi/glib-extra.hh
@@ -306,7 +306,7 @@ GScanner*   g_scanner_new64                 (const GScannerConfig *config_templ);
 // == BSE_INSTALLPATH ==
 // See also configure.ac, this function is here because all of sfi, bse and beast include this file.
 enum BseInstallpathType {
-  BSE_INSTALLPATH_INCLUDES = 1,
+  BSE_INSTALLPATH_BSEINCLUDEDIR = 1,
   BSE_INSTALLPATH_BINDIR,
   BSE_INSTALLPATH_LOCALEBASE,
   BSE_INSTALLPATH_LADSPA,
diff --git a/sfi/sfidl-options.cc b/sfi/sfidl-options.cc
index 1347481..fbea1d5 100644
--- a/sfi/sfidl-options.cc
+++ b/sfi/sfidl-options.cc
@@ -168,7 +168,7 @@ bool Options::parse (int *argc_p, char **argv_p[], const Parser& parser)
   /* add std include path */
   if (!noStdInc)
     {
-      const std::string stdinc_path = bse_installpath (BSE_INSTALLPATH_INCLUDES);
+      const std::string stdinc_path = bse_installpath (BSE_INSTALLPATH_BSEINCLUDEDIR);
       char *dir = strtok (const_cast<char*> (stdinc_path.c_str()), G_SEARCHPATH_SEPARATOR_S);
       while (dir && dir[0])
        {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]