Changeset 10386
- Timestamp:
- Dec 1, 2006, 12:23:27 PM (19 years ago)
- File:
-
- 1 edited
-
branches/eam_01_branch/psphot/configure.ac (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_01_branch/psphot/configure.ac
r10281 r10386 22 22 [AS_HELP_STRING(--enable-optimize,enable compiler optimization)], 23 23 [AC_MSG_RESULT(compile optimization enabled) 24 CFLAGS=" -O2"],24 CFLAGS="${CFLAGS=} -O2 -g"], 25 25 [AC_MSG_RESULT([compile optimization disabled]) 26 CFLAGS="-O0 -g"] 26 if test x"${CFLAGS}" == x; then 27 CFLAGS="-O0 -g" 28 fi 29 ] 27 30 ) 28 31 … … 31 34 [AS_HELP_STRING(--enable-profile,enable compiler profiler information inclusion)], 32 35 [AC_MSG_RESULT(compile optimization enabled) 33 CFLAGS="${CFLAGS=} -pg"] 36 CFLAGS="${CFLAGS=} -pg -g" 37 LDFLAGS="${LDFLAGS=} -pg"] 38 ) 39 40 dnl turn off trace messages 41 AC_ARG_ENABLE(trace, 42 [AS_HELP_STRING(--disable-trace,disable psTrace functionality)], 43 [AC_MSG_RESULT(psTrace disabled) 44 PSPHOT_CFLAGS="${PSPHOT_CFLAGS=} -DPS_NO_TRACE"] 34 45 ) 35 46 … … 50 61 TMP_CPPFLAGS=${CPPFLAGS} 51 62 63 dnl test for command-line options: use ohana-config if not supplied 64 KAPA_CFLAGS_CONFIG="true" 65 KAPA_LIBS_CONFIG="true" 52 66 AC_ARG_WITH(kapa, 53 67 [AS_HELP_STRING(--with-kapa=DIR,Specify location of libkapa)], 54 [KAPA_CFLAGS="-I$withval/include" 55 KAPA_ LDFLAGS="-L$withval/lib"])68 [KAPA_CFLAGS="-I$withval/include" KAPA_LIBS="-L$withval/lib" 69 KAPA_CFLAGS_CONFIG="false" KAPA_LIBS_CONFIG="false"]) 56 70 AC_ARG_WITH(kapa-include, 57 71 [AS_HELP_STRING(--with-kapa-include=DIR,Specify libkapa include directory.)], 58 [KAPA_CFLAGS="-I$withval" ])72 [KAPA_CFLAGS="-I$withval" KAPA_CFLAGS_CONFIG="false"]) 59 73 AC_ARG_WITH(kapa-lib, 60 74 [AS_HELP_STRING(--with-kapa-lib=DIR,Specify libkapa library directory.)], 61 [KAPA_LDFLAGS="-L$withval"]) 62 63 CFLAGS="${CFLAGS} ${KAPA_CFLAGS}" 64 CPPFLAGS=${CFLAGS} 65 LDFLAGS="${LDFLAGS} ${KAPA_LIBS}" 66 67 AC_CHECK_HEADERS([kapa.h],[], 68 [AC_MSG_ERROR([libkapa headers not found. Obtain it at http://kiawe.ifa.hawaii.edu/Elixir/Ohana or use --with-kapa to specify location.])] 69 ) 70 AC_CHECK_LIB(kapa,KapaInitGraph,[], 71 [AC_MSG_ERROR([libkapa headers not found. Obtain it at http://kiawe.ifa.hawaii.edu/Elixir/Ohana or use --with-kapa to specify location.])],[-lm] 72 ) 73 74 AC_SUBST([KAPA_CFLAGS]) 75 [KAPA_LIBS="-L$withval" KAPA_LIBS_CONFIG="false"]) 76 77 echo "KAPA_CFLAGS_CONFIG: $KAPA_CFLAGS_CONFIG" 78 echo "KAPA_LIBS_CONFIG: $KAPA_LIBS_CONFIG" 79 echo "KAPA_CFLAGS: $KAPA_CFLAGS" 80 echo "KAPA_LIBS: $KAPA_LIBS" 81 82 if test "true" = "true" ; then 83 echo "success" 84 else 85 echo "failure" 86 fi 87 88 dnl HAVE_KAPA is set to false if any of the tests fail 89 HAVE_KAPA="true" 90 AC_MSG_NOTICE([checking for libkapa]) 91 if test "$KAPA_CFLAGS_CONFIG" = "true" -o "$KAPA_LIBS_CONFIG" = "true"; then 92 AC_MSG_NOTICE([kapa info supplied by ohana-config]) 93 KAPA_CONFIG=`which ohana-config` 94 AC_CHECK_FILE($KAPA_CONFIG,[], 95 [HAVE_KAPA="false"; AC_MSG_ERROR([libkapa is not found: output plots disabled. Obtain libkapa at http://kiawe.ifa.hawaii.edu/Elixir/Ohana or use --with-kapa to specify location])]) 96 97 echo "HAVE_KAPA: $HAVE_KAPA" 98 echo "KAPA_CFLAGS_CONFIG: $KAPA_CFLAGS_CONFIG" 99 100 if test "$HAVE_KAPA" = "true" -a "$KAPA_CFLAGS_CONFIG" = "true" ; then 101 AC_MSG_NOTICE([libkapa cflags info supplied by ohana-config]) 102 AC_MSG_CHECKING([libkapa cflags]) 103 KAPA_CFLAGS="`${KAPA_CONFIG} --cflags`" 104 AC_MSG_RESULT([${KAPA_CFLAGS}]) 105 fi 106 107 if test "$HAVE_KAPA" = "true" -a "$KAPA_LIBS_CONFIG" = "true" ; then 108 AC_MSG_NOTICE([libkapa ldflags info supplied by ohana-config]) 109 AC_MSG_CHECKING([libkapa ldflags]) 110 KAPA_LIBS="`${KAPA_CONFIG} --libs` -lX11" 111 AC_MSG_RESULT([${KAPA_LIBS}]) 112 fi 113 fi 114 115 if test "$HAVE_KAPA" = "true" ; then 116 AC_MSG_NOTICE([libkapa supplied]) 117 PSPHOT_CFLAGS="${PSPHOT_CFLAGS} ${KAPA_CFLAGS}" 118 PSPHOT_LIBS="${PSPHOT_LIBS} ${KAPA_LIBS}" 119 else 120 AC_MSG_NOTICE([libkapa ignored]) 121 fi 122 123 dnl HAVE_KAPA is set to false if any of the tests fail 124 dnl HAVE_KAPA=true 125 dnl AC_CHECK_HEADERS([kapa.h], 126 dnl [PSPHOT_CFLAGS="$PSPHOT_CFLAGS $KAPA_CFLAGS" AC_SUBST(KAPA_CFLAGS)], 127 dnl [HAVE_KAPA=false; AC_MSG_WARN([libkapa headers not found: output plots disabled. Obtain libkapa at http://kiawe.ifa.hawaii.edu/Elixir/Ohana or use --with-kapa to specify location.])] 128 dnl ) 129 dnl AC_CHECK_LIB(kapa,KapaInitGraph, 130 dnl [PSPHOT_LIBS="$PSPHOT_LIBS $JPEG_LDFLAGS -ljpeg"], 131 dnl [HAVE_KAPA=false; AC_MSG_WARN([libkapa headers not found: output plots disabled. Obtain libkapa at http://kiawe.ifa.hawaii.edu/Elixir/Ohana or use --with-kapa to specify location.])],[-lm] 132 dnl ) 75 133 76 134 dnl restore the CFLAGS/LDFLAGS … … 80 138 CPPFLAGS=${TMP_CPPFLAGS} 81 139 140 dnl ------------------ libjpeg options --------------------- 141 142 dnl save LIBS/CFLAGS/LDFLAGS 143 TMP_LIBS=${LIBS} 144 TMP_CFLAGS=${CFLAGS} 145 TMP_LDFLAGS=${LDFLAGS} 146 TMP_CPPFLAGS=${CPPFLAGS} 147 148 AC_ARG_WITH(jpeg, 149 [AS_HELP_STRING(--with-jpeg=DIR,Specify location of libjpeg.)], 150 [JPEG_CFLAGS="-I$withval/include" 151 JPEG_LDFLAGS="-L$withval/lib"]) 152 AC_ARG_WITH(jpeg-include, 153 [AS_HELP_STRING(--with-jpeg-include=DIR,Specify libjpeg include directory.)], 154 [JPEG_CFLAGS="-I$withval"]) 155 AC_ARG_WITH(jpeg-lib, 156 [AS_HELP_STRING(--with-jpeg-lib=DIR,Specify libjpeg library directory.)], 157 [JPEG_LDFLAGS="-L$withval"]) 158 159 CFLAGS="${CFLAGS} ${JPEG_CFLAGS}" 160 CPPFLAGS=${CFLAGS} 161 LDFLAGS="${LDFLAGS} ${JPEG_LDFLAGS}" 162 163 AC_CHECK_HEADERS([jpeglib.h], 164 [PSPHOT_CFLAGS="$PSPHOT_CFLAGS $JPEG_CFLAGS" AC_SUBST(JPEG_CFLAGS)], 165 [HAVE_KAPA=false; AC_MSG_WARN([libjpeg headers not found: output plots disabled. Obtain libjpeg from http://www.ijg.org/ or use --with-jpeg to specify location.])] 166 ) 167 168 AC_CHECK_LIB(jpeg,jpeg_CreateCompress, 169 [PSPHOT_LIBS="$PSPHOT_LIBS $JPEG_LDFLAGS -ljpeg"], 170 [HAVE_KAPA=false; AC_MSG_WARN([libjpeg library not found: output plots disabled. Obtain libjpeg from http://www.ijg.org/ or use --with-jpeg to specify location.])] 171 ) 172 173 dnl restore the CFLAGS/LDFLAGS 174 LIBS=${TMP_LIBS} 175 CFLAGS=${TMP_CFLAGS} 176 LDFLAGS=${TMP_LDFLAGS} 177 CPPFLAGS=${TMP_CPPFLAGS} 178 179 dnl ------------------ libpng options --------------------- 180 181 dnl save LIBS/CFLAGS/LDFLAGS 182 TMP_LIBS=${LIBS} 183 TMP_CFLAGS=${CFLAGS} 184 TMP_LDFLAGS=${LDFLAGS} 185 TMP_CPPFLAGS=${CPPFLAGS} 186 187 AC_ARG_WITH(png, 188 [AS_HELP_STRING(--with-png=DIR,Specify location of libpng.)], 189 [PNG_CFLAGS="-I$withval/include" 190 PNG_LDFLAGS="-L$withval/lib"]) 191 AC_ARG_WITH(png-include, 192 [AS_HELP_STRING(--with-png-include=DIR,Specify libpng include directory.)], 193 [PNG_CFLAGS="-I$withval"]) 194 AC_ARG_WITH(png-lib, 195 [AS_HELP_STRING(--with-png-lib=DIR,Specify libpng library directory.)], 196 [PNG_LDFLAGS="-L$withval"]) 197 198 CFLAGS="${CFLAGS} ${PNG_CFLAGS}" 199 CPPFLAGS=${CFLAGS} 200 LDFLAGS="${LDFLAGS} ${PNG_LDFLAGS}" 201 202 AC_CHECK_HEADERS([png.h], 203 [PSPHOT_CFLAGS="$PSPHOT_CFLAGS $PNG_CFLAGS" AC_SUBST(PNG_CFLAGS)], 204 [HAVE_KAPA=false; AC_MSG_WARN([libpng headers not found: output plots disabled. Obtain libpng from http://www.ijg.org/ or use --with-png to specify location.])] 205 ) 206 207 AC_CHECK_LIB(png,png_init_io, 208 [PSPHOT_LIBS="$PSPHOT_LIBS $PNG_LDFLAGS -lpng"], 209 [HAVE_KAPA=false; AC_MSG_WARN([libpng library not found: output plots disabled. Obtain libpng from http://www.ijg.org/ or use --with-png to specify location.])] 210 ) 211 212 dnl restore the CFLAGS/LDFLAGS 213 LIBS=${TMP_LIBS} 214 CFLAGS=${TMP_CFLAGS} 215 LDFLAGS=${TMP_LDFLAGS} 216 CPPFLAGS=${TMP_CPPFLAGS} 217 218 dnl ------------------ use kapa or not? --------------------- 219 220 if test "$HAVE_KAPA" == "true" ; then 221 AC_MSG_RESULT([including plotting functions]) 222 AC_DEFINE([HAVE_KAPA],[1],[enable use of libkapa]) 223 else 224 AC_MSG_RESULT([skipping plotting functions]) 225 AC_DEFINE([HAVE_KAPA],[0],[disable use of libkapa]) 226 fi 227 82 228 dnl ------------- psLib, psModules --------------- 83 229 PKG_CHECK_MODULES(PSLIB, pslib >= 0.12.99) … … 86 232 dnl Set CFLAGS for build 87 233 CFLAGS="${CFLAGS} -Wall -Werror -std=c99" 234 echo "PSPHOT_CFLAGS: $PSPHOT_CFLAGS" 235 echo "PSPHOT_LIBS: $PSPHOT_LIBS" 88 236 89 237 AC_SUBST([PSPHOT_CFLAGS])
Note:
See TracChangeset
for help on using the changeset viewer.
