$NetBSD: patch-src_configure.ac,v 1.2 2016/05/29 22:32:12 abs Exp $ Check for dlopen using autoconf rather than hardcoding it in src/Makefile.in. Plus add an option to disable gitcheck --- configure.ac.orig 2015-09-09 19:27:51.000000000 +0000 +++ configure.ac @@ -22,6 +22,12 @@ AC_ARG_ENABLE(openssl, [ac_enable_openssl="no"] ) +AC_ARG_ENABLE(gitcheck, + [AS_HELP_STRING([--disable-gitcheck], [Disable Git check, default: enabled])], + [ac_enable_gitcheck="$enableval"], + [ac_enable_gitcheck="yes"] +) + # Define necessary build flags AC_GNU_SOURCE AC_USE_SYSTEM_EXTENSIONS @@ -73,10 +79,13 @@ AC_FUNC_FORK AC_PROG_GCC_TRADITIONAL AC_FUNC_SELECT_ARGTYPES AC_CHECK_FUNCS([atexit memset poll socket strerror]) +AC_SEARCH_LIBS([dlopen], [dl dld], [], [ + AC_MSG_ERROR([unable to find the dlopen() function]) +]) # Check if user has downloaded a GitHub ZIP file and attempt to fix it. AC_MSG_CHECKING([status of GIT submodules]) -if test ! -e libite/lite.h; then +if test "$ac_enable_gitcheck" = "yes" -a ! -e libite/lite.h; then AC_MSG_RESULT([Missing!]) AC_MSG_CHECKING([if we can update all submodules]) run=`git submodule update --init`