# process this file with autoconf to produce a configure script

##
## information on the package
##
AC_INIT(Subcommander,2.0.0b5p2,[dev@subcommander.tigris.org])
AC_SUBST(PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR(sublib/version.in.h)
AC_CONFIG_AUX_DIR(ac-helpers)
AM_INIT_AUTOMAKE(subdir-objects)
AH_TOP([
#ifndef SC_CONFIG_H
#define SC_CONFIG_H
])
AH_BOTTOM([
/* gettext */
#define _n(x) x

#ifdef ENABLE_NLS
#include <libintl.h>
// libintl.h defines sprintf to libintl_sprintf. Unfortunately
// QCString has an sprintf method. Since sprintf is a define
// now the linker requires a QCString::libintl_sprintf symbol.
// To fix this we undef sprintf again.
#undef sprintf

#define _(x)  dgettext(PACKAGE_NAME, x)
#define _q(x) QString::fromUtf8(dgettext(PACKAGE_NAME, x))
#define _s(x) sc::String(dgettext(PACKAGE_NAME, x))
#else
#define _(x)  (x)
#define _q(x) QString::fromUtf8(x)
#define _s(x) sc::String(x)
#endif

#endif // SC_CONFIG_H
])


##
## checks for programs
##
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_RANLIB
AC_PROG_MAKE_SET


##
## get host system, we need to know if we are running MacOSX or another Unix
## system
##
AC_CANONICAL_HOST


##
## checks for libraries
##


##
# check for apr
#

APR_FIND_APR([],[],[1], [0 1])

if test x$apr_found = xno; then
  AC_MSG_ERROR([apr not found])
fi

APR_CPPFLAGS="`$apr_config --cppflags`"
APR_INCLUDES="`$apr_config --includes`"
APR_LIBS="`$apr_config --link-ld --libs`"

if test $? -ne 0; then
  AC_MSG_ERROR([apr-config --includes failed])
fi

AC_SUBST(APR_CPPFLAGS)
AC_SUBST(APR_INCLUDES)
AC_SUBST(APR_LIBS)

#
# end check for apr 
##


##
# check for apr-util
#
APR_FIND_APU([],[],[1], [0 1])

if test x$apu_found = xno; then
  AC_MSG_ERROR([apr-util not found])
fi

APU_INCLUDES="`$apu_config --includes`"
APU_LIBS="`$apu_config --ldflags --link-ld --libs`"

if test $? -ne 0; then
  AC_MSG_ERROR([apu-config --includes failed])
fi

AC_SUBST(APU_INCLUDES)
AC_SUBST(APU_LIBS)

#
# end check for apr-util
##


##
# check for boost 
#
AC_MSG_CHECKING([for boost])
AC_ARG_WITH(
  [boost],
  AC_HELP_STRING([--with-boost=DIR],[path to boost installation]),
  [
    boost_path=$withval
    with_boost="yes"
  ],[
    with_boost="no"
  ]
)

if test x$with_boost = xyes; then
  BOOST_INCLUDES="-I$boost_path"
else
  BOOST_INCLUDES=""
fi

case $host in
powerpc-apple-darwin*|i386-apple-darwin*)
   BOOST_INCLUDES="$BOOST_INCLUDES"
   ;;
esac

CPPFLAGS="$BOOST_INCLUDES"

AC_LANG(C++)
AC_COMPILE_IFELSE(
  AC_LANG_PROGRAM(
    [[
      #include <boost/shared_ptr.hpp>
    ]],
    [[
      boost::shared_ptr<char> ptr;
    ]]
    ),
  [
    AC_MSG_RESULT([yes])
  ],[
    AC_MSG_RESULT([no])
    AC_MSG_ERROR([try setting --with-boost])
  ]
)

AC_SUBST(BOOST_INCLUDES)
#
# end check for boost
##


##
# check for neon
#
AC_MSG_CHECKING([for neon])
AC_ARG_WITH(
  [neon],
  AC_HELP_STRING([--with-neon=DIR],[path to neon installation]),
  [
    neon_path=$withval
    with_neon="yes"
  ],[
    with_neon="no"
  ]
)

if test x$with_neon = xyes; then
  NEON_INCLUDES="-I$neon_path/include"
  NEON_LIBS="`$neon_path/bin/neon-config --libs`"
else
  NEON_INCLUDES=""
  NEON_LIBS=""
fi

CPPFLAGS="$NEON_INCLUDES"

AC_LANG(C++)
AC_COMPILE_IFELSE(
  AC_LANG_PROGRAM(
    [[#include <neon/ne_socket.h>]],
    [[ne_sock_exit()]]
    ),
  [
    AC_MSG_RESULT([yes])
    AC_MSG_RESULT([    headers   $NEON_INCLUDES])
    AC_MSG_RESULT([    libraries $NEON_LIBS])
    AC_DEFINE([SC_HAVE_NEON],[1],[neon])
    found_neon="yes"

    NET_INCLUDES="$NEON_INCLUDES"
    NET_LIBS="$NEON_LIBS"
  ],[
    AC_MSG_RESULT([no])
    found_neon="no"
  ]
)

#
# end check for neon
##


##
# check for serf
#
AC_MSG_CHECKING([for serf])
AC_ARG_WITH(
  [serf],
  AC_HELP_STRING([--with-serf=DIR],[path to serf installation]),
  [
    serf_path=$withval
    with_serf="yes"
  ],[
    with_serf="no"
  ]
)

if test x$with_serf = xyes; then
  SERF_INCLUDES="-I$serf_path/include"
  SERF_LIBS="-L$serf_path/lib -lserf-0 -lssl -lcrypto"
else
  SERF_INCLUDES=""
  SERF_LIBS=""
fi

CPPFLAGS="$SERF_INCLUDES $APR_INCLUDES"

AC_LANG(C++)
AC_COMPILE_IFELSE(
  AC_LANG_PROGRAM(
    [[#include <serf-0/serf.h>]],
    [[
      #if ! SERF_VERSION_AT_LEAST(0,3,0)
      # error no serf!
      #endif // serf
    ]]
    ),
  [
    AC_MSG_RESULT([yes])
    AC_MSG_RESULT([    headers   $SERF_INCLUDES])
    AC_MSG_RESULT([    libraries $SERF_LIBS])
    AC_DEFINE([SC_HAVE_SERF],[1],[serf])
    found_serf="yes"

    NET_INCLUDES="$NET_INCLUDES $SERF_INCLUDES"
    NET_LIBS="$NET_LIBS $SERF_LIBS"
  ],[
    AC_MSG_RESULT([no])
    found_serf="no"
  ]
)

#
# end check for serf
##


AC_SUBST(NET_INCLUDES)
AC_SUBST(NET_LIBS)


if test x$found_neon = xno -a x$found_serf = xno; then
  AC_MSG_ERROR([found neither neon nor serf, try setting --with-neon or --with-serf])
fi


##
# check for subversion
#
# todo check for minimum required version
#
AC_MSG_CHECKING([for subversion])
AC_ARG_WITH(
  [subversion],
  AC_HELP_STRING([--with-subversion=DIR],\
    [path to subversion installation, 1.4.4+ or 1.5.1+]),
  [
    svn_path=$withval
    with_svn="yes"
  ],[
    with_svn="no"
  ]
)

if test x$with_svn = xyes; then
  SVN_INCLUDES="-I$svn_path/include/subversion-1"
  SVN_LIBS="-L$svn_path/lib"
  SVN_PATH="$svn_path"
else
  # no path given, try to find it..

  svn_test_header="include/subversion-1/svn_client.h"

  svn_test_paths="
   /usr
   /usr/local
   /opt/subversion
  "

  for svn_test_path in $svn_test_paths; do
    if test -f "$svn_test_path/$svn_test_header"; then
      svn_auto_path=$svn_test_path
    fi
  done

  # found something?
  if test x$svn_auto_path = x; then
    SVN_INCLUDES=""
    SVN_LIBS=""
    SVN_PATH=""
  else
    SVN_INCLUDES="-I$svn_auto_path/include/subversion-1"
    SVN_LIBS="-L$svn_auto_path/lib"
    SVN_PATH="$svn_auto_path"
  fi
fi


# required since svn 1.4
case $host in
*apple-darwin*)
  SVN_LIBS="$SVN_LIBS -framework security" 
  ;;
esac


SVN_BIN="$SVN_PATH/bin/svn"

# extract version numbers of svn
  
SVN_VERSION=`$SVN_BIN --version 2>&1 | head -1 | \
  sed "s/^svn, version \(.*[[.]].*[[.]].*\) .*/\1/"`
SVN_MAJOR=`echo $SVN_VERSION | sed "s/\(.*\)[[.]].*[[.]].*/\1/"`
SVN_MINOR=`echo $SVN_VERSION | sed "s/.*[[.]]\(.*\)[[.]].*/\1/"`
SVN_PATCH=`echo $SVN_VERSION | sed "s/.*[[.]].*[[.]]\(.*\)/\1/"`
#echo "found $SVN_VERSION/$SVN_MAJOR/$SVN_MINOR/$SVN_PATCH"

# avoid incompatible version of subversion  

goodsvn="ok"

if test $SVN_MAJOR -eq 0; then
  goodsvn="bad";
elif test $SVN_MAJOR -eq 1 -a $SVN_MINOR -le 3; then
  goodsvn="bad";
elif test x$SVN_VERSION == x1.4.4; then
  goodsvn="bad";
elif test x$SVN_VERSION == x1.5.0; then
  goodsvn="bad";
fi

# the svn libraries we need to link depends on the svn version..

if test $SVN_MAJOR -ge 1; then

  SVN_LIBS_ALL="$SVN_LIBS -lsvn_client-1 -lsvn_wc-1 -lsvn_repos-1"
  SVN_LIBS_ALL="$SVN_LIBS_ALL -lsvn_ra-1 -lsvn_ra_svn-1 -lsvn_ra_local-1"
  SVN_LIBS_ALL="$SVN_LIBS_ALL -lsvn_fs-1 -lsvn_fs_fs-1"
  SVN_LIBS_ALL="$SVN_LIBS_ALL -lsvn_delta-1 -lsvn_diff-1"
  SVN_LIBS_ALL="$SVN_LIBS_ALL -lsvn_subr-1"

  if test $SVN_MINOR -eq 4; then
    SVN_LIBS_ALL="$SVN_LIBS_ALL -lsvn_ra_dav-1"
  elif test $SVN_MINOR -ge 5; then
    if test x$found_neon = xyes; then
      SVN_LIBS_ALL="$SVN_LIBS_ALL -lsvn_ra_neon-1"
    fi
    if test x$found_serf = xyes; then
      SVN_LIBS_ALL="$SVN_LIBS_ALL -lsvn_ra_serf-1"
    fi
    SVN_LIBS_ALL="$SVN_LIBS_ALL -lsvn_fs_util-1"
  fi

fi

if test x$goodsvn == xok; then
  AC_MSG_RESULT([yes])
  AC_MSG_RESULT([    headers   $SVN_INCLUDES])
  AC_MSG_RESULT([    libraries $SVN_LIBS_ALL])
  AC_MSG_RESULT([    libraries $SVN_LIBS])
else
  AC_MSG_RESULT([no])
  AC_MSG_RESULT([    incompatible version found: $SVN_VERSION])
  AC_MSG_RESULT([    compatible versions:])
  AC_MSG_RESULT([    1.4.4 or better])
  AC_MSG_RESULT([    1.5.1 or better (i.e. not 1.5.0)])
  AC_MSG_ERROR([can not find compatible subversion, try setting --with-subversion])
fi


AC_SUBST(SVN_INCLUDES)
AC_SUBST(SVN_LIBS_ALL)
AC_SUBST(SVN_LIBS)
AC_SUBST(SVN_PATH)

#
# end check for subversion
##






##
# check for openssl
#
AC_MSG_CHECKING([for openssl])
AC_ARG_WITH(
  [openssl],
  AC_HELP_STRING([--with-openssl=DIR],[path to openssl installation]),
  [
    ssl_path=$withval
    with_ssl="yes"
  ],[
    with_ssl="no"
  ]
)

if test x$with_ssl = xyes; then
  SSL_INCLUDES="-I$ssl_path/include"
  SSL_LIBS="-L$ssl_path/lib"
else
	SSL_INCLUDES=""
	SSL_LIBS=""
fi

CPPFLAGS="$SSL_INCLUDES"

AC_LANG(C++)
AC_COMPILE_IFELSE(
  AC_LANG_PROGRAM(
    [[
      #include <openssl/evp.h>
      #include <openssl/err.h>
      #include <openssl/opensslv.h>
    ]],
    [[
      EVP_cleanup(); 
      ERR_free_strings();
      unsigned long openssl = OPENSSL_VERSION_NUMBER;
    ]]
    ),
  [
    AC_MSG_RESULT([yes])
  ],[
    AC_MSG_RESULT([no])
    AC_MSG_ERROR([try setting --with-openssl])
  ]
)

AC_SUBST(SSL_INCLUDES)
AC_SUBST(SSL_LIBS)
#
# end check for openssl
##



##
# check for berkeley db 
# we only care for the include path to extract the berkeley db version
# for the about dialog...
#
AC_MSG_CHECKING([for berkeley db (include)])
AC_ARG_WITH(
  [berkeley-db],
  AC_HELP_STRING([--with-berkeley-db=DIR],[include path of berkeley db]),
  [
    bdb_path=$withval
    with_bdb="yes"
  ],[
    with_bdb="no"
  ]
)

if test x$with_bdb = xyes; then
  BDB_INCLUDES="-I$bdb_path"
  BDB_LIBS=""
else
	BDB_INCLUDES=""
  BDB_LIBS=""
fi

CPPFLAGS="$BDB_INCLUDES"

AC_LANG(C++)
AC_COMPILE_IFELSE(
  AC_LANG_PROGRAM(
    [[
      #include <db.h>
    ]],
    [[
      unsigned long num = DB_VERSION_MAJOR;
    ]]
    ),
  [
    AC_MSG_RESULT([yes])
    AC_DEFINE([SC_HAVE_BDB],[1],[berkeley db])
  ],[
    AC_MSG_RESULT([no])
#    AC_MSG_ERROR([try setting --with-berkeley-db])
  ]
)

AC_SUBST(BDB_INCLUDES)
AC_SUBST(BDB_LIBS)
#
# end check for berkeley db
##


##
# check for MacOSX
#

case $host in
*apple-darwin*)
  AC_DEFINE(_MACOSX,1,[MacOSX]) 

  AC_ARG_ENABLE(
    [universal],
    AC_HELP_STRING([--enable-universal],[enable universal build (MacOSX only)]),
    [
      enable_universal=yes

      unicppflags="-arch ppc -arch i386 -mmacosx-version-min=10.4"
      unicppflags="$unicppflags -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
      unildflags="-bind_at_load -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"

      MACOSX_UNIVERSAL_CXXFLAGS="$unicppflags"
      MACOSX_UNIVERSAL_LDFLAGS="$unildflags"
    ],[
      enable_universal=$enableval

      MACOSX_UNIVERSAL_CXXFLAGS=""
      MACOSX_UNIVERSAL_LDFLAGS=""
    ]
  )           
#  AM_CONDITIONAL(MACOSX_UNIVERSAL, test x$enable_universal = xyes) 
  ;;
esac

AC_SUBST(MACOSX_UNIVERSAL_CXXFLAGS)
AC_SUBST(MACOSX_UNIVERSAL_LDFLAGS)

#
# end check for MacOSX
##



##
# check for X11, qt may need it
#
AC_PATH_X
AC_PATH_XTRA
#
# end check for X11
##



##
# check for qt
#

AC_ARG_ENABLE(
  [framework-qt],
  AC_HELP_STRING([--enable-framework-qt],[link qt as framework (MacOSX only)]),
  [
    enable_framework_qt=yes
  ],[
    enable_framework_qt=no
  ]
)    


AC_MSG_CHECKING([for Qt])
AC_ARG_WITH(
  [qt],
  AC_HELP_STRING([--with-qt=DIR],[path to qt4.3+ installation]),
  [
    qt_path=$withval
    with_qt="yes"
  ],[
    with_qt="no"
  ]
)

if test x$with_qt = xno; then

  # no path given, try to find it..

  qt_test_bin="bin/moc"

  qt_test_paths="
   /usr
   /usr/share/qt4
  "
	
  for qt_test_path in $qt_test_paths; do
    if test -f "$qt_test_path/$qt_test_bin"; then
      qt_auto_path=$qt_test_path
    fi
  done

  # found something?
  if test x$qt_auto_path != x; then
#    QT_LIBS="-L$qt_auto_path/lib"
#    QT_BIN="$qt_auto_path/bin"
    qt_path="$qt_auto_path"
  else # no..
    AC_MSG_RESULT([no])
    AC_MSG_ERROR([try setting --with-qt])
  fi
fi


if test x$qt_path != x; then

  QT_BIN="$qt_path/bin"
  QT_PATH="$qt_path"
  QT_LIBPATH="$qt_path/lib"

  # extract version numbers of qt
  
  QT_VERSION=`$QT_BIN/moc -v 2>&1 | sed "s/.*(Qt \(.*\))/\1/"`
  QT_MAJOR=`echo $QT_VERSION | sed "s/\(.*\)[[.]].*[[.]].*/\1/"`
  QT_MINOR=`echo $QT_VERSION | sed "s/.*[[.]]\(.*\)[[.]].*/\1/"`

  # check version, the version must be..
  #echo "($QT_VERSION)($QT_MAJOR)($QT_MINOR)"

  #  >= 4.3.0
  if test $QT_MAJOR -eq 4 -a $QT_MINOR -ge 3; then
    goodqt=yes

    case $host in
    *apple-darwin*)
      # on MacOSX use qt frameworks or qt libs

      if test x$enable_framework_qt = xyes; then
        # use -F in case the qt frameworks are installed in a custom location
        QT_INCLUDES="-DQT3_SUPPORT"
        QT_LIBS="-F$QT_LIBPATH -framework QtCore -framework QtGui"
        QT_LIBS="$QT_LIBS -framework Qt3Support -framework QtNetwork"
        QT_LIBS="$QT_LIBS -framework QtXml -framework QtSql"
      else
        QT_INCLUDES="-DQT3_SUPPORT -I$qt_path/include -I$qt_path/include/Qt"
        QT_LIBS="-L$QT_LIBPATH -L$QT_PATH/plugins/imageformats -lQt3Support"
        QT_LIBS="$QT_LIBS -lQtGui -lQtNetwork -lQtCore -lqmng"
      fi
    ;;
    *)
      # any other Unix platform directly link with the libs

      QT_INCLUDES="-DQT3_SUPPORT -I$qt_path/include -I$qt_path/include/Qt"
      QT_LIBS="-L$QT_LIBPATH -lQt3Support -lQtGui -lQtNetwork -lQtCore"        
    ;;
    esac
 
  else
    goodqt=no
  fi

  if test x$goodqt != xyes; then 
    AC_MSG_RESULT([yes, but it is a wrong version])
    AC_MSG_ERROR([found qt version $QT_VERSION but I need 4.3.0+])
  fi  
  
fi


# test if the platform needs X11 or MacOSX stuff for Qt
case $host in
*apple-darwin*)
   # no X11 required, Qt is native on MacOSX so we need MacOSX libraries

   QT_LIBS="$QT_LIBS -framework Carbon -framework AppKit"
   QT_LIBS="$QT_LIBS -framework ApplicationServices"
   ;;
*)
   # any other Unix platform will need X11, so add the required includes and
   # libs for X11

   #debug output
   #echo "($x_includes) ($x_libraries) ($X_CFLAGS) ($X_PRE_LIBS) ($X_LIBS) ($X_EXTRA_LIBS)"

   if test x$x_includes != x; then
     QT_INCLUDES="$QT_INCLUDES -I$x_includes"
   fi
  
   if test x$x_libraries != x; then
     QT_LIBS="$QT_LIBS -L$x_libraries $X_PRE_LIBS -lX11 -lXext -lXmu -lXt"
     QT_LIBS="$QT_LIBS -lXi $X_EXTRA_LIBS"
   fi

   ;;
esac


# do a simple compile test
CPPFLAGS="$QT_INCLUDES"

AC_LANG(C++)
AC_COMPILE_IFELSE(
  AC_LANG_PROGRAM(
    [[#include <QtGui/QWidget>]],
    [[QWidget* w = new QWidget();]]
    ),
  [
    AC_MSG_RESULT([yes])
    AC_MSG_RESULT([    version   $QT_VERSION])
    AC_MSG_RESULT([    headers   $QT_INCLUDES])
    AC_MSG_RESULT([    libraries $QT_LIBS])
    AC_MSG_RESULT([    binaries  $QT_BIN])
    AC_MSG_RESULT([    framework $enable_framework_qt])
  ],[
    AC_MSG_RESULT([yes, but it does not work!])
    AC_MSG_ERROR([try setting --with-qt or $QTDIR])
  ]
)

AC_SUBST(QT_INCLUDES)
AC_SUBST(QT_LIBS)
AC_SUBST(QT_BIN)
AC_SUBST(QT_LIBPATH)

# QT_MOC
# QT_CXXFLAGS
# QT_LIBS

#
# end check for Qt
##


##
# nls
#

AC_ARG_ENABLE(
  [nls],
  AC_HELP_STRING([--enable-nls],[enable i18n (gettext)]),
  [
    AC_DEFINE(ENABLE_NLS,1,[enable i18n (gettext)]) 
    enable_nls=yes
  ],[
    enable_nls=$enableval
  ]
)           
AM_CONDITIONAL(ENABLE_NLS, test x$enable_nls = xyes) 


if test x$enable_nls = xyes; then
  AC_SEARCH_LIBS([bindtextdomain], [intl])
fi


AC_ARG_ENABLE(
  [bundle-nls],
  AC_HELP_STRING([--enable-bundle-nls],[bundle nls files from dependencies (MacOSX only)]),
  [
    AC_DEFINE(MACOSX_BUNDLE_NLS,1,[bundled nls files from dependencies (MacOSX only)])
    enable_bundle_svn_nls=yes 
  ],[
    enable_bundle_svn_nls=$enableval 
  ]
)
AM_CONDITIONAL(BUNDLE_NLS, test x$enable_bundle_nls = xyes) 

#
# nls
##


##
# check for stlport
#
AC_MSG_CHECKING([for stlport])
AC_ARG_WITH(
  [stlport],
  AC_HELP_STRING([--with-stlport=DIR],[path to stlport installation]),
  [
    stlport_path=$withval
    with_stlport="yes"
  ],[
    with_stlport="no"
  ]
)

if test x$with_stlport = xyes; then
  STLPORT_INCLUDES="-I$stlport_path/include/stlport"
  STLPORT_LIBS="-L$stlport_path/lib -lstlport_gcc"
else
	STLPORT_INCLUDES=""
  STLPORT_LIBS=""
fi

CPPFLAGS="$STLPORT_INCLUDES"

AC_LANG(C++)
AC_COMPILE_IFELSE(
  AC_LANG_PROGRAM(
    [[
      #include <vector>
    ]],
    [[
      #ifndef _STLPORT_VERSION
      #error no stlport!
      #endif // _STLPORT_VERSION
    ]]
    ),
  [
    AC_MSG_RESULT([yes])
    has_stlport="yes"
  ],[
    AC_MSG_RESULT([no])
    has_stlport="no"
  ]
)

AC_SUBST(STLPORT_INCLUDES)
AC_SUBST(STLPORT_LIBS)
#
# end check for stlport
##


##
# check if the compiler needs stlport
#
# if we don't have stlport we need at least gcc 3.x
# just warn for an unknown compiler
#
if test x$has_stlport = xno; then

AC_MSG_CHECKING([wether we have a working stl])
AC_LANG(C++)
AC_COMPILE_IFELSE(
  AC_LANG_PROGRAM(
    [[
    ]],
    [[
      #if defined __GNUC__ && __GNUC__ < 3
      # error needs stlport!
      #endif // __GNUC__
    ]]
    ),
  [
    AC_MSG_RESULT([yes])
  ],[
    AC_MSG_RESULT([no])
    AC_MSG_RESULT([    this g++ (__GNUC__ < 3) will need stlport to build!])
    AC_MSG_ERROR([try setting --with-stlport])
  ]
)

fi
#
# end compiler needs stlport
##


##
# enable embeded testrunner & testcode
#
AC_ARG_ENABLE(
  [tests],
  AC_HELP_STRING([--enable-tests],[enable embedded testcode]),
  [
    AC_DEFINE(SC_EMBED_TESTS,1,[enable embedded testcode & testrunner])
    enable_tests=yes 
  ],[
    enable_tests=$enableval 
  ]
)
AM_CONDITIONAL(SC_EMBED_TESTS, test x$enable_tests = xyes) 

#
# enable embeded testrunner & testcode
##

##
## output Makefiles
##
#AC_CONFIG_FILES([FILE...])

AC_OUTPUT([
  Makefile
  po/Makefile
  svn/Makefile
  util/Makefile
  sublib/Makefile
  submerge/Makefile
  subcommander/Makefile
])

