]> git.sesse.net Git - vlc/commitdiff
* Makefile.am: "[ -x foo ]" only works if "foo" is in the current directory,
authorSam Hocevar <sam@videolan.org>
Wed, 1 Feb 2006 11:20:52 +0000 (11:20 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 1 Feb 2006 11:20:52 +0000 (11:20 +0000)
    there is no easy way to check for the presence of an executable, but
    trying to execute it ("foo --version >/dev/null") is usually safe.

Makefile.am

index 6ce0a0d9ef8db7a5f2a44a501a4628d3076b853e..55522724e17ee797d51caa57985460cd4cf954aa 100644 (file)
@@ -920,7 +920,7 @@ if BUILD_ACTIVEX
        $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
 endif
 # Rebase all those DLLs to speed up loading (need cygwin rebase)
-       if [ -x rebase ]; then \
+       if rebase -b 0x42 /dev/null >/dev/null 2>&1; then \
                find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
        fi
 
@@ -931,11 +931,11 @@ package-win32-base: package-win32-base-debug
 
 package-win32-base-exe:
 # Create package
-       if [ -x makensis ]; then \
+       if makensis -VERSION >/dev/null 2>&1; then \
            MAKENSIS=makensis; \
        elif [ -x "/cygdrive/c/Program Files/NSIS/makensis" ]; then \
            MAKENSIS="/cygdrive/c/Program\ Files/NSIS/makensis"; \
-       elif [ -x wine ]; then \
+       elif wine --version >dev/null 2>&1; then \
            MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe"; \
        else \
            echo 'Error: cannot locate makensis tool'; exit 1; \
@@ -1045,7 +1045,7 @@ if BUILD_ACTIVEX
        $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
 endif
 # Rebase all those DLLs to speed up loading (need cygwin rebase)
-       if [ -x rebase ]; then \
+       if rebase -b 0x42 /dev/null >/dev/null 2>&1; then \
                find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
        fi