summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2014-12-09 16:41:10 +0100
committerDavid Sterba <dsterba@suse.cz>2015-01-28 18:01:00 +0100
commit27a807277bd3f63a343b73da9e10f5c761e7f139 (patch)
tree0938237a6cb11c3cb17260f77cf7165d98304d0e
parent04743d00436c8f0db9bd8e17775c37abaadab2dd (diff)
btrfs-progs: autoconf: check for build programs in ./configure
Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r--Makefile.in12
-rw-r--r--configure.ac2
2 files changed, 8 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in
index 18c13930..c0247a2a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,9 @@
# Export all variables to sub-makes by default
export
-CC = gcc
-LN = ln
-AR = ar
+CC = @CC@
+LN_S = @LN_S@
+AR = @AR@
AM_CFLAGS = -include config.h -Wall \
-D_FILE_OFFSET_BITS=64 -DBTRFS_FLAT_INCLUDES \
-D_XOPEN_SOURCE=700 \
@@ -27,7 +27,7 @@ libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \
extent_io.h ioctl.h ctree.h btrfsck.h version.h
TESTS = fsck-tests.sh convert-tests.sh
-INSTALL = install
+INSTALL = @INSTALL@
prefix ?= /usr/local
bindir = $(prefix)/bin
lib_LIBS = -luuid -lblkid -lz -llzo2 -L. -pthread
@@ -166,8 +166,8 @@ $(libs_static): $(libbtrfs_objects)
$(lib_links):
@echo " [LN] $@"
- $(Q)$(LN) -sf libbtrfs.so.0.1 libbtrfs.so.0
- $(Q)$(LN) -sf libbtrfs.so.0.1 libbtrfs.so
+ $(Q)$(LN_S) -f libbtrfs.so.0.1 libbtrfs.so.0
+ $(Q)$(LN_S) -f libbtrfs.so.0.1 libbtrfs.so
# keep intermediate files from the below implicit rules around
.PRECIOUS: $(addsuffix .o,$(progs))
diff --git a/configure.ac b/configure.ac
index 937d50fc..662d9ffe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,8 @@ AC_C_BIGENDIAN
AC_SYS_LARGEFILE
AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PATH_PROG([AR], [ar])
AC_CHECK_FUNCS([openat], [],
[AC_MSG_ERROR([cannot find openat() function])])