#!/usr/bin/perl -w
#
# @(#)esqlld	50.1 97/01/12 17:54:51
#
# DBD::Informix for Perl Version 5
#
# Surrogate Linker for Informix ESQL/C versions 4.10.UC1 upwards
# -- Used to create shared libraries.
#
# Copyright (c) 1996,1997 Jonathan Leffler
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.

@ARGS = ();

for $arg (@ARGV)
{
	push @ARGS, $arg unless ($arg =~ /^-[DIU]/o);
}

# Sort out the real compiler.
# Note that if $ENV{ESQLLD} contains, for example, 'cc -G', then we
# need to split this into two words for the exec to work correctly.
$cmd = $ENV{ESQLLD};
$cmd = 'cc' unless ($cmd);
@cmd = split /\s+/, $cmd;
exec @cmd, @ARGS;
