#include <iostream.h>

#if defined(linux)
#include <endian.h>
#endif

int main()
{
  double x = 1;
  long *px = (long *) &x;

  if (sizeof(long) == sizeof(double))
     cout << "DFLAGS = -DWORD_LENGTH_64\n";
  else
     if (!(*px) && *(++px)) 
        cout <<   "DFLAGS = -DLITTLE_ENDIAN\n";
     else
        if (*px && !(*(++px)))
            cout << "DFLAGS = -DBIG_ENDIAN\n";


#if defined(linux)

#if (BYTE_ORDER == LITTLE_ENDIAN)
  cout << "linux: little endian" << endl;
#endif

#if (BYTE_ORDER == BIG_ENDIAN)
  cout << "linux: big endian" << endl;
#endif

#endif

  return 0;
}
