]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Add installation instructions for AIX.
authorBruno Haible <bruno@clisp.org>
Fri, 17 Nov 2023 12:10:43 +0000 (13:10 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 17 Nov 2023 12:10:43 +0000 (13:10 +0100)
* INSTALL.aix: New file.
* Makefile.am (EXTRA_DIST): Add it.

INSTALL.aix [new file with mode: 0644]
Makefile.am

diff --git a/INSTALL.aix b/INSTALL.aix
new file mode 100644 (file)
index 0000000..1b926ab
--- /dev/null
@@ -0,0 +1,54 @@
+Installation on AIX:
+
+Here are some hints to get a successful build of GNU gettext on AIX.
+
+* Set the recommended environment variables before running configure:
+  https://gitlab.com/ghwiki/gnow-how/-/wikis/Platforms/Configuration
+
+  Namely:
+  * for a 32-bit build with gcc:
+    CC=gcc
+    CXX=g++
+    CPPFLAGS="-I$PREFIX/include"
+    LDFLAGS="-L$PREFIX/lib"
+    unset AR NM
+  * for a 32-bit build with xlc:
+    CC="xlc -qthreaded -qtls"
+    CXX="xlC -qthreaded -qtls"
+    CPPFLAGS="-I$PREFIX/include"
+    LDFLAGS="-L$PREFIX/lib"
+    unset AR NM
+  * for a 64-bit build with gcc:
+    CC="gcc -maix64"
+    CXX="g++ -maix64"
+    CPPFLAGS="-I$PREFIX/include"
+    LDFLAGS="-L$PREFIX/lib"
+    AR="ar -X 64"
+    NM="nm -X 64 -B"
+  * for a 64-bit build with xlc:
+    CC="xlc -q64 -qthreaded -qtls"
+    CXX="xlC -q64 -qthreaded -qtls"
+    CPPFLAGS="-I$PREFIX/include"
+    LDFLAGS="-L$PREFIX/lib"
+    AR="ar -X 64"
+    NM="nm -X 64 -B"
+
+  where $PREFIX is the value that you pass to the --prefix configure option.
+
+* Avoid using a --prefix that contains earlier installations of the same
+  package.
+
+  Rationale: Because the AIX linker hardcodes directory names in shared
+  libraries, GNU libtool has a peculiar configuration on AIX. It ends up
+  mixing the in-build-tree libraries with the libraries in the install
+  locations, leading to all sorts of errors.
+
+  If you really need to use a --prefix that contains an earlier
+  installation of the same package, proceed in two steps:
+    1. Build GNU gettext with --disable-shared, and install it.
+    2. Do a "make distclean".
+    3. Build GNU gettext with --enable-shared. "make check" will likely
+       fail with hundreds of test failures, because the AIX linker gets
+       confused when it find a static libintl installed and expects a
+       shared libintl in the same place. Do "make install" regardless.
+       Then you can do "make check", and it will succeed.
index d763bfddf78ca0a79598db830111c1396065c022..3f21c598b2e0a4efaca35f5c7624a505ad03699e 100644 (file)
@@ -103,6 +103,11 @@ EXTRA_DIST += os2/README.OS2 os2/Makefile os2/backward.def os2/configure.awk
 EXTRA_DIST += INSTALL.windows windows/windres-options windows/gettext.rc
 
 
+# AIX support.
+
+EXTRA_DIST += INSTALL.aix
+
+
 # Versioning based on Git release tags.
 
 EXTRA_DIST += $(top_srcdir)/.version