From d685d0220fdb16097252bcf851ada5cf8400da0e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 14 Apr 2008 21:01:30 -0500 Subject: Fix gettext on non-Linux platforms Linux includes all the gettext stuff in glibc, so there is no need for the libintl links which we failed to include in our linker variables. Update the makefiles which should enable NLS support on all platforms, including OS X and Cygwin. Signed-off-by: Dan McGee --- lib/libalpm/Makefile.am | 1 + src/pacman/Makefile.am | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am index 6549066f..00fc0b38 100644 --- a/lib/libalpm/Makefile.am +++ b/lib/libalpm/Makefile.am @@ -40,5 +40,6 @@ libalpm_la_SOURCES = \ util.h util.c libalpm_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_INFO) +libalpm_la_LIBADD = $(LTLIBINTL) # vim:set ts=2 sw=2 noet: diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am index 0395432e..5e287404 100644 --- a/src/pacman/Makefile.am +++ b/src/pacman/Makefile.am @@ -33,10 +33,9 @@ pacman_SOURCES = \ callback.h callback.c \ util.h util.c -pacman_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la +LDADD = $(LTLIBINTL) $(top_builddir)/lib/libalpm/.libs/libalpm.la pacman_static_SOURCES = $(pacman_SOURCES) pacman_static_LDFLAGS = $(LDFLAGS) -all-static -pacman_static_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la # vim:set ts=2 sw=2 noet: -- cgit v1.2.3 From c7a81c0b54c3b54e25978e9828c6dc91f113c19c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 15 Apr 2008 15:57:36 -0500 Subject: More non-Linux build updates, mostly Darwin Darwin's binary format does support symbols with differing visibilities, but it does not support the protected or internal visibilities- only hidden. For Darwin only, we should fall back to this visibility to prevent warnings from the compiler and because it is close enough for our library purposes. See http://gcc.gnu.org/viewcvs/*checkout*/trunk/gcc/config/darwin.c, search for the "darwin_assemble_visibility" function for more details. Also add pacman.static.exe to gitignore. Signed-off-by: Dan McGee --- configure.ac | 13 ++++++++++--- lib/libalpm/Makefile.am | 4 ++++ src/pacman/.gitignore | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index c695c57f..eabb4a4e 100644 --- a/configure.ac +++ b/configure.ac @@ -172,13 +172,20 @@ GCC_VISIBILITY_CC # Check if we have -fgnu89-inline flag GCC_GNU89_INLINE_CC -# Host-dependant flags -case "${host}" in - *-*-cygwin*) +# Host-dependant definitions +case "${host_os}" in + cygwin*) + host_os_cygwin=yes CFLAGS="$CFLAGS -DCYGWIN" ;; + darwin*) + host_os_darwin=yes + ;; esac +AM_CONDITIONAL([CYGWIN], test "x$host_os_cygwin" = "xyes") +AM_CONDITIONAL([DARWIN], test "x$host_os_darwin" = "xyes") + # Check for architecture, used in default makepkg.conf # (Note single space left after CARCHFLAGS) case "${host}" in diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am index 00fc0b38..14d42a0c 100644 --- a/lib/libalpm/Makefile.am +++ b/lib/libalpm/Makefile.am @@ -10,8 +10,12 @@ DEFS = -DLOCALEDIR=\"@localedir@\" @DEFS@ AM_CFLAGS = -pedantic -D_GNU_SOURCE if ENABLE_VISIBILITY_CC +if DARWIN +AM_CFLAGS += -fvisibility=hidden +else AM_CFLAGS += -fvisibility=internal endif +endif if ENABLE_GNU89_INLINE_CC AM_CFLAGS += -fgnu89-inline endif diff --git a/src/pacman/.gitignore b/src/pacman/.gitignore index 61407057..c47851ce 100644 --- a/src/pacman/.gitignore +++ b/src/pacman/.gitignore @@ -3,3 +3,4 @@ pacman pacman.exe pacman.static +pacman.static.exe -- cgit v1.2.3 From 0d8affeac01f40470c50e22cf721bd7a9b12050a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 15 Apr 2008 19:06:36 -0500 Subject: Slight changes to fix warnings from autoconf 2.62 Two variables needed the _cv_ or warnings were spit out saying they were not cache vars. Signed-off-by: Dan McGee --- acinclude.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 1d66dccd..1524a3dd 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3770,7 +3770,7 @@ AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; @@ -3794,7 +3794,7 @@ esac # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -- cgit v1.2.3