Reorder configure script macros:

- Check for a compiler before looking for libraries or header files.
- Initialize automake before calling other AM_ macros.
- Disable libtool shared libraries by default.
- Remove checks for unused C++, Fortran, and Java compilers.
- Remove redundant AC_CANONICAL_HOST; called by AC_PROG_LIBTOOL.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2105 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
zwelch 2009-06-08 04:35:05 +00:00
parent 35f7c4e478
commit 5ee0379be1
1 changed files with 27 additions and 22 deletions

View File

@ -3,7 +3,33 @@ AC_INIT([openocd], [0.2.0-in-development],
[OpenOCD Mailing List <openocd-development@lists.berlios.de>])
AC_CONFIG_SRCDIR([src/openocd.c])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([-Wall -Wno-portability])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
AH_BOTTOM([
#include "system.h"
#include "replacements.h"
])
AC_LANG_C
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_RANLIB
dnl disable checks for C++, Fortran and GNU Java Compiler
m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
m4_defun([_LT_AC_LANG_GCJ_CONFIG], [:])
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
dnl configure checks required for Jim files (these are obsolete w/ C99)
AC_C_CONST
AC_TYPE_LONG_LONG_INT
AC_SEARCH_LIBS([ioperm], [ioperm])
AC_SEARCH_LIBS([dlopen], [dl])
@ -877,15 +903,6 @@ then
[AC_MSG_ERROR([usb.h is required to build some OpenOCD driver(s)])])
fi
AM_CONFIG_HEADER(config.h)
AH_BOTTOM([
#include "system.h"
#include "replacements.h"
])
AM_INIT_AUTOMAKE([-Wall -Wno-portability])
AM_MAINTAINER_MODE
AM_CONDITIONAL(RELEASE, test $build_release = yes)
AM_CONDITIONAL(PARPORT, test $build_parport = yes)
AM_CONDITIONAL(DUMMY, test $build_dummy = yes)
@ -917,18 +934,6 @@ AM_CONDITIONAL(BITQ, test $build_bitq = yes)
AM_CONDITIONAL(MINIDRIVER, test $build_minidriver = yes)
AM_CONDITIONAL(MINIDRIVER_DUMMY, test $build_minidriver_dummy = yes)
AC_LANG_C
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_RANLIB
AC_PROG_LIBTOOL
AC_PROG_INSTALL
dnl configure checks required for Jim files (these are obsolete w/ C99)
AC_C_CONST
AC_TYPE_LONG_LONG_INT
# Look for environ alternatives. Possibility #1: is environ in unistd.h or stdlib.h?
AC_MSG_CHECKING([for environ in unistd.h and stdlib.h])
AC_COMPILE_IFELSE([