2006-04-17 00:05:42 +00:00
|
|
|
/* Copyright (C) 1996,1997,2000,2001, 2006 Free Software Foundation, Inc.
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
*
|
2003-04-05 19:15:35 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
*
|
2003-04-05 19:15:35 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Lesser General Public License for more details.
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
*
|
2003-04-05 19:15:35 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2005-05-23 19:57:22 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2003-04-05 19:15:35 +00:00
|
|
|
*/
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
|
|
|
|
|
/* This is the 'main' function for the `guile' executable. It is not
|
|
|
|
|
included in libguile.a.
|
|
|
|
|
|
|
|
|
|
Eventually, we hope this file will be automatically generated,
|
|
|
|
|
based on the list of installed, statically linked libraries on the
|
|
|
|
|
system. For now, please don't put interesting code in here. */
|
|
|
|
|
|
2003-03-25 23:56:27 +00:00
|
|
|
#if HAVE_CONFIG_H
|
|
|
|
|
# include <config.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-11-02 00:15:53 +00:00
|
|
|
#ifdef __MINGW32__
|
2001-11-04 15:52:30 +00:00
|
|
|
# define SCM_IMPORT 1
|
2001-11-02 00:15:53 +00:00
|
|
|
#endif
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
#include <libguile.h>
|
|
|
|
|
|
2000-01-10 00:37:47 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
2000-04-21 14:16:44 +00:00
|
|
|
#include <libguile/scmconfig.h>
|
2000-01-10 00:37:47 +00:00
|
|
|
#endif
|
2004-10-22 13:01:59 +00:00
|
|
|
#include <ltdl.h>
|
2000-01-10 00:37:47 +00:00
|
|
|
|
2002-07-10 19:40:43 +00:00
|
|
|
#ifdef HAVE_WINSOCK2_H
|
2001-06-26 17:53:09 +00:00
|
|
|
#include <winsock2.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
/* Debugger interface (don't change the order of the following lines) */
|
|
|
|
|
#define GDB_TYPE SCM
|
|
|
|
|
#include <libguile/gdb_interface.h>
|
|
|
|
|
GDB_INTERFACE;
|
|
|
|
|
|
|
|
|
|
static void
|
2001-06-07 21:12:19 +00:00
|
|
|
inner_main (void *closure SCM_UNUSED, int argc, char **argv)
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
{
|
2001-06-26 17:53:09 +00:00
|
|
|
#ifdef __MINGW32__
|
|
|
|
|
/* This is necessary to startup the Winsock API under Win32. */
|
|
|
|
|
WSADATA WSAData;
|
|
|
|
|
WSAStartup (0x0202, &WSAData);
|
|
|
|
|
GDB_INTERFACE_INIT;
|
|
|
|
|
#endif /* __MINGW32__ */
|
|
|
|
|
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
/* module initializations would go here */
|
|
|
|
|
scm_shell (argc, argv);
|
2001-06-26 17:53:09 +00:00
|
|
|
|
|
|
|
|
#ifdef __MINGW32__
|
|
|
|
|
WSACleanup ();
|
|
|
|
|
#endif /* __MINGW32__ */
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
main (int argc, char **argv)
|
|
|
|
|
{
|
2003-04-20 07:19:38 +00:00
|
|
|
#if !defined (__MINGW32__)
|
2002-10-09 21:15:59 +00:00
|
|
|
/* libtool automagically inserts this variable into your executable... */
|
2004-10-22 13:01:59 +00:00
|
|
|
extern const lt_dlsymlist lt_preloaded_symbols[];
|
|
|
|
|
lt_dlpreload_default (lt_preloaded_symbols);
|
2000-01-10 00:37:47 +00:00
|
|
|
#endif
|
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I
mean, generated mechanically, not self-generated. Hmm.))
* guile.c, script.c, script.h: New source files.
* init.c (scm_boot_guile_1): Call scm_init_script.
* libguile.h: #include "script.h".
* Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
targets, for new executable.
(libguile_la_SOURCES): Mention script.c.
(modinclude_HEADERS): Add script.h.
* configure.in: Always check for -lm, -lsocket, -lnsl, whether or
not dynamic linking is enabled. This is because we're generating
executables now. Move CY_AC_WITH_THREADS call after those, so the
values of cy_cv_threads_libs captures the libs chosen above.
* Makefile.in, configure, aclocal.m4: Regenerated.
1997-04-19 13:25:21 +00:00
|
|
|
scm_boot_guile (argc, argv, inner_main, 0);
|
|
|
|
|
return 0; /* never reached */
|
|
|
|
|
}
|
2000-03-19 19:01:16 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Local Variables:
|
|
|
|
|
c-file-style: "gnu"
|
|
|
|
|
End:
|
|
|
|
|
*/
|