Platform-Specific Sourcefiles?

Andrew Haley aph@redhat.com
Fri Oct 10 09:01:00 GMT 2003


Mohan Embar writes:
 > Hi People,
 > 
 > I've asked this question before, but never got a response: Is it
 > possible / desirable to put multipurpose, platform-specific helper
 > classes in their own sourcefiles in order to avoid win32.* and
 > posix.* becoming too monolithic?

It's the right thing to do.

 > How would this work from a configure.in / Makefile.am standpoint?
 > There must be a more elegant way to do this than to unconditionally
 > compile such files and surround them by #ifdef WIN32...#endif
 > guards.

It's done by using AC_SUBST; we already do it quite a lot in the
libgcj Makefile.  You can also use AC_LINK_FILES (now
AC_CONFIG_LINKS).  It's all in the autoconf manual.

Andrew.



More information about the Java mailing list