Skip to content

Commit

Permalink
configure: WIP to build libssh2 on mac
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
  • Loading branch information
stewid committed Dec 6, 2016
1 parent 83d8729 commit 56c5bc0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 55 deletions.
47 changes: 1 addition & 46 deletions configure
Expand Up @@ -642,7 +642,6 @@ libssl_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
BREW
OBJEXT
EXEEXT
ac_ct_CC
Expand Down Expand Up @@ -3276,51 +3275,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu

## check for brew on OS X

case "${host_os}" in
darwin*)
# Extract the first word of "brew", so it can be a program name with args.
set dummy brew; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_BREW+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$BREW"; then
ac_cv_prog_BREW="$BREW" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_BREW="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

fi
fi
BREW=$ac_cv_prog_BREW
if test -n "$BREW"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BREW" >&5
$as_echo "$BREW" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test "x${BREW}" = xyes; then
BREW_DIR=`brew --prefix`
fi
;;
esac

# Optional include and library paths

# zlib include and library path
Expand Down Expand Up @@ -3926,6 +3880,7 @@ $as_echo "$as_me: Download and build libssh2" >&6;}
./configure --with-pic --with-openssl --disable-examples-build \
--disable-shared --enable-static \
--prefix=$LIBSSH2_INST_DIR CC="${CC}" \
--with-libssl-prefix="${libssl_CFLAGS}" \
CFLAGS="${CFLAGS} ${CPICFLAGS} -Wno-deprecated-declarations" \
CPPFLAGS="${CPPFLAGS}" LDFLAGS=${LDFLAGS} \
&& make && make install && have_ssh2=yes
Expand Down
19 changes: 10 additions & 9 deletions configure.ac
Expand Up @@ -25,15 +25,15 @@ AC_CANONICAL_HOST
AC_PROG_CC

## check for brew on OS X
AC_DEFUN([AC_PROG_BREW], [AC_CHECK_PROG(BREW,brew,yes)])
case "${host_os}" in
darwin*)
AC_PROG_BREW
if test "x${BREW}" = xyes; then
BREW_DIR=`brew --prefix`
fi
;;
esac
dnl AC_DEFUN([AC_PROG_BREW], [AC_CHECK_PROG(BREW,brew,yes)])
dnl case "${host_os}" in
dnl darwin*)
dnl AC_PROG_BREW
dnl if test "x${BREW}" = xyes; then
dnl BREW_DIR=`brew --prefix`
dnl fi
dnl ;;
dnl esac

# Optional include and library paths

Expand Down Expand Up @@ -210,6 +210,7 @@ case "${host_os}" in
./configure --with-pic --with-openssl --disable-examples-build \
--disable-shared --enable-static \
--prefix=$LIBSSH2_INST_DIR CC="${CC}" \
--with-libssl-prefix="${libssl_CFLAGS}" \
CFLAGS="${CFLAGS} ${CPICFLAGS} -Wno-deprecated-declarations" \
CPPFLAGS="${CPPFLAGS}" LDFLAGS=${LDFLAGS} \
&& make && make install && have_ssh2=yes
Expand Down

0 comments on commit 56c5bc0

Please sign in to comment.