#!/usr/bin/env bash # # # This is not generated by autoconf or similar, just handcoded, since we don't # need this much complexity # Our configuration for the makefiles !! PREFIX="/usr" SYSCONF="/etc" LIBNAME=libiwear_net DISTNAME=net DISTDIR=iwear-net VERSION=0.7.0 # include the check function library . ./conf/functions # internal configuration and needed versions CONFLOG=config.log DEBUG=0 CONFIG_H=./include/config.h SRCDIRS="src" LIBS= LIBLIBS="-liwear_core" INCLUDES="-I \$(TOPDIR)/include/" EXTRACLEANFILES="test doxygen.log libiw* idl/*.o idl/*.h idl/*.c idl/*.cc src/*.pp src/*.ao src/*.P src/*.d" STERILFILES="*.tag lib/*.a lib/*.so* include/config.h makefile.conf" STERILDIRS="doc/html" # Files to be linked together to the library LIBFILES_src=" ipaddress.o hashbase.o ipconnection.o ipv4address.o ipv6address.o optionguard.o packetconnection.o socketconnection.o socketset.o sslcertmanager.o sslconnection.o sslfilter.o streamconnection.o tcpconnection.o udpconnection.o " # do the prechecks, among others it tells us the os type class . ./conf/common_precheck MIN_MAKE="3.78" MIN_GCC="3.3.0" MIN_SSL="0.9.7a" MIN_BOOST="1.31.0" MIN_SSL="0.9.7a" if [ "$OS_TYPE" == "solaris" ] then MIN_GPP="4.0.0" else # 3.3.5 gives compiler error in exceptions.cpp:84 MIN_GPP="4.0.0" fi if [ "$OS_TYPE" == "linux" -o "$OS_TYPE" == "solaris" ] then LIBLIBS="$LIBLIBS -lrt" fi set -- $(read_config_cache $@) echo -e "$TUK$0 $@ $NOR" # simple command line parameter parsing {{{ prev= option=--`echo $prev | sed 's/_/-/g'` optarg=`expr "x$option" : 'x[^=]*=\(.*\)'` for option do # If the previous option needs an argument, assign it. if test -n "$prev"; then eval "$prev=\$option" prev= continue fi optarg=`expr "x$option" : 'x[^=]*=\(.*\)'` . ./conf/common_optionparse # These are the module specific options # This file contains the loop end as well as the common variable setting and the default case . ./conf/common_optiondefaults done # }}} eval PREFIX='$PREFIX' eval SYSCONF='$SYSCONF' set_dirs if [ ! -z "$HELP" ] then # echo "help" # echo -e "Unrecognized argument \"$1\"\n" . ./conf/common_help common_help echo -e "" echo -e "Project specific flags:" cleanup; exit 0 fi write_config_cache $@ ############################################################################## # GCC Version ############################################################################## check_gcc $MIN_GCC check_exit $BAIL ############################################################################## # GCC Version ############################################################################## check_gpp $MIN_GPP check_exit $BAIL ############################################################################## # gmake Version ############################################################################## check_gmake $MIN_MAKE if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_dlopen if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_pthread if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_char_bit 8 if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_strnlen check_clock_gettime check_pthread_timedlock check_strcasestr check_vasprintf check_strerror_r check_echo ############################################################################## # pkg-config Version ############################################################################## check_pkg_config if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_ssl $MIN_SSL if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_boost $MIN_BOOST if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_iwear 0.7.0 check_ssl $MIN_SSL if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_doxygen BAIL=no set_debug $DEBUG gen_makefile makefile.conf gen_config $CONFIG_H echo -e "\nConfiguration :\n" echo -e "PREFIX\t\t$PREFIX" echo -e "SYSCONF\t\t$SYSCONF" echo -e "LIBDIR\t\t$PREFIX/lib" cat <