5 # $Date: 2008/01/05 12:11:02 $
6 ######################################################
10 release=`uname -r | cut -b1`
12 CONFFILE="../../Makefile.conf"
34 if [ "$sys" = "Linux" ]
38 ETC_DIR="./inst/linux/etc/stargazer"
41 if [ "$sys" = "FreeBSD" ]
49 ETC_DIR="./inst/freebsd/etc/stargazer"
52 if [ "$OS" = "unknown" ]
54 echo "#############################################################################"
55 echo "# Sorry, but sgconf currently supported by Linux, FreeBSD 4.x, 5.x, 6.x #"
56 echo "#############################################################################"
60 echo "#############################################################################"
61 echo " Building sgconf for $sys $release"
62 echo "#############################################################################"
64 STG_LIBS="conffiles.lib
69 if [ "$OS" = "linux" ]
77 DEFS="$DEFS -DFREE_BSD"
79 DEFS="$DEFS -DFREE_BSD5"
81 SHELL="/usr/local/bin/bash"
85 echo -n "Checking for -lexpat... "
86 echo "int main() { return 0; }" > build_check.c
87 gcc build_check.c -lexpat -o fake > /dev/null 2> /dev/null
99 if [ "$CHECK_EXPAT" != "yes" ]
101 echo "-lexpat not found!"
105 echo "OS=$OS" > $CONFFILE
106 echo "STG_TIME=no" >> $CONFFILE
107 echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
108 echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
109 echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
110 echo "DIR_INCLUDE=\$(DIR_BUILD)/../../include" >> $CONFFILE
111 echo "CHECK_EXPAT=$CHECK_EXPAT" >> $CONFFILE
112 echo "DEFS=$DEFS" >> $CONFFILE
113 echo -n "STG_LIBS=" >> $CONFFILE
116 echo -n "$lib " >> $CONFFILE
119 echo "SHELL=$SHELL" >> $CONFFILE
120 echo "CFLAGS=$CFLAGS" >> $CONFFILE
121 echo "PREFIX=$PREFIX" >> $CONFFILE
122 echo "BIN_MODE=$BIN_MODE" >> $CONFFILE
123 echo "DATA_MODE=$DATA_MODE" >> $CONFFILE
124 echo "OWNER=$OWNER" >> $CONFFILE
125 echo "ETC_DIR=$ETC_DIR" >> $CONFFILE