@@ -27,25 +27,21 @@ PKG_CHECK_MODULES([GTK],[gtk+-3.0 >= 3.6])
2727
2828case "${host}" in
2929 *-*-darwin*)
30- PCSC_CFLAGS='-Wno-deprecated-declarations -I/System/Library/Frameworks/PCSC.framework/Headers'
31- PCSC_LIBS='-framework PCSC'
30+ PCSC_HEADERS=`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*.sdk/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers/ | sort | head -1`
31+ PCSC_CFLAGS="-Wno-deprecated-declarations -I$PCSC_HEADERS"
32+ PCSC_LIBS="-framework PCSC"
3233 ;;
3334 *)
3435 PKG_CHECK_MODULES([ PCSC] ,[ libpcsclite] )
3536 ;;
3637esac
3738
39+
40+
3841PKG_CHECK_MODULES([ LUA] ,[ lua-5.2] ,,[
3942 PKG_CHECK_MODULES([ LUA] ,[ lua5.2] ,,[
4043 PKG_CHECK_MODULES([ LUA] ,[ lua >= 5.2] ,,[
41- for lua_lib_name in lua.5.2 lua-5.2 lua5.2; do
42- AC_CHECK_LIB ( [ $lua_lib_name] , [ lua_close] , [ HAVE_LIBLUA=yes] , [ HAVE_LIBLUA=no] )
43- if test x$HAVE_LIBLUA = xyes; then
44- AC_SUBST ( [ LUA_CFLAGS] , [ ""] )
45- AC_SUBST ( [ LUA_LIBS] , [ "-l$lua_lib_name"] )
46- break
47- fi
48- done
44+ AC_SEARCH_LIBS ( [ lua_close] , [ lua.5.2 lua-5.2 lua5.2] , [ HAVE_LIBLUA=yes] , [ HAVE_LIBLUA=no] )
4945 if test x$HAVE_LIBLUA != xyes; then
5046 AC_MSG_ERROR ( [ Could not find lua 5.2-dev.
5147 This program requires the lua 5.2 development library.
@@ -56,11 +52,7 @@ PKG_CHECK_MODULES([LUA],[lua-5.2],,[
5652] )
5753
5854PKG_CHECK_MODULES([ CURL] ,[ libcurl] ,,[
59- AC_CHECK_LIB ( [ curl] ,[ curl_easy_init] ,[
60- AC_SUBST ( [ CURL_CFLAGS] ,[ ""] )
61- AC_SUBST ( [ CURL_LIBS] ,[ -lcurl] )
62- HAVE_LIBCURL=yes
63- ] ,[ HAVE_LIBCURL=no] )
55+ AC_SEARCH_LIBS ( [ curl_easy_init] ,[ curl] , [ HAVE_LIBCURL=yes] , [ HAVE_LIBCURL=no] )
6456 if test x$HAVE_LIBCURL != xyes; then
6557 AC_MSG_ERROR ( [ Cloud not find libcurl.
6658 This program requires the libcurl development library.
0 commit comments