Update README on using libraries in non-standard locations
[bpt/guile.git] / libguile / guile.c
CommitLineData
1da93484 1/* Copyright (C) 1996,1997,2000,2001, 2006, 2008 Free Software Foundation, Inc.
0487b82f 2 *
73be1d9e
MV
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
0487b82f 7 *
73be1d9e
MV
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
0487b82f 12 *
73be1d9e
MV
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
92205699 15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
73be1d9e 16 */
0487b82f
JB
17
18/* This is the 'main' function for the `guile' executable. It is not
19 included in libguile.a.
20
21 Eventually, we hope this file will be automatically generated,
22 based on the list of installed, statically linked libraries on the
23 system. For now, please don't put interesting code in here. */
24
dbb605f5 25#ifdef HAVE_CONFIG_H
e938aff1
RB
26# include <config.h>
27#endif
28
d7db9f60 29#ifdef __MINGW32__
8f99e3f3 30# define SCM_IMPORT 1
d7db9f60 31#endif
0487b82f
JB
32#include <libguile.h>
33
4ed6bae2 34#ifdef HAVE_CONFIG_H
a0599745 35#include <libguile/scmconfig.h>
4ed6bae2 36#endif
a8255dca 37#include <ltdl.h>
4ed6bae2 38
f87c105a 39#ifdef HAVE_WINSOCK2_H
82893676
MG
40#include <winsock2.h>
41#endif
42
0487b82f
JB
43/* Debugger interface (don't change the order of the following lines) */
44#define GDB_TYPE SCM
45#include <libguile/gdb_interface.h>
46GDB_INTERFACE;
47
48static void
e81d98ec 49inner_main (void *closure SCM_UNUSED, int argc, char **argv)
0487b82f 50{
82893676
MG
51#ifdef __MINGW32__
52 /* This is necessary to startup the Winsock API under Win32. */
53 WSADATA WSAData;
54 WSAStartup (0x0202, &WSAData);
55 GDB_INTERFACE_INIT;
56#endif /* __MINGW32__ */
57
0487b82f
JB
58 /* module initializations would go here */
59 scm_shell (argc, argv);
82893676
MG
60
61#ifdef __MINGW32__
62 WSACleanup ();
63#endif /* __MINGW32__ */
0487b82f
JB
64}
65
66int
67main (int argc, char **argv)
68{
69 scm_boot_guile (argc, argv, inner_main, 0);
70 return 0; /* never reached */
71}
89e00824
ML
72
73/*
74 Local Variables:
75 c-file-style: "gnu"
76 End:
77*/