Skip to content

Commit

Permalink
check dispatch header and then do the blocks runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu committed Feb 14, 2014
1 parent 18f32d0 commit 5ce8d68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ language: c
compiler: clang
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libpng-dev libjpeg-dev libblas-dev libgsl0-dev libblocksruntime-dev
- sudo apt-get install -qq libpng-dev libjpeg-dev libblas-dev libgsl0-dev
script: cd lib && ./configure && make && cd ../test && make test
10 changes: 2 additions & 8 deletions lib/configure
Original file line number Diff line number Diff line change
Expand Up @@ -3381,7 +3381,8 @@ if test $CC = clang; then
ac_fn_c_check_header_mongrel "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
if test "x$ac_cv_header_dispatch_dispatch_h" = xyes; then :
DEFINE_MACROS="$DEFINE_MACROS-D USE_DISPATCH "
MKLDFLAGS="$MKLDFLAGS-ldispatch "
MKCFLAGS="$MKCFLAGS-fblocks "
MKLDFLAGS="$MKLDFLAGS-ldispatch -lBlocksRuntime "
fi
Expand Down Expand Up @@ -3556,13 +3557,6 @@ else
$as_echo "no" >&6; }
fi
# check for block support, only enable dispatch when this is presented
if test $CC = clang; then :
MKCFLAGS="$MKCFLAGS-fblocks "
MKLDFLAGS="$MKLDFLAGS-lBlocksRuntime "
fi
# for display only, concatenate CFLAGS and DEFINE_MACROS
DISCFLAGS="$MKCFLAGS$DEFINE_MACROS"
Expand Down
5 changes: 1 addition & 4 deletions lib/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ AC_CHECK_HEADER([libswscale/swscale.h],
# only check dispatch if compiled with clang
if test $CC = clang; then
AC_CHECK_HEADER([dispatch/dispatch.h],
[AC_SUBST(DEFINE_MACROS, ["$DEFINE_MACROS-D USE_DISPATCH "]) AC_SUBST(MKLDFLAGS, ["$MKLDFLAGS-ldispatch "])])
[AC_SUBST(DEFINE_MACROS, ["$DEFINE_MACROS-D USE_DISPATCH "]) AC_SUBST(MKCFLAGS, ["$MKCFLAGS-fblocks "]) AC_SUBST(MKLDFLAGS, ["$MKLDFLAGS-ldispatch -lBlocksRuntime "])])
fi

# check for gsl, and I need to first check these two before I can check gsl
Expand All @@ -62,9 +62,6 @@ else
AC_MSG_RESULT(no)
fi

# check for block support, only enable dispatch when this is presented
AS_IF([test $CC = clang], [AC_SUBST(MKCFLAGS, ["$MKCFLAGS-fblocks "]) AC_SUBST(MKLDFLAGS, ["$MKLDFLAGS-lBlocksRuntime "])])

# for display only, concatenate CFLAGS and DEFINE_MACROS
AC_SUBST(DISCFLAGS, ["$MKCFLAGS$DEFINE_MACROS"])

Expand Down

0 comments on commit 5ce8d68

Please sign in to comment.