source: xplra/configure.ac@ 1:36cf4d98558c

Last change on this file since 1:36cf4d98558c was 1:36cf4d98558c, checked in by István Váradi <ivaradi@…>, 11 years ago

Some further development

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