"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "configure.inc" between
discount-2.2.4.tar.bz2 and discount-2.2.6.tar.bz2

About: Discount is an implementation of the "Markdown" markup language (written in C).

configure.inc  (discount-2.2.4.tar.bz2):configure.inc  (discount-2.2.6.tar.bz2)
skipping to change at line 356 skipping to change at line 356
return $rc return $rc
} }
# #
# check that the C compiler works # check that the C compiler works
# #
AC_PROG_CC () { AC_PROG_CC () {
test "$AC_CC" && return 0 test "$AC_CC" && return 0
cat > ngc$$.c << \EOF cat > ngc$$.c << \EOF
#include <stdio.h>; extern void say(void*);
int main() int main()
{ {
puts("hello, sailor"); say("hello, sailor");
}
EOF
cat > ngf$$.c << \EOF
#include <stdio.h>
void say(char* message)
{
puts(message);
} }
EOF EOF
TLOGN "checking the C compiler" TLOGN "checking the C compiler"
unset AC_CFLAGS AC_LDFLAGS __MACOS_DSYM unset AC_CFLAGS AC_LDFLAGS __MACOS_DSYM
if [ "$CC" ] ; then if [ "$CC" ] ; then
AC_CC="$CC" AC_CC="$CC"
elif [ "$WITH_PATH" ]; then elif [ "$WITH_PATH" ]; then
skipping to change at line 386 skipping to change at line 393
# finally check for POSIX c89 # finally check for POSIX c89
test "$AC_CC" || AC_CC=`acLookFor c89` test "$AC_CC" || AC_CC=`acLookFor c89`
if [ ! "$AC_CC" ]; then if [ ! "$AC_CC" ]; then
TLOG " (no C compiler found)" TLOG " (no C compiler found)"
$__fail 1 $__fail 1
fi fi
echo "checking out the C compiler" echo "checking out the C compiler"
$AC_CC -o ngc$$ ngc$$.c $AC_CC -o ngc$$ ngc$$.c ngf$$.c
status=$? status=$?
echo "compile status = $status"
TLOGN " ($AC_CC)" TLOGN " ($AC_CC)"
if [ $status -eq 0 ]; then if [ $status -eq 0 ]; then
if $AC_CC -x c /dev/null -dM -E 2>&1 | grep '__clang__' >/dev/null; then if $AC_CC -x c /dev/null -dM -E 2>&1 | grep '__clang__' >/dev/null; then
TLOG " yuck, you're using clang" TLOG " yuck, you're using clang"
IS_CLANG=T IS_CLANG=T
IS_BROKEN_CC=T IS_BROKEN_CC=T
elif $AC_CC -v 2>&1 | grep 'gcc version' >/dev/null; then elif $AC_CC -v 2>&1 | grep 'gcc version' >/dev/null; then
TLOG " oh ick, it looks like gcc" TLOG " oh ick, it looks like gcc"
skipping to change at line 421 skipping to change at line 429
AC_CFLAGS=${CFLAGS:-"-g"} AC_CFLAGS=${CFLAGS:-"-g"}
test "$CFLAGS" && TLOG "CFLAGS=\"${CFLAGS}\" are okay" test "$CFLAGS" && TLOG "CFLAGS=\"${CFLAGS}\" are okay"
elif [ "$CFLAGS" ]; then elif [ "$CFLAGS" ]; then
TLOG "ignoring bogus CFLAGS=\"${CFLAGS}\"" TLOG "ignoring bogus CFLAGS=\"${CFLAGS}\""
fi fi
else else
AC_CFLAGS=-g AC_CFLAGS=-g
fi fi
if [ "$LDFLAGS" ]; then if [ "$LDFLAGS" ]; then
test "$LDFLAGS" && echo "validating LDFLAGS=${LDFLAGS}" test "$LDFLAGS" && echo "validating LDFLAGS=${LDFLAGS}"
if $AC_CC $CFLAGS $LDFLAGS -o ngc$$ ngc$$.c; then if $AC_CC $CFLAGS $LDFLAGS -o ngc$$ ngc$$.c ngf$$.c; then
AC_LDFLAGS=${LDFLAGS:-"-g"} AC_LDFLAGS=${LDFLAGS:-"-g"}
test "$LDFLAGS" && TLOG "LDFLAGS=\"${LDFLAGS}\" are okay" test "$LDFLAGS" && TLOG "LDFLAGS=\"${LDFLAGS}\" are okay"
elif [ "$LDFLAGS" ]; then elif [ "$LDFLAGS" ]; then
TLOG "ignoring bogus LDFLAGS=\"${LDFLAGS}\"" TLOG "ignoring bogus LDFLAGS=\"${LDFLAGS}\""
fi fi
else else
AC_LDFLAGS=${CFLAGS:-"-g"} AC_LDFLAGS=${CFLAGS:-"-g"}
fi fi
# macos-specific(?) test for .dSYM resource directories # macos-specific(?) test for .dSYM resource directories
$AC_CC $AC_CFLAGS $AC_LDFLAGS -o ngc$$ ngc$$.c $AC_CC $AC_CFLAGS $AC_LDFLAGS -o ngc$$ ngc$$.c ngf$$.c
ls -dl ngc$$* ls -dl ngc$$*
test -d ngc$$.dSYM && __MACOS_DSYM=1 test -d ngc$$.dSYM && __MACOS_DSYM=1
else else
AC_FAIL " does not compile code properly" AC_FAIL " does not compile code properly"
fi fi
__remove ngc$$ ngc$$.c ngc$$.o __remove ngc$$ ngc$$.c ngc$$.o ngf$$.o ngf$$.c
return $status return $status
} }
# #
# acLookFor actually looks for a program, without setting anything. # acLookFor actually looks for a program, without setting anything.
# #
acLookFor () { acLookFor () {
path=${AC_PATH:-$ac_default_path} path=${AC_PATH:-$ac_default_path}
case "X$1" in case "X$1" in
X-[rx]) __mode=$1 X-[rx]) __mode=$1
shift shift
;; ;;
*) __mode=-x *) __mode=-x
;; ;;
esac esac
oldifs="$IFS" oldifs="$IFS"
for program in $*; do for program in $*; do
IFS=":" case "$program" in
for x in $path; do /*) if [ $__mode $program -a -f $program ]; then
if [ $__mode $x/$program -a -f $x/$program ]; then echo $program
echo $x/$program
break 2 break 2
fi fi ;;
done *)
IFS=":"
for x in $path; do
if [ $__mode $x/$program -a -f $x/$program ]; then
echo $x/$program
break 3
fi
done ;;
esac
done done
IFS="$oldifs" IFS="$oldifs"
unset __mode unset __mode
} }
# #
# check that a program exists and set its path # check that a program exists and set its path
# #
MF_PATH_INCLUDE () { MF_PATH_INCLUDE () {
SYM=$1; shift SYM=$1; shift
skipping to change at line 698 skipping to change at line 713
} }
# #
# AC_PROG looks for a program # AC_PROG looks for a program
# #
AC_PROG () { AC_PROG () {
PN=`basename $1 | $AC_UPPERCASE | tr -dc $AC_UPPER_PAT` PN=`basename $1 | $AC_UPPERCASE | tr -dc $AC_UPPER_PAT`
if set | grep -v PROG_$PN >/dev/null; then if set | grep -v PROG_$PN >/dev/null; then
TLOGN "looking for $1" TLOGN "looking for $1"
DEST=`acLookFor $1`
__pgm=`eval echo \\$$PN`
if [ "$__pgm" ]; then
TLOGN " (defined as $__pgm)"
DEST=`acLookFor $__pgm`
else
DEST=`acLookFor $1`
fi
if [ "$DEST" ]; then if [ "$DEST" ]; then
eval PROG_$PN="$DEST" eval PROG_$PN="$DEST"
AC_SUB $PN $DEST AC_SUB $PN $DEST
TLOG " ($DEST)" TLOG " ($DEST)"
return 0 return 0
fi fi
AC_SUB $PN true AC_SUB $PN true
TLOG " (not found)" TLOG " (not found)"
return 1 return 1
fi fi
skipping to change at line 823 skipping to change at line 846
local __what=`echo $1 | tr 'a-z' 'A-Z'` local __what=`echo $1 | tr 'a-z' 'A-Z'`
echo "extern int thing __attribute__((__"$1"__));" > ngc$$.c echo "extern int thing __attribute__((__"$1"__));" > ngc$$.c
TLOGN "Checking __attribute__((__${1}__)) " TLOGN "Checking __attribute__((__${1}__)) "
if $AC_CC -c ngc$$.c; then if $AC_CC -c ngc$$.c; then
TLOG "(yes)" TLOG "(yes)"
AC_DEFINE $__what ' __attribute__((__'$1'__))' AC_DEFINE $__what ' __attribute__((__'$1'__))'
else else
TLOG "(no)" TLOG "(no)"
AC_DEFINE $__what '' AC_DEFINE $__what '/**/'
fi fi
rm -f ngc$$.o ngc$$.c rm -f ngc$$.o ngc$$.c
} }
# #
# AC_C_CONST checks to see if the compiler supports the const keyword # AC_C_CONST checks to see if the compiler supports the const keyword
# #
AC_C_CONST () { AC_C_CONST () {
cat > ngc$$.c << EOF cat > ngc$$.c << EOF
const char me=1; const char me=1;
skipping to change at line 934 skipping to change at line 957
LOGN "defining WORD & DWORD scalar types" LOGN "defining WORD & DWORD scalar types"
# if AC_QUIET AC_CHECK_HEADERS WinDef.h; then # if AC_QUIET AC_CHECK_HEADERS WinDef.h; then
# # windows machine; BYTE, WORD, DWORD already # # windows machine; BYTE, WORD, DWORD already
# # defined # # defined
# echo "#include <WinDef.h>" >> "$__cwd"/config.h # echo "#include <WinDef.h>" >> "$__cwd"/config.h
# TLOG " (defined in WinDef.h)" # TLOG " (defined in WinDef.h)"
# return 0 # return 0
# fi # fi
# try first to define them with the (allegedly) standard
# unsigned scalar types
#
unset __i;
if AC_QUIET AC_CHECK_HEADERS inttypes.h; then
__i=inttypes.h
elif AC_QUIET AC_CHECK_HEADERS stdint.h; then
__i=stdint.h
fi
if AC_QUIET AC_CHECK_TYPE uint32_t $__i && \
AC_QUIET AC_CHECK_TYPE uint16_t $__i && \
AC_QUIET AC_CHECK_TYPE uint8_t $__i; then
while [ $# -gt 0 ]; do
case "$1" in
sub) ( if [ -z "$__i" ] ; then
echo "s:@SCALAR_HEADER_INCLUDE@::g"
else
echo "s:@SCALAR_HEADER_INCLUDE@:#include <$__i>:g"
fi
echo "s:@DWORD@:uint32_t:g"
echo "s:@WORD@:uint16_t:g"
echo "s:@BYTE@:uint8_t:g" ) >> "$__cwd"/config.sub
;;
*) ( echo "#define DWORD uint32_t"
echo "#define WORD uint16_t"
echo "#define BYTE uint8_t" ) >> "$__cwd"/config.h
;;
esac
shift
done
TLOG " (using standard types ${__i:+in <$__i>})"
return 0
fi
# and if that fails do a brute-force program that does sizeof()ication
# to figure things out
#
cat > ngc$$.c << EOF cat > ngc$$.c << EOF
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
int pound_define = 1; int pound_define = 1;
void void
say(char *w, char *v) say(char *w, char *v)
{ {
printf(pound_define ? "#define %s %s\n" printf(pound_define ? "#define %s %s\n"
skipping to change at line 983 skipping to change at line 1044
fprintf(stderr, "OK!"); fprintf(stderr, "OK!");
return 0; return 0;
} }
EOF EOF
if $AC_CC ngc$$.c -o ngc$$; then if $AC_CC ngc$$.c -o ngc$$; then
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
while [ "$1" ]; do while [ "$1" ]; do
case "$1" in case "$1" in
sub)if ./ngc$$ sub >> "$__cwd"/config.sub; then sub)if ./ngc$$ sub >> "$__cwd"/config.sub; then
echo "s:@SCALAR_HEADER_INCLUDE@::g" >> "$__cwd"/config.su b
rc=0 rc=0
fi;; fi;;
*) if ./ngc$$ >> "$__cwd"/config.h; then *) if ./ngc$$ >> "$__cwd"/config.h; then
rc=0 rc=0
fi ;; fi ;;
esac esac
shift shift
done done
elif ./ngc$$ >> "$__cwd"/config.h; then elif ./ngc$$ >> "$__cwd"/config.h; then
rc=0 rc=0
 End of changes. 13 change blocks. 
14 lines changed or deleted 76 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)