Skip to content

Commit

Permalink
JAP compiler optimization flags fix by Fish
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/jj/hercules.svn/trunk@1785 956126f8-22a0-4046-8f4a-272fa8102e63
  • Loading branch information
Fish (David B Trout) committed Aug 19, 2003
1 parent f353d32 commit 2b3afeb
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#### Don't forget to change the version number in configure.ac! ####

19 Aug 2003 Committed Jim Pierson's "-g -O2" optimization flags fix - Fish
19 Aug 2003 Fix dasdtab to provide correct model numbers for
sense ID on 3340-1 (35M) and 3340-2 (70M) - Ivan Warren
19 Aug 2003 Removed W32 only symbol from linux build in ctcadpt - Ivan Warren
Expand Down
18 changes: 18 additions & 0 deletions autoconf/hercules.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# HC_PROG_CC
# --------------------------------------------------------------------
# AC_PROG_CC (actually _AC_PROC_CC_G) takes it upon itself to
# put "-g -O2" in CFLAGS. While this may be good for most packages
# using autoconf, we have our own "optimize" function that this
# interferes with.
#
# Notes: AC_BEFORE will emit a warning of AC_PROG_CC was expanded
# prior to this macro, just in case something gets put in
# configure.ac before us.
# AC_REQUIRE will expand AC_PROG_CC for us.
#
AC_DEFUN([HC_PROG_CC],
[ AC_BEFORE([HC_PROG_CC],[AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC])
# Restore the saved CFLAGS from autoconf invocation
CFLAGS=$ac_env_CFLAGS_value
])
32 changes: 27 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,38 @@ AC_CONFIG_AUX_DIR(autoconf)
AM_INIT_AUTOMAKE(hercules,2.17.b6)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AM_GNU_GETTEXT()

AC_CANONICAL_HOST
##------------------------------------------------------------
## Begin JAP unwanted "-g -O2" optimization flags fix...
##
## AM_GNU_GETTEXT()
##
## AC_CANONICAL_HOST
##
## # Initialization
## CFLAGS="-W -Wall $CFLAGS"
##
## # Programs
## AC_PROG_CC
## AC_PROG_LIBTOOL
##

# Initialization
CFLAGS="-W -Wall $CFLAGS"

# Programs
AC_PROG_CC
# Programs (Note use "HC_PROG_CC" and not "AC_PROG_CC". We now
# have our own "hercules.m4" macro defined in the
# autoconf directory that fixes an undesired compiler
# optimization flags issue)

HC_PROG_CC
AC_PROG_LIBTOOL
AM_GNU_GETTEXT()

##
## End JAP unwanted "-g -O2" optimization flags fix...
##------------------------------------------------------------


# OS-specific settings that we can't figure out any other way (yet)

Expand Down Expand Up @@ -534,5 +556,5 @@ AH_TEMPLATE([OPTION_DYNAMIC_LOAD],
AH_TEMPLATE([HDL_USE_LIBTOOL],
[Define to cause dynamic loader use use libtool instead of dlopen])

AC_OUTPUT([Makefile util/Makefile html/Makefile po/Makefile.in po/Makefile man/Makefile ])
AC_OUTPUT([Makefile util/Makefile html/Makefile po/Makefile.in po/Makefile man/Makefile intl/Makefile m4/Makefile ])

0 comments on commit 2b3afeb

Please sign in to comment.