Skip to content

Commit

Permalink
chore(build): Use target os not host for platform specific options
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Dec 7, 2024
1 parent e039df1 commit 3c3cae2
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ AC_PREREQ([2.69])
AC_INIT([sile], [m4_esyscmd(build-aux/git-version-gen .tarball-version)], [[email protected]])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([foreign tar-pax dist-zstd dist-zip no-dist-gzip color-tests subdir-objects])
AM_SILENT_RULES([yes])

Expand All @@ -11,23 +12,6 @@ QUE_TRANSFORM_PACKAGE_NAME
QUE_DEVELOPER_MODE
QUE_DIST_CHECKSUMS

AC_CANONICAL_HOST

# Load Rust module bits, early since it stuffs rules in aminclude.am
case $host_os in
darwin*)
SHARED_LIB_EXT="dylib"
;;
cygwin*|mingw*)
SHARED_LIB_EXT="dll"
;;
*)
SHARED_LIB_EXT="so"
;;
esac
AC_SUBST([SHARED_LIB_EXT])
QUE_RUST_MODULE([rusile])

# Extend the QUE checksums feature with support for the PDF manual
SILE_DIST_CHECKSUMS

Expand All @@ -54,11 +38,24 @@ RANLIB=:
LT_PREREQ([2.2])
LT_INIT([dlopen])

AC_CANONICAL_HOST

QUE_RUST_BOILERPLATE
QUE_DOCKER_BOILERPLATE

# Load Rust module bits, early since it stuffs rules in aminclude.am
case $target_os in
darwin*)
SHARED_LIB_EXT="dylib"
;;
cygwin*|mingw*)
SHARED_LIB_EXT="dll"
;;
*)
SHARED_LIB_EXT="so"
;;
esac
AC_SUBST([SHARED_LIB_EXT])
QUE_RUST_MODULE([rusile])

AM_CONDITIONAL([SHARED], [test "x$enable_shared" = "xyes"])
AM_CONDITIONAL([STATIC], [test "x$enable_static" = "xyes"])

Expand Down Expand Up @@ -128,7 +125,7 @@ AM_COND_IF([MANUAL], [

AC_MSG_CHECKING([for OS X])
have_appkit=no
case $host_os in
case $target_os in
darwin*)
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for AppKit works])
Expand Down

0 comments on commit 3c3cae2

Please sign in to comment.