Skip to content

Commit

Permalink
Merge pull request #491 from OpenSmalltalk/krono/fix-autoconf-again
Browse files Browse the repository at this point in the history
Autoconf fixes
  • Loading branch information
krono committed Apr 23, 2020
2 parents d48c1e7 + 55cd192 commit cbd22aa
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 145 deletions.
32 changes: 21 additions & 11 deletions platforms/unix/config/acinclude.m4
Expand Up @@ -251,11 +251,15 @@ AC_MSG_RESULT($CFLAGS_32)])
### plugin support


# AC_PLUGIN_SUBST(varname,value)
dnl AC_PLUGIN_SUBST(varname,value)

AC_DEFUN([AC_PLUGIN_DISABLE_PLUGIN],[
AC_MSG_RESULT([******** disabling $1])
disabled_plugins="${disabled_plugins} $1"])
AC_DEFUN([AC_PLUGIN_DISABLE_PLUGIN_MISSING],[
AC_MSG_RESULT([******** disabling $1 due to missing libraries])
disabled_plugins="${disabled_plugins} $1"])


AC_DEFUN([AC_PLUGIN_DISABLE],[
AC_PLUGIN_DISABLE_PLUGIN(${plugin})])
Expand All @@ -266,22 +270,28 @@ AC_DEFUN([AC_PLUGIN_USE_LIB],[
AC_DEFUN([AC_PLUGIN_DEFINE_UNQUOTED],[
echo 's%[\['$1'\]]%'$2'%g' >> ${plugin}.sub])

# AC_PLUGIN_SEARCH_LIBS(function,libs...)
dnl AC_PLUGIN_SEARCH_LIBS(function,libs...)

AC_DEFUN([AC_PLUGIN_SEARCH_LIBS],[
AC_SEARCH_LIBS($1,$2,,
AC_MSG_RESULT([******** disabling ${plugin} due to missing libraries])
disabled_plugins="${disabled_plugins} ${plugin}")])

# AC_PLUGIN_CHECK_LIB(lib,func,ok,bad)
# Do not put into LIBS because plibs should get it.
save_LIBS="$LIBS"
LIBS=""
AC_SEARCH_LIBS($1,$2,
[dnl AC_SEARCH_LIBS generates LIBS with -l, plibs expects libnames wihtout
dnl since at most one can be found, strip the "-l"
plib=`echo "${LIBS}" | cut -c3-`
AC_PLUGIN_USE_LIB(${plib})],
[AC_PLUGIN_DISABLE_PLUGIN_MISSING(${plugin})])
LIBS="$save_LIBS"])

dnl AC_PLUGIN_CHECK_LIB(lib,func,ok,bad)

AC_DEFUN([AC_PLUGIN_CHECK_LIB],[
AC_CHECK_LIB($1,$2,
plibs="${plibs} $1",
AC_MSG_RESULT([******** disabling ${plugin} due to missing libraries])
disabled_plugins="${disabled_plugins} ${plugin}")])
[AC_PLUGIN_USE_LIB($1)],
[AC_PLUGIN_DISABLE_PLUGIN_MISSING(${plugin})])])

# Recent Unix stuff
dnl Recent Unix stuff
m4_include([ax_require_defined.m4])
m4_include([ax_append_flag.m4])
m4_include([ax_have_epoll.m4])
Expand Down
3 changes: 3 additions & 0 deletions platforms/unix/config/config.h.in
Expand Up @@ -66,6 +66,9 @@
/* Define to 1 if you have the <alsa/asoundlib.h> header file. */
#undef HAVE_ALSA_ASOUNDLIB_H

/* Define to 1 if you have the <audio/audiolib.h> header file. */
#undef HAVE_AUDIO_AUDIOLIB_H

/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
*/
#undef HAVE_DECL_TZNAME
Expand Down

0 comments on commit cbd22aa

Please sign in to comment.