IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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.

File:
1 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"
Note: See TracChangeset for help on using the changeset viewer.