#!/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=libiwmapper DISTNAME=mapper DISTDIR=iwear-mapper VERSION=0.3.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 gui" LIBS=-lpthread LIBLIBS="-liwlocator -liwpower -lqt-mt -lremotelocator" INCLUDES="-I \$(TOPDIR)/include/" EXTRACLEANFILES="test doxygen.log libiw* idl/*.o idl/*.h idl/*.c idl/*.cc" STERILFILES="*.tag lib/*.a lib/*.so* include/config.h makefile.conf" STERILDIRS=doc # Files to be linked together to the library LIBFILES_src=" actualizer.o mapdatacontainer.o optionguard.o " LIBFILES_gui=" filteroptions.moc.o filteroptions.o leftbar.moc.o leftbar.o locationdialog.o locationdialog.moc.o locationfilter.moc.o locationfilter.o locationlist.moc.o locationlist.o locationlister.moc.o locationlister.o mapperwindow.moc.o mapperwindow.o mapview.moc.o rightfield.moc.o rightfield.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" if [ "$OS_TYPE" == "solaris" ] then MIN_GPP="3.4.4" else MIN_GPP="3.3.1" fi MIN_SSL="0.9.7a" MIN_GLIB2="2.2.3" MIN_ORBIT2="2.8.3" #MIN_ORBITCPP="1.3.9" MIN_ORBITCPP="0.30.2" MIN_XERCES="2.3.0" MIN_QT3="3.3.4" # # End of configurable stuff # 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" echo -e "Valid options are :" echo -e "" echo -e "Fine Tuning of library and include directories:" echo -e "" echo -e "Other Options:" echo -e "\t--force-gcc=yes\tForces configure to accept current C compiler version" echo -e "\t--force-gpp=yes\tForces configure to accept current C++ compiler version" echo -e "\t--no-pkg-config\tSkippes any search for pkg-config" echo -e "\t--prefix=\tPath prefix to install the program into. default is $PREFIX" echo -e "\t--help\t\tDisplays this help screen" echo -e "" echo -e "Some influential environment variables:" echo -e " CC C compiler command" echo -e " CFLAGS C compiler flags" echo -e " CPPFLAGS C++ Compiler flags, e.g. -I if you have" echo -e " headers in a nonstandard directory " echo -e " CPP C++ Compiler" echo -e "" echo -e "Use these variables to override the choices made by \`configure' or to help" echo -e "it to find libraries and programs with nonstandard names/locations." cleanup; exit 0 fi write_config_cache $@ ############################################################################## # GCC Version ############################################################################## check_dynlib check_gcc $MIN_GCC if [ $BAIL == "yes" ] then echo "Your GCC is too old and does not support proper ISO C" cleanup; exit 1 fi ############################################################################## # GCC Version ############################################################################## check_gpp $MIN_GPP if [ $BAIL == "yes" ] then echo "Your GCC is too old and does not support proper ISO C++" cleanup; exit 1 fi ############################################################################## # 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_strnlen #check_strcasestr #check_vasprintf #check_strerror_r check_echo ############################################################################## # pkg-config Version ############################################################################## check_pkg_config #check_xerces $MIN_XERCES if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_pgsql 7.3.2 if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_libpq if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_libpqxx 2.1.3 #check_ssl $MIN_SSL if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_qt3 $MIN_QT3 if [ $BAIL == "yes" ] then cleanup; exit 1 fi #check_linc if [ $BAIL == "yes" ] then cleanup; exit 1 fi #check_orbit2 $MIN_ORBIT2 if [ $BAIL == "yes" ] then cleanup; exit 1 fi #check_orbitcpp $MIN_ORBITCPP if [ $BAIL == "yes" ] then cleanup; exit 1 fi check_doxygen 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" echo -e "\nWe are ready to compile. Type \"gmake lnk\" and then \"gmake\" or \"gmake install\" to create and then install the software. If you plan to develop then \"gmake dep\" is a usefull feature too"