Skip to content

Commit

Permalink
fixing mac linking issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasgriffin committed Dec 20, 2024
1 parent f334771 commit 7bbca78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/make_zbar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ info "Building $pkgname..."
if [ "$BUILD_TYPE" = "wine" ] ; then
echo "libzbar_la_LDFLAGS += -Wc,-static" >> zbar/Makefile.am
echo "LDFLAGS += -Wc,-static" >> Makefile.am
LDFLAGS="-L/usr/local/lib -liconv" # Example for adding libiconv
fi
if ! [ -x configure ] ; then
autoreconf -vfi || fail "Could not run autoreconf for $pkgname. Please make sure you have automake and libtool installed, and try again."
Expand All @@ -56,17 +57,20 @@ info "Building $pkgname..."
--disable-dependency-tracking"
elif [ $(uname) == "Darwin" ]; then
# macos target
LDFLAGS="-L/opt/local/lib -liconv" # Adjust for macOS specific libiconv path if needed
AUTOCONF_FLAGS="$AUTOCONF_FLAGS \
--with-x=no \
--enable-video=no \
--with-jpeg=no"
else
# linux target
LDFLAGS="-L/usr/lib/x86_64-linux-gnu -liconv" # Adjust based on your distro
AUTOCONF_FLAGS="$AUTOCONF_FLAGS \
--with-x=yes \
--enable-video=yes \
--with-jpeg=yes"
fi
export LDFLAGS
./configure \
$AUTOCONF_FLAGS \
--prefix="$here/$pkgname/dist" \
Expand Down

0 comments on commit 7bbca78

Please sign in to comment.