~linuxjedi/drizzle/trunk-bug-743902

« back to all changes in this revision

Viewing changes to m4/pandora_canonical.m4

  • Committer: Monty Taylor
  • Date: 2010-08-20 15:05:54 UTC
  • mfrom: (1720.1.7 build)
  • Revision ID: mordred@inaugust.com-20100820150554-fuwf8zs8qpzhpx6y
Added libdrizzle to the tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
dnl with or without modifications, as long as this notice is preserved.
5
5
 
6
6
dnl Which version of the canonical setup we're using
7
 
AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.146])
 
7
AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.150])
8
8
 
9
9
AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10
10
  AC_ARG_ENABLE([fat-binaries],
146
146
  AC_SYS_LARGEFILE
147
147
  PANDORA_CLOCK_GETTIME
148
148
 
 
149
  AC_CHECK_HEADERS(sys/socket.h)
 
150
 
149
151
  # off_t is not a builtin type
150
152
  AC_CHECK_SIZEOF(off_t, 4)
151
153
  AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[
233
235
    AC_CHECK_LIB(intl, libintl_gettext)
234
236
    AC_SUBST([GETTEXT_PACKAGE])
235
237
    AS_IF([test "x${USE_NLS}" = "xyes" -a "x${pandora_have_intltool}" = "xyes"],
236
 
          [AC_DEFINE([ENABLE_NLS],[1],[Turn on language support])])
 
238
          [AC_DEFINE([ENABLE_NLS],[1],[Turn on language support])
 
239
           AC_CONFIG_FILES([po/Makefile.in])
 
240
      ])
237
241
  ])
 
242
  AM_CONDITIONAL(BUILD_PO,[test "x${USE_NLS}" = "xyes" -a "x${pandora_have_intltool}" = "xyes"])
238
243
 
239
244
  AS_IF([test "x${gl_LIBOBJS}" != "x"],[
240
245
    AS_IF([test "$GCC" = "yes"],[
251
256
 
252
257
  PANDORA_USE_PIPE
253
258
 
 
259
  AH_TOP([
 
260
#ifndef __CONFIG_H__
 
261
#define __CONFIG_H__
 
262
 
 
263
/* _SYS_FEATURE_TESTS_H is Solaris, _FEATURES_H is GCC */
 
264
#if defined( _SYS_FEATURE_TESTS_H) || defined(_FEATURES_H)
 
265
#error "You should include config.h as your first include file"
 
266
#endif
 
267
 
 
268
#include "config/top.h"
 
269
])
 
270
  mkdir -p config
 
271
  cat > config/top.h.stamp <<EOF_CONFIG_TOP
 
272
 
 
273
#if defined(i386) && !defined(__i386__)
 
274
#define __i386__
 
275
#endif
 
276
 
 
277
#if defined(_FILE_OFFSET_BITS)
 
278
# undef _FILE_OFFSET_BITS
 
279
#endif
 
280
EOF_CONFIG_TOP
 
281
 
 
282
  diff config/top.h.stamp config/top.h >/dev/null 2>&1 || mv config/top.h.stamp config/top.h
 
283
  rm -f config/top.h.stamp
 
284
 
 
285
  AH_BOTTOM([
 
286
#if defined(__cplusplus)
 
287
# include CSTDINT_H
 
288
# include CINTTYPES_H
 
289
#else
 
290
# include <stdint.h>
 
291
# include <inttypes.h>
 
292
#endif
 
293
 
 
294
#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
 
295
typedef unsigned long int ulong;
 
296
#endif
 
297
 
 
298
/* To hide the platform differences between MS Windows and Unix, I am
 
299
 * going to use the Microsoft way and #define the Microsoft-specific
 
300
 * functions to the unix way. Microsoft use a separate subsystem for sockets,
 
301
 * but Unix normally just use a filedescriptor on the same functions. It is
 
302
 * a lot easier to map back to the unix way with macros than going the other
 
303
 * way without side effect ;-)
 
304
 */
 
305
#ifdef TARGET_OS_WINDOWS
 
306
#define random() rand()
 
307
#define srandom(a) srand(a)
 
308
#define get_socket_errno() WSAGetLastError()
 
309
#else
 
310
#define INVALID_SOCKET -1
 
311
#define SOCKET_ERROR -1
 
312
#define closesocket(a) close(a)
 
313
#define get_socket_errno() errno
 
314
#endif
 
315
 
 
316
#endif /* __CONFIG_H__ */
 
317
  ])
254
318
 
255
319
  AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
256
320
  AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"