[json-glib] Update the configure wrapper script



commit ff67a75a0607c3582ccc09fd6d41beb1c2face4a
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Mar 18 14:16:27 2017 +0000

    Update the configure wrapper script
    
    Translate more configure-style arguments to Meson-style ones.
    
    Avoid hardcoding compilers.

 configure |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/configure b/configure
index 33bca51..b2a0754 100755
--- a/configure
+++ b/configure
@@ -1,9 +1,13 @@
 #!/bin/bash
 # configure script adapter for Meson
+# Based on build-api: https://github.com/cgwalters/build-api
 # Copyright 2010, 2011, 2013 Colin Walters <walters verbum org>
 # Copyright 2016 Emmanuele Bassi
 # Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
 
+# Build API variables:
+# buildapi-variable-require-builddir
+
 # Little helper function for reading args from the commandline.
 # it automatically handles -a b and -a=b variants, and returns 1 if
 # we need to shift $3.
@@ -53,6 +57,8 @@ sanitycheck MESON 'meson'
 sanitycheck NINJA 'ninja' 'ninja-build'
 
 enable_docs='-Denable-gtk-doc=false'
+enable_man='-Denable-man=false'
+enable_introspection=''
 
 while (($# > 0)); do
     case "${1%%=*}" in
@@ -68,7 +74,11 @@ while (($# > 0)); do
        --includedir) read_arg includedir "$@" || shift;;
        --enable-gtk-doc) enable_docs='-Denable-gtk-doc=true';;
        --disable-gtk-doc) enable_docs='-Denable-gtk-doc=false';;
-       *) echo "Ignoring unknown option '$1'";;
+       --enable-man) enable_man='-Denable-man=true';;
+       --disable-man) enable_man='-Denable-man=false';;
+       --enable-introspection) enable_introspection='';;
+       --disable-introspection) enable_introspection='-Ddisable_introspection=true';;
+       *) echo -e "\e[1;33mINFO\e[0m: Ignoring unknown option '$1'";;
     esac
     shift
 done
@@ -93,7 +103,7 @@ cat > Makefile <<END
 # Generated by configure; do not edit
 
 all:
-       CC=gcc CXX=g++ ${NINJA}
+       CC="\$(CC)" CXX="\$(CXX)" ${NINJA}
 
 install:
        DESTDIR="\$(DESTDIR)" ${NINJA} install
@@ -112,8 +122,9 @@ echo "  sysconfdir:.. ${sysconfdir}"
 echo "  libdir:...... ${libdir}"
 echo "  mandir:...... ${mandir}"
 echo "  includedir:.. ${includedir}"
+echo "  additional:.."
+echo "    - ${enable_docs} ${enable_man} ${enable_introspection}"
 
-export CC=gcc CXX=g++
 exec ${MESON} \
        --prefix=${prefix} \
        --libdir=${libdir} \
@@ -125,6 +136,8 @@ exec ${MESON} \
        --mandir=${mandir} \
        --default-library shared \
        ${enable_docs} \
+       ${enable_man} \
+       ${enable_introspection} \
        ${srcdir}
 
 # vim: ai ts=8 noet sts=2 ft=sh


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