ARG_GSMAKE="$GNUSTEP_MAKEFILES"
ARG_CFGMAKE="$PWD/config.make"
ARG_WITH_GNUSTEP=0
-ARG_WITH_DEBUG=0
+ARG_WITH_DEBUG=1
+ARG_WITH_STRIP=1
DARG_GNUSTEP_SH="$ARG_GSMAKE/GNUstep.sh"
DARG_IS_FHS=1
--configmake=PATH path to the config file being created
--with-gnustep install in GNUstep tree
--enable-debug turn on debugging and compile time warnings
+ --enable-strip turn on stripping of debug symbols
_ACEOF
else
echo " debug: no";
fi
+ if test $ARG_WITH_STRIP = 1; then
+ echo " strip: yes";
+ else
+ echo " strip: no";
+ fi
echo " prefix: $ARG_PREFIX"
echo " gstep: $ARG_GSMAKE"
fi
cfgwrite ""
+ if test $ARG_WITH_STRIP = 1; then
+ cfgwrite "# configured to produce stripped code";
+ cfgwrite "strip:=yes"
+ else
+ cfgwrite "# configured not to strip code";
+ cfgwrite "strip:=no"
+ fi
+ cfgwrite ""
+
cfgwrite "# enforce shared libraries";
cfgwrite "shared:=yes"
cfgwrite ""
cfgwrite "PATH:=\$(GNUSTEP_SYSTEM_ROOT)/Tools:\$(PATH)"
}
+function checkLinking() {
+ local oldpwd=$PWD
+ local tmpdir=".configure-test-$$"
+
+ mkdir $tmpdir
+ cd $tmpdir
+ cp ../maintenance/dummytool.m .
+
+ tmpmake="GNUmakefile"
+ echo >$tmpmake "include ../config.make"
+ echo >>$tmpmake "include \$(GNUSTEP_MAKEFILES)/common.make"
+ echo >>$tmpmake "TOOL_NAME := linktest"
+ echo >>$tmpmake "linktest_OBJC_FILES := dummytool.m"
+ echo >>$tmpmake "linktest_TOOL_LIBS += -l$1"
+ echo >>$tmpmake "SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib"
+ echo >>$tmpmake "include \$(GNUSTEP_MAKEFILES)/tool.make"
+
+ make -s messages=yes -f $tmpmake linktest >out.log 2>err.log
+ LINK_RESULT=$?
+
+ if test $LINK_RESULT = 0; then
+ echo "$2 library found: $1"
+ else
+ if test "x$2" = "xrequired"; then
+ echo "failed to link $2 library: $1"
+ rm ../config.make
+ exit 1
+ else
+ echo "failed to link $2 library: $1"
+ fi
+ fi
+
+ cd $oldpwd
+ rm -rf $tmpdir
+}
+
+function checkDependencies() {
+ checkLinking "xml2" required;
+ checkLinking "ldap" required;
+ checkLinking "ssl" required; # TODO: make optional
+ checkLinking "pq" required; # TODO: make optional
+}
+
function runIt() {
if test $ARG_BEQUIET != 1; then
printParas;
fi
else
genConfigMake;
+ checkDependencies;
if test -x $NGSTREAMS_DIR/configure; then
if test $ARG_BEQUIET != 1; then
"x--enable-debug")
ARG_WITH_DEBUG=1
;;
+ "x--disable-debug")
+ ARG_WITH_DEBUG=0
+ ;;
+ "x--enable-strip")
+ ARG_WITH_STRIP=1
+ ;;
+ "x--disable-strip")
+ ARG_WITH_STRIP=0
+ ;;
*) echo "error: cannot process argument: $1"; exit 1; ;;
esac
}
ts = [[NSString alloc] initWithCString:buf];
}
-#if 0
- NSLog(@"RFC822 TZ Parser: expensive: '%@'", ts);
+#if 1
+ NSLog(@"%s: RFC822 TZ Parser: expensive: '%@'", __PRETTY_FUNCTION__, ts);
#endif
tz = [NSTimeZone timeZoneWithAbbreviation:ts];
[ts release];
;
if (*pe == 0) goto failed;
*pe = '\0';
- monthOfYear = parseMonthOfYear(bytes, (pe - bytes));
+ if ((monthOfYear = parseMonthOfYear(bytes, (pe - bytes))) == 0) {
+ [self logWithFormat:@"WARNING(%s): cannot parse month in date: %@",
+ __PRETTY_FUNCTION__, _data];
+ }
bytes = pe + 1;
/* parse year */