diff options
author | nytpu <alex@nytpu.com> | 2021-05-22 13:56:33 -0600 |
---|---|---|
committer | nytpu <alex@nytpu.com> | 2021-05-22 13:57:33 -0600 |
commit | 67958063af0bcc57669d2fef755822eb38ba4ad2 (patch) | |
tree | 58811fd40e1767b9e4d5d98d23b4a693fc8fc974 /configure | |
parent | add license header to README.7 (diff) | |
download | ed-67958063af0bcc57669d2fef755822eb38ba4ad2.tar.bz2 ed-67958063af0bcc57669d2fef755822eb38ba4ad2.zip |
add pkg-config var to configure
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -19,14 +19,16 @@ set_macro() { } add_lib() { - pkg-config --print-errors "$@" - cflags $(pkg-config --cflags "$@") - for lib in "$@"; do ldadd "$lib" $(pkg-config --libs "$lib"); done + ${pkgconfig} --print-errors "$@" + cflags $(${pkgconfig} --cflags "$@") + for lib in "$@"; do ldadd "$lib" $(${pkgconfig} --libs "$lib"); done } # save stdout and redirec to config.mk exec >config.mk +pkgconfig=pkg-config + echo "# Configuration for makefile for nytpu's implementation of ed(1)" echo "# This file was generated automatically by configure. Don't edit." @@ -37,13 +39,14 @@ for opt in "$@"; do echo "Usage: $0 [--OPTION]..." echo echo "Options and variables: [defaults in brackets]" - echo " -h, --help display this help text" - echo " --prefix=DIR install into DIR [/usr]" - echo " --bindir=DIR location to install executables [\$(PREFIX)/bin]" - echo " --mandir=DIR location to install man pages [\$(PREFIX)/share/man]" - echo " --cc=COMPILER command to invoke the C11 compiler [cc]" - echo " --cflags=FLAGS command line options for the C compiler [-Wall -Wextra -Wfatal-errors -Wno-missing-field-initializers -Wno-unused-parameter -std=c11 -O2]" - echo " --ldflags=FLAGS command line options for the linker []" + echo " -h, --help display this help text" + echo " --prefix=DIR install into DIR [/usr]" + echo " --bindir=DIR location to install executables [\$(PREFIX)/bin]" + echo " --mandir=DIR location to install man pages [\$(PREFIX)/share/man]" + echo " --cc=COMPILER command to invoke the C11 compiler [cc]" + echo " --cflags=FLAGS command line options for the C compiler [-Wall -Wextra -Wfatal-errors -Wno-missing-field-initializers -Wno-unused-parameter -std=c11 -O2]" + echo " --ldflags=FLAGS command line options for the linker []" + echo " --pkgconfig=COMMAND command to run to configure packages [pkg-config]" ;; --prefix=*) echo "PREFIX = ${opt#*=}" ;; --bindir=*) echo "BINDIR = ${opt#*=}" ;; @@ -51,6 +54,7 @@ for opt in "$@"; do --cc=*) echo "CC = ${opt#*=}" ;; --cflags=*) echo "CFLAGS = ${opt#*=}" ;; --ldflags=*) echo "LDFLAGS = ${opt#*=}" ;; + --pkg-config=*) pkgconfig=${opt#*=} ;; *) echo "warning: unsupported option ${opt}" >&2 ;; esac done |