aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2021-09-20 10:19:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2021-09-20 10:19:51 +0000
commit5c785f98c5eb95f778345b74fcbdf2fe1dd96061 (patch)
tree1255a25df804d8efecc8d7ded0507ee2099795d3
parent9d3131ba9c806f81e1ad9f541d7f20ca974caf19 (diff)
downloadmandoc-5c785f98c5eb95f778345b74fcbdf2fe1dd96061.tar.gz
mandoc-5c785f98c5eb95f778345b74fcbdf2fe1dd96061.tar.zst
mandoc-5c785f98c5eb95f778345b74fcbdf2fe1dd96061.zip
make the path to ar(1) configurable, needed by NixOS;
suggested by Lukas Epple <sternenseemann at systemli dot org>
-rw-r--r--Makefile4
-rwxr-xr-xconfigure4
-rw-r--r--configure.local.example9
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 <schwarze@openbsd.org>
# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -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 <schwarze@openbsd.org>
#
@@ -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 <schwarze@openbsd.org>
+# Copyright (c) 2014-2021 Ingo Schwarze <schwarze@openbsd.org>
#
# 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 <locale.h>
# providing setlocale(3) and <wchar.h> providing wcwidth(3) and
# putwchar(3) with a wchar_t storing UCS-4 values. Theoretically,