$D2CFLAGS = $d2c_runtime
    . '-L../../common/streams '
    . '-L../../common/print -L../../common/format '
    . '-L../runtime/random -L../../common/coll-ext '
    . '-L../../common/string-ext -L../runtime/melange '
    . '-L../../common/table-ext -L../../common/standard-io '
    . '-L../../common/regexp';
$CPPFLAGS = $CPPFLAGS . ' -I$(SRCDIR)';

# We're not going to worry about whether dig is actually *useful* on
# this platform, only whether it can be compiled.
if ($features{'compiled_for_win32'}) {
    $dig_lid_file = 'win32-dig';
    &emit_c_file_rule('win32-dig-support', 'win32-dig-support.h');
    &emit_melange_rule('win32-dig-c', 'win32-dig-support.h');
} elsif ($features{'compiled_for_hpux'}) {
    $dig_lid_file = 'hp-dig';
    &emit_c_file_rule('hp-dig-support', 'hp-dig-support.h');
    &emit_melange_rule('hp-dig-c', 'hp-dig-support.h');
} elsif ($features{'posix_dig'}) {
    # The only non-portable part of dig involves passing Control-C through
    # to GDB. This can be done in a portable fashion assuming the system
    # supports sigaction and SA_RESTART. For now, we'll assume that all
    # non-Windows platforms work this way. If dig fails to compile on one
    # of these platforms, contact the gd-hackers list.
    $dig_lid_file = 'posix-dig';
    &emit_c_file_rule('posix-dig-support', 'posix-dig-support.h');
    &emit_melange_rule('posix-dig-c', 'posix-dig-support.h');
} else {
    &unknown_platform_error();
}
   
if ($dig_lid_file) {
    &emit_library_rule($dig_lid_file, '$(BUILDROOT)/force.timestamp', '', 
		       'compile', 'install');
}
