Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
81c6dc76
Commit
81c6dc76
authored
Jun 22, 2011
by
Ian Lynagh
Browse files
Share more code between configure.ac and distrib/configure.ac.in
parent
6ecb8d38
Changes
3
Hide whitespace changes
Inline
Side-by-side
aclocal.m4
View file @
81c6dc76
...
...
@@ -78,6 +78,58 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS],
GHC_CONVERT_VENDOR([$target_vendor], [TargetVendor])
GHC_CONVERT_OS([$target_os], [TargetOS])
fi
windows=NO
exeext=''
soext='.so'
case $host in
*-unknown-cygwin32)
AC_MSG_WARN([GHC does not support the Cygwin target at the moment])
AC_MSG_WARN([I'm assuming you wanted to build for i386-unknown-mingw32])
exit 1
;;
*-unknown-mingw32)
windows=YES
exeext='.exe'
soext='.dll'
;;
i386-apple-darwin|powerpc-apple-darwin)
soext='.dylib'
;;
x86_64-apple-darwin)
soext='.dylib'
;;
esac
])
# FP_SETTINGS
# ----------------------------------
# Set the variables used in the settings file
AC_DEFUN([FP_SETTINGS],
[
if test "$windows" = YES
then
SettingsCCompilerCommand='$topdir/../mingw/bin/gcc.exe'
SettingsCCompilerFlags=''
SettingsPerlCommand='$topdir/../perl/perl.exe'
SettingsDllWrapCommand='$topdir/../mingw/bin/dllwrap.exe'
SettingsWindresCommand='$topdir/../mingw/bin/windres.exe'
SettingsTouchCommand='$topdir/touch.exe'
else
SettingsCCompilerCommand="$WhatGccIsCalled"
SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
SettingsPerlCommand="$PerlCmd"
SettingsDllWrapCommand="/bin/false"
SettingsWindresCommand="/bin/false"
SettingsTouchCommand='touch'
fi
AC_SUBST(SettingsCCompilerCommand)
AC_SUBST(SettingsCCompilerFlags)
AC_SUBST(SettingsPerlCommand)
AC_SUBST(SettingsDllWrapCommand)
AC_SUBST(SettingsWindresCommand)
AC_SUBST(SettingsTouchCommand)
])
...
...
configure.ac
View file @
81c6dc76
...
...
@@ -207,28 +207,6 @@ AC_CANONICAL_TARGET
FPTOOLS_SET_PLATFORM_VARS
windows=NO
exeext=''
soext='.so'
case $host in
*-unknown-cygwin32)
AC_MSG_WARN([GHC does not support the Cygwin target at the moment])
AC_MSG_WARN([I'm assuming you wanted to build for i386-unknown-mingw32])
exit 1
;;
*-unknown-mingw32)
windows=YES
exeext='.exe'
soext='.dll'
;;
i386-apple-darwin|powerpc-apple-darwin)
soext='.dylib'
;;
x86_64-apple-darwin)
soext='.dylib'
;;
esac
# Testing if we shall enable shared libs support on Solaris.
# Anything older than SunOS 5.11 aka Solaris 11 (Express) is broken.
...
...
@@ -572,28 +550,7 @@ AC_SUBST(CONF_CPP_OPTS_STAGE0)
AC_SUBST(CONF_CPP_OPTS_STAGE1)
AC_SUBST(CONF_CPP_OPTS_STAGE2)
if test "$windows" = YES
then
SettingsCCompilerCommand='$topdir/../mingw/bin/gcc.exe'
SettingsCCompilerFlags=''
SettingsPerlCommand='$topdir/../perl/perl.exe'
SettingsDllWrapCommand='$topdir/../mingw/bin/dllwrap.exe'
SettingsWindresCommand='$topdir/../mingw/bin/windres.exe'
SettingsTouchCommand='$topdir/touch.exe'
else
SettingsCCompilerCommand="$WhatGccIsCalled"
SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
SettingsPerlCommand="$PerlCmd"
SettingsDllWrapCommand="/bin/false"
SettingsWindresCommand="/bin/false"
SettingsTouchCommand='touch'
fi
AC_SUBST(SettingsCCompilerCommand)
AC_SUBST(SettingsCCompilerFlags)
AC_SUBST(SettingsPerlCommand)
AC_SUBST(SettingsDllWrapCommand)
AC_SUBST(SettingsWindresCommand)
AC_SUBST(SettingsTouchCommand)
FP_SETTINGS
dnl ** figure out how to do context diffs
FP_PROG_CONTEXT_DIFF
...
...
distrib/configure.ac.in
View file @
81c6dc76
...
...
@@ -82,6 +82,8 @@ AC_SUBST(CONF_CPP_OPTS_STAGE0)
AC_SUBST(CONF_CPP_OPTS_STAGE1)
AC_SUBST(CONF_CPP_OPTS_STAGE2)
FP_SETTINGS
#
dnl ** how to invoke `ar' and `ranlib'
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment