IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8841


Ignore:
Timestamp:
Sep 19, 2006, 2:18:12 PM (20 years ago)
Author:
Paul Price
Message:

Adding --enable-tests to configure script, to allow choice as to when the tests are built. Removed xml from build.

Location:
trunk/psLib
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/configure.ac

    r8789 r8841  
    2929
    3030SRCPATH='${top_srcdir}/src'
    31 SRCDIRS="sys astro db fft fits imageops jpeg math mathtypes types xml"
     31SRCDIRS="sys astro db fft fits imageops jpeg math mathtypes types"   dnl xml
    3232# escape two escapes at this level so \\ gets passed to the shell and \ to perl
    3333SRCINC=`echo "${SRCDIRS=}" | ${PERL} -pe "s|(\w+)|-I\\\\${SRCPATH=}/\1|g"`
     
    3939AC_PROG_MAKE_SET
    4040
    41 dnl handle debug building
     41dnl handle optimized building
    4242AC_ARG_ENABLE(optimize,
    4343  [AS_HELP_STRING(--enable-optimize,enable compiler optimization)],
    4444  [AC_MSG_RESULT(compile optimization enabled)
    45    CFLAGS="${CFLAGS=} -O2"],
     45   CFLAGS="${CFLAGS=} -O2"
     46   PSLIB_CFLAGS="${PSLIB_CFLAGS=} -DPS_NO_TRACE"],
    4647  [AC_MSG_RESULT([compile optimization disabled])
    4748   CFLAGS="${CFLAGS=} -O0 -g"]
     
    6970   PSLIB_CFLAGS="${PSLIB_CFLAGS=} -DPS_NO_TRACE"]
    7071)
     72
     73dnl build tests at the same time as the source code
     74AC_ARG_ENABLE(tests,
     75  [AS_HELP_STRING(--enable-tests,build tests at same time as source)],
     76  [AC_MSG_RESULT(test building enabled)
     77   tests=true],
     78   [tests=false])
     79AM_CONDITIONAL(BUILD_TESTS, test x$tests = xtrue)
    7180
    7281AC_LANG(C)
     
    303312
    304313dnl ------------------- XML2 options ---------------------
    305 AC_ARG_WITH(xml2-config,
    306 [AS_HELP_STRING(--with-xml2-config=FILE,Specify location of xml2-config.)],
    307 [XML_CONFIG=$withval],
    308 [XML_CONFIG=`which xml2-config`])
    309 AC_CHECK_FILE($XML_CONFIG,[],
    310     [AC_MSG_ERROR([GNOME XML C parser is required.  Obtain it at http://www.xmlsoft.org or use --with-xml2-config to specify location.])])
    311 
    312 AC_MSG_CHECKING([xml2 version])
    313 XML_VERSION=`xml2-config --version`
    314 XML_VERSION_major=`echo $XML_VERSION | ${PERL} -pe 's|^(\d+).*|\1|'`
    315 XML_VERSION_minor=`echo $XML_VERSION | ${PERL} -pe 's|^(\d+)\.(\d+).*|\2|'`
    316 dnl First test the minimum version of 2.6
    317 if test $XML_VERSION_major -lt 2 || ( test $XML_VERSION_major -eq 2 && test $XML_VERSION_minor -lt 6 )
    318 then
    319         AC_MSG_ERROR([requires libxml2 2.6.0 or greater, found $XML_VERSION.  Install newer version or use --with-xml2-config to specify another location.])
    320 else
    321     AC_MSG_RESULT([$XML_VERSION... yes])
    322 fi
    323 
    324 AC_MSG_CHECKING([xml2 cflags])
    325 XML_CFLAGS="`${XML_CONFIG} --cflags`"
    326 AC_MSG_RESULT([${XML_CFLAGS}])
    327 
    328 AC_MSG_CHECKING([xml2 ldflags])
    329 XML_LDFLAGS="`${XML_CONFIG} --libs`"
    330 AC_MSG_RESULT([${XML_LDFLAGS}])
    331 
    332 PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${XML_CFLAGS}"
    333 PSLIB_LIBS="${PSLIB_LIBS=} ${XML_LDFLAGS}"
    334 
    335 AC_SUBST([XML_CFLAGS])
     314dnl AC_ARG_WITH(xml2-config,
     315dnl [AS_HELP_STRING(--with-xml2-config=FILE,Specify location of xml2-config.)],
     316dnl [XML_CONFIG=$withval],
     317dnl [XML_CONFIG=`which xml2-config`])
     318dnl AC_CHECK_FILE($XML_CONFIG,[],
     319dnl     [AC_MSG_ERROR([GNOME XML C parser is required.  Obtain it at http://www.xmlsoft.org or use --with-xml2-config to specify location.])])
     320dnl
     321dnl AC_MSG_CHECKING([xml2 version])
     322dnl XML_VERSION=`xml2-config --version`
     323dnl XML_VERSION_major=`echo $XML_VERSION | ${PERL} -pe 's|^(\d+).*|\1|'`
     324dnl XML_VERSION_minor=`echo $XML_VERSION | ${PERL} -pe 's|^(\d+)\.(\d+).*|\2|'`
     325dnl dnl First test the minimum version of 2.6
     326dnl if test $XML_VERSION_major -lt 2 || ( test $XML_VERSION_major -eq 2 && test $XML_VERSION_minor -lt 6 )
     327dnl then
     328dnl     AC_MSG_ERROR([requires libxml2 2.6.0 or greater, found $XML_VERSION.  Install newer version or use --with-xml2-config to specify another location.])
     329dnl else
     330dnl     AC_MSG_RESULT([$XML_VERSION... yes])
     331dnl fi
     332dnl
     333dnl AC_MSG_CHECKING([xml2 cflags])
     334dnl XML_CFLAGS="`${XML_CONFIG} --cflags`"
     335dnl AC_MSG_RESULT([${XML_CFLAGS}])
     336dnl
     337dnl AC_MSG_CHECKING([xml2 ldflags])
     338dnl XML_LDFLAGS="`${XML_CONFIG} --libs`"
     339dnl AC_MSG_RESULT([${XML_LDFLAGS}])
     340dnl
     341dnl PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${XML_CFLAGS}"
     342dnl PSLIB_LIBS="${PSLIB_LIBS=} ${XML_LDFLAGS}"
     343dnl
     344dnl AC_SUBST([XML_CFLAGS])
    336345
    337346dnl ------------------- SWIG options ---------------------
     
    376385AC_CHECK_PROG(doxygen,[doxygen],[true],[false])
    377386AM_CONDITIONAL(DOXYGEN, test x$doxygen = xtrue)
     387
    378388
    379389dnl ------- restore CFLAGS / LDFLAGS (tests done) --------
     
    402412  src/mathtypes/Makefile
    403413  src/types/Makefile
    404   src/xml/Makefile
    405414  test/Makefile
    406415  test/sys/Makefile
     
    414423  test/mathtypes/Makefile
    415424  test/types/Makefile
    416   test/xml/Makefile
    417425  test/FullUnitTest
    418426  test/pstap/Makefile
     
    424432  Doxyfile
    425433])
     434dnl src/xml/Makefile
     435dnl test/xml/Makefile
     436
    426437
    427438#if test "$SWIG_REQ" == "yes"
  • trunk/psLib/src/pslib_strict.h

    r7767 r8841  
    99*  @author Eric Van Alst, MHPCC
    1010*
    11 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2006-06-30 02:44:42 $
     11*  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2006-09-20 00:18:11 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4141#include "psFitsTable.h"
    4242
    43 #include "psXML.h"
     43//#include "psXML.h"
    4444
    4545#include "psImageConvolve.h"
  • trunk/psLib/test/astro/Makefile.am

    r8718 r8841  
    1313        test.ser7.dat
    1414
    15 check_PROGRAMS =
     15TEST_PROGS =
     16
     17if BUILD_TESTS
     18bin_PROGRAMS = $(TEST_PROGS)
     19else
     20check_PROGRAMS = $(TEST_PROGS)
     21endif
     22TESTS = $(TEST_PROGS)
    1623
    1724CLEANFILES = $(check_DATA) temp/* core core.* *~ *.bb *.bbg *.da gmon.out
  • trunk/psLib/test/db/Makefile.am

    r8718 r8841  
    55        $(PSLIB_LIBS)
    66
    7 check_PROGRAMS =
     7TEST_PROGS =
     8
     9if BUILD_TESTS
     10bin_PROGRAMS = $(TEST_PROGS)
     11else
     12check_PROGRAMS = $(TEST_PROGS)
     13endif
     14TESTS = $(TEST_PROGS)
    815
    916CLEANFILES = $(check_DATA) temp/* core core.* *~ *.bb *.bbg *.da gmon.out
  • trunk/psLib/test/fft/Makefile.am

    r8718 r8841  
    55        $(PSLIB_LIBS)
    66
    7 check_PROGRAMS =
     7TEST_PROGS =
     8
     9if BUILD_TESTS
     10bin_PROGRAMS = $(TEST_PROGS)
     11else
     12check_PROGRAMS = $(TEST_PROGS)
     13endif
     14TESTS = $(TEST_PROGS)
    815
    916CLEANFILES = $(check_DATA) temp/* core core.* *~ *.bb *.bbg *.da gmon.out
  • trunk/psLib/test/fits/Makefile.am

    r8718 r8841  
    55        $(PSLIB_LIBS)
    66
    7 check_PROGRAMS =
     7TEST_PROGS =
     8
     9if BUILD_TESTS
     10bin_PROGRAMS = $(TEST_PROGS)
     11else
     12check_PROGRAMS = $(TEST_PROGS)
     13endif
     14TESTS = $(TEST_PROGS)
    815
    916CLEANFILES = $(check_DATA) temp/* multi.fits table.fits tmpImages/* core core.* *~ \
  • trunk/psLib/test/imageops/Makefile.am

    r8718 r8841  
    55        $(PSLIB_LIBS)
    66
    7 check_PROGRAMS =
     7TEST_PROGS =
     8
     9if BUILD_TESTS
     10bin_PROGRAMS = $(TEST_PROGS)
     11else
     12check_PROGRAMS = $(TEST_PROGS)
     13endif
     14TESTS = $(TEST_PROGS)
    815
    916CLEANFILES = $(check_DATA) temp/* fOut.fits sOut.fits fBiOut.fits sBiOut.fits \
  • trunk/psLib/test/jpeg/Makefile.am

    r8718 r8841  
    55        $(PSLIB_LIBS)
    66
    7 check_PROGRAMS =
     7TEST_PROGS =
     8
     9if BUILD_TESTS
     10bin_PROGRAMS = $(TEST_PROGS)
     11else
     12check_PROGRAMS = $(TEST_PROGS)
     13endif
     14TESTS = $(TEST_PROGS)
    815
    916CLEANFILES = $(check_DATA) core core.* *~ *.bb *.bbg *.da gmon.out
  • trunk/psLib/test/math/Makefile.am

    r8718 r8841  
    55        $(PSLIB_LIBS)
    66
    7 check_PROGRAMS =
     7TEST_PROGS =
     8
     9if BUILD_TESTS
     10bin_PROGRAMS = $(TEST_PROGS)
     11else
     12check_PROGRAMS = $(TEST_PROGS)
     13endif
     14TESTS = $(TEST_PROGS)
    815
    916CLEANFILES = $(check_DATA) temp/* seed_msglog1.txt core core.* *~ *.bb *.bbg *.da gmon.out
  • trunk/psLib/test/mathtypes/Makefile.am

    r8731 r8841  
    1010        $(PSLIB_LIBS)
    1111
    12 check_PROGRAMS = \
     12TEST_PROGS = \
    1313        tap_psVector
     14
     15if BUILD_TESTS
     16bin_PROGRAMS = $(TEST_PROGS)
     17else
     18check_PROGRAMS = $(TEST_PROGS)
     19endif
     20TESTS = $(TEST_PROGS)
    1421
    1522CLEANFILES = $(check_DATA) temp/* core core.* *~ *.bb *.bbg *.da gmon.out
  • trunk/psLib/test/mathtypes/tap_psVector.c

    r8791 r8841  
    11#include <stdio.h>
     2#include <string.h>
    23#include <pslib.h>
    34
  • trunk/psLib/test/pstap/src/Makefile.am

    r8731 r8841  
    55        $(PSLIB_LIBS)
    66
     7TEST_LTLIBS = libpstap.la
     8libpstap_la_SOURCES = pstap.c
    79noinst_HEADERS = pstap.h
    8 check_LTLIBRARIES = libpstap.la
    910
    10 libpstap_la_SOURCES = pstap.c
     11if BUILD_TESTS
     12lib_LTLIBRARIES = $(TEST_LTLIBS)
     13else
     14check_LTLIBRARIES = $(TEST_LTLIBS)
     15endif
     16
  • trunk/psLib/test/sys/Makefile.am

    r8731 r8841  
    1010        $(PSLIB_LIBS)
    1111
     12TEST_PROGS = \
     13        tap_psStringSubstitute
    1214
    13 check_PROGRAMS = \
    14         tap_psStringSubstitute
     15if BUILD_TESTS
     16bin_PROGRAMS = $(TEST_PROGS)
     17else
     18check_PROGRAMS = $(TEST_PROGS)
     19endif
     20TESTS = $(TEST_PROGS)
    1521
    1622CLEANFILES = $(check_DATA) temp/* log.txt log2.txt test.fits tst_psTrace02_OUT \
  • trunk/psLib/test/sys/tap_psStringSubstitute.c

    r8791 r8841  
    11#include <stdio.h>
     2#include <string.h>
    23#include <pslib.h>
    34
  • trunk/psLib/test/tap/configure.in

    r7862 r8841  
    1717                ;;
    1818esac
     19
     20dnl build tests at the same time as the source code
     21AC_ARG_ENABLE(tests,
     22  [AS_HELP_STRING(--enable-tests,build tests at same time as source)],
     23  [AC_MSG_RESULT(test building enabled)
     24   tests=true],
     25   [tests=false])
     26AM_CONDITIONAL(BUILD_TESTS, test x$tests = xtrue)
    1927
    2028# Checks for header files
  • trunk/psLib/test/tap/src/Makefile.am

    r8731 r8841  
    1 check_LTLIBRARIES = libtap.la
     1TEST_LTLIBS = libtap.la
    22libtap_la_SOURCES = tap.c tap.h
     3include_HEADERS = tap.h
     4
     5if BUILD_TESTS
     6lib_LTLIBRARIES = $(TEST_LTLIBS)
     7else
     8check_LTLIBRARIES = $(TEST_LTLIBS)
     9endif
    310
    411man_MANS = tap.3
    512EXTRA_DIST = $(man_MANS)
    613
    7 include_HEADERS = tap.h
  • trunk/psLib/test/types/Makefile.am

    r8814 r8841  
    1111AM_CFLAGS = -DXML_CONFIG_FILE="\"$(top_srcdir)/etc/pslib/psTime.xml\""
    1212
    13 check_PROGRAMS = \
     13TEST_PROGS = \
    1414        tap_psMetadataIterator \
    1515        tap_psListIterator \
     
    2525        tap_psArray_all \
    2626        tap_psArguments_all
     27
     28if BUILD_TESTS
     29bin_PROGRAMS = $(TEST_PROGS)
     30else
     31check_PROGRAMS = $(TEST_PROGS)
     32endif
     33TESTS = $(TEST_PROGS)
    2734
    2835check_DATA = \
  • trunk/psLib/test/types/tap_psListIterator.c

    r8786 r8841  
    11#include <stdio.h>
     2#include <string.h>
    23#include <pslib.h>
    34
  • trunk/psLib/test/types/tap_psMetadataConfigRead.c

    r8775 r8841  
    11#include <stdio.h>
     2#include <string.h>
    23#include <pslib.h>
    34
  • trunk/psLib/test/types/tap_psMetadataItemParse.c

    r8731 r8841  
    11#include <pslib.h>
     2#include <string.h>
    23
    34#include "tap.h"
  • trunk/psLib/test/types/tap_psMetadataIterator.c

    r8731 r8841  
    11#include <stdio.h>
     2#include <string.h>
    23#include <pslib.h>
    34
  • trunk/psLib/test/types/tap_psMetadata_copying.c

    r8731 r8841  
    1212
    1313#include <pslib.h>
     14#include <string.h>
    1415
    1516#include "tap.h"
  • trunk/psLib/test/types/tap_psMetadata_creating.c

    r8786 r8841  
    1414
    1515#include <pslib.h>
     16#include <string.h>
    1617
    1718#include "tap.h"
  • trunk/psLib/test/types/tap_psMetadata_manip.c

    r8731 r8841  
    1212
    1313#include <pslib.h>
     14#include <string.h>
    1415
    1516#include "tap.h"
  • trunk/psLib/test/types/tap_psMetadata_polynomials.c

    r8786 r8841  
    1212
    1313#include <pslib.h>
     14#include <string.h>
    1415
    1516#include "tap.h"
  • trunk/psLib/test/types/tap_psMetadata_printing.c

    r8731 r8841  
    1111 */
    1212
     13#include <stdio.h>
     14#include <string.h>
    1315#include <fcntl.h>
    1416#include <pslib.h>
  • trunk/psLib/test/xml/Makefile.am

    r8718 r8841  
    55        $(PSLIB_LIBS)
    66
    7 check_PROGRAMS =
     7TEST_PROGS =
     8
     9if BUILD_TESTS
     10bin_PROGRAMS = $(TEST_PROGS)
     11else
     12check_PROGRAMS = $(TEST_PROGS)
     13endif
     14TESTS = $(TEST_PROGS)
    815
    916EXTRA_DIST = psTime.xml psTime2.xml psTime3.xml psTime4.xml
Note: See TracChangeset for help on using the changeset viewer.