diff options
Diffstat (limited to 'modules/qsort_r')
-rw-r--r-- | modules/qsort_r | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/qsort_r b/modules/qsort_r index 6772edc467..8063078562 100644 --- a/modules/qsort_r +++ b/modules/qsort_r @@ -12,16 +12,20 @@ stdlib configure.ac: gl_FUNC_QSORT_R -if test $HAVE_QSORT_R = 0; then - # The function is missing from the system or has an unknown signature. - AC_LIBOBJ([qsort]) -elif test $REPLACE_QSORT_R = 1; then - # The function exists, but it has the BSD signature. - AC_LIBOBJ([qsort_r]) -fi +dnl If the function is missing from the system or has an unknown signature: +gl_CONDITIONAL([GL_COND_OBJ_QSORT], [test $HAVE_QSORT_R = 0]) +dnl If the function exists, but it has the BSD signature: +gl_CONDITIONAL([GL_COND_OBJ_QSORT_R], + [test $HAVE_QSORT_R = 1 && test $REPLACE_QSORT_R = 1]) gl_STDLIB_MODULE_INDICATOR([qsort_r]) Makefile.am: +if GL_COND_OBJ_QSORT +lib_SOURCES += qsort.c +endif +if GL_COND_OBJ_QSORT_R +lib_SOURCES += qsort_r.c +endif Include: <stdlib.h> |