forked from emacs-mirror/emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure-gccemacs.sh
executable file
·59 lines (48 loc) · 1.75 KB
/
configure-gccemacs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
set -o nounset
set -o errexit
# Configures Emacs for building native comp support
# http://akrl.sdf.org/gccemacs.html
# Installing under homebrew's opt, but could be anywhere.
#readonly GCCEMACS_PREFIX="$(realpath $(brew --prefix)/opt/gccemacs)"
#readonly GCCEMACS_PREFIX="$SANDBOX/gccemacs"
readonly GCCEMACS_PREFIX="$PWD/nextstep/Emacs.app/Contents/MacOS"
readonly GCC_DIR="$(realpath $(brew --prefix)/opt/gcc)"
[[ -d $GCC_DIR ]] || { echo "${GCC_DIR} not found"; exit 1; }
readonly SED_DIR="$(realpath $(brew --prefix)/opt/gnu-sed)"
[[ -d $SED_DIR ]] || { echo "${SED_DIR} not found"; exit 1; }
readonly GCC_INCLUDE_DIR=${GCC_DIR}/include
[[ -d $GCC_INCLUDE_DIR ]] || { echo "${GCC_INCLUDE_DIR} not found"; exit 1; }
#readonly GCC_LIB_DIR=${GCC_DIR}/lib/gcc/10
readonly GCC_LIB_DIR=$(realpath $(brew --prefix)/lib/gcc/10)
[[ -d $GCC_LIB_DIR ]] || { echo "${GCC_LIB_DIR} not found"; exit 1; }
export PATH="${SED_DIR}/libexec/gnubin:${PATH}"
export CFLAGS="-I/usr/local/include -I${GCC_INCLUDE_DIR}"
export LDFLAGS="-L${GCC_LIB_DIR} -I${GCC_INCLUDE_DIR}"
export DYLD_FALLBACK_LIBRARY_PATH="${GCC_LIB_DIR}"
echo "Environment"
echo "-----------"
echo PATH: $PATH
echo CFLAGS: $CFLAGS
echo LDFLAGS: $LDFLAGS
echo DYLD_FALLBACK_LIBRARY_PATH: $DYLD_FALLBACK_LIBRARY_PATH
echo "-----------"
./autogen.sh
./configure \
--prefix="${GCCEMACS_PREFIX}" \
--enable-locallisppath="${GCCEMACS_PREFIX}/opt/gccemacs/site-lisp" \
--with-ns \
--with-mailutils \
--with-cairo \
--with-modules \
--with-xml2 \
--with-gnutls \
--with-json \
--with-rsvg \
--with-nativecomp \
--with-xwidgets \
--with-harfbuzz \
--disable-silent-rules \
--disable-ns-self-contained
#--without-dbus
#--with-imagemagick