[macOSX]Support universal build.

This commit is contained in:
caixiangyue 2022-01-27 15:01:49 +08:00
parent 28ede40ebe
commit 06cd8913b4
5 changed files with 19 additions and 5 deletions

View File

@ -1,6 +1,9 @@
AM_CFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/lib \
-Wall @GLIB2_CFLAGS@ @MSVC_CFLAGS@
if MACOS
AM_CFLAGS += -arch x86_64 -arch arm64
endif
noinst_LTLIBRARIES = libcdc.la
noinst_HEADERS = cdc.h rabin-checksum.h

View File

@ -1,5 +1,9 @@
AM_CPPFLAGS = -Wall -I${top_srcdir}/common -I${top_srcdir}/lib \
@MSVC_CFLAGS@
AM_CFLAGS = -Wall -I${top_srcdir}/common -I${top_srcdir}/lib \
@GLIB2_CFLAGS@ @MSVC_CFLAGS@
if MACOS
AM_CFLAGS += -arch x86_64 -arch arm64
endif
noinst_LTLIBRARIES = libindex.la
@ -7,7 +11,6 @@ noinst_HEADERS = index.h cache-tree.h
libindex_la_SOURCES = index.c cache-tree.c
libindex_la_CFLAGS = @GLIB2_CFLAGS@
libindex_la_LDFLAGS = -Wl,-z -Wl,defs
libindex_la_LIBADD = @GLIB2_LIBS@ \
$(top_builddir)/lib/libseafile_common.la

View File

@ -65,6 +65,7 @@ AM_CONDITIONAL([WIN32], [test "$bwin32" = "true"])
AM_CONDITIONAL([MACOS], [test "$bmac" = "true"])
AM_CONDITIONAL([LINUX], [test "$blinux" = "true"])
AC_SUBST(MACOS)
# check libraries
if test "$bwin32" != true; then
@ -242,7 +243,6 @@ if test "xyes" = "x$gpl_crypto"; then
AC_DEFINE(USE_GPL_CRYPTO, 1, [Use GPL-compatible crypto libraries])
else
AC_CHECK_LIB(crypto, SHA1_Init, [echo "found library crypto"], AC_MSG_ERROR([*** Unable to find openssl crypto library]), )
PKG_CHECK_MODULES(SSL, [openssl])
AC_SUBST(SSL_CFLAGS)

View File

@ -15,6 +15,10 @@ AM_CFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \
@GNUTLS_CFLAGS@ \
-Wall
if MACOS
AM_CFLAGS += -arch x86_64 -arch arm64
endif
bin_PROGRAMS = seaf-daemon
noinst_HEADERS = \

View File

@ -2,13 +2,17 @@ pcfiles = libseafile.pc
pkgconfig_DATA = $(pcfiles)
pkgconfigdir = $(libdir)/pkgconfig
AM_CPPFLAGS = @GLIB2_CFLAGS@ -I$(top_srcdir)/include \
AM_CFLAGS = @GLIB2_CFLAGS@ -I$(top_srcdir)/include \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/common \
@SEARPC_CFLAGS@ \
@MSVC_CFLAGS@ \
-Wall
if MACOS
AM_CFLAGS += -arch x86_64 -arch arm64
endif
BUILT_SOURCES = gensource
## source file rules