From 8427cefe77dc3d3bcca196360997d400d7629e24 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 30 Sep 2003 18:36:28 +0000 Subject: [PATCH] r7930: fixes for backproject and pjrec --- Makefile.in | 2 +- configure | 31 ++++++++++++++++--------------- configure.ac | 9 +++++---- debian/changelog | 6 ++++++ libctsim/backprojectors.cpp | 2 +- tools/pjrec.cpp | 11 +++++++---- 6 files changed, 36 insertions(+), 25 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4d72d32..c6a9269 100644 --- a/Makefile.in +++ b/Makefile.in @@ -160,8 +160,8 @@ webenabled = @webenabled@ wxcflags = @wxcflags@ wxconfig = @wxconfig@ wxlibs = @wxlibs@ -@INCLUDED_GETOPT_LONG_TRUE@EXTRA_DIRS1 = getopt @INCLUDED_GETOPT_LONG_FALSE@EXTRA_DIRS1 = +@INCLUDED_GETOPT_LONG_TRUE@EXTRA_DIRS1 = getopt @HAVE_SGP_TRUE@EXTRA_DIRS2 = libctgraphics @HAVE_SGP_FALSE@EXTRA_DIRS2 = diff --git a/configure b/configure index fc903ac..353929b 100755 --- a/configure +++ b/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE wxconfig build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPP EGREP INCLUDED_GETOPT_LONG_TRUE INCLUDED_GETOPT_LONG_FALSE DEBUG_TRUE DEBUG_FALSE lamdir mpienable cgibindir cgibinurl webdatadir webdataurl htmldir cgiprograms htmldata USE_HTML_TRUE USE_HTML_FALSE webenabled USE_LAM_TRUE USE_LAM_FALSE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS X_TOOLKIT_LIBS X_BASIC_LIBS NO_X_TRUE NO_X_FALSE my_includes HAVE_SGP_TRUE HAVE_SGP_FALSE HAVE_WXWINDOWS_TRUE HAVE_WXWINDOWS_FALSE wxcflags wxlibs ctlibs lamprograms lamdefs LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE wxconfig build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPP EGREP INCLUDED_GETOPT_LONG_TRUE INCLUDED_GETOPT_LONG_FALSE DEBUG_TRUE DEBUG_FALSE lamdir mpienable cgibindir cgibinurl webdatadir webdataurl htmldir cgiprograms htmldata USE_HTML_TRUE USE_HTML_FALSE webenabled USE_LAM_TRUE USE_LAM_FALSE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS X_TOOLKIT_LIBS X_BASIC_LIBS NO_X_TRUE NO_X_FALSE my_includes HAVE_SGP_TRUE HAVE_SGP_FALSE wxcflags wxlibs HAVE_WXWINDOWS_TRUE HAVE_WXWINDOWS_FALSE ctlibs lamprograms lamdefs LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1600,7 +1600,7 @@ fi # Define the identity of the package. PACKAGE=ctsim - VERSION=4.2.6 + VERSION=4.2.7 cat >>confdefs.h <<_ACEOF @@ -8076,7 +8076,7 @@ _ACEOF fi -if test $GETOPTLONG==1; then +if test "$GETOPTLONG"="1"; then INCLUDED_GETOPT_LONG_TRUE= INCLUDED_GETOPT_LONG_FALSE='#' else @@ -9741,9 +9741,15 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_SGP 1 _ACEOF + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + -if test 1==1; then +if test "$wxwin" = "true"; then HAVE_SGP_TRUE= HAVE_SGP_FALSE='#' else @@ -9751,11 +9757,6 @@ else HAVE_SGP_FALSE= fi - fi -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi if test "$png" = "true" ; then ctlibs_tools="$ctlibs_tools -lpng" @@ -9956,9 +9957,12 @@ if test "$wxwin" = "true" ; then fi CFLAGS="$CFLAGS -I../include $wxcflags" ctlib_graphics="$ctlib_graphics $wxlibs" +fi + + -if test 1==1 ; then +if test "$wxwin"="true"; then HAVE_WXWINDOWS_TRUE= HAVE_WXWINDOWS_FALSE='#' else @@ -9966,9 +9970,6 @@ else HAVE_WXWINDOWS_FALSE= fi -fi - - LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" ctlibs="$ctlibs_base -lctsim $ctlib_graphics -lctsupport $ctlibs_tools" @@ -10787,10 +10788,10 @@ s,@NO_X_FALSE@,$NO_X_FALSE,;t t s,@my_includes@,$my_includes,;t t s,@HAVE_SGP_TRUE@,$HAVE_SGP_TRUE,;t t s,@HAVE_SGP_FALSE@,$HAVE_SGP_FALSE,;t t -s,@HAVE_WXWINDOWS_TRUE@,$HAVE_WXWINDOWS_TRUE,;t t -s,@HAVE_WXWINDOWS_FALSE@,$HAVE_WXWINDOWS_FALSE,;t t s,@wxcflags@,$wxcflags,;t t s,@wxlibs@,$wxlibs,;t t +s,@HAVE_WXWINDOWS_TRUE@,$HAVE_WXWINDOWS_TRUE,;t t +s,@HAVE_WXWINDOWS_FALSE@,$HAVE_WXWINDOWS_FALSE,;t t s,@ctlibs@,$ctlibs,;t t s,@lamprograms@,$lamprograms,;t t s,@lamdefs@,$lamdefs,;t t diff --git a/configure.ac b/configure.ac index e9f4c40..c684ec1 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl CDPATH= AC_INIT AC_CONFIG_SRCDIR([src/ctsim.cpp]) AM_MAINTAINER_MODE -AM_INIT_AUTOMAKE(ctsim,4.2.6) +AM_INIT_AUTOMAKE(ctsim,4.2.7) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -84,7 +84,7 @@ if test "${getopt_long}" = "false" ; then LDFLAGS="$LDFLAGS -L../getopt" GETOPTLONG=1 fi -AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test $GETOPTLONG==1) +AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test "$GETOPTLONG"="1") if test "${readline}" = "true" ; then ctlibs_base="$ctlibs_base -lreadline" @@ -364,12 +364,13 @@ if test "$no_x" != "yes" ; then fi if test "$wxwin" = "true" ; then AC_DEFINE(HAVE_SGP,1,[use sgp library]) - AM_CONDITIONAL(HAVE_SGP, test 1==1) fi else AC_MSG_RESULT(no) fi +AM_CONDITIONAL(HAVE_SGP, test "$wxwin" = "true") + if test "$png" = "true" ; then ctlibs_tools="$ctlibs_tools -lpng" fi @@ -439,10 +440,10 @@ if test "$wxwin" = "true" ; then fi CFLAGS="$CFLAGS -I../include $wxcflags" ctlib_graphics="$ctlib_graphics $wxlibs" - AM_CONDITIONAL(HAVE_WXWINDOWS, test 1==1 ) fi AC_SUBST(wxcflags) AC_SUBST(wxlibs) +AM_CONDITIONAL(HAVE_WXWINDOWS, test "$wxwin"="true") dnl Setting projet libraries and includes LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" diff --git a/debian/changelog b/debian/changelog index c977612..ecf4c9e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ctsim (4.2.7-1) unstable; urgency=low + + * Fix conditional AM_CONDITIONAL + + -- Kevin M. Rosenberg Mon, 29 Sep 2003 19:47:47 -0600 + ctsim (4.2.6-1) unstable; urgency=low * Update missing file from automake-1.7 diff --git a/libctsim/backprojectors.cpp b/libctsim/backprojectors.cpp index d38b718..581b7ff 100644 --- a/libctsim/backprojectors.cpp +++ b/libctsim/backprojectors.cpp @@ -588,7 +588,7 @@ BackprojectIntDiff::BackprojectView (const double* const filteredProj, const dou #elif SIZEOF_LONG == 8 static const int scaleShift = 32; #endif - static const long scale = (1 << scaleShift); + static const long scale = (1L << scaleShift); static const long scaleBitmask = scale - 1; static const long halfScale = scale / 2; static const double dInvScale = 1. / scale; diff --git a/tools/pjrec.cpp b/tools/pjrec.cpp index ea23048..974d62e 100644 --- a/tools/pjrec.cpp +++ b/tools/pjrec.cpp @@ -100,9 +100,7 @@ pjrec_usage (const char *program) std::cout << " trig Trigometric functions at every point" << std::endl; std::cout << " table Trigometric functions with precalculated table" << std::endl; std::cout << " diff Difference method" << std::endl; - std::cout << " diff2 Optimized difference method (default)" << std::endl; - std::cout << " idiff2 Optimized difference method with integer math" << std::endl; - std::cout << " idiff3 Highly-optimized difference method with integer math" << std::endl; + std::cout << " idiff Difference method with integer math [default]" << std::endl; std::cout << " --filter-param Alpha level for Hamming filter" << std::endl; std::cout << " --trace Set tracing to level" << std::endl; std::cout << " none No tracing (default)" << std::endl; @@ -310,7 +308,12 @@ pjrec_main (int argc, char * const argv[]) imLocal = new ImageFile (nx, ny); #else - projGlobal.read (pszFilenameProj); + + if (! projGlobal.read (pszFilenameProj)) { + fprintf(stderr, "Unable to read projectfile file %s\n", pszFilenameProj); + exit(1); + } + if (bOptVerbose) { std::ostringstream os; projGlobal.printScanInfo(os); -- 2.34.1