Projekt

Allgemein

Profil

Herunterladen (21,2 KB) Statistiken
| Zweig: | Markierung: | Revision:
d8f33628 aquamaniac
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

9fdd3aad martin
#

###-------------------------------------------------------------------------
#
# The following line makes sure that this file is always touched when a new
# revision is checked out.
#
# $Rev$
#

d8f33628 aquamaniac
# info
793860b4 aquamaniac
GWENHYWFAR_AUTHOR="Martin Preuss<martin@libchipcard.de>"
5a8f7e6b aquamaniac
GWENHYWFAR_BUGREPORT_ADDR="<martin@libchipcard.de>"
d8f33628 aquamaniac
a15eca3f aquamaniac
71e7895e cstim
AC_PREREQ(2.56)
a15eca3f aquamaniac
AC_INIT
AC_CANONICAL_TARGET([])
1f8f1970 aquamaniac
AC_CONFIG_SRCDIR([src/gwenhywfarapi.h])
a26d3315 cstim
AC_CONFIG_HEADERS([config.h])
a15eca3f aquamaniac
6b567527 aquamaniac
###-------------------------------------------------------------------------
a15eca3f aquamaniac
#
d8f33628 aquamaniac
# versions
a15eca3f aquamaniac
#
4dc611fe aquamaniac
GWENHYWFAR_VERSION_MAJOR=2
cafd71e7 martin
GWENHYWFAR_VERSION_MINOR=3
aff949e8 martin
GWENHYWFAR_VERSION_PATCHLEVEL=0
5a8f7e6b aquamaniac
dnl "stable", "rcX", "betaX", "cvs"
cafd71e7 martin
GWENHYWFAR_VERSION_TAG="stable"
f5a9a731 martin


###-------------------------------------------------------------------------
#
# Generate version strings and BUILD
#

GWENHYWFAR_VERSION_BUILD="0"
case "$GWENHYWFAR_VERSION_TAG" in svn|cvs)
SVN=`which svn`
case "x$SVN" in
x|xno)
GWENHYWFAR_VERSION_BUILD="0"
;;
*)
11f47067 christian
# Let svn write the revision number directly into here on
91b79cc2 christian
# each svn update. Note: The trailing space is necessary for
# cvs versions.
GWENHYWFAR_VERSION_BUILD=`echo "$Rev$ " | cut -d' ' -f2`
50173e2b christian
if test "x$GWENHYWFAR_VERSION_BUILD" = "x" ; then
7a19870f christian
GWENHYWFAR_VERSION_BUILD="0"
fi
f5a9a731 martin
;;
esac
;;
esac
GWENHYWFAR_VERSION_FULL_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL-${GWENHYWFAR_VERSION_TAG}-r${GWENHYWFAR_VERSION_BUILD}"
110fc2f8 aquamaniac
GWENHYWFAR_VERSION_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL"
d8f33628 aquamaniac
4ba5420f cstim
# The version number for the plugin/crypttoken/ohbci/ohbci.la
OHBCI_VERSION_STRING="0.1.0"
5a8f7e6b aquamaniac
bc9bea6d aquamaniac
###-------------------------------------------------------------------------
#
# SO version for Gwenhywfar
#
cafd71e7 martin
GWENHYWFAR_SO_CURRENT="44"
GWENHYWFAR_SO_AGE="6"
aff949e8 martin
GWENHYWFAR_SO_REVISION="0"
bc9bea6d aquamaniac
GWENHYWFAR_SO_EFFECTIVE="`echo \$(($GWENHYWFAR_SO_CURRENT-$GWENHYWFAR_SO_AGE))`"



6b567527 aquamaniac
###-------------------------------------------------------------------------
5a8f7e6b aquamaniac
#
f5a9a731 martin
# Create release strings
5a8f7e6b aquamaniac
#
case "$GWENHYWFAR_VERSION_TAG" in
f5a9a731 martin
cvs|svn)
1373f799 christian
GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL.r${GWENHYWFAR_VERSION_BUILD}"
5a8f7e6b aquamaniac
;;
stable)
0953f0d9 aquamaniac
GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL"
5a8f7e6b aquamaniac
;;
*)
0953f0d9 aquamaniac
GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_MAJOR.$GWENHYWFAR_VERSION_MINOR.$GWENHYWFAR_VERSION_PATCHLEVEL"
5a8f7e6b aquamaniac
# add TAG
f5a9a731 martin
GWENHYWFAR_VERSION_RELEASE_STRING="$GWENHYWFAR_VERSION_RELEASE_STRING-${GWENHYWFAR_VERSION_TAG}"
5a8f7e6b aquamaniac
;;
esac
f5a9a731 martin
5a8f7e6b aquamaniac
793860b4 aquamaniac
AC_SUBST(GWENHYWFAR_VERSION_MAJOR)
AC_SUBST(GWENHYWFAR_VERSION_MINOR)
AC_SUBST(GWENHYWFAR_VERSION_PATCHLEVEL)
AC_SUBST(GWENHYWFAR_VERSION_BUILD)
AC_SUBST(GWENHYWFAR_VERSION_TAG)
AC_SUBST(GWENHYWFAR_VERSION_FULL_STRING)
AC_SUBST(GWENHYWFAR_VERSION_STRING)
5b6c9182 aquamaniac
AC_SUBST(GWENHYWFAR_VERSION_RELEASE_STRING)
4ba5420f cstim
AC_SUBST(OHBCI_VERSION_STRING)
d8f33628 aquamaniac
793860b4 aquamaniac
AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_MAJOR,$GWENHYWFAR_VERSION_MAJOR,
f38a59ba aquamaniac
[major version])
793860b4 aquamaniac
AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_MINOR,$GWENHYWFAR_VERSION_MINOR,
f38a59ba aquamaniac
[minor version])
793860b4 aquamaniac
AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_PATCHLEVEL,$GWENHYWFAR_VERSION_PATCHLEVEL,
f38a59ba aquamaniac
[patchlevel])
793860b4 aquamaniac
AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_BUILD,$GWENHYWFAR_VERSION_BUILD, [build])
AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_STRING,"$GWENHYWFAR_VERSION_STRING",
f38a59ba aquamaniac
[version string])
793860b4 aquamaniac
AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_FULL_STRING,"$GWENHYWFAR_VERSION_FULL_STRING",
f38a59ba aquamaniac
[full version string])
793860b4 aquamaniac
AC_DEFINE_UNQUOTED(GWENHYWFAR_VERSION_TAG,$GWENHYWFAR_VERSION_TAG, [tag])
f38a59ba aquamaniac
6b567527 aquamaniac
793860b4 aquamaniac
AC_SUBST(GWENHYWFAR_SO_CURRENT)
AC_SUBST(GWENHYWFAR_SO_REVISION)
AC_SUBST(GWENHYWFAR_SO_AGE)
dafb784e aquamaniac
AC_SUBST(GWENHYWFAR_SO_EFFECTIVE)
a15eca3f aquamaniac
5a8f7e6b aquamaniac
AM_INIT_AUTOMAKE(gwenhywfar, $GWENHYWFAR_VERSION_RELEASE_STRING)
a15eca3f aquamaniac
d8f33628 aquamaniac
9474b3bb aquamaniac
###-------------------------------------------------------------------------
#
# SO version for GwenUI
#
GWENUI_SO_CURRENT="1"
510e47e8 aquamaniac
GWENUI_SO_REVISION="1"
9474b3bb aquamaniac
GWENUI_SO_AGE="0"
GWENUI_SO_EFFECTIVE="`echo \$(($GWENUI_SO_CURRENT-$GWENUI_SO_AGE))`"

AC_SUBST(GWENUI_SO_CURRENT)
AC_SUBST(GWENUI_SO_REVISION)
AC_SUBST(GWENUI_SO_AGE)
AC_SUBST(GWENUI_SO_EFFECTIVE)



###-------------------------------------------------------------------------
#
# SO version for GwenPP
#
GWENPP_SO_CURRENT="16"
GWENPP_SO_REVISION="0"
GWENPP_SO_AGE="0"
GWENPP_SO_EFFECTIVE="`echo \$(($GWENPP_SO_CURRENT-$GWENPP_SO_AGE))`"

AC_SUBST(GWENPP_SO_CURRENT)
AC_SUBST(GWENPP_SO_REVISION)
AC_SUBST(GWENPP_SO_AGE)
AC_SUBST(GWENPP_SO_EFFECTIVE)



aa9c1933 aquamaniac
###-------------------------------------------------------------------------
# check for OS

AQ_CHECK_OS


###-------------------------------------------------------------------------
# prefix handling

3428bb8d aquamaniac
AC_PREFIX_DEFAULT(/usr)
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
ac_configure_args="$ac_configure_args --prefix $prefix"
fi
AC_SUBST(prefix)



6b567527 aquamaniac
###-------------------------------------------------------------------------
#
# static/shared handling
#
80f7cc83 aquamaniac
AC_ENABLE_STATIC(no)
AC_ENABLE_SHARED(yes)


6b567527 aquamaniac
###-------------------------------------------------------------------------
#
d8f33628 aquamaniac
# Checks for programs.
6b567527 aquamaniac
#
d8f33628 aquamaniac
AC_PROG_CC
5046a61c cstim
AC_PROG_CXX
d8f33628 aquamaniac
AC_PROG_INSTALL
e69a74fe cstim
5400e304 aquamaniac
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_RC
d8f33628 aquamaniac
AC_PROG_LIBTOOL
AC_PROG_AWK
65e20290 cstim
AC_CHECK_PROG(USE_DOT,dot,YES,NO)
6b567527 aquamaniac
AC_CHECK_PROG(SED,sed,sed)
d8f33628 aquamaniac

6b567527 aquamaniac
###-------------------------------------------------------------------------
#
d8f33628 aquamaniac
# Checks for libraries.
6b567527 aquamaniac
#
3f3991d0 cstim
AC_CHECK_LIB(dl, dlopen)
# note: this AC_CHECK_LIB will also add -ldl to LIBS.
d8f33628 aquamaniac

6b567527 aquamaniac
###-------------------------------------------------------------------------
#
d8f33628 aquamaniac
# Checks for header files.
6b567527 aquamaniac
#
d8f33628 aquamaniac
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h])
45494bd4 christian
AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/socket.h sys/time.h])
d8f33628 aquamaniac
AC_CHECK_HEADERS([syslog.h unistd.h])
AC_CHECK_HEADERS([unistd.h])
AC_CHECK_HEADERS([dlfcn.h])
013e5e4e aquamaniac
AC_CHECK_HEADERS([signal.h termios.h iconv.h])
ae37b9d1 aquamaniac
AC_CHECK_HEADERS([time.h locale.h])
d8f33628 aquamaniac
AC_CHECK_HEADERS([syslog.h])
AC_CHECK_HEADERS([sys/stat.h])
AC_CHECK_HEADERS([sys/types.h])
AC_CHECK_HEADERS([sys/wait.h])
90940495 aquamaniac
AC_CHECK_HEADERS([regex.h])
d8f33628 aquamaniac

6b567527 aquamaniac
###-------------------------------------------------------------------------
#
d8f33628 aquamaniac
# Checks for typedefs, structures, and compiler characteristics.
6b567527 aquamaniac
#
d8f33628 aquamaniac
AC_C_CONST
AC_HEADER_TIME
AC_STRUCT_TM

6b567527 aquamaniac
###-------------------------------------------------------------------------
#
d8f33628 aquamaniac
# Checks for library functions.
6b567527 aquamaniac
#
d8f33628 aquamaniac
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_MKTIME
AC_FUNC_SELECT_ARGTYPES
6fc5e175 aquamaniac
AC_CHECK_FUNCS([gethostbyaddr gethostbyname inet_ntoa isascii getpid])
d8f33628 aquamaniac
AC_CHECK_FUNCS([memmove memset])
AC_CHECK_FUNCS([select socket])
AC_CHECK_FUNCS([strcasecmp strchr strdup strerror])
AC_CHECK_FUNCS([snprintf])
ae37b9d1 aquamaniac
AC_CHECK_FUNCS([symlink setlocale])
07574b3d cstim
AC_CHECK_FUNCS([srandom random])
d8f33628 aquamaniac

6b567527 aquamaniac
###-------------------------------------------------------------------------
#
# OS dependant settings
#
d8f33628 aquamaniac
case "$OS_TYPE" in
posix)
22e30804 aquamaniac
gwenhywfar_sys_is_windows=0
e8a81de9 cstim
gwenhywfar_ldflags="-L\${libdir}"
gwenhywfar_libs="-lgwenhywfar"
d808605f cstim
gwenhywfar_internal_libname="libgwenhywfar.la"
06be1255 aquamaniac
gwenhywfar_headerdir_am="\$(includedir)"
gwenhywfar_headerdir="\${includedir}"
e8a81de9 cstim
gwenhywfar_plugindir="\${libdir}/gwenhywfar/plugins/${GWENHYWFAR_SO_EFFECTIVE}"
1f8f1970 aquamaniac
gwenhywfar_os_lib="os/posix/libos.la"
d8f33628 aquamaniac
GWEN_OS="posix"
10217cc9 aquamaniac
# add special libraries for solaris
if test "$OSYSTEM" = "solaris"; then
all_libraries="${all_libraries} -lresolv -lsocket"
a6ca17dc aquamaniac
PROG_LIBRARIES="${PROG_LIBRARIES} -lresolv -lsocket"
fi
# add special libraries for darwin
if test "$OSYSTEM" = "osx"; then
52ad35ad cstim
# Add -L/sw/lib here since it is needed on darwin, but
# it should be avoided when linking the test program in
# test/.
all_libraries="-L/sw/lib ${all_libraries} -lintl"
a6ca17dc aquamaniac
# hmm, this should be detected by the GETTEXT macro...
PROG_LIBRARIES="${PROG_LIBRARIES} -lintl"
10217cc9 aquamaniac
fi
d8f33628 aquamaniac
;;
windows)
22e30804 aquamaniac
gwenhywfar_sys_is_windows=1
c15f4cdd cstim
ACX_WINDOWS_PATHS
e8a81de9 cstim
gwenhywfar_ldflags="-L${WIN_PATH_WINDOWS_MINGW}"
5400e304 aquamaniac
#gwenhywfar_libs="-lgwenhywfar32_${GWENHYWFAR_SO_EFFECTIVE}"
#gwenhywfar_internal_libname="gwenhywfar32_${GWENHYWFAR_SO_EFFECTIVE}.dll"

gwenhywfar_libs="-lgwenhywfar-${GWENHYWFAR_SO_EFFECTIVE}"
gwenhywfar_internal_libname="libgwenhywfar.la"

06be1255 aquamaniac
gwenhywfar_headerdir_am="\$(includedir)"
gwenhywfar_headerdir="\${includedir}"
b034980b cstim
gwenhywfar_plugindir="\${libdir}/gwenhywfar/plugins/${GWENHYWFAR_SO_EFFECTIVE}"
1f8f1970 aquamaniac
gwenhywfar_os_lib="os/windows/libos.la"
3bfc7e77 aquamaniac
GWEN_OS="windows"
d6e98fc4 aquamaniac
PROG_LIBRARIES="-L/mingw/lib ${PROG_LIBRARIES}"
4e58f6c3 cstim
all_libraries="${all_libraries} -lregex -lwsock32"
d8f33628 aquamaniac
;;
200c69e7 aquamaniac
*)
AC_MSG_ERROR(**** Unknown operating system type)
;;
d8f33628 aquamaniac
esac

5a8f7e6b aquamaniac
AM_CONDITIONAL(IS_WINDOWS, [test "$OS_TYPE" = "windows"])
22e30804 aquamaniac
AC_SUBST(gwenhywfar_sys_is_windows)
d8f33628 aquamaniac
6b567527 aquamaniac
ebbc70e5 cstim
dnl # Check for x86_64 architecture; potentially set lib-directory suffix
dnl if test "$target_cpu" = "x86_64"; then
dnl libdirsuffix="64"
dnl else
dnl libdirsuffix=""
dnl fi
dnl AC_DEFINE_UNQUOTED(LIBDIRSUFFIX, ["$libdirsuffix"], [Defined to the suffix string of the library directory])
dnl --- no longer needed since $libdir is used directly
3adecb0b cstim
c963ee1e aquamaniac
200c69e7 aquamaniac
###-------------------------------------------------------------------------
#
# check for some types and printf-templates
#
AQ_TYPE_UINT32(unsigned int)
AQ_TYPE_UINT64(unsigned long long)
GWEN_TYPE_UINT32=$aq_type_uint32
AC_SUBST(GWEN_TYPE_UINT32)
GWEN_TYPE_TMPL_UINT32=$aq_type_tmpl_uint32
AC_SUBST(GWEN_TYPE_TMPL_UINT32)
GWEN_TYPE_UINT64=$aq_type_uint64
AC_SUBST(GWEN_TYPE_UINT64)
GWEN_TYPE_TMPL_UINT64=$aq_type_tmpl_uint64
AC_SUBST(GWEN_TYPE_TMPL_UINT64)


6b567527 aquamaniac
###-------------------------------------------------------------------------
60bf789e cstim
#
# check whether variadic macros should be supported
#
AC_MSG_CHECKING(if compiling with variadic macros)
AC_ARG_ENABLE(variadic-macros,
[ --enable-variadic-macros enable variadic macros (default=yes)],
enable_variadic_macros="$enableval",
enable_variadic_macros="yes")
AC_MSG_RESULT($enable_variadic_macros)
if test "x$enable_variadic_macros" == "xno"; then
AC_DEFINE(NO_VARIADIC_MACROS, 1, [Define if variadic macros should be disabled])
fi

6b567527 aquamaniac
2e950a9a aquamaniac
###-------------------------------------------------------------------------
#
# check whether profiling is to be supported
#
AC_MSG_CHECKING(if profiling is to be supported)
AC_ARG_ENABLE(profiling,
[ --enable-profiling enable profiling (default=no)],
enable_profiling="$enableval",
enable_profiling="no")
AC_MSG_RESULT($enable_profiling)
if test "x$enable_profiling" == "xyes"; then
PROFILING_CFLAGS="-pg"
PROFILING_LDFLAGS="-pg"
else
PROFILING_CFLAGS=""
PROFILING_LDFLAGS=""
fi
AC_SUBST(PROFILING_CFLAGS)
AC_SUBST(PROFILING_LDFLAGS)


6b567527 aquamaniac
###-------------------------------------------------------------------------
d8f33628 aquamaniac
#
# check for encryption library
#
aaa30da8 aquamaniac
AQ_CHECK_SSL
if test "$ssl_available" = "yes"; then
all_includes="$all_includes $ssl_includes"
GWEN_CRYPTO="ossl"
192453a8 cstim
AC_DEFINE_UNQUOTED(GWEN_SSL_CRYPTO, 1, [Defined if OpenSSL crypto module is built])
61372ca5 aquamaniac
USE_CRYPT="yes"
21dc46ad aquamaniac
else
GWEN_CRYPTO="none"
61372ca5 aquamaniac
USE_CRYPT="no"
d8f33628 aquamaniac
fi
02ee75c3 cstim
AM_CONDITIONAL(GWEN_SSL_CRYPTO, [test "$GWEN_CRYPTO" = "ossl"])
61372ca5 aquamaniac
AC_SUBST(USE_CRYPT)
d8f33628 aquamaniac

5400e304 aquamaniac
853d175b martin
###-------------------------------------------------------------------------
#
# check for LibXML
#
AC_MSG_CHECKING([whether LibXML2 should be used])
if test "x`which xml2-config`" != "x"; then
AC_DEFINE(USE_LIBXML2, 1, [whether LibXML2 should be used])
xml_includes="`xml2-config --cflags`"
xml_libraries="`xml2-config --libs`"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_SUBST(xml_includes)
AC_SUBST(xml_libraries)



0237e12f aquamaniac
###-------------------------------------------------------------------------
#
5400e304 aquamaniac
# check for I18N
#
HAVE_I18N="yes"
AC_CHECK_PROG(MSGFMT,msgfmt,msgfmt,missing)
AC_CHECK_PROG(XGETTEXT,xgettext,xgettext, missing)

if test "$XGETTEXT" != "missing" -a "$MSGFMT" != "missing" ; then
AC_CHECK_HEADERS([locale.h libintl.h], [], [HAVE_I18N="no"])
AC_SEARCH_LIBS(gettext, intl, [], [HAVE_I18N="no"])
else
HAVE_I18N="no"
AC_MSG_WARN([xgettext or msgfmt is missing. Locale suport is disabled.])
fi
AC_SUBST(HAVE_I18N)
if test "$HAVE_I18N" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_I18N, 1, [whether I18N is available])
AC_DEFINE_UNQUOTED(ENABLE_NLS, 1, [whether I18N is available])
fi
AM_CONDITIONAL(USE_I18N, [test "$HAVE_I18N" = "yes"])

0237e12f aquamaniac
6b567527 aquamaniac
###-------------------------------------------------------------------------
d8f33628 aquamaniac
#
# create header directory, make symlinks
#
672a005d martin
GWEN_HEADER_DIRS="src src/base src/net2 src/crypt src/crypt/${GWEN_CRYPTO} src/crypt2 src/io src/ipc src/ipc/request src/os src/os/${GWEN_OS} src/storage"
54e5a53c aquamaniac
GWEN_HEADER_DIRS="${GWEN_HEADER_DIRS} src/parser"
d8f33628 aquamaniac
lprefix="${srcdir}"
lprefix=`( cd ${lprefix} ; pwd )`

b28de9ee aquamaniac
rm -Rf gwenhywfar 2>/dev/null
06be1255 aquamaniac
mkdir gwenhywfar
6b567527 aquamaniac
GWEN_HEADER_FILES="doc/apidoc.h"
d8f33628 aquamaniac
for d in ${GWEN_HEADER_DIRS}; do
hfiles=`( cd "${srcdir}/${d}" && ls *.h 2>/dev/null )`
for f in ${hfiles}; do
case ${f} in
b023c106 cstim
*_l.h | *_p.h)
6b567527 aquamaniac
;;
d8f33628 aquamaniac
*)
6b567527 aquamaniac
GWEN_HEADER_FILES="${GWEN_HEADER_FILES} ${d}/${f}"
06be1255 aquamaniac
ln -s "${lprefix}/${d}/${f}" "gwenhywfar/${f}"
6b567527 aquamaniac
;;
d8f33628 aquamaniac
esac
done
done
06be1255 aquamaniac
test -f gwenhywfar/version.h || ln -s "${lprefix}/src/version.h" "gwenhywfar/version.h" 2>/dev/null
test -f gwenhywfar/types.h || ln -s "${lprefix}/src/types.h" "gwenhywfar/types.h" 2>/dev/null
test -f gwenhywfar/system.h || ln -s "${lprefix}/src/os/$OS_TYPE/system.h" "gwenhywfar/system.h" 2>/dev/null
d8f33628 aquamaniac
e5b2868c aquamaniac
AC_SUBST(GWEN_HEADER_FILES)
61372ca5 aquamaniac
6b567527 aquamaniac
###-------------------------------------------------------------------------
5176e1ad aquamaniac
#
# check docpath
#
AC_MSG_CHECKING(docpath)
AC_ARG_WITH(docpath, [ --with-docpath=DIR where to store the apidoc],
[docpath="$withval"],
6b567527 aquamaniac
[docpath="${HOME}/apidoc"])
5176e1ad aquamaniac
AC_SUBST(docpath)
AC_MSG_RESULT($docpath)


6b567527 aquamaniac
###-------------------------------------------------------------------------
5176e1ad aquamaniac
#
# check for doc type
#
AC_MSG_CHECKING(if full docu should be created)
AC_ARG_ENABLE(full-doc,
[ --enable-full-doc enable creating full apidoc (default=no)],
[ case "${enableval}" in
yes) enable_fulldoc="yes";;
no) enable_fulldoc="no";;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-full-doc);;
esac
],
enable_fulldoc="no")

if test "$enable_fulldoc" = "yes"; then
e5b2868c aquamaniac
DOXYGEN_INPUT="listdoc.h src"
5176e1ad aquamaniac
DOXYGEN_DEFINE=""
else
DOXYGEN_DEFINE="DOXYGEN_HIDE"
e5b2868c aquamaniac
DOXYGEN_INPUT="listdoc.h ${GWEN_HEADER_FILES}"
5176e1ad aquamaniac
fi
AC_SUBST(DOXYGEN_INPUT)
AC_SUBST(DOXYGEN_DEFINE)
AC_MSG_RESULT($enable_fulldoc)


6b567527 aquamaniac
###-------------------------------------------------------------------------
#
# search for tag files
#
AC_MSG_CHECKING(doxygen tag files)
DOXYGEN_TAGFILES=""
if test -d "${docpath}"; then
DOXYGEN_TAGFILES="`cd ${docpath} && ls *.tag`"
if test -n "${DOXYGEN_TAGFILES}"; then
DOXYGEN_TAGFILES="`echo ${DOXYGEN_TAGFILES} | ${SED} -e s/${PACKAGE}.tag//`"
fi
realfiles=""
for ff in ${DOXYGEN_TAGFILES}; do
realfiles="${realfiles} ${docpath}/${ff}"
done
DOXYGEN_TAGFILES="${realfiles}"
fi
if test -z "${DOXYGEN_TAGFILES}"; then
AC_MSG_RESULT(none)
else
AC_MSG_RESULT(found)
fi
AC_SUBST(DOXYGEN_TAGFILES)



###-------------------------------------------------------------------------
#
# Search for dlopen
#
5516bf5c aquamaniac
LIBS=""
AC_SEARCH_LIBS(dlopen, c dl)
if test "$LIBS" = "-lc"; then
LIBS=""
fi
ld_library="$LIBS"
LIBS=""
all_libraries="$all_libraries $ld_library"


6b567527 aquamaniac
###-------------------------------------------------------------------------
88dc6282 aquamaniac
#
# check for release
#
AC_MSG_CHECKING(whether this is an official release)
AC_ARG_ENABLE(release,
[ --enable-release make this an official release (default=no)],
[ case "${enableval}" in
yes) enable_release="yes";;
no) enable_release="no";;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-release);;
esac
],
enable_release="no")

if test "$enable_release" = "yes"; then
STRIPALL="-s"
else
STRIPALL=""
fi
AC_SUBST(STRIPALL)
AC_MSG_RESULT($enable_release)


22e30804 aquamaniac
###-------------------------------------------------------------------------
#
# GCC version (check for usability)
#
AC_MSG_CHECKING(if symbol visibility is supported)
8de7ae6d cstim
visibility_cflags=""
22e30804 aquamaniac
case `basename $CC` in
gcc*)
8de7ae6d cstim
dnl Determine version number (watch out: the outside square
dnl parenteses are vitally important here!)
gccversion=["` ${CC} --version | head -1 | ${SED} 's/.*\([0-9]\.[0-9]\.[0-9]*\).*/\1/' `"]
22e30804 aquamaniac
case $gccversion in
8de7ae6d cstim
4.*)
# Activate -fvisibility=hidden only for explicit 4.x gcc
# versions. We never now what future gcc's might do with
# that argument, and we also can't be sure that other
# gcc's happen to show very weird version
# numbers. Therefore leave the default at non-activated.
visibility_supported="yes, gcc-${gccversion}"
22e30804 aquamaniac
AC_DEFINE(GCC_WITH_VISIBILITY_ATTRIBUTE, 1, [visibility])
visibility_cflags="-fvisibility=hidden"
;;
8de7ae6d cstim
*)
# Default: -fvisibility=hidden not activated.
visibility_supported="no (needs gcc >=4.0, you have gcc-${gccversion})"
;;
22e30804 aquamaniac
esac
;;
*)
83888521 aquamaniac
visibility_supported="no (needs gcc >=4.0, you use $CC)"
22e30804 aquamaniac
;;
esac
ebd00336 aquamaniac
# -fvisibility is at least not available on MinGW/gcc-3.4.4 (will
# give an "unrecognized cmdline option"). Also, unfortunately I
# don't know an easy way to ask the compiler here. Maybe
# http://autoconf-archive.cryp.to/ax_cflags_gcc_option.html
case "$OS_TYPE" in
windows)
visibility_supported="no (not yet on MinGW/Windows)"
visibility_cflags=""
;;
*)
;;
esac

22e30804 aquamaniac
AC_MSG_RESULT(${visibility_supported})
AC_SUBST(visibility_cflags)


6b567527 aquamaniac
###-------------------------------------------------------------------------
50e5b742 aquamaniac
#
# check for MEMTRACE
#
AC_MSG_CHECKING(if MEMTRACE is wanted)
AC_ARG_ENABLE(memtrace,
[ --enable-memtrace enable memory trace (default=no)],
enable_memtrace="$enableval",
enable_memtrace="no")
AC_MSG_RESULT($enable_memtrace)

if test "$enable_memtrace" != "no"; then
b2cf2da1 aquamaniac
#AC_DEFINE(GWEN_MEMTRACE, 1, [if memory trace is wanted])
AC_DEFINE(GWEN_MEMORY_DEBUG, 1, [if memory debugging is wanted])
50e5b742 aquamaniac
fi

b2cf2da1 aquamaniac
9601d646 cstim
# Debug arguments for compilation
ACX_COMPILE_WARN()
50e5b742 aquamaniac
5176e1ad aquamaniac
73fcb0f0 aquamaniac
###-------------------------------------------------------------------------
#
# compile program flagss
#

a6ca17dc aquamaniac
PROG_LIBRARIES="${PROG_LIBRARIES} ${ssl_libraries} ${ssl_lib} ${ncurses_libs}"
73fcb0f0 aquamaniac
e8a81de9 cstim
# Clean up include variables
AS_SCRUB_INCLUDE(ssl_includes)
AS_SCRUB_INCLUDE(gwenhywfar_includes)
AS_SCRUB_INCLUDE(all_includes)

73fcb0f0 aquamaniac
6b567527 aquamaniac
###-------------------------------------------------------------------------
d8f33628 aquamaniac
#
# substitute vars
#
e8a81de9 cstim
AC_SUBST(GWEN_CRYPTO)
AC_SUBST(GWEN_HEADER_FILES)
AC_SUBST(GWEN_OS)
73fcb0f0 aquamaniac
AC_SUBST(PROG_LIBRARIES)
e8a81de9 cstim
AC_SUBST(all_includes)
AC_SUBST(all_libraries)
AC_SUBST(gwenhywfar_crypt_lib)
AC_SUBST(gwenhywfar_ldflags)
1f8f1970 aquamaniac
AC_SUBST(gwenhywfar_libs)
d808605f cstim
AC_SUBST(gwenhywfar_internal_libname)
c3a505ab aquamaniac
AC_SUBST(gwenhywfar_libspp)
9474b3bb aquamaniac
AC_SUBST(gwenhywfar_libsui)
1f8f1970 aquamaniac
AC_SUBST(gwenhywfar_os_lib)
e8a81de9 cstim
AC_SUBST(gwenhywfar_pkgincludedir)
AC_SUBST(gwenhywfar_plugindir)
e43961fb aquamaniac
AC_SUBST(gwenhywfar_headerdir_am)
AC_SUBST(gwenhywfar_headerdir)
d8f33628 aquamaniac

6b567527 aquamaniac
###-------------------------------------------------------------------------
d8f33628 aquamaniac
#
# list of files to create
#
5400e304 aquamaniac
AC_CONFIG_FILES([Doxyfile
5176e1ad aquamaniac
Makefile
e5b2868c aquamaniac
admin/Makefile
cb42a4bd aquamaniac
m4/Makefile
5400e304 aquamaniac
po/Makefile
06be1255 aquamaniac
gwenhywfar-config.in
41c6c20e cstim
gwenhywfar.pc
a31191f0 cstim
gwenhywfar.spec
7f03ea00 cstim
gwenhywfar.iss
c765d3ee aquamaniac
doc/Makefile
b812ea92 aquamaniac
doc/inherit/Makefile
beb73b86 aquamaniac
doc/plugindescr.xsd
d8f33628 aquamaniac
src/Makefile
230c36cc aquamaniac
src/types.h
3bfc7e77 aquamaniac
src/ressource.rc
3ca7a382 aquamaniac
src/version.h
d8f33628 aquamaniac
src/base/Makefile
src/crypt/Makefile
src/crypt/ossl/Makefile
21dc46ad aquamaniac
src/crypt/none/Makefile
6c7be755 aquamaniac
src/crypt2/Makefile
d8f33628 aquamaniac
src/io/Makefile
35983cd1 aquamaniac
src/ipc/Makefile
2e950a9a aquamaniac
src/ipc/request/Makefile
d8f33628 aquamaniac
src/os/Makefile
src/os/posix/Makefile
0970f69e aquamaniac
src/os/posix/system.h
3bfc7e77 aquamaniac
src/os/windows/Makefile
0970f69e aquamaniac
src/os/windows/system.h
a15eca3f aquamaniac
src/parser/Makefile
83c54581 aquamaniac
src/net2/Makefile
672a005d martin
src/storage/Makefile
83d13c8c aquamaniac
plugins/Makefile
plugins/dbio/Makefile
plugins/dbio/csv/Makefile
77f76dbe aquamaniac
plugins/dbio/csv/csv.xml
aa9c1933 aquamaniac
plugins/dbio/csv/ressource.rc
15674790 aquamaniac
plugins/dbio/olddb/Makefile
plugins/dbio/olddb/olddb.xml
aa9c1933 aquamaniac
plugins/dbio/olddb/ressource.rc
f5a9a731 martin
plugins/dbio/rfc822/Makefile
plugins/dbio/rfc822/rfc822.xml
plugins/dbio/rfc822/ressource.rc
9077e1cc martin
plugins/dbio/xmldb/Makefile
plugins/dbio/xmldb/xmldb.xml
plugins/dbio/xmldb/ressource.rc
013e5e4e aquamaniac
plugins/crypttoken/Makefile
plugins/crypttoken/ohbci/Makefile
plugins/crypttoken/ohbci/ohbci.xml
bde60bc0 cstim
plugins/crypttoken/ohbci/ressource.rc
672a005d martin
plugins/storage/Makefile
plugins/storage/localfiles/Makefile
plugins/storage/localfiles/localfiles.xml
plugins/storage/localfiles/ressource.rc
2dce2a32 aquamaniac
tools/Makefile
tools/xmlmerge/Makefile
800cad50 aquamaniac
tools/typemaker/Makefile
013e5e4e aquamaniac
tools/gct-tool/Makefile
0970f69e aquamaniac
test/Makefile
])
d8f33628 aquamaniac
AC_OUTPUT
0970f69e aquamaniac