source: gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/IMAGEMAGICK.sh@ 27284

Last change on this file since 27284 was 27284, checked in by ak19, 11 years ago

Putting back the previously-commented lines that resort to using clang for CC. Now this is only done if clang exists on the darwin. It looks like clang as CC is needed for OS versions lion and mountain lion (10.7 and 10.8), which come with clang.

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2
3package=ImageMagick
4version=-6.8.2-9
5
6progname=$0
7
8source ../cascade-make/lib/cascade-lib.bash GEXTIMAGEMAGICK ../.. $*
9
10prefix=$GEXTIMAGEMAGICK_INSTALLED
11
12export CFLAGS="$CFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
13export CPPFLAGS="$CPPFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
14export CXXFLAGS="$CXXFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
15export LDFLAGS="$LDFLAGS -L$GEXTIMAGEMAGICK_INSTALLED/lib"
16export LD_LIBRARY_PATH="$GEXTIMAGEMAGICK_INSTALLED/lib"
17
18# If on darwin, check if clang exists. If so, use that as CC, in place of gcc
19# use command -v instead of which to check if a program exists.
20# http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
21if [ "x$GSDLOS" = "xdarwin" ] ; then
22 if command -v clang > /dev/null 2>&1; then
23 echo "Found clang compiler. Switching CC toclang"
24 CROSSCONFIGURE_VARS="CC=clang"
25 fi
26fi
27
28opt_run_untar $force_untar $auto_untar $package $version
29opt_run_configure $force_config $auto_config $package $version $prefix
30
31opt_run_make $compile $package $version
32opt_run_make $install $package $version "install"
33opt_run_make $clean $package $version "clean"
34opt_run_make $distclean $package $version "distclean"
35
36opt_run_tarclean $tarclean $package $version
Note: See TracBrowser for help on using the repository browser.