diff -up hdf4-master/java/src/jni/Makefile.am.build hdf4-master/java/src/jni/Makefile.am --- hdf4-master/java/src/jni/Makefile.am.build 2024-02-06 22:11:46.219972170 -0700 +++ hdf4-master/java/src/jni/Makefile.am 2024-02-06 22:12:33.262288868 -0700 @@ -16,7 +16,10 @@ AM_CPPFLAGS=-I$(top_srcdir)/hdf/src $(JNIFLAGS) # This is our main target -lib_LTLIBRARIES=libhdf_java.la +pkglib_LTLIBRARIES=libhdf_java.la + +# No soname for JNI library +libhdf_java_la_LDFLAGS = -avoid-version # Source files for the library libhdf_java_la_SOURCES=hdfanImp.c hdfdfpalImp.c \ diff -up hdf4-master/java/src/Makefile.am.build hdf4-master/java/src/Makefile.am --- hdf4-master/java/src/Makefile.am.build 2024-02-06 17:40:20.000000000 -0700 +++ hdf4-master/java/src/Makefile.am 2024-02-06 22:11:46.219972170 -0700 @@ -13,8 +13,8 @@ JAVAROOT = .classes classes: test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) -jarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -hdf_javadir = $(libdir) +jarfile = $(PACKAGE_TARNAME).jar +hdf_javadir = $(prefix)/lib/java pkgpath = hdf/hdflib CLASSPATH_ENV=CLASSPATH=.:$(top_srcdir)/java/lib/slf4j-api-1.7.33.jar:$$CLASSPATH diff -up hdf4-master/java/test/junit.sh.in.build hdf4-master/java/test/junit.sh.in --- hdf4-master/java/test/junit.sh.in.build 2024-02-06 17:40:20.000000000 -0700 +++ hdf4-master/java/test/junit.sh.in 2024-02-06 22:11:46.219972170 -0700 @@ -40,7 +40,7 @@ HDFLIB_HOME="$top_srcdir/java/lib" BLDLIBDIR="$top_builddir/hdf4/lib" BLDDIR="." HDFTEST_HOME="$top_srcdir/java/test" -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar +JARFILE=@PACKAGE_TARNAME@.jar TESTJARFILE=jar@PACKAGE_TARNAME@test.jar test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR diff -up hdf4-master/java/test/Makefile.am.build hdf4-master/java/test/Makefile.am --- hdf4-master/java/test/Makefile.am.build 2024-02-06 17:40:20.000000000 -0700 +++ hdf4-master/java/test/Makefile.am 2024-02-06 22:11:46.219972170 -0700 @@ -12,7 +12,7 @@ classes: test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) pkgpath = test -hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar +hdfjarfile = $(PACKAGE_TARNAME).jar CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/junit.jar:$(top_srcdir)/java/lib/hamcrest-core.jar:$(top_srcdir)/java/lib/slf4j-api-1.7.33.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.33.jar:$$CLASSPATH jarfile = jar$(PACKAGE_TARNAME)test.jar