]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/cpp/DataBoardTest/libantlr3c-3.2/configure.ac
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / libantlr3c-3.2 / configure.ac
diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/libantlr3c-3.2/configure.ac b/bundles/org.simantics.databoard/cpp/DataBoardTest/libantlr3c-3.2/configure.ac
new file mode 100644 (file)
index 0000000..d2cc825
--- /dev/null
@@ -0,0 +1,217 @@
+#                                               -*- Autoconf -*-\r
+# Process this file with autoconf to produce a configure script.\r
+\r
+AC_INIT(libantlr3c, 3.2, jimi@temporal-wave.com)\r
+AC_PREREQ(2.60)\r
+AC_COPYRIGHT([\r
+ (The "BSD licence")\r
+ Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC\r
+ http://www.temporal-wave.com\r
+ http://www.linkedin.com/in/jimidle\r
+ All rights reserved.\r
+\r
+ Redistribution and use in source and binary forms, with or without\r
+ modification, are permitted provided that the following conditions\r
+ are met:\r
+ 1. Redistributions of source code must retain the above copyright\r
+    notice, this list of conditions and the following disclaimer.\r
+ 2. Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the\r
+    documentation and/or other materials provided with the distribution.\r
+ 3. The name of the author may not be used to endorse or promote products\r
+    derived from this software without specific prior written permission.\r
+\r
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\r
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+])\r
+AC_CONFIG_SRCDIR(src/antlr3parser.c)\r
+\r
+\r
+AC_ARG_ENABLE([debuginfo],\r
+               [AS_HELP_STRING([--enable-debuginfo], [Compiles debug info into the library (default --disable-debuginfo)])],\r
+               [], [enable_debuginfo=no])\r
+\r
+AC_ARG_ENABLE([64bit],\r
+               [AS_HELP_STRING([--enable-64bit], [Turns on flags that produce 64 bit object code if any are required (default --disable-64bit)])],\r
+               [], [enable_64bit=no])\r
+\r
+AC_ARG_ENABLE([abiflags],\r
+               [AS_HELP_STRING([--disable-abiflags], [Does not add ABI flags -m32 or -m64 for older versions of gcc, such as itanium 3.x (default --enable-abiflags=yes)])],\r
+               [], [enable_abiflags=yes])\r
+\r
+AC_ARG_ENABLE([antlrdebug],\r
+               [AS_HELP_STRING([--disable-antlrdebug], [Turns off default flags that include the antlr debugger in the runtime. Specify to remove debugger and the socket dependancies (default --enable-antlrdebug)])],\r
+               [], [enable_antlrdebug=yes])\r
+\r
+AM_INIT_AUTOMAKE(foreign)\r
+AC_LANG(C)\r
+AC_PROG_CC([xlc aCC gcc cc])\r
+AM_MAINTAINER_MODE\r
+AM_PROG_LIBTOOL\r
+\r
+AC_CANONICAL_BUILD\r
+AC_CANONICAL_HOST\r
+\r
+OBJECT_MODE=\r
+# Checks for programs.\r
+AC_MSG_CHECKING([compiler flags required for compiling ANTLR with $CC C compiler on host $host])\r
+WARNFLAGS=\r
+case $CC in\r
+xlc*)\r
+ CPPCMNTFLAGS="-qcpluscmt"\r
+ if test x"$enable_64bit" = xyes; then\r
+  CCFLAGS64="-q64 -Wl,-b64"\r
+  OBJECT_MODE="64"\r
+ else\r
+  OBJECT_MODE="32"\r
+ fi\r
+ OPTIMFLAGS="-O2"\r
+ if test x"$enable_debuginfo" = xyes; then\r
+  DEBUGFLAGS="-g"\r
+ fi\r
+ ;;\r
+\r
+aCC*)\r
+ CPPCMNTFLAGS=\r
+ if test x"$enable_64bit" = xyes; then\r
+  CCFLAGS64="+DD64"\r
+ fi\r
+ OPTIMFLAGS="-O"\r
+ if test $DEBUGINF = 1; then\r
+  DEBUGFLAGS="-g"\r
+ fi\r
+ ;;\r
+\r
+gcc*)\r
+ CPPCMNTFLAGS=\r
+ if test x"$enable_64bit" = xyes; then\r
+  GCCABIFLAGS="-m64"\r
+ else\r
+  GCCABIFLAGS="-m32"\r
+ fi\r
+ if test x"$enable_abiflags" = xyes; then\r
+  CCFLAGS64=$GCCABIFLAGS\r
+ fi\r
+ OPTIMFLAGS="-O2"\r
+ if test x"$enable_debuginfo" = xyes; then\r
+  DEBUGFLAGS="-g"\r
+ fi\r
+ WARNFLAGS=-Wall\r
+ ;;\r
+\r
+*)\r
+\r
+case $host in\r
+sparc*-*solaris*)\r
+ CPPCMNTFLAGS=\r
+ if test x"$enable_64bit" = xyes; then\r
+  CCFLAGS64="-fast -xtarget=ultra4 -m64 -xarch=sparcvis"\r
+ fi\r
+ OPTIMFLAGS="-O"\r
+ if test x"$enable_debuginfo" = xyes; then\r
+  DEBUGFLAGS='-g'\r
+ fi\r
+ ;;\r
+\r
+*)\r
+ CPPCMNTFLAGS=\r
+ CCFLAGS64=\r
+ OPTIMFLAGS="-O"\r
+ if test x"$enable_debuginfo" = xyes; then\r
+  DEBUGFLAGS='-g'\r
+ fi\r
+ ;;\r
+esac\r
+\r
+ ;;\r
+esac\r
+\r
+CFLAGS="$CCFLAGS64 $CPPCMNTFLAGS $OPTIMFLAGS $DEBUGFLAGS $WARNFLAGS"\r
+AC_MSG_RESULT([$CFLAGS])\r
+AC_SUBST([OBJECT_MODE])\r
+\r
+AS_IF([test "x$enable_antlrdebug" = xno], [AC_DEFINE([ANTLR3_NODEBUGGER], [1], [Define if ANTLR debugger not required])], [])\r
+AS_IF([test x"$enable_64bit" = xyes], [AC_DEFINE([ANTLR3_USE_64BIT], [1], [Define if 64 bit mode required])], [])\r
+\r
+AC_PROG_INSTALL\r
+AC_PROG_LN_S\r
+AC_PROG_MAKE_SET\r
+\r
+# Checks for libraries.\r
+\r
+# Checks for header files.\r
+AC_INCLUDES_DEFAULT()\r
+AC_HEADER_RESOLV\r
+AC_CHECK_HEADERS([sys/malloc.h malloc.h], [], [],\r
+[[#ifdef HAVE_SYS_MALLOC_H\r
+#include <sys/malloc.h>\r
+#endif\r
+#ifdef HAVE_MALLOC_H\r
+#include <malloc.h>\r
+#endif\r
+]])\r
+AC_CHECK_HEADERS([stdarg.h], [], [],\r
+[[#ifdef HAVE_STDARG_H\r
+#include <stdarg.h>\r
+#endif\r
+]])\r
+\r
+AC_CHECK_HEADERS([sys/stat.h], [], [],\r
+[[#ifdef HAVE_SYS_STAT_H\r
+#include <sys/stat.h>\r
+#endif\r
+]])\r
+\r
+AC_CHECK_HEADERS([ctype.h], [], [],\r
+[[#ifdef HAVE_CTYPE_H\r
+#include <ctype.h>\r
+#endif\r
+]])\r
+\r
+AC_CHECK_HEADERS([netinet/tcp.h], [], [],\r
+[[#ifdef HAVE_NETINET_TCP_H\r
+#include <netinet/tcp.h>\r
+#endif\r
+]])\r
+\r
+AC_CHECK_HEADERS([sys/socket.h socket.h], [], [],\r
+[[#ifdef HAVE_SYS_SOCKET_H\r
+#include <sys/socket.h>\r
+#endif\r
+#ifdef HAVE_SOCKET_H\r
+#include <socket.h>\r
+#endif\r
+]])\r
+\r
+# Checks for typedefs, structures, and compiler characteristics.\r
+AC_C_CONST\r
+AC_TYPE_SIZE_T\r
+AC_TYPE_INT8_T\r
+AC_TYPE_INT16_T\r
+AC_TYPE_INT32_T\r
+AC_TYPE_INT64_T\r
+AC_TYPE_INTPTR_T\r
+AC_TYPE_UINT8_T\r
+AC_TYPE_UINT16_T\r
+AC_TYPE_UINT32_T\r
+AC_TYPE_UINT64_T\r
+AC_TYPE_UINTPTR_T\r
+AC_C_INLINE\r
+\r
+\r
+# Checks for library functions.\r
+AC_CHECK_FUNCS([memmove memset strdup accept])\r
+\r
+AC_CONFIG_MACRO_DIR([m4])\r
+\r
+AC_CONFIG_HEADERS(antlr3config.h)\r
+AC_CONFIG_FILES([Makefile])\r
+AC_OUTPUT\r