Skip to content

Commit c709708

Browse files
committed
configure.ac: avoid AM_COND_IF absent in older aclocal builds [#3300]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent 5804a73 commit c709708

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

configure.ac

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,9 @@ if (semaphore != SEM_FAILED)
13961396
]
13971397
)
13981398
AM_CONDITIONAL(HAVE_SEMAPHORE_LIBS, [test -n "${SEMLIBS}"])
1399-
AM_CONDITIONAL(HAVE_SEMAPHORE_ABILITY, [test -n "${SEMLIBS}" -o x"${nut_have_semaphore_h}" = xyes -o x"${nut_have_semaphore_unnamed}" = xyes -o x"${nut_have_semaphore_named}" = xyes])
1399+
AS_IF([test -n "${SEMLIBS}" -o x"${nut_have_semaphore_h}" = xyes -o x"${nut_have_semaphore_unnamed}" = xyes -o x"${nut_have_semaphore_named}" = xyes],
1400+
[nut_have_semaphore_ability=yes],
1401+
[nut_have_semaphore_ability=no])
14001402

14011403
dnl ----------------------------------------------------------------------
14021404
dnl Check for --with-threading request
@@ -1406,8 +1408,8 @@ NUT_ARG_WITH([threading],
14061408
[auto])
14071409

14081410
AS_CASE(["${nut_with_threading}"],
1409-
[""|yes], [AM_COND_IF([HAVE_SEMAPHORE_ABILITY], [], [AC_MSG_ERROR([pthread support was required but libraries not detected])])],
1410-
[auto],[AM_COND_IF([HAVE_SEMAPHORE_ABILITY], [nut_with_threading=yes], [nut_with_threading=no])],
1411+
[""|yes], [AS_IF([test x"${nut_have_semaphore_ability}" = xyes], [], [AC_MSG_ERROR([pthread support was required but libraries not detected])])],
1412+
[auto],[AS_IF([test x"${nut_have_semaphore_ability}" = xyes], [nut_with_threading=yes], [nut_with_threading=no])],
14111413
[no], [],
14121414
[AC_MSG_ERROR([Unsupported value for --with-threading option: "${nut_with_threading}"])]
14131415
)

0 commit comments

Comments
 (0)