AC_INIT(libxplcommon, 0.1, ivaradi@gmail.com) AM_INIT_AUTOMAKE([foreign]) LT_INIT AM_PROG_AS AC_PROG_CC AC_PROG_CXX AC_CONFIG_MACRO_DIR([m4]) AC_CHECK_HEADERS([windows.h winsock2.h]) test "$ac_cv_header_windows_h" = "yes" -a "$ac_cv_header_winsock2_h" = "yes" _target_win32=$? AM_CONDITIONAL([TARGET_API_WIN32], test $_target_win32 -eq 0) AM_CONDITIONAL([TARGET_API_WIN64], test $_target_win32 -eq 0 -a "$host_cpu" = "x86_64") AM_CONDITIONAL([TARGET_API_POSIX], test $_target_win32 -ne 0) if test $_target_win32 -eq 0; then if test "$host_cpu" = "x86_64"; then AC_DEFINE([TARGET_API_WIN64], [1], [Define if the target is the 64-bit Win32 API.]) fi AC_DEFINE([TARGET_API_WIN32], [1], [Define if the target is the Win32 API.]) else AC_DEFINE([TARGET_API_POSIX], [1], [Define if the target is the POSIX API.]) fi AC_MSG_CHECKING([where to find the X-Plane Plugin SDK]) AC_ARG_WITH(xpsdk, AC_HELP_STRING([--with-xpsdk=DIR], [use the X-Plane Plugin SDK in DIR]), [ if test -r $withval/CHeaders/XPLM/XPLMPlugin.h; then AC_MSG_RESULT([$withval]) XPSDK_INCLUDES="-I$withval/CHeaders/XPLM -I$withval/CHeaders/Wrappers -I$withval/CHeaders/Widgets" if test $_target_win32 -eq 0; then XPSDK_LDFLAGS="-L$withval/Libraries/Win" else XPSDK_LDFLAGS="" fi else AC_MSG_FAILURE([not found in $withval]) fi ], [ AC_MSG_FAILURE([please, specify]) ]) AC_SUBST(XPSDK_INCLUDES) AC_SUBST(XPSDK_LDFLAGS) AC_CONFIG_FILES([ Makefile libxplcommon.pc src/Makefile src/hu/Makefile src/hu/varadiistvan/Makefile src/hu/varadiistvan/xplcommon/Makefile ]) AC_OUTPUT()