commit f59d8a3975b18add61daa4169e5caa5499e75e18 from: Omar Polo date: Tue Jun 18 19:35:20 2024 UTC move platform check before the --with handling commit - 3d89457cdeba5041aa6f0c1f8640b91bcbb6ec51 commit + f59d8a3975b18add61daa4169e5caa5499e75e18 blob - e1b77ae260f534929dea577dcf9ca7d595ea296c blob + e7b7ee4c0bafab649ff5e8b8bcfa7a91385aa26e --- configure.ac +++ configure.ac @@ -21,6 +21,27 @@ AC_ARG_VAR(HOSTCFLAGS, [CFLAGS for the host compiler]) test -z "${HOSTCC}" && HOSTCC='$(CC)' test -z "${HOSTCFLAGS}" && HOSTCFLAGS='$(CFLAGS)' + +AC_MSG_CHECKING([platform]) +case "$host_os" in + *darwin*) + PLATFORM=darwin + ;; + *linux*) + PLATFORM=linux + ;; + *freebsd*) + PLATFORM=freebsd + ;; + *openbsd*) + PLATFORM=openbsd + ;; + *) + PLATFORM=unknown + ;; +esac +AC_MSG_RESULT($PLATFORM) +AC_SUBST(PLATFORM) AC_ARG_WITH([Werror], AS_HELP_STRING([--with-Werror], @@ -54,27 +75,6 @@ AS_IF([test "x$with_libbsd" = "xyes"], [ ]) ]) -AC_MSG_CHECKING([platform]) -case "$host_os" in - *darwin*) - PLATFORM=darwin - ;; - *linux*) - PLATFORM=linux - ;; - *freebsd*) - PLATFORM=freebsd - ;; - *openbsd*) - PLATFORM=openbsd - ;; - *) - PLATFORM=unknown - ;; -esac -AC_MSG_RESULT($PLATFORM) -AC_SUBST(PLATFORM) - if test "x$PLATFORM" = "xdarwin"; then export LDFLAGS="-L/opt/homebrew/opt/libressl/lib $LDFLAGS" export CPPFLAGS="-I/opt/homebrew/opt/libressl/include $CPPFLAGS"