sr/srd/cli: Fix compiling with Homebrew.
authorPekka Nikander <pekka.nikander@senseg.com>
Fri, 11 May 2012 16:23:21 +0000 (19:23 +0300)
committerUwe Hermann <uwe@hermann-uwe.de>
Tue, 15 May 2012 18:58:20 +0000 (20:58 +0200)
Add ACLOCAL_DIR setting and AM_PROG_AR macro for compiling with Homebrew
under Mac OS X.

Applies essentially the same change to
{libsigrok,libsigrokdecode,sigrok-cli}/{autogen.sh,configure.ac}

It may be that the same fix is needed for the other autogen.sh and/or
configure.ac files, but that hasn't been tested and therefore not in
this commit.

autogen.sh
configure.ac

index a49d17b63fcde65964ba465882b7d1f1c5a1229d..8185af0ff59805251307db641375ef434859b667 100755 (executable)
@@ -32,6 +32,9 @@ if [ "x$OS" = "xDarwin" ]; then
        elif [ -d /opt/local/share/aclocal ]; then
                # Macports installs aclocal macros here
                ACLOCAL_DIR="-I /opt/local/share/aclocal"
+       elif [ -d /usr/local/share/aclocal ]; then
+               # Homebrew installs aclocal macros here
+               ACLOCAL_DIR="-I /usr/local/share/aclocal"
        elif [ -d /usr/share/aclocal ]; then
                # Xcode installs aclocal macros here
                ACLOCAL_DIR="-I /usr/share/aclocal"
index 0d7f71050a0a08205bb2f17ac1e5c1f2a48ec6aa..f42f0f4c930ab08f9bb25349a57b54e887be57be 100644 (file)
@@ -36,6 +36,7 @@ AC_CONFIG_AUX_DIR([autostuff])
 # We require at least automake 1.11 (needed for 'silent rules').
 AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign std-options])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 
 AH_TOP([#ifndef SRD_CONFIG_H
 #define SRD_CONFIG_H    /* To stop multiple inclusions. */])