1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
|
# FORS_SET_PREFIX(PREFIX)
#-------------------------
AC_DEFUN([FORS_SET_SEX_PREFIX],
[
if test "x$exec_prefix" != "xNONE"; then
sex_exec_prefix=$exec_prefix/lib/${PACKAGE}-${VERSION}/bin
ac_configure_args="$ac_configure_args SEXBINPATH=$sex_exec_prefix"
elif test "x$prefix" != "xNONE"; then
sex_exec_prefix=$prefix/lib/${PACKAGE}-${VERSION}/bin
ac_configure_args="$ac_configure_args SEXBINPATH=$sex_exec_prefix"
else
sex_exec_prefix=$ac_default_prefix/lib/${PACKAGE}-${VERSION}/bin
ac_configure_args="$ac_configure_args SEXBINPATH=$sex_exec_prefix"
fi
])
# FORS_SET_VERSION_INFO(VERSION, [CURRENT], [REVISION], [AGE])
#--------------------------------------------------------------
# Setup various version information, especially the libtool versioning
AC_DEFUN([FORS_SET_VERSION_INFO],
[
fors_version=`echo "$1" | sed -e 's/[[a-z,A-Z]].*$//'`
fors_major_version=`echo "$fors_version" | \
sed 's/\([[0-9]]*\).\(.*\)/\1/'`
fors_minor_version=`echo "$fors_version" | \
sed 's/\([[0-9]]*\).\([[0-9]]*\)\(.*\)/\2/'`
fors_micro_version=`echo "$fors_version" | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test -z "$fors_major_version"; then
fors_major_version=0
fi
if test -z "$fors_minor_version"; then
fors_minor_version=0
fi
if test -z "$fors_micro_version"; then
fors_micro_version=0
fi
FORS_VERSION="$fors_version"
FORS_MAJOR_VERSION=$fors_major_version
FORS_MINOR_VERSION=$fors_minor_version
FORS_MICRO_VERSION=$fors_micro_version
if test -z "$4"; then
FORS_INTERFACE_AGE=0
else
FORS_INTERFACE_AGE="$4"
fi
FORS_BINARY_AGE=`expr 100 '*' $FORS_MINOR_VERSION + $FORS_MICRO_VERSION`
FORS_BINARY_VERSION=`expr 10000 '*' $FORS_MAJOR_VERSION + \
$FORS_BINARY_AGE`
AC_SUBST(FORS_VERSION)
AC_SUBST(FORS_MAJOR_VERSION)
AC_SUBST(FORS_MINOR_VERSION)
AC_SUBST(FORS_MICRO_VERSION)
AC_SUBST(FORS_INTERFACE_AGE)
AC_SUBST(FORS_BINARY_VERSION)
AC_SUBST(FORS_BINARY_AGE)
AC_DEFINE_UNQUOTED(FORS_MAJOR_VERSION, $FORS_MAJOR_VERSION,
[FORS pipeline major version number])
AC_DEFINE_UNQUOTED(FORS_MINOR_VERSION, $FORS_MINOR_VERSION,
[FORS pipeline minor version number])
AC_DEFINE_UNQUOTED(FORS_MICRO_VERSION, $FORS_MICRO_VERSION,
[FORS pipeline micro version number])
AC_DEFINE_UNQUOTED(FORS_INTERFACE_AGE, $FORS_INTERFACE_AGE,
[FORS pipeline interface age])
AC_DEFINE_UNQUOTED(FORS_BINARY_VERSION, $FORS_BINARY_VERSION,
[FORS pipeline binary version number])
AC_DEFINE_UNQUOTED(FORS_BINARY_AGE, $FORS_BINARY_AGE,
[FORS pipeline binary age])
ESO_SET_LIBRARY_VERSION([$2], [$3], [$4])
])
# FORS_SET_PATHS
#----------------
# Define auxiliary directories of the installed directory tree.
AC_DEFUN([FORS_SET_PATHS],
[
if test -z "$plugindir"; then
plugindir='${libdir}/cpl/plugins/${PACKAGE}-${VERSION}'
fi
if test -z "$privatelibdir"; then
privatelibdir='${libdir}/${PACKAGE}-${VERSION}'
fi
if test -z "$pipedocsdir"; then
pipedocsdir='${datadir}/doc/${PACKAGE}-${VERSION}/'
fi
htmldir='${pipedocsdir}/html'
# if test -z "$htmldir"; then
# htmldir='${datadir}/doc/${PACKAGE}/html'
# fi
if test -z "$configdir"; then
configdir='${prefix}/share/cpl-plugins/${PACKAGE}-${VERSION}/config'
fi
if test -z "$wkfextradir"; then
wkfextradir='${datadir}/cpl-plugins/${PACKAGE}-${VERSION}/reflex'
fi
if test -z "$wkfcopydir"; then
wkfcopydir='${datadir}/reflex/workflows/${PACKAGE}-${VERSION}'
fi
AC_SUBST(plugindir)
AC_SUBST(privatelibdir)
AC_SUBST(htmldir)
AC_SUBST(pipedocsdir)
AC_SUBST(configdir)
AC_SUBST(wkfextradir)
AC_SUBST(wkfcopydir)
# Define a preprocesor symbol for the plugin search paths
AC_DEFINE_UNQUOTED(FORS_PLUGIN_DIR,"cpl/plugins",
[Plugin directory tree prefix])
eval plugin_dir="$plugindir"
plugin_path=`eval echo $plugin_dir | \
sed -e "s/\/${PACKAGE}-${VERSION}.*$//"`
AC_DEFINE_UNQUOTED(FORS_PLUGIN_PATH, "$plugin_path",
[Absolute path to the plugin directory tree])
# Define the preprocessor symbols for the sextractor executable
# and the configuration files.
eval sext_bindir="/usr/bin"
AC_DEFINE_UNQUOTED(FORS_SEXTRACTOR_PATH, "$sext_bindir",
[Absolute path to the sextractor executable])
AC_SUBST(sext_bindir)
eval d="$configdir"
eval sext_configdir="$d"
AC_DEFINE_UNQUOTED(FORS_SEXTRACTOR_CONFIG, "$sext_configdir",
[Absolute path to the sextractor configuration files])
])
# FORS_CREATE_SYMBOLS
#---------------------
# Define include and library related makefile symbols
AC_DEFUN([FORS_CREATE_SYMBOLS],
[
# Symbols for package include file and library search paths
FORS_INCLUDES='-I$(top_srcdir)/fors'
FORS_LDFLAGS='-L$(top_builddir)/fors'
IRPLIB_INCLUDES='-I$(top_srcdir)/irplib'
MOSCA_INCLUDES='-I$(top_srcdir)/mosca/libmosca'
# No -L for IRPLIB which is statically linked
#WCSLIB_LDFLAGS='-L$(top_builddir)/wcslib-4.2/C'
#WCSLIB_INCLUDES='-I$(top_srcdir)/wcslib-4.2/C'
# Library aliases
LIBFORS='$(top_builddir)/fors/libfors.la'
#LIBWCSLIB='$(top_builddir)/wcslib-4.2/C/libwcs-4.2.a'
LIBIRPLIB='$(top_builddir)/irplib/libirplib.la'
LIBMOSCA='$(top_builddir)/mosca/libmosca/libmosca.la'
# Substitute the defined symbols
AC_SUBST(FORS_INCLUDES)
AC_SUBST(FORS_LDFLAGS)
AC_SUBST(LIBFORS)
#AC_SUBST(WCSLIB_INCLUDES)
#AC_SUBST(WCSLIB_LDFLAGS)
#AC_SUBST(LIBWCSLIB)
AC_SUBST(IRPLIB_INCLUDES)
AC_SUBST(LIBIRPLIB)
AC_SUBST(MOSCA_INCLUDES)
AC_SUBST(LIBMOSCA)
# Check for CPL and user defined libraries
AC_REQUIRE([CPL_CHECK_LIBS])
AC_REQUIRE([ESO_CHECK_EXTRA_LIBS])
all_includes='$(FORS_INCLUDES) $(MOSCA_INCLUDES) $(CPL_INCLUDES) $(CX_INCLUDES) $(IRPLIB_INCLUDES) $(EXTRA_INCLUDES)'
all_ldflags='$(FORS_LDFLAGS) $(CPL_LDFLAGS) $(CX_LDFLAGS) $(EXTRA_LDFLAGS)'
AC_SUBST(all_includes)
AC_SUBST(all_ldflags)
])
# FORS_ENABLE_ONLINE
#--------------------
# Enable the building of extra tools for PSO.
AC_DEFUN([FORS_ENABLE_ONLINE],
[
AH_TEMPLATE([ONLINE_MODE],
[Define if online support tools should be built])
AC_ARG_ENABLE(online,
AC_HELP_STRING([--enable-online],
[enable online support for PSO [[default=no]]]),
fors_enable_online=$enableval, fors_enable_online=no)
AC_CACHE_CHECK([whether an online support should be enabled],
fors_cv_enable_online,
fors_cv_enable_online=$fors_enable_online)
#
# if test x"$fors_cv_enable_online" = xyes; then
#
# PSFEXDIR=psfex
# PSFEX_CONFIG="masktoccd.psfex masktoccd_1.sex masktoccd_2.sex"
#
# AC_DEFINE(ONLINE_MODE)
#
# else
#
# PSFEXDIR=""
# PSFEX_CONFIG=""
#
# fi
#
AM_CONDITIONAL([ONLINE_MODE], [test x$fors_cv_enable_online = xyes])
# AC_SUBST(PSFEXDIR)
# AC_SUBST(PSFEX_CONFIG)
])
|