source: xplcommon/configure.ac@ 38:d68450d100a8

Last change on this file since 38:d68450d100a8 was 38:d68450d100a8, checked in by István Váradi <ivaradi@…>, 12 years ago

Added a utility function to emit debug info into X-Plane's log

File size: 1.7 KB
Line 
1AC_INIT(libxplcommon, 0.1, ivaradi@gmail.com)
2AM_INIT_AUTOMAKE([foreign])
3
4LT_INIT
5
6AM_PROG_AS
7AC_PROG_CC
8AC_PROG_CXX
9
10AC_CHECK_HEADERS([windows.h winsock2.h])
11
12test "$ac_cv_header_windows_h" = "yes" -a "$ac_cv_header_winsock2_h" = "yes"
13_target_win32=$?
14
15AM_CONDITIONAL([TARGET_API_WIN32], test $_target_win32 -eq 0)
16AM_CONDITIONAL([TARGET_API_POSIX], test $_target_win32 -ne 0)
17if test $_target_win32 -eq 0; then
18 AC_DEFINE([TARGET_API_WIN32], [1], [Define if the target is the Win32 API.])
19else
20 AC_DEFINE([TARGET_API_POSIX], [1], [Define if the target is the POSIX API.])
21fi
22
23AC_MSG_CHECKING([where to find the X-Plane Plugin SDK])
24AC_ARG_WITH(xpsdk,
25 AC_HELP_STRING([--with-xpsdk=DIR],
26 [use the X-Plane Plugin SDK in DIR]),
27 [
28 if test -r $withval/CHeaders/XPLM/XPLMPlugin.h; then
29 AC_MSG_RESULT([$withval])
30 XPSDK_INCLUDES="-I$withval/CHeaders/XPLM -I$withval/CHeaders/Wrappers -I$withval/CHeaders/Widgets"
31 if test $_target_win32 -eq 0; then
32 XPSDK_LDFLAGS="-L$withval/Libraries/Win"
33 else
34 XPSDK_LDFLAGS=""
35 fi
36 else
37 AC_MSG_FAILURE([not found in $withval])
38 fi
39 ],
40 [
41 AC_MSG_FAILURE([please, specify])
42 ])
43
44AC_SUBST(XPSDK_INCLUDES)
45AC_SUBST(XPSDK_LDFLAGS)
46
47AC_CONFIG_FILES([
48 Makefile
49 libxplcommon.pc
50 src/Makefile
51 src/xplcommon/Makefile
52 src/xplcommon/posix/Makefile
53 src/xplcommon/win32/Makefile
54 test/Makefile
55])
56
57AC_CONFIG_HEADERS([src/xplcommon/config.h])
58
59AC_OUTPUT()
Note: See TracBrowser for help on using the repository browser.