More install-tests.

* install-tests/test-api.c: New file.
* install-tests/Makefile.in (installcheck): Compile and run test-api.
(SOURCE_FILES): Add test-api.c.
diff --git a/ChangeLog b/ChangeLog
index 299cd62..cf4bc57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2025-06-09  Bruno Haible  <bruno@clisp.org>
 
+	More install-tests.
+	* install-tests/test-api.c: New file.
+	* install-tests/Makefile.in (installcheck): Compile and run test-api.
+	(SOURCE_FILES): Add test-api.c.
+
+2025-06-09  Bruno Haible  <bruno@clisp.org>
+
 	build: Implement 'installcheck' target.
 	* install-tests/test-version.c: New file.
 	* install-tests/Makefile.in: New file.
diff --git a/install-tests/Makefile.in b/install-tests/Makefile.in
index 5e2febb..e480ad0 100644
--- a/install-tests/Makefile.in
+++ b/install-tests/Makefile.in
@@ -46,12 +46,19 @@
 	      -o test-version $(srcdir)/test-version.c -liconv
 	@AUGMENT_SHLIBPATH@ ./test-version
 	rm -rf test-version test-version$(EXEEXT)
+	$(CC) -I$(includedir) -L$(libdir) \
+	      $(CPPFLAGS) \
+	      $(CFLAGS) $(LDFLAGS) \
+	      -o test-api $(srcdir)/test-api.c -liconv
+	@AUGMENT_SHLIBPATH@ ./test-api
+	rm -rf test-api test-api$(EXEEXT)
 	PATH='$(bindir)'@PATH_SEPARATOR@"$$PATH"; iconv --version | grep 'GNU libiconv' > /dev/null
 
 # List of source files.
 SOURCE_FILES = \
   Makefile.in \
-  test-version.c
+  test-version.c \
+  test-api.c
 # List of distributed files imported from other packages.
 IMPORTED_FILES =
 # List of distributed files generated by autotools or Makefile.devel.
diff --git a/install-tests/test-api.c b/install-tests/test-api.c
new file mode 100644
index 0000000..d643c25
--- /dev/null
+++ b/install-tests/test-api.c
@@ -0,0 +1,27 @@
+/* Test parts of the API.
+   Copyright (C) 2025  Bruno Haible <bruno@clisp.org>
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <iconv.h>
+
+int
+main ()
+{
+  iconv_t cd = iconv_open ("UTF-8", "ASCII");
+  if (cd == (iconv_t)(-1))
+    return 1;
+  iconv_close (cd);
+  return 0;
+}