1099.1.7
by Monty Taylor
pandora-build v0.27 |
1 |
dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- |
2 |
dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: |
|
3 |
dnl |
|
4 |
dnl pandora-build: A pedantic build system |
|
5 |
dnl Copyright (C) 2009 Sun Microsystems, Inc. |
|
1126.6.8
by Monty Taylor
pandora-build v0.62 - cleaned up some copyright header mistakes. Merged in trond's innodb detection. |
6 |
dnl This file is free software; Sun Microsystems |
1099.1.7
by Monty Taylor
pandora-build v0.27 |
7 |
dnl gives unlimited permission to copy and/or distribute it, |
8 |
dnl with or without modifications, as long as this notice is preserved. |
|
9 |
dnl
|
|
10 |
dnl From Monty Taylor |
|
11 |
||
12 |
AC_DEFUN([PANDORA_PLATFORM],[ |
|
13 |
||
14 |
dnl Canonicalize the configuration name.
|
|
15 |
||
16 |
AC_DEFINE_UNQUOTED([HOST_VENDOR], ["$host_vendor"],[Vendor of Build System]) |
|
17 |
AC_DEFINE_UNQUOTED([HOST_OS], ["$host_os"], [OS of Build System]) |
|
18 |
AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [CPU of Build System]) |
|
19 |
||
20 |
AC_DEFINE_UNQUOTED([TARGET_VENDOR], ["$target_vendor"],[Vendor of Target System]) |
|
21 |
AC_DEFINE_UNQUOTED([TARGET_OS], ["$target_os"], [OS of Target System]) |
|
22 |
AC_DEFINE_UNQUOTED([TARGET_CPU], ["$target_cpu"], [CPU of Target System]) |
|
23 |
||
24 |
||
1093.9.3
by Monty Taylor
pandora-build v0.36 |
25 |
case "$host_os" in |
1643.1.12
by Monty Taylor
Updated pandora-build files to version 0.136 |
26 |
*solaris*) |
1099.1.7
by Monty Taylor
pandora-build v0.27 |
27 |
AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ |
1099.1.12
by Monty Taylor
Rearranged two orderings. |
28 |
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
|
1099.1.7
by Monty Taylor
pandora-build v0.27 |
29 |
]) |
30 |
||
31 |
AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ |
|
1099.1.12
by Monty Taylor
Rearranged two orderings. |
32 |
LDFLAGS="${LDFLAGS} -L/usr/local/lib"
|
1099.1.7
by Monty Taylor
pandora-build v0.27 |
33 |
]) |
34 |
;; |
|
1643.1.12
by Monty Taylor
Updated pandora-build files to version 0.136 |
35 |
*freebsd*) |
36 |
AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ |
|
37 |
CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include"
|
|
38 |
]) |
|
39 |
||
40 |
AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ |
|
41 |
LDFLAGS="${LDFLAGS} -L/usr/local/lib"
|
|
42 |
]) |
|
43 |
;; |
|
1099.1.7
by Monty Taylor
pandora-build v0.27 |
44 |
esac |
45 |
||
1471.3.1
by Monty Taylor
Latest pandora-build. Moves the lint check to only run distcheck. |
46 |
PANDORA_OPTIMIZE_BITFIELD=1 |
47 |
||
1099.1.7
by Monty Taylor
pandora-build v0.27 |
48 |
case "$target_os" in |
49 |
*linux*) |
|
50 |
TARGET_LINUX="true" |
|
51 |
AC_SUBST(TARGET_LINUX) |
|
52 |
AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) |
|
53 |
;; |
|
54 |
*darwin*) |
|
55 |
TARGET_OSX="true" |
|
56 |
AC_SUBST(TARGET_OSX) |
|
57 |
AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX]) |
|
58 |
;; |
|
59 |
*solaris*) |
|
60 |
TARGET_SOLARIS="true" |
|
1471.3.1
by Monty Taylor
Latest pandora-build. Moves the lint check to only run distcheck. |
61 |
PANDORA_OPTIMIZE_BITFIELD=0 |
1720.1.5
by Monty Taylor
Added libdrizzle to the tree. |
62 |
AS_IF([test "x${USE_NLS}" = "xyes"],[LIBS="${LIBS} -lintl"]) |
1099.1.7
by Monty Taylor
pandora-build v0.27 |
63 |
AC_SUBST(TARGET_SOLARIS) |
64 |
AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris]) |
|
65 |
;; |
|
66 |
*freebsd*) |
|
67 |
TARGET_FREEBSD="true" |
|
68 |
AC_SUBST(TARGET_FREEBSD) |
|
69 |
AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD]) |
|
70 |
AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers]) |
|
71 |
;; |
|
1667.4.10
by Monty Taylor
Updated pandora-build files to version 0.138 |
72 |
*mingw32*) |
73 |
TARGET_WINDOWS="true" |
|
74 |
AC_SUBST(TARGET_WINDOWS) |
|
75 |
AC_DEFINE([TARGET_OS_WINDOWS], [1], [Whether we are building for Windows]) |
|
1677.1.2
by Monty Taylor
updated to latest pandora-build - contains win32 fixes and the fix to the |
76 |
AC_DEFINE([WINVER], [WindowsXP], [Version of Windows]) |
77 |
AC_DEFINE([_WIN32_WINNT], [0x0501], [Magical number to make things work]) |
|
1720.1.5
by Monty Taylor
Added libdrizzle to the tree. |
78 |
AC_DEFINE([EAI_SYSTEM], [11], [Another magical number]) |
79 |
AH_BOTTOM([ |
|
80 |
#ifndef HAVE_SYS_SOCKET_H
|
|
81 |
# define SHUT_RD SD_RECEIVE
|
|
82 |
# define SHUT_WR SD_SEND
|
|
83 |
# define SHUT_RDWR SD_BOTH
|
|
84 |
#endif
|
|
85 |
]) |
|
86 |
||
1677.1.2
by Monty Taylor
updated to latest pandora-build - contains win32 fixes and the fix to the |
87 |
LIBS="$LIBS -lwsock32 -lws2_32" |
1720.1.5
by Monty Taylor
Added libdrizzle to the tree. |
88 |
AM_CFLAGS="${AM_CFLAGS} -I\${top_srcdir}/win32/mingw -I\${top_builddir}/win32/mingw -I\${top_srcdir}/win32 -I\${top_builddir}/win32" |
1099.1.7
by Monty Taylor
pandora-build v0.27 |
89 |
;; |
90 |
esac |
|
1677.1.2
by Monty Taylor
updated to latest pandora-build - contains win32 fixes and the fix to the |
91 |
AM_CONDITIONAL(BUILD_WIN32, [test "x${TARGET_WINDOWS}" = "xtrue"]) |
1099.1.7
by Monty Taylor
pandora-build v0.27 |
92 |
|
1471.3.1
by Monty Taylor
Latest pandora-build. Moves the lint check to only run distcheck. |
93 |
AC_SUBST(PANDORA_OPTIMIZE_BITFIELD) |
94 |
||
1099.1.7
by Monty Taylor
pandora-build v0.27 |
95 |
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) |
96 |
AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"]) |
|
97 |
||
1126.6.1
by Monty Taylor
pandora-build v0.58 |
98 |
AS_IF([test "$INTELCC" = "yes"], [enable_rpath=no]) |
99 |
|
|
100 |
dnl By default, Sun Studio grabs special versions of limits.h and string.h |
|
101 |
dnl when you use <cstring> and <climits>. By setting this define, we can |
|
102 |
dnl disable that and cause those to wrap the standard headers instead. |
|
103 |
dnl http://www.stlport.com/doc/configure.html |
|
104 |
AS_IF([test "$SUNCC" = "yes"],[ |
|
105 |
AC_DEFINE([_STLP_NO_NEW_C_HEADERS],[1], |
|
106 |
[Cause Sun Studio to not be quite so strict with standards conflicts]) |
|
107 |
]) |
|
1099.1.7
by Monty Taylor
pandora-build v0.27 |
108 |
|
1259.2.2
by Monty Taylor
Added option for OSX Fat Binaries. |
109 |
AS_IF([test "x$TARGET_OSX" = "xtrue"],[ |
110 |
AS_IF([test "x$ac_enable_fat_binaries" = "xyes"],[ |
|
111 |
AM_CFLAGS="-arch i386 -arch x86_64 -arch ppc"
|
|
112 |
AM_CXXFLAGS="-arch i386 -arch x86_64 -arch ppc"
|
|
113 |
AM_LDFLAGS="-arch i386 -arch x86_64 -arch ppc"
|
|
114 |
]) |
|
115 |
]) |
|
116 |
||
1099.1.7
by Monty Taylor
pandora-build v0.27 |
117 |
]) |