commit 5c4d16beb8e3c92b5604dcc506cdcfa281590619 Author: Ahmed Siam Date: Sat Jun 17 14:09:08 2023 +0300 make shared library diff --git a/.gitignore b/.gitignore index c1c7a76..1f50564 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,7 @@ Makefile.in /src/test .vscode stamp-h1 -/build \ No newline at end of file +/build +ar-lib +/m4 +/src/.libs diff --git a/Makefile.am b/Makefile.am index 72f45d5..3d9abca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +ACLOCAL_AMFLAGS=-I m4 + export LOCALES_DIR=$(datadir)/$(PACKAGE_NAME) export LOCALES_DATA=$(LOCALES_DIR)/locales.dat diff --git a/configure.ac b/configure.ac index 257e4db..a82f627 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,14 @@ AC_INIT([icuformat], [1.0], [none]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AM_PROG_AR +LT_INIT AC_PROG_CXX AC_CONFIG_FILES([ Makefile src/Makefile locales/Makefile ]) +AC_CONFIG_MACRO_DIRS([m4]) PKG_CHECK_MODULES(ICU, [icu-i18n, icu-io, icu-uc], CPPFLAGS="$CPPFLAGS $ICU_CFLAGS"; LIBS="$LIBS $ICU_LIBS") diff --git a/src/Makefile.am b/src/Makefile.am index d420f28..5479ae2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,9 @@ bin_PROGRAMS = icuformat -icuformat_SOURCES = icuformat.cpp i18n.cpp +icuformat_SOURCES = icuformat.cpp + +lib_LTLIBRARIES = libi18n.la +libi18n_la_SOURCES= i18n.cpp + +icuformat_LDADD = libi18n.la AM_CPPFLAGS = -DLOCALES_DATA='"$(LOCALES_DATA)"'