~drizzle-trunk/libdrizzle/jenkins-Libdrizzle-95

« back to all changes in this revision

Viewing changes to m4/ax_endian.m4

  • Committer: Brian Aker
  • Date: 2012-12-17 11:57:49 UTC
  • mto: (43.2.3 libdrizzle-redux-5)
  • mto: This revision was merged to the branch mainline in revision 45.
  • Revision ID: brian@tangent.org-20121217115749-bjb8xuy3w9fs7h0i
Add autoconf rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# https://github.com/BrianAker/ddm4
 
2
# ===========================================================================
 
3
#
 
4
# SYNOPSIS
 
5
#
 
6
#   AX_ENDIAN()
 
7
#
 
8
# DESCRIPTION
 
9
#
 
10
#   Generate to defines describing endian.
 
11
#
 
12
# LICENSE
 
13
#
 
14
#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
 
15
#
 
16
#   Copying and distribution of this file, with or without modification, are
 
17
#   permitted in any medium without royalty provided the copyright notice
 
18
#   and this notice are preserved. This file is offered as-is, without any
 
19
#   warranty.
 
20
 
 
21
#serial 1
 
22
 
 
23
AC_DEFUN([AX_ENDIAN],[
 
24
    AC_C_BIGENDIAN([
 
25
      AC_DEFINE([WORDS_BIGENDIAN],[1],[machine is big-endian])
 
26
      AC_DEFINE([ENDIAN_BIG],[1],[machine is big-endian])
 
27
      AC_DEFINE([ENDIAN_LITTLE],[0],[machine is little-endian])],[ 
 
28
      ],[ 
 
29
      AC_DEFINE([WORDS_BIGENDIAN],[0],[machine is big-endian])
 
30
      AC_DEFINE([ENDIAN_BIG],[0],[machine is big-endian])
 
31
      AC_DEFINE([ENDIAN_LITTLE],[1],[machine is little-endian])
 
32
      ],[ 
 
33
      AC_MSG_ERROR([unable to determine endian])
 
34
      ]) 
 
35
    ])