]> git.armaanb.net Git - asd-repo.git/blob - extra/libelf/build
Adapt for asd linux
[asd-repo.git] / extra / libelf / build
1 #!/bin/sh -e
2
3 # Build sometimes forces -Werror.
4 export CFLAGS="$CFLAGS -Wno-error"
5
6 # Disable configure error for missing argp, fts, and obstack.
7 sed -i -e 's/as_fn_error.*argp/: "/g' \
8        -e 's/as_fn_error.*fts/: "/g' \
9        -e 's/as_fn_error.*obstack/: "/g' configure
10
11 # Don't compile two unrelated C files which require argp.
12 sed -i 's/color.*printversion../#/g' lib/Makefile.in
13
14 ./configure \
15     --prefix=/usr \
16     --disable-symbol-versioning \
17     --disable-debuginfod \
18     --disable-nls \
19     ac_cv_c99=yes # Override check for Clang.
20
21 # Skip the default make target and build only what we need.
22 make -C lib
23 make -C libelf
24 make -C libelf DESTDIR="$1" install
25
26 mkdir -p "$1/usr/lib/pkgconfig"
27 cp -f config/libelf.pc "$1/usr/lib/pkgconfig/libelf.pc"