From 5c785f98c5eb95f778345b74fcbdf2fe1dd96061 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 20 Sep 2021 10:19:51 +0000 Subject: make the path to ar(1) configurable, needed by NixOS; suggested by Lukas Epple --- Makefile | 4 ++-- configure | 4 +++- configure.local.example | 9 +++++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1cacdbdc..6871af8d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.538 2021/09/20 10:14:34 schwarze Exp $ +# $Id: Makefile,v 1.539 2021/09/20 10:19:51 schwarze Exp $ # # Copyright (c) 2011, 2013-2021 Ingo Schwarze # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons @@ -513,7 +513,7 @@ Makefile.local config.h: configure $(TESTSRCS) @exit 1 libmandoc.a: $(MANDOC_COBJS) $(LIBMANDOC_OBJS) - ar rs $@ $(MANDOC_COBJS) $(LIBMANDOC_OBJS) + $(AR) rs $@ $(MANDOC_COBJS) $(LIBMANDOC_OBJS) mandoc: $(MAIN_OBJS) libmandoc.a $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD) diff --git a/configure b/configure index c71205b7..5cf4e081 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: configure,v 1.80 2021/09/19 15:05:39 schwarze Exp $ +# $Id: configure,v 1.81 2021/09/20 10:19:51 schwarze Exp $ # # Copyright (c) 2014-2021 Ingo Schwarze # @@ -41,6 +41,7 @@ OSENUM= OSNAME= UTF8_LOCALE= +AR=ar CC=cc CFLAGS= FATAL=0 @@ -634,6 +635,7 @@ INSTALL_TARGETS= cat << __HEREDOC__ BUILD_TARGETS = ${BUILD_TARGETS} INSTALL_TARGETS = ${INSTALL_TARGETS} +AR = ${AR} CC = ${CC} CFLAGS = ${CFLAGS} LDADD = ${LDADD} diff --git a/configure.local.example b/configure.local.example index 302eaaf2..76c06dff 100644 --- a/configure.local.example +++ b/configure.local.example @@ -1,6 +1,6 @@ -# $Id: configure.local.example,v 1.41 2021/09/19 16:19:09 schwarze Exp $ +# $Id: configure.local.example,v 1.42 2021/09/20 10:19:51 schwarze Exp $ # -# Copyright (c) 2014-2019 Ingo Schwarze +# Copyright (c) 2014-2021 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -36,6 +36,11 @@ CC=gcc # IBM AIX may need: CC=xlc +# By default, "ar" is used as the library archive builder, but it +# can be overridden. For example, NixOS may not have ar(1) in the +# PATH, but may want to specify an absolute path instead. +AR=ar + # For -Tutf8 and -Tlocale operation, mandoc(1) requires # providing setlocale(3) and providing wcwidth(3) and # putwchar(3) with a wchar_t storing UCS-4 values. Theoretically, -- cgit v1.2.3-56-ge451