From 750435233795f6dd91b0b984beb7a68fd18c50a8 Mon Sep 17 00:00:00 2001 From: midipix Date: Aug 05 2018 09:58:41 +0000 Subject: build system: configure, Makefile.in: added initial pkgconfig support. --- diff --git a/Makefile.in b/Makefile.in index b825744..a58763d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,6 +6,15 @@ GIT_REFERENCE_INDEX = @git_reference_index@ CUSTOM_INSTALL_HEADERS = @custom_install_headers@ AVOID_VERSION = @avoid_version@ +PKGNAME = @pkgname@ +PKGDESC = @pkgdesc@ +PKGUSRC = @pkgusrc@ +PKGREPO = @pkgrepo@ +PKGPSRC = @pkgpsrc@ +PKGDURL = @pkgdurl@ +PKGDEFS = @pkgdefs@ +PKGLIBS = @pkglibs@ + BUILD = @build@ HOST = @host@ CCHOST = @cchost@ @@ -268,9 +277,9 @@ clean: clean-implib rm -f $(STATIC_APP) -.display: .display-project .display-env .display-tools .display-flags \ - .display-pe .display-elf .display-dirs .display-build \ - .display-config +.display: .display-project .display-pkgconf .display-env \ + .display-tools .display-flags .display-pe .display-elf \ + .display-dirs .display-build .display-config .conf: PAGER ?= less .conf: @@ -284,6 +293,17 @@ clean: clean-implib @echo BUILD_DIR:' '$(CURDIR) @echo +.display-pkgconf: + @echo PKGNAME:' '$(PKGNAME) + @echo PKGDESC:' '$(PKGDESC) + @echo PKGUSRC:' '$(PKGUSRC) + @echo PKGREPO:' '$(PKGREPO) + @echo PKGPSRC:' '$(PKGPSRC) + @echo PKGDURL:' '$(PKGDURL) + @echo PKGDEFS:' '$(PKGDEFS) + @echo PKGLIBS:' '$(PKGLIBS) + @echo + .display-env: @echo BUILD:' '$(BUILD) @echo HOST:' '$(HOST) diff --git a/config.usage b/config.usage index b7c9fce..50f0a3f 100644 --- a/config.usage +++ b/config.usage @@ -9,6 +9,15 @@ supported switches: --avoid-version --source-dir + --pkgname + --pkgdesc + --pkgusrc + --pkgrepo + --pkgpsrc + --pkgdurl + --pkgdefs + --pkglibs + --prefix --exec-prefix --bindir diff --git a/configure b/configure index 472bf07..62955c4 100755 --- a/configure +++ b/configure @@ -165,6 +165,16 @@ common_defaults() [ -z "$mb_source_dir" ] && mb_source_dir=$mb_project_dir [ -z "$mb_avoid_version" ] && mb_avoid_version='no' + # pkgconfig + [ -z "$mb_pkgname" ] && mb_pkgname="$mb_default_pkgname" + [ -z "$mb_pkgdesc" ] && mb_pkgdesc="$mb_default_pkgdesc" + [ -z "$mb_pkgusrc" ] && mb_pkgusrc="$mb_default_pkgusrc" + [ -z "$mb_pkgrepo" ] && mb_pkgrepo="$mb_default_pkgrepo" + [ -z "$mb_pkgpsrc" ] && mb_pkgpsrc="$mb_default_pkgpsrc" + [ -z "$mb_pkgdurl" ] && mb_pkgdurl="$mb_default_pkgdurl" + [ -z "$mb_pkgdefs" ] && mb_pkgdefs="$mb_default_pkgdefs" + [ -z "$mb_pkglibs" ] && mb_pkglibs="$mb_default_pkglibs" + # dirs [ -z "$mb_prefix" ] && [ -z "$mb_prefix_set" ] \ && mb_prefix='/usr/local' @@ -440,6 +450,15 @@ config_copy() -e 's^@custom_install_headers@^'"$mb_custom_install_headers"'^g' \ -e 's^@avoid_version@^'"$mb_avoid_version"'^g' \ \ + -e 's^@pkgname@^'"$mb_pkgname"'^g' \ + -e 's^@pkgdesc@^'"$mb_pkgdesc"'^g' \ + -e 's^@pkgusrc@^'"$mb_pkgusrc"'^g' \ + -e 's^@pkgrepo@^'"$mb_pkgrepo"'^g' \ + -e 's^@pkgpsrc@^'"$mb_pkgpsrc"'^g' \ + -e 's^@pkgdurl@^'"$mb_pkgdurl"'^g' \ + -e 's^@pkgdefs@^'"$mb_pkgdefs"'^g' \ + -e 's^@pkglibs@^'"$mb_pkglibs"'^g' \ + \ -e 's^@build@^'"$mb_build"'^g' \ -e 's^@host@^'"$mb_host"'^g' \ -e 's^@target@^'"$mb_target"'^g' \ @@ -754,6 +773,39 @@ for arg ; do mb_source_dir=${arg#*=} ;; + # pkgconfig + --pkgname=*) + mb_pkgname=${arg#*=} + ;; + + --pkgdesc=*) + mb_pkgdesc=${arg#*=} + ;; + + --pkgusrc=*) + mb_pkgusrc=${arg#*=} + ;; + + --pkgrepo=*) + mb_pkgrepo=${arg#*=} + ;; + + --pkgpsrc=*) + mb_pkgpsrc=${arg#*=} + ;; + + --pkgdurl=*) + mb_pkgdurl=${arg#*=} + ;; + + --pkgdefs=*) + mb_pkgdefs=${arg#*=} + ;; + + --pkglibs=*) + mb_pkglibs=${arg#*=} + ;; + # compatibility --enable-dependency-tracking) ;;