1#!/bin/sh -e
2
3patch -p1 < 0001-fix-checks-for-argp_parse-and-fts_close.patch
4
5# Build sometimes forces -Werror.
6export CFLAGS="$CFLAGS -Wno-error"
7
8sh ./configure \
9 --prefix=/usr \
10 --disable-symbol-versioning \
11 --disable-debuginfod \
12 --disable-libdebuginfod \
13 --disable-nls \
14 ac_cv_c99=yes # Override check for Clang.
15
16# Utility functions that need argp and fts, not strictly necessary
17# for the library to function
18:>libdwfl/argp-std.c
19:>libdwfl/linux-kernel-modules.c
20
21# Useless stuff
22printf '%s\n' "all:" "install:" > src/Makefile
23
24# linux-lts will error out on unknown type name for Relr
25sed '/Relr/d' libelf/gelf.h > _
26mv -f _ libelf/gelf.h
27
28make
29make DESTDIR="$1" install
30
31# Compress manpages
32find "$1/usr/share/man" -type f -exec gzip -n -9 {} +