battleblow / openjdk-jdk11u

BSD port of OpenJDK 11
GNU General Public License v2.0
9 stars 8 forks source link

Autoconf and make changes to better support system libraries #10

Closed bsdkurt closed 5 years ago

bsdkurt commented 5 years ago

With these changes it is not necessary to use --with-extra-cflags/cxxflags/ldflags to use system libs on the BSD's (assuming libjpeg package has pkg-config metadata installed).

battleblow commented 5 years ago

How close does this get us to not needing --with-package-path? There are comments that this should be removed in the 11 source base and it was removed in 12 (I added it back for now)

bsdkurt commented 5 years ago

Yea, I've been unwinding my use of PACKAGE_PATH and --with-package-path. These changes get us a bit closer.

I believe there are two uses left to unwind/revert that I added: iconv and DEFAULT_LIBPATH in os_bsd.cpp. For DEFAULT_LIBPATH I think we should put something like this instead:

#ifdef __APPLE__
  #define DEFAULT_LIBPATH "/lib:/usr/lib"
#elif defined(__NetBSD__)
  #define DEFAULT_LIBPATH "/usr/lib:/usr/pkg/lib"
#else
  #define DEFAULT_LIBPATH "/usr/lib:/usr/local/lib"
#endif

and do the patch & substitute approach in ports to change /usr/local. Let me know if you agree and I add this to this pull request or submit another.

For iconv I think it should be replaced with something more generally accepted but I haven't looked into what this is yet.