conditional compilation QSORT

This commit is contained in:
Francesco Lannutti 2012-11-17 12:43:38 +01:00 committed by rlar
parent c54d9b5d27
commit d98d18afe4
3 changed files with 7 additions and 5 deletions

View File

@ -645,11 +645,12 @@ AC_CHECK_FUNCS([isatty tcgetattr tcsetattr])
# Check for a few functions:
AC_FUNC_FORK([])
AC_CHECK_FUNCS([access bcopy bzero qsort dup2 popen])
AC_CHECK_FUNCS([access bcopy bzero dup2 popen])
AC_CHECK_FUNCS([strchr index], [break])
AC_CHECK_FUNCS([strrchr rindex], [break])
AC_CHECK_FUNCS([getcwd getwd], [break])
AC_CHECK_FUNC([qsort], [qsort_checked=true])
AM_CONDITIONAL([HAVE_QSORT_WANTED], [test "x$qsort_checked" = xtrue])
AC_MSG_RESULT([Checking mathematical features of the system:])
# Look for math library:

View File

@ -17,11 +17,14 @@ libparser_la_SOURCES = \
lexical.h \
numparse.c \
numparse.h \
std.c \
unixcom.c \
unixcom.h
if !HAVE_QSORT_WANTED
libparser_la_SOURCES += std.c
endif
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include
AM_CFLAGS = $(STATIC)
MAINTAINERCLEANFILES = Makefile.in

View File

@ -14,8 +14,6 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
/* This might not be around. If not then forget about sorting. */
#ifndef HAVE_QSORT
#ifndef qsort
qsort() {}
#endif
#endif