]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: Use glibtoolize on osx
authorJan Tulak <jtulak@redhat.com>
Mon, 3 Aug 2015 00:07:42 +0000 (10:07 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 3 Aug 2015 00:07:42 +0000 (10:07 +1000)
OS X doesn't have libtoolize binary by default, and the available$
ports are named "glibtoolize". Autodetect this issue.

Signed-off-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Makefile

index 4b6439be3fa708b595a8030cad258216954a0475..19fb8c5ffd612877cd0cea5018ca5bd079b1a93e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -52,6 +52,14 @@ ifneq ("$(XGETTEXT)","")
 TOOL_SUBDIRS += po
 endif
 
+# If we are on OS X, use glibtoolize from MacPorts, as OS X doesn't have
+# libtoolize binary itself.
+LIBTOOLIZE_TEST=$(shell libtoolize --version >/dev/null 2>&1 && echo found)
+LIBTOOLIZE_BIN=libtoolize
+ifneq ("$(LIBTOOLIZE_TEST)","found")
+LIBTOOLIZE_BIN=glibtoolize
+endif
+
 # include is listed last so it is processed last in clean rules.
 SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) include
 
@@ -81,13 +89,14 @@ else
 clean: # if configure hasn't run, nothing to clean
 endif
 
+
 # Recent versions of libtool require the -i option for copying auxiliary
 # files (config.sub, config.guess, install-sh, ltmain.sh), while older
 # versions will copy those files anyway, and don't understand -i.
-LIBTOOLIZE_INSTALL = `libtoolize -n -i >/dev/null 2>/dev/null && echo -i`
+LIBTOOLIZE_INSTALL = `$(LIBTOOLIZE_BIN) -n -i >/dev/null 2>/dev/null && echo -i`
 
 configure:
-       libtoolize -c $(LIBTOOLIZE_INSTALL) -f
+       $(LIBTOOLIZE_BIN) -c $(LIBTOOLIZE_INSTALL) -f
        cp include/install-sh .
        aclocal -I m4
        autoconf