added the MACOSX conditional to configure.ac

This commit is contained in:
hyunghwan.chung 2018-10-14 07:31:44 +00:00
parent 3ed7b46807
commit 7ea2c18ffd
6 changed files with 82 additions and 40 deletions

20
moo/configure vendored
View File

@ -684,6 +684,8 @@ PTHREAD_LIBS
PTHREAD_CC PTHREAD_CC
ax_pthread_config ax_pthread_config
LIBM LIBM
MACOSX_FALSE
MACOSX_TRUE
WIN32_FALSE WIN32_FALSE
WIN32_TRUE WIN32_TRUE
LIBTOOL_DEPS LIBTOOL_DEPS
@ -17167,9 +17169,15 @@ case "$host" in
*-*-mingw*|*-*-cygwin*) *-*-mingw*|*-*-cygwin*)
#CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0400" #CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0400"
platform_win32=yes platform_win32=yes
platform_macosx=no
;;
*-*-darwin*)
platform_win32=no
platform_macosx=yes
;; ;;
*) *)
platform_win32=no platform_win32=no
platform_macosx=no
;; ;;
esac esac
if test "x${platform_win32}" = "xyes" ; then if test "x${platform_win32}" = "xyes" ; then
@ -17180,6 +17188,14 @@ else
WIN32_FALSE= WIN32_FALSE=
fi fi
if test "x${platform_macosx}" = "xyes" ; then
MACOSX_TRUE=
MACOSX_FALSE='#'
else
MACOSX_TRUE='#'
MACOSX_FALSE=
fi
LIBM= LIBM=
case $host in case $host in
@ -21858,6 +21874,10 @@ if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then
as_fn_error $? "conditional \"WIN32\" was never defined. as_fn_error $? "conditional \"WIN32\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi fi
if test -z "${MACOSX_TRUE}" && test -z "${MACOSX_FALSE}"; then
as_fn_error $? "conditional \"MACOSX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_CXX_TRUE}" && test -z "${ENABLE_CXX_FALSE}"; then if test -z "${ENABLE_CXX_TRUE}" && test -z "${ENABLE_CXX_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_CXX\" was never defined. as_fn_error $? "conditional \"ENABLE_CXX\" was never defined.

View File

@ -69,12 +69,19 @@ case "$host" in
*-*-mingw*|*-*-cygwin*) *-*-mingw*|*-*-cygwin*)
#CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0400" #CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0400"
platform_win32=yes platform_win32=yes
platform_macosx=no
;;
*-*-darwin*)
platform_win32=no
platform_macosx=yes
;; ;;
*) *)
platform_win32=no platform_win32=no
platform_macosx=no
;; ;;
esac esac
AM_CONDITIONAL(WIN32, test "x${platform_win32}" = "xyes" ) AM_CONDITIONAL(WIN32, test "x${platform_win32}" = "xyes" )
AM_CONDITIONAL(MACOSX, test "x${platform_macosx}" = "xyes" )
dnl check the math library (check if -lm is needed) dnl check the math library (check if -lm is needed)
LT_LIB_M LT_LIB_M

View File

@ -34,9 +34,14 @@ endif
if WIN32 if WIN32
# you must adjust the value of DEFAULT_MODPOSTFIX according # you must adjust the value of DEFAULT_MODPOSTFIX according
# to the first number in -version-info above # to the first number in -version-info above
CPPFLAGS_LIB_COMMON += -DMOO_DEFAULT_PFMODPREFIX=\"libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"-1\" CPPFLAGS_LIB_COMMON += -DMOO_DEFAULT_PFMODPREFIX=\"libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"-1.dll\"
else else
CPPFLAGS_LIB_COMMON += -DMOO_DEFAULT_PFMODPREFIX=\"$(libdir)/libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"\" CPPFLAGS_LIB_COMMON += -DMOO_DEFAULT_PFMODPREFIX=\"$(libdir)/libmoo-\"
if MACOSX
CPPFLAGS_LIB_COMMON += -DMOO_DEFAULT_PFMODPOSTFIX=\".dynlib\"
else
CPPFLAGS_LIB_COMMON += -DMOO_DEFAULT_PFMODPOSTFIX=\".so\"
endif
endif endif
pkgincludedir = $(includedir) pkgincludedir = $(includedir)

View File

@ -94,9 +94,11 @@ host_triplet = @host@
# you must adjust the value of DEFAULT_MODPOSTFIX according # you must adjust the value of DEFAULT_MODPOSTFIX according
# to the first number in -version-info above # to the first number in -version-info above
@WIN32_TRUE@am__append_4 = -DMOO_DEFAULT_PFMODPREFIX=\"libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"-1\" @WIN32_TRUE@am__append_4 = -DMOO_DEFAULT_PFMODPREFIX=\"libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"-1.dll\"
@WIN32_FALSE@am__append_5 = -DMOO_DEFAULT_PFMODPREFIX=\"$(libdir)/libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"\" @WIN32_FALSE@am__append_5 = -DMOO_DEFAULT_PFMODPREFIX=\"$(libdir)/libmoo-\"
@ENABLE_STATIC_MODULE_TRUE@am__append_6 = -lmoo-stdio @MACOSX_TRUE@@WIN32_FALSE@am__append_6 = -DMOO_DEFAULT_PFMODPOSTFIX=\".dynlib\"
@MACOSX_FALSE@@WIN32_FALSE@am__append_7 = -DMOO_DEFAULT_PFMODPOSTFIX=\".so\"
@ENABLE_STATIC_MODULE_TRUE@am__append_8 = -lmoo-stdio
@ENABLE_STATIC_MODULE_FALSE@libmoo_la_DEPENDENCIES = \ @ENABLE_STATIC_MODULE_FALSE@libmoo_la_DEPENDENCIES = \
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_5) \ @ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_5) \
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) \ @ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) \
@ -104,14 +106,14 @@ host_triplet = @host@
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) \ @ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) \
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) \ @ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) \
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) @ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1)
@ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_7 = -lmoo-con @ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_9 = -lmoo-con
@ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_8 = $(abs_builddir)/../mod/libmoo-con.la @ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_10 = $(abs_builddir)/../mod/libmoo-con.la
@ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_9 = -lmoo-ffi @ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_11 = -lmoo-ffi
@ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_10 = $(abs_builddir)/../mod/libmoo-ffi.la @ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_12 = $(abs_builddir)/../mod/libmoo-ffi.la
@ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_11 = -lmoo-sck @ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_13 = -lmoo-sck
@ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_12 = $(abs_builddir)/../mod/libmoo-sck.la @ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_14 = $(abs_builddir)/../mod/libmoo-sck.la
@ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_13 = -lmoo-x11 @ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_15 = -lmoo-x11
@ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_14 = $(abs_builddir)/../mod/libmoo-x11.la @ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_16 = $(abs_builddir)/../mod/libmoo-x11.la
bin_PROGRAMS = moo$(EXEEXT) bin_PROGRAMS = moo$(EXEEXT)
@ENABLE_STATIC_MODULE_FALSE@moo_DEPENDENCIES = $(am__DEPENDENCIES_5) \ @ENABLE_STATIC_MODULE_FALSE@moo_DEPENDENCIES = $(am__DEPENDENCIES_5) \
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) @ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1)
@ -422,7 +424,7 @@ CPPFLAGS_ALL_COMMON = \
# MAIN LIBRARY # MAIN LIBRARY
################################################## ##################################################
CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON) $(am__append_4) \ CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON) $(am__append_4) \
$(am__append_5) $(am__append_5) $(am__append_6) $(am__append_7)
LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined
LIBADD_LIB_COMMON = $(LIBM) $(am__append_1) $(am__append_2) \ LIBADD_LIB_COMMON = $(LIBM) $(am__append_1) $(am__append_2) \
$(am__append_3) $(am__append_3)
@ -470,12 +472,12 @@ libmoo_la_SOURCES = \
libmoo_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) libmoo_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_6) \ libmoo_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_8) \
$(am__append_7) $(am__append_9) $(am__append_11) \ $(am__append_9) $(am__append_11) $(am__append_13) \
$(am__append_13) $(am__append_15)
@ENABLE_STATIC_MODULE_TRUE@libmoo_la_DEPENDENCIES = $(abs_builddir)/../mod/libmoo-stdio.la \ @ENABLE_STATIC_MODULE_TRUE@libmoo_la_DEPENDENCIES = $(abs_builddir)/../mod/libmoo-stdio.la \
@ENABLE_STATIC_MODULE_TRUE@ $(am__append_8) $(am__append_10) \ @ENABLE_STATIC_MODULE_TRUE@ $(am__append_10) $(am__append_12) \
@ENABLE_STATIC_MODULE_TRUE@ $(am__append_12) $(am__append_14) @ENABLE_STATIC_MODULE_TRUE@ $(am__append_14) $(am__append_16)
moo_SOURCES = main.c moo_SOURCES = main.c
moo_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) moo_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
moo_LDFLAGS = $(LDFLAGS_LIB_COMMON) moo_LDFLAGS = $(LDFLAGS_LIB_COMMON)

View File

@ -10,11 +10,16 @@ CPPFLAGS_COMMON = \
-I$(includedir) -I$(includedir)
if WIN32 if WIN32
# you must adjust the value of DEFAULT_PFMODPOSTFIX according # you must adjust the value of DEFAULT_MODPOSTFIX according
# to the first number in -version-info above # to the first number in -version-info above
CPPFLAGS_COMMON += -DMOO_DEFAULT_PFMODPREFIX=\"libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"-1\" CPPFLAGS_COMMON += -DMOO_DEFAULT_PFMODPREFIX=\"libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"-1.dll\"
else else
CPPFLAGS_COMMON += -DMOO_DEFAULT_PFMODPREFIX=\"$(libdir)/libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"\" CPPFLAGS_COMMON += -DMOO_DEFAULT_PFMODPREFIX=\"$(libdir)/libmoo-\"
if MACOSX
CPPFLAGS_COMMON += -DMOO_DEFAULT_PFMODPOSTFIX=\".dynlib\"
else
CPPFLAGS_COMMON += -DMOO_DEFAULT_PFMODPOSTFIX=\".so\"
endif
endif endif
if ENABLE_STATIC_MODULE if ENABLE_STATIC_MODULE

View File

@ -89,18 +89,20 @@ POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
# you must adjust the value of DEFAULT_PFMODPOSTFIX according # you must adjust the value of DEFAULT_MODPOSTFIX according
# to the first number in -version-info above # to the first number in -version-info above
@WIN32_TRUE@am__append_1 = -DMOO_DEFAULT_PFMODPREFIX=\"libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"-1\" @WIN32_TRUE@am__append_1 = -DMOO_DEFAULT_PFMODPREFIX=\"libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"-1.dll\"
@WIN32_FALSE@am__append_2 = -DMOO_DEFAULT_PFMODPREFIX=\"$(libdir)/libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"\" @WIN32_FALSE@am__append_2 = -DMOO_DEFAULT_PFMODPREFIX=\"$(libdir)/libmoo-\"
@ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_3 = libmoo-con.la @MACOSX_TRUE@@WIN32_FALSE@am__append_3 = -DMOO_DEFAULT_PFMODPOSTFIX=\".dynlib\"
@ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_4 = libmoo-ffi.la @MACOSX_FALSE@@WIN32_FALSE@am__append_4 = -DMOO_DEFAULT_PFMODPOSTFIX=\".so\"
@ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_5 = libmoo-sck.la @ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_5 = libmoo-con.la
@ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_6 = libmoo-x11.la @ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_6 = libmoo-ffi.la
@ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_FALSE@am__append_7 = libmoo-con.la @ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_7 = libmoo-sck.la
@ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_FALSE@am__append_8 = libmoo-ffi.la @ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_8 = libmoo-x11.la
@ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_FALSE@am__append_9 = libmoo-sck.la @ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_FALSE@am__append_9 = libmoo-con.la
@ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_FALSE@am__append_10 = libmoo-x11.la @ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_FALSE@am__append_10 = libmoo-ffi.la
@ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_FALSE@am__append_11 = libmoo-sck.la
@ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_FALSE@am__append_12 = libmoo-x11.la
subdir = mod subdir = mod
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
@ -435,7 +437,8 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc AUTOMAKE_OPTIONS = nostdinc
CPPFLAGS_COMMON = -I$(abs_builddir) -I$(abs_builddir)/../lib \ CPPFLAGS_COMMON = -I$(abs_builddir) -I$(abs_builddir)/../lib \
-I$(abs_srcdir) -I$(abs_srcdir)/../lib -I$(includedir) \ -I$(abs_srcdir) -I$(abs_srcdir)/../lib -I$(includedir) \
$(am__append_1) $(am__append_2) $(am__append_1) $(am__append_2) $(am__append_3) \
$(am__append_4)
################################################## ##################################################
# DYNAMIC MODULES # DYNAMIC MODULES
@ -448,13 +451,13 @@ CPPFLAGS_COMMON = -I$(abs_builddir) -I$(abs_builddir)/../lib \
@ENABLE_STATIC_MODULE_TRUE@LDFLAGS_COMMON = -L$(libdir) -version-info 1:0:0 -no-undefined @ENABLE_STATIC_MODULE_TRUE@LDFLAGS_COMMON = -L$(libdir) -version-info 1:0:0 -no-undefined
@ENABLE_STATIC_MODULE_FALSE@LIBADD_COMMON = -lmoo @ENABLE_STATIC_MODULE_FALSE@LIBADD_COMMON = -lmoo
@ENABLE_STATIC_MODULE_TRUE@LIBADD_COMMON = @ENABLE_STATIC_MODULE_TRUE@LIBADD_COMMON =
@ENABLE_STATIC_MODULE_TRUE@noinst_LTLIBRARIES = $(am__append_3) \ @ENABLE_STATIC_MODULE_TRUE@noinst_LTLIBRARIES = $(am__append_5) \
@ENABLE_STATIC_MODULE_TRUE@ $(am__append_4) $(am__append_5) \ @ENABLE_STATIC_MODULE_TRUE@ $(am__append_6) $(am__append_7) \
@ENABLE_STATIC_MODULE_TRUE@ libmoo-stdio.la $(am__append_6) @ENABLE_STATIC_MODULE_TRUE@ libmoo-stdio.la $(am__append_8)
@ENABLE_STATIC_MODULE_FALSE@pkgmodexecdir = $(libdir) @ENABLE_STATIC_MODULE_FALSE@pkgmodexecdir = $(libdir)
@ENABLE_STATIC_MODULE_FALSE@pkgmodexec_LTLIBRARIES = $(am__append_7) \ @ENABLE_STATIC_MODULE_FALSE@pkgmodexec_LTLIBRARIES = $(am__append_9) \
@ENABLE_STATIC_MODULE_FALSE@ $(am__append_8) $(am__append_9) \ @ENABLE_STATIC_MODULE_FALSE@ $(am__append_10) $(am__append_11) \
@ENABLE_STATIC_MODULE_FALSE@ libmoo-stdio.la $(am__append_10) @ENABLE_STATIC_MODULE_FALSE@ libmoo-stdio.la $(am__append_12)
@ENABLE_MOD_CON_TRUE@libmoo_con_la_SOURCES = _con.c _con.h @ENABLE_MOD_CON_TRUE@libmoo_con_la_SOURCES = _con.c _con.h
@ENABLE_MOD_CON_TRUE@libmoo_con_la_CPPFLAGS = $(CPPFLAGS_COMMON) @ENABLE_MOD_CON_TRUE@libmoo_con_la_CPPFLAGS = $(CPPFLAGS_COMMON)
@ENABLE_MOD_CON_TRUE@libmoo_con_la_LDFLAGS = $(LDFLAGS_COMMON) @ENABLE_MOD_CON_TRUE@libmoo_con_la_LDFLAGS = $(LDFLAGS_COMMON)