@@ -36,20 +36,17 @@ TARGET_ALIAS="dvp"
3636TARG_XTRA_OPTS=" "
3737OSVER=$( uname)
3838
39- # setting lt_cv_sys_max_cmd_len works around ancient libtool bugs
40- if [ " ${OSVER: 0: 10} " == MINGW64_NT ]; then
41- export lt_cv_sys_max_cmd_len=8000
42- export CC=x86_64-w64-mingw32-gcc
43- TARG_XTRA_OPTS=" --host=x86_64-w64-mingw32"
44- CFLAGS=" $CFLAGS -DHAVE_DECL_ASPRINTF -DHAVE_DECL_VASPRINTF"
45- elif [ " ${OSVER: 0: 10} " == MINGW32_NT ]; then
46- export lt_cv_sys_max_cmd_len=8000
47- export CC=i686-w64-mingw32-gcc
48- TARG_XTRA_OPTS=" --host=i686-w64-mingw32"
49- CFLAGS=" $CFLAGS -DHAVE_DECL_ASPRINTF -DHAVE_DECL_VASPRINTF"
50- elif [ " ${OSVER: 0: 9} " == " CYGWIN_NT" ]; then
51- export lt_cv_sys_max_cmd_len=8000
52- TARG_XTRA_OPTS=" --host=x86_64-pc-cygwin"
39+ # # If using MacOS Apple, set gmp and mpfr paths using TARG_XTRA_OPTS
40+ # # (this is needed for Apple Silicon but we will do it for all MacOS systems)
41+ if [ " $( uname -s) " = " Darwin" ]; then
42+ # # Check if using brew
43+ if command -v brew & > /dev/null; then
44+ TARG_XTRA_OPTS=" --with-gmp=$( brew --prefix gmp) --with-mpfr=$( brew --prefix mpfr) "
45+ fi
46+ # # Check if using MacPorts
47+ if command -v port & > /dev/null; then
48+ TARG_XTRA_OPTS=" --with-gmp=$( port -q prefix gmp) --with-mpfr=$( port -q prefix mpfr) "
49+ fi
5350fi
5451
5552# # Determine the maximum number of processes that Make can work with.
@@ -72,7 +69,7 @@ for TARGET in "dvp"; do
7269 $TARG_XTRA_OPTS
7370
7471 # # Compile and install.
75- make --quiet -j " $PROC_NR " CFLAGS=" $CFLAGS -D_FORTIFY_SOURCE=0 -O2 - Wno-implicit-function-declaration" LDFLAGS= " $LDFLAGS -s "
72+ make --quiet -j " $PROC_NR " CFLAGS=" $CFLAGS -Wno-implicit-function-declaration"
7673 make --quiet -j " $PROC_NR " install
7774 make --quiet -j " $PROC_NR " clean
7875
0 commit comments