Text-Markdown-Discount

 view release on metacpan or  search on metacpan

discount-2.2.7d/configure.sh  view on Meta::CPAN

	LOG "Setting theme default --with-$banned_with."
    fi
done

# theme wants the old behavior of --with-(foo)
#
case "`echo "$WITH_DL" | $AC_UPPERCASE`" in
    EXTRA)         THEME_CF="MKD_DLEXTRA|MKD_NODLDISCOUNT";;
    BOTH)          THEME_CF="MKD_DLEXTRA";;
esac
test "$WITH_FENCED_CODE" && THEME_CF="${THEME_CF:+$THEME_CF|}MKD_FENCEDCODE"

AC_DEFINE THEME_CF "$THEME_CF"


test "$DEBIAN_GLITCH" && AC_DEFINE 'DEBIAN_GLITCH' 1

AC_PROG_CC
AC_QUIET AC_PROG git && AC_DEFINE 'HAS_GIT' '1'
AC_CHECK_ATTRIBUTE destructor

test "$TRY_SHARED" && AC_COMPILER_PIC && AC_CC_SHLIBS

if [ "IS_BROKEN_CC" ]; then
    case "$AC_CC $AC_CFLAGS" in
    *-pedantic*) ;;
    *)  # hack around deficiencies in gcc and clang
	#
	AC_DEFINE 'while(x)' 'while( (x) != 0 )'
	AC_DEFINE 'if(x)' 'if( (x) != 0 )'

	if [ "$IS_CLANG" ]; then
	    AC_CC="$AC_CC -Wno-implicit-int"
	elif [ "$IS_GCC" ]; then
	    AC_CC="$AC_CC -Wno-return-type -Wno-implicit-int"
	fi ;;
    esac
fi

AC_PROG ar || AC_FAIL "$TARGET requires ar"
AC_PROG ranlib

# should we create a .pc for pkg-config & GNU automake
#
if [ "$PKGCONFIG" ]; then
    AC_SUB MK_PKGCONFIG ''
elif AC_PROG pkg-config || AC_PROG automake ; then
    PKGCONFIG=true
    AC_SUB MK_PKGCONFIG ''
else
    AC_SUB MK_PKGCONFIG '#'
fi

AC_C_VOLATILE
AC_C_CONST
AC_C_INLINE
AC_SCALAR_TYPES sub hdr
AC_CHECK_BASENAME
AC_CHECK_ALLOCA

AC_CHECK_HEADERS sys/types.h pwd.h && AC_CHECK_FUNCS getpwuid
if AC_CHECK_HEADERS sys/stat.h && AC_CHECK_FUNCS stat; then

# need to check some of the S_ISxxx stat macros, because they may not
# exist (for notspecial.c)

cat > ngc$$.c << EOF
#include <sys/stat.h>

main(argc, argv)
char **argv;
{
   struct stat info;

    if ( stat(argv[0], &info) != 0 )
	return 1;

    return MACRO(info.st_mode);
}
EOF
    LOGN "special file macros in sys/stat.h:"
    _none="none"
    for x in ISSOCK ISCHR ISFIFO; do
	if $AC_CC -DMACRO=S_$x -o ngc$$.o  ngc$$.c; then
	    LOGN " S_${x}"
	    AC_DEFINE "HAS_${x}" '1'
	    unset _none
	fi
    done
    LOG "${_none}."
    __remove ngc$$.o ngc$$.c
fi

if AC_CHECK_FUNCS srandom; then
    AC_DEFINE 'INITRNG(x)' 'srandom((unsigned int)x)'
elif AC_CHECK_FUNCS srand; then
    AC_DEFINE 'INITRNG(x)' 'srand((unsigned int)x)'
else
    AC_DEFINE 'INITRNG(x)' '(void)1'
fi

AC_CHECK_FUNCS 'memset((char*)0,0,0)' 'string.h' || \
	    AC_CHECK_FUNCS 'memset((char*)0,0,0)' || \
		      AC_FAIL "$TARGET requires memset"

if AC_CHECK_FUNCS random; then
    AC_DEFINE 'COINTOSS()' '(random()&1)'
elif AC_CHECK_FUNCS rand; then
    AC_DEFINE 'COINTOSS()' '(rand()&1)'
else
    AC_DEFINE 'COINTOSS()' '1'
fi

if AC_CHECK_FUNCS strcasecmp; then
    :
elif AC_CHECK_FUNCS stricmp; then
    AC_DEFINE strcasecmp stricmp
else
    AC_FAIL "$TARGET requires either strcasecmp() or stricmp()"
fi



( run in 2.472 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )